mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 940821 - Build crashreporter in unified mode; r=ted
This commit is contained in:
parent
496577a876
commit
d009c157e2
@ -3,6 +3,9 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef InjectCrashReporter_h
|
||||
#define InjectCrashReporter_h
|
||||
|
||||
#include "nsThreadUtils.h"
|
||||
#include <windows.h>
|
||||
|
||||
@ -21,3 +24,5 @@ private:
|
||||
};
|
||||
|
||||
} // Namespace mozilla
|
||||
|
||||
#endif
|
||||
|
@ -36,7 +36,7 @@ int gArgc;
|
||||
char** gArgv;
|
||||
|
||||
static auto_ptr<ofstream> gLogStream(nullptr);
|
||||
static string gDumpFile;
|
||||
static string gReporterDumpFile;
|
||||
static string gExtraFile;
|
||||
|
||||
static string kExtraDataExtension = ".extra";
|
||||
@ -323,8 +323,8 @@ void DeleteDump()
|
||||
{
|
||||
const char* noDelete = getenv("MOZ_CRASHREPORTER_NO_DELETE_DUMP");
|
||||
if (!noDelete || *noDelete == '\0') {
|
||||
if (!gDumpFile.empty())
|
||||
UIDeleteFile(gDumpFile);
|
||||
if (!gReporterDumpFile.empty())
|
||||
UIDeleteFile(gReporterDumpFile);
|
||||
if (!gExtraFile.empty())
|
||||
UIDeleteFile(gExtraFile);
|
||||
}
|
||||
@ -337,7 +337,7 @@ void SendCompleted(bool success, const string& serverResponse)
|
||||
DeleteDump();
|
||||
}
|
||||
else {
|
||||
string directory = gDumpFile;
|
||||
string directory = gReporterDumpFile;
|
||||
int slashpos = directory.find_last_of("/\\");
|
||||
if (slashpos < 2)
|
||||
return;
|
||||
@ -446,14 +446,14 @@ int main(int argc, char** argv)
|
||||
return 0;
|
||||
|
||||
if (argc > 1) {
|
||||
gDumpFile = argv[1];
|
||||
gReporterDumpFile = argv[1];
|
||||
}
|
||||
|
||||
if (gDumpFile.empty()) {
|
||||
if (gReporterDumpFile.empty()) {
|
||||
// no dump file specified, run the default UI
|
||||
UIShowDefaultUI();
|
||||
} else {
|
||||
gExtraFile = GetExtraDataFilename(gDumpFile);
|
||||
gExtraFile = GetExtraDataFilename(gReporterDumpFile);
|
||||
if (gExtraFile.empty()) {
|
||||
UIError(gStrings[ST_ERROR_BADARGUMENTS]);
|
||||
return 0;
|
||||
@ -514,13 +514,13 @@ int main(int argc, char** argv)
|
||||
|
||||
OpenLogFile();
|
||||
|
||||
if (!UIFileExists(gDumpFile)) {
|
||||
if (!UIFileExists(gReporterDumpFile)) {
|
||||
UIError(gStrings[ST_ERROR_DUMPFILEEXISTS]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
string pendingDir = gSettingsPath + UI_DIR_SEPARATOR + "pending";
|
||||
if (!MoveCrashData(pendingDir, gDumpFile, gExtraFile)) {
|
||||
if (!MoveCrashData(pendingDir, gReporterDumpFile, gExtraFile)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -575,7 +575,7 @@ int main(int argc, char** argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!UIShowCrashUI(gDumpFile, queryParameters, sendURL, restartArgs))
|
||||
if (!UIShowCrashUI(gReporterDumpFile, queryParameters, sendURL, restartArgs))
|
||||
DeleteDump();
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,10 @@
|
||||
|
||||
#define WM_UPLOADCOMPLETE WM_APP
|
||||
|
||||
// Thanks, Windows.h :(
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
using std::string;
|
||||
using std::wstring;
|
||||
using std::map;
|
||||
|
@ -8,18 +8,18 @@ if CONFIG['OS_TARGET'] != 'Android':
|
||||
PROGRAM = 'crashreporter'
|
||||
# The xpcshell test case here verifies that the CA certificate list
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'crashreporter.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'crashreporter_win.cpp',
|
||||
]
|
||||
DEFINES['UNICODE'] = True
|
||||
DEFINES['_UNICODE'] = True
|
||||
elif CONFIG['OS_ARCH'] == 'Darwin':
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'crashreporter_unix_common.cpp',
|
||||
]
|
||||
elif CONFIG['OS_ARCH'] == 'SunOS':
|
||||
@ -29,13 +29,13 @@ elif CONFIG['OS_ARCH'] == 'SunOS':
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_ENABLE_GTK']:
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'crashreporter_gtk_common.cpp',
|
||||
'crashreporter_linux.cpp',
|
||||
'crashreporter_unix_common.cpp'
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'Darwin':
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'crashreporter_osx.mm',
|
||||
]
|
||||
|
@ -4,7 +4,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'crash_generation_client.cc',
|
||||
'crash_generation_server.cc',
|
||||
]
|
||||
|
@ -4,7 +4,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'../log/log.cc',
|
||||
'exception_handler.cc',
|
||||
'minidump_descriptor.cc',
|
||||
|
@ -4,7 +4,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'linux_dumper.cc',
|
||||
'linux_ptrace_dumper.cc',
|
||||
'minidump_writer.cc',
|
||||
|
@ -4,7 +4,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'crash_generation_client.cc',
|
||||
'crash_generation_server.cc',
|
||||
]
|
||||
|
@ -4,7 +4,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'breakpad_nlist_64.cc',
|
||||
'dynamic_images.cc',
|
||||
'exception_handler.cc',
|
||||
|
@ -25,10 +25,3 @@ OS_CXXFLAGS += -DHAVE_MACH_O_NLIST_H
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifneq (WINNT,$(OS_TARGET))
|
||||
# Headers from this directory are included as "common/header.h". Having
|
||||
# -I$(srcdir) on the command line makes us use common/memory.h when
|
||||
# <memory.h> is included from system headers, which is not intended.
|
||||
INCLUDES = $(LOCAL_INCLUDES) -I$(DIST)/include
|
||||
endif
|
||||
|
@ -4,17 +4,21 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'elfutils.cc',
|
||||
'file_id.cc',
|
||||
'guid_creator.cc',
|
||||
'linux_libc_support.cc',
|
||||
'memory_mapped_file.cc',
|
||||
'safe_readlink.cc',
|
||||
]
|
||||
|
||||
# file_id.cc cannot be built in unified mode because it uses a custom STL_FLAGS
|
||||
SOURCES += [
|
||||
'file_id.cc',
|
||||
]
|
||||
|
||||
if CONFIG['OS_TARGET'] != 'Android':
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'http_upload.cc',
|
||||
]
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'arch_utilities.cc',
|
||||
'bootstrap_compat.cc',
|
||||
'file_id.cc',
|
||||
@ -19,7 +19,7 @@ SOURCES += [
|
||||
# The host lib is used for dump_syms, and the target lib for the
|
||||
# crash reporter client. Therefore, we don't need all the srcs in both.
|
||||
if CONFIG['MOZ_CRASHREPORTER']:
|
||||
HOST_SOURCES += SOURCES
|
||||
HOST_SOURCES += UNIFIED_SOURCES
|
||||
HOST_SOURCES += [
|
||||
'dump_syms.mm',
|
||||
]
|
||||
|
@ -7,11 +7,8 @@
|
||||
if CONFIG['OS_ARCH'] in ('Darwin', 'Linux'):
|
||||
DIRS += ['dwarf']
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'convert_UTF.c',
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
'logging.cc',
|
||||
'module.cc',
|
||||
'pathname_stripper.cc',
|
||||
@ -20,7 +17,7 @@ SOURCES += [
|
||||
]
|
||||
|
||||
if CONFIG['OS_TARGET'] != 'WINNT':
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'arm_ex_reader.cc',
|
||||
'arm_ex_to_module.cc',
|
||||
'dwarf/bytereader.cc',
|
||||
@ -34,7 +31,7 @@ if CONFIG['OS_TARGET'] != 'WINNT':
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'Linux':
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'linux/dump_symbols.cc',
|
||||
'linux/elf_symbols_to_module.cc',
|
||||
]
|
||||
@ -43,7 +40,7 @@ if CONFIG['OS_TARGET'] == 'Android':
|
||||
pass
|
||||
else:
|
||||
if CONFIG['OS_TARGET'] != 'WINNT':
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'stabs_reader.cc',
|
||||
'stabs_to_module.cc',
|
||||
]
|
||||
@ -69,11 +66,12 @@ if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_CRASHREPORTER']:
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'Darwin':
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'mac/dump_syms.mm',
|
||||
]
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
# We don't support unifying assembly files.
|
||||
SOURCES += [
|
||||
'android/breakpad_getcontext.S',
|
||||
]
|
||||
|
@ -4,7 +4,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'dump_symbols.cc',
|
||||
'file_id.cc',
|
||||
'guid_creator.cc',
|
||||
|
@ -4,7 +4,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'basic_code_modules.cc',
|
||||
'basic_source_line_resolver.cc',
|
||||
'call_stack.cc',
|
||||
|
@ -50,7 +50,7 @@ DIRS += ['client']
|
||||
|
||||
if CONFIG['MOZ_CRASHREPORTER_INJECTOR']:
|
||||
DIRS += ['injector']
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'InjectCrashReporter.cpp',
|
||||
'LoadLibraryRemote.cpp',
|
||||
]
|
||||
@ -61,12 +61,12 @@ EXPORTS += [
|
||||
'nsExceptionHandler.h',
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'nsExceptionHandler.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'Darwin':
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'mac_utils.mm',
|
||||
]
|
||||
|
||||
|
@ -8,7 +8,7 @@ NO_DIST_INSTALL = True
|
||||
XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini', 'unit_ipc/xpcshell.ini']
|
||||
BROWSER_CHROME_MANIFESTS += ['browser/browser.ini']
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'../google-breakpad/src/common/logging.cc',
|
||||
'../google-breakpad/src/common/pathname_stripper.cc',
|
||||
'../google-breakpad/src/processor/basic_code_modules.cc',
|
||||
|
Loading…
Reference in New Issue
Block a user