comparison gcc/unwind-dw2.c @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents 77e2b8dfacca
children
comparison
equal deleted inserted replaced
56:3c8a44c06a95 63:b7f97abdc517
1 /* DWARF2 exception handling and frame unwind runtime interface routines. 1 /* DWARF2 exception handling and frame unwind runtime interface routines.
2 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
3 2008, 2009 Free Software Foundation, Inc. 3 2008, 2009, 2010 Free Software Foundation, Inc.
4 4
5 This file is part of GCC. 5 This file is part of GCC.
6 6
7 GCC is free software; you can redistribute it and/or modify it 7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by 8 under the terms of the GNU General Public License as published by
354 fs->eh_ptr = read_pointer (p); 354 fs->eh_ptr = read_pointer (p);
355 p += sizeof (void *); 355 p += sizeof (void *);
356 aug += 2; 356 aug += 2;
357 } 357 }
358 358
359 /* Immediately following the augmentation are the code and 359 /* After the augmentation resp. pointer for "eh" augmentation
360 follows for CIE version >= 4 address size byte and
361 segment size byte. */
362 if (__builtin_expect (cie->version >= 4, 0))
363 {
364 if (p[0] != sizeof (void *) || p[1] != 0)
365 return NULL;
366 p += 2;
367 }
368 /* Immediately following this are the code and
360 data alignment and return address column. */ 369 data alignment and return address column. */
361 p = read_uleb128 (p, &utmp); 370 p = read_uleb128 (p, &utmp);
362 fs->code_align = (_Unwind_Word)utmp; 371 fs->code_align = (_Unwind_Word)utmp;
363 p = read_sleb128 (p, &stmp); 372 p = read_sleb128 (p, &stmp);
364 fs->data_align = (_Unwind_Sword)stmp; 373 fs->data_align = (_Unwind_Sword)stmp;
763 break; 772 break;
764 case DW_OP_minus: 773 case DW_OP_minus:
765 result = second - first; 774 result = second - first;
766 break; 775 break;
767 case DW_OP_mod: 776 case DW_OP_mod:
768 result = (_Unwind_Sword) second % (_Unwind_Sword) first; 777 result = second % first;
769 break; 778 break;
770 case DW_OP_mul: 779 case DW_OP_mul:
771 result = second * first; 780 result = second * first;
772 break; 781 break;
773 case DW_OP_or: 782 case DW_OP_or:
1471 initialization context, then we can't see it in the given 1480 initialization context, then we can't see it in the given
1472 call frame data. So have the initialization context tell us. */ 1481 call frame data. So have the initialization context tell us. */
1473 context->ra = __builtin_extract_return_addr (outer_ra); 1482 context->ra = __builtin_extract_return_addr (outer_ra);
1474 } 1483 }
1475 1484
1476 static void _Unwind_DebugHook (void *, void *) __attribute__ ((__noinline__)); 1485 static void _Unwind_DebugHook (void *, void *)
1486 __attribute__ ((__noinline__, __used__, __noclone__));
1477 1487
1478 /* This function is called during unwinding. It is intended as a hook 1488 /* This function is called during unwinding. It is intended as a hook
1479 for a debugger to intercept exceptions. CFA is the CFA of the 1489 for a debugger to intercept exceptions. CFA is the CFA of the
1480 target frame. HANDLER is the PC to which control will be 1490 target frame. HANDLER is the PC to which control will be
1481 transferred. */ 1491 transferred. */