Add a makefile target to dump and upload breakpad symbols

This commit is contained in:
David Sansome 2013-03-10 17:17:43 +11:00
parent 8fae3bfa9c
commit 796f803028
4 changed files with 28 additions and 1 deletions

View File

@ -91,6 +91,8 @@ endif()
add_library(libbreakpad_common STATIC ${COMMON_SOURCES})
add_library(breakpad STATIC ${LIBRARY_SOURCES})
# This is used by cmake/DumpSymbols.cmake
add_executable(dump_syms ${DUMP_SYMS_SOURCES})
target_link_libraries(breakpad libbreakpad_common)

View File

@ -454,6 +454,10 @@ if(HAVE_MOODBAR)
add_subdirectory(gst/moodbar)
endif()
# Breakpad symbol target. Included after everything else since it uses some
# variables defined above.
include(cmake/DumpSymbols.cmake)
# Uninstall support
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"

14
cmake/DumpSymbols.cmake Normal file
View File

@ -0,0 +1,14 @@
if (HAVE_BREAKPAD)
add_custom_target(breakpad_symbols
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMAND python
../dist/dump_all_symbols.py
--symbols_directory breakpad_symbols
--dump_syms_binary "$<TARGET_FILE:dump_syms>"
--crashreporting_hostname "${CRASHREPORTING_HOSTNAME}"
"$<TARGET_FILE:clementine>"
COMMENT "Dumping and uploading breakpad symbols to ${CRASHREPORTING_HOSTNAME}"
)
add_dependencies(breakpad_symbols clementine dump_syms)
endif()

View File

@ -28,7 +28,14 @@ class BaseDumperImpl(object):
raise NotImplementedError
def DebugSymbolsFilename(self, filename):
return filename
class Context(object):
def __enter__(self):
return filename
def __exit__(self, exc_type, exc_value, traceback):
pass
return Context()
class LinuxDumperImpl(BaseDumperImpl):