Update sentry-native sdk to latest
There's a crash fix in sentry itself due to threading race
This commit is contained in:
parent
4d811ba975
commit
0f13ab8065
|
@ -1,30 +1,81 @@
|
|||
# Changelog
|
||||
|
||||
## 0.5.4
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Better error messages in `sentry_transport_curl`. ([#777](https://github.com/getsentry/sentry-native/pull/777))
|
||||
- Increased curl headers buffer size to 512 (in `sentry_transport_curl`). ([#784](https://github.com/getsentry/sentry-native/pull/784))
|
||||
- Fix sporadic crash on Windows due to race condition when initializing background-worker thread-id. ([#785](https://github.com/getsentry/sentry-native/pull/785))
|
||||
- Open the database file-lock on "UNIX" with `O_RDRW` ([#791](https://github.com/getsentry/sentry-native/pull/791))
|
||||
|
||||
**Internal**:
|
||||
|
||||
- Updated Breakpad and Crashpad backends to 2022-12-12. ([#778](https://github.com/getsentry/sentry-native/pull/778))
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@cnicolaescu](https://github.com/cnicolaescu)
|
||||
|
||||
## 0.5.3
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Linux module-finder now also searches for code-id in ".note" ELF sections ([#775](https://github.com/getsentry/sentry-native/pull/775))
|
||||
|
||||
**Internal**:
|
||||
|
||||
- CI: updated github actions to upgrade deprecated node runners. ([#767](https://github.com/getsentry/sentry-native/pull/767))
|
||||
- CI: upgraded Ubuntu to 20.04 for "old gcc" (v7) job due to deprecation. ([#768](https://github.com/getsentry/sentry-native/pull/768))
|
||||
|
||||
## 0.5.2
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Fix build when CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION is undefined. ([crashpad#73](https://github.com/getsentry/crashpad/pull/73))
|
||||
|
||||
**Internal**:
|
||||
|
||||
- Updated Breakpad and Crashpad backends to 2022-10-17. ([#765](https://github.com/getsentry/sentry-native/pull/765))
|
||||
|
||||
**Thank you**:
|
||||
|
||||
Features, fixes and improvements in this release have been contributed by:
|
||||
|
||||
- [@AenBleidd](https://github.com/AenBleidd)
|
||||
|
||||
## 0.5.1
|
||||
|
||||
**Features**:
|
||||
|
||||
- Crashpad on Windows now supports `fast-fail` crashes via a registered Windows Error Reporting (WER) module. ([#735](https://github.com/getsentry/sentry-native/pull/735))
|
||||
|
||||
**Fixes**:
|
||||
|
||||
- Fix "flush" implementation of winhttp transport. ([#763](https://github.com/getsentry/sentry-native/pull/763))
|
||||
|
||||
**Internal**:
|
||||
|
||||
- Updated libunwindstack-ndk submodule to 2022-09-16. ([#759](https://github.com/getsentry/sentry-native/pull/759))
|
||||
- Updated Breakpad and Crashpad backends to 2022-09-14. ([#735](https://github.com/getsentry/sentry-native/pull/735))
|
||||
- Be more defensive around transactions ([#757](https://github.com/getsentry/sentry-native/pull/757))
|
||||
- Added a CI timeout for the Android simulator start. ([#764](https://github.com/getsentry/sentry-native/pull/764))
|
||||
|
||||
## 0.5.0
|
||||
|
||||
**Features**
|
||||
**Features**:
|
||||
|
||||
- Provide `on_crash()` callback to allow clients to act on detected crashes.
|
||||
Users often inquired about distinguishing between crashes and "normal" events in the `before_send()` hook.
|
||||
`on_crash()` can be considered a replacement for `before_send()` for crash events, where the goal is to use
|
||||
`before_send()` only for normal events, while `on_crash()` is only invoked for crashes. This change is backward
|
||||
compatible for current users of `before_send()` and allows gradual migration to `on_crash()`
|
||||
([see the docs for details](https://docs.sentry.io/platforms/native/configuration/filtering/)).
|
||||
([#724](https://github.com/getsentry/sentry-native/pull/724),
|
||||
[#734](https://github.com/getsentry/sentry-native/pull/734))
|
||||
Users often inquired about distinguishing between crashes and "normal" events in the `before_send()` hook. `on_crash()` can be considered a replacement for `before_send()` for crash events, where the goal is to use `before_send()` only for normal events, while `on_crash()` is only invoked for crashes. This change is backward compatible for current users of `before_send()` and allows gradual migration to `on_crash()` ([see the docs for details](https://docs.sentry.io/platforms/native/configuration/filtering/)). ([#724](https://github.com/getsentry/sentry-native/pull/724), [#734](https://github.com/getsentry/sentry-native/pull/734))
|
||||
|
||||
**Fixes**
|
||||
**Fixes**:
|
||||
|
||||
- Make Windows ModuleFinder more resilient to missing Debug Info
|
||||
([#732](https://github.com/getsentry/sentry-native/pull/732))
|
||||
- Aligned pre-send event processing in `sentry_capture_event()` with the
|
||||
[cross-SDK session filter order](https://develop.sentry.dev/sdk/sessions/#filter-order)
|
||||
([#729](https://github.com/getsentry/sentry-native/pull/729))
|
||||
- Align the default value initialization for the `environment` payload attribute with the
|
||||
[developer documentation](https://develop.sentry.dev/sdk/event-payloads/#optional-attribute)
|
||||
([#739](https://github.com/getsentry/sentry-native/pull/739))
|
||||
- Iterate all debug directory entries when parsing PE modules for a valid CodeView record
|
||||
([#740](https://github.com/getsentry/sentry-native/pull/740))
|
||||
- Make Windows ModuleFinder more resilient to missing Debug Info ([#732](https://github.com/getsentry/sentry-native/pull/732))
|
||||
- Aligned pre-send event processing in `sentry_capture_event()` with the [cross-SDK session filter order](https://develop.sentry.dev/sdk/sessions/#filter-order) ([#729](https://github.com/getsentry/sentry-native/pull/729))
|
||||
- Align the default value initialization for the `environment` payload attribute with the [developer documentation](https://develop.sentry.dev/sdk/event-payloads/#optional-attribute) ([#739](https://github.com/getsentry/sentry-native/pull/739))
|
||||
- Iterate all debug directory entries when parsing PE modules for a valid CodeView record ([#740](https://github.com/getsentry/sentry-native/pull/740))
|
||||
|
||||
**Thank you**:
|
||||
|
||||
|
@ -608,6 +659,7 @@ See [#220](https://github.com/getsentry/sentry-native/issues/220) for details.
|
|||
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));
|
||||
|
|
|
@ -436,6 +436,9 @@ if(SENTRY_BACKEND_CRASHPAD)
|
|||
set(CRASHPAD_ENABLE_INSTALL ON CACHE BOOL "Enable crashpad installation" FORCE)
|
||||
endif()
|
||||
add_subdirectory(external/crashpad crashpad_build)
|
||||
if(CRASHPAD_WER_ENABLED)
|
||||
add_compile_definitions(CRASHPAD_WER_ENABLED)
|
||||
endif()
|
||||
|
||||
# set static runtime if enabled
|
||||
if(SENTRY_BUILD_RUNTIMESTATIC AND MSVC)
|
||||
|
@ -448,6 +451,9 @@ if(SENTRY_BACKEND_CRASHPAD)
|
|||
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>")
|
||||
if(CRASHPAD_WER_ENABLED)
|
||||
set_property(TARGET crashpad_wer PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
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()
|
||||
|
@ -464,6 +470,9 @@ if(SENTRY_BACKEND_CRASHPAD)
|
|||
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})
|
||||
if(CRASHPAD_WER_ENABLED)
|
||||
set_target_properties(crashpad_wer PROPERTIES FOLDER ${SENTRY_FOLDER})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(sentry PRIVATE
|
||||
|
@ -476,9 +485,16 @@ if(SENTRY_BACKEND_CRASHPAD)
|
|||
if(WIN32 AND MSVC)
|
||||
sentry_install(FILES $<TARGET_PDB_FILE:crashpad_handler>
|
||||
DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL)
|
||||
if (CRASHPAD_WER_ENABLED)
|
||||
sentry_install(FILES $<TARGET_PDB_FILE:crashpad_wer>
|
||||
DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
add_dependencies(sentry crashpad::handler)
|
||||
if(CRASHPAD_WER_ENABLED)
|
||||
add_dependencies(sentry crashpad::wer)
|
||||
endif()
|
||||
elseif(SENTRY_BACKEND_BREAKPAD)
|
||||
option(SENTRY_BREAKPAD_SYSTEM "Use system breakpad" OFF)
|
||||
if(SENTRY_BREAKPAD_SYSTEM)
|
||||
|
@ -568,6 +584,10 @@ if(SENTRY_BUILD_EXAMPLES)
|
|||
|
||||
if(MSVC)
|
||||
target_compile_options(sentry_example PRIVATE $<BUILD_INTERFACE:/wd5105>)
|
||||
if(CRASHPAD_WER_ENABLED)
|
||||
# to test handling SEH by-passing exceptions we need to enable the control flow guard
|
||||
target_compile_options(sentry_example PRIVATE $<BUILD_INTERFACE:/guard:cf>)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# set static runtime if enabled
|
||||
|
|
|
@ -122,7 +122,7 @@ 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:
|
||||
The example currently supports the following commands:
|
||||
|
||||
- `capture-event`: Captures an event.
|
||||
- `crash`: Triggers a crash to be captured.
|
||||
|
@ -141,6 +141,11 @@ The example currently supports the following commends:
|
|||
- `add-stacktrace`: Adds the current thread stacktrace to the captured event.
|
||||
- `disable-backend`: Disables the build-configured crash-handler backend.
|
||||
- `before-send`: Installs a `before_send()` callback that retains the event.
|
||||
- `discarding-before-send`: Installs a `before_send()` callback that retains the event.
|
||||
- `discarding-before-send`: Installs a `before_send()` callback that discards the event.
|
||||
- `on-crash`: Installs an `on_crash()` callback that retains the crash event.
|
||||
- `discarding-on-crash`: Installs an `on_crash()` callback that discards the crash event.
|
||||
|
||||
Only on Windows using crashpad with its WER handler module:
|
||||
|
||||
- `fastfail`: Crashes the application using the `__fastfail` intrinsic directly, thus by-passing SEH.
|
||||
- `stack-buffer-overrun`: Triggers the Windows Control Flow Guard, which also fast fails and in turn by-passes SEH.
|
||||
|
|
|
@ -315,8 +315,14 @@ Other important configuration options include:
|
|||
|
||||
- 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
|
||||
`before_send` or `on_crash` hook. It will also lose any events that have been queued for
|
||||
sending at time of crash.
|
||||
- The Crashpad backend on Windows supports fast-fail crashes, which bypass SEH (Structured
|
||||
Exception Handling) primarily for security reasons. `sentry-native` registers a WER (Windows Error
|
||||
Reporting) module, which signals the `crashpad_handler` to send a minidump when a fast-fail crash occurs
|
||||
But since this process bypasses SEH, the application local exception handler is no longer invoked, which
|
||||
also means that for these kinds of crashes, `before_send` and `on_crash` will not be invoked before
|
||||
sending the minidump and thus have no effect.
|
||||
|
||||
## Development
|
||||
|
||||
|
|
|
@ -93,6 +93,53 @@ has_arg(int argc, char **argv, const char *arg)
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef CRASHPAD_WER_ENABLED
|
||||
int
|
||||
call_rffe_many_times()
|
||||
{
|
||||
RaiseFailFastException(NULL, NULL, 0);
|
||||
RaiseFailFastException(NULL, NULL, 0);
|
||||
RaiseFailFastException(NULL, NULL, 0);
|
||||
RaiseFailFastException(NULL, NULL, 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
typedef int (*crash_func)();
|
||||
|
||||
void
|
||||
indirect_call(crash_func func)
|
||||
{
|
||||
// This code always generates CFG guards.
|
||||
func();
|
||||
}
|
||||
|
||||
static void
|
||||
trigger_stack_buffer_overrun()
|
||||
{
|
||||
// Call into the middle of the Crashy function.
|
||||
crash_func func = (crash_func)((uintptr_t)(call_rffe_many_times) + 16);
|
||||
__try {
|
||||
// Generates a STATUS_STACK_BUFFER_OVERRUN exception if CFG triggers.
|
||||
indirect_call(func);
|
||||
} __except (EXCEPTION_EXECUTE_HANDLER) {
|
||||
// CFG fast fail should never be caught.
|
||||
printf(
|
||||
"If you see me, then CFG wasn't enabled (compile with /guard:cf)");
|
||||
}
|
||||
// Should only reach here if CFG is disabled.
|
||||
abort();
|
||||
}
|
||||
|
||||
static void
|
||||
trigger_fastfail_crash()
|
||||
{
|
||||
// this bypasses WINDOWS SEH and will only be caught with the crashpad WER
|
||||
// module enabled
|
||||
__fastfail(77);
|
||||
}
|
||||
|
||||
#endif // CRASHPAD_WER_ENABLED
|
||||
|
||||
#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
|
||||
|
@ -250,6 +297,14 @@ main(int argc, char **argv)
|
|||
if (has_arg(argc, argv, "crash")) {
|
||||
trigger_crash();
|
||||
}
|
||||
#ifdef CRASHPAD_WER_ENABLED
|
||||
if (has_arg(argc, argv, "fastfail")) {
|
||||
trigger_fastfail_crash();
|
||||
}
|
||||
if (has_arg(argc, argv, "stack-buffer-overrun")) {
|
||||
trigger_stack_buffer_overrun();
|
||||
}
|
||||
#endif
|
||||
if (has_arg(argc, argv, "assert")) {
|
||||
assert(0);
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
# 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.
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2014 Google Inc. All rights reserved.
|
||||
# Copyright 2014 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
|
@ -10,7 +10,7 @@
|
|||
# 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
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
|
@ -69,7 +69,7 @@ config.h
|
|||
/Makefile
|
||||
stamp-h1
|
||||
|
||||
# Ignore GYP generated Visual Studio artifacts.
|
||||
# Ignore generated Visual Studio artifacts.
|
||||
*.filters
|
||||
*.sdf
|
||||
*.sln
|
||||
|
@ -77,7 +77,7 @@ stamp-h1
|
|||
*.vcproj
|
||||
*.vcxproj
|
||||
|
||||
# Ignore GYP generated Makefiles
|
||||
# Ignore generated Makefiles
|
||||
src/Makefile
|
||||
*.Makefile
|
||||
*.target.mk
|
||||
|
@ -89,4 +89,3 @@ src/Makefile
|
|||
src/testing
|
||||
src/third_party/lss
|
||||
src/third_party/protobuf
|
||||
src/tools/gyp
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2010 Google Inc. All rights reserved.
|
||||
# Copyright 2010 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
|
@ -10,7 +10,7 @@
|
|||
# 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
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
|
@ -43,15 +43,10 @@ deps = {
|
|||
"https://github.com/google/protobuf.git" +
|
||||
"@cb6dd4ef5f82e41e06179dcd57d3b1d9246ad6ac",
|
||||
|
||||
# GYP project generator.
|
||||
"src/src/tools/gyp":
|
||||
"https://chromium.googlesource.com/external/gyp/" +
|
||||
"@324dd166b7c0b39d513026fa52d6280ac6d56770",
|
||||
|
||||
# Linux syscall support.
|
||||
"src/src/third_party/lss":
|
||||
"https://chromium.googlesource.com/linux-syscall-support/" +
|
||||
"@e1e7b0ad8ee99a875b272c8e33e308472e897660",
|
||||
"@9719c1e1e676814c456b55f5f070eabad6709d31",
|
||||
}
|
||||
|
||||
hooks = [
|
||||
|
@ -61,24 +56,3 @@ hooks = [
|
|||
"src/DEPS", "src/default.xml"],
|
||||
},
|
||||
]
|
||||
|
||||
hooks_os = {
|
||||
'win': [
|
||||
{
|
||||
# TODO(chrisha): Fix the GYP files so that they work without
|
||||
# --no-circular-check.
|
||||
"pattern": ".",
|
||||
"action": ["python",
|
||||
"src/src/tools/gyp/gyp_main.py",
|
||||
"--no-circular-check",
|
||||
"src/src/client/windows/breakpad_client.gyp"],
|
||||
},
|
||||
{
|
||||
# XXX: this and above should all be wired into build/all.gyp ?
|
||||
"action": ["python",
|
||||
"src/src/tools/gyp/gyp_main.py",
|
||||
"--no-circular-check",
|
||||
"src/src/tools/windows/tools_windows.gyp"],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
Copyright (c) 2006, Google Inc.
|
||||
All rights reserved.
|
||||
Copyright 2006 Google LLC
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
|||
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
|
||||
* Neither the name of Google LLC nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# Copyright (c) 2011, Google Inc.
|
||||
# All rights reserved.
|
||||
# Copyright 2011 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
|
@ -13,7 +12,7 @@
|
|||
# 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
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
|
@ -119,6 +118,22 @@ TEST_LIBS = src/testing/libtesting.a
|
|||
TEST_DEPS = $(TEST_LIBS)
|
||||
endif
|
||||
|
||||
|
||||
## Setup test driver
|
||||
if ANDROID_HOST
|
||||
# Since Autotools 1.2, tests are run through a special "test driver" script.
|
||||
# Unfortunately, it's not possible anymore to specify an alternative shell to
|
||||
# run them on connected devices, so use a slightly modified version of the
|
||||
# driver for Android.
|
||||
LOG_DRIVER = $(top_srcdir)/android/test-driver
|
||||
else
|
||||
if TESTS_AS_ROOT
|
||||
LOG_DRIVER = $(top_srcdir)/autotools/root-test-driver $(top_srcdir)/autotools/test-driver
|
||||
else
|
||||
LOG_DRIVER = $(top_srcdir)/autotools/test-driver
|
||||
endif !TESTS_AS_ROOT
|
||||
endif !ANDROID_HOST
|
||||
|
||||
## Libraries
|
||||
check_LIBRARIES =
|
||||
noinst_LIBRARIES =
|
||||
|
@ -126,12 +141,17 @@ lib_LIBRARIES =
|
|||
libexec_PROGRAMS =
|
||||
bin_PROGRAMS =
|
||||
check_PROGRAMS =
|
||||
noinst_PROGRAMS =
|
||||
noinst_SCRIPTS =
|
||||
EXTRA_PROGRAMS =
|
||||
CLEANFILES =
|
||||
|
||||
check_LIBRARIES += src/testing/libtesting.a
|
||||
|
||||
#
|
||||
# Tests helper library
|
||||
#
|
||||
if !SYSTEM_TEST_LIBS
|
||||
check_LIBRARIES += src/testing/libtesting.a
|
||||
endif
|
||||
src_testing_libtesting_a_SOURCES = \
|
||||
src/breakpad_googletest_includes.h \
|
||||
src/testing/googletest/src/gtest-all.cc \
|
||||
|
@ -139,62 +159,171 @@ src_testing_libtesting_a_SOURCES = \
|
|||
src/testing/googlemock/src/gmock-all.cc
|
||||
src_testing_libtesting_a_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# General
|
||||
# Not specific to processor, client or tools
|
||||
#
|
||||
|
||||
check_PROGRAMS += src/common/safe_math_unittest
|
||||
|
||||
|
||||
#
|
||||
# Breakpad minidump and microdump
|
||||
# processor library, tools and tests
|
||||
#
|
||||
if !DISABLE_PROCESSOR
|
||||
|
||||
lib_LIBRARIES += src/libbreakpad.a
|
||||
pkgconfig_DATA += breakpad.pc
|
||||
noinst_LIBRARIES += src/third_party/libdisasm/libdisasm.a
|
||||
endif
|
||||
|
||||
## Programs
|
||||
bin_PROGRAMS += \
|
||||
src/processor/microdump_stackwalk \
|
||||
src/processor/minidump_dump \
|
||||
src/processor/minidump_stackwalk
|
||||
|
||||
## Tests (binaries)
|
||||
check_PROGRAMS += \
|
||||
src/common/test_assembler_unittest \
|
||||
src/common/dwarf/dwarf2reader_lineinfo_unittest \
|
||||
src/common/dwarf/dwarf2reader_splitfunctions_unittest \
|
||||
src/processor/address_map_unittest \
|
||||
src/processor/basic_source_line_resolver_unittest \
|
||||
src/processor/cfi_frame_info_unittest \
|
||||
src/processor/contained_range_map_unittest \
|
||||
src/processor/disassembler_objdump_unittest \
|
||||
src/processor/disassembler_x86_unittest \
|
||||
src/processor/exploitability_unittest \
|
||||
src/processor/fast_source_line_resolver_unittest \
|
||||
src/processor/map_serializers_unittest \
|
||||
src/processor/microdump_processor_unittest \
|
||||
src/processor/minidump_processor_unittest \
|
||||
src/processor/minidump_unittest \
|
||||
src/processor/static_address_map_unittest \
|
||||
src/processor/static_contained_range_map_unittest \
|
||||
src/processor/static_map_unittest \
|
||||
src/processor/static_range_map_unittest \
|
||||
src/processor/pathname_stripper_unittest \
|
||||
src/processor/postfix_evaluator_unittest \
|
||||
src/processor/proc_maps_linux_unittest \
|
||||
src/processor/range_map_truncate_lower_unittest \
|
||||
src/processor/range_map_truncate_upper_unittest \
|
||||
src/processor/range_map_unittest \
|
||||
src/processor/stackwalker_amd64_unittest \
|
||||
src/processor/stackwalker_arm_unittest \
|
||||
src/processor/stackwalker_arm64_unittest \
|
||||
src/processor/stackwalker_address_list_unittest \
|
||||
src/processor/stackwalker_mips_unittest \
|
||||
src/processor/stackwalker_mips64_unittest \
|
||||
src/processor/stackwalker_riscv_unittest \
|
||||
src/processor/stackwalker_riscv64_unittest \
|
||||
src/processor/stackwalker_x86_unittest \
|
||||
src/processor/synth_minidump_unittest
|
||||
if SELFTEST
|
||||
check_PROGRAMS += \
|
||||
src/processor/stackwalker_selftest
|
||||
endif SELFTEST
|
||||
|
||||
## Tests (scripts)
|
||||
check_SCRIPTS = \
|
||||
src/processor/microdump_stackwalk_test \
|
||||
src/processor/microdump_stackwalk_machine_readable_test \
|
||||
src/processor/minidump_dump_test \
|
||||
src/processor/minidump_stackwalk_test \
|
||||
src/processor/minidump_stackwalk_machine_readable_test
|
||||
|
||||
endif !DISABLE_PROCESSOR
|
||||
|
||||
|
||||
#
|
||||
# Breakpad client library and tests
|
||||
#
|
||||
# Currently Linux only, the macOS client
|
||||
# is built using an Xcode project instead.
|
||||
#
|
||||
if LINUX_HOST
|
||||
|
||||
lib_LIBRARIES += src/client/linux/libbreakpad_client.a
|
||||
pkgconfig_DATA += breakpad-client.pc
|
||||
|
||||
src_client_linux_libbreakpad_client_a_SOURCES = \
|
||||
src/client/linux/crash_generation/crash_generation_client.cc \
|
||||
src/client/linux/crash_generation/crash_generation_server.cc \
|
||||
src/client/linux/dump_writer_common/thread_info.cc \
|
||||
src/client/linux/dump_writer_common/ucontext_reader.cc \
|
||||
src/client/linux/handler/exception_handler.cc \
|
||||
src/client/linux/handler/exception_handler.h \
|
||||
src/client/linux/handler/minidump_descriptor.cc \
|
||||
src/client/linux/handler/minidump_descriptor.h \
|
||||
src/client/linux/log/log.cc \
|
||||
src/client/linux/log/log.h \
|
||||
src/client/linux/microdump_writer/microdump_writer.cc \
|
||||
src/client/linux/microdump_writer/microdump_writer.h \
|
||||
src/client/linux/minidump_writer/linux_core_dumper.cc \
|
||||
src/client/linux/minidump_writer/linux_dumper.cc \
|
||||
src/client/linux/minidump_writer/linux_ptrace_dumper.cc \
|
||||
src/client/linux/minidump_writer/minidump_writer.cc \
|
||||
src/client/linux/minidump_writer/pe_file.cc \
|
||||
src/client/minidump_file_writer-inl.h \
|
||||
src/client/minidump_file_writer.cc \
|
||||
src/client/minidump_file_writer.h \
|
||||
src/common/convert_UTF.cc \
|
||||
src/common/convert_UTF.h \
|
||||
src/common/md5.cc \
|
||||
src/common/md5.h \
|
||||
src/common/string_conversion.cc \
|
||||
src/common/string_conversion.h \
|
||||
src/common/linux/elf_core_dump.cc \
|
||||
src/common/linux/elfutils.cc \
|
||||
src/common/linux/elfutils.h \
|
||||
src/common/linux/file_id.cc \
|
||||
src/common/linux/file_id.h \
|
||||
src/common/linux/guid_creator.cc \
|
||||
src/common/linux/guid_creator.h \
|
||||
src/common/linux/linux_libc_support.cc \
|
||||
src/common/linux/memory_mapped_file.cc \
|
||||
src/common/linux/safe_readlink.cc
|
||||
if !HAVE_GETCONTEXT
|
||||
src_client_linux_libbreakpad_client_a_SOURCES += \
|
||||
src/common/linux/breakpad_getcontext.S
|
||||
endif
|
||||
check_PROGRAMS += \
|
||||
src/client/linux/linux_client_unittest \
|
||||
src/common/linux/google_crashdump_uploader_test
|
||||
|
||||
EXTRA_PROGRAMS += \
|
||||
src/client/linux/linux_dumper_unittest_helper \
|
||||
src/client/linux/linux_client_unittest_shlib
|
||||
|
||||
CLEANFILES += \
|
||||
src/client/linux/linux_dumper_unittest_helper \
|
||||
src/client/linux/linux_client_unittest_shlib
|
||||
|
||||
endif LINUX_HOST
|
||||
|
||||
if !DISABLE_PROCESSOR
|
||||
|
||||
#
|
||||
# Various Breakpad tools
|
||||
# This includes symbol dumpers and uploaders
|
||||
#
|
||||
if !DISABLE_TOOLS
|
||||
|
||||
if LINUX_HOST
|
||||
|
||||
bin_PROGRAMS += \
|
||||
src/tools/linux/core2md/core2md \
|
||||
src/tools/linux/pid2md/pid2md \
|
||||
src/tools/linux/dump_syms/dump_syms \
|
||||
src/tools/linux/md2core/minidump-2-core \
|
||||
src/tools/linux/symupload/minidump_upload \
|
||||
src/tools/linux/symupload/sym_upload
|
||||
if X86_HOST
|
||||
bin_PROGRAMS += \
|
||||
src/tools/mac/dump_syms/dump_syms_mac
|
||||
endif
|
||||
if HAVE_MEMFD_CREATE
|
||||
libexec_PROGRAMS += \
|
||||
src/tools/linux/core_handler/core_handler
|
||||
endif
|
||||
|
||||
check_PROGRAMS += \
|
||||
src/common/dumper_unittest \
|
||||
src/tools/linux/md2core/minidump_2_core_unittest
|
||||
if X86_HOST
|
||||
check_PROGRAMS += \
|
||||
src/common/mac/macho_reader_unittest
|
||||
endif
|
||||
|
||||
endif LINUX_HOST
|
||||
|
||||
endif !DISABLE_TOOLS
|
||||
|
||||
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
|
||||
|
||||
## Non-installables
|
||||
noinst_SCRIPTS += $(check_SCRIPTS)
|
||||
|
||||
|
||||
## Target definitions
|
||||
|
||||
# All targets that were defined above should now be
|
||||
# declared below. This should be done unconditionally
|
||||
# so DO NOT wrap them in conditions!
|
||||
# Execept for conditionally adding a specific file or
|
||||
# flag that should only be added for a specific arch,
|
||||
# system, etc.
|
||||
|
||||
src_common_safe_math_unittest_SOURCES = \
|
||||
src/common/safe_math.h \
|
||||
src/common/safe_math_unittest.cc
|
||||
src_common_safe_math_unittest_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_common_safe_math_unittest_LDADD = \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
# Breakpad processor library
|
||||
src_libbreakpad_a_SOURCES = \
|
||||
src/google_breakpad/common/breakpad_types.h \
|
||||
src/google_breakpad/common/minidump_format.h \
|
||||
|
@ -237,6 +366,8 @@ src_libbreakpad_a_SOURCES = \
|
|||
src/processor/contained_range_map.h \
|
||||
src/processor/convert_old_arm64_context.cc \
|
||||
src/processor/convert_old_arm64_context.h \
|
||||
src/processor/disassembler_objdump.h \
|
||||
src/processor/disassembler_objdump.cc \
|
||||
src/processor/disassembler_x86.h \
|
||||
src/processor/disassembler_x86.cc \
|
||||
src/processor/dump_context.cc \
|
||||
|
@ -296,6 +427,10 @@ src_libbreakpad_a_SOURCES = \
|
|||
src/processor/stackwalker_ppc.h \
|
||||
src/processor/stackwalker_ppc64.cc \
|
||||
src/processor/stackwalker_ppc64.h \
|
||||
src/processor/stackwalker_riscv.cc \
|
||||
src/processor/stackwalker_riscv.h \
|
||||
src/processor/stackwalker_riscv64.cc \
|
||||
src/processor/stackwalker_riscv64.h \
|
||||
src/processor/stackwalker_sparc.cc \
|
||||
src/processor/stackwalker_sparc.h \
|
||||
src/processor/stackwalker_x86.cc \
|
||||
|
@ -315,6 +450,7 @@ src_libbreakpad_a_SOURCES = \
|
|||
src/processor/tokenize.cc \
|
||||
src/processor/tokenize.h
|
||||
|
||||
# libdisasm 3rd party library
|
||||
src_third_party_libdisasm_libdisasm_a_SOURCES = \
|
||||
src/third_party/libdisasm/ia32_implicit.c \
|
||||
src/third_party/libdisasm/ia32_implicit.h \
|
||||
|
@ -343,131 +479,51 @@ src_third_party_libdisasm_libdisasm_a_SOURCES = \
|
|||
src/third_party/libdisasm/x86_operand_list.c \
|
||||
src/third_party/libdisasm/x86_operand_list.h
|
||||
|
||||
## Programs
|
||||
bin_PROGRAMS += \
|
||||
src/processor/microdump_stackwalk \
|
||||
src/processor/minidump_dump \
|
||||
src/processor/minidump_stackwalk
|
||||
endif !DISABLE_PROCESSOR
|
||||
|
||||
if LINUX_HOST
|
||||
EXTRA_PROGRAMS += \
|
||||
src/client/linux/linux_dumper_unittest_helper
|
||||
CLEANFILES += \
|
||||
src/client/linux/linux_dumper_unittest_helper
|
||||
|
||||
if !DISABLE_TOOLS
|
||||
bin_PROGRAMS += \
|
||||
src/tools/linux/core2md/core2md \
|
||||
src/tools/linux/pid2md/pid2md \
|
||||
src/tools/linux/dump_syms/dump_syms \
|
||||
src/tools/linux/md2core/minidump-2-core \
|
||||
src/tools/linux/symupload/minidump_upload \
|
||||
src/tools/linux/symupload/sym_upload
|
||||
if X86_HOST
|
||||
bin_PROGRAMS += \
|
||||
src/tools/mac/dump_syms/dump_syms_mac
|
||||
endif
|
||||
if HAVE_MEMFD_CREATE
|
||||
libexec_PROGRAMS += \
|
||||
src/tools/linux/core_handler/core_handler
|
||||
endif
|
||||
endif
|
||||
endif LINUX_HOST
|
||||
|
||||
|
||||
## Tests
|
||||
if !DISABLE_PROCESSOR
|
||||
check_PROGRAMS += \
|
||||
src/common/test_assembler_unittest \
|
||||
src/common/dwarf/dwarf2reader_lineinfo_unittest \
|
||||
src/common/dwarf/dwarf2reader_splitfunctions_unittest \
|
||||
src/processor/address_map_unittest \
|
||||
src/processor/basic_source_line_resolver_unittest \
|
||||
src/processor/cfi_frame_info_unittest \
|
||||
src/processor/contained_range_map_unittest \
|
||||
src/processor/disassembler_x86_unittest \
|
||||
src/processor/exploitability_unittest \
|
||||
src/processor/fast_source_line_resolver_unittest \
|
||||
src/processor/map_serializers_unittest \
|
||||
src/processor/microdump_processor_unittest \
|
||||
src/processor/minidump_processor_unittest \
|
||||
src/processor/minidump_unittest \
|
||||
src/processor/static_address_map_unittest \
|
||||
src/processor/static_contained_range_map_unittest \
|
||||
src/processor/static_map_unittest \
|
||||
src/processor/static_range_map_unittest \
|
||||
src/processor/pathname_stripper_unittest \
|
||||
src/processor/postfix_evaluator_unittest \
|
||||
src/processor/proc_maps_linux_unittest \
|
||||
src/processor/range_map_truncate_lower_unittest \
|
||||
src/processor/range_map_truncate_upper_unittest \
|
||||
src/processor/range_map_unittest \
|
||||
src/processor/stackwalker_amd64_unittest \
|
||||
src/processor/stackwalker_arm_unittest \
|
||||
src/processor/stackwalker_arm64_unittest \
|
||||
src/processor/stackwalker_address_list_unittest \
|
||||
src/processor/stackwalker_mips_unittest \
|
||||
src/processor/stackwalker_mips64_unittest \
|
||||
src/processor/stackwalker_x86_unittest \
|
||||
src/processor/synth_minidump_unittest
|
||||
# Breakpad client
|
||||
src_client_linux_libbreakpad_client_a_SOURCES = \
|
||||
src/client/linux/crash_generation/crash_generation_client.cc \
|
||||
src/client/linux/crash_generation/crash_generation_server.cc \
|
||||
src/client/linux/dump_writer_common/thread_info.cc \
|
||||
src/client/linux/dump_writer_common/ucontext_reader.cc \
|
||||
src/client/linux/handler/exception_handler.cc \
|
||||
src/client/linux/handler/exception_handler.h \
|
||||
src/client/linux/handler/minidump_descriptor.cc \
|
||||
src/client/linux/handler/minidump_descriptor.h \
|
||||
src/client/linux/log/log.cc \
|
||||
src/client/linux/log/log.h \
|
||||
src/client/linux/microdump_writer/microdump_writer.cc \
|
||||
src/client/linux/microdump_writer/microdump_writer.h \
|
||||
src/client/linux/minidump_writer/linux_core_dumper.cc \
|
||||
src/client/linux/minidump_writer/linux_dumper.cc \
|
||||
src/client/linux/minidump_writer/linux_ptrace_dumper.cc \
|
||||
src/client/linux/minidump_writer/minidump_writer.cc \
|
||||
src/client/linux/minidump_writer/pe_file.cc \
|
||||
src/client/minidump_file_writer-inl.h \
|
||||
src/client/minidump_file_writer.cc \
|
||||
src/client/minidump_file_writer.h \
|
||||
src/common/convert_UTF.cc \
|
||||
src/common/convert_UTF.h \
|
||||
src/common/md5.cc \
|
||||
src/common/md5.h \
|
||||
src/common/string_conversion.cc \
|
||||
src/common/string_conversion.h \
|
||||
src/common/linux/elf_core_dump.cc \
|
||||
src/common/linux/elfutils.cc \
|
||||
src/common/linux/elfutils.h \
|
||||
src/common/linux/file_id.cc \
|
||||
src/common/linux/file_id.h \
|
||||
src/common/linux/guid_creator.cc \
|
||||
src/common/linux/guid_creator.h \
|
||||
src/common/linux/linux_libc_support.cc \
|
||||
src/common/linux/memory_mapped_file.cc \
|
||||
src/common/linux/safe_readlink.cc
|
||||
if !HAVE_GETCONTEXT
|
||||
src_client_linux_libbreakpad_client_a_SOURCES += \
|
||||
src/common/linux/breakpad_getcontext.S
|
||||
endif
|
||||
|
||||
if LINUX_HOST
|
||||
EXTRA_PROGRAMS += \
|
||||
src/client/linux/linux_client_unittest_shlib
|
||||
CLEANFILES += \
|
||||
src/client/linux/linux_client_unittest_shlib
|
||||
# Client tests
|
||||
|
||||
check_PROGRAMS += \
|
||||
src/client/linux/linux_client_unittest \
|
||||
src/common/linux/google_crashdump_uploader_test
|
||||
|
||||
if !DISABLE_TOOLS
|
||||
check_PROGRAMS += \
|
||||
src/common/dumper_unittest \
|
||||
src/tools/linux/md2core/minidump_2_core_unittest
|
||||
if X86_HOST
|
||||
check_PROGRAMS += \
|
||||
src/common/mac/macho_reader_unittest
|
||||
endif
|
||||
endif
|
||||
endif LINUX_HOST
|
||||
|
||||
if !DISABLE_PROCESSOR
|
||||
if SELFTEST
|
||||
check_PROGRAMS += \
|
||||
src/processor/stackwalker_selftest
|
||||
endif SELFTEST
|
||||
endif !DISABLE_PROCESSOR
|
||||
|
||||
if !DISABLE_PROCESSOR
|
||||
check_SCRIPTS = \
|
||||
src/processor/microdump_stackwalk_test \
|
||||
src/processor/microdump_stackwalk_machine_readable_test \
|
||||
src/processor/minidump_dump_test \
|
||||
src/processor/minidump_stackwalk_test \
|
||||
src/processor/minidump_stackwalk_machine_readable_test
|
||||
endif
|
||||
|
||||
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
|
||||
|
||||
if ANDROID_HOST
|
||||
# Since Autotools 1.2, tests are run through a special "test driver" script.
|
||||
# Unfortunately, it's not possible anymore to specify an alternative shell to
|
||||
# run them on connected devices, so use a slightly modified version of the
|
||||
# driver for Android.
|
||||
LOG_DRIVER = $(top_srcdir)/android/test-driver
|
||||
else
|
||||
# The default Autotools test driver script.
|
||||
if TESTS_AS_ROOT
|
||||
LOG_DRIVER = $(top_srcdir)/autotools/root-test-driver $(top_srcdir)/autotools/test-driver
|
||||
else
|
||||
LOG_DRIVER = $(top_srcdir)/autotools/test-driver
|
||||
endif !TESTS_AS_ROOT
|
||||
endif !ANDROID_HOST
|
||||
|
||||
if LINUX_HOST
|
||||
src_client_linux_linux_dumper_unittest_helper_SOURCES = \
|
||||
src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
src_client_linux_linux_dumper_unittest_helper_LDFLAGS=$(PTHREAD_CFLAGS)
|
||||
|
@ -575,7 +631,8 @@ src_client_linux_linux_client_unittest_LDADD = \
|
|||
src_client_linux_linux_client_unittest_DEPENDENCIES = \
|
||||
src/client/linux/linux_client_unittest_shlib
|
||||
|
||||
if !DISABLE_TOOLS
|
||||
# Tools
|
||||
|
||||
src_tools_linux_core2md_core2md_SOURCES = \
|
||||
src/tools/linux/core2md/core2md.cc
|
||||
|
||||
|
@ -583,14 +640,12 @@ src_tools_linux_core2md_core2md_LDADD = \
|
|||
src/client/linux/libbreakpad_client.a \
|
||||
src/common/path_helper.o
|
||||
|
||||
if HAVE_MEMFD_CREATE
|
||||
src_tools_linux_core_handler_core_handler_SOURCES = \
|
||||
src/tools/linux/core_handler/core_handler.cc
|
||||
|
||||
src_tools_linux_core_handler_core_handler_LDADD = \
|
||||
src/client/linux/libbreakpad_client.a \
|
||||
src/common/path_helper.o
|
||||
endif
|
||||
|
||||
src_tools_linux_pid2md_pid2md_SOURCES = \
|
||||
src/tools/linux/pid2md/pid2md.cc
|
||||
|
@ -627,7 +682,8 @@ src_tools_linux_dump_syms_dump_syms_SOURCES = \
|
|||
src_tools_linux_dump_syms_dump_syms_CXXFLAGS = \
|
||||
$(RUSTC_DEMANGLE_CFLAGS)
|
||||
src_tools_linux_dump_syms_dump_syms_LDADD = \
|
||||
$(RUSTC_DEMANGLE_LIBS)
|
||||
$(RUSTC_DEMANGLE_LIBS) \
|
||||
-lz
|
||||
|
||||
src_tools_linux_md2core_minidump_2_core_SOURCES = \
|
||||
src/common/linux/memory_mapped_file.cc \
|
||||
|
@ -755,7 +811,8 @@ src_common_dumper_unittest_CPPFLAGS = \
|
|||
src_common_dumper_unittest_LDADD = \
|
||||
$(TEST_LIBS) \
|
||||
$(RUSTC_DEMANGLE_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS) \
|
||||
-lz
|
||||
|
||||
src_common_mac_macho_reader_unittest_SOURCES = \
|
||||
src/common/dwarf_cfi_to_module.cc \
|
||||
|
@ -789,7 +846,6 @@ src_common_mac_macho_reader_unittest_CPPFLAGS = \
|
|||
src_common_mac_macho_reader_unittest_LDADD = \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
endif
|
||||
|
||||
src_common_linux_google_crashdump_uploader_test_SOURCES = \
|
||||
src/common/linux/google_crashdump_uploader.cc \
|
||||
|
@ -810,9 +866,6 @@ src_tools_linux_md2core_minidump_2_core_unittest_LDADD = \
|
|||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
endif LINUX_HOST
|
||||
|
||||
if !DISABLE_PROCESSOR
|
||||
src_processor_address_map_unittest_SOURCES = \
|
||||
src/processor/address_map_unittest.cc
|
||||
src_processor_address_map_unittest_LDADD = \
|
||||
|
@ -858,6 +911,7 @@ src_processor_exploitability_unittest_LDADD = \
|
|||
src/processor/convert_old_arm64_context.o \
|
||||
src/processor/minidump_processor.o \
|
||||
src/processor/process_state.o \
|
||||
src/processor/disassembler_objdump.o \
|
||||
src/processor/disassembler_x86.o \
|
||||
src/processor/exploitability.o \
|
||||
src/processor/exploitability_linux.o \
|
||||
|
@ -884,6 +938,8 @@ src_processor_exploitability_unittest_LDADD = \
|
|||
src/processor/stackwalker_mips.o \
|
||||
src/processor/stackwalker_ppc.o \
|
||||
src/processor/stackwalker_ppc64.o \
|
||||
src/processor/stackwalker_riscv.o \
|
||||
src/processor/stackwalker_riscv64.o \
|
||||
src/processor/stackwalker_sparc.o \
|
||||
src/processor/stackwalker_x86.o \
|
||||
src/processor/symbolic_constants_win.o \
|
||||
|
@ -892,6 +948,19 @@ src_processor_exploitability_unittest_LDADD = \
|
|||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_disassembler_objdump_unittest_SOURCES = \
|
||||
src/processor/disassembler_objdump_unittest.cc
|
||||
src_processor_disassembler_objdump_unittest_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_disassembler_objdump_unittest_LDADD = \
|
||||
src/processor/disassembler_objdump.o \
|
||||
src/processor/dump_context.o \
|
||||
src/processor/dump_object.o \
|
||||
src/processor/logging.o \
|
||||
src/processor/pathname_stripper.o \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_disassembler_x86_unittest_SOURCES = \
|
||||
src/processor/disassembler_x86_unittest.cc
|
||||
src_processor_disassembler_x86_unittest_CPPFLAGS = \
|
||||
|
@ -957,6 +1026,8 @@ src_processor_microdump_processor_unittest_LDADD = \
|
|||
src/processor/stackwalker_mips.o \
|
||||
src/processor/stackwalker_ppc.o \
|
||||
src/processor/stackwalker_ppc64.o \
|
||||
src/processor/stackwalker_riscv.o \
|
||||
src/processor/stackwalker_riscv64.o \
|
||||
src/processor/stackwalker_sparc.o \
|
||||
src/processor/stackwalker_x86.o \
|
||||
src/processor/tokenize.o \
|
||||
|
@ -973,6 +1044,7 @@ src_processor_minidump_processor_unittest_LDADD = \
|
|||
src/processor/call_stack.o \
|
||||
src/processor/cfi_frame_info.o \
|
||||
src/processor/convert_old_arm64_context.o \
|
||||
src/processor/disassembler_objdump.o \
|
||||
src/processor/disassembler_x86.o \
|
||||
src/processor/dump_context.o \
|
||||
src/processor/dump_object.o \
|
||||
|
@ -996,6 +1068,8 @@ src_processor_minidump_processor_unittest_LDADD = \
|
|||
src/processor/stackwalker_mips.o \
|
||||
src/processor/stackwalker_ppc.o \
|
||||
src/processor/stackwalker_ppc64.o \
|
||||
src/processor/stackwalker_riscv.o \
|
||||
src/processor/stackwalker_riscv64.o \
|
||||
src/processor/stackwalker_sparc.o \
|
||||
src/processor/stackwalker_x86.o \
|
||||
src/processor/symbolic_constants_win.o \
|
||||
|
@ -1120,6 +1194,7 @@ src_processor_stackwalker_selftest_LDADD = \
|
|||
src/processor/basic_code_modules.o \
|
||||
src/processor/basic_source_line_resolver.o \
|
||||
src/processor/call_stack.o \
|
||||
src/processor/disassembler_objdump.o \
|
||||
src/processor/disassembler_x86.o \
|
||||
src/processor/exploitability.o \
|
||||
src/processor/exploitability_linux.o \
|
||||
|
@ -1139,6 +1214,8 @@ src_processor_stackwalker_selftest_LDADD = \
|
|||
src/processor/stackwalker_mips.o \
|
||||
src/processor/stackwalker_ppc.o \
|
||||
src/processor/stackwalker_ppc64.o \
|
||||
src/processor/stackwalker_riscv.o \
|
||||
src/processor/stackwalker_riscv64.o \
|
||||
src/processor/stackwalker_sparc.o \
|
||||
src/processor/stackwalker_x86.o \
|
||||
src/processor/tokenize.o \
|
||||
|
@ -1204,6 +1281,26 @@ src_processor_stackwalker_mips64_unittest_LDADD = \
|
|||
src_processor_stackwalker_mips64_unittest_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
|
||||
src_processor_stackwalker_riscv_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/processor/stackwalker_riscv_unittest.cc
|
||||
src_processor_stackwalker_riscv_unittest_LDADD = \
|
||||
src/libbreakpad.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
src_processor_stackwalker_riscv_unittest_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
|
||||
src_processor_stackwalker_riscv64_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/processor/stackwalker_riscv64_unittest.cc
|
||||
src_processor_stackwalker_riscv64_unittest_LDADD = \
|
||||
src/libbreakpad.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
src_processor_stackwalker_riscv64_unittest_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
|
||||
src_processor_stackwalker_x86_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/processor/stackwalker_x86_unittest.cc
|
||||
|
@ -1260,10 +1357,6 @@ src_common_dwarf_dwarf2reader_splitfunctions_unittest_LDADD = \
|
|||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
## Non-installables
|
||||
noinst_PROGRAMS =
|
||||
noinst_SCRIPTS = $(check_SCRIPTS)
|
||||
|
||||
src_processor_minidump_dump_SOURCES = \
|
||||
src/processor/minidump_dump.cc
|
||||
src_processor_minidump_dump_LDADD = \
|
||||
|
@ -1307,6 +1400,8 @@ src_processor_microdump_stackwalk_LDADD = \
|
|||
src/processor/stackwalker_mips.o \
|
||||
src/processor/stackwalker_ppc.o \
|
||||
src/processor/stackwalker_ppc64.o \
|
||||
src/processor/stackwalker_riscv.o \
|
||||
src/processor/stackwalker_riscv64.o \
|
||||
src/processor/stackwalker_sparc.o \
|
||||
src/processor/stackwalker_x86.o \
|
||||
src/processor/tokenize.o \
|
||||
|
@ -1321,6 +1416,7 @@ src_processor_minidump_stackwalk_LDADD = \
|
|||
src/processor/call_stack.o \
|
||||
src/processor/cfi_frame_info.o \
|
||||
src/processor/convert_old_arm64_context.o \
|
||||
src/processor/disassembler_objdump.o \
|
||||
src/processor/disassembler_x86.o \
|
||||
src/processor/dump_context.o \
|
||||
src/processor/dump_object.o \
|
||||
|
@ -1346,14 +1442,14 @@ src_processor_minidump_stackwalk_LDADD = \
|
|||
src/processor/stackwalker_mips.o \
|
||||
src/processor/stackwalker_ppc.o \
|
||||
src/processor/stackwalker_ppc64.o \
|
||||
src/processor/stackwalker_riscv.o \
|
||||
src/processor/stackwalker_riscv64.o \
|
||||
src/processor/stackwalker_sparc.o \
|
||||
src/processor/stackwalker_x86.o \
|
||||
src/processor/symbolic_constants_win.o \
|
||||
src/processor/tokenize.o \
|
||||
src/third_party/libdisasm/libdisasm.a
|
||||
|
||||
endif !DISABLE_PROCESSOR
|
||||
|
||||
## Additional files to be included in a source distribution
|
||||
##
|
||||
## find src/client src/common src/processor/testdata src/tools \
|
||||
|
@ -1397,13 +1493,10 @@ EXTRA_DIST = \
|
|||
src/client/solaris/handler/minidump_test.cc \
|
||||
src/client/solaris/handler/solaris_lwp.cc \
|
||||
src/client/solaris/handler/solaris_lwp.h \
|
||||
src/client/windows/breakpad_client.gyp \
|
||||
src/client/windows/handler/exception_handler.cc \
|
||||
src/client/windows/handler/exception_handler.h \
|
||||
src/client/windows/handler/exception_handler.gyp \
|
||||
src/client/windows/sender/crash_report_sender.cc \
|
||||
src/client/windows/sender/crash_report_sender.h \
|
||||
src/client/windows/sender/crash_report_sender.gyp \
|
||||
src/common/dwarf/dwarf2diehandler.h \
|
||||
src/common/dwarf/dwarf2enums.h \
|
||||
src/common/dwarf/line_state_machine.h \
|
||||
|
@ -1613,9 +1706,7 @@ EXTRA_DIST = \
|
|||
src/tools/solaris/dump_syms/testdata/dump_syms_regtest.sym \
|
||||
src/tools/windows/converter/ms_symbol_server_converter.cc \
|
||||
src/tools/windows/converter/ms_symbol_server_converter.h \
|
||||
src/tools/windows/converter/ms_symbol_server_converter.gyp \
|
||||
src/tools/windows/dump_syms/dump_syms.cc \
|
||||
src/tools/windows/dump_syms/dump_syms.gyp \
|
||||
src/tools/windows/dump_syms/run_regtest.sh \
|
||||
src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc \
|
||||
src/tools/windows/dump_syms/testdata/dump_syms_regtest.pdb \
|
||||
|
@ -1625,8 +1716,7 @@ EXTRA_DIST = \
|
|||
src/tools/windows/dump_syms/testdata/omap_reorder_funcs.sym \
|
||||
src/tools/windows/dump_syms/testdata/omap_stretched.sym \
|
||||
src/tools/windows/dump_syms/testdata/omap_stretched_filled.sym \
|
||||
src/tools/windows/symupload/symupload.cc \
|
||||
src/tools/windows/symupload/symupload.gyp
|
||||
src/tools/windows/symupload/symupload.cc
|
||||
|
||||
mostlyclean-local:
|
||||
-find src -name '*.dwo' -exec rm -f {} +
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,4 @@
|
|||
# Copyright (c) 2012 Google Inc.
|
||||
# All rights reserved.
|
||||
# Copyright 2012 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
# 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
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# Copyright (c) 2012, Google Inc.
|
||||
# All rights reserved.
|
||||
# Copyright 2012 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
# 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
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
|
@ -80,6 +79,7 @@ LOCAL_SRC_FILES := \
|
|||
src/client/linux/minidump_writer/linux_dumper.cc \
|
||||
src/client/linux/minidump_writer/linux_ptrace_dumper.cc \
|
||||
src/client/linux/minidump_writer/minidump_writer.cc \
|
||||
src/client/linux/minidump_writer/pe_file.cc \
|
||||
src/client/minidump_file_writer.cc \
|
||||
src/common/convert_UTF.cc \
|
||||
src/common/md5.cc \
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/sh
|
||||
# Copyright (c) 2012 Google Inc.
|
||||
# All rights reserved.
|
||||
# Copyright 2012 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
|
@ -12,7 +11,7 @@
|
|||
# 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
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# Copyright (c) 2012, Google Inc.
|
||||
# All rights reserved.
|
||||
# Copyright 2012 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
# 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
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# Copyright (c) 2012, Google Inc.
|
||||
# All rights reserved.
|
||||
# Copyright 2012 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
# 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
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2012 Google Inc.
|
||||
# All rights reserved.
|
||||
# Copyright 2012 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
|
@ -13,7 +12,7 @@
|
|||
# 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
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
# Wrapper for Microsoft lib.exe
|
||||
|
||||
me=ar-lib
|
||||
scriptversion=2012-03-01.08; # UTC
|
||||
scriptversion=2019-07-04.01; # UTC
|
||||
|
||||
# Copyright (C) 2010-2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2010-2021 Free Software Foundation, Inc.
|
||||
# Written by Peter Rosin <peda@lysator.liu.se>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -18,7 +18,7 @@ scriptversion=2012-03-01.08; # UTC
|
|||
# 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, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
@ -53,7 +53,7 @@ func_file_conv ()
|
|||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
CYGWIN* | MSYS*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
|
@ -65,7 +65,7 @@ func_file_conv ()
|
|||
mingw)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin)
|
||||
cygwin | msys)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine)
|
||||
|
@ -224,7 +224,8 @@ elif test -n "$extract"; then
|
|||
esac
|
||||
done
|
||||
else
|
||||
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
|
||||
$AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \
|
||||
| while read member
|
||||
do
|
||||
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
||||
done
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
|
|||
# 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, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
@ -53,7 +53,7 @@ func_file_conv ()
|
|||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
CYGWIN* | MSYS*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
|
@ -67,7 +67,7 @@ func_file_conv ()
|
|||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
cygwin/* | msys/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
|
@ -255,7 +255,8 @@ EOF
|
|||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
||||
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
@ -339,9 +340,9 @@ exit $ret
|
|||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,9 +1,9 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
|
@ -16,7 +16,7 @@ scriptversion=2013-05-30.07; # UTC
|
|||
# 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, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
@ -783,9 +783,9 @@ exit 0
|
|||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2013-12-25.23; # UTC
|
||||
scriptversion=2020-11-14.01; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
|
@ -69,6 +69,11 @@ posix_mkdir=
|
|||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
# Create dirs (including intermediate dirs) using mode 755.
|
||||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
||||
mkdir_umask=22
|
||||
|
||||
backupsuffix=
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
|
@ -99,18 +104,28 @@ Options:
|
|||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-C install only if different (preserve data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-p pass -p to $cpprog.
|
||||
-s $stripprog installed files.
|
||||
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
|
||||
By default, rm is invoked with -f; when overridden with RMPROG,
|
||||
it's up to you to specify -f if you want it.
|
||||
|
||||
If -S is not specified, no backups are attempted.
|
||||
|
||||
Email bug reports to bug-automake@gnu.org.
|
||||
Automake home page: https://www.gnu.org/software/automake/
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
|
@ -137,8 +152,13 @@ while test $# -ne 0; do
|
|||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-p) cpprog="$cpprog -p";;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-S) backupsuffix="$2"
|
||||
shift;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
|
@ -255,6 +275,10 @@ do
|
|||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
# Don't chown directories that already exist.
|
||||
if test $dstdir_status = 0; then
|
||||
chowncmd=""
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
|
@ -271,15 +295,18 @@ do
|
|||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
# If destination is a directory, append the input filename.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstbase=`basename "$src"`
|
||||
case $dst in
|
||||
*/) dst=$dst$dstbase;;
|
||||
*) dst=$dst/$dstbase;;
|
||||
esac
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
|
@ -288,27 +315,16 @@ do
|
|||
fi
|
||||
fi
|
||||
|
||||
case $dstdir in
|
||||
*/) dstdirslash=$dstdir;;
|
||||
*) dstdirslash=$dstdir/;;
|
||||
esac
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
|
@ -318,43 +334,49 @@ do
|
|||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
# The $RANDOM variable is not portable (e.g., dash). Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
trap '
|
||||
ret=$?
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
|
||||
exit $ret
|
||||
' 0
|
||||
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p'.
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
|
@ -365,7 +387,7 @@ do
|
|||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
|
@ -394,7 +416,7 @@ do
|
|||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
(umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
|
@ -427,14 +449,25 @@ do
|
|||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
dsttmp=${dstdirslash}_inst.$$_
|
||||
rmtmp=${dstdirslash}_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
(umask $cp_umask &&
|
||||
{ test -z "$stripcmd" || {
|
||||
# Create $dsttmp read-write so that cp doesn't create it read-only,
|
||||
# which would cause strip to fail.
|
||||
if test -z "$doit"; then
|
||||
: >"$dsttmp" # No need to fork-exec 'touch'.
|
||||
else
|
||||
$doit touch "$dsttmp"
|
||||
fi
|
||||
}
|
||||
} &&
|
||||
$doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
|
@ -460,6 +493,13 @@ do
|
|||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# If $backupsuffix is set, and the file being installed
|
||||
# already exists, attempt a backup. Don't worry if it fails,
|
||||
# e.g., if mv doesn't support -f.
|
||||
if test -n "$backupsuffix" && test -f "$dst"; then
|
||||
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
|
@ -474,9 +514,9 @@ do
|
|||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
$doit $rmcmd "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
|
@ -493,9 +533,9 @@ do
|
|||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC
|
|||
# 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, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
@ -101,9 +101,9 @@ else
|
|||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
perl_URL=https://www.perl.org/
|
||||
flex_URL=https://github.com/westes/flex
|
||||
gnu_software_URL=https://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
|
@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
|||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#! /bin/sh
|
||||
# test-driver - basic testsuite driver script.
|
||||
|
||||
scriptversion=2013-07-13.22; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 2011-2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2011-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# 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
|
||||
|
@ -16,7 +16,7 @@ scriptversion=2013-07-13.22; # UTC
|
|||
# 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, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
@ -42,11 +42,13 @@ print_usage ()
|
|||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||
[--enable-hard-errors={yes|no}] [--]
|
||||
test-driver --test-name NAME --log-file PATH --trs-file PATH
|
||||
[--expect-failure {yes|no}] [--color-tests {yes|no}]
|
||||
[--enable-hard-errors {yes|no}] [--]
|
||||
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||
|
||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||
See the GNU Automake documentation for information.
|
||||
END
|
||||
}
|
||||
|
||||
|
@ -103,8 +105,11 @@ trap "st=130; $do_exit" 2
|
|||
trap "st=141; $do_exit" 13
|
||||
trap "st=143; $do_exit" 15
|
||||
|
||||
# Test script is run here.
|
||||
"$@" >$log_file 2>&1
|
||||
# Test script is run here. We create the file first, then append to it,
|
||||
# to ameliorate tests themselves also writing to the log file. Our tests
|
||||
# don't, but others can (automake bug#35762).
|
||||
: >"$log_file"
|
||||
"$@" >>"$log_file" 2>&1
|
||||
estatus=$?
|
||||
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
|
@ -126,7 +131,7 @@ esac
|
|||
# know whether the test passed or failed simply by looking at the '.log'
|
||||
# file, without the need of also peaking into the corresponding '.trs'
|
||||
# file (automake bug#11814).
|
||||
echo "$res $test_name (exit status: $estatus)" >>$log_file
|
||||
echo "$res $test_name (exit status: $estatus)" >>"$log_file"
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
|
@ -140,9 +145,9 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file
|
|||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,4 @@
|
|||
# Copyright (c) 2006, Google Inc.
|
||||
# All rights reserved.
|
||||
# Copyright 2006 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
# 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
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
|
@ -28,16 +27,16 @@
|
|||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
AC_PREREQ(2.64)
|
||||
AC_PREREQ([2.71])
|
||||
|
||||
AC_INIT(breakpad, 0.1, google-breakpad-dev@googlegroups.com)
|
||||
AC_INIT([breakpad],[0.1],[google-breakpad-dev@googlegroups.com])
|
||||
dnl Sanity check: the argument is just a file that should exist.
|
||||
AC_CONFIG_SRCDIR(README.md)
|
||||
AC_CONFIG_AUX_DIR(autotools)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE(subdir-objects tar-ustar 1.11.1)
|
||||
AM_INIT_AUTOMAKE(subdir-objects tar-ustar 1.13)
|
||||
AM_CONFIG_HEADER(src/config.h)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
|
@ -53,23 +52,22 @@ dnl This must come before all the feature tests below.
|
|||
AC_ARG_ENABLE(m32,
|
||||
AS_HELP_STRING([--enable-m32],
|
||||
[Compile/build with -m32]
|
||||
[(default is no)]),
|
||||
[case "${enableval}" in
|
||||
yes)
|
||||
[(default is no)]),,
|
||||
[enable_m32=no])
|
||||
if test "x$enable_m32" = xyes; then
|
||||
CFLAGS="${CFLAGS} -m32"
|
||||
CXXFLAGS="${CXXFLAGS} -m32"
|
||||
usem32=true
|
||||
;;
|
||||
no)
|
||||
usem32=false
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(bad value ${enableval} for --enable-m32)
|
||||
;;
|
||||
esac],
|
||||
[usem32=false])
|
||||
fi
|
||||
|
||||
m4_warn([obsolete],
|
||||
[The preprocessor macro `STDC_HEADERS' is obsolete.
|
||||
Except in unusual embedded environments, you can safely include all
|
||||
ISO C90 headers unconditionally.])dnl
|
||||
# Autoupdate added the next two lines to ensure that your configure
|
||||
# script's behavior did not change. They are probably safe to remove.
|
||||
AC_CHECK_INCLUDES_DEFAULT
|
||||
AC_PROG_EGREP
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_SYS_LARGEFILE
|
||||
AX_PTHREAD
|
||||
AC_CHECK_HEADERS([a.out.h sys/mman.h sys/random.h])
|
||||
|
@ -77,7 +75,7 @@ AC_CHECK_FUNCS([arc4random getcontext getrandom memfd_create])
|
|||
AM_CONDITIONAL([HAVE_GETCONTEXT], [test "x$ac_cv_func_getcontext" = xyes])
|
||||
AM_CONDITIONAL([HAVE_MEMFD_CREATE], [test "x$ac_cv_func_memfd_create" = xyes])
|
||||
|
||||
AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
|
||||
AX_CXX_COMPILE_STDCXX(17, noext, mandatory)
|
||||
|
||||
dnl Test supported warning flags.
|
||||
WARN_CXXFLAGS=
|
||||
|
@ -134,66 +132,33 @@ AM_CONDITIONAL(X86_HOST, test x$X86_HOST = xtrue)
|
|||
AC_ARG_ENABLE(processor,
|
||||
AS_HELP_STRING([--disable-processor],
|
||||
[Don't build processor library]
|
||||
[(default is no)]),
|
||||
[case "${enableval}" in
|
||||
yes)
|
||||
disable_processor=false
|
||||
;;
|
||||
no)
|
||||
disable_processor=true
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(bad value ${enableval} for --disable-processor)
|
||||
;;
|
||||
esac],
|
||||
[disable_processor=false])
|
||||
AM_CONDITIONAL(DISABLE_PROCESSOR, test x$disable_processor = xtrue)
|
||||
[(default is no)]),,
|
||||
[enable_processor=yes])
|
||||
AM_CONDITIONAL(DISABLE_PROCESSOR, test "x$enable_processor" != xyes)
|
||||
|
||||
AC_ARG_ENABLE(tools,
|
||||
AS_HELP_STRING([--disable-tools],
|
||||
[Don't build tool binaries]
|
||||
[(default is no)]),
|
||||
[case "${enableval}" in
|
||||
yes)
|
||||
disable_tools=false
|
||||
;;
|
||||
no)
|
||||
disable_tools=true
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(bad value ${enableval} for --disable-tools)
|
||||
;;
|
||||
esac],
|
||||
[disable_tools=false])
|
||||
AM_CONDITIONAL(DISABLE_TOOLS, test x$disable_tools = xtrue)
|
||||
[(default is no)]),,
|
||||
[enable_tools=yes])
|
||||
AM_CONDITIONAL(DISABLE_TOOLS, test "x$enable_tools" != xyes)
|
||||
|
||||
if test x$LINUX_HOST = xfalse -a x$disable_processor = xtrue -a x$disable_tools = xtrue; then
|
||||
if test x$LINUX_HOST = xfalse -a "x$enable_processor" != xyes -a "x$enable_tools" != xyes; then
|
||||
AC_MSG_ERROR([--disable-processor and --disable-tools were specified, and not building for Linux. Nothing to build!])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(system-test-libs,
|
||||
AS_HELP_STRING([--enable-system-test-libs],
|
||||
[Use gtest/gmock/etc... from the system instead ]
|
||||
[of the local copies (default is local)]),
|
||||
[case "${enableval}" in
|
||||
yes)
|
||||
system_test_libs=true
|
||||
;;
|
||||
no)
|
||||
system_test_libs=false
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(bad value ${enableval} for --enable-system-test-libs)
|
||||
;;
|
||||
esac],
|
||||
[system_test_libs=false])
|
||||
AM_CONDITIONAL(SYSTEM_TEST_LIBS, test x$system_test_libs = xtrue)
|
||||
[of the local copies (default is local)]),,
|
||||
[enable_system_test_libs=no])
|
||||
AM_CONDITIONAL(SYSTEM_TEST_LIBS, test "x$enable_system_test_libs" = xyes)
|
||||
|
||||
AC_ARG_VAR([GMOCK_CFLAGS], [Compiler flags for gmock])
|
||||
AC_ARG_VAR([GMOCK_LIBS], [Linker flags for gmock])
|
||||
AC_ARG_VAR([GTEST_CFLAGS], [Compiler flags for gtest])
|
||||
AC_ARG_VAR([GTEST_LIBS], [Linker flags for gtest])
|
||||
if test x$system_test_libs = xtrue; then
|
||||
if test "x$enable_system_test_libs" = xyes; then
|
||||
: "${GMOCK_CFLAGS:=-pthread}"
|
||||
: "${GMOCK_LIBS:=-lgmock -lgtest -pthread -lpthread}"
|
||||
: "${GTEST_CFLAGS:=-pthread}"
|
||||
|
@ -204,43 +169,55 @@ AC_ARG_ENABLE(selftest,
|
|||
AS_HELP_STRING([--enable-selftest],
|
||||
[Run extra tests with "make check" ]
|
||||
[(may conflict with optimizations) ]
|
||||
[(default is no)]),
|
||||
[case "${enableval}" in
|
||||
yes)
|
||||
selftest=true
|
||||
;;
|
||||
no)
|
||||
selftest=false
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(bad value ${enableval} for --enable-selftest)
|
||||
;;
|
||||
esac],
|
||||
[selftest=false])
|
||||
AM_CONDITIONAL(SELFTEST, test x$selftest = xtrue)
|
||||
[(default is no)]),,
|
||||
[enable_selftest=no])
|
||||
AM_CONDITIONAL(SELFTEST, test "x$enable_selftest" = xyes)
|
||||
|
||||
AC_ARG_WITH(rustc-demangle,
|
||||
AS_HELP_STRING([--with-rustc-demangle=/path/to/rustc-demangle],
|
||||
[Link against the rustc-demangle library]
|
||||
[to demangle Rust language symbols during]
|
||||
[symbol dumping (default is no)]
|
||||
[Pass the path to the crate root.]),
|
||||
[case "${withval}" in
|
||||
yes)
|
||||
AC_MSG_ERROR(You must pass the path to the rustc-demangle crate for --with-rustc-demangle)
|
||||
;;
|
||||
no)
|
||||
rustc_demangle=false
|
||||
;;
|
||||
*)
|
||||
if ! test -f "${withval}/Cargo.toml"; then
|
||||
[Pass the path to the crate root.]),,
|
||||
[with_rustc_demangle=no])
|
||||
|
||||
RUSTC_DEMANGLE_BASE_CFLAGS="-DHAVE_RUSTC_DEMANGLE"
|
||||
RUSTC_DEMANGLE_BASE_LIBS="-lrustc_demangle -lpthread -ldl"
|
||||
|
||||
if test "x${with_rustc_demangle}" != xno; then
|
||||
if ! test -f "${with_rustc_demangle}/Cargo.toml"; then
|
||||
AC_MSG_ERROR(You must pass the path to the rustc-demangle crate for --with-rustc-demangle)
|
||||
fi
|
||||
RUSTC_DEMANGLE_CFLAGS="-DHAVE_RUSTC_DEMANGLE -I${withval}/crates/capi/include"
|
||||
RUSTC_DEMANGLE_LIBS="-L${withval}/target/release -lrustc_demangle -lpthread -ldl"
|
||||
;;
|
||||
esac],
|
||||
[rustc_demangle=false])
|
||||
RUSTC_DEMANGLE_CFLAGS="-I${with_rustc_demangle}/crates/capi/include ${RUSTC_DEMANGLE_BASE_CFLAGS}"
|
||||
RUSTC_DEMANGLE_LIBS="-L${with_rustc_demangle}/target/release ${RUSTC_DEMANGLE_BASE_LIBS}"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(system-rustc-demangle,
|
||||
AS_HELP_STRING([--enable-system-rustc-demangle],
|
||||
[Link against the rustc-demangle library]
|
||||
[to demangle Rust language symbols during]
|
||||
[symbol dumping (default is no). This assumes]
|
||||
[that rustc-demangle is installed in your sysroot,]
|
||||
[and all headers from it are available in your]
|
||||
[standard include path]
|
||||
),,
|
||||
[enable_system_rustc_demangle=no])
|
||||
|
||||
if test "x${enable_system_rustc_demangle}" != xno; then
|
||||
if test "x${with_rustc_demangle}" != xno; then
|
||||
AC_MSG_ERROR([--enable-system-rustc-demangle and --with-rustc-demangle are mutually exclusive.])
|
||||
fi
|
||||
|
||||
RUSTC_DEMANGLE_CFLAGS="${RUSTC_DEMANGLE_BASE_CFLAGS}"
|
||||
RUSTC_DEMANGLE_LIBS="${RUSTC_DEMANGLE_BASE_LIBS}"
|
||||
|
||||
AC_CHECK_LIB([rustc_demangle], [rustc_demangle], [],
|
||||
[AC_MSG_ERROR(librustc_demangle.a must be present when --enable-system-rustc-demangle is specified)],
|
||||
[$RUSTC_DEMANGLE_LIBS])
|
||||
AC_CHECK_HEADERS(rustc_demangle.h, [],
|
||||
[AC_MSG_ERROR(rustc_demangle.h must be present when --enable-system-rustc-demangle is specified)])
|
||||
fi
|
||||
|
||||
AC_ARG_VAR([RUSTC_DEMANGLE_CFLAGS], [Compiler flags for rustc-demangle])
|
||||
AC_ARG_VAR([RUSTC_DEMANGLE_LIBS], [Linker flags for rustc-demangle])
|
||||
|
||||
|
@ -248,20 +225,9 @@ AC_ARG_WITH(tests-as-root,
|
|||
AS_HELP_STRING([--with-tests-as-root],
|
||||
[Run the tests as root. Use this on platforms]
|
||||
[like travis-ci.org that require root privileges]
|
||||
[to use ptrace (default is no)]),
|
||||
[case "${withval}" in
|
||||
yes)
|
||||
tests_as_root=true
|
||||
;;
|
||||
no)
|
||||
tests_as_root=false
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(--with-tests-as-root can only be "yes" or "no")
|
||||
;;
|
||||
esac],
|
||||
[tests_as_root=false])
|
||||
AM_CONDITIONAL(TESTS_AS_ROOT, test x$tests_as_root = xtrue)
|
||||
[to use ptrace (default is no)]),,
|
||||
[with_tests_as_root=no])
|
||||
AM_CONDITIONAL(TESTS_AS_ROOT, test "x$with_tests_as_root" = xyes)
|
||||
|
||||
AC_CONFIG_FILES(m4_flatten([
|
||||
breakpad.pc
|
||||
|
|
|
@ -20,11 +20,6 @@
|
|||
revision='refs/heads/main'
|
||||
remote='chromium' />
|
||||
|
||||
<project path='src/src/tools/gyp'
|
||||
name='external/gyp/'
|
||||
revision='324dd166b7c0b39d513026fa52d6280ac6d56770'
|
||||
remote='chromium' />
|
||||
|
||||
<project path='src/src/testing'
|
||||
name='google/googletest.git'
|
||||
revision='refs/tags/release-1.11.0'
|
||||
|
@ -32,7 +27,7 @@
|
|||
|
||||
<project path='src/src/third_party/lss'
|
||||
name='linux-syscall-support/'
|
||||
revision='e1e7b0ad8ee99a875b272c8e33e308472e897660'
|
||||
revision='9719c1e1e676814c456b55f5f070eabad6709d31'
|
||||
remote='chromium' />
|
||||
|
||||
<project path='src/src/third_party/protobuf/protobuf'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
|
@ -9,14 +9,14 @@
|
|||
# DESCRIPTION
|
||||
#
|
||||
# Check for baseline language coverage in the compiler for the specified
|
||||
# version of the C++ standard. If necessary, add switches to CXXFLAGS to
|
||||
# enable support. VERSION may be '11' (for the C++11 standard) or '14'
|
||||
# (for the C++14 standard).
|
||||
# version of the C++ standard. If necessary, add switches to CXX and
|
||||
# CXXCPP to enable support. VERSION may be '11', '14', '17', or '20' for
|
||||
# the respective C++ standard version.
|
||||
#
|
||||
# The second argument, if specified, indicates whether you insist on an
|
||||
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
|
||||
# -std=c++11). If neither is specified, you get whatever works, with
|
||||
# preference for an extended mode.
|
||||
# preference for no added switch, and then for an extended mode.
|
||||
#
|
||||
# The third argument, if specified 'mandatory' or if left unspecified,
|
||||
# indicates that baseline support for the specified C++ standard is
|
||||
|
@ -33,21 +33,26 @@
|
|||
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
|
||||
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
|
||||
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
|
||||
# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
|
||||
# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
|
||||
# Copyright (c) 2020 Jason Merrill <jason@redhat.com>
|
||||
# Copyright (c) 2021 Jörn Heusipp <osmanx@problemloesungsmaschine.de>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 1
|
||||
#serial 15
|
||||
|
||||
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
|
||||
dnl (serial version number 13).
|
||||
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
|
||||
m4_if([$1], [11], [],
|
||||
[$1], [14], [],
|
||||
[$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])],
|
||||
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
|
||||
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
|
||||
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
|
||||
[$1], [20], [ax_cxx_compile_alternatives="20"],
|
||||
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||
m4_if([$2], [], [],
|
||||
[$2], [ext], [],
|
||||
|
@ -59,6 +64,8 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
|
|||
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
|
||||
AC_LANG_PUSH([C++])dnl
|
||||
ac_success=no
|
||||
|
||||
m4_if([$2], [], [dnl
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
|
||||
ax_cv_cxx_compile_cxx$1,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
|
@ -66,22 +73,26 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
|
|||
[ax_cv_cxx_compile_cxx$1=no])])
|
||||
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
|
||||
ac_success=yes
|
||||
fi
|
||||
fi])
|
||||
|
||||
m4_if([$2], [noext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for switch in -std=gnu++$1 -std=gnu++0x; do
|
||||
for alternative in ${ax_cxx_compile_alternatives}; do
|
||||
switch="-std=gnu++${alternative}"
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
CXX="$CXX $switch"
|
||||
if test -n "$CXXCPP" ; then
|
||||
CXXCPP="$CXXCPP $switch"
|
||||
fi
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
|
@ -93,29 +104,37 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
|
|||
dnl HP's aCC needs +std=c++11 according to:
|
||||
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
|
||||
dnl Cray's crayCC needs "-h std=c++11"
|
||||
for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do
|
||||
for alternative in ${ax_cxx_compile_alternatives}; do
|
||||
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
CXX="$CXX $switch"
|
||||
if test -n "$CXXCPP" ; then
|
||||
CXXCPP="$CXXCPP $switch"
|
||||
fi
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test x$ac_success = xyes; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
AC_LANG_POP([C++])
|
||||
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
|
||||
if test x$ac_success = xno; then
|
||||
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
|
||||
fi
|
||||
else
|
||||
fi
|
||||
if test x$ac_success = xno; then
|
||||
HAVE_CXX$1=0
|
||||
AC_MSG_NOTICE([No compiler with C++$1 support was found])
|
||||
|
@ -124,9 +143,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
|
|||
AC_DEFINE(HAVE_CXX$1,1,
|
||||
[define if the compiler supports basic C++$1 syntax])
|
||||
fi
|
||||
|
||||
AC_SUBST(HAVE_CXX$1)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
|
@ -136,7 +153,6 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
|
|||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
)
|
||||
|
||||
|
||||
dnl Test body for checking C++14 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
|
||||
|
@ -144,6 +160,23 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
|
|||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
)
|
||||
|
||||
dnl Test body for checking C++17 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
|
||||
)
|
||||
|
||||
dnl Test body for checking C++20 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_20
|
||||
)
|
||||
|
||||
|
||||
dnl Tests for new features in C++11
|
||||
|
||||
|
@ -156,7 +189,11 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
|
|||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201103L
|
||||
// MSVC always sets __cplusplus to 199711L in older versions; newer versions
|
||||
// only set it correctly if /Zc:__cplusplus is specified as well as a
|
||||
// /std:c++NN switch:
|
||||
// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
|
||||
#elif __cplusplus < 201103L && !defined _MSC_VER
|
||||
|
||||
#error "This is not a C++11 compiler"
|
||||
|
||||
|
@ -181,11 +218,13 @@ namespace cxx11
|
|||
|
||||
struct Base
|
||||
{
|
||||
virtual ~Base() {}
|
||||
virtual void f() {}
|
||||
};
|
||||
|
||||
struct Derived : public Base
|
||||
{
|
||||
virtual ~Derived() override {}
|
||||
virtual void f() override {}
|
||||
};
|
||||
|
||||
|
@ -445,7 +484,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
|
|||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201402L
|
||||
#elif __cplusplus < 201402L && !defined _MSC_VER
|
||||
|
||||
#error "This is not a C++14 compiler"
|
||||
|
||||
|
@ -514,7 +553,7 @@ namespace cxx14
|
|||
|
||||
}
|
||||
|
||||
namespace test_digit_seperators
|
||||
namespace test_digit_separators
|
||||
{
|
||||
|
||||
constexpr auto ten_million = 100'000'000;
|
||||
|
@ -556,3 +595,415 @@ namespace cxx14
|
|||
#endif // __cplusplus >= 201402L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++17
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++17, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201703L && !defined _MSC_VER
|
||||
|
||||
#error "This is not a C++17 compiler"
|
||||
|
||||
#else
|
||||
|
||||
#include <initializer_list>
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
|
||||
namespace cxx17
|
||||
{
|
||||
|
||||
namespace test_constexpr_lambdas
|
||||
{
|
||||
|
||||
constexpr int foo = [](){return 42;}();
|
||||
|
||||
}
|
||||
|
||||
namespace test::nested_namespace::definitions
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
namespace test_fold_expression
|
||||
{
|
||||
|
||||
template<typename... Args>
|
||||
int multiply(Args... args)
|
||||
{
|
||||
return (args * ... * 1);
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
bool all(Args... args)
|
||||
{
|
||||
return (args && ...);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_extended_static_assert
|
||||
{
|
||||
|
||||
static_assert (true);
|
||||
|
||||
}
|
||||
|
||||
namespace test_auto_brace_init_list
|
||||
{
|
||||
|
||||
auto foo = {5};
|
||||
auto bar {5};
|
||||
|
||||
static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
|
||||
static_assert(std::is_same<int, decltype(bar)>::value);
|
||||
}
|
||||
|
||||
namespace test_typename_in_template_template_parameter
|
||||
{
|
||||
|
||||
template<template<typename> typename X> struct D;
|
||||
|
||||
}
|
||||
|
||||
namespace test_fallthrough_nodiscard_maybe_unused_attributes
|
||||
{
|
||||
|
||||
int f1()
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
|
||||
[[nodiscard]] int f2()
|
||||
{
|
||||
[[maybe_unused]] auto unused = f1();
|
||||
|
||||
switch (f1())
|
||||
{
|
||||
case 17:
|
||||
f1();
|
||||
[[fallthrough]];
|
||||
case 42:
|
||||
f1();
|
||||
}
|
||||
return f1();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_extended_aggregate_initialization
|
||||
{
|
||||
|
||||
struct base1
|
||||
{
|
||||
int b1, b2 = 42;
|
||||
};
|
||||
|
||||
struct base2
|
||||
{
|
||||
base2() {
|
||||
b3 = 42;
|
||||
}
|
||||
int b3;
|
||||
};
|
||||
|
||||
struct derived : base1, base2
|
||||
{
|
||||
int d;
|
||||
};
|
||||
|
||||
derived d1 {{1, 2}, {}, 4}; // full initialization
|
||||
derived d2 {{}, {}, 4}; // value-initialized bases
|
||||
|
||||
}
|
||||
|
||||
namespace test_general_range_based_for_loop
|
||||
{
|
||||
|
||||
struct iter
|
||||
{
|
||||
int i;
|
||||
|
||||
int& operator* ()
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
const int& operator* () const
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
iter& operator++()
|
||||
{
|
||||
++i;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
struct sentinel
|
||||
{
|
||||
int i;
|
||||
};
|
||||
|
||||
bool operator== (const iter& i, const sentinel& s)
|
||||
{
|
||||
return i.i == s.i;
|
||||
}
|
||||
|
||||
bool operator!= (const iter& i, const sentinel& s)
|
||||
{
|
||||
return !(i == s);
|
||||
}
|
||||
|
||||
struct range
|
||||
{
|
||||
iter begin() const
|
||||
{
|
||||
return {0};
|
||||
}
|
||||
|
||||
sentinel end() const
|
||||
{
|
||||
return {5};
|
||||
}
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
range r {};
|
||||
|
||||
for (auto i : r)
|
||||
{
|
||||
[[maybe_unused]] auto v = i;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambda_capture_asterisk_this_by_value
|
||||
{
|
||||
|
||||
struct t
|
||||
{
|
||||
int i;
|
||||
int foo()
|
||||
{
|
||||
return [*this]()
|
||||
{
|
||||
return i;
|
||||
}();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_enum_class_construction
|
||||
{
|
||||
|
||||
enum class byte : unsigned char
|
||||
{};
|
||||
|
||||
byte foo {42};
|
||||
|
||||
}
|
||||
|
||||
namespace test_constexpr_if
|
||||
{
|
||||
|
||||
template <bool cond>
|
||||
int f ()
|
||||
{
|
||||
if constexpr(cond)
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_selection_statement_with_initializer
|
||||
{
|
||||
|
||||
int f()
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
|
||||
int f2()
|
||||
{
|
||||
if (auto i = f(); i > 0)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
switch (auto i = f(); i + 4)
|
||||
{
|
||||
case 17:
|
||||
return 2;
|
||||
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_template_argument_deduction_for_class_templates
|
||||
{
|
||||
|
||||
template <typename T1, typename T2>
|
||||
struct pair
|
||||
{
|
||||
pair (T1 p1, T2 p2)
|
||||
: m1 {p1},
|
||||
m2 {p2}
|
||||
{}
|
||||
|
||||
T1 m1;
|
||||
T2 m2;
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
[[maybe_unused]] auto p = pair{13, 42u};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_non_type_auto_template_parameters
|
||||
{
|
||||
|
||||
template <auto n>
|
||||
struct B
|
||||
{};
|
||||
|
||||
B<5> b1;
|
||||
B<'a'> b2;
|
||||
|
||||
}
|
||||
|
||||
namespace test_structured_bindings
|
||||
{
|
||||
|
||||
int arr[2] = { 1, 2 };
|
||||
std::pair<int, int> pr = { 1, 2 };
|
||||
|
||||
auto f1() -> int(&)[2]
|
||||
{
|
||||
return arr;
|
||||
}
|
||||
|
||||
auto f2() -> std::pair<int, int>&
|
||||
{
|
||||
return pr;
|
||||
}
|
||||
|
||||
struct S
|
||||
{
|
||||
int x1 : 2;
|
||||
volatile double y1;
|
||||
};
|
||||
|
||||
S f3()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
auto [ x1, y1 ] = f1();
|
||||
auto& [ xr1, yr1 ] = f1();
|
||||
auto [ x2, y2 ] = f2();
|
||||
auto& [ xr2, yr2 ] = f2();
|
||||
const auto [ x3, y3 ] = f3();
|
||||
|
||||
}
|
||||
|
||||
namespace test_exception_spec_type_system
|
||||
{
|
||||
|
||||
struct Good {};
|
||||
struct Bad {};
|
||||
|
||||
void g1() noexcept;
|
||||
void g2();
|
||||
|
||||
template<typename T>
|
||||
Bad
|
||||
f(T*, T*);
|
||||
|
||||
template<typename T1, typename T2>
|
||||
Good
|
||||
f(T1*, T2*);
|
||||
|
||||
static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
|
||||
|
||||
}
|
||||
|
||||
namespace test_inline_variables
|
||||
{
|
||||
|
||||
template<class T> void f(T)
|
||||
{}
|
||||
|
||||
template<class T> inline T g(T)
|
||||
{
|
||||
return T{};
|
||||
}
|
||||
|
||||
template<> inline void f<>(int)
|
||||
{}
|
||||
|
||||
template<> int g<>(int)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx17
|
||||
|
||||
#endif // __cplusplus < 201703L && !defined _MSC_VER
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++20
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 202002L && !defined _MSC_VER
|
||||
|
||||
#error "This is not a C++20 compiler"
|
||||
|
||||
#else
|
||||
|
||||
#include <version>
|
||||
|
||||
namespace cxx20
|
||||
{
|
||||
|
||||
// As C++20 supports feature test macros in the standard, there is no
|
||||
// immediate need to actually test for feature availability on the
|
||||
// Autoconf side.
|
||||
|
||||
} // namespace cxx20
|
||||
|
||||
#endif // __cplusplus < 202002L && !defined _MSC_VER
|
||||
|
||||
]])
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2009, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2009 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
# 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.
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'All',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
'../common/common.gyp:*',
|
||||
'../processor/processor.gyp:*',
|
||||
'../tools/tools.gyp:*',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,57 +0,0 @@
|
|||
# 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.
|
||||
|
||||
{
|
||||
'target_conditions': [
|
||||
['OS!="win"', {
|
||||
'sources/': [
|
||||
['exclude', '(^|/)windows/'],
|
||||
],
|
||||
}],
|
||||
['OS!="linux"', {
|
||||
'sources/': [
|
||||
['exclude', '(^|/)linux/'],
|
||||
],
|
||||
}],
|
||||
['OS!="mac"', {
|
||||
'sources/': [
|
||||
['exclude', '(^|/)mac/'],
|
||||
],
|
||||
}],
|
||||
['OS!="android"', {
|
||||
'sources/': [
|
||||
['exclude', '(^|/)android/'],
|
||||
],
|
||||
}],
|
||||
['OS!="solaris"', {
|
||||
'sources/': [
|
||||
['exclude', '(^|/)solaris/'],
|
||||
],
|
||||
}],
|
||||
],
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# 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.
|
||||
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
breakpad_root = os.path.abspath(os.path.join(script_dir, os.pardir))
|
||||
|
||||
sys.path.insert(0, os.path.join(breakpad_root, 'tools', 'gyp', 'pylib'))
|
||||
import gyp
|
||||
|
||||
def run_gyp(args):
|
||||
rc = gyp.main(args)
|
||||
if rc != 0:
|
||||
print 'Error running GYP'
|
||||
sys.exit(rc)
|
||||
|
||||
|
||||
def main():
|
||||
args = sys.argv[1:]
|
||||
args.append(os.path.join(script_dir, 'all.gyp'))
|
||||
|
||||
args.append('-I')
|
||||
args.append(os.path.join(breakpad_root, 'build', 'common.gypi'))
|
||||
|
||||
args.extend(['-D', 'gyp_output_dir=out'])
|
||||
|
||||
# Set the GYP DEPTH variable to the root of the project.
|
||||
args.append('--depth=' + os.path.relpath(breakpad_root))
|
||||
|
||||
print 'Updating projects from gyp files...'
|
||||
sys.stdout.flush()
|
||||
|
||||
run_gyp(args)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
|
@ -1,90 +0,0 @@
|
|||
# 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.
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'gtest',
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
'../testing/googletest/src/gtest-all.cc',
|
||||
],
|
||||
'include_dirs': [
|
||||
'../testing/googletest',
|
||||
'../testing/googletest/include',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'../testing/googletest/include',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
'target_name': 'gtest_main',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'gtest',
|
||||
],
|
||||
'sources': [
|
||||
'../testing/googletest/src/gtest_main.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'gmock',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'gtest',
|
||||
],
|
||||
'sources': [
|
||||
'../testing/googlemock/src/gmock-all.cc',
|
||||
],
|
||||
'include_dirs': [
|
||||
'../testing/googlemock',
|
||||
'../testing/googlemock/include',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'../testing/googlemock/include',
|
||||
],
|
||||
},
|
||||
'export_dependent_settings': [
|
||||
'gtest',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'gmock_main',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'gmock',
|
||||
],
|
||||
'sources': [
|
||||
'../testing/googlemock/src/gmock_main.cc',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2011, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2011 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2011, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2011 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2011, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2011 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2006, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2006 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2006, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2006 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2010 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2010 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2010 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2010 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2010 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2010 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2010 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2010 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2010 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2010 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2014, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2014 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2014, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2014 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -44,6 +43,14 @@ typedef MDRawContextARM RawContextCPU;
|
|||
typedef MDRawContextARM64_Old RawContextCPU;
|
||||
#elif defined(__mips__)
|
||||
typedef MDRawContextMIPS RawContextCPU;
|
||||
#elif defined(__riscv)
|
||||
# if __riscv_xlen == 32
|
||||
typedef MDRawContextRISCV RawContextCPU;
|
||||
# elif __riscv_xlen == 64
|
||||
typedef MDRawContextRISCV64 RawContextCPU;
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
#else
|
||||
#error "This code has not been ported to your platform yet."
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2014, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2014 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -270,7 +269,74 @@ void ThreadInfo::FillCPUContext(RawContextCPU* out) const {
|
|||
out->float_save.fir = mcontext.fpc_eir;
|
||||
#endif
|
||||
}
|
||||
#endif // __mips__
|
||||
|
||||
#elif defined(__riscv)
|
||||
|
||||
uintptr_t ThreadInfo::GetInstructionPointer() const {
|
||||
return mcontext.__gregs[0];
|
||||
}
|
||||
|
||||
void ThreadInfo::FillCPUContext(RawContextCPU* out) const {
|
||||
# if __riscv__xlen == 32
|
||||
out->context_flags = MD_CONTEXT_RISCV_FULL;
|
||||
# elif __riscv_xlen == 64
|
||||
out->context_flags = MD_CONTEXT_RISCV64_FULL;
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
|
||||
out->pc = mcontext.__gregs[0];
|
||||
out->ra = mcontext.__gregs[1];
|
||||
out->sp = mcontext.__gregs[2];
|
||||
out->gp = mcontext.__gregs[3];
|
||||
out->tp = mcontext.__gregs[4];
|
||||
out->t0 = mcontext.__gregs[5];
|
||||
out->t1 = mcontext.__gregs[6];
|
||||
out->t2 = mcontext.__gregs[7];
|
||||
out->s0 = mcontext.__gregs[8];
|
||||
out->s1 = mcontext.__gregs[9];
|
||||
out->a0 = mcontext.__gregs[10];
|
||||
out->a1 = mcontext.__gregs[11];
|
||||
out->a2 = mcontext.__gregs[12];
|
||||
out->a3 = mcontext.__gregs[13];
|
||||
out->a4 = mcontext.__gregs[14];
|
||||
out->a5 = mcontext.__gregs[15];
|
||||
out->a6 = mcontext.__gregs[16];
|
||||
out->a7 = mcontext.__gregs[17];
|
||||
out->s2 = mcontext.__gregs[18];
|
||||
out->s3 = mcontext.__gregs[19];
|
||||
out->s4 = mcontext.__gregs[20];
|
||||
out->s5 = mcontext.__gregs[21];
|
||||
out->s6 = mcontext.__gregs[22];
|
||||
out->s7 = mcontext.__gregs[23];
|
||||
out->s8 = mcontext.__gregs[24];
|
||||
out->s9 = mcontext.__gregs[25];
|
||||
out->s10 = mcontext.__gregs[26];
|
||||
out->s11 = mcontext.__gregs[27];
|
||||
out->t3 = mcontext.__gregs[28];
|
||||
out->t4 = mcontext.__gregs[29];
|
||||
out->t5 = mcontext.__gregs[30];
|
||||
out->t6 = mcontext.__gregs[31];
|
||||
|
||||
# if __riscv_flen == 32
|
||||
for(int i = 0; i < MD_FLOATINGSAVEAREA_RISCV_FPR_COUNT; i++)
|
||||
out->float_save.regs[i] = mcontext.__fpregs.__f.__f[i];
|
||||
out->float_save.fpcsr = mcontext.__fpregs.__f.__fcsr;
|
||||
# elif __riscv_flen == 64
|
||||
for(int i = 0; i < MD_FLOATINGSAVEAREA_RISCV_FPR_COUNT; i++)
|
||||
out->float_save.regs[i] = mcontext.__fpregs.__d.__f[i];
|
||||
out->float_save.fpcsr = mcontext.__fpregs.__d.__fcsr;
|
||||
# elif __riscv_flen == 128
|
||||
for(int i = 0; i < MD_FLOATINGSAVEAREA_RISCV_FPR_COUNT; i++) {
|
||||
out->float_save.regs[i].high = mcontext.__fpregs.__q.__f[2*i];
|
||||
out->float_save.regs[i].low = mcontext.__fpregs.__q.__f[2*i+1];
|
||||
}
|
||||
out->float_save.fpcsr = mcontext.__fpregs.__q.__fcsr;
|
||||
# else
|
||||
# error "Unexpected __riscv_flen"
|
||||
# endif
|
||||
}
|
||||
#endif // __riscv
|
||||
|
||||
void ThreadInfo::GetGeneralPurposeRegisters(void** gp_regs, size_t* size) {
|
||||
assert(gp_regs || size);
|
||||
|
@ -279,6 +345,11 @@ void ThreadInfo::GetGeneralPurposeRegisters(void** gp_regs, size_t* size) {
|
|||
*gp_regs = mcontext.gregs;
|
||||
if (size)
|
||||
*size = sizeof(mcontext.gregs);
|
||||
#elif defined(__riscv)
|
||||
if (gp_regs)
|
||||
*gp_regs = mcontext.__gregs;
|
||||
if (size)
|
||||
*size = sizeof(mcontext.__gregs);
|
||||
#else
|
||||
if (gp_regs)
|
||||
*gp_regs = ®s;
|
||||
|
@ -294,6 +365,25 @@ void ThreadInfo::GetFloatingPointRegisters(void** fp_regs, size_t* size) {
|
|||
*fp_regs = &mcontext.fpregs;
|
||||
if (size)
|
||||
*size = sizeof(mcontext.fpregs);
|
||||
#elif defined(__riscv)
|
||||
# if __riscv_flen == 32
|
||||
if (fp_regs)
|
||||
*fp_regs = &mcontext.__fpregs.__f.__f;
|
||||
if (size)
|
||||
*size = sizeof(mcontext.__fpregs.__f.__f);
|
||||
# elif __riscv_flen == 64
|
||||
if (fp_regs)
|
||||
*fp_regs = &mcontext.__fpregs.__d.__f;
|
||||
if (size)
|
||||
*size = sizeof(mcontext.__fpregs.__d.__f);
|
||||
# elif __riscv_flen == 128
|
||||
if (fp_regs)
|
||||
*fp_regs = &mcontext.__fpregs.__q.__f;
|
||||
if (size)
|
||||
*size = sizeof(mcontext.__fpregs.__q.__f);
|
||||
# else
|
||||
# error "Unexpected __riscv_flen"
|
||||
# endif
|
||||
#else
|
||||
if (fp_regs)
|
||||
*fp_regs = &fpregs;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2014, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2014 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -68,7 +67,7 @@ struct ThreadInfo {
|
|||
// Use the structures defined in <sys/user.h>
|
||||
struct user_regs_struct regs;
|
||||
struct user_fpsimd_struct fpregs;
|
||||
#elif defined(__mips__)
|
||||
#elif defined(__mips__) || defined(__riscv)
|
||||
// Use the structure defined in <sys/ucontext.h>.
|
||||
mcontext_t mcontext;
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2014, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2014 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -254,6 +253,75 @@ void UContextReader::FillCPUContext(RawContextCPU* out, const ucontext_t* uc) {
|
|||
out->float_save.fir = uc->uc_mcontext.fpc_eir; // Unused.
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif defined(__riscv)
|
||||
|
||||
uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
|
||||
return uc->uc_mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP];
|
||||
}
|
||||
|
||||
uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
|
||||
return uc->uc_mcontext.__gregs[MD_CONTEXT_RISCV_REG_PC];
|
||||
}
|
||||
|
||||
void UContextReader::FillCPUContext(RawContextCPU* out, const ucontext_t* uc) {
|
||||
# if __riscv__xlen == 32
|
||||
out->context_flags = MD_CONTEXT_RISCV_FULL;
|
||||
# elif __riscv_xlen == 64
|
||||
out->context_flags = MD_CONTEXT_RISCV64_FULL;
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
|
||||
out->pc = uc->uc_mcontext.__gregs[0];
|
||||
out->ra = uc->uc_mcontext.__gregs[1];
|
||||
out->sp = uc->uc_mcontext.__gregs[2];
|
||||
out->gp = uc->uc_mcontext.__gregs[3];
|
||||
out->tp = uc->uc_mcontext.__gregs[4];
|
||||
out->t0 = uc->uc_mcontext.__gregs[5];
|
||||
out->t1 = uc->uc_mcontext.__gregs[6];
|
||||
out->t2 = uc->uc_mcontext.__gregs[7];
|
||||
out->s0 = uc->uc_mcontext.__gregs[8];
|
||||
out->s1 = uc->uc_mcontext.__gregs[9];
|
||||
out->a0 = uc->uc_mcontext.__gregs[10];
|
||||
out->a1 = uc->uc_mcontext.__gregs[11];
|
||||
out->a2 = uc->uc_mcontext.__gregs[12];
|
||||
out->a3 = uc->uc_mcontext.__gregs[13];
|
||||
out->a4 = uc->uc_mcontext.__gregs[14];
|
||||
out->a5 = uc->uc_mcontext.__gregs[15];
|
||||
out->a6 = uc->uc_mcontext.__gregs[16];
|
||||
out->a7 = uc->uc_mcontext.__gregs[17];
|
||||
out->s2 = uc->uc_mcontext.__gregs[18];
|
||||
out->s3 = uc->uc_mcontext.__gregs[19];
|
||||
out->s4 = uc->uc_mcontext.__gregs[20];
|
||||
out->s5 = uc->uc_mcontext.__gregs[21];
|
||||
out->s6 = uc->uc_mcontext.__gregs[22];
|
||||
out->s7 = uc->uc_mcontext.__gregs[23];
|
||||
out->s8 = uc->uc_mcontext.__gregs[24];
|
||||
out->s9 = uc->uc_mcontext.__gregs[25];
|
||||
out->s10 = uc->uc_mcontext.__gregs[26];
|
||||
out->s11 = uc->uc_mcontext.__gregs[27];
|
||||
out->t3 = uc->uc_mcontext.__gregs[28];
|
||||
out->t4 = uc->uc_mcontext.__gregs[29];
|
||||
out->t5 = uc->uc_mcontext.__gregs[30];
|
||||
out->t6 = uc->uc_mcontext.__gregs[31];
|
||||
|
||||
# if __riscv_flen == 32
|
||||
for(int i = 0; i < MD_FLOATINGSAVEAREA_RISCV_FPR_COUNT; i++)
|
||||
out->float_save.regs[i] = uc->uc_mcontext.__fpregs.__f.__f[i];
|
||||
out->float_save.fpcsr = uc->uc_mcontext.__fpregs.__f.__fcsr;
|
||||
# elif __riscv_flen == 64
|
||||
for(int i = 0; i < MD_FLOATINGSAVEAREA_RISCV_FPR_COUNT; i++)
|
||||
out->float_save.regs[i] = uc->uc_mcontext.__fpregs.__d.__f[i];
|
||||
out->float_save.fpcsr = uc->uc_mcontext.__fpregs.__d.__fcsr;
|
||||
# elif __riscv_flen == 128
|
||||
for(int i = 0; i < MD_FLOATINGSAVEAREA_RISCV_FPR_COUNT; i++) {
|
||||
out->float_save.regs[i].high = uc->uc_mcontext.__fpregs.__q.__f[2*i];
|
||||
out->float_save.regs[i].low = uc->uc_mcontext.__fpregs.__q.__f[2*i+1];
|
||||
}
|
||||
out->float_save.fpcsr = uc->uc_mcontext.__fpregs.__q.__fcsr;
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace google_breakpad
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2014, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2014 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2010 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2010 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -461,10 +460,7 @@ bool ExceptionHandler::HandleSignal(int /*sig*/, siginfo_t* info, void* uc) {
|
|||
memcpy(&g_crash_context_.float_state, fp_ptr,
|
||||
sizeof(g_crash_context_.float_state));
|
||||
}
|
||||
#elif !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
// FP state is not part of user ABI on ARM Linux.
|
||||
// In case of MIPS Linux FP state is already part of ucontext_t
|
||||
// and 'float_state' is not a member of CrashContext.
|
||||
#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
ucontext_t* uc_ptr = (ucontext_t*)uc;
|
||||
if (uc_ptr->uc_mcontext.fpregs) {
|
||||
memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs,
|
||||
|
@ -701,8 +697,7 @@ bool ExceptionHandler::WriteMinidump() {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !defined(__ARM_EABI__) && !defined(__aarch64__) && !defined(__mips__)
|
||||
// FPU state is not part of ARM EABI ucontext_t.
|
||||
#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE && !defined(__aarch64__)
|
||||
memcpy(&context.float_state, context.context.uc_mcontext.fpregs,
|
||||
sizeof(context.float_state));
|
||||
#endif
|
||||
|
@ -726,6 +721,9 @@ bool ExceptionHandler::WriteMinidump() {
|
|||
#elif defined(__mips__)
|
||||
context.siginfo.si_addr =
|
||||
reinterpret_cast<void*>(context.context.uc_mcontext.pc);
|
||||
#elif defined(__riscv)
|
||||
context.siginfo.si_addr =
|
||||
reinterpret_cast<void*>(context.context.uc_mcontext.__gregs[REG_PC]);
|
||||
#else
|
||||
# error "This code has not been ported to your platform yet."
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2010 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2010 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -44,6 +43,15 @@
|
|||
#include "common/using_std_string.h"
|
||||
#include "google_breakpad/common/minidump_format.h"
|
||||
|
||||
#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
|
||||
// FP state is not part of user ABI for Linux ARM.
|
||||
// In case of MIPS and RISCV Linux FP state is already part of ucontext_t
|
||||
// so 'float_state' is not required.
|
||||
# define GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE 1
|
||||
#else
|
||||
# define GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE 0
|
||||
#endif
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
// ExceptionHandler
|
||||
|
@ -192,10 +200,7 @@ class ExceptionHandler {
|
|||
siginfo_t siginfo;
|
||||
pid_t tid; // the crashing thread.
|
||||
ucontext_t context;
|
||||
#if !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
// #ifdef this out because FP state is not part of user ABI for Linux ARM.
|
||||
// In case of MIPS Linux FP state is already part of ucontext_t so
|
||||
// 'float_state' is not required.
|
||||
#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
fpstate_t float_state;
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2010 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2010 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -306,8 +305,22 @@ TEST(ExceptionHandlerTest, ParallelChildCrashesDontHang) {
|
|||
}
|
||||
}
|
||||
|
||||
// Wait a while until the child should have crashed.
|
||||
usleep(1000000);
|
||||
// Poll the child to see if it crashed.
|
||||
int status, wp_pid;
|
||||
for (int i = 0; i < 100; i++) {
|
||||
wp_pid = HANDLE_EINTR(waitpid(child, &status, WNOHANG));
|
||||
ASSERT_NE(-1, wp_pid);
|
||||
if (wp_pid > 0) {
|
||||
ASSERT_TRUE(WIFSIGNALED(status));
|
||||
// If the child process terminated by itself,
|
||||
// it will have returned SIGSEGV.
|
||||
ASSERT_EQ(SIGSEGV, WTERMSIG(status));
|
||||
return;
|
||||
} else {
|
||||
usleep(100000);
|
||||
}
|
||||
}
|
||||
|
||||
// Kill the child if it is still running.
|
||||
kill(child, SIGKILL);
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright 2015 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2015 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -33,6 +32,7 @@
|
|||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "client/linux/handler/microdump_extra_info.h"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2014, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2014 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -138,7 +137,7 @@ class MicrodumpWriter {
|
|||
const MicrodumpExtraInfo& microdump_extra_info,
|
||||
LinuxDumper* dumper)
|
||||
: ucontext_(context ? &context->context : NULL),
|
||||
#if !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
float_state_(context ? &context->float_state : NULL),
|
||||
#endif
|
||||
dumper_(dumper),
|
||||
|
@ -337,6 +336,14 @@ class MicrodumpWriter {
|
|||
# else
|
||||
# error "This mips ABI is currently not supported (n32)"
|
||||
# endif
|
||||
#elif defined(__riscv)
|
||||
# if __riscv_xlen == 32
|
||||
const char kArch[] = "riscv32";
|
||||
# elif __riscv_xlen == 64
|
||||
const char kArch[] = "riscv64";
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
#else
|
||||
# error "This code has not been ported to your platform yet"
|
||||
#endif
|
||||
|
@ -409,7 +416,7 @@ class MicrodumpWriter {
|
|||
void DumpCPUState() {
|
||||
RawContextCPU cpu;
|
||||
my_memset(&cpu, 0, sizeof(RawContextCPU));
|
||||
#if !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
UContextReader::FillCPUContext(&cpu, ucontext_, float_state_);
|
||||
#else
|
||||
UContextReader::FillCPUContext(&cpu, ucontext_);
|
||||
|
@ -605,7 +612,7 @@ class MicrodumpWriter {
|
|||
void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
|
||||
|
||||
const ucontext_t* const ucontext_;
|
||||
#if !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
const google_breakpad::fpstate_t* const float_state_;
|
||||
#endif
|
||||
LinuxDumper* dumper_;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2014, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2014 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2014 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2014 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2013, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2013 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2013, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2013 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2009, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2009 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2009, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2009 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2009, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2009 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2009, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2009 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -112,6 +111,9 @@ bool LinuxCoreDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) {
|
|||
#elif defined(__mips__)
|
||||
stack_pointer =
|
||||
reinterpret_cast<uint8_t*>(info->mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]);
|
||||
#elif defined(__riscv)
|
||||
stack_pointer = reinterpret_cast<uint8_t*>(
|
||||
info->mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP]);
|
||||
#else
|
||||
# error "This code hasn't been ported to your platform yet."
|
||||
#endif
|
||||
|
@ -218,9 +220,12 @@ bool LinuxCoreDumper::EnumerateThreads() {
|
|||
info.mcontext.mdlo = status->pr_reg[EF_LO];
|
||||
info.mcontext.mdhi = status->pr_reg[EF_HI];
|
||||
info.mcontext.pc = status->pr_reg[EF_CP0_EPC];
|
||||
#else // __mips__
|
||||
#elif defined(__riscv)
|
||||
memcpy(&info.mcontext.__gregs, status->pr_reg,
|
||||
sizeof(info.mcontext.__gregs));
|
||||
#else // __riscv
|
||||
memcpy(&info.regs, status->pr_reg, sizeof(info.regs));
|
||||
#endif // __mips__
|
||||
#endif
|
||||
if (first_thread) {
|
||||
crash_thread_ = pid;
|
||||
crash_signal_ = status->pr_info.si_signo;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2010, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2010 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2010, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2010 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -60,10 +59,12 @@ namespace google_breakpad {
|
|||
|
||||
// Typedef for our parsing of the auxv variables in /proc/pid/auxv.
|
||||
#if defined(__i386) || defined(__ARM_EABI__) || \
|
||||
(defined(__mips__) && _MIPS_SIM == _ABIO32)
|
||||
(defined(__mips__) && _MIPS_SIM == _ABIO32) || \
|
||||
(defined(__riscv) && __riscv_xlen == 32)
|
||||
typedef Elf32_auxv_t elf_aux_entry;
|
||||
#elif defined(__x86_64) || defined(__aarch64__) || \
|
||||
(defined(__mips__) && _MIPS_SIM != _ABIO32)
|
||||
(defined(__mips__) && _MIPS_SIM != _ABIO32) || \
|
||||
(defined(__riscv) && __riscv_xlen == 64)
|
||||
typedef Elf64_auxv_t elf_aux_entry;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2010, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2010 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -51,6 +50,8 @@
|
|||
#define TID_PTR_REGISTER "rcx"
|
||||
#elif defined(__mips__)
|
||||
#define TID_PTR_REGISTER "$1"
|
||||
#elif defined(__riscv)
|
||||
#define TID_PTR_REGISTER "x4"
|
||||
#else
|
||||
#error This test has not been ported to this platform.
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -298,6 +297,9 @@ bool LinuxPtraceDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) {
|
|||
#elif defined(__mips__)
|
||||
stack_pointer =
|
||||
reinterpret_cast<uint8_t*>(info->mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]);
|
||||
#elif defined(__riscv)
|
||||
stack_pointer = reinterpret_cast<uint8_t*>(
|
||||
info->mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP]);
|
||||
#else
|
||||
# error "This code hasn't been ported to your platform yet."
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2009, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2009 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -464,6 +463,9 @@ TEST(LinuxPtraceDumperTest, VerifyStackReadWithMultipleThreads) {
|
|||
#elif defined(__mips__)
|
||||
pid_t* process_tid_location =
|
||||
reinterpret_cast<pid_t*>(one_thread.mcontext.gregs[1]);
|
||||
#elif defined(__riscv)
|
||||
pid_t* process_tid_location =
|
||||
reinterpret_cast<pid_t*>(one_thread.mcontext.__gregs[4]);
|
||||
#else
|
||||
#error This test has not been ported to this platform.
|
||||
#endif
|
||||
|
@ -561,6 +563,8 @@ TEST_F(LinuxPtraceDumperTest, SanitizeStackCopy) {
|
|||
uintptr_t heap_addr = thread_info.regs.rcx;
|
||||
#elif defined(__mips__)
|
||||
uintptr_t heap_addr = thread_info.mcontext.gregs[1];
|
||||
#elif defined(__riscv)
|
||||
uintptr_t heap_addr = thread_info.mcontext.__gregs[4];
|
||||
#else
|
||||
#error This test has not been ported to this platform.
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2010, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2010 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -141,7 +140,7 @@ class MinidumpWriter {
|
|||
: fd_(minidump_fd),
|
||||
path_(minidump_path),
|
||||
ucontext_(context ? &context->context : NULL),
|
||||
#if !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
float_state_(context ? &context->float_state : NULL),
|
||||
#endif
|
||||
dumper_(dumper),
|
||||
|
@ -473,7 +472,7 @@ class MinidumpWriter {
|
|||
if (!cpu.Allocate())
|
||||
return false;
|
||||
my_memset(cpu.get(), 0, sizeof(RawContextCPU));
|
||||
#if !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
UContextReader::FillCPUContext(cpu.get(), ucontext_, float_state_);
|
||||
#else
|
||||
UContextReader::FillCPUContext(cpu.get(), ucontext_);
|
||||
|
@ -1138,9 +1137,7 @@ class MinidumpWriter {
|
|||
sys_close(fd);
|
||||
|
||||
cpus_present.IntersectWith(cpus_possible);
|
||||
int cpu_count = cpus_present.GetCount();
|
||||
if (cpu_count > 255)
|
||||
cpu_count = 255;
|
||||
int cpu_count = std::min(255, cpus_present.GetCount());
|
||||
sys_info->number_of_processors = static_cast<uint8_t>(cpu_count);
|
||||
}
|
||||
}
|
||||
|
@ -1256,6 +1253,59 @@ class MinidumpWriter {
|
|||
sys_close(fd);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#elif defined(__riscv)
|
||||
bool WriteCPUInformation(MDRawSystemInfo* sys_info) {
|
||||
// processor_architecture should always be set, do this first
|
||||
# if __riscv_xlen == 32
|
||||
sys_info->processor_architecture = MD_CPU_ARCHITECTURE_RISCV;
|
||||
# elif __riscv_xlen == 64
|
||||
sys_info->processor_architecture = MD_CPU_ARCHITECTURE_RISCV64;
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
|
||||
// /proc/cpuinfo is not readable under various sandboxed environments
|
||||
// (e.g. Android services with the android:isolatedProcess attribute)
|
||||
// prepare for this by setting default values now, which will be
|
||||
// returned when this happens.
|
||||
//
|
||||
// Note: Bogus values are used to distinguish between failures (to
|
||||
// read /sys and /proc files) and really badly configured kernels.
|
||||
sys_info->number_of_processors = 0;
|
||||
sys_info->processor_level = 0U;
|
||||
sys_info->processor_revision = 42;
|
||||
sys_info->cpu.other_cpu_info.processor_features[0] = 0;
|
||||
sys_info->cpu.other_cpu_info.processor_features[1] = 0;
|
||||
|
||||
// Counting the number of CPUs involves parsing two sysfs files,
|
||||
// because the content of /proc/cpuinfo will only mirror the number
|
||||
// of 'online' cores, and thus will vary with time.
|
||||
// See http://www.kernel.org/doc/Documentation/cputopology.txt
|
||||
{
|
||||
CpuSet cpus_present;
|
||||
CpuSet cpus_possible;
|
||||
|
||||
int fd = sys_open("/sys/devices/system/cpu/present",
|
||||
O_RDONLY | O_CLOEXEC, 0);
|
||||
if (fd >= 0) {
|
||||
cpus_present.ParseSysFile(fd);
|
||||
sys_close(fd);
|
||||
|
||||
fd = sys_open("/sys/devices/system/cpu/possible",
|
||||
O_RDONLY | O_CLOEXEC, 0);
|
||||
if (fd >= 0) {
|
||||
cpus_possible.ParseSysFile(fd);
|
||||
sys_close(fd);
|
||||
|
||||
cpus_present.IntersectWith(cpus_possible);
|
||||
int cpu_count = std::min(255, cpus_present.GetCount());
|
||||
sys_info->number_of_processors = static_cast<uint8_t>(cpu_count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
|
@ -1386,7 +1436,7 @@ class MinidumpWriter {
|
|||
const char* path_; // Path to the file where the minidum should be written.
|
||||
|
||||
const ucontext_t* const ucontext_; // also from the signal handler
|
||||
#if !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
const google_breakpad::fpstate_t* const float_state_; // ditto
|
||||
#endif
|
||||
LinuxDumper* dumper_;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2009, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2009 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2011 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2011 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -717,6 +716,9 @@ TEST(MinidumpWriterTest, InvalidStackPointer) {
|
|||
#elif defined(__mips__)
|
||||
context.context.uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP] =
|
||||
invalid_stack_pointer;
|
||||
#elif defined(__riscv)
|
||||
context.context.uc_mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP] =
|
||||
invalid_stack_pointer;
|
||||
#else
|
||||
# error "This code has not been ported to your platform yet."
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2011 Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2011 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2022, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2022 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2022, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2022 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2022, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2022 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2013, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2013 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2013, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2013 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2009, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2009 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2006, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2006 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2006, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2006 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2007, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2007 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2007, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2007 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2011, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2011 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2011, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2011 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
@ -105,13 +104,14 @@ BOOL ConfigFile::AppendCrashTimeParameters(const char* processStartTimeString) {
|
|||
time_t processStartTime = strtol(processStartTimeString, NULL, 10);
|
||||
time_t processUptime = tv.tv_sec - processStartTime;
|
||||
// Store the uptime in milliseconds.
|
||||
sprintf(processUptimeString, "%llu",
|
||||
snprintf(processUptimeString, sizeof(processUptimeString), "%llu",
|
||||
static_cast<unsigned long long int>(processUptime) * 1000);
|
||||
if (!AppendConfigString(BREAKPAD_PROCESS_UP_TIME, processUptimeString))
|
||||
return false;
|
||||
}
|
||||
|
||||
sprintf(processCrashtimeString, "%zd", tv.tv_sec);
|
||||
snprintf(processCrashtimeString, sizeof(processCrashtimeString), "%llu",
|
||||
static_cast<unsigned long long int>(tv.tv_sec));
|
||||
return AppendConfigString(BREAKPAD_PROCESS_CRASH_TIME,
|
||||
processCrashtimeString);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright (c) 2007, Google Inc.
|
||||
// All rights reserved.
|
||||
// Copyright 2007 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@ -11,7 +10,7 @@
|
|||
// 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
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue