mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
pow-testgiver support
This commit is contained in:
parent
dbde9c1c40
commit
f064b1047a
257 changed files with 6665 additions and 2608 deletions
|
@ -65,10 +65,12 @@ void print_backtrace_gdb(void) {
|
|||
name_buf[res] = 0;
|
||||
|
||||
#if TD_LINUX
|
||||
#if defined(PR_SET_DUMPABLE)
|
||||
if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) {
|
||||
signal_safe_write("Can't set dumpable\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#if defined(PR_SET_PTRACER)
|
||||
// We can't use event fd because we are in a signal handler
|
||||
int fds[2];
|
||||
|
@ -120,10 +122,18 @@ void print_backtrace_gdb(void) {
|
|||
} // namespace
|
||||
|
||||
void Stacktrace::print_to_stderr(const PrintOptions &options) {
|
||||
print_backtrace();
|
||||
if (options.use_gdb) {
|
||||
print_backtrace_gdb();
|
||||
}
|
||||
print_backtrace();
|
||||
}
|
||||
|
||||
void Stacktrace::init() {
|
||||
#if __GLIBC__
|
||||
// backtrace needs to be called once to ensure that next calls are async-signal-safe
|
||||
void *buffer[1];
|
||||
backtrace(buffer, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue