From 4b01383bcd20363075b8923d7ad2c037aff665f3 Mon Sep 17 00:00:00 2001 From: Stu Grossman Date: Wed, 5 May 1993 22:39:23 +0000 Subject: [PATCH] * Patches from Jeffrey Law . * 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 | 2 ++ gdb/hppa-tdep.c | 25 ++++++++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 94677c18279..a8b003b2612 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,8 @@ Wed May 5 15:16:33 1993 Stu Grossman (grossman@cygnus.com) * Patches from Jeffrey Law . + * 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, diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index ca2393886f2..2163ed5d8d1 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -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; + } } /* -- 2.30.2