Overview
Comment: | Don't use ARM EHABI if __ARM_DWARF_EH__ is defined |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d55f62409f58c0e8b753eb9ae7015165 |
User & Date: | js on 2016-06-08 23:05:01 |
Other Links: | manifest | tags |
Context
2016-06-08
| ||
23:17 | lookup-asm-arm-elf.S: Add support for big endian check-in: 411f73bcf6 user: js tags: trunk | |
23:05 | Don't use ARM EHABI if __ARM_DWARF_EH__ is defined check-in: d55f62409f user: js tags: trunk | |
2016-06-07
| ||
22:56 | Add support for reusing OFStreams after close check-in: 1de551cb5f user: js tags: trunk | |
Changes
Modified src/exceptions/OFException.m from [cf73e10b2d] to [a913b4b6a3].
︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | + + + + - - + + - + | /* * Define HAVE_DWARF_EXCEPTIONS if HAVE_SEH_EXCEPTIONS is defined, as SEH * exceptions are implemented as a wrapper around DWARF exceptions. */ #ifdef HAVE_SEH_EXCEPTIONS # define HAVE_DWARF_EXCEPTIONS #endif #if defined(OF_ARM) && !defined(__ARM_DWARF_EH__) # define HAVE_ARM_EHABI_EXCEPTIONS #endif #ifdef HAVE_DWARF_EXCEPTIONS struct _Unwind_Context; typedef enum { _URC_OK = 0, _URC_END_OF_STACK = 5 }_Unwind_Reason_Code; struct backtrace_ctx { void **backtrace; uint8_t i; }; extern _Unwind_Reason_Code _Unwind_Backtrace( _Unwind_Reason_Code(*)(struct _Unwind_Context*, void*), void*); |
︙ | |||
211 212 213 214 215 216 217 | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | + + - + - - | #ifdef HAVE_DWARF_EXCEPTIONS static _Unwind_Reason_Code backtrace_callback(struct _Unwind_Context *ctx, void *data) { struct backtrace_ctx *bt = data; if (bt->i < OF_BACKTRACE_SIZE) { # ifndef HAVE_ARM_EHABI_EXCEPTIONS bt->backtrace[bt->i++] = (void*)_Unwind_GetIP(ctx); |
︙ |
Modified src/runtime/exception.m from [f01e2fc526] to [190697da2f].
︙ | |||
34 35 36 37 38 39 40 41 42 43 44 45 46 47 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | + + + + | # define _Unwind_RaiseException _Unwind_SjLj_RaiseException # define __builtin_eh_return_data_regno(i) (i) #elif defined(HAVE_SEH_EXCEPTIONS) # define PERSONALITY gnu_objc_personality #else # error Unknown exception type! #endif #if defined(OF_ARM) && !defined(__ARM_DWARF_EH__) # define HAVE_ARM_EHABI_EXCEPTIONS #endif static const uint64_t objc_exception_class = 0x474E55434F424A43; /* GNUCOBJC */ #define _UA_SEARCH_PHASE 0x01 #define _UA_CLEANUP_PHASE 0x02 #define _UA_HANDLER_FRAME 0x04 #define _UA_FORCE_UNWIND 0x08 |
︙ | |||
84 85 86 87 88 89 90 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | + - + + + + + + + + + + - - - - - - - - - - - + | _URC_FAILURE = 9 } _Unwind_Reason_Code; struct objc_exception { struct _Unwind_Exception { uint64_t class; void (*cleanup)(_Unwind_Reason_Code, struct _Unwind_Exception*); #ifndef HAVE_ARM_EHABI_EXCEPTIONS |
︙ | |||
139 140 141 142 143 144 145 | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | + + - + + + + + | extern _Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception*); extern void _Unwind_DeleteException(struct _Unwind_Exception*); extern void* _Unwind_GetLanguageSpecificData(struct _Unwind_Context*); extern uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context*); extern uintptr_t _Unwind_GetDataRelBase(struct _Unwind_Context*); extern uintptr_t _Unwind_GetTextRelBase(struct _Unwind_Context*); #ifndef HAVE_ARM_EHABI_EXCEPTIONS # define CONTINUE_UNWIND return _URC_CONTINUE_UNWIND |
︙ | |||
179 180 181 182 183 184 185 | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | - - - - - - | static inline void _Unwind_SetIP(struct _Unwind_Context *ctx, uintptr_t value) { uintptr_t thumb = _Unwind_GetGR(ctx, 15) & 1; _Unwind_SetGR(ctx, 15, (value | thumb)); } |
︙ | |||
312 313 314 315 316 317 318 | 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | - + | abort(); } #undef READ return value; } |
︙ | |||
459 460 461 462 463 464 465 | 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 | + + - + + + + + + + - - - - - - - - | if (filter > 0 && !(actions & _UA_FORCE_UNWIND) && !foreign) { Class class; const char *className; uintptr_t c; const uint8_t *tmp; #ifndef HAVE_ARM_EHABI_EXCEPTIONS uintptr_t i; |
︙ | |||
500 501 502 503 504 505 506 | 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | + - + + + + + + + + | else abort(); } while (displacement != 0); return 0; } #ifndef HAVE_ARM_EHABI_EXCEPTIONS |
︙ | |||
525 526 527 528 529 530 531 | 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | - - - - - - - - | case 2: /* _US_UNWIND_FRAME_RESUME */ CONTINUE_UNWIND; default: return _URC_FAILURE; } _Unwind_SetGR(ctx, 12, (uintptr_t)ex); |
︙ | |||
556 557 558 559 560 561 562 | 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | - + + + + + - - - - | if (actions & _UA_HANDLER_FRAME && !foreign) { /* * For handlers, reg #0 must be the exception's object and reg * #1 the filter. */ _Unwind_SetGR(ctx, __builtin_eh_return_data_regno(0), (uintptr_t)e->object); |
︙ | |||
594 595 596 597 598 599 600 | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 | - + + + + - - - | CONTINUE_UNWIND; if (actions & _UA_SEARCH_PHASE) { if (!(found & HANDLER_FOUND) || foreign) CONTINUE_UNWIND; /* Cache it so we don't have to search it again in phase 2 */ |
︙ |