From patchwork Thu Dec 14 06:13:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 24932 Received: (qmail 98682 invoked by alias); 14 Dec 2017 06:14:15 -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 98497 invoked by uid 89); 14 Dec 2017 06:14:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pf0-f193.google.com Received: from mail-pf0-f193.google.com (HELO mail-pf0-f193.google.com) (209.85.192.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Dec 2017 06:14:11 +0000 Received: by mail-pf0-f193.google.com with SMTP id a90so2971583pfk.1 for ; Wed, 13 Dec 2017 22:14:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zCWcm10ikTyBh9TwTZ1bMI7Ch+IyfIO3Gw25adQTrh8=; b=fF3070CgQgqmuOtXtGfiggiHdUFOekvT40BIrRIiXmaXTe81k+qe//ipURno+ayX7I BMZ1M4QH9UA4zTFJg641ELP2E+N5s3qhKxv1bWICDiQqmgg9Vf5EKN7HYWwBNsBPFbaw rlxJLewNzf1FAFze8MUZXfDvr3bWNnU4bTq4ty5bp5DI2FqTUoSLBuouD3sDU6Dp4HZh yQIcL8/UxOVmAJFFybDYSZOCTYDnS9EwQ0YLrb2dI7Pu0fXbJHJA2lQjC9lln4Wq6Idw L2d6wXggJZ8vyE0KARFM/qCZZDjdlyLC8Z1vbhBMWM7lVhpmZXmbw4+x33R+X24kHnDi tGlQ== X-Gm-Message-State: AKGB3mIuFcGWMWvC6qNylQ2Uzk8PJBM/8oooajcUehSyk+8v1yVFQdkr pWYTyEW8fdot2kNTyGNWJX5CUCvb X-Google-Smtp-Source: ACJfBoulPxUIhKuFnMpO5eeNUdmEUOMdYMBDoV9glQyLhEVbryQRyBgsPQX0+t9mWro7RreSIwLC7A== X-Received: by 10.99.115.9 with SMTP id o9mr7651073pgc.198.1513232049909; Wed, 13 Dec 2017 22:14:09 -0800 (PST) Received: from localhost (g41.219-103-184.ppp.wakwak.ne.jp. [219.103.184.41]) by smtp.gmail.com with ESMTPSA id q74sm6101638pfd.134.2017.12.13.22.14.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Dec 2017 22:14:09 -0800 (PST) From: Stafford Horne To: GDB patches Cc: Stafford Horne Subject: [PATCH 4/4] gdb: Fix function parameter alignments in or1k-tdep.c. Date: Thu, 14 Dec 2017 15:13:41 +0900 Message-Id: <20171214061341.7797-5-shorne@gmail.com> In-Reply-To: <20171214061341.7797-1-shorne@gmail.com> References: <20171214061341.7797-1-shorne@gmail.com> X-IsSubscribed: yes As suggested by Joel Brobecker and as per fsf coding standards. Also fix a few more issues with directly printing pointers. gdb/ChangeLog: yyyy-mm-dd Stafford Horne * gdb/or1k-tdep.c (show_or1k_debug): Fix function parameter alignment. (or1k_analyse_inst): Likewise. (or1k_single_step_through_delay): Likewise. (or1k_frame_cache): Fix parameter alignment and use paddress() instead of %x. --- gdb/or1k-tdep.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c index 06ee53e83c..a8de029997 100644 --- a/gdb/or1k-tdep.c +++ b/gdb/or1k-tdep.c @@ -55,7 +55,7 @@ static int or1k_debug = 0; static void show_or1k_debug (struct ui_file *file, int from_tty, - struct cmd_list_element *c, const char *value) + struct cmd_list_element *c, const char *value) { fprintf_filtered (file, _("OpenRISC debugging is %s.\n"), value); } @@ -133,7 +133,7 @@ or1k_analyse_inst (uint32_t inst, const char *format, ...) /* Check we got something, and if so skip on. */ if (start_ptr == end_ptr) error (_("bitstring \"%s\" at offset %d has no length field."), - format, i); + format, i); i += end_ptr - start_ptr; @@ -142,7 +142,7 @@ or1k_analyse_inst (uint32_t inst, const char *format, ...) just should not be wrong. */ if ('b' != format[i++]) error (_("bitstring \"%s\" at offset %d has no terminating 'b'."), - format, i); + format, i); /* Break out the field. There is a special case with a bit width of 32. */ @@ -159,7 +159,7 @@ or1k_analyse_inst (uint32_t inst, const char *format, ...) default: error (_("invalid character in bitstring \"%s\" at offset %d."), - format, i); + format, i); break; } } @@ -372,9 +372,9 @@ or1k_single_step_through_delay (struct gdbarch *gdbarch, return 0; insn = cgen_lookup_insn (tdep->gdb_cgen_cpu_desc, - NULL, - or1k_fetch_instruction (gdbarch, ppc), - NULL, 32, &tmp_fields, 0); + NULL, + or1k_fetch_instruction (gdbarch, ppc), + NULL, 32, &tmp_fields, 0); /* NULL here would mean the last instruction was not understood by cgen. This should not usually happen, but if does its not a delay slot. */ @@ -942,8 +942,8 @@ or1k_frame_cache (struct frame_info *this_frame, void **prologue_cache) have executed the code. Check we have a sane prologue size, and if zero we are frameless and can give up here. */ if (end_addr < start_addr) - error (_("end addr 0x%08x is less than start addr 0x%08x"), - (unsigned int) end_addr, (unsigned int) start_addr); + error (_("end addr %s is less than start addr %s"), + paddress (gdbarch, end_addr), paddress (gdbarch, start_addr)); if (end_addr == start_addr) frame_size = 0;