This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] Fix size check in dwarf2_evaluate_loc_desc_full
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 29 May 2017 22:55:33 +0200
- Subject: Re: [RFA] Fix size check in dwarf2_evaluate_loc_desc_full
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org>
On 2017-05-29 18:25, Tom Tromey wrote:
This Rust bug report:
noted an error from gdb. What is happening here (for me, the original
report had a different error) is that a pieced DWARF expression is not
writing to every byte in the resulting value. GDB errors in this
case. However, it seems to me that it is always valid to write fewer
bytes; the issue comes from writing too many -- that is, the test is
reversed. The test was also checking the sub-object, but this also
seems incorrect, as it's expected for the expression to write the
entirety of the enclosing object. So, this patch reverses the test
and applies it to the outer type, not the subobject type.
Your explanation sounds sensible to me (and the tests suggests it's
good). Andreas, since you played with DWARF pieces quite a bit, do you
have an opinion on this?
Would it be possible to test the error case as well by feeding bad DWARF
info in the test case?