forked from eclipse-cdt-cloud/cdt-gdb-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure --frame is included even for frame 0
Some commands take a --frame or --thread, but the code had a common javascript error of `if (numberVar)` instead of `if (numberVar !== undefined)`. For threads this isn't often a problem as GDB doesn't use thread 0 typically. But for frames this is a problem as `--frame 0` was being omitted, leaving GDB to return info about the last frame that was accessed, e.g like this: -stack-list-variables --thread 4 --frame 1 --simple-values -stack-list-variables --thread 4 --simple-values Because the second line doesn't include the frame, GDB uses frame 1 still. However that will lead to errors as it should be frame 0 that is queried. Fixes eclipse-cdt-cloud#235
- Loading branch information
1 parent
9731886
commit f148157
Showing
2 changed files
with
83 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters