Should a DW_OP_implicit_value be taken from the left end?
Andreas Arnez
arnez@linux.vnet.ibm.com
Fri Dec 23 18:18:00 GMT 2016
Thanks for looking into this.
On Wed, Dec 21 2016, Jan Kratochvil wrote:
> When looking at the patch I think the patch may be wrong, I think the
> endianity should affect at least also the lines:
>
> case DWARF_VALUE_LITERAL:
> ...
> ldata = ctx.data + byte_offset;
> n -= byte_offset;
Right, that's another issue. If we revert the change for
DW_OP_implicit_value, it doesn't matter anymore, but the same bug occurs
with DW_OP_stack_value as well. I'll handle that separately.
> I really do not mind reverting the patch if you think so, that is up to the
> maintainers.
Note that I don't intend to revert the whole patch, only the part
affecting DW_OP_implicit_value (DWARF_VALUE_LITERAL).
> But when you ask me I miss here stating what the current GCC version does
> produce. Is GDB behavior fixed with current GCC by your proposed patch
> revert? If it breaks do you plan to change/fix also GCC? Does the GDB
> testsuite (particulerly the entryval testcases) have no regressions on s390*?
Right, the test suite has no regressions on s390*. And GCC can indeed
emit DWARF code that breaks with current GDB on s390x; and the proposed
patch would fix that. See attachment for an example.
> From my mail you reference I understand it as that my patch did fix some
> entryval testcases with GCC that time. Unfortunately the entryval testcases
> are provided as .S files prebuilt by GCC that time and they are difficult to
> reproduce with newer GCC as -O2 -g code changes too much with different GCC
> version, breaking various compiled code assumptions of the .exp file.
Your patch certainly fixed a real problem with DW_OP_stack_value, but I
doubt that the changes to the handling of DW_OP_implicit_value did. In
the patch description you stated:
"I am not completely sure with the DWARF standard understanding for
DW_OP_implicit_value (DWARF_VALUE_LITERAL) but I think it also should
be fixed (if such DWARF is valid at all)."
And Tom Tromey answered:
"I think I asked about this when implementing this DWARF addition in
gdb, but I can't find the messages right now."
Is there any any other information about the rationale of that change?
--
Andreas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: implvalue.c
URL: <http://sourceware.org/pipermail/gdb/attachments/20161223/1b6fc0e8/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: implvalue.debug
URL: <http://sourceware.org/pipermail/gdb/attachments/20161223/1b6fc0e8/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: implvalue.gdblog
URL: <http://sourceware.org/pipermail/gdb/attachments/20161223/1b6fc0e8/attachment-0001.ksh>
More information about the Gdb
mailing list