You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
#ifndef _Unwind_Find_FDE
#include "tconfig.h"
/* The unseen_objects list contains objects that have been registered
but not yet categorized in any way. The seen_objects list has had
- it's pc_begin and count fields initialized at minimum, and is sorted
+ its pc_begin and count fields initialized at minimum, and is sorted
by decreasing value of pc_begin. */
static struct object *unseen_objects;
static struct object *seen_objects;
void *tbase, void *dbase)
{
/* If .eh_frame is empty, don't register at all. */
- if ((uword *) begin == 0 || *(uword *) begin == 0)
+ if ((const uword *) begin == 0 || *(const uword *) begin == 0)
return;
ob->pc_begin = (void *)-1;
struct object *ob = 0;
/* If .eh_frame is empty, we haven't registered. */
- if ((uword *) begin == 0 || *(uword *) begin == 0)
+ if ((const uword *) begin == 0 || *(const uword *) begin == 0)
return ob;
init_object_mutex_once ();
{
const unsigned char *aug, *p;
_Unwind_Ptr dummy;
- _Unwind_Word utmp;
- _Unwind_Sword stmp;
+ _uleb128_t utmp;
+ _sleb128_t stmp;
aug = cie->augmentation;
if (aug[0] != 'z')
fde_unencoded_compare (struct object *ob __attribute__((unused)),
const fde *x, const fde *y)
{
- _Unwind_Ptr x_ptr = *(_Unwind_Ptr *) x->pc_begin;
- _Unwind_Ptr y_ptr = *(_Unwind_Ptr *) y->pc_begin;
+ const _Unwind_Ptr x_ptr = *(const _Unwind_Ptr *) x->pc_begin;
+ const _Unwind_Ptr y_ptr = *(const _Unwind_Ptr *) y->pc_begin;
if (x_ptr > y_ptr)
return 1;
{
static const fde *marker;
size_t count = linear->count;
- const fde **chain_end = ▮
+ const fde *const *chain_end = ▮
size_t i, j, k;
/* This should optimize out, but it is wise to make sure this assumption
for (i = 0; i < count; i++)
{
- const fde **probe;
+ const fde *const *probe;
for (probe = chain_end;
probe != &marker && fde_compare (ob, linear->array[i], *probe) < 0;
probe = chain_end)
{
- chain_end = (const fde **) erratic->array[probe - linear->array];
+ chain_end = (const fde *const*) erratic->array[probe - linear->array];
erratic->array[probe - linear->array] = NULL;
}
erratic->array[i] = (const fde *) chain_end;
if (encoding == DW_EH_PE_absptr)
{
- if (*(_Unwind_Ptr *) this_fde->pc_begin == 0)
+ if (*(const _Unwind_Ptr *) this_fde->pc_begin == 0)
continue;
}
else
if (encoding == DW_EH_PE_absptr)
{
- pc_begin = ((_Unwind_Ptr *) this_fde->pc_begin)[0];
- pc_range = ((_Unwind_Ptr *) this_fde->pc_begin)[1];
+ pc_begin = ((const _Unwind_Ptr *) this_fde->pc_begin)[0];
+ pc_range = ((const _Unwind_Ptr *) this_fde->pc_begin)[1];
if (pc_begin == 0)
continue;
}
for (lo = 0, hi = vec->count; lo < hi; )
{
size_t i = (lo + hi) / 2;
- const fde *f = vec->array[i];
- void *pc_begin;
- uaddr pc_range;
-
- pc_begin = ((void **) f->pc_begin)[0];
- pc_range = ((uaddr *) f->pc_begin)[1];
+ const fde *const f = vec->array[i];
+ const void *pc_begin = ((const void *const*) f->pc_begin)[0];
+ const uaddr pc_range = ((const uaddr *) f->pc_begin)[1];
if (pc < pc_begin)
hi = i;