Bug 1713271 - Capture the initial maps during static initialisation r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D116339
This commit is contained in:
Paul Bone 2021-06-17 05:17:06 +00:00
Родитель f5893db395
Коммит 03fd9f1da8
2 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -621,6 +621,9 @@ class Replay {
mStdErr = reinterpret_cast<intptr_t>(GetStdHandle(STD_ERROR_HANDLE));
#else
mStdErr = fileno(stderr);
#endif
#ifdef XP_LINUX
BuildInitialMapInfo();
#endif
}
@ -1066,10 +1069,11 @@ class Replay {
#endif // XP_LINUX
};
static Replay replay;
int main(int argc, const char* argv[]) {
size_t first_pid = 0;
FdReader reader(0);
Replay replay;
for (int i = 1; i < argc; i++) {
const char* option = argv[i];
@ -1085,10 +1089,6 @@ int main(int argc, const char* argv[]) {
}
}
#ifdef XP_LINUX
replay.BuildInitialMapInfo();
#endif
/* Read log from stdin and dispatch function calls to the Replay instance.
* The log format is essentially:
* <pid> <tid> <function>([<args>])[=<result>]

Просмотреть файл

@ -16,6 +16,9 @@ SOURCES += [
"Replay.cpp",
]
if CONFIG["OS_TARGET"] == "Linux":
LDFLAGS += ["-static-libstdc++"]
if CONFIG["OS_TARGET"] == "Darwin":
# Work around "warning: 'aligned_alloc' is only available on macOS 10.15 or newer"
# when building with MACOSX_DEPLOYMENT_TARGET < 10.15 with >= 10.15 SDK.