1 /* Subroutines needed for unwinding stack frames for exception handling. */
2 /* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
3 Contributed by Jason Merrill <jason@cygnus.com>.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 In addition to the permissions in the GNU General Public License, the
13 Free Software Foundation gives you unlimited permission to link the
14 compiled version of this file into combinations with other programs,
15 and to distribute those combinations without any restriction coming
16 from the use of this file. (The General Public License restrictions
17 do apply in other respects; for example, they cover modification of
18 the file, and distribution when not linked into a combine
21 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
22 WARRANTY; without even the implied warranty of MERCHANTABILITY or
23 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
26 You should have received a copy of the GNU General Public License
27 along with GCC; see the file COPYING. If not, write to the Free
28 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
35 #define NO_BASE_OF_ENCODED_VALUE
36 #include "unwind-pe.h"
37 #include "unwind-dw2-fde.h"
40 /* The unseen_objects list contains objects that have been registered
41 but not yet categorized in any way. The seen_objects list has had
42 it's pc_begin and count fields initialized at minimum, and is sorted
43 by decreasing value of pc_begin. */
44 static struct object *unseen_objects;
45 static struct object *seen_objects;
47 #ifdef __GTHREAD_MUTEX_INIT
48 static __gthread_mutex_t object_mutex = __GTHREAD_MUTEX_INIT;
50 static __gthread_mutex_t object_mutex;
53 #ifdef __GTHREAD_MUTEX_INIT_FUNCTION
55 init_object_mutex (void)
57 __GTHREAD_MUTEX_INIT_FUNCTION (&object_mutex);
61 init_object_mutex_once (void)
63 static __gthread_once_t once = __GTHREAD_ONCE_INIT;
64 __gthread_once (&once, init_object_mutex);
67 #define init_object_mutex_once()
70 /* Called from crtbegin.o to register the unwind info for an object. */
73 __register_frame_info_bases (void *begin, struct object *ob,
74 void *tbase, void *dbase)
76 ob->pc_begin = (void *)-1;
81 ob->s.b.encoding = DW_EH_PE_omit;
83 init_object_mutex_once ();
84 __gthread_mutex_lock (&object_mutex);
86 ob->next = unseen_objects;
89 __gthread_mutex_unlock (&object_mutex);
93 __register_frame_info (void *begin, struct object *ob)
95 __register_frame_info_bases (begin, ob, 0, 0);
99 __register_frame (void *begin)
101 struct object *ob = (struct object *) malloc (sizeof (struct object));
102 __register_frame_info (begin, ob);
105 /* Similar, but BEGIN is actually a pointer to a table of unwind entries
106 for different translation units. Called from the file generated by
110 __register_frame_info_table_bases (void *begin, struct object *ob,
111 void *tbase, void *dbase)
113 ob->pc_begin = (void *)-1;
118 ob->s.b.from_array = 1;
119 ob->s.b.encoding = DW_EH_PE_omit;
121 init_object_mutex_once ();
122 __gthread_mutex_lock (&object_mutex);
124 ob->next = unseen_objects;
127 __gthread_mutex_unlock (&object_mutex);
131 __register_frame_info_table (void *begin, struct object *ob)
133 __register_frame_info_table_bases (begin, ob, 0, 0);
137 __register_frame_table (void *begin)
139 struct object *ob = (struct object *) malloc (sizeof (struct object));
140 __register_frame_info_table (begin, ob);
143 /* Called from crtbegin.o to deregister the unwind info for an object. */
144 /* ??? Glibc has for a while now exported __register_frame_info and
145 __deregister_frame_info. If we call __register_frame_info_bases
146 from crtbegin (wherein it is declared weak), and this object does
147 not get pulled from libgcc.a for other reasons, then the
148 invocation of __deregister_frame_info will be resolved from glibc.
149 Since the registration did not happen there, we'll abort.
151 Therefore, declare a new deregistration entry point that does the
152 exact same thing, but will resolve to the same library as
153 implements __register_frame_info_bases. */
156 __deregister_frame_info_bases (void *begin)
159 struct object *ob = 0;
161 init_object_mutex_once ();
162 __gthread_mutex_lock (&object_mutex);
164 for (p = &unseen_objects; *p ; p = &(*p)->next)
165 if ((*p)->u.single == begin)
172 for (p = &seen_objects; *p ; p = &(*p)->next)
173 if ((*p)->s.b.sorted)
175 if ((*p)->u.sort->orig_data == begin)
185 if ((*p)->u.single == begin)
193 __gthread_mutex_unlock (&object_mutex);
197 __gthread_mutex_unlock (&object_mutex);
202 __deregister_frame_info (void *begin)
204 return __deregister_frame_info_bases (begin);
208 __deregister_frame (void *begin)
210 free (__deregister_frame_info (begin));
214 /* Like base_of_encoded_value, but take the base from a struct object
215 instead of an _Unwind_Context. */
218 base_from_object (unsigned char encoding, struct object *ob)
220 if (encoding == DW_EH_PE_omit)
223 switch (encoding & 0x70)
225 case DW_EH_PE_absptr:
227 case DW_EH_PE_aligned:
230 case DW_EH_PE_textrel:
231 return (_Unwind_Ptr) ob->tbase;
232 case DW_EH_PE_datarel:
233 return (_Unwind_Ptr) ob->dbase;
238 /* Return the FDE pointer encoding from the CIE. */
239 /* ??? This is a subset of extract_cie_info from unwind-dw2.c. */
242 get_cie_encoding (struct dwarf_cie *cie)
244 const unsigned char *aug, *p;
249 aug = cie->augmentation;
251 return DW_EH_PE_absptr;
253 p = aug + strlen (aug) + 1; /* Skip the augmentation string. */
254 p = read_uleb128 (p, &utmp); /* Skip code alignment. */
255 p = read_sleb128 (p, &stmp); /* Skip data alignment. */
256 p++; /* Skip return address column. */
258 aug++; /* Skip 'z' */
259 p = read_uleb128 (p, &utmp); /* Skip augmentation length. */
262 /* This is what we're looking for. */
265 /* Personality encoding and pointer. */
266 else if (*aug == 'P')
268 /* ??? Avoid dereferencing indirect pointers, since we're
269 faking the base address. Gotta keep DW_EH_PE_aligned
271 p = read_encoded_value_with_base (*p & 0x7F, 0, p + 1, &dummy);
274 else if (*aug == 'L')
276 /* Otherwise end of string, or unknown augmentation. */
278 return DW_EH_PE_absptr;
284 get_fde_encoding (struct dwarf_fde *f)
286 return get_cie_encoding (get_cie (f));
290 /* Sorting an array of FDEs by address.
291 (Ideally we would have the linker sort the FDEs so we don't have to do
292 it at run time. But the linkers are not yet prepared for this.) */
294 /* Comparison routines. Three variants of increasing complexity. */
297 fde_unencoded_compare (struct object *ob __attribute__((unused)),
300 _Unwind_Ptr x_ptr = *(_Unwind_Ptr *) x->pc_begin;
301 _Unwind_Ptr y_ptr = *(_Unwind_Ptr *) y->pc_begin;
311 fde_single_encoding_compare (struct object *ob, fde *x, fde *y)
313 _Unwind_Ptr base, x_ptr, y_ptr;
315 base = base_from_object (ob->s.b.encoding, ob);
316 read_encoded_value_with_base (ob->s.b.encoding, base, x->pc_begin, &x_ptr);
317 read_encoded_value_with_base (ob->s.b.encoding, base, y->pc_begin, &y_ptr);
327 fde_mixed_encoding_compare (struct object *ob, fde *x, fde *y)
329 int x_encoding, y_encoding;
330 _Unwind_Ptr x_ptr, y_ptr;
332 x_encoding = get_fde_encoding (x);
333 read_encoded_value_with_base (x_encoding, base_from_object (x_encoding, ob),
334 x->pc_begin, &x_ptr);
336 y_encoding = get_fde_encoding (y);
337 read_encoded_value_with_base (y_encoding, base_from_object (y_encoding, ob),
338 y->pc_begin, &y_ptr);
347 typedef int (*fde_compare_t) (struct object *, fde *, fde *);
350 /* This is a special mix of insertion sort and heap sort, optimized for
351 the data sets that actually occur. They look like
352 101 102 103 127 128 105 108 110 190 111 115 119 125 160 126 129 130.
353 I.e. a linearly increasing sequence (coming from functions in the text
354 section), with additionally a few unordered elements (coming from functions
355 in gnu_linkonce sections) whose values are higher than the values in the
356 surrounding linear sequence (but not necessarily higher than the values
357 at the end of the linear sequence!).
358 The worst-case total run time is O(N) + O(n log (n)), where N is the
359 total number of FDEs and n is the number of erratic ones. */
361 struct fde_accumulator
363 struct fde_vector *linear;
364 struct fde_vector *erratic;
368 start_fde_sort (struct fde_accumulator *accu, size_t count)
374 size = sizeof (struct fde_vector) + sizeof (fde *) * count;
375 if ((accu->linear = (struct fde_vector *) malloc (size)))
377 accu->linear->count = 0;
378 if ((accu->erratic = (struct fde_vector *) malloc (size)))
379 accu->erratic->count = 0;
387 fde_insert (struct fde_accumulator *accu, fde *this_fde)
390 accu->linear->array[accu->linear->count++] = this_fde;
393 /* Split LINEAR into a linear sequence with low values and an erratic
394 sequence with high values, put the linear one (of longest possible
395 length) into LINEAR and the erratic one into ERRATIC. This is O(N).
397 Because the longest linear sequence we are trying to locate within the
398 incoming LINEAR array can be interspersed with (high valued) erratic
399 entries. We construct a chain indicating the sequenced entries.
400 To avoid having to allocate this chain, we overlay it onto the space of
401 the ERRATIC array during construction. A final pass iterates over the
402 chain to determine what should be placed in the ERRATIC array, and
403 what is the linear sequence. This overlay is safe from aliasing. */
406 fde_split (struct object *ob, fde_compare_t fde_compare,
407 struct fde_vector *linear, struct fde_vector *erratic)
410 size_t count = linear->count;
411 fde **chain_end = ▮
414 /* This should optimize out, but it is wise to make sure this assumption
415 is correct. Should these have different sizes, we cannot cast between
416 them and the overlaying onto ERRATIC will not work. */
417 if (sizeof (fde *) != sizeof (fde **))
420 for (i = 0; i < count; i++)
424 for (probe = chain_end;
425 probe != &marker && fde_compare (ob, linear->array[i], *probe) < 0;
428 chain_end = (fde **)erratic->array[probe - linear->array];
429 erratic->array[probe - linear->array] = NULL;
431 erratic->array[i] = (fde *)chain_end;
432 chain_end = &linear->array[i];
435 /* Each entry in LINEAR which is part of the linear sequence we have
436 discovered will correspond to a non-NULL entry in the chain we built in
437 the ERRATIC array. */
438 for (i = j = k = 0; i < count; i++)
439 if (erratic->array[i])
440 linear->array[j++] = linear->array[i];
442 erratic->array[k++] = linear->array[i];
447 /* This is O(n log(n)). BSD/OS defines heapsort in stdlib.h, so we must
448 use a name that does not conflict. */
451 frame_heapsort (struct object *ob, fde_compare_t fde_compare,
452 struct fde_vector *erratic)
454 /* For a description of this algorithm, see:
455 Samuel P. Harbison, Guy L. Steele Jr.: C, a reference manual, 2nd ed.,
457 fde ** a = erratic->array;
458 /* A portion of the array is called a "heap" if for all i>=0:
459 If i and 2i+1 are valid indices, then a[i] >= a[2i+1].
460 If i and 2i+2 are valid indices, then a[i] >= a[2i+2]. */
461 #define SWAP(x,y) do { fde * tmp = x; x = y; y = tmp; } while (0)
462 size_t n = erratic->count;
468 /* Invariant: a[m..n-1] is a heap. */
470 for (i = m; 2*i+1 < n; )
473 && fde_compare (ob, a[2*i+2], a[2*i+1]) > 0
474 && fde_compare (ob, a[2*i+2], a[i]) > 0)
476 SWAP (a[i], a[2*i+2]);
479 else if (fde_compare (ob, a[2*i+1], a[i]) > 0)
481 SWAP (a[i], a[2*i+1]);
490 /* Invariant: a[0..n-1] is a heap. */
493 for (i = 0; 2*i+1 < n; )
496 && fde_compare (ob, a[2*i+2], a[2*i+1]) > 0
497 && fde_compare (ob, a[2*i+2], a[i]) > 0)
499 SWAP (a[i], a[2*i+2]);
502 else if (fde_compare (ob, a[2*i+1], a[i]) > 0)
504 SWAP (a[i], a[2*i+1]);
514 /* Merge V1 and V2, both sorted, and put the result into V1. */
516 fde_merge (struct object *ob, fde_compare_t fde_compare,
517 struct fde_vector *v1, struct fde_vector *v2)
528 fde2 = v2->array[i2];
529 while (i1 > 0 && fde_compare (ob, v1->array[i1-1], fde2) > 0)
531 v1->array[i1+i2] = v1->array[i1-1];
534 v1->array[i1+i2] = fde2;
536 v1->count += v2->count;
541 end_fde_sort (struct object *ob, struct fde_accumulator *accu, size_t count)
543 fde_compare_t fde_compare;
545 if (accu->linear && accu->linear->count != count)
548 if (ob->s.b.mixed_encoding)
549 fde_compare = fde_mixed_encoding_compare;
550 else if (ob->s.b.encoding == DW_EH_PE_absptr)
551 fde_compare = fde_unencoded_compare;
553 fde_compare = fde_single_encoding_compare;
557 fde_split (ob, fde_compare, accu->linear, accu->erratic);
558 if (accu->linear->count + accu->erratic->count != count)
560 frame_heapsort (ob, fde_compare, accu->erratic);
561 fde_merge (ob, fde_compare, accu->linear, accu->erratic);
562 free (accu->erratic);
566 /* We've not managed to malloc an erratic array,
567 so heap sort in the linear one. */
568 frame_heapsort (ob, fde_compare, accu->linear);
573 /* Update encoding, mixed_encoding, and pc_begin for OB for the
574 fde array beginning at THIS_FDE. Return the number of fdes
575 encountered along the way. */
578 classify_object_over_fdes (struct object *ob, fde *this_fde)
580 struct dwarf_cie *last_cie = 0;
582 int encoding = DW_EH_PE_absptr;
583 _Unwind_Ptr base = 0;
585 for (; this_fde->length != 0; this_fde = next_fde (this_fde))
587 struct dwarf_cie *this_cie;
588 _Unwind_Ptr mask, pc_begin;
591 if (this_fde->CIE_delta == 0)
594 /* Determine the encoding for this FDE. Note mixed encoded
595 objects for later. */
596 this_cie = get_cie (this_fde);
597 if (this_cie != last_cie)
600 encoding = get_cie_encoding (this_cie);
601 base = base_from_object (encoding, ob);
602 if (ob->s.b.encoding == DW_EH_PE_omit)
603 ob->s.b.encoding = encoding;
604 else if (ob->s.b.encoding != encoding)
605 ob->s.b.mixed_encoding = 1;
608 read_encoded_value_with_base (encoding, base, this_fde->pc_begin,
611 /* Take care to ignore link-once functions that were removed.
612 In these cases, the function address will be NULL, but if
613 the encoding is smaller than a pointer a true NULL may not
614 be representable. Assume 0 in the representable bits is NULL. */
615 mask = size_of_encoded_value (encoding);
616 if (mask < sizeof (void *))
617 mask = (1L << (mask << 3)) - 1;
621 if ((pc_begin & mask) == 0)
625 if ((void *)pc_begin < ob->pc_begin)
626 ob->pc_begin = (void *)pc_begin;
633 add_fdes (struct object *ob, struct fde_accumulator *accu, fde *this_fde)
635 struct dwarf_cie *last_cie = 0;
636 int encoding = ob->s.b.encoding;
637 _Unwind_Ptr base = base_from_object (ob->s.b.encoding, ob);
639 for (; this_fde->length != 0; this_fde = next_fde (this_fde))
641 struct dwarf_cie *this_cie;
644 if (this_fde->CIE_delta == 0)
647 if (ob->s.b.mixed_encoding)
649 /* Determine the encoding for this FDE. Note mixed encoded
650 objects for later. */
651 this_cie = get_cie (this_fde);
652 if (this_cie != last_cie)
655 encoding = get_cie_encoding (this_cie);
656 base = base_from_object (encoding, ob);
660 if (encoding == DW_EH_PE_absptr)
662 if (*(_Unwind_Ptr *)this_fde->pc_begin == 0)
667 _Unwind_Ptr pc_begin, mask;
669 read_encoded_value_with_base (encoding, base, this_fde->pc_begin,
672 /* Take care to ignore link-once functions that were removed.
673 In these cases, the function address will be NULL, but if
674 the encoding is smaller than a pointer a true NULL may not
675 be representable. Assume 0 in the representable bits is NULL. */
676 mask = size_of_encoded_value (encoding);
677 if (mask < sizeof (void *))
678 mask = (1L << (mask << 3)) - 1;
682 if ((pc_begin & mask) == 0)
686 fde_insert (accu, this_fde);
690 /* Set up a sorted array of pointers to FDEs for a loaded object. We
691 count up the entries before allocating the array because it's likely to
692 be faster. We can be called multiple times, should we have failed to
693 allocate a sorted fde array on a previous occasion. */
696 init_object (struct object* ob)
698 struct fde_accumulator accu;
701 count = ob->s.b.count;
704 if (ob->s.b.from_array)
706 fde **p = ob->u.array;
707 for (count = 0; *p; ++p)
708 count += classify_object_over_fdes (ob, *p);
711 count = classify_object_over_fdes (ob, ob->u.single);
713 /* The count field we have in the main struct object is somewhat
714 limited, but should suffice for virtually all cases. If the
715 counted value doesn't fit, re-write a zero. The worst that
716 happens is that we re-count next time -- admittedly non-trivial
717 in that this implies some 2M fdes, but at least we function. */
718 ob->s.b.count = count;
719 if (ob->s.b.count != count)
723 if (!start_fde_sort (&accu, count))
726 if (ob->s.b.from_array)
729 for (p = ob->u.array; *p; ++p)
730 add_fdes (ob, &accu, *p);
733 add_fdes (ob, &accu, ob->u.single);
735 end_fde_sort (ob, &accu, count);
737 /* Save the original fde pointer, since this is the key by which the
738 DSO will deregister the object. */
739 accu.linear->orig_data = ob->u.single;
740 ob->u.sort = accu.linear;
745 /* A linear search through a set of FDEs for the given PC. This is
746 used when there was insufficient memory to allocate and sort an
750 linear_search_fdes (struct object *ob, fde *this_fde, void *pc)
752 struct dwarf_cie *last_cie = 0;
753 int encoding = ob->s.b.encoding;
754 _Unwind_Ptr base = base_from_object (ob->s.b.encoding, ob);
756 for (; this_fde->length != 0; this_fde = next_fde (this_fde))
758 struct dwarf_cie *this_cie;
759 _Unwind_Ptr pc_begin, pc_range;
762 if (this_fde->CIE_delta == 0)
765 if (ob->s.b.mixed_encoding)
767 /* Determine the encoding for this FDE. Note mixed encoded
768 objects for later. */
769 this_cie = get_cie (this_fde);
770 if (this_cie != last_cie)
773 encoding = get_cie_encoding (this_cie);
774 base = base_from_object (encoding, ob);
778 if (encoding == DW_EH_PE_absptr)
780 pc_begin = ((_Unwind_Ptr *)this_fde->pc_begin)[0];
781 pc_range = ((_Unwind_Ptr *)this_fde->pc_begin)[1];
790 p = read_encoded_value_with_base (encoding, base,
791 this_fde->pc_begin, &pc_begin);
792 read_encoded_value_with_base (encoding & 0x0F, 0, p, &pc_range);
794 /* Take care to ignore link-once functions that were removed.
795 In these cases, the function address will be NULL, but if
796 the encoding is smaller than a pointer a true NULL may not
797 be representable. Assume 0 in the representable bits is NULL. */
798 mask = size_of_encoded_value (encoding);
799 if (mask < sizeof (void *))
800 mask = (1L << (mask << 3)) - 1;
804 if ((pc_begin & mask) == 0)
808 if ((_Unwind_Ptr)pc - pc_begin < pc_range)
815 /* Binary search for an FDE containing the given PC. Here are three
816 implementations of increasing complexity. */
819 binary_search_unencoded_fdes (struct object *ob, void *pc)
821 struct fde_vector *vec = ob->u.sort;
824 for (lo = 0, hi = vec->count; lo < hi; )
826 size_t i = (lo + hi) / 2;
827 fde *f = vec->array[i];
831 pc_begin = ((void **)f->pc_begin)[0];
832 pc_range = ((uaddr *)f->pc_begin)[1];
836 else if (pc >= pc_begin + pc_range)
846 binary_search_single_encoding_fdes (struct object *ob, void *pc)
848 struct fde_vector *vec = ob->u.sort;
849 int encoding = ob->s.b.encoding;
850 _Unwind_Ptr base = base_from_object (encoding, ob);
853 for (lo = 0, hi = vec->count; lo < hi; )
855 size_t i = (lo + hi) / 2;
856 fde *f = vec->array[i];
857 _Unwind_Ptr pc_begin, pc_range;
860 p = read_encoded_value_with_base (encoding, base, f->pc_begin,
862 read_encoded_value_with_base (encoding & 0x0F, 0, p, &pc_range);
864 if ((_Unwind_Ptr)pc < pc_begin)
866 else if ((_Unwind_Ptr)pc >= pc_begin + pc_range)
876 binary_search_mixed_encoding_fdes (struct object *ob, void *pc)
878 struct fde_vector *vec = ob->u.sort;
881 for (lo = 0, hi = vec->count; lo < hi; )
883 size_t i = (lo + hi) / 2;
884 fde *f = vec->array[i];
885 _Unwind_Ptr pc_begin, pc_range;
889 encoding = get_fde_encoding (f);
890 p = read_encoded_value_with_base (encoding,
891 base_from_object (encoding, ob),
892 f->pc_begin, &pc_begin);
893 read_encoded_value_with_base (encoding & 0x0F, 0, p, &pc_range);
895 if ((_Unwind_Ptr)pc < pc_begin)
897 else if ((_Unwind_Ptr)pc >= pc_begin + pc_range)
907 search_object (struct object* ob, void *pc)
909 /* If the data hasn't been sorted, try to do this now. We may have
910 more memory available than last time we tried. */
911 if (! ob->s.b.sorted)
915 /* Despite the above comment, the normal reason to get here is
916 that we've not processed this object before. A quick range
917 check is in order. */
918 if (pc < ob->pc_begin)
924 if (ob->s.b.mixed_encoding)
925 return binary_search_mixed_encoding_fdes (ob, pc);
926 else if (ob->s.b.encoding == DW_EH_PE_absptr)
927 return binary_search_unencoded_fdes (ob, pc);
929 return binary_search_single_encoding_fdes (ob, pc);
933 /* Long slow labourious linear search, cos we've no memory. */
934 if (ob->s.b.from_array)
937 for (p = ob->u.array; *p ; p++)
939 fde *f = linear_search_fdes (ob, *p, pc);
946 return linear_search_fdes (ob, ob->u.single, pc);
951 _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases)
956 init_object_mutex_once ();
957 __gthread_mutex_lock (&object_mutex);
959 /* Linear search through the classified objects, to find the one
960 containing the pc. Note that pc_begin is sorted descending, and
961 we expect objects to be non-overlapping. */
962 for (ob = seen_objects; ob; ob = ob->next)
963 if (pc >= ob->pc_begin)
965 f = search_object (ob, pc);
971 /* Classify and search the objects we've not yet processed. */
972 while ((ob = unseen_objects))
976 unseen_objects = ob->next;
977 f = search_object (ob, pc);
979 /* Insert the object into the classified list. */
980 for (p = &seen_objects; *p ; p = &(*p)->next)
981 if ((*p)->pc_begin < ob->pc_begin)
991 __gthread_mutex_unlock (&object_mutex);
997 bases->tbase = ob->tbase;
998 bases->dbase = ob->dbase;
1000 encoding = ob->s.b.encoding;
1001 if (ob->s.b.mixed_encoding)
1002 encoding = get_fde_encoding (f);
1003 read_encoded_value_with_base (encoding, base_from_object (encoding, ob),
1004 f->pc_begin, (_Unwind_Ptr *)&bases->func);