[ EOLDPATCH ] On 24-06-19 15:18, Tom de Vries wrote: > Hi, > > When we run gdb.dwarf2/varval.exp with board cc-with-dwz, we run into: > ... > gdb compile failed, dwz: varval: Couldn't find DIE referenced by \ > DW_OP_GNU_variable_value > cc-with-tweaks.sh: dwz did not modify varval. > UNTESTED: gdb.dwarf2/varval.exp: failed to prepare > ... > > The problem is that varval contains some bad DWARF, which has been added > intentionally to test GDB, but that bad DWARF causes dwz to error out, which > has the consequence that the test-case remains untested with cc-with-dwz, > while the test-case contains also correct DWARF that does not occur in any > other test, and which we would really like to test with board cc-with-dwz. > > Fix this by compiling varval twice, once without and once with the bad DWARF, > such that we have at least: > ... > PASS: gdb.dwarf2/varval.exp: print varval > PASS: gdb.dwarf2/varval.exp: print varval2 > PASS: gdb.dwarf2/varval.exp: print constval > PASS: gdb.dwarf2/varval.exp: print mixedval > PASS: gdb.dwarf2/varval.exp: print pointerval > PASS: gdb.dwarf2/varval.exp: print *pointerval > PASS: gdb.dwarf2/varval.exp: print structval > PASS: gdb.dwarf2/varval.exp: print untypedval > gdb compile failed, dwz: varval: Couldn't find DIE referenced by \ > DW_OP_GNU_variable_value > cc-with-tweaks.sh: dwz did not modify varval. > UNTESTED: gdb.dwarf2/varval.exp: failed to prepare > ... > > Tested on x86_64-linux. > > OK for trunk? > > Thanks, > - Tom >