Detect the absence of a symbol hash table.
[deliverable/binutils-gdb.git] / gdb / alpha-tdep.c
index 69be20497c76623000e25b925b4cfaedbca1162a..2382be1453485a8938c315246fc530c6b0d6f00a 100644 (file)
@@ -1,5 +1,5 @@
 /* Target-dependent code for the ALPHA architecture, for GDB, the GNU Debugger.
-   Copyright 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 extern struct obstack frame_cache_obstack;
 \f
 
-/* Forward declarations.  */
+/* Prototypes for local functions. */
 
 static alpha_extra_func_info_t push_sigtramp_desc PARAMS ((CORE_ADDR low_addr));
 
@@ -134,7 +134,7 @@ struct linked_proc_info
 } *linked_proc_desc_table = NULL;
 
 \f
-/* Under Linux, signal handler invocations can be identified by the
+/* Under GNU/Linux, signal handler invocations can be identified by the
    designated code sequence that is used to return from a signal
    handler.  In particular, the return address of a signal handler
    points to the following sequence (the first instruction is quadword
@@ -399,6 +399,18 @@ alpha_saved_pc_after_call (frame)
 static struct alpha_extra_func_info temp_proc_desc;
 static struct frame_saved_regs temp_saved_regs;
 
+/* Nonzero if instruction at PC is a return instruction.  "ret
+   $zero,($ra),1" on alpha. */
+
+static int
+alpha_about_to_return (pc)
+     CORE_ADDR pc;
+{
+  return read_memory_integer (pc, 4) == 0x6bfa8001;
+}
+
+
+
 /* This fencepost looks highly suspicious to me.  Removing it also
    seems suspicious as it could affect remote debugging across serial
    lines.  */
@@ -449,8 +461,8 @@ Otherwise, you told GDB there was a function where there isn't one, or\n\
 
            return 0; 
          }
-       else if (ABOUT_TO_RETURN(start_pc))
-           break;
+       else if (alpha_about_to_return (start_pc))
+         break;
 
     start_pc += 4; /* skip return */
     return start_pc;
@@ -1008,7 +1020,7 @@ alpha_push_dummy_frame()
    */
 
 /* MASK(i,j) == (1<<i) + (1<<(i+1)) + ... + (1<<j)). Assume i<=j<31. */
-#define MASK(i,j) (((1L << ((j)+1)) - 1) ^ ((1L << (i)) - 1))
+#define MASK(i,j) ((((LONGEST)1 << ((j)+1)) - 1) ^ (((LONGEST)1 << (i)) - 1))
 #define GEN_REG_SAVE_MASK (MASK(0,8) | MASK(16,29))
 #define GEN_REG_SAVE_COUNT 24
 #define FLOAT_REG_SAVE_MASK (MASK(0,1) | MASK(10,30))
This page took 0.025021 seconds and 4 git commands to generate.