ofs | hex dump | ascii |
---|
0000 | fe ed fe ed 00 00 00 02 00 00 00 01 00 00 00 01 00 08 6d 69 6e 65 74 65 73 74 00 00 01 4c 19 67 | ..................minetest...L.g |
0020 | 39 cb 00 00 05 01 30 82 04 fd 30 0e 06 0a 2b 06 01 04 01 2a 02 11 01 01 05 00 04 82 04 e9 f3 25 | 9.....0...0...+....*...........% |
0040 | 47 9e d3 ce cc e7 23 13 c6 37 f4 b0 91 3a 13 8f de a1 61 8c d0 71 55 97 a8 46 4b d9 60 76 c3 02 | G.....#..7...:....a..qU..FK.`v.. |
0060 | 0a a3 e4 44 04 2d 74 23 aa 95 91 57 57 2f de 63 44 84 a4 05 69 27 3d 09 ee 24 de 00 8a eb 6a ed | ...D.-t#...WW/.cD...i'=..$....j. |
0080 | be df e7 cc f2 52 37 cb 1f 6f 28 e2 0c 2f 90 4e 93 a6 07 32 cc 18 a7 da 59 31 60 25 49 c4 56 cb | .....R7..o(../.N...2....Y1`%I.V. |
00a0 | ef bf 81 02 a7 39 58 3d 87 4d 7c 7a 57 94 15 6f 39 8f a2 4c 75 cf 47 b4 8e af 07 47 f3 4f d3 0c | .....9X=.M|zW..o9..Lu.G....G.O.. |
00c0 | 30 41 7e a7 f5 2d d3 f6 5c e1 94 24 60 77 94 9c 51 66 91 ef 18 ff 9c aa 88 c8 a8 fa cd c3 da 4b | 0A~..-..\..$`w..Qf.............K |
00e0 | 41 2f b4 b6 d8 5b be 6f 95 c8 f2 ed 82 87 f2 f1 3e 9b 0a e9 29 7f 79 0d cc ff a3 e0 08 ad 65 f2 | A/...[.o........>...).y.......e. |
0100 | eb c1 42 d8 c3 4e 35 b6 41 d4 b9 c3 a1 12 25 b8 45 77 66 58 6e 5e 3a d8 db c5 77 cb c1 7d 24 cd | ..B..N5.A.....%.EwfXn^:...w..}$. |
0120 | d8 8b a3 9a e3 51 76 fc 39 da 43 b4 ff 22 60 28 f2 6f b2 35 f4 ce 1c 2c b9 68 3d aa b3 a8 8f 02 | .....Qv.9.C.."`(.o.5...,.h=..... |
0140 | 76 58 76 da 33 e3 ab b9 83 aa 81 4a be 1c ae 48 4b f2 78 de 5c fe fe ee e5 7e fa a6 1f be e0 63 | vXv.3......J...HK.x.\....~.....c |
0160 | 29 d8 6e 5a 28 d2 1d 1d 80 4c 94 c0 3b 13 b5 e9 f4 12 cf fb ae 26 51 b4 b7 75 4a 78 8f 07 3e 61 | ).nZ(....L..;........&Q..uJx..>a |
0180 | 71 d0 20 39 8e 0b 82 a8 70 c0 7a 43 47 78 25 ac 34 ca 8d 27 f5 dd 47 38 e3 f0 e6 f6 dc 00 af f3 | q..9....p.zCGx%.4..'..G8........ | /*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#pragma once
#include <iostream>
#include <exception>
#include <cassert>
#include "gettime.h"
#include "log.h"
#ifdef _WIN32
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#include <windows.h>
#ifdef _MSC_VER
#include <eh.h>
#endif
#define NORETURN __declspec(noreturn)
#define FUNCTION_NAME __FUNCTION__
#else
#define NORETURN __attribute__ ((__noreturn__))
#define FUNCTION_NAME __PRETTY_FUNCTION__
#endif
// Whether to catch all std::exceptions.
// When "catching", the program will abort with an error message.
// In debug mode, leave these for the debugger and don't catch them.
#ifdef NDEBUG
#define CATCH_UNHANDLED_EXCEPTIONS 1
#else
#define CATCH_UNHANDLED_EXCEPTIONS 0
#endif
/* Abort program execution immediately
*/
NORETURN extern void fatal_error_fn(
const char *msg, const char *file,
unsigned int line, const char *function);
#define FATAL_ERROR(msg) \
fatal_error_fn((msg), __FILE__, __LINE__, FUNCTION_NAME)
#define FATAL_ERROR_IF(expr, msg) \
((expr) \
? fatal_error_fn((msg), __FILE__, __LINE__, FUNCTION_NAME) \
: (void)(0))
/*
sanity_check()
Equivalent to assert() but persists in Release builds (i.e. when NDEBUG is
defined)
*/
NORETURN extern void sanity_check_fn(
const char *assertion, const char *file,
unsigned int line, const char *function);
#define SANITY_CHECK(expr) \
((expr) \
? (void)(0) \
: sanity_check_fn(#expr, __FILE__, __LINE__, FUNCTION_NAME))
#define sanity_check(expr) SANITY_CHECK(expr)
void debug_set_exception_handler();
/*
These should be put into every thread
*/
#if CATCH_UNHANDLED_EXCEPTIONS == 1
#define BEGIN_DEBUG_EXCEPTION_HANDLER try {
#define END_DEBUG_EXCEPTION_HANDLER \
} catch (std::exception &e) { \
errorstream << "An unhandled exception occurred: " \
<< e.what() << std::endl; \x'>..G....b.+kji.p'H`'.o.zu..AZ..P8
0520 | d5 d7 6e d5 23 8c 93 00 00 00 01 00 05 58 2e 35 30 39 00 00 03 7d 30 82 03 79 30 82 02 61 a0 03 | ..n.#........X.509...}0..y0..a.. |
0540 | 02 01 02 02 04 50 0c 89 4b 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 30 6d 31 0b 30 09 06 03 | .....P..K0...*.H........0m1.0... |
0560 | 55 04 06 13 02 46 52 31 10 30 0e 06 03 55 04 08 13 07 55 6e 6b 6e 6f 77 6e 31 0e 30 0c 06 03 55 | U....FR1.0...U....Unknown1.0...U |
0580 | 04 07 13 05 50 61 72 69 73 31 11 30 0f 06 03 55 04 0a 13 08 4d 69 6e 65 74 65 73 74 31 1b 30 19 | ....Paris1.0...U....Minetest1.0. |
05a0 | 06 03 55 04 0b 13 12 4d 69 6e 65 74 65 73 74 20 43 6f 72 65 2d 44 65 76 73 31 0c 30 0a 06 03 55 | ..U....Minetest.Core-Devs1.0...U |
05c0 | 04 03 13 03 6e 72 7a 30 1e 17 0d 31 35 30 33 31 34 31 37 34 38 35 31 5a 17 0d 34 30 30 33 30 37 | ....nrz0...150314174851Z..400307 |
05e0 | 31 37 34 38 35 31 5a 30 6d 31 0b 30 09 06 03 55 04 06 13 02 46 52 31 10 30 0e 06 03 55 04 08 13 | 174851Z0m1.0...U....FR1.0...U... |
0600 | 07 55 6e 6b 6e 6f 77 6e 31 0e 30 0c 06 03 55 04 07 13 05 50 61 72 69 73 31 11 30 0f 06 03 55 04 | .Unknown1.0...U....Paris1.0...U. |
0620 | 0a 13 08 4d 69 6e 65 74 65 73 74 31 1b 30 19 06 03 55 04 0b 13 12 4d 69 6e 65 74 65 73 74 20 43 | ...Minetest1.0...U....Minetest.C |
0640 | 6f 72 65 2d 44 65 76 73 31 0c 30 0a 06 03 55 04 03 13 03 6e 72 7a 30 82 01 22 30 0d 06 09 2a 86 | ore-Devs1.0...U....nrz0.."0...*. |
0660 | 48 86 f7 0d 01 01 01 05 00 03 82 01 0f 00 30 82 01 0a 02 82 01 01 00 8f 29 3e 10 20 de 86 b1 7d | H.............0.........)>.....} |
0680 | 49 b0 e4 cc 99 82 7b 5a 12 0a 27 11 41 98 b4 ac e9 25 18 36 5c b1 42 b7 cd b6 d0 28 25 87 66 f2 | I.....{Z..'.A....%.6\.B....(%.f. |
06a0 | a5 00 c1 09 09 c9 b6 c1 97 e1 de 74 d1 e4 80 ff 75 f0 cb 72 1c a3 8a 16 3d 7c 4f 3d bf 17 0a 7c | ...........t....u..r....=|O=...| |
06c0 | bd ee c3 51 77 ec d0 d7 57 97 2f 28 9f 27 99 38 4c 0c c7 a7 de 7e de f9 aa 30 9f 33 c7 52 f5 56 | ...Qw...W./(.'.8L....~...0.3.R.V |
06e0 | 32 45 f2 26 fe 59 62 65 67 e0 a9 3c ee fe 31 53 66 9f 49 a3 51 f9 5f f1 90 20 8a 2c fa 88 b6 35 | 2E.&.Ybeg..<..1Sf.I.Q._....,...5 |
0700 | bf ba 34 c2 44 a5 f4 e1 05 f1 7a 36 64 9b 00 aa f2 94 f5 a2 91 0a 6c 86 c5 73 06 92 25 e0 e5 f2 | ..4.D.....z6d.........l..s..%... |
0720 | cb 66 be d4 ac 38 27 8c bf 8c c6 7a 6c 2c a7 f0 bd 82 47 3a 38 78 50 65 90 ae fd bf 3c f6 db a9 | .f...8'....zl,....G:8xPe....<... |
0740 | c1 07 06 32 2d ac 1c 28 ed f0 5f 3b 18 13 98 ca 1c 00 8d d4 95 a0 52 28 b6 96 a1 d3 45 dc 21 c0 | ...2-..(.._;..........R(....E.!. |
0760 | b2 55 a7 d5 22 d8 0e b2 fe ef b1 a2 6e 23 f0 ea 7b 61 43 92 29 fb bd 02 03 01 00 01 a3 21 30 1f | .U..".......n#..{aC.)........!0. |
0780 | 30 1d 06 03 55 1d 0e 04 16 04 14 7a 8f f1 59 d9 01 0b 9e 52 54 2e 78 b0 dd 30 9d 7d b0 9b ab 30 | 0...U......z..Y....RT.x..0.}...0 |
07a0 | 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 03 82 01 01 00 2b 0a a6 ab 4a 0e c0 3b 75 d4 71 67 a6 | ...*.H.............+...J..;u.qg. |
07c0 | 49 5e 3c 38 42 ce a5 a7 cb b0 d9 46 f8 c6 c2 ab 6c 47 f8 4d 4a 4f ab 5f 2d 94 5a 17 2c 21 7e 47 | I^<8B......F....lG.MJO._-.Z.,!~G |
07e0 | c0 3e 7f 93 aa b2 87 89 57 bb 04 d2 02 de 3b a7 1c 6b 9a b8 b0 21 86 54 e5 e4 89 06 46 13 4b 1c | .>......W.....;..k...!.T....F.K. |
0800 | 5e 6e 10 28 51 f8 e6 63 57 01 b5 29 72 3d 15 a7 07 9e 7b 32 04 8d 5a 67 fd 36 f0 ab d8 1a a0 3d | ^n.(Q..cW..)r=....{2..Zg.6.....= |
0820 | 28 75 d2 ae 46 4c 2c 34 52 f4 df 63 f4 eb 76 f0 3e bf 24 0e ed 54 46 35 9b 20 83 cf b8 9c a7 98 | (u..FL,4R..c..v.>.$..TF5........ |
0840 | 59 46 95 a4 1e 72 34 a1 b4 ee c1 58 65 e9 ff 64 de d5 29 09 94 f8 28 73 1c ac 09 98 f7 7d a0 f9 | YF...r4....Xe..d..)...(s.....}.. |
0860 | 92 41 e5 bd 73 d8 a8 a3 fb b5 c4 f6 ef 27 da 86 e1 29 59 6f 53 dd 1f 0b a3 ab 2e d0 db d1 a8 7a | .A..s........'...)YoS..........z |
0880 | d4 6b f2 62 6c 5c ed 93 21 e3 c3 40 88 1b b6 3c 96 2e 45 a7 dd e6 64 0b 7b af c6 8c 3c 40 a0 5a | .k.bl\..!..@...<..E...d.{...<@.Z |
08a0 | 94 6e 88 1a e6 3b a2 20 79 e1 f2 d3 ab d4 a1 88 3a 84 82 74 c8 b4 f3 d6 16 0d 09 01 37 80 1c 22 | .n...;..y.......:..t........7.." |
08c0 | 56 f1 8a 08 e5 1f d1 | V...... |