From patchwork Wed Aug 20 03:42:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 2444 Received: (qmail 27192 invoked by alias); 20 Aug 2014 03:46:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 27169 invoked by uid 89); 20 Aug 2014 03:46:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Aug 2014 03:46:22 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1XJwqo-00069S-HX from Yao_Qi@mentor.com ; Tue, 19 Aug 2014 20:46:18 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 19 Aug 2014 20:46:18 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Tue, 19 Aug 2014 20:46:17 -0700 Message-ID: <53F41920.8040800@codesourcery.com> Date: Wed, 20 Aug 2014 11:42:24 +0800 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Pedro Alves , Will Newton CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH] Support _Complex in hard-VFP abi References: <1407761487-9251-1-git-send-email-yao@codesourcery.com> <53F34D56.5050705@codesourcery.com> <53F3D349.9080904@redhat.com> In-Reply-To: <53F3D349.9080904@redhat.com> X-IsSubscribed: yes On 08/20/2014 06:44 AM, Pedro Alves wrote: > This is borderline pedantry, but this looks ugly enough to me that > I'll speak up in case this ends up being the norm. :-) FWIW, I agree > with Will here -- I think we should make an exception to the rule > in the cases where the comment is actually a paste of output, > multiline code or similar cases. It's kind of like a @smallexample > region in texinfo, that begs to be rendered on its own block/lines, > separate from the text around it. I am fine with this exception here, but we'd better document it. The rule is documented here https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards Block comments must appear in the following form, with no /*- or */-only lines, and no leading *: /* Wait for control to return from inferior to debugger. If inferior gets a signal, we may decide to start it up again instead of returning. That is why there is a loop in this function. When this function actually returns it means the inferior should be left stopped and GDB should read more commands. */ I propose to add the following words after this paragraph above, "Exceptionally, */ can be put at a separate line if the comment is ended with an example, an output or a code snippet: /* Arguments of complex T where T is one of the types float or double get treated as if they are implemented as: struct complexT { T real; T imag; }; */" The patch below updates the comments I've seen in current code base. diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 173451f..abd9c48 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -670,7 +670,9 @@ amd64_classify (struct type *type, enum amd64_reg_class class[2]) struct complexT { T real; T imag; - }; */ + }; + + */ else if (code == TYPE_CODE_COMPLEX && len == 8) class[0] = AMD64_SSE; else if (code == TYPE_CODE_COMPLEX && len == 16) diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 2e2d6fd..69ffecb 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -3597,7 +3597,9 @@ arm_vfp_cprc_sub_candidate (struct type *t, { T real; T imag; - }; */ + }; + + */ switch (TYPE_LENGTH (t)) { case 8: diff --git a/gdb/arm-wince-tdep.c b/gdb/arm-wince-tdep.c index 24f0e5b..aff8d20 100644 --- a/gdb/arm-wince-tdep.c +++ b/gdb/arm-wince-tdep.c @@ -45,9 +45,12 @@ arm_pe_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) CORE_ADDR next_pc; /* The format of an ARM DLL trampoline is: + ldr ip, [pc] ldr pc, [ip] - .dw __imp_ */ + .dw __imp_ + + */ if (pc == 0 || read_memory_unsigned_integer (pc + 0, 4, byte_order) != 0xe59fc000 diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index f5e3418..f5b6341 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -17132,7 +17132,9 @@ psymtab_include_file_name (const struct line_header *lh, int file_index, include_name = "hello.c" dir_name = "." DW_AT_comp_dir = comp_dir = "/tmp" - DW_AT_name = "./hello.c" */ + DW_AT_name = "./hello.c" + + */ if (dir_name != NULL) {