/* Inline frame unwinder for GDB.
- Copyright (C) 2008-2014 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This file is part of GDB.
#include "vec.h"
#include "frame.h"
-#include "gdb_assert.h"
-
/* We need to save a few variables for every thread stopped at the
virtual call site of an inlined function. If there was always a
"struct thread_info", we could hang it off that; in the mean time,
{
if (block_inlined_p (cur_block))
depth++;
+ else if (BLOCK_FUNCTION (cur_block) != NULL)
+ break;
cur_block = BLOCK_SUPERBLOCK (cur_block);
}
static int
block_starting_point_at (CORE_ADDR pc, const struct block *block)
{
- struct blockvector *bv;
+ const struct blockvector *bv;
struct block *new_block;
bv = blockvector_for_pc (pc, NULL);
if (BLOCKVECTOR_MAP (bv) == NULL)
return 0;
- new_block = addrmap_find (BLOCKVECTOR_MAP (bv), pc - 1);
+ new_block = (struct block *) addrmap_find (BLOCKVECTOR_MAP (bv), pc - 1);
if (new_block == NULL)
return 1;
else
break;
}
+ else if (BLOCK_FUNCTION (cur_block) != NULL)
+ break;
+
cur_block = BLOCK_SUPERBLOCK (cur_block);
}
}