mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-21 16:16:39 +00:00
Support for backtrace
This commit is contained in:
parent
7c8a325adf
commit
0e82550429
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -11,3 +11,6 @@
|
|||
[submodule "cxxopts"]
|
||||
path = libs/cxxopts
|
||||
url = https://github.com/jarro2783/cxxopts
|
||||
[submodule "libs/backward-cpp"]
|
||||
path = libs/backward-cpp
|
||||
url = git@github.com:bombela/backward-cpp.git
|
||||
|
|
4
Makefile
4
Makefile
|
@ -64,7 +64,7 @@ SANITIZER =
|
|||
# SANITIZER = cfi
|
||||
|
||||
# Prefer using ENABLE_DEBUG over setting these
|
||||
OPT_LEVEL := -O3
|
||||
OPT_LEVEL := -O3 -g
|
||||
GCC_LTO :=
|
||||
CLANG_LTO := -flto=thin
|
||||
|
||||
|
@ -438,6 +438,8 @@ LIBS += -ldl
|
|||
endif
|
||||
endif
|
||||
|
||||
LIBS += -lbfd # SILIMATE: support for backward-cpp
|
||||
|
||||
ifeq ($(ENABLE_GLOB),1)
|
||||
CXXFLAGS += -DYOSYS_ENABLE_GLOB
|
||||
endif
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
#include "kernel/yosys.h"
|
||||
#include "kernel/celltypes.h"
|
||||
|
||||
#define BACKWARD_HAS_BFD 1
|
||||
#include "libs/backward-cpp/backward.hpp"
|
||||
|
||||
#ifdef YOSYS_ENABLE_READLINE
|
||||
# include <readline/readline.h>
|
||||
# include <readline/history.h>
|
||||
|
@ -548,7 +551,7 @@ void yosys_setup()
|
|||
if(already_setup)
|
||||
return;
|
||||
already_setup = true;
|
||||
|
||||
backward::SignalHandling* sh = new backward::SignalHandling;
|
||||
#ifdef WITH_PYTHON
|
||||
// With Python 3.12, calling PyImport_AppendInittab on an already
|
||||
// initialized platform fails (such as when libyosys is imported
|
||||
|
|
1
libs/backward-cpp
Submodule
1
libs/backward-cpp
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 51f0700452cf71c57d43c2d028277b24cde32502
|
Loading…
Reference in a new issue