| 424 | } |
| 425 | |
| 426 | static void WriteFDE(TArray<uint8_t> &stream, const TArray<uint8_t> &fdeInstructions, uint32_t cieLocation, unsigned int &functionStart) |
| 427 | { |
| 428 | unsigned int lengthPos = stream.Size(); |
| 429 | WriteUInt32(stream, 0); // Length |
| 430 | uint32_t offsetToCIE = stream.Size() - cieLocation; |
| 431 | WriteUInt32(stream, offsetToCIE); |
| 432 | |
| 433 | functionStart = stream.Size(); |
| 434 | WriteUInt64(stream, 0); // func start |
| 435 | WriteUInt64(stream, 0); // func size |
| 436 | |
| 437 | WriteULEB128(stream, 0); // LEB128 augmentation size |
| 438 | |
| 439 | for (unsigned int i = 0; i < fdeInstructions.Size(); i++) |
| 440 | stream.Push(fdeInstructions[i]); |
| 441 | |
| 442 | WritePadding(stream); |
| 443 | WriteLength(stream, lengthPos, stream.Size() - lengthPos - 4); |
| 444 | } |
| 445 | |
| 446 | static void WriteAdvanceLoc(TArray<uint8_t> &fdeInstructions, uint64_t offset, uint64_t &lastOffset) |
| 447 | { |
no test coverage detected