This is the mail archive of the gdb-patches@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: [PATCH] Big-endian targets: don't ignore offset into DW_OP_implicit_value


On Thu, Jan 19 2017, Yao Qi wrote:

> Nit: we could also match one digit to simplify the usage.  With your
> patch, we need to use it like this,
>
>
> +		    {DW_AT_location {
> +			DW_OP_implicit_value 0x01 0x01 0x01 0x01
> +		    } SPECIAL_expr}

Right, or in this particular case you could say

      DW_OP_implicit_value 0x01010101

instead, because the number is endianness-symmetric ;-)

>
> but if we add "{^0x[[:xdigit:]]{2}$} {_op .byte $value}", the use
> above can be simplified,
>
> +                   {DW_AT_location {
> +                       DW_OP_implicit_value 0x1 0x1 0x1 0x1
> +                   } SPECIAL_expr}

You probably mean "{^0x[[:xdigit:]]{1,2}$} {_op .byte $value}"?  Sure,
will do.  The idea behind the existing logic is that the resulting
immediate value always has half as many bytes as there are hex digits.
But for single byte integers I agree that this is a bit picky and the
simplification is useful.  I would not extend this to multi-byte
integers, though, such as allowing 0x123456 or such.

> During the review, I am trying to use DW_OP_implicit_value in
> gdb.dwarf2/implptr-64bit.exp, because I think we should use this new
> added DW_OP as much as we can in existing test case.

Sounds good!

> I get some troubles on using Dwarf::assemble for two cus.  I'll let
> you know once I resolve the issues there.

OK, let's see how that goes.

--
Andreas


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