projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gdb.mi/mi-nonstop.exp: Replace gdb_test_multiple with mi_gdb_test.
[deliverable/binutils-gdb.git]
/
gdb
/
m88k-tdep.c
diff --git
a/gdb/m88k-tdep.c
b/gdb/m88k-tdep.c
index 9b1084f3cd31086f14829108e28a36c45530c53e..1e4c546b0aef1617e36b9186f2210a79596894d2 100644
(file)
--- a/
gdb/m88k-tdep.c
+++ b/
gdb/m88k-tdep.c
@@
-1,6
+1,7
@@
/* Target-dependent code for the Motorola 88000 series.
/* Target-dependent code for the Motorola 88000 series.
- Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010, 2011
+ Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-39,9
+40,9
@@
/* Fetch the instruction at PC. */
static unsigned long
/* Fetch the instruction at PC. */
static unsigned long
-m88k_fetch_instruction (CORE_ADDR pc)
+m88k_fetch_instruction (CORE_ADDR pc
, enum bfd_endian byte_order
)
{
{
- return read_memory_unsigned_integer (pc, 4);
+ return read_memory_unsigned_integer (pc, 4
, byte_order
);
}
/* Register information. */
}
/* Register information. */
@@
-67,7
+68,7
@@
m88k_register_name (struct gdbarch *gdbarch, int regnum)
}
/* Return the GDB type object for the "standard" data type of data in
}
/* Return the GDB type object for the "standard" data type of data in
- register REGNUM. */
+ register REGNUM.
*/
static struct type *
m88k_register_type (struct gdbarch *gdbarch, int regnum)
static struct type *
m88k_register_type (struct gdbarch *gdbarch, int regnum)
@@
-81,7
+82,7
@@
m88k_register_type (struct gdbarch *gdbarch, int regnum)
if (regnum == M88K_R30_REGNUM || regnum == M88K_R31_REGNUM)
return builtin_type (gdbarch)->builtin_data_ptr;
if (regnum == M88K_R30_REGNUM || regnum == M88K_R31_REGNUM)
return builtin_type (gdbarch)->builtin_data_ptr;
- return builtin_type_int32;
+ return builtin_type
(gdbarch)->builtin
_int32;
}
\f
}
\f
@@
-258,6
+259,7
@@
static CORE_ADDR
m88k_store_arguments (struct regcache *regcache, int nargs,
struct value **args, CORE_ADDR sp)
{
m88k_store_arguments (struct regcache *regcache, int nargs,
struct value **args, CORE_ADDR sp)
{
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
int num_register_words = 0;
int num_stack_words = 0;
int i;
int num_register_words = 0;
int num_stack_words = 0;
int i;
@@
-269,7
+271,8
@@
m88k_store_arguments (struct regcache *regcache, int nargs,
if (m88k_integral_or_pointer_p (type) && len < 4)
{
if (m88k_integral_or_pointer_p (type) && len < 4)
{
- args[i] = value_cast (builtin_type_int32, args[i]);
+ args[i] = value_cast (builtin_type (gdbarch)->builtin_int32,
+ args[i]);
type = value_type (args[i]);
len = TYPE_LENGTH (type);
}
type = value_type (args[i]);
len = TYPE_LENGTH (type);
}
@@
-524,9
+527,11
@@
struct m88k_prologue_insn m88k_prologue_insn_table[] =
prologue. */
static CORE_ADDR
prologue. */
static CORE_ADDR
-m88k_analyze_prologue (CORE_ADDR pc, CORE_ADDR limit,
+m88k_analyze_prologue (struct gdbarch *gdbarch,
+ CORE_ADDR pc, CORE_ADDR limit,
struct m88k_frame_cache *cache)
{
struct m88k_frame_cache *cache)
{
+ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR end = limit;
/* Provide a dummy cache if necessary. */
CORE_ADDR end = limit;
/* Provide a dummy cache if necessary. */
@@
-546,7
+551,7
@@
m88k_analyze_prologue (CORE_ADDR pc, CORE_ADDR limit,
while (pc < limit)
{
struct m88k_prologue_insn *pi = m88k_prologue_insn_table;
while (pc < limit)
{
struct m88k_prologue_insn *pi = m88k_prologue_insn_table;
- unsigned long insn = m88k_fetch_instruction (pc);
+ unsigned long insn = m88k_fetch_instruction (pc
, byte_order
);
while ((insn & pi->mask) != pi->insn)
pi++;
while ((insn & pi->mask) != pi->insn)
pi++;
@@
-641,12
+646,14
@@
m88k_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
return sal.end;
}
return sal.end;
}
- return m88k_analyze_prologue (pc, pc + m88k_max_prologue_size, NULL);
+ return m88k_analyze_prologue (gdbarch, pc, pc + m88k_max_prologue_size,
+ NULL);
}
static struct m88k_frame_cache *
m88k_frame_cache (struct frame_info *this_frame, void **this_cache)
{
}
static struct m88k_frame_cache *
m88k_frame_cache (struct frame_info *this_frame, void **this_cache)
{
+ struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct m88k_frame_cache *cache;
CORE_ADDR frame_sp;
struct m88k_frame_cache *cache;
CORE_ADDR frame_sp;
@@
-659,7
+666,8
@@
m88k_frame_cache (struct frame_info *this_frame, void **this_cache)
cache->pc = get_frame_func (this_frame);
if (cache->pc != 0)
cache->pc = get_frame_func (this_frame);
if (cache->pc != 0)
- m88k_analyze_prologue (cache->pc, get_frame_pc (this_frame), cache);
+ m88k_analyze_prologue (gdbarch, cache->pc, get_frame_pc (this_frame),
+ cache);
/* Calculate the stack pointer used in the prologue. */
if (cache->fp_offset != -1)
/* Calculate the stack pointer used in the prologue. */
if (cache->fp_offset != -1)
@@
-741,6
+749,7
@@
m88k_frame_prev_register (struct frame_info *this_frame,
static const struct frame_unwind m88k_frame_unwind =
{
NORMAL_FRAME,
static const struct frame_unwind m88k_frame_unwind =
{
NORMAL_FRAME,
+ default_frame_unwind_stop_reason,
m88k_frame_this_id,
m88k_frame_prev_register,
NULL,
m88k_frame_this_id,
m88k_frame_prev_register,
NULL,
@@
-851,7
+860,7
@@
m88k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_dummy_call (gdbarch, m88k_push_dummy_call);
set_gdbarch_dummy_id (gdbarch, m88k_dummy_id);
set_gdbarch_push_dummy_call (gdbarch, m88k_push_dummy_call);
set_gdbarch_dummy_id (gdbarch, m88k_dummy_id);
- /* Return value info */
+ /* Return value info
.
*/
set_gdbarch_return_value (gdbarch, m88k_return_value);
set_gdbarch_addr_bits_remove (gdbarch, m88k_addr_bits_remove);
set_gdbarch_return_value (gdbarch, m88k_return_value);
set_gdbarch_addr_bits_remove (gdbarch, m88k_addr_bits_remove);
This page took
0.025136 seconds
and
4
git commands to generate.