[Dwarf-Discuss] dwarf stack operator for byte swap.

2019-10-28 Thread Chirag Patel via Dwarf-Discuss
Hello Dwarf experts. I am currently working trying to encode dwarf of binaries with having bi-endian variables marked with DW_AT_endianity attribute. The location calculation for some variable depends on other variable with different endianity, also the value of this other variable is known at

Re: [Dwarf-Discuss] dwarf stack operator for byte swap.

2019-10-28 Thread Robinson, Paul via Dwarf-Discuss
Hello Chirag, Regarding a byte-swap operation, it seems that you have a reasonable use-case on a bi-endian machine. Feel free to request a new operator on the "public comments" page at http://dwarfstd.org/Comment.php Note that a byte-swap operator would swap all bytes in the top-of-stack value

Re: [Dwarf-Discuss] dwarf stack operator for byte swap.

2019-10-28 Thread Michael Eager via Dwarf-Discuss
Hi Chirag -- A byte-swap operator would be a reasonable addition to the DWARF interpreter. In addition to writing a proposal as Paul suggests, one option I would recommend you consider is to create a user-defined operation to perform this byte-swap operation and give it a value in the range