Changeset View
Changeset View
Standalone View
Standalone View
drkonqi/backtracegenerator.h
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Line(s) | |||||
79 | private: | 79 | private: | ||
80 | const Debugger m_debugger; | 80 | const Debugger m_debugger; | ||
81 | KProcess * m_proc; | 81 | KProcess * m_proc; | ||
82 | QTemporaryFile * m_temp; | 82 | QTemporaryFile * m_temp; | ||
83 | QByteArray m_output; | 83 | QByteArray m_output; | ||
84 | State m_state; | 84 | State m_state; | ||
85 | BacktraceParser * m_parser; | 85 | BacktraceParser * m_parser; | ||
86 | QString m_parsedBacktrace; | 86 | QString m_parsedBacktrace; | ||
87 | bool m_lldbDetached; | ||||
kfunk: Looks pretty unclean to have a backend-specific variable around here. | |||||
I missed this one. I don't think it's possible to detect detaching (from the debugger output!) elsewhere but in the bt. generator. Not without adding a line parser to the backend. That *would* be the proper way to proceed if other backends required detecting a detached debugger too, but apparently that isn't the case. rjvbb: I missed this one. I don't think it's possible to detect detaching (from the debugger output!)… | |||||
I suppose I could replace m_lldbDetached with something like bool Debugger::isDetached(const QString &outputLine=QString()) { if (!outputLine.isEmpty() && codeName() == "lldb") { QString line = outputLine.simplified(); if (/*line contains "Process detached"*/) { m_isDetached = true; } } return m_isDetached; } and call that function instead of reading/setting m_lldbDetached. Whether that's really less cumbersome I don't know? rjvbb: I suppose I could replace m_lldbDetached with something like
```
bool Debugger::isDetached… | |||||
87 | 88 | | |||
88 | #ifdef BACKTRACE_PARSER_DEBUG | 89 | #ifdef BACKTRACE_PARSER_DEBUG | ||
89 | BacktraceParser * m_debugParser; | 90 | BacktraceParser * m_debugParser; | ||
90 | #endif | 91 | #endif | ||
91 | }; | 92 | }; | ||
92 | 93 | | |||
93 | #endif | 94 | #endif |
Looks pretty unclean to have a backend-specific variable around here.