This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Should a DW_OP_implicit_value be taken from the left end?


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

Attachment: implvalue.c
Description: implvalue.c

Attachment: implvalue.debug
Description: readelf -wio output

Attachment: implvalue.gdblog
Description: GDB session


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]