This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: bitpos expansion patches summary
On Tue, 7 Aug 2012 16:39:23 +0200, Jan wrote:
> mips-tdep.c: In function ‘mips_n32n64_return_value’:
> mips-tdep.c:5044:5: error: format ‘%d’ expects argument of type
> ‘int’, but argument 3 has type ‘long int’ [-Werror=format] cc1: all
> warnings being treated as errors tic6x-tdep.c: In function
> ‘tic6x_push_dummy_call’: tic6x-tdep.c:1133:8: error: format ‘%d’
> expects argument of type ‘int’, but argument 4 has type ‘long
> int’ [-Werror=format] cc1: all warnings being treated as errors
> gdbtypes.c:955:1: error: conflicting types for
> ‘lookup_array_range_type’ In file included from gdbtypes.c:28:0:
> gdbtypes.h:1537:21: note: previous declaration of
> ‘lookup_array_range_type’ was here gdbtypes.c:991:1: error:
> conflicting types for ‘lookup_string_range_type’ In file included
> from gdbtypes.c:28:0: gdbtypes.h:1541:21: note: previous declaration
> of ‘lookup_string_range_type’ was here
>
I've fixed the build errors with the --enable-targets=all with the
attached patch. I have done a clean build with --enable-targets=all to
verify.
Regards,
Siddhesh
gdb/ChangeLog:
* gdbtypes.h (lookup_array_range_type): Expand parameters
LOW_BOUND, HIGH_BOUND to LONGEST.
(lookup_string_range_type): Likewise.
* mips-tdep.c (mips_n32n64_return_value): Use plongest to
format print OFFSET.
* tic6x-tdep.c (tic6x_push_dummy_call): Use plongest to format
print LEN.
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index cab8263..ff791ab 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -1534,11 +1534,11 @@ extern struct type *create_range_type (struct type *, struct type *, LONGEST,
extern struct type *create_array_type (struct type *, struct type *,
struct type *);
-extern struct type *lookup_array_range_type (struct type *, int, int);
+extern struct type *lookup_array_range_type (struct type *, LONGEST, LONGEST);
extern struct type *create_string_type (struct type *, struct type *,
struct type *);
-extern struct type *lookup_string_range_type (struct type *, int, int);
+extern struct type *lookup_string_range_type (struct type *, LONGEST, LONGEST);
extern struct type *create_set_type (struct type *, struct type *);
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 4eb91b6..5b0efe5 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -5040,8 +5040,8 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function,
if (offset + xfer > TYPE_LENGTH (type))
xfer = TYPE_LENGTH (type) - offset;
if (mips_debug)
- fprintf_unfiltered (gdb_stderr, "Return struct+%d:%d in $%d\n",
- offset, xfer, regnum);
+ fprintf_unfiltered (gdb_stderr, "Return struct+%s:%d in $%d\n",
+ plongest (offset), xfer, regnum);
mips_xfer_register (gdbarch, regcache,
gdbarch_num_regs (gdbarch) + regnum,
xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf,
diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c
index 8309d58..5e73d27 100644
--- a/gdb/tic6x-tdep.c
+++ b/gdb/tic6x-tdep.c
@@ -1130,7 +1130,8 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
}
else
internal_error (__FILE__, __LINE__,
- _("unexpected length %d of arg %d"), len, argnum);
+ _("unexpected length %s of arg %d"),
+ plongest (len), argnum);
addr = sp + stack_offset;
write_memory (addr, val, len);