This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/14025] New: "info var" doesn't find LOC_UNRESOLVED var
- From: "dje at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 27 Apr 2012 00:17:00 +0000
- Subject: [Bug symtab/14025] New: "info var" doesn't find LOC_UNRESOLVED var
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14025
Bug #: 14025
Summary: "info var" doesn't find LOC_UNRESOLVED var
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: symtab
AssignedTo: unassigned@sourceware.org
ReportedBy: dje@google.com
Classification: Unclassified
This patch to dw2-unresolved.exp shows a case that gdb doesn't handle.
The variable is there, but gdb doesn't print LOC_UNRESOLVED declarations.
Replace xyz with this bug's bug number.
Index: dw2-unresolved.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp,v
retrieving revision 1.5
diff -u -p -r1.5 dw2-unresolved.exp
--- dw2-unresolved.exp 4 Jan 2012 08:17:51 -0000 1.5
+++ dw2-unresolved.exp 27 Apr 2012 00:10:34 -0000
@@ -34,3 +34,37 @@ gdb_continue_to_breakpoint "*extern_bloc
# Expect the inner value 2. Value 1 from the outer local block is shadowed.
gdb_test "print/d var" "= 2"
+
+# Second version of test for bug xyz.
+# "info var var" should see the global var, but it does not.
+
+if { [prepare_for_testing dw2-unresolved.exp "dw2-unresolved"
{dw2-unresolved-main.c dw2-unresolved.S} {debug}] } {
+ return -1
+}
+
+if ![runto_main] {
+ return -1
+}
+
+gdb_breakpoint "*extern_block_start"
+gdb_continue_to_breakpoint "*extern_block_start"
+
+# Expect the inner value 2. Value 1 from the outer local block is shadowed.
+gdb_test "print/d var" "= 2"
+
+set test "ptype var"
+gdb_test_multiple $test $test {
+ -re "type = unsigned char\[\r\n]+$gdb_prompt $" {
+ pass $test
+ }
+}
+
+set test "info var var"
+gdb_test_multiple $test $test {
+ -re " var\[\r\n\]+.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "$gdb_prompt $" {
+ kfail symtab/xyz $test
+ }
+}
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.