Yes, the size of type I have in mind is generic, size of an address.

Regards,


Chirag Patel
Software Engineer | Raincode Labs India 
Tel: (+91) 080 41159811
Mob: (+91) 9049336744
www.raincodelabs.com


-----Original Message-----
From: Jakub Jelinek <ja...@redhat.com> 
Sent: 08 November 2019 13:45
To: Chirag Patel <chi...@raincode.com>
Cc: Michael Eager <ea...@eagercon.com>; Robinson, Paul 
<paul.robin...@sony.com>; Ron Brender <ron.bren...@gmail.com>; 
dwarf-discuss@lists.dwarfstd.org
Subject: Re: [Dwarf-Discuss] dwarf stack operator for byte swap.

On Fri, Nov 08, 2019 at 06:51:52AM +0000, Chirag Patel via Dwarf-Discuss wrote:
> Proposed changes to DWARF
> ---------------------------
> 
> 2.5.1.7 Special Operation
> 
> Addition
> 
> <n> DW_OP_byte_swap
> 
>                The DW_OP_byte_swap operation pops the top stack entry, byte 
> swaps the value
>                and pushes back the swapped value on the dwarf stack.
> 
>                e.g. so 0x12345678 will become 0x78563412, useful to change 
> endianity of raw
>                data.

With the typed DWARF stack it is clear, the types have well defined size, but 
when using the most common values, where the values have generic type, does 
that mean DW_OP_byte_swap there is bswap64 if address is 64-bit, or
bswap32 if address is 32-bit, or for 16-bit addresses bswap16 etc.?

        Jakub

_______________________________________________
Dwarf-Discuss mailing list
Dwarf-Discuss@lists.dwarfstd.org
http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org

Reply via email to