mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-21 16:16:39 +00:00
keep script-stack error logging
This commit is contained in:
parent
8d894d1100
commit
026cbcdd28
8
Makefile
8
Makefile
|
@ -24,7 +24,6 @@ DISABLE_VERIFIC_VHDL := 0
|
|||
ENABLE_COVER := 1
|
||||
ENABLE_LIBYOSYS := 0
|
||||
ENABLE_ZLIB := 1
|
||||
ENABLE_BACKTRACE := 0
|
||||
|
||||
# python wrappers
|
||||
ENABLE_PYOSYS := 0
|
||||
|
@ -69,8 +68,6 @@ ifeq ($(ENABLE_PYOSYS),1)
|
|||
ENABLE_LIBYOSYS := 1
|
||||
endif
|
||||
|
||||
|
||||
|
||||
BINDIR := $(PREFIX)/bin
|
||||
LIBDIR := $(PREFIX)/lib/$(PROGRAM_PREFIX)yosys
|
||||
DATDIR := $(PREFIX)/share/$(PROGRAM_PREFIX)yosys
|
||||
|
@ -128,11 +125,6 @@ PKG_CONFIG_PATH := $(BREW_PREFIX)/libffi/lib/pkgconfig:$(PKG_CONFIG_PATH)
|
|||
PKG_CONFIG_PATH := $(BREW_PREFIX)/tcl-tk/lib/pkgconfig:$(PKG_CONFIG_PATH)
|
||||
export PATH := $(BREW_PREFIX)/bison/bin:$(BREW_PREFIX)/gettext/bin:$(BREW_PREFIX)/flex/bin:$(PATH)
|
||||
|
||||
ifeq ($(ENABLE_BACKTRACE),1)
|
||||
CXXFLAGS += -DYOSYS_BACKTRACE
|
||||
endif
|
||||
|
||||
|
||||
# macports search paths
|
||||
else ifneq ($(shell :; command -v port),)
|
||||
PORT_PREFIX := $(patsubst %/bin/port,%,$(shell :; command -v port))
|
||||
|
|
|
@ -83,32 +83,6 @@ int getopt(int argc, char **argv, const char *optstring)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined (__linux__) || defined(__FreeBSD__) || defined(YOSYS_BACKTRACE)
|
||||
#include <execinfo.h>
|
||||
void yosys_print_trace (void)
|
||||
{
|
||||
void *array[32] = {0,};
|
||||
char **strings;
|
||||
|
||||
int size = backtrace (array, 32);
|
||||
strings = backtrace_symbols (array, size);
|
||||
if (strings != NULL && size > 6)
|
||||
{
|
||||
|
||||
fprintf (stderr,"Obtained %d stack frames.\n", size);
|
||||
for (int i = 0; i < size; i++)
|
||||
fprintf(stderr,"%d | %s\n", i+1, strings[i]);
|
||||
free (strings);
|
||||
}
|
||||
|
||||
}
|
||||
#else
|
||||
void yosys_print_trace()
|
||||
{
|
||||
fprintf(stderr,"Backtrace not available on this platform,\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
USING_YOSYS_NAMESPACE
|
||||
|
||||
|
@ -200,8 +174,6 @@ extern "C" {
|
|||
|
||||
void yosys_atexit()
|
||||
{
|
||||
|
||||
yosys_print_trace();
|
||||
#if defined(YOSYS_ENABLE_READLINE) || defined(YOSYS_ENABLE_EDITLINE)
|
||||
if (!yosys_history_file.empty()) {
|
||||
#if defined(YOSYS_ENABLE_READLINE)
|
||||
|
|
Loading…
Reference in a new issue