mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-20 14:01:41 +00:00
Introduce sentry for crash data collection
This commit is contained in:
parent
0625e20fc0
commit
f0f33ef1d3
CMakeLists.txt
common
CMakeLists.txt
dialogs
panel_data_collection.cpppanel_data_collection_base.cpppanel_data_collection_base.fbppanel_data_collection_base.h
eda_base_frame.cpppgm_base.cppsettings
include
thirdparty/sentry-native
.vscode
CHANGELOG.mdCMakeLists.txtCONTRIBUTING.mdLICENSEREADME.mdexamples
external
CMakeLists.txt
breakpad
.clang-format
.github/workflows
.gitignoreAUTHORSChangeLogDEPSDIR_METADATAINSTALLLICENSEMakefile.amMakefile.inNEWSOWNERSREADME.ANDROIDREADME.mdaclocal.m4android
appveyor.ymlautotools
breakpad-client.pc.inbreakpad.pc.incodereview.settingsconfigureconfigure.acdefault.xmldocs
OWNERSbreakpad.svgclient_design.mdcontributing_to_breakpad.mdexception_handling.mdgetting_started_with_breakpad.mdlinux_core_handler.mdlinux_starter_guide.mdlinux_system_calls.mdmac_breakpad_starter_guide.mdmozilla_brown_bag_talk.mdprocessor_design.mdstack_walking.mdsym_upload_v2_protocol.mdsymbol_files.mdwindows_client_integration.md
m4
ax_append_compile_flags.m4ax_append_flag.m4ax_check_compile_flag.m4ax_check_define.m4ax_cxx_compile_stdcxx.m4ax_pthread.m4ax_require_defined.m4libtool.m4ltoptions.m4ltsugar.m4ltversion.m4lt~obsolete.m4
src
breakpad_googletest_includes.hminidump_file_writer-inl.hminidump_file_writer.ccminidump_file_writer.hminidump_file_writer_unittest.ccconfig.h.in
client
apple/Framework
ios
Breakpad.hBreakpad.mm
Breakpad.xcodeproj
BreakpadController.hBreakpadController.mmBreakpad_Prefix.pchexception_handler_no_mach.ccexception_handler_no_mach.hhandler
linux
crash_generation
client_info.hcrash_generation_client.cccrash_generation_client.hcrash_generation_server.cccrash_generation_server.h
data
dump_writer_common
handler
exception_handler.ccexception_handler.hexception_handler_unittest.ccmicrodump_extra_info.hminidump_descriptor.ccminidump_descriptor.h
log
microdump_writer
minidump_writer
cpu_set.hcpu_set_unittest.ccdirectory_reader.hdirectory_reader_unittest.ccline_reader.hline_reader_unittest.cclinux_core_dumper.cclinux_core_dumper.hlinux_core_dumper_unittest.cclinux_dumper.cclinux_dumper.hlinux_dumper_unittest_helper.cclinux_ptrace_dumper.cclinux_ptrace_dumper.hlinux_ptrace_dumper_unittest.ccminidump_writer.ccminidump_writer.hminidump_writer_unittest.ccminidump_writer_unittest_utils.ccminidump_writer_unittest_utils.hproc_cpuinfo_reader.hproc_cpuinfo_reader_unittest.cc
sender
mac
Breakpad.xcodeproj
Framework
UnitTests-Info.plistcrash_generation
ConfigFile.hConfigFile.mmInspector.hInspector.mmInspectorMain.mmclient_info.hcrash_generation_client.cccrash_generation_client.hcrash_generation_server.cccrash_generation_server.h
handler
breakpad_nlist_64.ccbreakpad_nlist_64.hdynamic_images.ccdynamic_images.hexception_handler.ccexception_handler.hmach_vm_compat.hminidump_generator.ccminidump_generator.h
minidump_test.xcodeproj
minidump_tests32-Info.plistminidump_tests64-Info.plistobj-cTestCases-Info.plistprotected_memory_allocator.ccprotected_memory_allocator.htestcases
DynamicImagesTests.ccDynamicImagesTests.hbreakpad_nlist_test.ccbreakpad_nlist_test.hdwarftests.hdwarftests.mm
ucontext_compat.htestdata
sender
Breakpad.xib
English.lproj
ReporterIcon.grafflecrash_report_sender-Info.plistcrash_report_sender.hcrash_report_sender.icnscrash_report_sender.mda.lproj
de.lproj
es.lproj
fr.lproj
it.lproj
ja.lproj
nl.lproj
no.lproj
sl.lproj
sv.lproj
tr.lproj
uploader.huploader.mmtestapp
Controller.hController.m
English.lproj
Info.plistTestClass.hTestClass.mmbomb.icnscrashInMaincrashduringloadmain.mtests
solaris/handler
exception_handler.ccexception_handler.hexception_handler_test.ccminidump_generator.ccminidump_generator.hminidump_test.ccsolaris_lwp.ccsolaris_lwp.h
windows
breakpad_client.gyp
common
crash_generation
ReadMe.txtclient_info.ccclient_info.hcrash_generation.gypcrash_generation_client.cccrash_generation_client.hcrash_generation_server.cccrash_generation_server.hminidump_generator.ccminidump_generator.h
handler
sender
tests/crash_generation_app
abstract_class.ccabstract_class.hcrash_generation_app.cccrash_generation_app.gypcrash_generation_app.hcrash_generation_app.icocrash_generation_app.rcresource.hsmall.ico
unittests
common
android/include
basictypes.hbyte_cursor.hbyte_cursor_unittest.cccommon.gypconvert_UTF.ccconvert_UTF.hdwarf
bytereader-inl.hbytereader.ccbytereader.hbytereader_unittest.cccfi_assembler.cccfi_assembler.hdwarf2diehandler.ccdwarf2diehandler.hdwarf2diehandler_unittest.ccdwarf2enums.hdwarf2reader.ccdwarf2reader.hdwarf2reader_cfi_unittest.ccdwarf2reader_die_unittest.ccdwarf2reader_lineinfo_unittest.ccdwarf2reader_splitfunctions_unittest.ccdwarf2reader_test_common.helf_reader.ccelf_reader.hfunctioninfo.ccfunctioninfo.hline_state_machine.htypes.h
dwarf_cfi_to_module.ccdwarf_cfi_to_module.hdwarf_cfi_to_module_unittest.ccdwarf_cu_to_module.ccdwarf_cu_to_module.hdwarf_cu_to_module_unittest.ccdwarf_line_to_module.ccdwarf_line_to_module.hdwarf_line_to_module_unittest.ccdwarf_range_list_handler.ccdwarf_range_list_handler.hlanguage.cclanguage.hlinux
breakpad_getcontext.Sbreakpad_getcontext.hbreakpad_getcontext_unittest.cccrc32.cccrc32.hdump_symbols.ccdump_symbols.hdump_symbols_unittest.cceintr_wrapper.helf_core_dump.ccelf_core_dump.helf_core_dump_unittest.ccelf_gnu_compat.helf_symbols_to_module.ccelf_symbols_to_module.helf_symbols_to_module_unittest.ccelfutils-inl.helfutils.ccelfutils.hfile_id.ccfile_id.hfile_id_unittest.ccgoogle_crashdump_uploader.ccgoogle_crashdump_uploader.hgoogle_crashdump_uploader_test.ccguid_creator.ccguid_creator.hhttp_upload.cchttp_upload.hignore_ret.hlibcurl_wrapper.cclibcurl_wrapper.hlinux_libc_support.cclinux_libc_support.hlinux_libc_support_unittest.ccmemory_mapped_file.ccmemory_mapped_file.hmemory_mapped_file_unittest.ccsafe_readlink.ccsafe_readlink.hsafe_readlink_unittest.ccsymbol_collector_client.ccsymbol_collector_client.hsymbol_upload.ccsymbol_upload.hsynth_elf.ccsynth_elf.hsynth_elf_unittest.cc
long_string_dictionary.cclong_string_dictionary.hlong_string_dictionary_unittest.cctests
ucontext_constants.hmac
Breakpad.xcconfigBreakpadDebug.xcconfigBreakpadRelease.xcconfigGTMDefines.hGTMLogger.hGTMLogger.mHTTPGetRequest.hHTTPGetRequest.mHTTPMultipartUpload.hHTTPMultipartUpload.mHTTPPutRequest.hHTTPPutRequest.mHTTPRequest.hHTTPRequest.mHTTPSimplePostRequest.hHTTPSimplePostRequest.mMachIPC.hMachIPC.mmSymbolCollectorClient.hSymbolCollectorClient.march_utilities.ccarch_utilities.hbootstrap_compat.ccbootstrap_compat.hbyteswap.hdump_syms.ccdump_syms.hencoding_util.hencoding_util.mfile_id.ccfile_id.hlaunch_reporter.cclaunch_reporter.hmacho_id.ccmacho_id.hmacho_reader.ccmacho_reader.hmacho_reader_unittest.ccmacho_utilities.ccmacho_utilities.hmacho_walker.ccmacho_walker.hminidump_upload.mscoped_task_suspend-inl.hstring_utilities.ccstring_utilities.hsuper_fat_arch.h
macros.hmd5.ccmd5.hmemory_allocator.hmemory_allocator_unittest.ccmemory_range.hmemory_range_unittest.ccminidump_type_helper.hmodule.ccmodule.hmodule_unittest.ccpath_helper.ccpath_helper.hscoped_ptr.hsimple_string_dictionary.ccsimple_string_dictionary.hsimple_string_dictionary_unittest.ccsolaris
stabs_reader.ccstabs_reader.hstabs_reader_unittest.ccstabs_to_module.ccstabs_to_module.hstabs_to_module_unittest.ccstdio_wrapper.hstring_conversion.ccstring_conversion.hstring_conversion_unittest.ccstring_view.hsymbol_data.htest_assembler.cctest_assembler.htest_assembler_unittest.cctestdata
tests
unordered.husing_std_string.hwindows
common_windows.gypdia_util.ccdia_util.hguid_string.ccguid_string.hhttp_upload.cchttp_upload.hmodule_info.homap.ccomap.homap_internal.homap_unittest.ccpdb_source_line_writer.ccpdb_source_line_writer.hpe_source_line_writer.ccpe_source_line_writer.hpe_util.ccpe_util.hstring_utils-inl.hstring_utils.ccsymbol_collector_client.ccsymbol_collector_client.h
google_breakpad
common
breakpad_types.hminidump_cpu_amd64.hminidump_cpu_arm.hminidump_cpu_arm64.hminidump_cpu_mips.hminidump_cpu_ppc.hminidump_cpu_ppc64.hminidump_cpu_sparc.hminidump_cpu_x86.hminidump_exception_fuchsia.hminidump_exception_linux.hminidump_exception_mac.hminidump_exception_ps3.hminidump_exception_solaris.hminidump_exception_win32.hminidump_format.hminidump_size.h
processor
basic_source_line_resolver.hcall_stack.hcode_module.hcode_modules.hdump_context.hdump_object.hexception_record.hexploitability.hfast_source_line_resolver.hmemory_region.hmicrodump.hmicrodump_processor.hminidump.hminidump_processor.hproc_maps_linux.hprocess_result.hprocess_state.hsource_line_resolver_base.hsource_line_resolver_interface.hstack_frame.hstack_frame_cpu.hstack_frame_symbolizer.hstackwalker.hsymbol_supplier.hsystem_info.h
third_party
curl
COPYINGcurl.hcurlbuild.hcurlrules.hcurlver.heasy.hmprintf.hmulti.hstdcheaders.htypecheck-gcc.htypes.h
libdisasm
LICENSEMakefile.amREADME.breakpadTODOia32_implicit.cia32_implicit.hia32_insn.cia32_insn.hia32_invariant.cia32_invariant.hia32_modrm.cia32_modrm.hia32_opcode_tables.cia32_opcode_tables.hia32_operand.cia32_operand.hia32_reg.cia32_reg.hia32_settings.cia32_settings.hlibdis.hlibdisasm.gypqword.h
swig
x86_disasm.cx86_format.cx86_imm.cx86_imm.hx86_insn.cx86_misc.cx86_operand_list.cx86_operand_list.hlinux/include/gflags
mac_headers
musl
crashpad
.clang-format.gitattributes.gitignore.gitmodules.gn.style.yapf.vpythonAUTHORSCMakeLists.txtCONTRIBUTORSDEPSLICENSEREADME.getsentry.mdREADME.md
client
CMakeLists.txtannotation.ccannotation.hannotation_list.ccannotation_list.hannotation_list_test.ccannotation_test.ccclient_argv_handling.ccclient_argv_handling.hcrash_report_database.cccrash_report_database.hcrash_report_database_generic.cccrash_report_database_mac.mmcrash_report_database_test.cccrash_report_database_win.cccrashpad_client.hcrashpad_client_fuchsia.cccrashpad_client_ios.cccrashpad_client_ios_test.mmcrashpad_client_linux.cccrashpad_client_linux_test.cccrashpad_client_mac.cccrashpad_client_win.cccrashpad_client_win_test.cccrashpad_info.cccrashpad_info.hcrashpad_info_note.S
codereview.settingsios_handler
exception_processor.hexception_processor.mmexception_processor_test.mmin_process_handler.ccin_process_handler.hin_process_handler_test.ccin_process_intermediate_dump_handler.ccin_process_intermediate_dump_handler.hin_process_intermediate_dump_handler_test.ccprune_intermediate_dumps_and_crash_reports_thread.ccprune_intermediate_dumps_and_crash_reports_thread.h
prune_crash_reports.ccprune_crash_reports.hprune_crash_reports_test.ccpthread_create_linux.ccsettings.ccsettings.hsettings_test.ccsimple_address_range_bag.hsimple_address_range_bag_test.ccsimple_string_dictionary.hsimple_string_dictionary_test.ccsimulate_crash.hsimulate_crash_ios.hsimulate_crash_linux.hsimulate_crash_mac.ccsimulate_crash_mac.hsimulate_crash_mac_test.ccsimulate_crash_win.hcompat
CMakeLists.txt
crashpad-config.cmake.inandroid
ios/mach
linux
mac
mingw
non_elf
non_mac
non_win
win
doc
.gitignore
example.cppappengine
developing.mdfavicon.icoios_overview_design.mdman.mdoverview_design.mdstatus.mdsupport
handler
CMakeLists.txtcrash_report_upload_thread.cccrash_report_upload_thread.hcrashpad_handler.mdcrashpad_handler_main.cccrashpad_handler_test.cccrashpad_handler_test_extended_handler.cchandler_main.cchandler_main.h
linux
capture_snapshot.cccapture_snapshot.hcrash_report_exception_handler.cccrash_report_exception_handler.hcros_crash_report_exception_handler.cccros_crash_report_exception_handler.hexception_handler_server.ccexception_handler_server.hexception_handler_server_test.cchandler_trampoline.cc
mac
crash_report_exception_handler.cccrash_report_exception_handler.hexception_handler_server.ccexception_handler_server.hfile_limit_annotation.ccfile_limit_annotation.h
main.ccminidump_to_upload_parameters.ccminidump_to_upload_parameters.hminidump_to_upload_parameters_test.ccprune_crash_reports_thread.ccprune_crash_reports_thread.huser_stream_data_source.ccuser_stream_data_source.hwin
infra/config
PRESUBMIT.py
generated
commit-queue.cfgcr-buildbucket.cfgluci-logdog.cfgluci-milo.cfgluci-scheduler.cfgproject.cfgrealms.cfg
main.starlibunwind
.clang-formatCMakeLists.txtLICENSE.TXT
docs
include
src
AddressSpace.hppCMakeLists.txtCompactUnwinder.hppDwarfInstructions.hppDwarfParser.hppEHHeaderParser.hppFrameHeaderCache.hppRWMutex.hppRegisters.hppUnwind-EHABI.cppUnwind-EHABI.hUnwind-seh.cppUnwind-sjlj.cUnwindCursor.hppUnwindLevel1-gcc-ext.cUnwindLevel1.cUnwindRegistersRestore.SUnwindRegistersSave.SUnwind_AppleExtras.cppassembly.hcet_unwind.hdwarf2.hlibunwind.cpplibunwind_ext.h
test
CMakeLists.txtalignment.compile.pass.cppfloatregister.pass.cppforceunwind.pass.cppframeheadercache_test.pass.cpp
libunwind
libunwind_01.pass.cpplibunwind_02.pass.cpplit.cfg.pylit.site.cfg.inremember_state_leak.pass.sh.ssignal_frame.pass.cppsignal_unwind.pass.cppunw_getcontext.pass.cppunwind_leaffunction.pass.cppminidump
CMakeLists.txtminidump_annotation_writer.ccminidump_annotation_writer.hminidump_annotation_writer_test.ccminidump_byte_array_writer.ccminidump_byte_array_writer.hminidump_byte_array_writer_test.ccminidump_context.hminidump_context_writer.ccminidump_context_writer.hminidump_context_writer_test.ccminidump_crashpad_info_writer.ccminidump_crashpad_info_writer.hminidump_crashpad_info_writer_test.ccminidump_exception_writer.ccminidump_exception_writer.hminidump_exception_writer_test.ccminidump_extensions.ccminidump_extensions.hminidump_file_writer.ccminidump_file_writer.hminidump_file_writer_test.ccminidump_handle_writer.ccminidump_handle_writer.hminidump_handle_writer_test.ccminidump_memory_info_writer.ccminidump_memory_info_writer.hminidump_memory_info_writer_test.ccminidump_memory_writer.ccminidump_memory_writer.hminidump_memory_writer_test.ccminidump_misc_info_writer.ccminidump_misc_info_writer.hminidump_misc_info_writer_test.ccminidump_module_crashpad_info_writer.ccminidump_module_crashpad_info_writer.hminidump_module_crashpad_info_writer_test.ccminidump_module_writer.ccminidump_module_writer.hminidump_module_writer_test.ccminidump_rva_list_writer.ccminidump_rva_list_writer.hminidump_rva_list_writer_test.ccminidump_simple_string_dictionary_writer.ccminidump_simple_string_dictionary_writer.hminidump_simple_string_dictionary_writer_test.ccminidump_stacktrace_writer.ccminidump_stacktrace_writer.hminidump_stream_writer.ccminidump_stream_writer.hminidump_string_writer.ccminidump_string_writer.hminidump_string_writer_test.ccminidump_system_info_writer.ccminidump_system_info_writer.hminidump_system_info_writer_test.ccminidump_thread_id_map.ccminidump_thread_id_map.hminidump_thread_id_map_test.ccminidump_thread_writer.ccminidump_thread_writer.hminidump_thread_writer_test.ccminidump_unloaded_module_writer.ccminidump_unloaded_module_writer.hminidump_unloaded_module_writer_test.ccminidump_user_extension_stream_data_source.ccminidump_user_extension_stream_data_source.hminidump_user_stream_writer.ccminidump_user_stream_writer.hminidump_user_stream_writer_test.ccminidump_writable.ccminidump_writable.hminidump_writable_test.ccminidump_writer_util.ccminidump_writer_util.h
navbar.mdpackage.htest
minidump_byte_array_writer_test_util.ccminidump_byte_array_writer_test_util.hminidump_context_test_util.ccminidump_context_test_util.hminidump_file_writer_test_util.ccminidump_file_writer_test_util.hminidump_memory_writer_test_util.ccminidump_memory_writer_test_util.hminidump_rva_list_test_util.ccminidump_rva_list_test_util.hminidump_string_writer_test_util.ccminidump_string_writer_test_util.hminidump_user_extension_stream_util.ccminidump_user_extension_stream_util.hminidump_writable_test_util.ccminidump_writable_test_util.h
snapshot
CMakeLists.txtannotation_snapshot.ccannotation_snapshot.hcapture_memory.cccapture_memory.hcpu_architecture.hcpu_context.cccpu_context.hcpu_context_test.cccrashpad_info_client_options.cccrashpad_info_client_options.hcrashpad_info_client_options_test.cccrashpad_info_client_options_test_module.cccrashpad_info_size_test_module.cccrashpad_info_size_test_note.S
crashpad_types
crashpad_info_reader.cccrashpad_info_reader.hcrashpad_info_reader_test.ccimage_annotation_reader.ccimage_annotation_reader.himage_annotation_reader_test.cc
elf
elf_dynamic_array_reader.ccelf_dynamic_array_reader.helf_image_reader.ccelf_image_reader.helf_image_reader_fuzzer.cc
exception_snapshot.helf_image_reader_fuzzer_corpus
elf_image_reader_test.ccelf_image_reader_test_note.Self_symbol_table_reader.ccelf_symbol_table_reader.hmodule_snapshot_elf.ccmodule_snapshot_elf.htest_exported_symbols.symfuchsia
cpu_context_fuchsia.cccpu_context_fuchsia.hexception_snapshot_fuchsia.ccexception_snapshot_fuchsia.hmemory_map_fuchsia.ccmemory_map_fuchsia.hmemory_map_region_snapshot_fuchsia.ccmemory_map_region_snapshot_fuchsia.hprocess_reader_fuchsia.ccprocess_reader_fuchsia.hprocess_reader_fuchsia_test.ccprocess_snapshot_fuchsia.ccprocess_snapshot_fuchsia.hprocess_snapshot_fuchsia_test.ccsystem_snapshot_fuchsia.ccsystem_snapshot_fuchsia.hthread_snapshot_fuchsia.ccthread_snapshot_fuchsia.h
handle_snapshot.cchandle_snapshot.hhash_types_test.ccios
exception_snapshot_ios_intermediate_dump.ccexception_snapshot_ios_intermediate_dump.hintermediate_dump_reader_util.ccintermediate_dump_reader_util.hmemory_snapshot_ios_intermediate_dump.ccmemory_snapshot_ios_intermediate_dump.hmodule_snapshot_ios_intermediate_dump.ccmodule_snapshot_ios_intermediate_dump.hprocess_snapshot_ios_intermediate_dump.ccprocess_snapshot_ios_intermediate_dump.hprocess_snapshot_ios_intermediate_dump_test.ccsystem_snapshot_ios_intermediate_dump.ccsystem_snapshot_ios_intermediate_dump.h
testdata
thread_snapshot_ios_intermediate_dump.ccthread_snapshot_ios_intermediate_dump.hlinux
capture_memory_delegate_linux.cccapture_memory_delegate_linux.hcpu_context_linux.cccpu_context_linux.hdebug_rendezvous.ccdebug_rendezvous.hdebug_rendezvous_test.ccexception_snapshot_linux.ccexception_snapshot_linux.hexception_snapshot_linux_test.ccprocess_reader_linux.ccprocess_reader_linux.hprocess_reader_linux_test.ccprocess_snapshot_linux.ccprocess_snapshot_linux.hsignal_context.hsystem_snapshot_linux.ccsystem_snapshot_linux.hsystem_snapshot_linux_test.cctest_modules.cctest_modules.hthread_snapshot_linux.ccthread_snapshot_linux.h
mac
cpu_context_mac.cccpu_context_mac.hcpu_context_mac_test.ccexception_snapshot_mac.ccexception_snapshot_mac.hmach_o_image_annotations_reader.ccmach_o_image_annotations_reader.hmach_o_image_annotations_reader_test.ccmach_o_image_annotations_reader_test_module_crashy_initializer.ccmach_o_image_annotations_reader_test_no_op.ccmach_o_image_reader.ccmach_o_image_reader.hmach_o_image_reader_test.ccmach_o_image_segment_reader.ccmach_o_image_segment_reader.hmach_o_image_segment_reader_test.ccmach_o_image_symbol_table_reader.ccmach_o_image_symbol_table_reader.hmodule_snapshot_mac.ccmodule_snapshot_mac.hprocess_reader_mac.ccprocess_reader_mac.hprocess_reader_mac_test.ccprocess_snapshot_mac.ccprocess_snapshot_mac.hprocess_types.ccprocess_types.h
memory_map_region_snapshot.hmemory_snapshot.ccmemory_snapshot.hmemory_snapshot_generic.hmemory_snapshot_test.ccprocess_types
all.proctypeannotation.proctypecrashpad_info.proctypecrashreporterclient.proctypecustom.ccdyld_images.proctypeflavors.hinternal.hloader.proctypenlist.proctypetraits.h
process_types_test.ccsystem_snapshot_mac.ccsystem_snapshot_mac.hsystem_snapshot_mac_test.ccthread_snapshot_mac.ccthread_snapshot_mac.hminidump
exception_snapshot_minidump.ccexception_snapshot_minidump.hmemory_snapshot_minidump.ccmemory_snapshot_minidump.hminidump_annotation_reader.ccminidump_annotation_reader.hminidump_context_converter.ccminidump_context_converter.hminidump_simple_string_dictionary_reader.ccminidump_simple_string_dictionary_reader.hminidump_stream.hminidump_string_list_reader.ccminidump_string_list_reader.hminidump_string_reader.ccminidump_string_reader.hmodule_snapshot_minidump.ccmodule_snapshot_minidump.hprocess_snapshot_minidump.ccprocess_snapshot_minidump.hprocess_snapshot_minidump_test.ccsystem_snapshot_minidump.ccsystem_snapshot_minidump.hthread_snapshot_minidump.ccthread_snapshot_minidump.h
module_snapshot.hposix
process_snapshot.hsanitized
memory_snapshot_sanitized.ccmemory_snapshot_sanitized.hmodule_snapshot_sanitized.ccmodule_snapshot_sanitized.hprocess_snapshot_sanitized.ccprocess_snapshot_sanitized.hprocess_snapshot_sanitized_test.ccsanitization_information.ccsanitization_information.hsanitization_information_test.ccthread_snapshot_sanitized.ccthread_snapshot_sanitized.h
snapshot_constants.hsystem_snapshot.htest
test_cpu_context.cctest_cpu_context.htest_exception_snapshot.cctest_exception_snapshot.htest_memory_map_region_snapshot.cctest_memory_map_region_snapshot.htest_memory_snapshot.cctest_memory_snapshot.htest_module_snapshot.cctest_module_snapshot.htest_process_snapshot.cctest_process_snapshot.htest_system_snapshot.cctest_system_snapshot.htest_thread_snapshot.cctest_thread_snapshot.h
thread_snapshot.hunloaded_module_snapshot.ccunloaded_module_snapshot.hwin
capture_memory_delegate_win.cccapture_memory_delegate_win.hcpu_context_win.cccpu_context_win.hcpu_context_win_test.cccrashpad_snapshot_test_annotations.cccrashpad_snapshot_test_crashing_child.cccrashpad_snapshot_test_dump_without_crashing.cccrashpad_snapshot_test_extra_memory_ranges.cccrashpad_snapshot_test_image_reader.cccrashpad_snapshot_test_image_reader_module.ccend_to_end_test.pyexception_snapshot_win.ccexception_snapshot_win.hexception_snapshot_win_test.ccextra_memory_ranges_test.ccmemory_map_region_snapshot_win.ccmemory_map_region_snapshot_win.hmodule_snapshot_win.ccmodule_snapshot_win.hmodule_snapshot_win_test.ccpe_image_annotations_reader.ccpe_image_annotations_reader.hpe_image_reader.ccpe_image_reader.hpe_image_reader_test.ccpe_image_resource_reader.ccpe_image_resource_reader.hprocess_reader_win.ccprocess_reader_win.hprocess_reader_win_test.ccprocess_snapshot_win.ccprocess_snapshot_win.hprocess_snapshot_win_test.ccprocess_subrange_reader.ccprocess_subrange_reader.hsystem_snapshot_win.ccsystem_snapshot_win.hsystem_snapshot_win_test.ccthread_snapshot_win.ccthread_snapshot_win.h
x86
test
errors.ccerrors.hfile.ccfile.hfilesystem.ccfilesystem.hfuchsia_crashpad_tests.cmxgtest_death.hgtest_main.cchex_string.cchex_string.hhex_string_test.cc
ios
cptest_google_test_runner.mmcptest_google_test_runner_delegate.hcrash_type_xctest.mmgoogle_test_setup.hgoogle_test_setup.mm
host
linux
mac
dyld.ccdyld.hexception_swallower.ccexception_swallower.hmach_errors.ccmach_errors.hmach_multiprocess.ccmach_multiprocess.hmach_multiprocess_test.cc
main_arguments.ccmain_arguments.hmain_arguments_test.ccmultiprocess.hmultiprocess_exec.ccmultiprocess_exec.hmultiprocess_exec_fuchsia.ccmultiprocess_exec_posix.ccmultiprocess_exec_test.ccmultiprocess_exec_test_child.ccmultiprocess_exec_win.ccmultiprocess_posix.ccmultiprocess_posix_test.ccprocess_type.ccprocess_type.hscoped_guarded_page.hscoped_guarded_page_posix.ccscoped_guarded_page_test.ccscoped_guarded_page_win.ccscoped_module_handle.ccscoped_module_handle.hscoped_temp_dir.ccscoped_temp_dir.hscoped_temp_dir_posix.ccscoped_temp_dir_test.ccscoped_temp_dir_win.cctest_paths.cctest_paths.htest_paths_test.cctest_paths_test_data_root.txtwin
third_party
cpp-httplib
edo
fuchsia
getopt
glibc
googletest
gyp
linux
lss
mini_chromium
CMakeLists.txtREADME.crashpad
mini_chromium
.gitattributes.gitignoreAUTHORSLICENSEREADME.md
utf_string_conversion_utils.mingw.ccbase
atomicops.hatomicops_internals_atomicword_compat.hatomicops_internals_portable.hauto_reset.hbit_cast.hcheck.hcheck_op.hcompiler_specific.hcxx17_backports.h
codereview.settingsdebug
files
format_macros.hfuchsia
ignore_result.hlogging.cclogging.hmac
close_nocancel.ccfoundation_util.hfoundation_util.mmmach_logging.ccmach_logging.hscoped_cftyperef.hscoped_ioobject.hscoped_launch_data.hscoped_mach_port.ccscoped_mach_port.hscoped_mach_vm.ccscoped_mach_vm.hscoped_nsautorelease_pool.hscoped_nsautorelease_pool.mmscoped_nsobject.hscoped_typeref.h
memory
metrics
notreached.hnumerics
checked_math.hchecked_math_impl.hclamped_math.hclamped_math_impl.hsafe_conversions.hsafe_conversions_arm_impl.hsafe_conversions_impl.hsafe_math.hsafe_math_arm_impl.hsafe_math_clang_gcc_impl.hsafe_math_shared_impl.h
posix
process
rand_util.ccrand_util.hscoped_clear_last_error.hscoped_clear_last_error_win.ccscoped_generic.hstrings
string_number_conversions.ccstring_number_conversions.hstring_piece.hstring_util.ccstring_util.hstring_util_posix.hstring_util_win.ccstring_util_win.hstringprintf.ccstringprintf.hsys_string_conversions.hsys_string_conversions_mac.mmutf_string_conversion_utils.ccutf_string_conversion_utils.hutf_string_conversions.ccutf_string_conversions.h
synchronization
condition_variable.hcondition_variable_posix.cclock.cclock.hlock_impl.hlock_impl_posix.cclock_impl_win.cc
sys_byteorder.htemplate_util.hthird_party/icu
threading
xnu
zlib
CMakeLists.txtREADME.crashpad
zlib
LICENSEOWNERSREADME.chromiumadler32.ccompress.c
zlib_crashpad.hcontrib/minizip
ChangeLogUnzipcrypt.hioapi.cioapi.hiowin32.ciowin32.hminiunz.cminizip.cmztools.cmztools.hunzip.cunzip.hzip.czip.h
crc32.ccrc32.hcrc_folding.cdeflate.cdeflate.hfill_window_sse.cgoogle
DEPSOWNERScompression_utils.cccompression_utils.hcompression_utils_unittest.cc
gzclose.cgzguts.hgzlib.cgzread.cgzwrite.cinfback.cinffast.cinffast.hinffixed.hinflate.cinflate.hinftrees.cinftrees.hnames.hsimd_stub.ctrees.ctrees.huncompr.cx86.cx86.hzconf.hzlib.hzutil.czutil.htest/data
create_test_zip.shevil.zipevil_via_absolute_file_name.zipevil_via_invalid_utf8.ziptest.zip
zip.cczip.hzip_internal.cczip_internal.hzip_reader.cczip_reader.hzip_reader_unittest.cczip_unittest.cctest
test_mismatch_size.ziptest_nocompress.ziptools
CMakeLists.txtbase94_encoder.ccbase94_encoder.mdcrashpad_database_util.cccrashpad_database_util.mdcrashpad_http_upload.cccrashpad_http_upload.mdgenerate_dump.ccgenerate_dump.md
mac
catch_exception_tool.cccatch_exception_tool.mdexception_port_tool.ccexception_port_tool.mdon_demand_service_tool.mdon_demand_service_tool.mmsectaskaccess_info.plist
run_with_crashpad.ccrun_with_crashpad.mdtool_support.cctool_support.hutil
CMakeLists.txt
file
delimited_file_reader.ccdelimited_file_reader.hdelimited_file_reader_test.ccdirectory_reader.hdirectory_reader_posix.ccdirectory_reader_test.ccdirectory_reader_win.ccfile_helper.ccfile_helper.hfile_io.ccfile_io.hfile_io_posix.ccfile_io_test.ccfile_io_win.ccfile_reader.ccfile_reader.hfile_reader_test.ccfile_seeker.ccfile_seeker.hfile_writer.ccfile_writer.hfilesystem.hfilesystem_posix.ccfilesystem_test.ccfilesystem_win.ccoutput_stream_file_writer.ccoutput_stream_file_writer.hscoped_remove_file.ccscoped_remove_file.hstring_file.ccstring_file.hstring_file_test.cc
fuchsia
ios
ios_intermediate_dump_data.ccios_intermediate_dump_data.hios_intermediate_dump_format.hios_intermediate_dump_interface.ccios_intermediate_dump_interface.hios_intermediate_dump_list.ccios_intermediate_dump_list.hios_intermediate_dump_map.ccios_intermediate_dump_map.hios_intermediate_dump_object.ccios_intermediate_dump_object.hios_intermediate_dump_reader.ccios_intermediate_dump_reader.hios_intermediate_dump_reader_test.ccios_intermediate_dump_writer.ccios_intermediate_dump_writer.hios_intermediate_dump_writer_test.ccios_system_data_collector.hios_system_data_collector.mmraw_logging.ccraw_logging.hscoped_vm_read.ccscoped_vm_read.hscoped_vm_read_test.cc
linux
address_types.hauxiliary_vector.ccauxiliary_vector.hauxiliary_vector_test.ccchecked_linux_address_range.hdirect_ptrace_connection.ccdirect_ptrace_connection.hexception_handler_client.ccexception_handler_client.hexception_handler_protocol.ccexception_handler_protocol.hexception_information.hinitial_signal_dispositions.ccinitial_signal_dispositions.hmemory_map.ccmemory_map.hmemory_map_test.ccproc_stat_reader.ccproc_stat_reader.hproc_stat_reader_test.ccproc_task_reader.ccproc_task_reader.hproc_task_reader_test.ccptrace_broker.ccptrace_broker.hptrace_broker_test.ccptrace_client.ccptrace_client.hptrace_connection.hptracer.ccptracer.hptracer_test.ccscoped_pr_set_dumpable.ccscoped_pr_set_dumpable.hscoped_pr_set_ptracer.ccscoped_pr_set_ptracer.hscoped_ptrace_attach.ccscoped_ptrace_attach.hscoped_ptrace_attach_test.ccsocket.ccsocket.hsocket_test.ccthread_info.ccthread_info.htraits.h
mac
checked_mach_address_range.hchecked_mach_address_range_test.cclaunchd.hlaunchd.mmlaunchd_test.mmmac_util.ccmac_util.hmac_util_test.mmservice_management.ccservice_management.hservice_management_test.mmsysctl.ccsysctl.hsysctl_test.ccxattr.ccxattr.hxattr_test.cc
mach
bootstrap.ccbootstrap.hbootstrap_test.ccchild_port.defschild_port_handshake.ccchild_port_handshake.hchild_port_handshake_test.ccchild_port_server.ccchild_port_server.hchild_port_server_test.ccchild_port_types.hcomposite_mach_message_server.cccomposite_mach_message_server.hcomposite_mach_message_server_test.ccexc_client_variants.ccexc_client_variants.hexc_client_variants_test.ccexc_server_variants.ccexc_server_variants.hexc_server_variants_test.ccexception_behaviors.ccexception_behaviors.hexception_behaviors_test.ccexception_ports.ccexception_ports.hexception_ports_test.ccexception_types.ccexception_types.hexception_types_test.ccmach_extensions.ccmach_extensions.hmach_extensions_test.ccmach_message.ccmach_message.hmach_message_server.ccmach_message_server.hmach_message_server_test.ccmach_message_test.ccmig.pymig_fix.pymig_gen.pynotify_server.ccnotify_server.hnotify_server_test.ccscoped_task_suspend.ccscoped_task_suspend.hscoped_task_suspend_test.ccsymbolic_constants_mach.ccsymbolic_constants_mach.hsymbolic_constants_mach_test.cctask_for_pid.cctask_for_pid.h
misc
address_sanitizer.haddress_types.harm64_bti_note.Sarraysize.harraysize_test.ccas_underlying_type.hcapture_context.hcapture_context_broken.cccapture_context_fuchsia.Scapture_context_linux.Scapture_context_mac.Scapture_context_test.cccapture_context_test_util.hcapture_context_test_util_fuchsia.cccapture_context_test_util_linux.cccapture_context_test_util_mac.cccapture_context_test_util_win.cccapture_context_win.asmcapture_context_win_arm64.asmcapture_context_win_arm64.objclock.hclock_mac.ccclock_posix.ccclock_test.ccclock_win.ccelf_note_types.hfrom_pointer_cast.hfrom_pointer_cast_test.ccimplicit_cast.hinitialization_state.hinitialization_state_dcheck.ccinitialization_state_dcheck.hinitialization_state_dcheck_test.ccinitialization_state_test.cclexing.cclexing.hmemory_sanitizer.hmetrics.ccmetrics.hno_cfi_icall.hno_cfi_icall_test.ccpaths.hpaths_fuchsia.ccpaths_linux.ccpaths_mac.ccpaths_test.ccpaths_win.ccpdb_structures.ccpdb_structures.hrandom_string.ccrandom_string.hrandom_string_test.ccrange_set.ccrange_set.hrange_set_test.ccreinterpret_bytes.ccreinterpret_bytes.hreinterpret_bytes_test.ccscoped_forbid_return.ccscoped_forbid_return.hscoped_forbid_return_test.ccsymbolic_constants_common.htime.cctime.htime_linux.cctime_test.cctime_win.cctri_state.huuid.ccuuid.huuid_test.cczlib.cczlib.h
net
generate_test_server_key.pyhttp_body.cchttp_body.hhttp_body_gzip.cchttp_body_gzip.hhttp_body_gzip_test.cchttp_body_test.cchttp_body_test_util.cchttp_body_test_util.hhttp_headers.hhttp_multipart_builder.cchttp_multipart_builder.hhttp_multipart_builder_test.cchttp_transport.cchttp_transport.hhttp_transport_libcurl.cchttp_transport_mac.mmhttp_transport_socket.cchttp_transport_test.cchttp_transport_test_server.cchttp_transport_win.cc
testdata
tls.gniurl.ccurl.hurl_test.ccnumeric
checked_address_range.ccchecked_address_range.hchecked_address_range_test.ccchecked_range.hchecked_range_test.ccchecked_vm_address_range.hin_range_cast.hin_range_cast_test.ccint128.hint128_test.ccsafe_assignment.h
posix
close_multiple.ccclose_multiple.hclose_stdio.ccclose_stdio.hdouble_fork_and_exec.ccdouble_fork_and_exec.hdrop_privileges.ccdrop_privileges.hprocess_info.hprocess_info_linux.ccprocess_info_mac.ccprocess_info_test.ccscoped_dir.ccscoped_dir.hscoped_mmap.ccscoped_mmap.hscoped_mmap_test.ccsignals.ccsignals.hsignals_test.ccsymbolic_constants_posix.ccsymbolic_constants_posix.hsymbolic_constants_posix_test.cc
process
process_id.hprocess_memory.ccprocess_memory.hprocess_memory_fuchsia.ccprocess_memory_fuchsia.hprocess_memory_linux.ccprocess_memory_linux.hprocess_memory_mac.ccprocess_memory_mac.hprocess_memory_mac_test.ccprocess_memory_native.hprocess_memory_range.ccprocess_memory_range.hprocess_memory_range_test.ccprocess_memory_sanitized.ccprocess_memory_sanitized.hprocess_memory_sanitized_test.ccprocess_memory_test.ccprocess_memory_win.ccprocess_memory_win.h
stdlib
aligned_allocator.ccaligned_allocator.haligned_allocator_test.ccmap_insert.hmap_insert_test.ccobjc.hstring_number_conversion.ccstring_number_conversion.hstring_number_conversion_test.ccstrlcpy.ccstrlcpy.hstrlcpy_test.ccstrnlen.ccstrnlen.hstrnlen_test.ccthread_safe_vector.hthread_safe_vector_test.cc
stream
base94_output_stream.ccbase94_output_stream.hbase94_output_stream_test.ccfile_encoder.ccfile_encoder.hfile_encoder_test.ccfile_output_stream.ccfile_output_stream.hlog_output_stream.cclog_output_stream.hlog_output_stream_test.ccoutput_stream_interface.htest_output_stream.cctest_output_stream.hzlib_output_stream.cczlib_output_stream.hzlib_output_stream_test.cc
string
synchronization
thread
stoppable.hthread.ccthread.hthread_log_messages.ccthread_log_messages.hthread_log_messages_test.ccthread_posix.ccthread_test.ccthread_win.ccworker_thread.ccworker_thread.hworker_thread_test.cc
win
address_types.hchecked_win_address_range.hcommand_line.cccommand_line.hcommand_line_test.cccontext_wrappers.hcritical_section_with_debug_info.cccritical_section_with_debug_info.hcritical_section_with_debug_info_test.ccexception_handler_server.ccexception_handler_server.hexception_handler_server_test.ccget_function.ccget_function.hget_function_test.ccget_module_information.ccget_module_information.hhandle.cchandle.hhandle_test.ccinitial_client_data.ccinitial_client_data.hinitial_client_data_test.ccloader_lock.ccloader_lock.hloader_lock_test.ccloader_lock_test_dll.ccmodule_version.ccmodule_version.hnt_internals.ccnt_internals.hntstatus_logging.ccntstatus_logging.hprocess_info.ccprocess_info.hprocess_info_test.ccprocess_info_test_child.ccprocess_structs.hregistration_protocol_win.ccregistration_protocol_win.hregistration_protocol_win_test.ccsafe_terminate_process.asmsafe_terminate_process.hsafe_terminate_process_broken.ccsafe_terminate_process_test.ccsafe_terminate_process_test_child.ccscoped_handle.ccscoped_handle.hscoped_local_alloc.ccscoped_local_alloc.hscoped_process_suspend.ccscoped_process_suspend.hscoped_process_suspend_test.ccscoped_registry_key.hscoped_set_event.ccscoped_set_event.hsession_end_watcher.ccsession_end_watcher.hsession_end_watcher_test.cctermination_codes.htraits.hxp_compat.h
libunwindstack-ndk
.gitignoreArmExidx.cppArmExidx.hAsmGetRegsX86.SAsmGetRegsX86_64.SCheck.hDexFile.cppDexFile.hDexFiles.cppDwarfCfa.cppDwarfCfa.hDwarfDebugFrame.hDwarfEhFrame.hDwarfEhFrameWithHdr.cppDwarfEhFrameWithHdr.hDwarfEncoding.hDwarfMemory.cppDwarfOp.cppDwarfOp.hDwarfSection.cppElf.cppElfInterface.cppElfInterfaceArm.cppElfInterfaceArm.hGlobal.cppJitDebug.cppLICENSELocalUnwinder.cppLog.cppMapInfo.cppMaps.cppMemory.cppMemoryBuffer.hMemoryCache.hMemoryFileAtOffset.hMemoryLocal.hMemoryMte.cppMemoryOffline.hMemoryOfflineBuffer.hMemoryRange.hMemoryRemote.hOWNERSREADME.mdRegs.cppRegsArm.cppRegsArm64.cppRegsInfo.hRegsX86.cppRegsX86_64.cppSymbols.cppSymbols.hThreadEntry.cppThreadEntry.hThreadUnwinder.cppUnwinder.cpp
android-base
README.mderrno_restorer.hfile.cppfile.hlog_main.hlogging.hmacros.hoff64_t.hparseint.hstringprintf.cppstringprintf.hstrings.cppstrings.hthreads.hunique_fd.hutf8.h
cmake
compat
include/unwindstack
Arch.hDexFiles.hDwarfError.hDwarfLocation.hDwarfMemory.hDwarfSection.hDwarfStructs.hElf.hElfInterface.hError.hGlobal.hJitDebug.hLocalUnwinder.hLog.hMachineArm.hMachineArm64.hMachineX86.hMachineX86_64.hMapInfo.hMaps.hMemory.hRegs.hRegsArm.hRegsArm64.hRegsGetLocal.hRegsX86.hRegsX86_64.hUcontextArm.hUcontextArm64.hUcontextX86.hUcontextX86_64.hUnwinder.hUserArm.hUserArm64.hUserX86.hUserX86_64.h
procinfo
unistdfix.hthird_party/lss
fuzzing-examples
include
sentry-config.cmake.insrc
CMakeLists.txt
backends
integrations
modulefinder
sentry_modulefinder_aix.csentry_modulefinder_apple.csentry_modulefinder_linux.csentry_modulefinder_linux.hsentry_modulefinder_windows.c
path
sentry_alloc.csentry_alloc.hsentry_backend.csentry_backend.hsentry_boot.hsentry_core.csentry_core.hsentry_database.csentry_database.hsentry_envelope.csentry_envelope.hsentry_json.csentry_json.hsentry_logger.csentry_logger.hsentry_options.csentry_options.hsentry_os.csentry_os.hsentry_path.hsentry_random.csentry_random.hsentry_ratelimiter.csentry_ratelimiter.hsentry_scope.csentry_scope.hsentry_session.csentry_session.hsentry_slice.csentry_slice.hsentry_string.csentry_string.hsentry_symbolizer.hsentry_sync.csentry_sync.hsentry_tracing.csentry_tracing.hsentry_transport.csentry_transport.hsentry_unix_pageallocator.csentry_unix_pageallocator.hsentry_unix_spinlock.hsentry_utils.csentry_utils.hsentry_uuid.csentry_uuid.hsentry_value.csentry_value.hsentry_windows_dbghelp.csentry_windows_dbghelp.hsymbolizer
transports
sentry_disk_transport.csentry_disk_transport.hsentry_function_transport.csentry_transport_curl.csentry_transport_none.csentry_transport_winhttp.c
unwinder
tests
__init__.pyassertions.pycmake.pyconditions.pyconftest.py
fixtures
fuzzing-failures
id-000000,sig-06,src-000560,op-havoc,rep-2id-000000,sig-11,src-000033+000005,op-splice,rep-16id-000000,sig-11,src-000320,op-havoc,rep-2id-000000,sig-11,src-000494+000073,op-splice,rep-8id-000001,sig-11,src-000052+000222,op-splice,rep-32id-000001,sig-11,src-000215+000415,op-splice,rep-16id-000002,sig-11,src-000339+000110,op-splice,rep-16id-000002,sig-11,src-000447+000419,op-splice,rep-32id-000003,sig-11,src-000399+000468,op-splice,rep-32id-000004,sig-11,src-000440+000369,op-splice,rep-2
leaks.txtrequirements.txttest_build_static.pytest_integration_crashpad.pytest_integration_http.pytest_integration_ratelimits.pytest_integration_stdout.pytest_unit.pyunit
.gitattributesCMakeLists.txtfuzz.cmain.csentry_testsupport.htest_attachments.ctest_basic.ctest_concurrency.ctest_consent.ctest_envelopes.ctest_failures.ctest_fuzzfailures.ctest_logger.ctest_modulefinder.ctest_mpack.ctest_path.ctest_ratelimiter.ctest_sampling.ctest_session.ctest_slice.ctest_symbolizer.ctest_sync.ctest_tracing.ctest_uninit.ctest_unwinder.ctest_utils.ctest_uuid.ctest_value.ctests.inc
valgrind.txttoolchains
vendor
@ -164,6 +164,10 @@ cmake_dependent_option( KICAD_WIN32_VERIFY_CODESIGN
|
||||
OFF "WIN32"
|
||||
OFF )
|
||||
|
||||
option( KICAD_USE_SENTRY
|
||||
"Build KiCad with support for sentry app metrics"
|
||||
OFF )
|
||||
|
||||
if( KICAD_USE_3DCONNEXION )
|
||||
if( WIN32 )
|
||||
add_definitions( -DKICAD_USE_3DCONNEXION )
|
||||
@ -943,6 +947,12 @@ if( APPLE )
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
if( KICAD_USE_SENTRY )
|
||||
add_subdirectory( thirdparty/sentry-native )
|
||||
add_definitions( -DKICAD_USE_SENTRY )
|
||||
endif()
|
||||
|
||||
#================================================
|
||||
# Add the documentation
|
||||
#================================================
|
||||
|
@ -204,6 +204,12 @@ set( COMMON_DLG_SRCS
|
||||
dialogs/wx_html_report_panel_base.cpp
|
||||
)
|
||||
|
||||
if( KICAD_USE_SENTRY )
|
||||
list( APPEND COMMON_DLG_SRCS
|
||||
dialogs/panel_data_collection.cpp
|
||||
dialogs/panel_data_collection_base.cpp )
|
||||
endif()
|
||||
|
||||
set( COMMON_WIDGET_SRCS
|
||||
widgets/app_progress_dialog.cpp
|
||||
widgets/bitmap_button.cpp
|
||||
@ -506,6 +512,11 @@ target_link_libraries( common
|
||||
${Fontconfig_LIBRARIES}
|
||||
)
|
||||
|
||||
if( KICAD_USE_SENTRY )
|
||||
target_link_libraries( common
|
||||
sentry )
|
||||
endif()
|
||||
|
||||
target_include_directories( common
|
||||
PUBLIC
|
||||
.
|
||||
|
74
common/dialogs/panel_data_collection.cpp
Normal file
74
common/dialogs/panel_data_collection.cpp
Normal file
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <dialogs/panel_data_collection.h>
|
||||
|
||||
#include <advanced_config.h>
|
||||
#include <bitmaps.h>
|
||||
#include <dialog_shim.h>
|
||||
#include <gal/dpi_scaling.h>
|
||||
#include <kiface_base.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <pgm_base.h>
|
||||
#include <id.h>
|
||||
#include <settings/common_settings.h>
|
||||
#include <settings/settings_manager.h>
|
||||
|
||||
PANEL_DATA_COLLECTION::PANEL_DATA_COLLECTION( PAGED_DIALOG* aDialog, wxWindow* aParent ) :
|
||||
PANEL_DATA_COLLECTION_BASE( aParent ), m_dialog( aDialog )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
bool PANEL_DATA_COLLECTION::TransferDataToWindow()
|
||||
{
|
||||
applySettingsToPanel();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool PANEL_DATA_COLLECTION::TransferDataFromWindow()
|
||||
{
|
||||
Pgm().SetSentryOptIn( m_cbOptIn->GetValue() );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void PANEL_DATA_COLLECTION::ResetPanel()
|
||||
{
|
||||
applySettingsToPanel();
|
||||
}
|
||||
|
||||
|
||||
void PANEL_DATA_COLLECTION::applySettingsToPanel()
|
||||
{
|
||||
m_cbOptIn->SetValue( Pgm().IsSentryOptedIn() );
|
||||
}
|
||||
|
||||
|
||||
void PANEL_DATA_COLLECTION::OnResetIdClick( wxCommandEvent& aEvent )
|
||||
{
|
||||
Pgm().ResetSentryId();
|
||||
}
|
53
common/dialogs/panel_data_collection_base.cpp
Normal file
53
common/dialogs/panel_data_collection_base.cpp
Normal file
@ -0,0 +1,53 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "panel_data_collection_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PANEL_DATA_COLLECTION_BASE::PANEL_DATA_COLLECTION_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : RESETTABLE_PANEL( parent, id, pos, size, style, name )
|
||||
{
|
||||
wxBoxSizer* bPanelSizer;
|
||||
bPanelSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizer8;
|
||||
bSizer8 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_stExplanation = new wxStaticText( this, wxID_ANY, _("KiCad can anonymously report crashes and special event data to developers in order to aid identifying critical bugs across the user base more effectively and help profile functionality to guide improvements.\n\nTo link automatic reports from the same KiCad install, a unique identifier is generated that is completely random, it is only used for the purposes of crash reporting. No personally identifiable information (PII) including IP address is stored or connected to this identifier. You may reset this id at anytime with the button provided.\n\nIf you choose to voluntarily participate, KiCad will automatically handle sending said reports when crashes or events occur. Your design files such as schematic or PCB are not shared in this process."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stExplanation->Wrap( 500 );
|
||||
bSizer8->Add( m_stExplanation, 0, wxALL, 5 );
|
||||
|
||||
wxBoxSizer* bSizer3;
|
||||
bSizer3 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_cbOptIn = new wxCheckBox( this, wxID_ANY, _("I agree to provide anonymous reports"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer3->Add( m_cbOptIn, 0, wxALL, 5 );
|
||||
|
||||
m_buttonResetId = new wxButton( this, wxID_ANY, _("Reset Unique Id"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer3->Add( m_buttonResetId, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bSizer8->Add( bSizer3, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bPanelSizer->Add( bSizer8, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bPanelSizer );
|
||||
this->Layout();
|
||||
bPanelSizer->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
m_buttonResetId->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DATA_COLLECTION_BASE::OnResetIdClick ), NULL, this );
|
||||
}
|
||||
|
||||
PANEL_DATA_COLLECTION_BASE::~PANEL_DATA_COLLECTION_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_buttonResetId->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DATA_COLLECTION_BASE::OnResetIdClick ), NULL, this );
|
||||
|
||||
}
|
284
common/dialogs/panel_data_collection_base.fbp
Normal file
284
common/dialogs/panel_data_collection_base.fbp
Normal file
@ -0,0 +1,284 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="16" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
<property name="disconnect_events">1</property>
|
||||
<property name="disconnect_mode">source_name</property>
|
||||
<property name="disconnect_php_events">0</property>
|
||||
<property name="disconnect_python_events">0</property>
|
||||
<property name="embedded_files_path">res</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">panel_data_collection_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">PanelDataCollection</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
<property name="relative_path">1</property>
|
||||
<property name="skip_lua_events">1</property>
|
||||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_array_enum">0</property>
|
||||
<property name="use_enum">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Panel" expanded="1">
|
||||
<property name="aui_managed">0</property>
|
||||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="event_handler">impl_virtual</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">PANEL_DATA_COLLECTION_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="subclass">RESETTABLE_PANEL; widgets/resettable_panel.h; Not forward_declare</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="two_step_creation">0</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bPanelSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer8</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">KiCad can anonymously report crashes and special event data to developers in order to aid identifying critical bugs across the user base more effectively and help profile functionality to guide improvements.

To link automatic reports from the same KiCad install, a unique identifier is generated that is completely random, it is only used for the purposes of crash reporting. No personally identifiable information (PII) including IP address is stored or connected to this identifier. You may reset this id at anytime with the button provided.

If you choose to voluntarily participate, KiCad will automatically handle sending said reports when crashes or events occur. Your design files such as schematic or PCB are not shared in this process.</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_stExplanation</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">500</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer3</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">I agree to provide anonymous reports</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_cbOptIn</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Reset Unique Id</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_buttonResetId</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnResetIdClick</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</wxFormBuilder_Project>
|
53
common/dialogs/panel_data_collection_base.h
Normal file
53
common/dialogs/panel_data_collection_base.h
Normal file
@ -0,0 +1,53 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
#include "widgets/resettable_panel.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class PANEL_DATA_COLLECTION_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class PANEL_DATA_COLLECTION_BASE : public RESETTABLE_PANEL
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* m_stExplanation;
|
||||
wxCheckBox* m_cbOptIn;
|
||||
wxButton* m_buttonResetId;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
virtual void OnResetIdClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
PANEL_DATA_COLLECTION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~PANEL_DATA_COLLECTION_BASE();
|
||||
|
||||
};
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <dialog_shim.h>
|
||||
#include <dialogs/panel_common_settings.h>
|
||||
#include <dialogs/panel_mouse_settings.h>
|
||||
#include <dialogs/panel_data_collection.h>
|
||||
#include <eda_dde.h>
|
||||
#include <filehistory.h>
|
||||
#include <id.h>
|
||||
@ -994,6 +995,10 @@ void EDA_BASE_FRAME::OnPreferences( wxCommandEvent& event )
|
||||
book->AddPage( new PANEL_MOUSE_SETTINGS( &dlg, book ), _( "Mouse and Touchpad" ) );
|
||||
book->AddPage( hotkeysPanel, _( "Hotkeys" ) );
|
||||
|
||||
#ifdef KICAD_USE_SENTRY
|
||||
book->AddPage( new PANEL_DATA_COLLECTION( &dlg, book ), _( "Data Collection" ) );
|
||||
#endif
|
||||
|
||||
#define CREATE_PANEL( key ) kiface->CreateWindow( book, key, &Kiway() )
|
||||
|
||||
kiface = Kiway().KiFACE( KIWAY::FACE_SCH );
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <wx/stdpaths.h>
|
||||
#include <wx/sysopt.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/ffile.h>
|
||||
#include <wx/tooltip.h>
|
||||
|
||||
#include <advanced_config.h>
|
||||
@ -59,6 +60,12 @@
|
||||
#include <trace_helpers.h>
|
||||
#include <paths.h>
|
||||
|
||||
#ifdef KICAD_USE_SENTRY
|
||||
#include <boost/uuid/uuid_io.hpp>
|
||||
#include <boost/uuid/uuid_generators.hpp>
|
||||
#include <sentry.h>
|
||||
#include <kicad_build_version.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Current list of languages supported by KiCad.
|
||||
@ -127,6 +134,10 @@ PGM_BASE::~PGM_BASE()
|
||||
|
||||
void PGM_BASE::Destroy()
|
||||
{
|
||||
#ifdef KICAD_USE_SENTRY
|
||||
sentry_close();
|
||||
#endif
|
||||
|
||||
// unlike a normal destructor, this is designed to be called more than once safely:
|
||||
delete m_locale;
|
||||
m_locale = nullptr;
|
||||
@ -204,8 +215,146 @@ const wxString PGM_BASE::AskUserForPreferredEditor( const wxString& aDefaultEdit
|
||||
}
|
||||
|
||||
|
||||
#ifdef KICAD_USE_SENTRY
|
||||
bool PGM_BASE::IsSentryOptedIn()
|
||||
{
|
||||
return m_sentry_optin_fn.Exists();
|
||||
}
|
||||
|
||||
|
||||
void PGM_BASE::SetSentryOptIn( bool aOptIn )
|
||||
{
|
||||
if( aOptIn )
|
||||
{
|
||||
if( !m_sentry_uid_fn.Exists() )
|
||||
{
|
||||
sentryCreateUid();
|
||||
}
|
||||
|
||||
if( !m_sentry_optin_fn.Exists() )
|
||||
{
|
||||
wxFFile sentryInitFile( m_sentry_optin_fn.GetFullPath(), "w" );
|
||||
sentryInitFile.Write( "" );
|
||||
sentryInitFile.Close();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_sentry_optin_fn.Exists() )
|
||||
{
|
||||
wxRemoveFile( m_sentry_optin_fn.GetFullPath() );
|
||||
sentry_close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
wxString PGM_BASE::sentryCreateUid()
|
||||
{
|
||||
boost::uuids::uuid uuid = boost::uuids::random_generator()();
|
||||
wxString userGuid = boost::uuids::to_string( uuid );
|
||||
|
||||
wxFFile sentryInitFile( m_sentry_uid_fn.GetFullPath(), "w" );
|
||||
sentryInitFile.Write( userGuid );
|
||||
sentryInitFile.Close();
|
||||
|
||||
return userGuid;
|
||||
}
|
||||
|
||||
|
||||
void PGM_BASE::ResetSentryId()
|
||||
{
|
||||
sentryCreateUid();
|
||||
}
|
||||
|
||||
|
||||
void PGM_BASE::sentryInit()
|
||||
{
|
||||
m_sentry_optin_fn = wxFileName( PATHS::GetUserCachePath(), "sentry-opt-in" );
|
||||
m_sentry_uid_fn = wxFileName( PATHS::GetUserCachePath(), "sentry-uid" );
|
||||
|
||||
if( IsSentryOptedIn() )
|
||||
{
|
||||
wxString userGuid;
|
||||
|
||||
wxFFile sentryInitFile( m_sentry_uid_fn.GetFullPath() );
|
||||
sentryInitFile.ReadAll( &userGuid );
|
||||
sentryInitFile.Close();
|
||||
|
||||
if( userGuid.IsEmpty() || userGuid.length() != 36 )
|
||||
{
|
||||
userGuid = sentryCreateUid();
|
||||
}
|
||||
|
||||
sentry_options_t* options = sentry_options_new();
|
||||
|
||||
sentry_options_set_dsn(
|
||||
options,
|
||||
"https://463925e689c34632b5172436ffb76de5@sentry-relay.kicad.org/6266565" );
|
||||
|
||||
wxFileName tmp;
|
||||
tmp.AssignDir( PATHS::GetUserCachePath() );
|
||||
tmp.AppendDir( "sentry" );
|
||||
|
||||
sentry_options_set_database_pathw( options, tmp.GetPathWithSep().wc_str() );
|
||||
sentry_options_set_symbolize_stacktraces( options, true );
|
||||
sentry_options_set_auto_session_tracking( options, false );
|
||||
|
||||
#if !KICAD_IS_NIGHTLY
|
||||
sentry_options_set_release( options, KICAD_SEMANTIC_VERSION );
|
||||
#else
|
||||
sentry_options_set_release( options, KICAD_MAJOR_MINOR_VERSION );
|
||||
#endif
|
||||
|
||||
sentry_init( options );
|
||||
|
||||
sentry_value_t user = sentry_value_new_object();
|
||||
sentry_value_set_by_key( user, "id", sentry_value_new_string( userGuid.c_str() ) );
|
||||
sentry_set_user( user );
|
||||
|
||||
sentry_set_tag( "kicad.version", KICAD_VERSION_FULL );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PGM_BASE::sentryPrompt()
|
||||
{
|
||||
if( !m_settings_manager->GetCommonSettings()->m_DoNotShowAgain.data_collection_prompt )
|
||||
{
|
||||
wxMessageDialog optIn = wxMessageDialog(
|
||||
nullptr,
|
||||
_( "KiCad can anonymously report crashes and special event "
|
||||
"data to developers in order to aid identifying critical bugs "
|
||||
"across the user base more effectively and help profile "
|
||||
"functionality to guide improvements. \n"
|
||||
"If you choose to voluntarily participate, KiCad will automatically "
|
||||
"handle sending said reports when crashes or events occur. \n"
|
||||
"Your design files such as schematic or PCB are not shared in this process." ),
|
||||
_( "Data collection opt in request" ), wxYES_NO | wxCENTRE );
|
||||
|
||||
int result = optIn.ShowModal();
|
||||
|
||||
if( result == wxID_YES )
|
||||
{
|
||||
SetSentryOptIn( true );
|
||||
sentryInit();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSentryOptIn( false );
|
||||
}
|
||||
|
||||
m_settings_manager->GetCommonSettings()->m_DoNotShowAgain.data_collection_prompt = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit )
|
||||
{
|
||||
#ifdef KICAD_USE_SENTRY
|
||||
sentryInit();
|
||||
#endif
|
||||
wxString pgm_name;
|
||||
|
||||
/// Should never happen but boost unit_test isn't playing nicely in some cases
|
||||
@ -214,6 +363,10 @@ bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit )
|
||||
else
|
||||
pgm_name = wxFileName( App().argv[0] ).GetName().Lower();
|
||||
|
||||
#ifdef KICAD_USE_SENTRY
|
||||
sentry_set_tag( "kicad.app", pgm_name.c_str() );
|
||||
#endif
|
||||
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
@ -285,6 +438,10 @@ bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit )
|
||||
|
||||
loadCommonSettings();
|
||||
|
||||
#ifdef KICAD_USE_SENTRY
|
||||
sentryPrompt();
|
||||
#endif
|
||||
|
||||
ReadPdfBrowserInfos(); // needs GetCommonSettings()
|
||||
|
||||
// Create the python scripting stuff
|
||||
|
@ -318,6 +318,9 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
|
||||
m_params.emplace_back( new PARAM<bool>( "do_not_show_again.scaled_3d_models_warning",
|
||||
&m_DoNotShowAgain.scaled_3d_models_warning, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "do_not_show_again.data_collection_prompt",
|
||||
&m_DoNotShowAgain.data_collection_prompt, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "session.remember_open_files",
|
||||
&m_Session.remember_open_files, false ) );
|
||||
|
||||
|
54
include/dialogs/panel_data_collection.h
Normal file
54
include/dialogs/panel_data_collection.h
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef PANEL_DATA_COLLECTION_H
|
||||
#define PANEL_DATA_COLLECTION_H
|
||||
|
||||
#include "panel_data_collection_base.h"
|
||||
|
||||
|
||||
class COMMON_SETTINGS;
|
||||
class PAGED_DIALOG;
|
||||
|
||||
|
||||
class PANEL_DATA_COLLECTION : public PANEL_DATA_COLLECTION_BASE
|
||||
{
|
||||
public:
|
||||
PANEL_DATA_COLLECTION( PAGED_DIALOG* aDialog, wxWindow* aParent );
|
||||
|
||||
void ResetPanel() override;
|
||||
|
||||
protected:
|
||||
bool TransferDataFromWindow() override;
|
||||
bool TransferDataToWindow() override;
|
||||
|
||||
virtual void OnResetIdClick( wxCommandEvent& aEvent ) override;
|
||||
|
||||
private:
|
||||
void applySettingsToPanel();
|
||||
|
||||
protected:
|
||||
PAGED_DIALOG* m_dialog;
|
||||
};
|
||||
|
||||
#endif //PANEL_DATA_COLLECTION_H
|
@ -285,6 +285,12 @@ public:
|
||||
*/
|
||||
void SaveCommonSettings();
|
||||
|
||||
#ifdef KICAD_USE_SENTRY
|
||||
bool IsSentryOptedIn();
|
||||
void SetSentryOptIn( bool aOptIn );
|
||||
void ResetSentryId();
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wxWidgets on MSW tends to crash if you spool up more than one print job at a time.
|
||||
*/
|
||||
@ -308,6 +314,12 @@ protected:
|
||||
*/
|
||||
bool setExecutablePath();
|
||||
|
||||
#ifdef KICAD_USE_SENTRY
|
||||
void sentryInit();
|
||||
void sentryPrompt();
|
||||
wxString sentryCreateUid();
|
||||
#endif
|
||||
|
||||
protected:
|
||||
std::unique_ptr<SETTINGS_MANAGER> m_settings_manager;
|
||||
|
||||
@ -323,6 +335,11 @@ protected:
|
||||
wxString m_pdf_browser; /// Filename of the app selected for browsing PDFs
|
||||
|
||||
wxString m_text_editor;
|
||||
|
||||
#ifdef KICAD_USE_SENTRY
|
||||
wxFileName m_sentry_optin_fn;
|
||||
wxFileName m_sentry_uid_fn;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@ -125,6 +125,7 @@ public:
|
||||
bool zone_fill_warning;
|
||||
bool env_var_overwrite_warning;
|
||||
bool scaled_3d_models_warning;
|
||||
bool data_collection_prompt;
|
||||
};
|
||||
|
||||
struct NETCLASS_PANEL
|
||||
|
9
thirdparty/sentry-native/.vscode/extensions.json
vendored
Normal file
9
thirdparty/sentry-native/.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"ms-vscode.cpptools",
|
||||
"ms-vscode.cmake-tools",
|
||||
"twxs.cmake"
|
||||
]
|
||||
}
|
10
thirdparty/sentry-native/.vscode/settings.json
vendored
Normal file
10
thirdparty/sentry-native/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnType": true,
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"files.insertFinalNewline": true,
|
||||
|
||||
// C++ Extension
|
||||
"C_Cpp.autoAddFileAssociations": false
|
||||
}
|
583
thirdparty/sentry-native/CHANGELOG.md
vendored
Normal file
583
thirdparty/sentry-native/CHANGELOG.md
vendored
Normal file
@ -0,0 +1,583 @@
|
||||
# Changelog
|
||||
|
||||
## 0.4.15
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Fix contexts from the scope not being attached to events correctly.
|
||||
- Improve performance of event serialization.
|
||||
|
||||
## 0.4.14
|
||||
|
||||
**Features**:
|
||||
|
||||
- The Sentry SDK now has experimental support for performance monitoring.
|
||||
The performance monitoring API allows manually creating transactions and instrumenting spans, and offers APIs for distributed tracing.
|
||||
The API is currently disabled by default and needs to be enabled via a compile-time `SENTRY_PERFORMANCE_MONITORING` flag.
|
||||
For more information, take a look at the more detailed [documentation of performance monitoring](https://docs.sentry.io/platforms/native/performance/).
|
||||
- Sentry now has an explicit `sentry_flush` method that blocks the calling thread for the given time, waiting for the transport queue to be flushed. Custom transports need to implement a new `flush_hook` for this to work.
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Fix Sentry API deadlocking when the SDK was not initialized (or `sentry_init` failed).
|
||||
- The rate limit handling of the default transports was updated to match the expected behavior.
|
||||
- The Windows OS version is now read from the Registry and is more accurate.
|
||||
- The `SENTRY_LIBRARY_TYPE` CMake option is now correctly honored.
|
||||
- The Linux Modulefinder was once again improved to increase its memory safety and reliability.
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@Mixaill](https://github.com/Mixaill)
|
||||
|
||||
## 0.4.13
|
||||
|
||||
**Features**:
|
||||
|
||||
- Add client-side stackwalking on Linux, Windows, and macOS (disabled by default).
|
||||
- CMake: add ability to set solution folder name.
|
||||
- Add AIX support.
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- CMake: check whether libcurl was already found.
|
||||
- Increment CXX standard version to 14 to allow crashpad to build.
|
||||
|
||||
**Internal**:
|
||||
|
||||
- Update Crashpad and Breakpad submodules to 2021-12-03.
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@Mixaill](https://github.com/Mixaill)
|
||||
- [@ladislavmacoun](https://github.com/ladislavmacoun)
|
||||
- [@NattyNarwhal](https://github.com/NattyNarwhal)
|
||||
- [@mjvankampen](https://github.com/mjvankampen)
|
||||
|
||||
## 0.4.12
|
||||
|
||||
**Features**:
|
||||
|
||||
- Make the shutdown timeout configurable via `sentry_options_set_shutdown_timeout`.
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- The crashpad backend compiles with mingw again.
|
||||
- Build System improvements.
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@irov](https://github.com/irov)
|
||||
- [@past-due](https://github.com/past-due)
|
||||
- [@andrei-mu](https://github.com/andrei-mu)
|
||||
- [@rpadaki](https://github.com/rpadaki)
|
||||
|
||||
## 0.4.11
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- The crashpad backend now respects the `max_breadcrumbs` setting.
|
||||
- Hanging HTTP requests will now be canceled on shutdown in the WinHTTP transport.
|
||||
- The Modulefinder and Android unwinder now use safer memory access.
|
||||
- Possible races and deadlocks have been fixed in `init`/`close`, and in API related to sessions.
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@smibe](https://github.com/smibe)
|
||||
|
||||
## 0.4.10
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Fix a potential deadlock in macOS modulefinder.
|
||||
- Lower Stack usage, to lower change of stack overflows.
|
||||
- Avoid a double-free when parsing an invalid DSN.
|
||||
- Improvements to Unity Builds and 32-bit Builds.
|
||||
- Fix infinite recursion in signal handler by correctly cleaning up on shutdown.
|
||||
|
||||
**Internal**:
|
||||
|
||||
- Update Crashpad and Breakpad submodules to 2021-06-14.
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@janisozaur](https://github.com/janisozaur)
|
||||
- [@bschatt](https://github.com/bschatt)
|
||||
- [@GenuineAster](https://github.com/GenuineAster)
|
||||
|
||||
## 0.4.9
|
||||
|
||||
**Features**:
|
||||
|
||||
- Rewrote the Linux modulefinder which should now work correctly when encountering gaps in the memory mapping of loaded libraries, and supports libraries loaded from a file offset, such as libraries loaded directly from `.apk` files on Android.
|
||||
- Invoke the `before_send` hook at time of a hard crash when using the Windows or Linux Crashpad backend.
|
||||
- Added the following new convenience functions:
|
||||
- `sentry_value_new_exception`
|
||||
- `sentry_value_new_thread`
|
||||
- `sentry_value_new_stacktrace`
|
||||
- `sentry_event_add_exception`
|
||||
- `sentry_event_add_thread`
|
||||
- The `sentry_event_value_add_stacktrace` is deprecated.
|
||||
- Renamed `sentry_shutdown` to `sentry_close`, though the old function is still available.
|
||||
- Updated Qt integration to Qt 6.
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Optimized and fixed bugs in the JSON parser/serializer.
|
||||
- Build fixes for PPC and universal macOS.
|
||||
- Fixes to build using musl libc.
|
||||
- Correctness fixes around printf and strftime usage.
|
||||
- Allow building and running on older macOS versions.
|
||||
|
||||
**Internal**:
|
||||
|
||||
- Update Crashpad and Breakpad submodules to 2021-04-12
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@mastertheknife](https://github.com/mastertheknife)
|
||||
- [@torarnv](https://github.com/torarnv)
|
||||
- [@encounter](https://github.com/encounter)
|
||||
|
||||
## 0.4.8
|
||||
|
||||
**Features**:
|
||||
|
||||
- The unwinder on Android was updated to a newer version.
|
||||
- Experimental support for the Breakpad backend on Android and iOS.
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Fixed some memory leaks on Windows.
|
||||
- Build System improvements.
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@Mixaill](https://github.com/Mixaill)
|
||||
- [@daxpedda](https://github.com/daxpedda)
|
||||
- [@Amphaal](https://github.com/Amphaal)
|
||||
|
||||
## 0.4.7
|
||||
|
||||
**Features**:
|
||||
|
||||
- Events will automatically get an `os` context with OS version information.
|
||||
- Added a new `max_breadcrumbs` option.
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Fixed some memory leaks related to bounded breadcrumbs.
|
||||
|
||||
## 0.4.6
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Restore compatibility with CMake 3.10 (as used in Android NDK Tools)
|
||||
|
||||
**Internal**:
|
||||
|
||||
- Update Crashpad and Breakpad submodules to 2021-01-25
|
||||
|
||||
## 0.4.5
|
||||
|
||||
**Features**:
|
||||
|
||||
- The Breakpad backend is now supported on macOS, although the crashpad backend is recommended on that platform.
|
||||
- Added a new `sentry_reinstall_backend` function which can be used in case a third-party library is overriding the signal/exception handler.
|
||||
- Add a Qt integration that hooks into Qt logging (opt-in CMake option).
|
||||
- Expose the sentry-native version via CMake.
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Install `.pdb` files correctly.
|
||||
- Improve macOS runtime version detection.
|
||||
- Fixed a potential segfault when doing concurrent scope modification.
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@Mixaill](https://github.com/Mixaill)
|
||||
- [@eakoli](https://github.com/eakoli)
|
||||
- [@GenuineAster](https://github.com/GenuineAster)
|
||||
- [@daxpedda](https://github.com/daxpedda)
|
||||
- [@torarnv](https://github.com/torarnv)
|
||||
|
||||
## 0.4.4
|
||||
|
||||
**Features**:
|
||||
|
||||
- The `sentry_get_modules_list` function was made public, which will return a list of loaded libraries that will be sent to sentry with each event.
|
||||
- A new `sentry_options_set_transport_thread_name` function was added to set an explicit name for sentries http transport thread.
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- The session duration is now printed in a locale-independent way, avoiding invalid session payloads.
|
||||
- Correctly clean up locks and pass the Windows Application Verifier.
|
||||
- Build fixes for MinGW and better documentation for universal MacOS builds.
|
||||
- Crashes captured by the `crashpad` backend _after_ calling `sentry_shutdown` will now have the full metadata.
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@Mixaill](https://github.com/Mixaill)
|
||||
|
||||
## 0.4.3
|
||||
|
||||
**Caution**:
|
||||
|
||||
- The representation of `sentry_value_t` was changed to avoid problems with the newly introduced Memory Tagging Extension (MTE) on ARM / Android.
|
||||
Implementation details of `sentry_value_t` were never considered public, and it should always be treated as an opaque type.
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Fix corrupted breadcrumb data when using the crashpad backend on Windows.
|
||||
- Avoid sending empty envelopes when using the crashpad backend.
|
||||
- Correctly encode the signal number when using the Windows inproc backend, avoiding a processing Error.
|
||||
- Unwind from the local call-stack, fixing empty stacktraces when using the inproc backend on Linux.
|
||||
- Improvements to the Build configuration.
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@4diekmann](https://github.com/4diekmann)
|
||||
- [@variar](https://github.com/variar)
|
||||
- [@Mixaill](https://github.com/Mixaill)
|
||||
|
||||
## 0.4.2
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Sampled (discarded) events still contribute to a sessions `errors` count.
|
||||
- Initialize all static data structures.
|
||||
|
||||
## 0.4.1
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Fix parsing rate limit headers with multiple categories.
|
||||
|
||||
## 0.4.0
|
||||
|
||||
**Breaking Changes**:
|
||||
|
||||
- The minimum CMake version required to build on windows was raised to `3.16.4` to avoid potential build failures on older versions.
|
||||
- The `sentry_get_options` function was removed, as it was unsafe to use after a `sentry_shutdown` call.
|
||||
- The `sentry_options_set_logger` function now accepts a `userdata` parameter.
|
||||
- The `name` parameter of `sentry_options_add_attachment(w)` was removed, it will now be inferred from the filename of `path`.
|
||||
- The transport startup hook that is set via `sentry_transport_set_startup_func` now needs to return an `int`, and a failure will propagate to `sentry_init`.
|
||||
- The return value of the transport shutdown hook set via `sentry_transport_set_shutdown_func` was also changed to return an `int`.
|
||||
- Both functions should return _0_ on success, and a non-zero error code on failure, as does `sentry_init`.
|
||||
- Similarly, the return value of `sentry_shutdown` was also changed to an `int`, and will return _0_ on success and a non-zero error code on unclean shutdown.
|
||||
- Documentation for custom transports was updated to highlight the ordering requirements of submitted envelopes, which is important for release health.
|
||||
|
||||
```c
|
||||
// before
|
||||
sentry_options_set_logger(options, my_custom_logger);
|
||||
sentry_options_add_attachment(options, "some-attachment", "/path/to/some-attachment.txt");
|
||||
|
||||
void transport_startup(sentry_options_t *options, void*state) {
|
||||
}
|
||||
sentry_transport_set_startup_func(transport, transport_startup);
|
||||
bool transport_shutdown(uint64_t timeout, void*state) {
|
||||
return true;
|
||||
}
|
||||
sentry_transport_set_shutdown_func(transport, transport_shutdown);
|
||||
|
||||
// after
|
||||
sentry_options_set_logger(options, my_custom_logger, NULL);
|
||||
sentry_options_add_attachment(options, "/path/to/some-attachment.txt");
|
||||
|
||||
int transport_startup(sentry_options_t *options, void*state) {
|
||||
return 0;
|
||||
}
|
||||
sentry_transport_set_startup_func(transport, transport_startup);
|
||||
int transport_shutdown(uint64_t timeout, void*state) {
|
||||
return 0;
|
||||
}
|
||||
sentry_transport_set_shutdown_func(transport, transport_shutdown);
|
||||
```
|
||||
|
||||
**Features**:
|
||||
|
||||
- [Release Health](https://docs.sentry.io/workflow/releases/health/) support is now stable and enabled by default. After the update, you will see the number of crash free sessions and crash free users on the Releases page in Sentry. To disable automatic session tracking, use `sentry_options_set_auto_session_tracking`.
|
||||
- Breakpad support for Windows. This allows you to use `sentry-native` even on Windows XP! ([#278](https://github.com/getsentry/sentry-native/pull/278))
|
||||
- Add an in-process backend for Windows. As opposed to Breakpad, stack traces are generated on the device and sent to Sentry for symbolication. ([#287](https://github.com/getsentry/sentry-native/pull/287))
|
||||
- Support for the Crashpad backend was fixed and enabled for Linux. ([#320](https://github.com/getsentry/sentry-native/pull/320))
|
||||
- A new `SENTRY_BREAKPAD_SYSTEM` CMake option was added to link to the system-installed breakpad client instead of building it as part of sentry.
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Reworked thread synchronization code and logic in `sentry_shutdown`, avoiding an abort in case of an unclean shutdown. ([#323](https://github.com/getsentry/sentry-native/pull/323))
|
||||
- Similarly, reworked global options handling, avoiding thread safety issues. ([#333](https://github.com/getsentry/sentry-native/pull/333))
|
||||
- Fixed errors not being properly recorded in sessions. ([#317](https://github.com/getsentry/sentry-native/pull/317))
|
||||
- Fixed some potential memory leaks and other issues. ([#304](https://github.com/getsentry/sentry-native/pull/304) and others)
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@eakoli](https://github.com/eakoli)
|
||||
- [@Mixaill](https://github.com/Mixaill)
|
||||
- [@irov](https://github.com/irov)
|
||||
- [@jblazquez](https://github.com/jblazquez)
|
||||
- [@daxpedda](https://github.com/daxpedda)
|
||||
|
||||
## 0.3.4
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Invalid memory access when `sentry_options_set_debug(1)` is set, leading to an application crash. This bug was introduced in version `0.3.3`. ([#310](https://github.com/getsentry/sentry-native/pull/310)).
|
||||
|
||||
## 0.3.3
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Fix a memory unsafety issue when calling `sentry_value_remove_by_key`. ([#297](https://github.com/getsentry/sentry-native/pull/297))
|
||||
- Improvements to internal logging. ([#301](https://github.com/getsentry/sentry-native/pull/301), [#302](https://github.com/getsentry/sentry-native/pull/302))
|
||||
- Better handling of timeouts. ([#284](https://github.com/getsentry/sentry-native/pull/284))
|
||||
- Better 32-bit build support. ([#291](https://github.com/getsentry/sentry-native/pull/291))
|
||||
- Run more checks on CI. ([#299](https://github.com/getsentry/sentry-native/pull/299))
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Fixes in this release have been contributed by:
|
||||
|
||||
- [@eakoli](https://github.com/eakoli)
|
||||
|
||||
## 0.3.2
|
||||
|
||||
**Features**:
|
||||
|
||||
- Implement a new logger hook. ([#267](https://github.com/getsentry/sentry-native/pull/267))
|
||||
|
||||
This adds the new `sentry_options_set_logger` function, which can be used to customize the sentry-internal logging, for example to integrate into an app’s own logging system, or to stream logs to a file.
|
||||
|
||||
- New CMake options: `SENTRY_LINK_PTHREAD`, `SENTRY_BUILD_RUNTIMESTATIC` and `SENTRY_EXPORT_SYMBOLS` along with other CMake improvements.
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Avoid memory unsafety when loading session from disk. ([#270](https://github.com/getsentry/sentry-native/pull/270))
|
||||
- Avoid Errors in Crashpad Backend without prior scope changes. ([#272](https://github.com/getsentry/sentry-native/pull/272))
|
||||
- Fix absolute paths on Windows, and allow using forward-slashes as directory separators. ([#266](https://github.com/getsentry/sentry-native/pull/266), [#289](https://github.com/getsentry/sentry-native/pull/289))
|
||||
- Various fixes uncovered by static analysis tools, notably excessive allocations by the page-allocator used inside signal handlers.
|
||||
- Build fixes for MinGW and other compilers.
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@Mixaill](https://github.com/Mixaill)
|
||||
- [@blinkov](https://github.com/blinkov)
|
||||
- [@eakoli](https://github.com/eakoli)
|
||||
|
||||
## 0.3.1
|
||||
|
||||
- Add support for on-device symbolication, which is enabled by default on
|
||||
Android. Use `sentry_options_set_symbolize_stacktraces` to customize.
|
||||
- Enable gzip compressed crashpad minidumps on windows.
|
||||
- Correctly 0-pad short `build-id`s.
|
||||
- Fix build for 32bit Apple targets.
|
||||
|
||||
## 0.3.0
|
||||
|
||||
- Always send the newer `x-sentry-envelope` format, which makes this
|
||||
incompatible with older on-premise installations.
|
||||
- Better document and handle non-ASCII paths. Users on windows should use the
|
||||
`w` version of the appropriate APIs.
|
||||
- Avoid segfaults due to failed sentry initialization.
|
||||
- Avoid creating invalid sessions without a `release`.
|
||||
- Make `sentry_transport_t` opaque, and instead expose APIs to configure it.
|
||||
More functionality related to creating custom transports will be exposed in
|
||||
future versions.
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- The `sentry_backend_free` function was removed.
|
||||
- The `sentry_backend_t` type was removed.
|
||||
- The `sentry_transport_t` type is now opaque. Use the following new API to
|
||||
create a custom transport.
|
||||
|
||||
### New API
|
||||
|
||||
- `sentry_transport_new`
|
||||
- `sentry_transport_set_state`
|
||||
- `sentry_transport_set_free_func`
|
||||
- `sentry_transport_set_startup_func`
|
||||
- `sentry_transport_set_shutdown_func`
|
||||
|
||||
See `sentry.h` for more documentation.
|
||||
|
||||
### Deprecations
|
||||
|
||||
- `sentry_new_function_transport` has been deprecated in favor of the new
|
||||
transport builder functions.
|
||||
|
||||
## 0.2.6
|
||||
|
||||
- Avoid crash with invalid crashpad handler path.
|
||||
|
||||
## 0.2.5
|
||||
|
||||
- Send sessions to the correct sentry endpoint and make sure they work.
|
||||
- Smaller cleanups.
|
||||
|
||||
## 0.2.4
|
||||
|
||||
- Avoid unsafe reads in the linux module finder.
|
||||
- Update to latest crashpad snapshot.
|
||||
- Yet more CMake improvements (thanks @madebr and @Amphaal).
|
||||
|
||||
## 0.2.3
|
||||
|
||||
### Important upgrade notice
|
||||
|
||||
All `0.2.x` versions prior to this one were affected by a bug that could
|
||||
potentially lead to serious data-loss on Windows platforms. We encourage
|
||||
everyone to update as quickly as possible.
|
||||
See [#220](https://github.com/getsentry/sentry-native/issues/220) for details.
|
||||
|
||||
### Deprecations
|
||||
|
||||
- `sentry_transport_t` will be replaced by an opaque struct with setter methods
|
||||
in a future release.
|
||||
- `sentry_backend_free` and `sentry_backend_t` are deprecated and will be
|
||||
removed in a future release.
|
||||
|
||||
### Other changes
|
||||
|
||||
- Further improvements to the cmake build system (huge thanks to @madebr
|
||||
[#207](https://github.com/getsentry/sentry-native/pull/207))
|
||||
- Improved support for older Windows versions, as low as Windows XP SP3 (thanks
|
||||
to @Mixaill [#203](https://github.com/getsentry/sentry-native/pull/203),
|
||||
@cammm [#202](https://github.com/getsentry/sentry-native/pull/202) and
|
||||
@jblazquez [#212](https://github.com/getsentry/sentry-native/pull/212))
|
||||
- Improved documentation
|
||||
- Cleaned up sentry database handling
|
||||
- Added new `sentry_handle_exception` function to explicitly capture a crash
|
||||
(thanks @cammm [#201](https://github.com/getsentry/sentry-native/pull/201))
|
||||
- Added new `sentry_clear_modulecache` function to clear the list of loaded
|
||||
modules. Use this function when dynamically loading libraries at runtime.
|
||||
|
||||
## 0.2.2
|
||||
|
||||
- Implement experimental Session handling
|
||||
- Implement more fine grained Rate Limiting for HTTP requests
|
||||
- Implement `sample_rate` option
|
||||
- In-process and Breakpad backend will not lose events queued for HTTP
|
||||
submission on crash
|
||||
- `sentry_shutdown` will better clean up after itself
|
||||
- Add Experimental MinGW build support (thanks @Amphaal
|
||||
[#189](https://github.com/getsentry/sentry-native/pull/189))
|
||||
- Various other fixes and improvements
|
||||
|
||||
## 0.2.1
|
||||
|
||||
- Added Breakpad support on Linux
|
||||
- Implemented fallback `debug-id` on Linux and Android for modules that are
|
||||
built without a `build-id`
|
||||
- Fixes issues and added CI for more platforms/compilers, including 32-bit Linux
|
||||
and 32-bit VS2017
|
||||
- Further improvements to the CMake configuration (thanks @madebr
|
||||
[#168](https://github.com/getsentry/sentry-native/pull/168))
|
||||
- Added a new `SENTRY_TRANSPORT` CMake option to customize the default HTTP transport
|
||||
|
||||
## 0.2.0
|
||||
|
||||
- Complete rewrite in C
|
||||
- Build system was switched to CMake
|
||||
- Add attachment support
|
||||
- Better support for custom transports
|
||||
- The crashpad backend will automatically look for a `crashpad_handler`
|
||||
executable next to the running program if no `handler_path` is set.
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- The `sentry_uuid_t` struct is now always a `char bytes[16]` instead of a
|
||||
platform specific type.
|
||||
- `sentry_remove_context`: The second parameter was removed.
|
||||
- `sentry_options_set_transport`:
|
||||
This function now takes a pointer to the new `sentry_transport_t` type.
|
||||
Migrating from the old API can be done by wrapping with
|
||||
`sentry_new_function_transport`, like this:
|
||||
```c
|
||||
sentry_options_set_transport(
|
||||
options, sentry_new_function_transport(send_envelope_func, &closure_data));
|
||||
```
|
||||
|
||||
### Other API Additions
|
||||
|
||||
- `size_t sentry_value_refcount(sentry_value_t value)`
|
||||
- `void sentry_envelope_free(sentry_envelope_t *envelope)`
|
||||
- `void sentry_backend_free(sentry_backend_t *backend)`
|
||||
|
||||
## 0.1.4
|
||||
|
||||
- Add an option to enable the system crash reporter
|
||||
- Fix compilation warnings
|
||||
|
||||
## 0.1.3
|
||||
|
||||
- Stack unwinding on Android
|
||||
- Fix UUID generation on Android
|
||||
- Fix concurrently captured events leaking data in some cases
|
||||
- Fix crashes when the database path contains both slashes and backslashes
|
||||
- More robust error handling when creating the database folder
|
||||
- Fix wrong initialization of CA info for the curl backend
|
||||
- Disable the system crash handler on macOS for faster crashes
|
||||
|
||||
## 0.1.2
|
||||
|
||||
- Fix SafeSEH builds on Win32
|
||||
- Fix a potential error when shutting down after unloading libsentry on macOS
|
||||
|
||||
## 0.1.1
|
||||
|
||||
- Update Crashpad
|
||||
- Fix compilation on Windows with VS 2019
|
||||
- Fix a bug in the JSON serializer causing invalid escapes
|
||||
- Fix a bug in the Crashpad backend causing invalid events
|
||||
- Reduce data event data sent along with minidumps
|
||||
- Experimental support for Android NDK
|
||||
|
||||
## 0.1.0
|
||||
|
||||
- Support for capturing messages
|
||||
- Add an API to capture arbitrary contexts (`sentry_set_context`)
|
||||
- Fix scope information being lost in some cases
|
||||
- Experimental on-device unwinding support
|
||||
- Experimental on-device symbolication support
|
||||
|
||||
## 0.0.4
|
||||
|
||||
- Breakpad builds on all platforms
|
||||
- Add builds for Windows (x86)
|
||||
- Add builds for Linux
|
||||
|
||||
## 0.0.3
|
||||
|
||||
- Fix debug information generation on macOS
|
||||
|
||||
## 0.0.2
|
||||
|
||||
- Crashpad builds on macOS
|
||||
- Crashpad builds on Windows (x64)
|
||||
|
||||
## 0.0.1
|
||||
|
||||
Initial Release
|
578
thirdparty/sentry-native/CMakeLists.txt
vendored
Normal file
578
thirdparty/sentry-native/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,578 @@
|
||||
if(WIN32)
|
||||
cmake_minimum_required (VERSION 3.16.4)
|
||||
|
||||
# enables support for CMAKE_MSVC_RUNTIME_LIBRARY
|
||||
cmake_policy(SET CMP0091 NEW)
|
||||
else()
|
||||
# The Android tools ship with this ancient version, which we need to support.
|
||||
cmake_minimum_required (VERSION 3.10)
|
||||
endif()
|
||||
|
||||
#read sentry-native version
|
||||
file(READ "include/sentry.h" _SENTRY_HEADER_CONTENT)
|
||||
string(REGEX MATCH "#define SENTRY_SDK_VERSION \"([0-9\.]+)\"" _SENTRY_VERSION_MATCH "${_SENTRY_HEADER_CONTENT}")
|
||||
set(SENTRY_VERSION "${CMAKE_MATCH_1}")
|
||||
unset(_SENTRY_HEADER_CONTENT)
|
||||
unset(_SENTRY_VERSION_MATCH)
|
||||
|
||||
project(Sentry-Native
|
||||
LANGUAGES C CXX ASM
|
||||
VERSION ${SENTRY_VERSION}
|
||||
)
|
||||
|
||||
set(SENTRY_MAIN_PROJECT OFF)
|
||||
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
set(SENTRY_MAIN_PROJECT ON)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_C_STANDARD)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/sentry")
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(LINUX TRUE)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CMAKE_SYSTEM_NAME STREQUAL "OS400")
|
||||
set(AIX TRUE)
|
||||
endif()
|
||||
|
||||
#setup sentry library type
|
||||
if(SENTRY_MAIN_PROJECT AND NOT DEFINED BUILD_SHARED_LIBS)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
option(SENTRY_BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" ${BUILD_SHARED_LIBS})
|
||||
if(SENTRY_BUILD_SHARED_LIBS)
|
||||
set(SENTRY_LIBRARY_TYPE SHARED)
|
||||
else()
|
||||
set(SENTRY_LIBRARY_TYPE STATIC)
|
||||
endif()
|
||||
|
||||
option(SENTRY_PIC "Build sentry (and dependent) libraries as position independent libraries" ON)
|
||||
|
||||
option(SENTRY_BUILD_TESTS "Build sentry-native tests" "${SENTRY_MAIN_PROJECT}")
|
||||
option(SENTRY_BUILD_EXAMPLES "Build sentry-native example(s)" "${SENTRY_MAIN_PROJECT}")
|
||||
|
||||
option(SENTRY_LINK_PTHREAD "Link platform threads library" ON)
|
||||
if(SENTRY_LINK_PTHREAD)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
option(SENTRY_BUILD_RUNTIMESTATIC "Build sentry-native with static runtime" OFF)
|
||||
endif()
|
||||
|
||||
if(LINUX)
|
||||
option(SENTRY_BUILD_FORCE32 "Force a 32bit compile on a 64bit host" OFF)
|
||||
if(SENTRY_BUILD_FORCE32)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
|
||||
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -m32 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
|
||||
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# CMAKE_POSITION_INDEPENDENT_CODE must be set BEFORE adding any libraries (including subprojects)
|
||||
if(SENTRY_PIC)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
else()
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE OFF)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(SENTRY_DEFAULT_TRANSPORT "winhttp")
|
||||
elseif((APPLE AND NOT IOS) OR LINUX OR AIX)
|
||||
set(SENTRY_DEFAULT_TRANSPORT "curl")
|
||||
else()
|
||||
set(SENTRY_DEFAULT_TRANSPORT "none")
|
||||
endif()
|
||||
|
||||
set(SENTRY_TRANSPORT ${SENTRY_DEFAULT_TRANSPORT} CACHE STRING
|
||||
"The HTTP transport that sentry uses to submit events to the sentry server, can be either 'none', 'curl' or 'winhttp' on windows.")
|
||||
|
||||
if(SENTRY_TRANSPORT STREQUAL "winhttp")
|
||||
set(SENTRY_TRANSPORT_WINHTTP TRUE)
|
||||
elseif(SENTRY_TRANSPORT STREQUAL "curl")
|
||||
set(SENTRY_TRANSPORT_CURL TRUE)
|
||||
elseif(SENTRY_TRANSPORT STREQUAL "none")
|
||||
set(SENTRY_TRANSPORT_NONE TRUE)
|
||||
else()
|
||||
message(FATAL_ERROR "SENTRY_TRANSPORT must be one of 'none', 'curl' or 'winhttp'")
|
||||
endif()
|
||||
|
||||
if(SENTRY_TRANSPORT_WINHTTP AND NOT WIN32)
|
||||
message(FATAL_ERROR "The winhttp transport is only supported on Windows.")
|
||||
endif()
|
||||
|
||||
if(SENTRY_BUILD_TESTS OR SENTRY_BUILD_EXAMPLES)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
if("${CMAKE_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
|
||||
set(SENTRY_MAIN_PROJECT ON)
|
||||
endif()
|
||||
|
||||
option(SENTRY_ENABLE_INSTALL "Enable sentry installation" "${SENTRY_MAIN_PROJECT}")
|
||||
|
||||
if(MSVC AND CMAKE_GENERATOR_TOOLSET MATCHES "_xp$")
|
||||
message(WARNING "Crashpad is not supported for MSVC with XP toolset. Default backend was switched to 'breakpad'")
|
||||
set(SENTRY_DEFAULT_BACKEND "breakpad")
|
||||
elseif((APPLE AND NOT IOS) OR WIN32)
|
||||
set(SENTRY_DEFAULT_BACKEND "crashpad")
|
||||
elseif(LINUX)
|
||||
set(SENTRY_DEFAULT_BACKEND "breakpad")
|
||||
else()
|
||||
set(SENTRY_DEFAULT_BACKEND "inproc")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED SENTRY_BACKEND)
|
||||
set(SENTRY_BACKEND ${SENTRY_DEFAULT_BACKEND} CACHE STRING
|
||||
"The sentry backend responsible for reporting crashes, can be either 'none', 'inproc', 'breakpad' or 'crashpad'.")
|
||||
endif()
|
||||
|
||||
if(SENTRY_BACKEND STREQUAL "crashpad")
|
||||
set(SENTRY_BACKEND_CRASHPAD TRUE)
|
||||
elseif(SENTRY_BACKEND STREQUAL "inproc")
|
||||
set(SENTRY_BACKEND_INPROC TRUE)
|
||||
elseif(SENTRY_BACKEND STREQUAL "breakpad")
|
||||
set(SENTRY_BACKEND_BREAKPAD TRUE)
|
||||
elseif(SENTRY_BACKEND STREQUAL "none")
|
||||
set(SENTRY_BACKEND_NONE TRUE)
|
||||
else()
|
||||
message(FATAL_ERROR "SENTRY_BACKEND must be one of 'crashpad', 'inproc', 'breakpad' or 'none'")
|
||||
endif()
|
||||
|
||||
if(SENTRY_BACKEND_CRASHPAD AND ANDROID)
|
||||
message(FATAL_ERROR "The Crashpad backend is not currently supported on Android")
|
||||
endif()
|
||||
|
||||
message(STATUS "SENTRY_TRANSPORT=${SENTRY_TRANSPORT}")
|
||||
message(STATUS "SENTRY_BACKEND=${SENTRY_BACKEND}")
|
||||
message(STATUS "SENTRY_LIBRARY_TYPE=${SENTRY_LIBRARY_TYPE}")
|
||||
|
||||
if(ANDROID)
|
||||
set(SENTRY_WITH_LIBUNWINDSTACK TRUE)
|
||||
elseif(NOT WIN32)
|
||||
set(SENTRY_WITH_LIBBACKTRACE TRUE)
|
||||
endif()
|
||||
|
||||
option(WITH_ASAN_OPTION "Build sentry-native with address sanitizer" OFF)
|
||||
if(WITH_ASAN_OPTION)
|
||||
add_compile_options(-g -fsanitize=address -fno-omit-frame-pointer)
|
||||
link_libraries(-fsanitize=address)
|
||||
endif()
|
||||
|
||||
option(WITH_TSAN_OPTION "Build sentry-native with thread sanitizer" OFF)
|
||||
if(WITH_TSAN_OPTION)
|
||||
add_compile_options(-g -fsanitize=thread -fno-omit-frame-pointer)
|
||||
link_libraries(-fsanitize=thread)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
# use -O3 when doing `RelWithDebInfo` builds
|
||||
if(NOT MSVC)
|
||||
foreach(lang ASM C CXX)
|
||||
string(REPLACE "-O2" "-O3" CMAKE_${lang}_FLAGS_RELWITHDEBINFO "${CMAKE_${lang}_FLAGS_RELWITHDEBINFO}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# https://gitlab.kitware.com/cmake/cmake/issues/20256
|
||||
if(APPLE)
|
||||
find_program(DSYMUTIL_PROGRAM dsymutil)
|
||||
if(DSYMUTIL_PROGRAM)
|
||||
foreach(lang C CXX)
|
||||
foreach(var LINK_EXECUTABLE CREATE_SHARED_LIBRARY)
|
||||
set(CMAKE_${lang}_${var} "${CMAKE_${lang}_${var}}" "${DSYMUTIL_PROGRAM} <TARGET>")
|
||||
endforeach()
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
function(sentry_install)
|
||||
if(SENTRY_ENABLE_INSTALL)
|
||||
install(${ARGN})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# helper function to add sources to existing TARGET prepended with ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}
|
||||
function(sentry_target_sources_cwd TARGET)
|
||||
cmake_parse_arguments(STSC "" "SUBDIR" "" ${ARGN})
|
||||
foreach(src ${STSC_UNPARSED_ARGUMENTS})
|
||||
if(IS_ABSOLUTE "${src}")
|
||||
target_sources(${TARGET} PRIVATE ${src})
|
||||
else()
|
||||
target_sources(${TARGET} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/${STSC_SUBDIR}/${src}")
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# ===== sentry library =====
|
||||
|
||||
add_library(sentry ${SENTRY_LIBRARY_TYPE} "${PROJECT_SOURCE_DIR}/vendor/mpack.c")
|
||||
target_sources(sentry PRIVATE "${PROJECT_SOURCE_DIR}/include/sentry.h")
|
||||
add_library(sentry::sentry ALIAS sentry)
|
||||
add_subdirectory(src)
|
||||
|
||||
# we do not need this on android, only linux
|
||||
if(LINUX)
|
||||
target_sources(sentry PRIVATE
|
||||
"${PROJECT_SOURCE_DIR}/vendor/stb_sprintf.c"
|
||||
"${PROJECT_SOURCE_DIR}/vendor/stb_sprintf.h"
|
||||
)
|
||||
endif()
|
||||
|
||||
set_target_properties(sentry PROPERTIES PUBLIC_HEADER "include/sentry.h")
|
||||
|
||||
if(DEFINED SENTRY_FOLDER)
|
||||
set_target_properties(sentry PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
endif()
|
||||
|
||||
# check size type
|
||||
include(CheckTypeSize)
|
||||
check_type_size("long" CMAKE_SIZEOF_LONG)
|
||||
|
||||
# https://gitlab.kitware.com/cmake/cmake/issues/18393
|
||||
if(SENTRY_BUILD_SHARED_LIBS)
|
||||
if(APPLE)
|
||||
sentry_install(FILES "$<TARGET_FILE:sentry>.dSYM" DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
||||
elseif(MSVC)
|
||||
sentry_install(FILES "$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:$<TARGET_PDB_FILE:sentry>>"
|
||||
DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SENTRY_BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(sentry PRIVATE SENTRY_BUILD_SHARED)
|
||||
else()
|
||||
target_compile_definitions(sentry PUBLIC SENTRY_BUILD_STATIC)
|
||||
endif()
|
||||
target_compile_definitions(sentry PRIVATE SIZEOF_LONG=${CMAKE_SIZEOF_LONG})
|
||||
|
||||
# AIX needs libm for isnan used in test suite
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CMAKE_SYSTEM_NAME STREQUAL "OS400")
|
||||
target_link_libraries(sentry PRIVATE m)
|
||||
endif()
|
||||
# On IBM i PASE, flock is in libutil. Here because "sentry" exists now.
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "OS400")
|
||||
target_link_libraries(sentry PRIVATE util)
|
||||
endif()
|
||||
|
||||
if(SENTRY_TRANSPORT_CURL)
|
||||
if(NOT CURL_FOUND) # Some other lib might bring libcurl already
|
||||
find_package(CURL REQUIRED)
|
||||
endif()
|
||||
|
||||
if(TARGET CURL::libcurl) # Only available in cmake 3.12+
|
||||
target_link_libraries(sentry PRIVATE CURL::libcurl)
|
||||
else()
|
||||
# Needed for cmake < 3.12 support (cmake 3.12 introduced the target CURL::libcurl)
|
||||
target_include_directories(sentry PRIVATE ${CURL_INCLUDE_DIR})
|
||||
# The exported sentry target must not contain any path of the build machine, therefore use generator expressions
|
||||
string(REPLACE ";" "$<SEMICOLON>" GENEX_CURL_LIBRARIES "${CURL_LIBRARIES}")
|
||||
string(REPLACE ";" "$<SEMICOLON>" GENEX_CURL_COMPILE_DEFINITIONS "${CURL_COMPILE_DEFINITIONS}")
|
||||
target_link_libraries(sentry PRIVATE $<BUILD_INTERFACE:${GENEX_CURL_LIBRARIES}>)
|
||||
target_compile_definitions(sentry PRIVATE $<BUILD_INTERFACE:${GENEX_CURL_COMPILE_DEFINITIONS}>)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET sentry PROPERTY C_VISIBILITY_PRESET hidden)
|
||||
if(MSVC)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set(CMAKE_ASM_MASM_FLAGS "${CMAKE_ASM_MASM_FLAGS} /safeseh")
|
||||
endif()
|
||||
|
||||
# using `/Wall` is not feasible, as it spews tons of warnings from windows headers
|
||||
# supress C5105, introduced in VS 16.8, which breaks on the Windows SDKs own `winbase.h` header
|
||||
target_compile_options(sentry PRIVATE $<BUILD_INTERFACE:/W4 /wd5105>)
|
||||
# ignore all warnings for mpack
|
||||
set_source_files_properties(
|
||||
"${PROJECT_SOURCE_DIR}/vendor/mpack.c"
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS
|
||||
"/W0"
|
||||
)
|
||||
|
||||
# set static runtime if enabled
|
||||
if(SENTRY_BUILD_RUNTIMESTATIC)
|
||||
set_property(TARGET sentry PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
else()
|
||||
target_compile_options(sentry PRIVATE $<BUILD_INTERFACE:-Wall -Wextra -Wpedantic>)
|
||||
# The crashpad and breakpad headers generate the following warnings that we
|
||||
# ignore specifically
|
||||
target_compile_options(sentry PRIVATE $<BUILD_INTERFACE:-Wno-variadic-macros -Wno-gnu-include-next -Wno-multichar>)
|
||||
# ignore all warnings for mpack
|
||||
set_source_files_properties(
|
||||
"${PROJECT_SOURCE_DIR}/vendor/mpack.c"
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS
|
||||
"-w"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
target_include_directories(sentry
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||
PRIVATE
|
||||
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>"
|
||||
)
|
||||
|
||||
# The modulefinder and symbolizer need these two settings, and they are exported
|
||||
# as `PUBLIC`, so libraries that depend on sentry get these too:
|
||||
# `-E`: To have all symbols in the dynamic symbol table.
|
||||
# `--build-id`: To have a build-id in the ELF object.
|
||||
# FIXME: cmake 3.13 introduced target_link_options
|
||||
option(SENTRY_EXPORT_SYMBOLS "Export symbols for modulefinder and symbolizer" ON)
|
||||
if(SENTRY_EXPORT_SYMBOLS)
|
||||
target_link_libraries(sentry PUBLIC
|
||||
"$<$<OR:$<PLATFORM_ID:Linux>,$<PLATFORM_ID:Android>>:-Wl,-E,--build-id=sha1>")
|
||||
endif()
|
||||
|
||||
#respect CMAKE_SYSTEM_VERSION
|
||||
if(WIN32)
|
||||
if(MSVC AND CMAKE_GENERATOR_TOOLSET MATCHES "_xp$")
|
||||
#force WINNT to 5.1 for Windows XP toolchain
|
||||
target_compile_definitions(sentry PRIVATE "_WIN32_WINNT=0x0501")
|
||||
elseif(${CMAKE_SYSTEM_VERSION} MATCHES "^10")
|
||||
target_compile_definitions(sentry PRIVATE "_WIN32_WINNT=0x0A00")
|
||||
elseif(${CMAKE_SYSTEM_VERSION} MATCHES "^6.3")
|
||||
target_compile_definitions(sentry PRIVATE "_WIN32_WINNT=0x0603")
|
||||
elseif(${CMAKE_SYSTEM_VERSION} MATCHES "^6.2")
|
||||
target_compile_definitions(sentry PRIVATE "_WIN32_WINNT=0x0602")
|
||||
elseif(${CMAKE_SYSTEM_VERSION} MATCHES "^6.1")
|
||||
target_compile_definitions(sentry PRIVATE "_WIN32_WINNT=0x0601")
|
||||
elseif(${CMAKE_SYSTEM_VERSION} MATCHES "^6.0")
|
||||
target_compile_definitions(sentry PRIVATE "_WIN32_WINNT=0x0600")
|
||||
elseif(${CMAKE_SYSTEM_VERSION} MATCHES "^5.2")
|
||||
target_compile_definitions(sentry PRIVATE "_WIN32_WINNT=0x0502")
|
||||
elseif(${CMAKE_SYSTEM_VERSION} MATCHES "^5.1")
|
||||
target_compile_definitions(sentry PRIVATE "_WIN32_WINNT=0x0501")
|
||||
endif()
|
||||
|
||||
# crashpad does not support Windows XP toolset
|
||||
if(MSVC AND CMAKE_GENERATOR_TOOLSET MATCHES "_xp$" AND SENTRY_BACKEND_CRASHPAD)
|
||||
message(FATAL_ERROR "MSVC XP toolset does not support Crashpad")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# handle platform libraries
|
||||
if(ANDROID)
|
||||
set(_SENTRY_PLATFORM_LIBS "dl" "log")
|
||||
elseif(LINUX)
|
||||
set(_SENTRY_PLATFORM_LIBS "dl" "rt")
|
||||
elseif(WIN32)
|
||||
set(_SENTRY_PLATFORM_LIBS "dbghelp" "shlwapi" "version")
|
||||
endif()
|
||||
|
||||
if(SENTRY_TRANSPORT_WINHTTP)
|
||||
list(APPEND _SENTRY_PLATFORM_LIBS "winhttp")
|
||||
endif()
|
||||
|
||||
# handle platform threads library
|
||||
if(SENTRY_LINK_PTHREAD)
|
||||
list(APPEND _SENTRY_PLATFORM_LIBS "Threads::Threads")
|
||||
endif()
|
||||
|
||||
# apply platform libraries to sentry library
|
||||
if(SENTRY_LIBRARY_TYPE STREQUAL "STATIC")
|
||||
target_link_libraries(sentry PUBLIC ${_SENTRY_PLATFORM_LIBS})
|
||||
else()
|
||||
target_link_libraries(sentry PRIVATE ${_SENTRY_PLATFORM_LIBS})
|
||||
endif()
|
||||
|
||||
# suppress some errors and warnings for MinGW target
|
||||
if(MINGW)
|
||||
target_compile_options(sentry PRIVATE
|
||||
-Wno-unused-variable
|
||||
-Wno-unused-parameter
|
||||
-Wno-format
|
||||
-Wno-incompatible-pointer-types
|
||||
-Wno-incompatible-function-pointer-types
|
||||
)
|
||||
endif()
|
||||
|
||||
if(SENTRY_WITH_LIBUNWINDSTACK)
|
||||
target_include_directories(sentry PRIVATE
|
||||
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/libunwindstack-ndk/include>")
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/external/libunwindstack-ndk/cmake")
|
||||
target_link_libraries(sentry PRIVATE unwindstack)
|
||||
if(NOT SENTRY_BUILD_SHARED_LIBS)
|
||||
sentry_install(TARGETS unwindstack EXPORT sentry
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SENTRY_BACKEND_CRASHPAD)
|
||||
option(SENTRY_CRASHPAD_SYSTEM "Use system crashpad" OFF)
|
||||
if(SENTRY_CRASHPAD_SYSTEM)
|
||||
find_package(crashpad REQUIRED)
|
||||
target_link_libraries(sentry PUBLIC crashpad::client)
|
||||
else()
|
||||
# FIXME: required for cmake 3.12 and lower:
|
||||
# - NEW behavior lets normal variable override option
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
if(SENTRY_BUILD_SHARED_LIBS)
|
||||
set(CRASHPAD_ENABLE_INSTALL OFF CACHE BOOL "Enable crashpad installation" FORCE)
|
||||
else()
|
||||
set(CRASHPAD_ENABLE_INSTALL ON CACHE BOOL "Enable crashpad installation" FORCE)
|
||||
endif()
|
||||
add_subdirectory(external/crashpad crashpad_build)
|
||||
|
||||
# set static runtime if enabled
|
||||
if(SENTRY_BUILD_RUNTIMESTATIC AND MSVC)
|
||||
set_property(TARGET crashpad_client PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set_property(TARGET crashpad_compat PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set_property(TARGET crashpad_getopt PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set_property(TARGET crashpad_handler PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set_property(TARGET crashpad_handler_lib PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set_property(TARGET crashpad_minidump PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set_property(TARGET crashpad_snapshot PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set_property(TARGET crashpad_tools PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set_property(TARGET crashpad_util PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set_property(TARGET crashpad_zlib PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set_property(TARGET mini_chromium PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
|
||||
if(DEFINED SENTRY_FOLDER)
|
||||
set_target_properties(crashpad_client PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
set_target_properties(crashpad_compat PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
set_target_properties(crashpad_getopt PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
set_target_properties(crashpad_handler PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
set_target_properties(crashpad_handler_lib PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
set_target_properties(crashpad_minidump PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
set_target_properties(crashpad_snapshot PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
set_target_properties(crashpad_tools PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
set_target_properties(crashpad_util PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
set_target_properties(crashpad_zlib PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
set_target_properties(mini_chromium PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
endif()
|
||||
|
||||
target_link_libraries(sentry PRIVATE
|
||||
$<BUILD_INTERFACE:crashpad::client>
|
||||
$<INSTALL_INTERFACE:sentry_crashpad::client>
|
||||
)
|
||||
install(EXPORT crashpad_export NAMESPACE sentry_crashpad:: FILE sentry_crashpad-targets.cmake
|
||||
DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
|
||||
)
|
||||
if(WIN32 AND MSVC)
|
||||
sentry_install(FILES $<TARGET_PDB_FILE:crashpad_handler>
|
||||
DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL)
|
||||
endif()
|
||||
endif()
|
||||
add_dependencies(sentry crashpad::handler)
|
||||
elseif(SENTRY_BACKEND_BREAKPAD)
|
||||
option(SENTRY_BREAKPAD_SYSTEM "Use system breakpad" OFF)
|
||||
if(SENTRY_BREAKPAD_SYSTEM)
|
||||
# system breakpad is using pkg-config, see `external/breakpad/breakpad-client.pc.in`
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(BREAKPAD REQUIRED IMPORTED_TARGET breakpad-client)
|
||||
target_link_libraries(sentry PUBLIC PkgConfig::BREAKPAD)
|
||||
else()
|
||||
add_subdirectory(external)
|
||||
target_include_directories(sentry PRIVATE
|
||||
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/breakpad/src>"
|
||||
)
|
||||
target_link_libraries(sentry PRIVATE
|
||||
breakpad_client
|
||||
)
|
||||
|
||||
if(DEFINED SENTRY_FOLDER)
|
||||
set_target_properties(breakpad_client PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
endif()
|
||||
|
||||
if(NOT SENTRY_BUILD_SHARED_LIBS)
|
||||
sentry_install(TARGETS breakpad_client EXPORT sentry
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
elseif(SENTRY_BACKEND_INPROC)
|
||||
target_compile_definitions(sentry PRIVATE SENTRY_WITH_INPROC_BACKEND)
|
||||
endif()
|
||||
|
||||
option(SENTRY_INTEGRATION_QT "Build Qt integration")
|
||||
if(SENTRY_INTEGRATION_QT)
|
||||
if(QT_DEFAULT_MAJOR_VERSION)
|
||||
# Let user choose major version
|
||||
set(Qt_VERSION_MAJOR ${QT_DEFAULT_MAJOR_VERSION})
|
||||
else()
|
||||
# Find best match, prioritizing Qt 6 if available
|
||||
find_package(Qt NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||
endif()
|
||||
find_package(Qt${Qt_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
||||
message(STATUS "Found Qt: ${Qt${Qt_VERSION_MAJOR}_DIR} "
|
||||
"(found version \"${Qt${Qt_VERSION_MAJOR}_VERSION}\")")
|
||||
target_link_libraries(sentry PRIVATE Qt${Qt_VERSION_MAJOR}::Core)
|
||||
endif()
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
configure_package_config_file(sentry-config.cmake.in sentry-config.cmake
|
||||
INSTALL_DESTINATION "${CMAKE_INSTALL_CMAKEDIR}")
|
||||
|
||||
# generate package version file
|
||||
# We would have liked to use `SameMinorVersion`, but that is only supported on
|
||||
# CMake >= 3.11.
|
||||
write_basic_package_version_file(sentry-config-version.cmake
|
||||
VERSION ${SENTRY_VERSION}
|
||||
COMPATIBILITY SameMajorVersion)
|
||||
|
||||
sentry_install(TARGETS sentry EXPORT sentry
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
)
|
||||
sentry_install(EXPORT sentry NAMESPACE sentry:: FILE sentry-targets.cmake
|
||||
DESTINATION "${CMAKE_INSTALL_CMAKEDIR}")
|
||||
sentry_install(
|
||||
FILES
|
||||
"${PROJECT_BINARY_DIR}/sentry-config.cmake"
|
||||
"${PROJECT_BINARY_DIR}/sentry-config-version.cmake"
|
||||
DESTINATION "${CMAKE_INSTALL_CMAKEDIR}")
|
||||
if(WIN32 AND MSVC AND SENTRY_BUILD_SHARED_LIBS)
|
||||
sentry_install(FILES $<TARGET_PDB_FILE:sentry>
|
||||
DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL)
|
||||
endif()
|
||||
|
||||
# ===== tests =====
|
||||
|
||||
if(SENTRY_BUILD_TESTS)
|
||||
add_subdirectory(tests/unit)
|
||||
endif()
|
||||
|
||||
# ===== example, also used as integration test =====
|
||||
|
||||
if(SENTRY_BUILD_EXAMPLES)
|
||||
add_executable(sentry_example examples/example.c)
|
||||
target_link_libraries(sentry_example PRIVATE sentry)
|
||||
|
||||
target_compile_definitions(sentry_example PRIVATE SENTRY_PERFORMANCE_MONITORING)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(sentry_example PRIVATE $<BUILD_INTERFACE:/wd5105>)
|
||||
endif()
|
||||
|
||||
# set static runtime if enabled
|
||||
if(SENTRY_BUILD_RUNTIMESTATIC AND MSVC)
|
||||
set_property(TARGET sentry_example PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
|
||||
if(DEFINED SENTRY_FOLDER)
|
||||
set_target_properties(sentry_example PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
endif()
|
||||
|
||||
add_test(NAME sentry_example COMMAND sentry_example)
|
||||
endif()
|
140
thirdparty/sentry-native/CONTRIBUTING.md
vendored
Normal file
140
thirdparty/sentry-native/CONTRIBUTING.md
vendored
Normal file
@ -0,0 +1,140 @@
|
||||
# Contribution guidelines
|
||||
|
||||
We love and welcome contributions!
|
||||
|
||||
In order to maintain a high quality, we run a number of checks on
|
||||
different OS / Compiler combinations, and using different analysis tools.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Building and testing `sentry-native` currently requires the following tools:
|
||||
|
||||
- **CMake** and a supported C/C++ compiler, to actually build the code.
|
||||
- **python** and **pytest**, to run integration tests.
|
||||
- **clang-format** and **black**, to format the C/C++ and python code respectively.
|
||||
|
||||
`pytest` and `black` are installed as virtualenv dependencies automatically.
|
||||
|
||||
## Setting up Environment
|
||||
|
||||
$ make setup
|
||||
|
||||
This sets up both git, including a pre-commit hook and submodules, and installs
|
||||
a python virtualenv which is used to run tests and formatting.
|
||||
|
||||
## Formatting Code
|
||||
|
||||
$ make format
|
||||
|
||||
This should be done automatically as part of the pre-commit hook, but can also
|
||||
be done manually.
|
||||
|
||||
$ black tests
|
||||
|
||||
## Running Tests
|
||||
|
||||
$ make test
|
||||
|
||||
Creates a python virtualenv, and runs all the tests through `pytest`.
|
||||
|
||||
**Running integration tests manually**:
|
||||
|
||||
$ pytest --verbose --maxfail=1 --capture=no tests/
|
||||
|
||||
When all the python dependencies have been installed, the integration test suite
|
||||
can also be invoked directly.
|
||||
|
||||
The `maxfail` parameter will abort after the first failure, and `capture=no`
|
||||
will print the complete compiler output, and test log.
|
||||
|
||||
**Running unit tests**:
|
||||
|
||||
$ make test-unit
|
||||
|
||||
Unit tests also have a dedicated `make` target, if they need to be run separately
|
||||
from the integration tests.
|
||||
|
||||
**Running unit tests manually**:
|
||||
|
||||
$ cmake -B build -D CMAKE_RUNTIME_OUTPUT_DIRECTORY=$(pwd)/build
|
||||
$ cmake --build build --target sentry_test_unit
|
||||
$ ./build/sentry_test_unit
|
||||
|
||||
The unit tests are a separate executable target and can be built and run on
|
||||
their own.
|
||||
|
||||
## How to interpret CI failures
|
||||
|
||||
The way that tests are run unfortunately does not make it immediately obvious from
|
||||
the summary what the actual failure is, especially for compile-time failures.
|
||||
In such cases, it is good to scan the test output _from top to bottom_ and find
|
||||
the offending compile error.
|
||||
|
||||
When running tests locally, one can use the `--maxfail=1` / `-x` parameter to
|
||||
abort after the first failure.
|
||||
|
||||
## Integration Test Parameters
|
||||
|
||||
The integration test suite runs the `sentry_example` target using a variety of
|
||||
different compile-time parameters, and asserts different use-cases.
|
||||
|
||||
Some of its behavior is controlled by env-variables:
|
||||
|
||||
- `ERROR_ON_WARNINGS`: Turns on `-Werror` for gcc compatible compilers.
|
||||
This is also the default for `MSVC` on windows.
|
||||
- `RUN_ANALYZER`: Runs the code with/through one or more of the given analyzers.
|
||||
This accepts a comma-separated list, and currently has support for:
|
||||
- `asan`: Uses clangs AddressSanitizer and runs integration tests with the
|
||||
`detect_leaks` flag.
|
||||
- `scan-build`: Runs the build through the `scan-build` tool.
|
||||
- `code-checker`: Uses the [`CodeChecker`](https://github.com/Ericsson/codechecker)
|
||||
tool for builds.
|
||||
- `kcov`: Uses [`kcov`](https://github.com/SimonKagstrom/kcov) to collect
|
||||
code-coverage statistics.
|
||||
- `valgrind`: Uses [`valgrind`](https://valgrind.org/) to check for memory
|
||||
issues such as leaks.
|
||||
- `gcc`: Use the `-fanalyzer` flag of `gcc > 10`.
|
||||
This is currently not stable enough to use, as it leads to false positives
|
||||
and internal compiler errors.
|
||||
- `TEST_X86`: Passes flags to CMake to enable a 32-bit (cross-)compile.
|
||||
- `ANDROID_API` / `ANDROID_NDK` / `ANDROID_ARCH`: Instructs the test runner to
|
||||
build using the given Android `NDK` version, targeting the given `API` and
|
||||
`ARCH`. The test runner assumes an already running simulator matching the
|
||||
`ARCH`, and will run the tests on that.
|
||||
|
||||
**Analyzer Requirements**:
|
||||
|
||||
Some tools, such as `kcov` and `valgrind` have their own distribution packages.
|
||||
Clang-based tools may require an up-to-date clang, and a separate `clang-tools`
|
||||
packages.
|
||||
`CodeChecker` has its own
|
||||
[install instructions](https://github.com/Ericsson/codechecker#install-guide)
|
||||
with a list of needed dependencies.
|
||||
|
||||
**Running examples manually**:
|
||||
|
||||
$ cmake -B build -D CMAKE_RUNTIME_OUTPUT_DIRECTORY=$(pwd)/build
|
||||
$ cmake --build build --target sentry_example
|
||||
$ ./build/sentry_example log capture-event
|
||||
|
||||
The example can be run manually with a variety of commands to test different
|
||||
scenarios. Additionally, it will use the `SENTRY_DSN` env-variable, and can thus
|
||||
also be used to capture events/crashes directly to sentry.
|
||||
|
||||
The example currently supports the following commends:
|
||||
|
||||
- `capture-event`: Captures an event.
|
||||
- `crash`: Triggers a crash to be captured.
|
||||
- `log`: Enables debug logging.
|
||||
- `release-env`: Uses the `SENTRY_RELEASE` env-variable for the release,
|
||||
instead of a hardcoded value.
|
||||
- `attachment`: Adds an attachment, which is currently defined as the
|
||||
`CMakeCache.txt` file, which is part of the CMake build folder.
|
||||
- `stdout`: Uses a custom transport which dumps all envelopes to `stdout`.
|
||||
- `no-setup`: Skips all scope and breadcrumb initialization code.
|
||||
- `start-session`: Starts a new release-health session.
|
||||
- `overflow-breadcrumbs`: Creates a large number of breadcrumbs that overflow
|
||||
the maximum allowed number.
|
||||
- `capture-multiple`: Captures a number of events.
|
||||
- `sleep`: Introduces a 10 second sleep.
|
||||
- `add-stacktrace`: Adds the current thread stacktrace to the captured event.
|
20
thirdparty/sentry-native/LICENSE
vendored
Normal file
20
thirdparty/sentry-native/LICENSE
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors.
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
316
thirdparty/sentry-native/README.md
vendored
Normal file
316
thirdparty/sentry-native/README.md
vendored
Normal file
@ -0,0 +1,316 @@
|
||||
<p align="center">
|
||||
<a href="https://sentry.io" target="_blank" align="center">
|
||||
<img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
|
||||
</a>
|
||||
<br />
|
||||
</p>
|
||||
|
||||
# Official Sentry SDK for C/C++ <!-- omit in toc -->
|
||||
|
||||
The _Sentry Native SDK_ is an error and crash reporting client for native
|
||||
applications, optimized for C and C++. Sentry allows to add tags, breadcrumbs
|
||||
and arbitrary custom context to enrich error reports. Supports Sentry _20.6.0_
|
||||
and later.
|
||||
|
||||
**Note**: This SDK is being actively developed and still in Beta. We recommend
|
||||
to check for updates regularly to benefit from latest features and bug fixes.
|
||||
Please see [Known Limitations](#known-limitations).
|
||||
|
||||
## Resources <!-- omit in toc -->
|
||||
|
||||
- [Discord](https://discord.gg/ez5KZN7) server for project discussions.
|
||||
- Follow [@getsentry](https://twitter.com/getsentry) on Twitter for updates
|
||||
|
||||
## Table of Contents <!-- omit in toc -->
|
||||
|
||||
- [Downloads](#downloads)
|
||||
- [What is Inside](#what-is-inside)
|
||||
- [Platform and Feature Support](#platform-and-feature-support)
|
||||
- [Building and Installation](#building-and-installation)
|
||||
- [Compile-Time Options](#compile-time-options)
|
||||
- [Build Targets](#build-targets)
|
||||
- [Runtime Configuration](#runtime-configuration)
|
||||
- [Known Limitations](#known-limitations)
|
||||
- [Development](#development)
|
||||
|
||||
## Downloads
|
||||
|
||||
The SDK can be downloaded from the [Releases] page, which also lists the
|
||||
changelog of every version.
|
||||
|
||||
[releases]: https://github.com/getsentry/sentry-native/releases
|
||||
|
||||
### What is Inside
|
||||
|
||||
The SDK bundle contains the following folders:
|
||||
|
||||
- `external`: These are external projects which are consumed via
|
||||
`git submodules`.
|
||||
- `include`: Contains the Sentry header file. Set the include path to this
|
||||
directory or copy the header file to your source tree so that it is available
|
||||
during the build.
|
||||
- `src`: Sources of the Sentry SDK required for building.
|
||||
|
||||
## Platform and Feature Support
|
||||
|
||||
The SDK currently supports and is tested on the following OS/Compiler variations:
|
||||
|
||||
- 64bit Linux with GCC 9
|
||||
- 64bit Linux with clang 9
|
||||
- 32bit Linux with GCC 7 (cross compiled from 64bit host)
|
||||
- 64bit Windows with MSVC 2019
|
||||
- 32bit Windows with MSVC 2017
|
||||
- macOS Catalina with most recent Compiler toolchain
|
||||
- Android API29 built by NDK21 toolchain
|
||||
- Android API16 built by NDK19 toolchain
|
||||
|
||||
Additionally, the SDK should support the following platforms, although they are
|
||||
not automatically tested, so breakage may occur:
|
||||
|
||||
- Windows Versions lower than Windows 10 / Windows Server 2016
|
||||
- Windows builds with the MSYS2 + MinGW + Clang toolchain
|
||||
|
||||
The SDK supports different features on the target platform:
|
||||
|
||||
- **HTTP Transport** is currently only supported on Windows and platforms that
|
||||
have the `curl` library available. On other platforms, library users need to
|
||||
implement their own transport, based on the `function transport` API.
|
||||
- **Crashpad Backend** is currently only supported on Linux, Windows and macOS.
|
||||
- **Client-side stackwalking** is currently only supported on Linux, Windows, and macOS.
|
||||
|
||||
## Building and Installation
|
||||
|
||||
The SDK is developed and shipped as a [CMake] project.
|
||||
CMake will pick an appropriate compiler and buildsystem toolchain automatically
|
||||
per platform, and can also be configured for cross-compilation.
|
||||
System-wide installation of the resulting sentry library is also possible via
|
||||
CMake.
|
||||
|
||||
Building the Crashpad Backend requires a `C++14` compatible compiler.
|
||||
|
||||
**Build example**:
|
||||
|
||||
```sh
|
||||
# configure the cmake build into the `build` directory, with crashpad (on macOS)
|
||||
$ cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
# build the project
|
||||
$ cmake --build build --parallel
|
||||
# install the resulting artifacts into a specific prefix (use the correct config on windows)
|
||||
$ cmake --install build --prefix install --config RelWithDebInfo
|
||||
# which will result in the following (on macOS):
|
||||
$ exa --tree install
|
||||
install
|
||||
├── bin
|
||||
│ └── crashpad_handler
|
||||
├── include
|
||||
│ └── sentry.h
|
||||
└── lib
|
||||
├── cmake
|
||||
│ └── sentry
|
||||
├── libsentry.dylib
|
||||
└── libsentry.dylib.dSYM
|
||||
```
|
||||
|
||||
Please refer to the CMake Manual for more details.
|
||||
|
||||
**Android**:
|
||||
|
||||
The CMake project can also be configured to correctly work with the Android NDK,
|
||||
see the dedicated [CMake Guide] for details on how to integrate it with gradle
|
||||
or use it on the command line.
|
||||
|
||||
[cmake]: https://cmake.org/cmake/help/latest/
|
||||
[cmake guide]: https://developer.android.com/ndk/guides/cmake
|
||||
|
||||
**MinGW**:
|
||||
|
||||
64-bits is the only platform supported for now.
|
||||
LLVM + Clang are mandatory here : they are required to generate .pdb files, used by Crashpad for the report generation.
|
||||
|
||||
For your application to generate the appropriate .pdb output, you need to activate CodeView file format generation on your application target. To do so, update your own CMakeLists.txt with something like `target_compile_options(${yourApplicationTarget} PRIVATE -gcodeview)`.
|
||||
|
||||
If you use a MSYS2 environement to compile with MinGW, make sure to :
|
||||
|
||||
- Create an environement variable `MINGW_ROOT` (ex : `C:/msys64/mingw64`)
|
||||
- Run from `mingw64.exe` : `pacman -S --needed - < ./toolchains/msys2-mingw64-pkglist.txt`
|
||||
- Build as :
|
||||
|
||||
```sh
|
||||
# Configure with Ninja as generator and use the MSYS2 toolchain file
|
||||
$ cmake -GNinja -Bbuild -H. -DCMAKE_TOOLCHAIN_FILE=toolchains/msys2.cmake
|
||||
# build with Ninja
|
||||
$ ninja -C build
|
||||
```
|
||||
|
||||
**MacOS**:
|
||||
|
||||
Building universal binaries/libraries is possible out of the box when using the
|
||||
[`CMAKE_OSX_ARCHITECTURES`](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_ARCHITECTURES.html) define, both with the `Xcode` generator as well
|
||||
as the default generator:
|
||||
|
||||
```sh
|
||||
# using xcode generator:
|
||||
$ cmake -B xcodebuild -GXcode -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
|
||||
$ xcodebuild build -project xcodebuild/Sentry-Native.xcodeproj
|
||||
$ lipo -info xcodebuild/Debug/libsentry.dylib
|
||||
Architectures in the fat file: xcodebuild/Debug/libsentry.dylib are: x86_64 arm64
|
||||
|
||||
# using default generator:
|
||||
$ cmake -B defaultbuild -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
|
||||
$ cmake --build defaultbuild --parallel
|
||||
$ lipo -info defaultbuild/libsentry.dylib
|
||||
Architectures in the fat file: defaultbuild/libsentry.dylib are: x86_64 arm64
|
||||
```
|
||||
|
||||
Make sure that MacOSX SDK 11 or later is used. It is possible that this requires
|
||||
manually overriding the `SDKROOT`:
|
||||
|
||||
```sh
|
||||
$ export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
|
||||
```
|
||||
|
||||
### Compile-Time Options
|
||||
|
||||
The following options can be set when running the cmake generator, for example
|
||||
using `cmake -D BUILD_SHARED_LIBS=OFF ..`.
|
||||
|
||||
- `SENTRY_BUILD_SHARED_LIBS` (Default: ON):
|
||||
By default, `sentry` is built as a shared library. Setting this option to
|
||||
`OFF` will build `sentry` as a static library instead.
|
||||
If sentry is used as a subdirectory of another project, the value `BUILD_SHARED_LIBS` will be inherited by default.
|
||||
|
||||
When using `sentry` as a static library, make sure to `#define SENTRY_BUILD_STATIC 1` before including the sentry header.
|
||||
|
||||
- `SENTRY_PIC` (Default: ON):
|
||||
By default, `sentry` is built as a position independent library.
|
||||
|
||||
- `SENTRY_EXPORT_SYMBOLS` (Default: ON):
|
||||
By default, `sentry` exposes all symbols in the dynamic symbol table. You might want to disable it in case the program intends to `dlopen` third-party shared libraries and avoid symbol collisions.
|
||||
|
||||
- `SENTRY_BUILD_RUNTIMESTATIC` (Default: OFF):
|
||||
Enables linking with the static MSVC runtime. Has no effect if the compiler is not MSVC.
|
||||
|
||||
- `SENTRY_LINK_PTHREAD` (Default: ON):
|
||||
Links platform threads library like `pthread` on unix targets.
|
||||
|
||||
- `SENTRY_BUILD_FORCE32` (Default: OFF):
|
||||
Forces cross-compilation from 64-bit host to 32-bit target. Only has an effect on Linux.
|
||||
|
||||
- `CMAKE_SYSTEM_VERSION` (Default: depending on Windows SDK version):
|
||||
Sets up a minimal version of Windows where sentry-native can be guaranteed to run.
|
||||
Possible values:
|
||||
|
||||
- `5.1` (Windows XP)
|
||||
- `5.2` (Windows XP 64-bit / Server 2003 / Server 2003 R2)
|
||||
- `6.0` (Windows Vista / Server 2008)
|
||||
- `6.1` (Windows 7 / Server 2008 R2)
|
||||
- `6.2` (Windows 8.0 / Server 2012)
|
||||
- `6.3` (Windows 8.1 / Server 2012 R2)
|
||||
- `10` (Windows 10 / Server 2016 / Server 2019)
|
||||
|
||||
For Windows versions below than `6.0` it is also necessary to use XP toolchain
|
||||
in case of MSVC compiler (pass `-T v141_xp` to CMake command line).
|
||||
|
||||
- `SENTRY_TRANSPORT` (Default: depending on platform):
|
||||
Sentry can use different http libraries to send reports to the server.
|
||||
|
||||
- **curl**: This uses the `curl` library for HTTP handling. This requires
|
||||
that the development version of the package is available.
|
||||
- **winhttp**: This uses the `winhttp` system library, is only supported on
|
||||
Windows and is the default there.
|
||||
- **none**: Do not build any http transport. This should be used if users
|
||||
want to handle uploads themselves
|
||||
|
||||
- `SENTRY_BACKEND` (Default: depending on platform):
|
||||
Sentry can use different backends depending on platform.
|
||||
|
||||
- **crashpad**: This uses the out-of-process crashpad handler. It is currently
|
||||
only supported on Desktop OSs, and used as the default on Windows and macOS.
|
||||
- **breakpad**: This uses the in-process breakpad handler. It is currently
|
||||
only supported on Desktop OSs, and used as the default on Linux.
|
||||
- **inproc**: A small in-process handler which is supported on all platforms,
|
||||
and is used as default on Android.
|
||||
- **none**: This builds `sentry-native` without a backend, so it does not handle
|
||||
crashes at all. It is primarily used for tests.
|
||||
|
||||
- `SENTRY_INTEGRATION_QT` (Default: OFF):
|
||||
Builds the Qt integration, which turns Qt log messages into breadcrumbs.
|
||||
|
||||
- `SENTRY_BREAKPAD_SYSTEM` / `SENTRY_CRASHPAD_SYSTEM` (Default: OFF):
|
||||
This instructs the build system to use system-installed breakpad or crashpad
|
||||
libraries instead of using the in-tree version. This is generally not recommended
|
||||
for crashpad, as sentry uses a patched version that has attachment support.
|
||||
This is being worked on upstream as well, and a future version might work with
|
||||
an unmodified crashpad version as well.
|
||||
|
||||
| Feature | Windows | macOS | Linux | Android | iOS |
|
||||
| ---------- | ------- | ----- | ----- | ------- | --- |
|
||||
| Transports | | | | | |
|
||||
| - curl | | ☑ | ☑ | (✓) | |
|
||||
| - winhttp | ☑ | | | | |
|
||||
| - none | ✓ | ✓ | ✓ | ☑ | ☑ |
|
||||
| | | | | | |
|
||||
| Backends | | | | | |
|
||||
| - inproc | ✓ | ✓ | ✓ | ☑ | |
|
||||
| - crashpad | ☑ | ☑ | ✓ | | |
|
||||
| - breakpad | ✓ | ✓ | ☑ | (✓) | (✓) |
|
||||
| - none | ✓ | ✓ | ✓ | ✓ | |
|
||||
|
||||
Legend:
|
||||
|
||||
- ☑ default
|
||||
- ✓ supported
|
||||
- unsupported
|
||||
|
||||
- `SENTRY_FOLDER` (Default: not defined):
|
||||
Sets the sentry-native projects folder name for generators which support project hierarchy (like Microsoft Visual Studio).
|
||||
To use this feature you need to enable hierarchy via [`USE_FOLDERS` property](https://cmake.org/cmake/help/latest/prop_gbl/USE_FOLDERS.html)
|
||||
|
||||
- `CRASHPAD_ENABLE_STACKTRACE` (Default: OFF):
|
||||
This enables client-side stackwalking when using the crashpad backend. Stack unwinding will happen on the client's machine
|
||||
and the result will be submitted to Sentry attached to the generated minidump.
|
||||
Note that this feature is still experimental.
|
||||
|
||||
### Build Targets
|
||||
|
||||
- `sentry`: This is the main library and the only default build target.
|
||||
- `crashpad_handler`: When configured with the `crashpad` backend, this is
|
||||
the out of process crash handler, which will need to be installed along with
|
||||
the projects executable.
|
||||
- `sentry_test_unit`: These are the main unit-tests, which are conveniently built
|
||||
also by the toplevel makefile.
|
||||
- `sentry_example`: This is a small example program highlighting the API, which
|
||||
can be controlled via command-line parameters, and is also used for
|
||||
integration tests.
|
||||
|
||||
## Runtime Configuration
|
||||
|
||||
A minimal working example looks like this. For a more elaborate example see the [example.c](examples/example.c) file which is also used to run sentries integration tests.
|
||||
|
||||
```c
|
||||
sentry_options_t *options = sentry_options_new();
|
||||
sentry_options_set_dsn(options, "https://YOUR_KEY@oORG_ID.ingest.sentry.io/PROJECT_ID");
|
||||
sentry_init(options);
|
||||
|
||||
// your application code …
|
||||
|
||||
sentry_close();
|
||||
```
|
||||
|
||||
Other important configuration options include:
|
||||
|
||||
- `sentry_options_set_database_path`: Sentry needs to persist some cache data across application restarts, especially for proper handling of release health sessions. It is recommended to set an explicit absolute path corresponding to the applications cache directory (equivalent to `AppData/Local` on Windows, and `XDG_CACHE_HOME` on Linux). Sentry should be given its own directory which is not shared with other application data, as the SDK will enumerate and possibly delete files in that directory. An example might be `$XDG_CACHE_HOME/your-app/sentry`.
|
||||
When not set explicitly, sentry will create and use the `.sentry-native` directory inside of the current working directory.
|
||||
- `sentry_options_set_handler_path`: When using the crashpad backend, sentry will look for a `crashpad_handler` executable in the same directory as the running executable. It is recommended to set this as an explicit absolute path based on the applications install location.
|
||||
- `sentry_options_set_release`: Some features in sentry, including release health, need to have a release version set. This corresponds to the application’s version and needs to be set explicitly. See [Releases](https://docs.sentry.io/product/releases/) for more information.
|
||||
|
||||
## Known Limitations
|
||||
|
||||
- The crashpad backend on macOS currently has no support for notifying the crashing
|
||||
process, and can thus not properly terminate sessions or call the registered
|
||||
`before_send` hook. It will also lose any events that have been queued for
|
||||
sending at time of crash.
|
||||
|
||||
## Development
|
||||
|
||||
Please see the [contribution guide](./CONTRIBUTING.md).
|
268
thirdparty/sentry-native/examples/example.c
vendored
Normal file
268
thirdparty/sentry-native/examples/example.c
vendored
Normal file
@ -0,0 +1,268 @@
|
||||
#ifdef _WIN32
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# define NOMINMAX
|
||||
# define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include "sentry.h"
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef NDEBUG
|
||||
# undef NDEBUG
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef SENTRY_PLATFORM_WINDOWS
|
||||
# include <synchapi.h>
|
||||
# define sleep_s(SECONDS) Sleep((SECONDS)*1000)
|
||||
#else
|
||||
# include <signal.h>
|
||||
# include <unistd.h>
|
||||
# define sleep_s(SECONDS) sleep(SECONDS)
|
||||
#endif
|
||||
|
||||
static void
|
||||
print_envelope(sentry_envelope_t *envelope, void *unused_state)
|
||||
{
|
||||
(void)unused_state;
|
||||
size_t size_out = 0;
|
||||
char *s = sentry_envelope_serialize(envelope, &size_out);
|
||||
printf("%s", s);
|
||||
sentry_free(s);
|
||||
sentry_envelope_free(envelope);
|
||||
}
|
||||
|
||||
static bool
|
||||
has_arg(int argc, char **argv, const char *arg)
|
||||
{
|
||||
for (int i = 1; i < argc; i++) {
|
||||
if (strcmp(argv[i], arg) == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef SENTRY_PLATFORM_AIX
|
||||
// AIX has a null page mapped to the bottom of memory, which means null derefs
|
||||
// don't segfault. try dereferencing the top of memory instead; the top nibble
|
||||
// seems to be unusable.
|
||||
static void *invalid_mem = (void *)0xFFFFFFFFFFFFFF9B; // -100 for memset
|
||||
#else
|
||||
static void *invalid_mem = (void *)1;
|
||||
#endif
|
||||
|
||||
static void
|
||||
trigger_crash()
|
||||
{
|
||||
memset((char *)invalid_mem, 1, 100);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
sentry_options_t *options = sentry_options_new();
|
||||
|
||||
// this is an example. for real usage, make sure to set this explicitly to
|
||||
// an app specific cache location.
|
||||
sentry_options_set_database_path(options, ".sentry-native");
|
||||
|
||||
sentry_options_set_auto_session_tracking(options, false);
|
||||
sentry_options_set_symbolize_stacktraces(options, true);
|
||||
|
||||
sentry_options_set_environment(options, "development");
|
||||
// sentry defaults this to the `SENTRY_RELEASE` env variable
|
||||
if (!has_arg(argc, argv, "release-env")) {
|
||||
sentry_options_set_release(options, "test-example-release");
|
||||
}
|
||||
|
||||
if (has_arg(argc, argv, "log")) {
|
||||
sentry_options_set_debug(options, 1);
|
||||
}
|
||||
|
||||
if (has_arg(argc, argv, "attachment")) {
|
||||
// assuming the example / test is run directly from the cmake build
|
||||
// directory
|
||||
sentry_options_add_attachment(options, "./CMakeCache.txt");
|
||||
}
|
||||
|
||||
if (has_arg(argc, argv, "stdout")) {
|
||||
sentry_options_set_transport(
|
||||
options, sentry_transport_new(print_envelope));
|
||||
}
|
||||
|
||||
#ifdef SENTRY_PERFORMANCE_MONITORING
|
||||
if (has_arg(argc, argv, "capture-transaction")) {
|
||||
sentry_options_set_traces_sample_rate(options, 1.0);
|
||||
}
|
||||
|
||||
if (has_arg(argc, argv, "child-spans")) {
|
||||
sentry_options_set_max_spans(options, 5);
|
||||
}
|
||||
#endif
|
||||
|
||||
sentry_init(options);
|
||||
|
||||
if (!has_arg(argc, argv, "no-setup")) {
|
||||
sentry_set_transaction("test-transaction");
|
||||
sentry_set_level(SENTRY_LEVEL_WARNING);
|
||||
sentry_set_extra("extra stuff", sentry_value_new_string("some value"));
|
||||
sentry_set_extra("…unicode key…",
|
||||
// https://xkcd.com/1813/ :-)
|
||||
sentry_value_new_string("őá…–🤮🚀¿ 한글 테스트"));
|
||||
sentry_set_tag("expected-tag", "some value");
|
||||
sentry_set_tag("not-expected-tag", "some value");
|
||||
sentry_remove_tag("not-expected-tag");
|
||||
|
||||
sentry_value_t context = sentry_value_new_object();
|
||||
sentry_value_set_by_key(
|
||||
context, "type", sentry_value_new_string("runtime"));
|
||||
sentry_value_set_by_key(
|
||||
context, "name", sentry_value_new_string("testing-runtime"));
|
||||
sentry_set_context("runtime", context);
|
||||
|
||||
sentry_value_t user = sentry_value_new_object();
|
||||
sentry_value_set_by_key(user, "id", sentry_value_new_int32(42));
|
||||
sentry_value_set_by_key(
|
||||
user, "username", sentry_value_new_string("some_name"));
|
||||
sentry_set_user(user);
|
||||
|
||||
sentry_value_t default_crumb
|
||||
= sentry_value_new_breadcrumb(NULL, "default level is info");
|
||||
sentry_add_breadcrumb(default_crumb);
|
||||
|
||||
sentry_value_t debug_crumb
|
||||
= sentry_value_new_breadcrumb("http", "debug crumb");
|
||||
sentry_value_set_by_key(
|
||||
debug_crumb, "category", sentry_value_new_string("example!"));
|
||||
sentry_value_set_by_key(
|
||||
debug_crumb, "level", sentry_value_new_string("debug"));
|
||||
sentry_add_breadcrumb(debug_crumb);
|
||||
|
||||
sentry_value_t nl_crumb
|
||||
= sentry_value_new_breadcrumb(NULL, "lf\ncrlf\r\nlf\n...");
|
||||
sentry_value_set_by_key(
|
||||
nl_crumb, "category", sentry_value_new_string("something else"));
|
||||
sentry_add_breadcrumb(nl_crumb);
|
||||
}
|
||||
|
||||
if (has_arg(argc, argv, "start-session")) {
|
||||
sentry_start_session();
|
||||
}
|
||||
|
||||
if (has_arg(argc, argv, "overflow-breadcrumbs")) {
|
||||
for (size_t i = 0; i < 101; i++) {
|
||||
char buffer[4];
|
||||
snprintf(buffer, 4, "%zu", i);
|
||||
sentry_add_breadcrumb(sentry_value_new_breadcrumb(0, buffer));
|
||||
}
|
||||
}
|
||||
|
||||
if (has_arg(argc, argv, "capture-multiple")) {
|
||||
for (size_t i = 0; i < 10; i++) {
|
||||
char buffer[10];
|
||||
snprintf(buffer, 10, "Event #%zu", i);
|
||||
|
||||
sentry_value_t event = sentry_value_new_message_event(
|
||||
SENTRY_LEVEL_INFO, NULL, buffer);
|
||||
sentry_capture_event(event);
|
||||
}
|
||||
}
|
||||
|
||||
if (has_arg(argc, argv, "reinstall")) {
|
||||
sentry_reinstall_backend();
|
||||
}
|
||||
|
||||
if (has_arg(argc, argv, "sleep")) {
|
||||
sleep_s(10);
|
||||
}
|
||||
|
||||
if (has_arg(argc, argv, "crash")) {
|
||||
trigger_crash();
|
||||
}
|
||||
if (has_arg(argc, argv, "assert")) {
|
||||
assert(0);
|
||||
}
|
||||
if (has_arg(argc, argv, "abort")) {
|
||||
abort();
|
||||
}
|
||||
#ifdef SENTRY_PLATFORM_UNIX
|
||||
if (has_arg(argc, argv, "raise")) {
|
||||
raise(SIGSEGV);
|
||||
}
|
||||
if (has_arg(argc, argv, "kill")) {
|
||||
kill(getpid(), SIGSEGV);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (has_arg(argc, argv, "capture-event")) {
|
||||
sentry_value_t event = sentry_value_new_message_event(
|
||||
SENTRY_LEVEL_INFO, "my-logger", "Hello World!");
|
||||
if (has_arg(argc, argv, "add-stacktrace")) {
|
||||
sentry_event_value_add_stacktrace(event, NULL, 0);
|
||||
}
|
||||
sentry_capture_event(event);
|
||||
}
|
||||
if (has_arg(argc, argv, "capture-exception")) {
|
||||
sentry_value_t exc = sentry_value_new_exception(
|
||||
"ParseIntError", "invalid digit found in string");
|
||||
if (has_arg(argc, argv, "add-stacktrace")) {
|
||||
sentry_value_t stacktrace = sentry_value_new_stacktrace(NULL, 0);
|
||||
sentry_value_set_by_key(exc, "stacktrace", stacktrace);
|
||||
}
|
||||
sentry_value_t event = sentry_value_new_event();
|
||||
sentry_event_add_exception(event, exc);
|
||||
|
||||
sentry_capture_event(event);
|
||||
}
|
||||
|
||||
#ifdef SENTRY_PERFORMANCE_MONITORING
|
||||
if (has_arg(argc, argv, "capture-transaction")) {
|
||||
sentry_transaction_context_t *tx_ctx
|
||||
= sentry_transaction_context_new("little.teapot",
|
||||
"Short and stout here is my handle and here is my spout");
|
||||
|
||||
if (has_arg(argc, argv, "unsample-tx")) {
|
||||
sentry_transaction_context_set_sampled(tx_ctx, 0);
|
||||
}
|
||||
sentry_transaction_t *tx
|
||||
= sentry_transaction_start(tx_ctx, sentry_value_new_null());
|
||||
|
||||
if (has_arg(argc, argv, "error-status")) {
|
||||
sentry_transaction_set_status(
|
||||
tx, SENTRY_SPAN_STATUS_INTERNAL_ERROR);
|
||||
}
|
||||
|
||||
if (has_arg(argc, argv, "child-spans")) {
|
||||
sentry_span_t *child
|
||||
= sentry_transaction_start_child(tx, "littler.teapot", NULL);
|
||||
sentry_span_t *grandchild
|
||||
= sentry_span_start_child(child, "littlest.teapot", NULL);
|
||||
|
||||
if (has_arg(argc, argv, "error-status")) {
|
||||
sentry_span_set_status(child, SENTRY_SPAN_STATUS_NOT_FOUND);
|
||||
sentry_span_set_status(
|
||||
grandchild, SENTRY_SPAN_STATUS_ALREADY_EXISTS);
|
||||
}
|
||||
|
||||
sentry_span_finish(grandchild);
|
||||
sentry_span_finish(child);
|
||||
}
|
||||
|
||||
sentry_transaction_finish(tx);
|
||||
}
|
||||
#endif
|
||||
|
||||
// make sure everything flushes
|
||||
sentry_close();
|
||||
|
||||
if (has_arg(argc, argv, "sleep-after-shutdown")) {
|
||||
sleep_s(1);
|
||||
}
|
||||
|
||||
if (has_arg(argc, argv, "crash-after-shutdown")) {
|
||||
trigger_crash();
|
||||
}
|
||||
}
|
174
thirdparty/sentry-native/external/CMakeLists.txt
vendored
Normal file
174
thirdparty/sentry-native/external/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,174 @@
|
||||
# The list of files is drived from: breakpad/Makefile.am
|
||||
|
||||
set(BREAKPAD_SOURCES_COMMON
|
||||
breakpad/src/common/convert_UTF.cc
|
||||
breakpad/src/common/convert_UTF.h
|
||||
breakpad/src/common/md5.cc
|
||||
breakpad/src/common/md5.h
|
||||
breakpad/src/common/string_conversion.cc
|
||||
breakpad/src/common/string_conversion.h
|
||||
)
|
||||
|
||||
set(BREAKPAD_SOURCES_COMMON_LINUX
|
||||
breakpad/src/common/linux/elf_core_dump.cc
|
||||
breakpad/src/common/linux/elfutils.cc
|
||||
breakpad/src/common/linux/elfutils.h
|
||||
breakpad/src/common/linux/file_id.cc
|
||||
breakpad/src/common/linux/file_id.h
|
||||
breakpad/src/common/linux/guid_creator.cc
|
||||
breakpad/src/common/linux/guid_creator.h
|
||||
breakpad/src/common/linux/linux_libc_support.cc
|
||||
breakpad/src/common/linux/memory_mapped_file.cc
|
||||
breakpad/src/common/linux/safe_readlink.cc
|
||||
)
|
||||
|
||||
set(BREAKPAD_SOURCES_COMMON_LINUX_GETCONTEXT
|
||||
breakpad/src/common/linux/breakpad_getcontext.S
|
||||
)
|
||||
|
||||
set(BREAKPAD_SOURCES_COMMON_ANDROID
|
||||
breakpad/src/common/android/include/sys/procfs.h
|
||||
)
|
||||
|
||||
set(BREAKPAD_SOURCES_COMMON_WINDOWS
|
||||
breakpad/src/common/windows/guid_string.cc
|
||||
breakpad/src/common/windows/guid_string.h
|
||||
)
|
||||
|
||||
set(BREAKPAD_SOURCES_COMMON_APPLE
|
||||
breakpad/src/common/mac/file_id.cc
|
||||
breakpad/src/common/mac/file_id.h
|
||||
breakpad/src/common/mac/macho_id.cc
|
||||
breakpad/src/common/mac/macho_id.h
|
||||
breakpad/src/common/mac/macho_utilities.cc
|
||||
breakpad/src/common/mac/macho_utilities.h
|
||||
breakpad/src/common/mac/macho_walker.cc
|
||||
breakpad/src/common/mac/macho_walker.h
|
||||
breakpad/src/common/mac/string_utilities.cc
|
||||
breakpad/src/common/mac/string_utilities.h
|
||||
)
|
||||
|
||||
set(BREAKPAD_SOURCES_COMMON_MAC
|
||||
breakpad/src/common/mac/MachIPC.mm
|
||||
breakpad/src/common/mac/bootstrap_compat.cc
|
||||
breakpad/src/common/mac/bootstrap_compat.h
|
||||
)
|
||||
|
||||
set(BREAKPAD_SOURCES_CLIENT_LINUX
|
||||
breakpad/src/client/minidump_file_writer-inl.h
|
||||
breakpad/src/client/minidump_file_writer.cc
|
||||
breakpad/src/client/minidump_file_writer.h
|
||||
breakpad/src/client/linux/crash_generation/crash_generation_client.cc
|
||||
breakpad/src/client/linux/crash_generation/crash_generation_server.cc
|
||||
breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
breakpad/src/client/linux/handler/exception_handler.cc
|
||||
breakpad/src/client/linux/handler/exception_handler.h
|
||||
breakpad/src/client/linux/handler/minidump_descriptor.cc
|
||||
breakpad/src/client/linux/handler/minidump_descriptor.h
|
||||
breakpad/src/client/linux/log/log.cc
|
||||
breakpad/src/client/linux/log/log.h
|
||||
breakpad/src/client/linux/microdump_writer/microdump_writer.cc
|
||||
breakpad/src/client/linux/microdump_writer/microdump_writer.h
|
||||
breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
|
||||
breakpad/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
breakpad/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
)
|
||||
|
||||
set(BREAKPAD_SOURCES_CLIENT_WINDOWS
|
||||
breakpad/src/client/windows/crash_generation/crash_generation_client.cc
|
||||
breakpad/src/client/windows/crash_generation/crash_generation_client.h
|
||||
breakpad/src/client/windows/handler/exception_handler.cc
|
||||
breakpad/src/client/windows/handler/exception_handler.h
|
||||
)
|
||||
|
||||
set(BREAKPAD_SOURCES_CLIENT_APPLE
|
||||
breakpad/src/client/minidump_file_writer-inl.h
|
||||
breakpad/src/client/minidump_file_writer.cc
|
||||
breakpad/src/client/minidump_file_writer.h
|
||||
breakpad/src/client/mac/handler/breakpad_nlist_64.cc
|
||||
breakpad/src/client/mac/handler/breakpad_nlist_64.h
|
||||
breakpad/src/client/mac/handler/dynamic_images.cc
|
||||
breakpad/src/client/mac/handler/dynamic_images.h
|
||||
breakpad/src/client/mac/handler/exception_handler.cc
|
||||
breakpad/src/client/mac/handler/exception_handler.h
|
||||
breakpad/src/client/mac/handler/minidump_generator.cc
|
||||
breakpad/src/client/mac/handler/minidump_generator.h
|
||||
)
|
||||
|
||||
set(BREAKPAD_SOURCES_CLIENT_MAC
|
||||
breakpad/src/client/mac/crash_generation/crash_generation_client.cc
|
||||
breakpad/src/client/mac/crash_generation/crash_generation_client.h
|
||||
)
|
||||
|
||||
set(BREAKPAD_SOURCES_CLIENT_IOS
|
||||
breakpad/src/client/ios/exception_handler_no_mach.cc
|
||||
breakpad/src/client/ios/exception_handler_no_mach.h
|
||||
breakpad/src/client/ios/handler/ios_exception_minidump_generator.h
|
||||
breakpad/src/client/ios/handler/ios_exception_minidump_generator.mm
|
||||
breakpad/src/client/mac/crash_generation/ConfigFile.h
|
||||
breakpad/src/client/mac/crash_generation/ConfigFile.mm
|
||||
breakpad/src/client/mac/handler/mach_vm_compat.h
|
||||
breakpad/src/client/mac/handler/protected_memory_allocator.cc
|
||||
breakpad/src/client/mac/handler/protected_memory_allocator.h
|
||||
breakpad/src/client/mac/handler/ucontext_compat.h
|
||||
)
|
||||
|
||||
|
||||
add_library(breakpad_client STATIC)
|
||||
target_sources(breakpad_client PRIVATE ${BREAKPAD_SOURCES_COMMON})
|
||||
|
||||
if(LINUX OR ANDROID)
|
||||
target_sources(breakpad_client PRIVATE ${BREAKPAD_SOURCES_COMMON_LINUX} ${BREAKPAD_SOURCES_CLIENT_LINUX})
|
||||
if(ANDROID)
|
||||
target_sources(breakpad_client PRIVATE ${BREAKPAD_SOURCES_COMMON_ANDROID})
|
||||
target_include_directories(breakpad_client PRIVATE breakpad/src/common/android/include)
|
||||
endif(ANDROID)
|
||||
|
||||
include(CheckFunctionExists)
|
||||
check_function_exists(getcontext HAVE_GETCONTEXT)
|
||||
if(HAVE_GETCONTEXT)
|
||||
target_compile_definitions(breakpad_client PRIVATE HAVE_GETCONTEXT)
|
||||
else()
|
||||
target_sources(breakpad_client PRIVATE ${BREAKPAD_SOURCES_COMMON_LINUX_GETCONTEXT})
|
||||
endif()
|
||||
|
||||
set_property(TARGET breakpad_client PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
target_sources(breakpad_client PRIVATE
|
||||
${BREAKPAD_SOURCES_COMMON_APPLE}
|
||||
${BREAKPAD_SOURCES_CLIENT_APPLE})
|
||||
if(NOT IOS)
|
||||
target_sources(breakpad_client PRIVATE
|
||||
${BREAKPAD_SOURCES_COMMON_MAC}
|
||||
${BREAKPAD_SOURCES_CLIENT_MAC})
|
||||
else()
|
||||
target_sources(breakpad_client PRIVATE
|
||||
${BREAKPAD_SOURCES_CLIENT_IOS})
|
||||
endif()
|
||||
|
||||
target_link_libraries(breakpad_client PRIVATE "-framework CoreFoundation")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_sources(breakpad_client PRIVATE ${BREAKPAD_SOURCES_COMMON_WINDOWS} ${BREAKPAD_SOURCES_CLIENT_WINDOWS})
|
||||
target_compile_definitions(breakpad_client PRIVATE _UNICODE UNICODE)
|
||||
|
||||
# set static runtime if enabled
|
||||
if(SENTRY_BUILD_RUNTIMESTATIC AND MSVC)
|
||||
set_property(TARGET breakpad_client PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# breakpad has includes directly to `third_party/lss/...`,
|
||||
# which are being resolved correctly when we add the current directory to
|
||||
# the include directories. A giant hack, yes, but it works
|
||||
target_include_directories(breakpad_client
|
||||
PRIVATE
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/breakpad/src/>"
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
|
||||
)
|
9
thirdparty/sentry-native/external/breakpad/.clang-format
vendored
Normal file
9
thirdparty/sentry-native/external/breakpad/.clang-format
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
# Defines the Chromium style for automatic reformatting.
|
||||
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||
BasedOnStyle: Chromium
|
||||
|
||||
# This defaults to 'Auto'. Explicitly set it for a while, so that
|
||||
# 'vector<vector<int> >' in existing files gets formatted to
|
||||
# 'vector<vector<int>>'. ('Auto' means that clang-format will only use
|
||||
# 'int>>' if the file already contains at least one such instance.)
|
||||
Standard: Cpp11
|
22
thirdparty/sentry-native/external/breakpad/.github/workflows/close-pull-request.yml
vendored
Normal file
22
thirdparty/sentry-native/external/breakpad/.github/workflows/close-pull-request.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
# GitHub actions workflow.
|
||||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
|
||||
|
||||
# https://github.com/superbrothers/close-pull-request
|
||||
name: Close Pull Request
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
with:
|
||||
comment: >
|
||||
Thanks for your contribution!
|
||||
Unfortunately, we don't use GitHub pull requests to manage code
|
||||
contributions to this repository.
|
||||
Instead, please see [README.md](../blob/HEAD/README.md) which
|
||||
provides full instructions on how to get involved.
|
44
thirdparty/sentry-native/external/breakpad/.github/workflows/coverity.yml
vendored
Normal file
44
thirdparty/sentry-native/external/breakpad/.github/workflows/coverity.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
# GitHub actions workflow.
|
||||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
|
||||
|
||||
# https://scan.coverity.com/projects/gentoo-pax-utils
|
||||
name: Coverity Scan
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
schedule:
|
||||
# The GH mirroring from Google GoB does not trigger push actions.
|
||||
# Fire it once a week to provide some coverage.
|
||||
- cron: '39 2 * * WED'
|
||||
|
||||
# Allow for manual triggers from the web.
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
coverity:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
steps:
|
||||
- name: Checkout depot_tools
|
||||
run: git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git ../depot_tools
|
||||
|
||||
- name: Checkout breakpad
|
||||
run: |
|
||||
set -xe
|
||||
PATH+=:$PWD/../depot_tools
|
||||
gclient config --unmanaged --name=src https://github.com/${{ github.repository }}
|
||||
gclient sync --no-history --nohooks
|
||||
|
||||
- run: ./configure --disable-silent-rules
|
||||
working-directory: src
|
||||
|
||||
- uses: vapier/coverity-scan-action@v0
|
||||
with:
|
||||
project: google%2Fbreakpad
|
||||
command: make -C src -O -j$(getconf _NPROCESSORS_CONF)
|
||||
email: google-breakpad-dev@googlegroups.com
|
||||
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
92
thirdparty/sentry-native/external/breakpad/.gitignore
vendored
Normal file
92
thirdparty/sentry-native/external/breakpad/.gitignore
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
# Copyright 2014 Google Inc. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following disclaimer
|
||||
# in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of Google Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Ignore other VCSs.
|
||||
.repo/
|
||||
.svn/
|
||||
|
||||
# Ignore common compiled artifacts.
|
||||
*~
|
||||
*.dwo
|
||||
*.o
|
||||
lib*.a
|
||||
/breakpad.pc
|
||||
/breakpad-client.pc
|
||||
/src/client/linux/linux_client_unittest_shlib
|
||||
/src/client/linux/linux_dumper_unittest_helper
|
||||
/src/common/linux/google_crashdump_uploader_test
|
||||
/src/processor/microdump_stackwalk
|
||||
/src/processor/minidump_dump
|
||||
/src/processor/minidump_stackwalk
|
||||
/src/tools/linux/core2md/core2md
|
||||
/src/tools/linux/core_handler/core_handler
|
||||
/src/tools/linux/dump_syms/dump_syms
|
||||
/src/tools/linux/md2core/minidump-2-core
|
||||
/src/tools/linux/pid2md/pid2md
|
||||
/src/tools/linux/symupload/minidump_upload
|
||||
/src/tools/linux/symupload/sym_upload
|
||||
/src/tools/mac/dump_syms/dump_syms
|
||||
/src/tools/mac/dump_syms/dump_syms_mac
|
||||
|
||||
# Ignore unit test artifacts.
|
||||
*_unittest
|
||||
*.log
|
||||
*.trs
|
||||
|
||||
# Ignore autotools generated artifacts.
|
||||
.deps
|
||||
.dirstamp
|
||||
autom4te.cache/
|
||||
/config.cache
|
||||
config.h
|
||||
/config.log
|
||||
/config.status
|
||||
/Makefile
|
||||
stamp-h1
|
||||
|
||||
# Ignore GYP generated Visual Studio artifacts.
|
||||
*.filters
|
||||
*.sdf
|
||||
*.sln
|
||||
*.suo
|
||||
*.vcproj
|
||||
*.vcxproj
|
||||
|
||||
# Ignore GYP generated Makefiles
|
||||
src/Makefile
|
||||
*.Makefile
|
||||
*.target.mk
|
||||
|
||||
# Ignore compiled Python files.
|
||||
*.pyc
|
||||
|
||||
# Ignore directories gclient syncs.
|
||||
src/testing
|
||||
src/third_party/lss
|
||||
src/third_party/protobuf
|
||||
src/tools/gyp
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user