Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRefael Ackermann <refack@gmail.com>2018-10-22 22:07:00 +0300
committerRefael Ackermann <refack@gmail.com>2018-10-30 04:44:17 +0300
commit247b513059592cbfe9ec3012aa9bc461b9899c7f (patch)
tree946e1fb800fff4bca98a6c6732dbc3e408dba03e /src/debug_utils.h
parentf90cf19fdd729cff6147b12be191effa6113712e (diff)
src,win: informative stack traces
Refresh `Win32SymbolDebuggingContext::LookupSymbol` to use more APIs PR-URL: https://github.com/nodejs/node/pull/23822 Refs: https://docs.microsoft.com/en-us/windows/desktop/Debug/retrieving-symbol-information-by-address Refs: https://docs.microsoft.com/en-us/windows/desktop/Debug/retrieving-undecorated-symbol-names Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src/debug_utils.h')
-rw-r--r--src/debug_utils.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/debug_utils.h b/src/debug_utils.h
index 2fd9e7dab7f..c6c8e03b51f 100644
--- a/src/debug_utils.h
+++ b/src/debug_utils.h
@@ -6,6 +6,7 @@
#include "async_wrap.h"
#include "env.h"
#include <string>
+#include <sstream>
// Use FORCE_INLINE on functions that have a debug-category-enabled check first
// and then ideally only a single function call following it, to maintain
@@ -93,14 +94,25 @@ class NativeSymbolDebuggingContext {
public:
std::string name;
std::string filename;
+ size_t line = 0;
+ size_t dis = 0;
std::string Display() const;
};
+ NativeSymbolDebuggingContext() = default;
virtual ~NativeSymbolDebuggingContext() {}
- virtual SymbolInfo LookupSymbol(void* address) { return { "", "" }; }
+
+ virtual SymbolInfo LookupSymbol(void* address) { return {}; }
virtual bool IsMapped(void* address) { return false; }
virtual int GetStackTrace(void** frames, int count) { return 0; }
+
+ NativeSymbolDebuggingContext(const NativeSymbolDebuggingContext&) = delete;
+ NativeSymbolDebuggingContext(NativeSymbolDebuggingContext&&) = delete;
+ NativeSymbolDebuggingContext operator=(NativeSymbolDebuggingContext&)
+ = delete;
+ NativeSymbolDebuggingContext operator=(NativeSymbolDebuggingContext&&)
+ = delete;
};
// Variant of `uv_loop_close` that tries to be as helpful as possible