1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-15 19:22:45 +03:00

Improve debug output on critical errors

This commit is contained in:
Ivan Grokhotkov
2015-11-21 20:04:38 +03:00
parent 590eefa210
commit 8bf1e98f24
5 changed files with 64 additions and 24 deletions

View File

@@ -17,14 +17,16 @@
*/
#include <stdlib.h>
#include <assert.h>
#include <debug.h>
extern "C" {
#include "ets_sys.h"
#include "os_type.h"
#include "osapi.h"
#include "mem.h"
#include "user_interface.h"
}
void *operator new(size_t size) {
size = ((size + 3) & ~((size_t)0x3));
return os_malloc(size);
@@ -47,27 +49,26 @@ extern "C" void __cxa_pure_virtual(void) __attribute__ ((__noreturn__));
extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__));
void __cxa_pure_virtual(void) {
abort();
panic();
}
void __cxa_deleted_virtual(void) {
abort();
panic();
}
namespace std {
void __throw_bad_function_call() {
abort();
panic();
}
void __throw_length_error(char const*) {
abort();
panic();
}
void __throw_bad_alloc() {
abort();
panic();
}
}
// TODO: rebuild windows toolchain to make this unnecessary:
void* __dso_handle;