diff options
author | Stafford Horne <shorne@gmail.com> | 2017-12-17 07:20:51 +0900 |
---|---|---|
committer | Stafford Horne <shorne@gmail.com> | 2017-12-17 07:20:51 +0900 |
commit | 38af1824019684e819ffb880bdf7fb03a2c2000a (patch) | |
tree | 7b0ee9cdf7aa706b2ec7a3fe48e5592cc4208a08 /gdb | |
parent | b282f0f2b56903c7b58f1eb94b88e468851928e8 (diff) | |
download | fsf-binutils-gdb-38af1824019684e819ffb880bdf7fb03a2c2000a.zip fsf-binutils-gdb-38af1824019684e819ffb880bdf7fb03a2c2000a.tar.gz fsf-binutils-gdb-38af1824019684e819ffb880bdf7fb03a2c2000a.tar.bz2 |
gdb: Fix function parameter alignments in or1k-tdep.c.
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:
* 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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/or1k-tdep.c | 18 |
2 files changed, 17 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 20da989..f795526 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2017-12-17 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. + +2017-12-17 Stafford Horne <shorne@gmail.com> + * NEWS (Changes since GDB 8.0): Mention new or1k target and new commands to set/show or1k debug. diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c index 06ee53e..a8de029 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; |