[grumble grumble] And here is a second testcase that gets fixed by this patch as well. I suspect the reason why my patch fixes it is because the variables in the shared libraries must be LOC_UNRESOLVED, and thus resolved through default_read_var_value/lookup_minimal_symbol. gdb/testsuite/ChangeLog: * gdb.base/print-file-var-lib1.c, gdb.base/print-file-var-lib2.c, gdb.base/print-file-var-main.c, gdb.base/print-file-var.exp: New files. gdb/ChangeLog: * config/djgpp/fnchange.lst: Add entries for print-file-var-lib1.c, print-file-var-lib2.c, print-file-var-main.c and print-file-var.exp (located in gdb/testsuite/gdb.base). Tested on x86_64-linux. -- Joel