Implement -Xstacktracefile.
Change-Id: Ib6c73ddc6f0eaf8f8b731d450b87bda55589f857
diff --git a/src/signal_catcher.h b/src/signal_catcher.h
index 123b38f..5178b1a 100644
--- a/src/signal_catcher.h
+++ b/src/signal_catcher.h
@@ -31,18 +31,20 @@
*/
class SignalCatcher {
public:
- SignalCatcher();
+ SignalCatcher(const std::string& stack_trace_file);
~SignalCatcher();
- static void HandleSigQuit();
+ void HandleSigQuit();
private:
static void* Run(void* arg);
- static void HandleSigUsr1();
+ void HandleSigUsr1();
+ void Output(const std::string& s);
void SetHaltFlag(bool new_value);
bool ShouldHalt();
+ std::string stack_trace_file_;
mutable Mutex lock_;
bool halt_;
ConditionVariable cond_;