tools: add a 'crash' tool that triggers a segfault
This commit is contained in:
parent
f5b702595f
commit
d0d9c3a676
@ -622,7 +622,7 @@ endif ()
|
||||
|
||||
|
||||
###############################################################################
|
||||
foreach (tool backtrace cpuid log poisson macro scratch)
|
||||
foreach (tool backtrace cpuid crash log poisson macro scratch)
|
||||
add_executable (util_${tool} tools/${tool}.cpp)
|
||||
set_target_properties (util_${tool} PROPERTIES OUTPUT_NAME ${tool})
|
||||
target_link_libraries (util_${tool} cruft)
|
||||
|
7
tools/crash.cpp
Normal file
7
tools/crash.cpp
Normal file
@ -0,0 +1,7 @@
|
||||
#include <cruft/util/debug/system.hpp>
|
||||
|
||||
int main ()
|
||||
{
|
||||
cruft::debug::init ();
|
||||
return *reinterpret_cast<int*> (0x01);
|
||||
}
|
Loading…
Reference in New Issue
Block a user