* MAINTAINERS: Remove myself.
[deliverable/binutils-gdb.git] / gdb / microblaze-tdep.c
index 2482c87f48dd3e546694c2d429101527942ba4a6..3ce3d1cd6d87789942643d9cd17b21de2d89cafd 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for Xilinx MicroBlaze.
 
-   Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright 2009-2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -81,7 +81,7 @@ static const char *microblaze_register_names[] =
 \f
 static int microblaze_debug_flag = 0;
 
-void
+static void
 microblaze_debug (const char *fmt, ...)
 { 
   if (microblaze_debug_flag)
@@ -120,7 +120,7 @@ microblaze_register_type (struct gdbarch *gdbarch, int regnum)
 \f
 /* Fetch the instruction at PC.  */
 
-unsigned long
+static unsigned long
 microblaze_fetch_instruction (CORE_ADDR pc)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
@@ -228,7 +228,7 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
                             CORE_ADDR current_pc,
                             struct microblaze_frame_cache *cache)
 {
-  char *name;
+  const char *name;
   CORE_ADDR func_addr, func_end, addr, stop, prologue_end_addr = 0;
   unsigned long insn;
   int rn, rd, ra, rb, imm;
@@ -426,7 +426,7 @@ microblaze_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
 /* Return PC of first real instruction of the function starting at
    START_PC.  */
 
-CORE_ADDR
+static CORE_ADDR
 microblaze_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
 {
   struct symtab_and_line sal;
@@ -456,7 +456,7 @@ microblaze_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
 
 /* Normal frames.  */
 
-struct microblaze_frame_cache *
+static struct microblaze_frame_cache *
 microblaze_frame_cache (struct frame_info *next_frame, void **this_cache)
 {
   struct microblaze_frame_cache *cache;
@@ -562,6 +562,7 @@ microblaze_extract_return_value (struct type *type, struct regcache *regcache,
        memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 1, 1);
        return;
       case 2:  /* return last 2 bytes in register.  */
+       regcache_cooked_read (regcache, MICROBLAZE_RETVAL_REGNUM, buf);
        memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 2, 2);
        return;
       case 4:  /* for sizes 4 or 8, copy the required length.  */
This page took 0.02443 seconds and 4 git commands to generate.