| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
CI: https://ci.nodejs.org/job/node-test-pull-request/18049/ |
Sorry, something went wrong.
|
@refack build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/1338/pipeline |
Sorry, something went wrong.
There was a problem hiding this comment.
Why not just take a FILE* as input parameter?
Sorry, something went wrong.
There was a problem hiding this comment.
Polymorphism with the POSIX class:
https://github.com/nodejs/node/blob/0b565eb7f7404fb8774865826afba10c1919788f/src/debug_utils.cc#L253
I could move the cast to https://github.com/nodejs/node/blob/0b565eb7f7404fb8774865826afba10c1919788f/src/debug_utils.cc#L232-L235
(Now that I see it I could assume it's always stderr and eliminate the argument).
Sorry, something went wrong.
There was a problem hiding this comment.
Since this is only used for printing diagnostic information, I don’t think an extra parameter is necessary at all; we can always just use stderr
Sorry, something went wrong.
There was a problem hiding this comment.
Done
Sorry, something went wrong.
There was a problem hiding this comment.
What does the ~= mean?
Sorry, something went wrong.
There was a problem hiding this comment.
assign almost all fields... I'll rephrase
(I might have used more fields in an earlier imp)
Sorry, something went wrong.
There was a problem hiding this comment.
Rephrased
Sorry, something went wrong.
There was a problem hiding this comment.
snake_case for variables.
Sorry, something went wrong.
There was a problem hiding this comment.
I wanted to keep the code as similar as possible to https://docs.microsoft.com/en-us/windows/desktop/Debug/retrieving-symbol-information-by-address
Sorry, something went wrong.
There was a problem hiding this comment.
Done
Sorry, something went wrong.
There was a problem hiding this comment.
I feel this information about what you changed isn’t particularly useful. Both of the patches are fairly trivial. This also apply to the other places.
Sorry, something went wrong.
There was a problem hiding this comment.
I'd rather keep the comment, AFAIK more comment never hurt...
Also they might be useful since the examples on MSDN change from time to time (for example they changed since the last time this code was lifted, and I had to reverse engineer the patches).
Sorry, something went wrong.
There was a problem hiding this comment.
Also they might be useful since the examples on MSDN change from time to time
Wouldn’t that be a good reason to drop the comment, since the diff can change on both sides, and so the Patches: list can grow out of date?
Sorry, something went wrong.
There was a problem hiding this comment.
I'll sleep on it.
Sorry, something went wrong.
There was a problem hiding this comment.
Since MSDN does have a history, I'm thinking the comments might still be useful.
Anyway they are free, and IMHO more info is almost always better then missing info...
I did go over them to make sure they are uniform, and not too obfuscated.
Sorry, something went wrong.
There was a problem hiding this comment.
nit: one space after DWORD.
Sorry, something went wrong.
There was a problem hiding this comment.
Ack.
Sorry, something went wrong.
|
cc @gireeshpunathil There may be opportunities here to reuse some code for Windows backtraces w.r.t. node-report in core and this PR. |
Sorry, something went wrong.
There was a problem hiding this comment.
Can we put this back in the .cc file?
Sorry, something went wrong.
There was a problem hiding this comment.
Done.
But may I ask why?
Sorry, something went wrong.
There was a problem hiding this comment.
Since this is only used for printing diagnostic information, I don’t think an extra parameter is necessary at all; we can always just use stderr
Sorry, something went wrong.
There was a problem hiding this comment.
When is #ifdef _DEBUG defined? Is it the same as our #ifdef DEBUG?
Sorry, something went wrong.
There was a problem hiding this comment.
Line 109 in f1b9546
Sorry, something went wrong.
There was a problem hiding this comment.
Since I don’t know much about the Windows debugging stuff … how common would these errors be? i.e. do we only print them in debug mode because they would otherwise appear relatively frequently?
Sorry, something went wrong.
There was a problem hiding this comment.
i.e. do we only print them in debug mode because they would otherwise appear relatively frequently?
Yes very frequent. If the *.pdb is not available, or is partial. Also the last (deepest) frame almost always fails to resolve.
Done /s/_DEBUG/DEBUG
Sorry, something went wrong.
There was a problem hiding this comment.
DWORD64 dw_address
Sorry, something went wrong.
There was a problem hiding this comment.
Ack.
But the type stated explicitly on the rhs.
And the name is copied from the example, which I'd rather not change...
Sorry, something went wrong.
There was a problem hiding this comment.
Ack.
Sorry, something went wrong.
|
New CI: https://ci.nodejs.org/job/node-test-commit/22567/ |
Sorry, something went wrong.
Debug mode exe:Example output with .pdb present: DEV D:\code\node>Debug\node.exe test\parallel\test-fs-stat-bigint.js C:\WINDOWS\system32\cmd.exe - Debug\node.exe test\parallel\test-fs-stat-bigint.js [37716]: d:\code\node\src\node_file.cc:962: Assertion `(argc) >= (11)' failed. 1: 00007FF61F72EE8A node::DumpBacktrace+138 [d:\code\node\src\debug_utils.cc]:L254 2: 00007FF61F6999C7 node::Abort+39 [d:\code\node\src\node.cc]:L1030 3: 00007FF61F699B17 node::Assert+295 [d:\code\node\src\node.cc]:L1049 4: 00007FF61F60B7AC node::fs::LStat+108 [d:\code\node\src\node_file.cc]:L962 5: 00007FF62039C925 v8::internal::FunctionCallbackArguments::Call+469 [d:\code\node\deps\v8\src\api-arguments-inl.h]:L120 6: 00007FF62039B31C v8::internal::`anonymous namespace'::HandleApiCallHelper<0>+684 [d:\code\node\deps\v8\src\builtins\builtins-api.cc]:L111 7: 00007FF62039C5DB v8::internal::Builtin_Impl_HandleApiCall+507 [d:\code\node\deps\v8\src\builtins\builtins-api.cc]:L139 8: 00007FF62039BE83 v8::internal::Builtin_HandleApiCall+451 [d:\code\node\deps\v8\src\builtins\builtins-api.cc]:L127 SymGetLineFromAddr64 returned error : 126 SymFromAddr returned error : 126 9: 000003B89AE86628 Without .pdb DEV D:\code\node>Debug\node.exe test\parallel\test-fs-stat-bigint.js C:\WINDOWS\system32\cmd.exe - Debug\node.exe test\parallel\test-fs-stat-bigint.js [37020]: d:\code\node\src\node_file.cc:962: Assertion `(argc) >= (11)' failed. SymGetLineFromAddr64 returned error : 487 1: 00007FF61F72EE8A AES_cbc_encrypt+5218554 SymGetLineFromAddr64 returned error : 487 2: 00007FF61F6999C7 AES_cbc_encrypt+4607031 SymGetLineFromAddr64 returned error : 487 3: 00007FF61F699B17 AES_cbc_encrypt+4607367 SymGetLineFromAddr64 returned error : 487 4: 00007FF61F60B7AC AES_cbc_encrypt+4024860 SymGetLineFromAddr64 returned error : 487 5: 00007FF62039C925 AES_cbc_encrypt+18250645 SymGetLineFromAddr64 returned error : 487 6: 00007FF62039B31C AES_cbc_encrypt+18245004 SymGetLineFromAddr64 returned error : 487 7: 00007FF62039C5DB AES_cbc_encrypt+18249803 SymGetLineFromAddr64 returned error : 487 8: 00007FF62039BE83 AES_cbc_encrypt+18247923 SymGetLineFromAddr64 returned error : 126 SymFromAddr returned error : 126 9: 00000074D8C06628 |
Sorry, something went wrong.
|
All comments addressed, PTAL. |
Sorry, something went wrong.
There was a problem hiding this comment.
I am not a fan of this type of comment: What happens is obvious in both branches, and the branches themselves are short. (And I think we have a convention of ending comments with a period.)
Sorry, something went wrong.
There was a problem hiding this comment.
This code was lifter verbatim from https://docs.microsoft.com/en-us/windows/desktop/Debug/retrieving-symbol-information-by-address
I would rather keep changes to minimon, for future reverse engineering.
Sorry, something went wrong.
There was a problem hiding this comment.
I am still not sure whether this is going to help us at some point, I suspect it won't.
Sorry, something went wrong.
There was a problem hiding this comment.
Comment are free.
Personally I have not been in a situation where I said "I wish there was less comments"
Sorry, something went wrong.
There was a problem hiding this comment.
I tend to agree, but someone will either change our code or the original, and updating the comment will mostly be a maintenance burden at that point from my perspective.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM either way, even though I don't see much value in some of the comments.
Sorry, something went wrong.
Refresh `Win32SymbolDebuggingContext::LookupSymbol` to use more APIs PR-URL: nodejs#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>
Refresh `Win32SymbolDebuggingContext::LookupSymbol` to use more APIs PR-URL: #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>
Notable changes:
* child_process:
* All child processes will again open up a new Window on Windows by
default. [#24034](#24034)
* deps:
* A new and fast experimental HTTP parser (`llhttp`) is now supported.
[#24059](#24059)
* **Windows**
* A crashing process will now show the names of stack frames if the
node.pdb file is available.
[#23822](#23822)
* Added new collaborators:
* [oyyd](https://github.com/oyyd) - Ouyang Yadong.
[#24300](#24300)
* [psmarshall](https://github.com/psmarshall) - Peter Marshall.
[#24170](#24170)
* [shisama](https://github.com/shisama) - Masashi Hirano.
[#24136](#24136)
Notable changes:
* deps:
* A new experimental HTTP parser (`llhttp`) is now supported.
#24059
* timers:
* Fixed an issue that could cause setTimeout to stop working as
expected. #24322
* Windows
* A crashing process will now show the names of stack frames if the
node.pdb file is available.
#23822
* Continued effort to improve the installer's new stage that installs
native build tools.
#23987,
#24348
* child_process:
* On Windows the `windowsHide` option default was restored to
`false`. This means `detached` child processes and GUI apps will
once again start in a new window.
#24034
* Added new collaborators:
* [oyyd](https://github.com/oyyd) - Ouyang Yadong.
#24300
* [psmarshall](https://github.com/psmarshall) - Peter Marshall.
#24170
* [shisama](https://github.com/shisama) - Masashi Hirano.
#24136
Notable changes:
* deps:
* A new experimental HTTP parser (`llhttp`) is now supported.
#24059
* timers:
* Fixed an issue that could cause setTimeout to stop working as
expected. #24322
* Windows
* A crashing process will now show the names of stack frames if the
node.pdb file is available.
#23822
* Continued effort to improve the installer's new stage that installs
native build tools.
#23987,
#24348
* child_process:
* On Windows the `windowsHide` option default was restored to
`false`. This means `detached` child processes and GUI apps will
once again start in a new window.
#24034
* Added new collaborators:
* [oyyd](https://github.com/oyyd) - Ouyang Yadong.
#24300
* [psmarshall](https://github.com/psmarshall) - Peter Marshall.
#24170
* [shisama](https://github.com/shisama) - Masashi Hirano.
#24136
PR-URL: #24350
Refresh `Win32SymbolDebuggingContext::LookupSymbol` to use more APIs PR-URL: #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>
|
This does not land cleanly in v8.x LTS. Please feel free to manually backport by following the guide. Please also feel free to replace do-not-land if it is being backported |
Sorry, something went wrong.
Refresh `Win32SymbolDebuggingContext::LookupSymbol` to use more APIs PR-URL: #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>
Refresh `Win32SymbolDebuggingContext::LookupSymbol` to use more APIs PR-URL: #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>
Notable changes:
* deps:
* upgrade to c-ares v1.15.0 (Ben Noordhuis)
#23854
* Windows:
* A crashing process will now show the names of stack frames if the node.pdb
file is available. (Refael Ackermann)
#23822
* Added new collaborators:
* Peter Marshall. #24170
* Masashi Hirano. #24136
PR-URL: #24727
Notable changes:
* deps:
* upgrade to c-ares v1.15.0 (Ben Noordhuis)
#23854
* Windows:
* A crashing process will now show the names of stack frames if the node.pdb
file is available. (Refael Ackermann)
#23822
* Added new collaborators:
* Peter Marshall. #24170
* Masashi Hirano. #24136
PR-URL: #24727
Notable changes:
* deps:
* upgrade to c-ares v1.15.0 (Ben Noordhuis)
nodejs#23854
* Windows:
* A crashing process will now show the names of stack frames if the node.pdb
file is available. (Refael Ackermann)
nodejs#23822
* Added new collaborators:
* Peter Marshall. nodejs#24170
* Masashi Hirano. nodejs#24136
PR-URL: nodejs#24727
| Back | FazBrowse Home | New Git URL |
Refresh Win32SymbolDebuggingContext::LookupSymbol to use more APIs
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
Before:
After (with PDB available):
Fallback with no PDB loaded:
Checklist