* Patches from Jeffrey Law <law@cs.utah.edu>.
[deliverable/binutils-gdb.git] / gdb / hppa-tdep.c
index ca2393886f25876fc3cfb70d14c29373775ac214..2163ed5d8d16db8467d47177861f99ef060c9db7 100644 (file)
@@ -437,13 +437,28 @@ frame_chain_valid (chain, thisframe)
   if (!chain)
     return 0;
 
-  msym = lookup_minimal_symbol_by_pc (FRAME_SAVED_PC (thisframe));
+  if (use_unwind)
+    {
 
-  if (msym
-      && (strcmp (SYMBOL_NAME (msym), "_start") == 0))
-    return 0;
+      struct unwind_table_entry *u;
+
+      u = find_unwind_entry (thisframe->pc);
+
+      if (u && (u->Save_SP || u->Total_frame_size))
+       return 1;
+      else
+       return 0;
+    }
   else
-    return 1;
+    {
+      msym = lookup_minimal_symbol_by_pc (FRAME_SAVED_PC (thisframe));
+
+      if (msym
+         && (strcmp (SYMBOL_NAME (msym), "_start") == 0))
+       return 0;
+      else
+       return 1;
+    }
 }
 
 /*
This page took 0.023034 seconds and 4 git commands to generate.