Revert "Android: Add helper methods for printing native stack traces"

This reverts commit dc32cc00e80972223767be339f9318b803f4a2ae.

Reason for revert: Seems to be breaking Chromium FYI, https://www.google.com/url?q=https://ci.chromium.org/p/chromium/builders/luci.chromium.webrtc.fyi/WebRTC%2520Chromium%2520FYI%2520Android%2520Tests%2520%2528dbg%2529%2520%2528K%2520Nexus5%2529/1807&sa=D&source=hangouts&ust=1548149426180000&usg=AFQjCNGh9aBqv2wNE12D8-6rn9-AJR-cNg

Original change's description:
> Android: Add helper methods for printing native stack traces
> 
> This CL adds utility functions to unwind the stack for a given thread on
> Android ARM devices. This works on top of unwind.h and unwinds native
> (C++) stack traces only. Unwinding a thread from another thread is done
> by overriding the signal handler with a custom function and then
> interrupting the specific thread.
> 
> Bug: webrtc:10168
> Change-Id: If5adffd3a6bb57bf502168743e09a7eefc292bf3
> Reviewed-on: https://webrtc-review.googlesource.com/c/118141
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26328}

TBR=magjed@webrtc.org,tommi@webrtc.org

Change-Id: I6e01f9226ef60777cb422baeab042bce8944f9ed
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10168
Reviewed-on: https://webrtc-review.googlesource.com/c/118683
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26336}
This commit is contained in:
Magnus Jedvert
2019-01-21 11:08:29 +00:00
committed by Commit Bot
parent d7bc09705b
commit 700615fb1c
4 changed files with 0 additions and 476 deletions

View File

@ -1,42 +0,0 @@
/*
* Copyright 2019 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef SDK_ANDROID_NATIVE_API_STACKTRACE_STACKTRACE_H_
#define SDK_ANDROID_NATIVE_API_STACKTRACE_STACKTRACE_H_
#include <string>
#include <vector>
namespace webrtc {
struct StackTraceElement {
// Pathname of shared object (.so file) that contains address.
const char* shared_object_path;
// Execution address relative to the .so base address. This matches the
// addresses you get with "nm", "objdump", and "ndk-stack", as long as the
// code is compiled with position-independent code. Android requires
// position-independent code since Lollipop.
uint32_t relative_address;
// Name of symbol whose definition overlaps the address. This value is null
// when symbol names are stripped.
const char* symbol_name;
};
// Utility to unwind stack for a given thread on Android ARM devices. This works
// on top of unwind.h and unwinds native (C++) stack traces only.
std::vector<StackTraceElement> GetStackTrace(int tid);
// Get a string representation of the stack trace in a format ndk-stack accepts.
std::string StackTraceToString(
const std::vector<StackTraceElement>& stack_trace);
} // namespace webrtc
#endif // SDK_ANDROID_NATIVE_API_STACKTRACE_STACKTRACE_H_