From: Stafford Horne <shorne@gmail.com>
To: GDB patches <gdb-patches@sourceware.org>
Cc: Stafford Horne <shorne@gmail.com>
Subject: [PATCH 4/4] gdb: Fix function parameter alignments in or1k-tdep.c.
Date: Thu, 14 Dec 2017 06:14:00 -0000 [thread overview]
Message-ID: <20171214061341.7797-5-shorne@gmail.com> (raw)
In-Reply-To: <20171214061341.7797-1-shorne@gmail.com>
As suggested by Joel Brobecker <brobecker@adacore.com> and as per fsf
coding standards. Also fix a few more issues with directly printing
pointers.
gdb/ChangeLog:
yyyy-mm-dd Stafford Horne <shorne@gmail.com>
* 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;
--
2.13.6
next prev parent reply other threads:[~2017-12-14 6:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 6:14 [PATCH 0/4] OpenRISC misc updates Stafford Horne
2017-12-14 6:14 ` [PATCH 1/4] gdb: Add Stafford Horne as or1k maintainer Stafford Horne
2017-12-26 13:53 ` Stafford Horne
2018-06-01 17:24 ` Simon Marchi
2018-06-03 3:26 ` Stafford Horne
2017-12-14 6:14 ` [PATCH 2/4] sim: " Stafford Horne
2017-12-26 13:53 ` Stafford Horne
2018-06-01 17:25 ` Simon Marchi
2018-06-03 3:29 ` Stafford Horne
2017-12-14 6:14 ` [PATCH 3/4] gdb: Add news entries for new or1k target Stafford Horne
2017-12-14 17:01 ` Eli Zaretskii
2017-12-14 6:14 ` Stafford Horne [this message]
2017-12-15 10:48 ` [PATCH 4/4] gdb: Fix function parameter alignments in or1k-tdep.c Yao Qi
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=20171214061341.7797-5-shorne@gmail.com \
--to=shorne@gmail.com \
--cc=gdb-patches@sourceware.org \
/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).