* Patches from Jeffrey Law <law@cs.utah.edu>.
authorStu Grossman <grossman@cygnus>
Wed, 5 May 1993 22:39:23 +0000 (22:39 +0000)
committerStu Grossman <grossman@cygnus>
Wed, 5 May 1993 22:39:23 +0000 (22:39 +0000)
* gdb/hppa-tdep.c (frame_chain_valid): If "use_unwind" is true, then
use unwind descriptors to determine if the frame chain is valid.

gdb/ChangeLog
gdb/hppa-tdep.c

index 94677c18279277b080c6735010725621162008c5..a8b003b26122c8d0d1e70c5452953e563f8cc250 100644 (file)
@@ -1,6 +1,8 @@
 Wed May  5 15:16:33 1993  Stu Grossman  (grossman@cygnus.com)
 
         * Patches from Jeffrey Law <law@cs.utah.edu>.
+       * gdb/hppa-tdep.c (frame_chain_valid): If "use_unwind" is true, then
+       use unwind descriptors to determine if the frame chain is valid.
        * gdb/hppa-tdep.c (find_dummy_frame_regs):  Rework so that
        it does not assume %r4 is the frame pointer.
        * gdb/hppa-pinsn.c (print_insn): Handle 'r' and 'R' for break, rsm,
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;
+    }
 }
 
 /*