| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1ff8f31 commit 2dcbf18
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -182,10 +182,13 @@ class Win32SymbolDebuggingContext final : public NativeSymbolDebuggingContext { | |||
| 182 | 182 | return NameAndDisplacement(pSymbol->Name, dwDisplacement); | |
| 183 | 183 | } else { | |
| 184 | 184 | // SymFromAddr failed | |
| 185 | - const DWORD error = GetLastError(); // "eat" the error anyway | ||
| 186 | 185 | #ifdef DEBUG | |
| 186 | + const DWORD error = GetLastError(); | ||
| 187 | 187 | fprintf(stderr, "SymFromAddr returned error : %lu\n", error); | |
| 188 | - #endif | ||
| 188 | + #else | ||
| 189 | + // Consume the error anyway | ||
| 190 | + USE(GetLastError()); | ||
| 191 | + #endif // DEBUG | ||
| 189 | 192 | } | |
| 190 | 193 | // End MSDN code | |
| 191 | 194 | ||
@@ -217,10 +220,13 @@ class Win32SymbolDebuggingContext final : public NativeSymbolDebuggingContext { | |||
| 217 | 220 | sym.line = line.LineNumber; | |
| 218 | 221 | } else { | |
| 219 | 222 | // SymGetLineFromAddr64 failed | |
| 220 | - const DWORD error = GetLastError(); // "eat" the error anyway | ||
| 221 | 223 | #ifdef DEBUG | |
| 224 | + const DWORD error = GetLastError(); | ||
| 222 | 225 | fprintf(stderr, "SymGetLineFromAddr64 returned error : %lu\n", error); | |
| 223 | - #endif | ||
| 226 | + #else | ||
| 227 | + // Consume the error anyway | ||
| 228 | + USE(GetLastError()); | ||
| 229 | + #endif // DEBUG | ||
| 224 | 230 | } | |
| 225 | 231 | // End MSDN code | |
| 226 | 232 | ||
@@ -240,10 +246,13 @@ class Win32SymbolDebuggingContext final : public NativeSymbolDebuggingContext { | |||
| 240 | 246 | return szUndName; | |
| 241 | 247 | } else { | |
| 242 | 248 | // UnDecorateSymbolName failed | |
| 243 | - const DWORD error = GetLastError(); // "eat" the error anyway | ||
| 244 | 249 | #ifdef DEBUG | |
| 250 | + const DWORD error = GetLastError(); | ||
| 245 | 251 | fprintf(stderr, "UnDecorateSymbolName returned error %lu\n", error); | |
| 246 | - #endif | ||
| 252 | + #else | ||
| 253 | + // Consume the error anyway | ||
| 254 | + USE(GetLastError()); | ||
| 255 | + #endif // DEBUG | ||
| 247 | 256 | } | |
| 248 | 257 | return nullptr; | |
| 249 | 258 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments