Commit ea00486e by Geoffrey Keating Committed by Geoffrey Keating

unwind-dw2-fde-darwin.c (live_image_destructor): Get seen_objects and…

unwind-dw2-fde-darwin.c (live_image_destructor): Get seen_objects and unseen_objects from the global data before calling...

	* unwind-dw2-fde-darwin.c (live_image_destructor): Get seen_objects
	and unseen_objects from the global data before calling
	__deregister_frame_info_bases.
	(examine_objects): Insert objects into the seen_objects list,
	not unseen_objects.
	(_Unwind_Find_FDE): Always unlock the global object lists, even if
	we couldn't allocate a data structure to put in it.

From-SVN: r69366
parent 18009d03
2003-07-14 Geoffrey Keating <geoffk@apple.com> 2003-07-14 Geoffrey Keating <geoffk@apple.com>
* unwind-dw2-fde-darwin.c (live_image_destructor): Get seen_objects
and unseen_objects from the global data before calling
__deregister_frame_info_bases.
(examine_objects): Insert objects into the seen_objects list,
not unseen_objects.
(_Unwind_Find_FDE): Always unlock the global object lists, even if
we couldn't allocate a data structure to put in it.
* objc/objc-act.h (CLASS_SUPER_NAME): Add a little typechecking. * objc/objc-act.h (CLASS_SUPER_NAME): Add a little typechecking.
(TYPE_PROTOCOL_LIST): Share use of type.context with C frontend. (TYPE_PROTOCOL_LIST): Share use of type.context with C frontend.
(SET_TYPE_PROTOCOL_LIST): New. (SET_TYPE_PROTOCOL_LIST): New.
......
/* Copyright (C) 2001, 2002 Free Software Foundation, Inc. /* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -104,8 +104,23 @@ live_image_destructor (struct live_images *image) ...@@ -104,8 +104,23 @@ live_image_destructor (struct live_images *image)
{ {
if (image->object_info) if (image->object_info)
{ {
/* Free any sorted arrays. */ struct km_object_info *the_obj_info;
__deregister_frame_info_bases (image->fde);
the_obj_info =
_keymgr_get_and_lock_processwide_ptr (KEYMGR_GCC3_DW2_OBJ_LIST);
if (the_obj_info)
{
seen_objects = the_obj_info->seen_objects;
unseen_objects = the_obj_info->unseen_objects;
/* Free any sorted arrays. */
__deregister_frame_info_bases (image->fde);
the_obj_info->seen_objects = seen_objects;
the_obj_info->unseen_objects = unseen_objects;
}
_keymgr_set_and_unlock_processwide_ptr (KEYMGR_GCC3_DW2_OBJ_LIST,
the_obj_info);
free (image->object_info); free (image->object_info);
image->object_info = NULL; image->object_info = NULL;
...@@ -166,20 +181,28 @@ examine_objects (void *pc, struct dwarf_eh_bases *bases, int dont_alloc) ...@@ -166,20 +181,28 @@ examine_objects (void *pc, struct dwarf_eh_bases *bases, int dont_alloc)
ob->s.b.encoding = DW_EH_PE_omit; ob->s.b.encoding = DW_EH_PE_omit;
ob->fde_end = real_fde + sz; ob->fde_end = real_fde + sz;
image->fde = real_fde;
result = search_object (ob, pc);
if (! dont_alloc) if (! dont_alloc)
{ {
ob->next = unseen_objects; struct object **p;
unseen_objects = ob;
image->destructor = live_image_destructor; image->destructor = live_image_destructor;
image->object_info = ob; image->object_info = ob;
image->examined_p |= (EXAMINED_IMAGE_MASK image->examined_p |= (EXAMINED_IMAGE_MASK
| DESTRUCTOR_MAY_BE_CALLED_LIVE); | DESTRUCTOR_MAY_BE_CALLED_LIVE);
/* Insert the object into the classified list. */
for (p = &seen_objects; *p ; p = &(*p)->next)
if ((*p)->pc_begin < ob->pc_begin)
break;
ob->next = *p;
*p = ob;
} }
image->fde = real_fde;
result = search_object (ob, pc);
if (result) if (result)
{ {
int encoding; int encoding;
...@@ -234,8 +257,8 @@ _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases) ...@@ -234,8 +257,8 @@ _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases)
{ {
the_obj_info->seen_objects = seen_objects; the_obj_info->seen_objects = seen_objects;
the_obj_info->unseen_objects = unseen_objects; the_obj_info->unseen_objects = unseen_objects;
_keymgr_set_and_unlock_processwide_ptr (KEYMGR_GCC3_DW2_OBJ_LIST,
the_obj_info);
} }
_keymgr_set_and_unlock_processwide_ptr (KEYMGR_GCC3_DW2_OBJ_LIST,
the_obj_info);
return ret; return ret;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment