-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In rust-lang/rust#46457, "m4b" pointed out that the Rust support in gdb doesn't properly handle the lookup of qualified names. In particular, as shown in the test case in this patch, something like "::NAME" should be found in the global scope, but is not. This turns out to happen because rust_lookup_symbol_nonlocal does not search the global scope unless the name in question is unqualified. However, lookup_symbol_aux does not search the global scope, and appears to search the static scope only as a fallback (I wonder if this is needed?). This patch fixes the problem by changing rust_lookup_symbol_nonlocal to search the static and global blocks in more cases. Regression tested against various versions of the rust compiler on Fedora 26 x86-64. (Note that there are unrelated failures with newer versions of rustc; I will be addressing those separately.) 2018-01-19 Tom Tromey <[email protected]> * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified symbols in the static and global blocks. 2018-01-19 Tom Tromey <[email protected]> * gdb.rust/modules.rs (TWENTY_THREE): New global. * gdb.rust/modules.exp: Add ::-qualified lookup test.
- Loading branch information
Showing
5 changed files
with
30 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
2018-01-19 Tom Tromey <[email protected]> | ||
|
||
* rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified | ||
symbols in the static and global blocks. | ||
|
||
2018-01-19 James Clarke <[email protected]> | ||
|
||
* nat/linux-ptrace.c: Remove unnecessary reinclusion of | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
2018-01-19 Tom Tromey <[email protected]> | ||
|
||
* gdb.rust/modules.rs (TWENTY_THREE): New global. | ||
* gdb.rust/modules.exp: Add ::-qualified lookup test. | ||
|
||
2018-01-19 Andreas Arnez <[email protected]> | ||
|
||
* gdb.arch/s390-vregs.exp: Explicitly cast the return values of | ||
|
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