| 947 | } |
| 948 | |
| 949 | static inline void HexPrint( char*& ptr, uint64_t val ) |
| 950 | { |
| 951 | if( val == 0 ) |
| 952 | { |
| 953 | *ptr++ = '0'; |
| 954 | return; |
| 955 | } |
| 956 | |
| 957 | static const char HexTable[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; |
| 958 | char buf[16]; |
| 959 | auto bptr = buf; |
| 960 | |
| 961 | do |
| 962 | { |
| 963 | *bptr++ = HexTable[val%16]; |
| 964 | val /= 16; |
| 965 | } |
| 966 | while( val > 0 ); |
| 967 | |
| 968 | do |
| 969 | { |
| 970 | *ptr++ = *--bptr; |
| 971 | } |
| 972 | while( bptr != buf ); |
| 973 | } |
| 974 | |
| 975 | static void CrashHandler( int signal, siginfo_t* info, void* /*ucontext*/ ) |
| 976 | { |