diff options
author | Christopher Ferris <cferris@google.com> | 2021-04-16 09:40:40 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2021-05-03 15:21:11 -0700 |
commit | fe751c5a61c4501a187ae82a9cacffab1cba9d7e (patch) | |
tree | a1d6892f502e9e02b1b0a9e937e4d09e01011c6d /debuggerd/crash_test.cpp | |
parent | 4f8a56f15de51ea3ecc08cd84748cdc56d640aaf (diff) |
Re-add backtrace note about unreadable elf.
When moving to the proto-ized tombstones, the note about unreadable
elf files in a backtrace got lost. This re-adds it and adds a test
to verify that the note properly shows up.
Bug: 185428454
Test: Ran unit tests.
Change-Id: I1150cc737772e1b79fd73ec5c782caadc4629421
Diffstat (limited to 'debuggerd/crash_test.cpp')
-rw-r--r-- | debuggerd/crash_test.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/debuggerd/crash_test.cpp b/debuggerd/crash_test.cpp new file mode 100644 index 000000000..c15145f61 --- /dev/null +++ b/debuggerd/crash_test.cpp @@ -0,0 +1,21 @@ +/* + * Copyright 2021, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <stdint.h> + +extern "C" void crash() { + *reinterpret_cast<volatile char*>(0xdead) = '1'; +} |