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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user