133 Commits

Author SHA1 Message Date
merlinthered
6a9a892628 Readme fixes/clarifications for CMake
Fixed name of BACKWARD_ENABLE variable
Changed "myproject" to "mytarget" to avoid confusion
2016-09-27 08:35:44 +02:00
François-Xavier Bourlet
56cd35f97b Merge pull request #34 from milianw/fix_bfd_compile_on_archlinux
Define PACKAGE and PACKAGE_VERSION before including bfd.h
2016-06-11 12:45:12 -07:00
François-Xavier Bourlet
f219685bba Merge pull request #35 from vvjcarter/master
Add current List directory so that BackwardMacros.cmake correctly inc…
2016-06-11 12:44:25 -07:00
Marc Strämke
f3b9f5c8cd Add current List directory so that BackwardMacros.cmake correctly includes the directory 2016-06-11 13:54:42 +02:00
Milian Wolff
ad84214192 Define PACKAGE and PACKAGE_VERSION before including bfd.h
On ArchLinux at least the bfd.h header errors out early if
PACKAGE or PACKAGE_VERSION have not been set. This patch
makes backward.hpp compile on this platform for me.
2016-06-01 10:33:52 +02:00
François-Xavier Bourlet
6ffe2f9524 Merge pull request #33 from Manu343726/master
Add ARM support
2016-05-04 10:31:31 -07:00
Manu343726
74cd785e61 Add ARM support 2016-05-04 10:50:22 +02:00
François-Xavier Bourlet
861842be3a Merge pull request #30 from akreuzkamp/master
Split off cmake macros and dependency detection to BackwardMacros.cmake
2016-04-07 19:07:48 -07:00
François-Xavier Bourlet
5ad20764b3 Merge pull request #31 from akreuzkamp/fixQtCompatibility
Fix compatibility to Qt applications
2016-04-07 19:06:59 -07:00
Anton Kreuzkamp
f1b70b1ef7 Rename variable "signals" to "unix_signals".
This change is needed for compatibility to Qt applications.

Qt defines a macro "signals" that expands to nothing and is used by
Qt's meta object compiler (which is kind of a C++ pre-processor) to
add signal-slot feature (http://doc.qt.io/qt-5/signalsandslots.html).
This will cause compilation of backward.hpp to fail, when used from a
Qt application, because the variable "signals" will be expanded to ""
by the cpp pre processor.
2016-04-07 18:26:20 +02:00
Anton Kreuzkamp
3f61553ff8 Split off cmake macros and dependency detection.
This commit seperates some of the CMake code into a
BackwardMacros.cmake file. Including the CMakeLists.txt with
add_subdirectory doesn't work, because the variables it defines won't
be available from the including CMakeLists. With a .cmake file, they
will.

This change is backward-compatible, because CMakeLists.txt includes
the BackwardMacros.cmake as well.
2016-04-07 18:15:18 +02:00
François-Xavier Bourlet
3dd3eca24d Merge pull request #27 from gbitzes/master
Fix typos in README code examples
2015-11-15 22:29:49 -08:00
Georgios Bitzes
2603c0ef83 Fix typos in README code examples 2015-11-11 11:59:51 +01:00
François-Xavier Bourlet
77fc8d9fe4 Try to get the CMakeLists.txt working and somewhat flexible. 2015-09-15 23:25:06 -07:00
François-Xavier Bourlet
8fe8aee5b0 Merge pull request #23 from edisongustavo/master
Compile in Visual Studio 2010
v1.0
2015-09-10 10:54:32 -07:00
Edison Gustavo Muenz
c3ed021828 Replace usages of alternative usages of boolean operators with more more standard ones since they don't compile in Visual Studio 2010.
Replacements are:
- 'and' => '&&'
- 'or'  => '||'
- 'not' => '!'

Also added some missing includes since MSVC was complaining of missing
symbols.
2015-09-10 12:12:55 -03:00
François-Xavier Bourlet
30d3f0afa6 Update README.md
Remove any references to TraceWithLocals since its not even part of the source anymore.
2015-08-28 14:54:08 -07:00
François-Xavier Bourlet
3ea9928237 Merge pull request #22 from edisongustavo/master
Compilers with GLIBC < 2.10 don't have the psiginfo() function
2015-08-28 14:38:59 -07:00
Edison Gustavo Muenz
7b3e9511ef Compilers with GLIBC < 2.10 don't have the psiginfo() function 2015-08-28 18:01:53 -03:00
François-Xavier Bourlet
2f0397daa4 Merge pull request #20 from hesiod/master
Documentation
2014-11-03 13:24:55 -08:00
hesiod
aeaa324f1e Revert 0660344
Turns out I was wrong, we do need that command.
2014-10-29 10:43:25 +01:00
hesiod
f859367aec Mark most cache values as advanced
To avoid confusion, hide some configuration value from the normal user.
2014-10-27 23:04:42 +01:00
hesiod
4ec0cf052b Fix CMake style
I erred concerning CMake variable naming conventions.
2014-10-27 23:01:41 +01:00
hesiod
cc6a4a6b8d Make feature detection values internal
Previously, the "feature detection options" (STACK_DETAILS_* and STACK_WALKING_*) had to be manually set by an user, but now, we (attempt) to detect libraries based on find_library, thus we don't need those to be cache values anymore. Libraries in non-default paths can be manually added in the corresponding _PATH cache value and for testing purposes, users can also disable libraries by supplying an empty string.
2014-10-27 22:58:05 +01:00
hesiod
8efaa1c906 Fix message type
Whoops, there is no INFO message type. Make it a WARNING instead.
2014-10-27 22:54:39 +01:00
hesiod
0660344151 Remove unneeded CMake command
Definitions are already included with add_backward.
2014-10-24 17:02:28 +02:00
hesiod
dbe01f97f7 Describe CMake integration 2014-10-24 16:51:13 +02:00
François-Xavier Bourlet
c3569680f7 Merge pull request #19 from hesiod/patch-3
Fix typo
2014-10-20 17:17:19 +02:00
hesiod
6873faa72f Fix typo
Should be backward_DEFINITIONS instead of BACKWARD_DEFINITIONS.
2014-10-20 15:59:51 +02:00
François-Xavier Bourlet
8f1accebf8 Merge pull request #18 from hesiod/patch-2
Remove BACKWARD_ENABLE_ONLY_IN_DEBUG
2014-10-20 14:58:15 +02:00
hesiod
0353feaa8c Remove BACKWARD_ENABLE_ONLY_IN_DEBUG
Doesn't work (yet) because CMake lacks generator expressions when listing source files.
2014-10-20 14:50:31 +02:00
François-Xavier Bourlet
af7f13a6b0 Merge pull request #15 from hesiod/fix-clang-warning
Fix compilation warning under clang
2014-10-20 04:18:08 +02:00
François-Xavier Bourlet
4b3f283254 Merge pull request #16 from hesiod/build-system
Build system
2014-10-20 04:16:29 +02:00
Tobias Markus
9e8ccf3fee
Require CMake 2.8.8
Object libraries were introduced in CMake 2.8.8.

Signed-off-by: Tobias Markus <tobias@markus-regensburg.de>
2014-10-18 19:31:53 +02:00
hesiod
7a56ae336a Fix compilation warning under clang
Clang complains about adding const to a reference type having no effect.
Fix this by adding and using a const_ref_t.
2014-10-18 18:35:13 +02:00
hesiod
32d64ddbc0 Improve CMake build system, allow easy integration
Make backward easier to use for CMake users, enabling easy feature detection and integration.

We now detect presence of libdw, libbfd and libunwind directly in the script. The macro add_backward adds needed libraries, definitions and the include directory to a target. The pseudo-library enable_backward enables automatic backward processing for common failures to a target.

If BACKWARD_ENABLE_ONLY_IN_DEBUG is set to true, automatic backward processing is only added when the build type is Debug or RelWithDebInfo.

To integrate backward in an existing CMake project:
add_subdirectory(/path/to/backward-cpp)
add_executable(mytarget example.cpp ${backward_ENABLE})
add_backward(mytarget)

BACKWARD_DEFINITIONS has been renamed to backward_DEFINITIONS to have a naming convention for public variables similiar to the find modules.
2014-10-18 18:30:18 +02:00
hesiod
3295e060c8 Remove unneeded include directive
There is no "include" directory in backward-cpp and hence no need to include it.
2014-10-18 18:29:54 +02:00
hesiod
79820d5a5c Add option to disable test compilation 2014-10-18 18:29:52 +02:00
François-Xavier Bourlet
49e1470a43 Merge pull request #14 from hesiod/patch-1
Include current source directory
2014-10-17 19:11:57 +02:00
hesiod
cdf747ebce Include current source directory
When including the project from a parent directory (add_subdirectory), backward.hpp is not found by the tests because we include CMAKE_SOURCE_DIR, which is the parent's source directory. Include CMAKE_CURRENT_SOURCE_DIR instead.
2014-10-17 19:04:14 +02:00
François-Xavier Bourlet
8855839342 Merge pull request #13 from fabceolin/master
Fixing buffer overflow on signals array
2014-04-02 14:39:15 -07:00
Fabrício Ceolin
9aaac31354 Fixing buffer overflow on signals array 2014-04-02 16:27:35 -03:00
François-Xavier Bourlet
c486368c54 stackoverflow test 2013-11-17 23:00:47 -08:00
François-Xavier Bourlet
246fd67b34 Tests refactored onto less files. 2013-11-17 22:31:13 -08:00
François-Xavier Bourlet
e8b6cb2475 Tests are all passing now. 2013-11-17 22:16:13 -08:00
François-Xavier Bourlet
6bb925fd70 Better test checking
- fork every test
 - capture signals
 - more assertion tools
 - test can be expected to fail
2013-11-17 21:07:04 -08:00
François-Xavier Bourlet
d9777cf5c1 Adding BACKWARD_HAS_* config in cmake for tests 2013-11-06 01:46:36 -08:00
François-Xavier Bourlet
9ba9df4db8 A more flexible and factorized stack Printer. 2013-11-06 00:22:35 -08:00
François-Xavier Bourlet
3791f32b4b Add defines for "ATLEAST_CXX11" 2013-11-06 00:22:35 -08:00
François-Xavier Bourlet
60a07e3282 A system specializable demangler implementation. 2013-11-06 00:22:34 -08:00