Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TPF
jack2
Commits
a96111a7
Commit
a96111a7
authored
Jan 10, 2017
by
Adrian Knoth
Committed by
GitHub
Jan 10, 2017
Browse files
Merge pull request #206 from tSed/fix-build-when-execinfo.b-is-not-available
Make backtrace support depend on execinfo.h's existence
parents
be36f54b
8ac6bf1b
Changes
2
Show whitespace changes
Inline
Side-by-side
dbus/sigsegv.c
View file @
a96111a7
...
...
@@ -27,7 +27,9 @@
#include
<stdio.h>
#include
<signal.h>
#include
<dlfcn.h>
#include
<execinfo.h>
#ifdef HAVE_EXECINFO_H
# include <execinfo.h>
#endif
#include
<errno.h>
#ifndef NO_CPP_DEMANGLE
char
*
__cxa_demangle
(
const
char
*
__mangled_name
,
char
*
__output_buffer
,
size_t
*
__length
,
int
*
__status
);
...
...
@@ -161,12 +163,16 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) {
bp
=
(
void
**
)
bp
[
0
];
}
#else
# ifdef HAVE_EXECINFO_H
jack_error
(
"Stack trace (non-dedicated):"
);
sz
=
backtrace
(
bt
,
20
);
strings
=
backtrace_symbols
(
bt
,
sz
);
for
(
i
=
0
;
i
<
sz
;
++
i
)
jack_error
(
"%s"
,
strings
[
i
]);
# else
jack_error
(
"Stack trace not available"
);
# endif
#endif
jack_error
(
"End of stack trace"
);
exit
(
-
1
);
...
...
wscript
View file @
a96111a7
...
...
@@ -488,6 +488,12 @@ def configure(conf):
defines
=
[
'_GNU_SOURCE'
],
mandatory
=
False
)
# Check for backtrace support
conf
.
check
(
header_name
=
'execinfo.h'
,
define_name
=
'HAVE_EXECINFO_H'
,
mandatory
=
False
)
conf
.
recurse
(
'common'
)
if
Options
.
options
.
dbus
:
conf
.
recurse
(
'dbus'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment