/* Virtual tail call frames unwinder for GDB.
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2014 Free Software Foundation, Inc.
This file is part of GDB.
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "gdb_assert.h"
#include "frame.h"
#include "dwarf2-frame-tailcall.h"
#include "dwarf2loc.h"
#include "frame-unwind.h"
#include "block.h"
#include "hashtab.h"
-#include "exceptions.h"
#include "gdbtypes.h"
#include "regcache.h"
#include "value.h"
*this_id = get_frame_id (next_frame);
(*this_id).code_addr = get_frame_pc (this_frame);
(*this_id).code_addr_p = 1;
- (*this_id).inline_depth = (cache->chain_levels
- - existing_next_levels (this_frame, cache));
- gdb_assert ((*this_id).inline_depth > 0);
+ (*this_id).artificial_depth = (cache->chain_levels
+ - existing_next_levels (this_frame, cache));
+ gdb_assert ((*this_id).artificial_depth > 0);
}
/* Find PC to be unwound from THIS_FRAME. THIS_FRAME must be a part of
{
int next_levels = existing_next_levels (this_frame, cache);
struct call_site_chain *chain = cache->chain;
- int caller_no;
gdb_assert (chain != NULL);
{
CORE_ADDR prev_pc = 0, prev_sp = 0; /* GCC warning. */
int prev_sp_p = 0;
- CORE_ADDR this_pc, pc;
+ CORE_ADDR this_pc;
struct gdbarch *prev_gdbarch;
struct call_site_chain *chain = NULL;
- struct frame_info *fi;
struct tailcall_cache *cache;
volatile struct gdb_exception except;
gdb_assert (*tailcall_cachep == NULL);
- this_pc = get_frame_pc (this_frame);
+ /* PC may be after the function if THIS_FRAME calls noreturn function,
+ get_frame_address_in_block will decrease it by 1 in such case. */
+ this_pc = get_frame_address_in_block (this_frame);
/* Catch any unwinding errors. */
TRY_CATCH (except, RETURN_MASK_ERROR)