aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog36
-rw-r--r--gdb/Makefile.in4
-rw-r--r--gdb/amd64fbsd-tdep.c4
-rw-r--r--gdb/iq2000-tdep.c13
-rw-r--r--gdb/m32r-rom.c12
-rw-r--r--gdb/m68kbsd-tdep.c1
-rw-r--r--gdb/mn10300-tdep.c7
-rw-r--r--gdb/nto-tdep.c5
-rw-r--r--gdb/remote-m32r-sdi.c30
-rw-r--r--gdb/xtensa-tdep.c22
10 files changed, 90 insertions, 44 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f7570be..7fdda1e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,41 @@
2007-11-16 Ulrich Weigand <uweigand@de.ibm.com>
+ * amd64fsdb-tdep.c (amd64fbsd_sigtramp_start_addr): Use ULL suffix.
+ (amd64fbsd_sigtramp_end_addr): Likewise.
+
+ * iq2000-tdep.c (iq2000_pointer_to_address): Fix argument type.
+ (iq2000_address_to_pointer): Likewise.
+ (iq2000_frame_prev_register): Likewise.
+ (iq2000_extract_return_value): Use regcache_cooked_read_unsigned
+ instead of regcache_cooked_read into CORE_ADDR variable.
+ (iq2000_return_value): Fix argument types.
+
+ * m32r-rom.c (m32r_load_section): Fix printf argument type.
+ (m32r_load): Likewise.
+
+ * m68kbsd-tdep.c: Include "gdbtypes.h".
+ * Makefile.in: Update dependencies.
+
+ * mn10300-tdep.c (mn10300_frame_unwind_cache): Fix aliasing violation.
+
+ * nto-tdep.c (LM_ADDR): Do not refer to no-longer-existing
+ lmo->l_addr_size element.
+
+ * remote-m32r-sdi.c (m32r_xfer_memory): Use paddr to print address.
+ (m32r_insert_breakpoint): Likewise.
+ (m32r_remove_breakpoint): Likewise.
+ (m32r_insert_watchpoint): Likewise.
+ (m32r_remove_watchpoint): Likewise.
+ (m32r_load): Fix printf argument type.
+
+ * xtensa-tdep.c (xtensa_regset_from_core_section): Fix printf
+ argument type.
+ (xtensa_frame_this_id): Do not cast pointers to "int" for output.
+ (xtensa_frame_prev_register): Likewise.
+ (xtensa_push_dummy_call): Likewise.
+
+2007-11-16 Ulrich Weigand <uweigand@de.ibm.com>
+
* config/alpha/alpha-linux.mt: Remove file.
* config/alpha/alpha.mt: Remove file.
* config/alpha/alpha-osf1.mt: Remove file.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c0ac91e..e4011fc 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2322,8 +2322,8 @@ m68kbsd-nat.o: m68kbsd-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
$(bsd_kvm_h)
m68kbsd-tdep.o: m68kbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
$(osabi_h) $(regcache_h) $(regset_h) $(trad_frame_h) \
- $(tramp_frame_h) $(gdb_assert_h) $(gdb_string_h) $(m68k_tdep_h) \
- $(solib_svr4_h)
+ $(tramp_frame_h) $(gdbtypes_h) $(gdb_assert_h) $(gdb_string_h) \
+ $(m68k_tdep_h) $(solib_svr4_h)
m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
$(language_h) $(gdbcore_h) $(gdb_string_h) $(regcache_h) \
$(m68k_tdep_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \
diff --git a/gdb/amd64fbsd-tdep.c b/gdb/amd64fbsd-tdep.c
index 26c557f..d04908b 100644
--- a/gdb/amd64fbsd-tdep.c
+++ b/gdb/amd64fbsd-tdep.c
@@ -86,8 +86,8 @@ static int amd64fbsd_r_reg_offset[] =
};
/* Location of the signal trampoline. */
-CORE_ADDR amd64fbsd_sigtramp_start_addr = 0x7fffffffffc0;
-CORE_ADDR amd64fbsd_sigtramp_end_addr = 0x7fffffffffe0;
+CORE_ADDR amd64fbsd_sigtramp_start_addr = 0x7fffffffffc0ULL;
+CORE_ADDR amd64fbsd_sigtramp_end_addr = 0x7fffffffffe0ULL;
/* From <machine/signal.h>. */
int amd64fbsd_sc_reg_offset[] =
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index 1e95077..ed6621d 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -86,7 +86,7 @@ insn_addr_from_ptr (CORE_ADDR ptr) /* target_pointer to CORE_ADDR. */
Convert a target pointer to an address in host (CORE_ADDR) format. */
static CORE_ADDR
-iq2000_pointer_to_address (struct type * type, const void * buf)
+iq2000_pointer_to_address (struct type * type, const gdb_byte * buf)
{
enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
@@ -103,7 +103,7 @@ iq2000_pointer_to_address (struct type * type, const void * buf)
Convert a host-format address (CORE_ADDR) into a target pointer. */
static void
-iq2000_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
+iq2000_address_to_pointer (struct type *type, gdb_byte *buf, CORE_ADDR addr)
{
enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
@@ -393,7 +393,7 @@ static void
iq2000_frame_prev_register (struct frame_info *next_frame, void **this_cache,
int regnum, int *optimizedp,
enum lval_type *lvalp, CORE_ADDR *addrp,
- int *realnump, void *valuep)
+ int *realnump, gdb_byte *valuep)
{
struct iq2000_frame_cache *cache = iq2000_frame_cache (next_frame, this_cache);
if (regnum == E_SP_REGNUM && cache->saved_sp)
@@ -558,7 +558,6 @@ iq2000_extract_return_value (struct type *type, struct regcache *regcache,
returned in a register, and if larger than 8 bytes, it is
returned in a stack location which is pointed to by the same
register. */
- CORE_ADDR return_buffer;
int len = TYPE_LENGTH (type);
if (len <= (2 * 4))
@@ -584,7 +583,9 @@ iq2000_extract_return_value (struct type *type, struct regcache *regcache,
{
/* Return values > 8 bytes are returned in memory,
pointed to by FN_RETURN_REGNUM. */
- regcache_cooked_read (regcache, E_FN_RETURN_REGNUM, & return_buffer);
+ ULONGEST return_buffer;
+ regcache_cooked_read_unsigned (regcache, E_FN_RETURN_REGNUM,
+ &return_buffer);
read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
}
}
@@ -592,7 +593,7 @@ iq2000_extract_return_value (struct type *type, struct regcache *regcache,
static enum return_value_convention
iq2000_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
- void *readbuf, const void *writebuf)
+ gdb_byte *readbuf, const gdb_byte *writebuf)
{
if (iq2000_use_struct_convention (type))
return RETURN_VALUE_STRUCT_CONVENTION;
diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c
index a0b441f..3ba920b 100644
--- a/gdb/m32r-rom.c
+++ b/gdb/m32r-rom.c
@@ -85,7 +85,8 @@ m32r_load_section (bfd *abfd, asection *s, void *obj)
*data_count += section_size;
printf_filtered ("Loading section %s, size 0x%lx lma ",
- bfd_section_name (abfd, s), section_size);
+ bfd_section_name (abfd, s),
+ (unsigned long) section_size);
deprecated_print_address_numeric (section_base, 1, gdb_stdout);
printf_filtered ("\n");
gdb_flush (gdb_stdout);
@@ -167,7 +168,8 @@ m32r_load (char *filename, int from_tty)
}
#endif
gettimeofday (&end_time, NULL);
- printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd));
+ printf_filtered ("Start address 0x%lx\n",
+ (unsigned long) bfd_get_start_address (abfd));
print_transfer_performance (gdb_stdout, data_count, 0, &start_time,
&end_time);
@@ -523,14 +525,16 @@ m32r_upload_command (char *args, int from_tty)
data_count += section_size;
printf_filtered ("Loading section %s, size 0x%lx lma ",
- bfd_section_name (abfd, s), section_size);
+ bfd_section_name (abfd, s),
+ (unsigned long) section_size);
deprecated_print_address_numeric (section_base, 1, gdb_stdout);
printf_filtered ("\n");
gdb_flush (gdb_stdout);
}
/* Finally, make the PC point at the start address */
write_pc (bfd_get_start_address (abfd));
- printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd));
+ printf_filtered ("Start address 0x%lx\n",
+ (unsigned long) bfd_get_start_address (abfd));
print_transfer_performance (gdb_stdout, data_count, 0, &start_time,
&end_time);
}
diff --git a/gdb/m68kbsd-tdep.c b/gdb/m68kbsd-tdep.c
index 5d447ce..69fdf80 100644
--- a/gdb/m68kbsd-tdep.c
+++ b/gdb/m68kbsd-tdep.c
@@ -25,6 +25,7 @@
#include "regset.h"
#include "trad-frame.h"
#include "tramp-frame.h"
+#include "gdbtypes.h"
#include "gdb_assert.h"
#include "gdb_string.h"
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 9b59c50..25239de 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -839,13 +839,16 @@ mn10300_frame_unwind_cache (struct frame_info *next_frame,
{
struct trad_frame_cache *cache;
CORE_ADDR pc, start, end;
+ void *cache_p;
if (*this_prologue_cache)
return (*this_prologue_cache);
- cache = trad_frame_cache_zalloc (next_frame);
+ cache_p = trad_frame_cache_zalloc (next_frame);
pc = gdbarch_unwind_pc (get_frame_arch (next_frame), next_frame);
- mn10300_analyze_prologue (next_frame, (void **) &cache, pc);
+ mn10300_analyze_prologue (next_frame, &cache_p, pc);
+ cache = cache_p;
+
if (find_pc_partial_function (pc, NULL, &start, &end))
trad_frame_set_id (cache,
frame_id_build (trad_frame_get_this_base (cache),
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index 2b29292..4f9281e 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -264,9 +264,8 @@ LM_ADDR (struct so_list *so)
{
struct link_map_offsets *lmo = nto_fetch_link_map_offsets ();
- return (CORE_ADDR) extract_signed_integer (so->lm_info->lm +
- lmo->l_addr_offset,
- lmo->l_addr_size);
+ return extract_typed_address (so->lm_info->lm + lmo->l_addr_offset,
+ builtin_type_void_data_ptr);
}
static CORE_ADDR
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
index 25d5dc9..ed8feb7 100644
--- a/gdb/remote-m32r-sdi.c
+++ b/gdb/remote-m32r-sdi.c
@@ -1057,11 +1057,11 @@ m32r_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
if (remote_debug)
{
if (write)
- fprintf_unfiltered (gdb_stdlog, "m32r_xfer_memory(%08lx,%d,write)\n",
- memaddr, len);
+ fprintf_unfiltered (gdb_stdlog, "m32r_xfer_memory(%s,%d,write)\n",
+ paddr (memaddr), len);
else
- fprintf_unfiltered (gdb_stdlog, "m32r_xfer_memory(%08lx,%d,read)\n",
- memaddr, len);
+ fprintf_unfiltered (gdb_stdlog, "m32r_xfer_memory(%s,%d,read)\n",
+ paddr (memaddr), len);
}
if (write)
@@ -1155,8 +1155,8 @@ m32r_insert_breakpoint (struct bp_target_info *bp_tgt)
int i, c;
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "m32r_insert_breakpoint(%08lx,...)\n",
- addr);
+ fprintf_unfiltered (gdb_stdlog, "m32r_insert_breakpoint(%s,...)\n",
+ paddr (addr));
if (use_ib_breakpoints)
ib_breakpoints = max_ib_breakpoints;
@@ -1196,8 +1196,8 @@ m32r_remove_breakpoint (struct bp_target_info *bp_tgt)
int i;
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "m32r_remove_breakpoint(%08lx)\n",
- addr);
+ fprintf_unfiltered (gdb_stdlog, "m32r_remove_breakpoint(%s)\n",
+ paddr (addr));
for (i = 0; i < MAX_BREAKPOINTS; i++)
{
@@ -1298,7 +1298,8 @@ m32r_load (char *args, int from_tty)
if (!quiet)
printf_filtered ("[Loading section %s at 0x%lx (%d bytes)]\n",
bfd_get_section_name (pbfd, section),
- section_address, (int) section_size);
+ (unsigned long) section_address,
+ (int) section_size);
fptr = 0;
@@ -1378,7 +1379,8 @@ m32r_load (char *args, int from_tty)
entry = bfd_get_start_address (pbfd);
if (!quiet)
- printf_unfiltered ("[Starting %s at 0x%lx]\n", filename, entry);
+ printf_unfiltered ("[Starting %s at 0x%lx]\n", filename,
+ (unsigned long) entry);
}
print_transfer_performance (gdb_stdout, data_count, 0, &start_time,
@@ -1419,8 +1421,8 @@ m32r_insert_watchpoint (CORE_ADDR addr, int len, int type)
int i;
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%08lx,%d,%d)\n",
- addr, len, type);
+ fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%s,%d,%d)\n",
+ paddr (addr), len, type);
for (i = 0; i < MAX_ACCESS_BREAKS; i++)
{
@@ -1443,8 +1445,8 @@ m32r_remove_watchpoint (CORE_ADDR addr, int len, int type)
int i;
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "m32r_remove_watchpoint(%08lx,%d,%d)\n",
- addr, len, type);
+ fprintf_unfiltered (gdb_stdlog, "m32r_remove_watchpoint(%s,%d,%d)\n",
+ paddr (addr), len, type);
for (i = 0; i < MAX_ACCESS_BREAKS; i++)
{
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index e2be9f3..5b5fdaa 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -854,7 +854,7 @@ xtensa_regset_from_core_section (struct gdbarch *core_arch,
{
DEBUGTRACE ("xtensa_regset_from_core_section "
"(..., sect_name==\"%s\", sect_size==%x) \n",
- sect_name, sect_size);
+ sect_name, (unsigned int) sect_size);
if (strcmp (sect_name, ".reg") == 0
&& sect_size >= sizeof(xtensa_elf_gregset_t))
@@ -1169,8 +1169,8 @@ xtensa_frame_this_id (struct frame_info *next_frame,
xtensa_frame_cache (next_frame, this_cache);
struct frame_id id;
- DEBUGTRACE ("xtensa_frame_this_id (next 0x%08x, *this 0x%08x)\n",
- (unsigned int) next_frame, (unsigned int) *this_cache);
+ DEBUGTRACE ("xtensa_frame_this_id (next 0x%lx, *this 0x%lx)\n",
+ (unsigned long) next_frame, (unsigned long) *this_cache);
if (cache->prev_sp == 0)
return;
@@ -1250,10 +1250,10 @@ xtensa_frame_prev_register (struct frame_info *next_frame,
CORE_ADDR saved_reg = 0;
int done = 1;
- DEBUGTRACE ("xtensa_frame_prev_register (next 0x%08x, "
- "*this 0x%08x, regnum %d (%s), ...)\n",
- (unsigned int) next_frame,
- *this_cache ? (unsigned int) *this_cache : 0, regnum,
+ DEBUGTRACE ("xtensa_frame_prev_register (next 0x%lx, "
+ "*this 0x%lx, regnum %d (%s), ...)\n",
+ (unsigned long) next_frame,
+ *this_cache ? (unsigned long) *this_cache : 0, regnum,
xtensa_register_name (gdbarch, regnum));
if (regnum ==gdbarch_pc_regnum (gdbarch))
@@ -1590,8 +1590,8 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch,
{
struct value *arg = args[i];
struct type *arg_type = check_typedef (value_type (arg));
- fprintf_unfiltered (gdb_stdlog, "%2d: 0x%08x %3d ",
- i, (int) arg, TYPE_LENGTH (arg_type));
+ fprintf_unfiltered (gdb_stdlog, "%2d: 0x%lx %3d ",
+ i, (unsigned long) arg, TYPE_LENGTH (arg_type));
switch (TYPE_CODE (arg_type))
{
case TYPE_CODE_INT:
@@ -1604,8 +1604,8 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch,
fprintf_unfiltered (gdb_stdlog, "%3d", TYPE_CODE (arg_type));
break;
}
- fprintf_unfiltered (gdb_stdlog, " 0x%08x\n",
- (unsigned int) value_contents (arg));
+ fprintf_unfiltered (gdb_stdlog, " 0x%lx\n",
+ (unsigned long) value_contents (arg));
}
}