summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/linux/Host.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-03-06 20:45:43 +0000
committerZachary Turner <zturner@google.com>2015-03-06 20:45:43 +0000
commita893d3014b763c20071cd9525428489357850f00 (patch)
treec951e9dfd9d7904f02e76d2e24809b5b5bb92396 /lldb/source/Host/linux/Host.cpp
parent829c7347d1f51eadf536687b04b0c2e35581d864 (diff)
downloadbcm5719-llvm-a893d3014b763c20071cd9525428489357850f00.tar.gz
bcm5719-llvm-a893d3014b763c20071cd9525428489357850f00.zip
Remove Host::Backtrace in favor of llvm::sys::PrintStackTrace()
This removes Host::Backtrace from the codebase, and changes all call sites to use llvm::sys::PrintStackTrace(). This makes the functionality available for all platforms, and even for platforms which currently had a supported implementation of Host::Backtrace, this patch should enable richer information in stack traces, such as file and line number information, as well as giving it the ability to unwind through inlined functions. llvm-svn: 231511
Diffstat (limited to 'lldb/source/Host/linux/Host.cpp')
-rw-r--r--lldb/source/Host/linux/Host.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp
index edad8f7731e..520d0bdee93 100644
--- a/lldb/source/Host/linux/Host.cpp
+++ b/lldb/source/Host/linux/Host.cpp
@@ -377,28 +377,6 @@ Host::GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &process_info)
return GetProcessAndStatInfo (pid, process_info, stat_info, tracerpid);
}
-void
-Host::Backtrace (Stream &strm, uint32_t max_frames)
-{
-#ifndef __ANDROID__
- if (max_frames > 0)
- {
- std::vector<void *> frame_buffer (max_frames, NULL);
- int num_frames = ::backtrace (&frame_buffer[0], frame_buffer.size());
- char** strs = ::backtrace_symbols (&frame_buffer[0], num_frames);
- if (strs)
- {
- // Start at 1 to skip the "Host::Backtrace" frame
- for (int i = 1; i < num_frames; ++i)
- strm.Printf("%s\n", strs[i]);
- ::free (strs);
- }
- }
-#else
- assert(false && "::backtrace() not supported on Android");
-#endif
-}
-
size_t
Host::GetEnvironment (StringList &env)
{
OpenPOWER on IntegriCloud