[lldb-dev] Support for smaller types in Scalar class

Abid, Hafiz via lldb-dev lldb-dev at lists.llvm.org
Mon Sep 7 08:50:56 PDT 2015


Adding lldb-dev. I used wrong address for list in the last emails.

> -----Original Message-----
> From: Abid, Hafiz
> Sent: 07 September 2015 17:07
> To: Greg Clayton (gclayton at apple.com)
> Cc: lldb-dev at cs.uiuc.edu
> Subject: Support for smaller types in Scalar class
> 
> Hi Greg,
> I am working on a target with a lot of 16-bit (and 8-bit) registers. So
> DW_OP_piece is frequently used in the DWARF for handling not only the
> basic types but also aggregate types. When a Scalar class variable is created
> for a 16-bit (or 8-bit) data read from the register, it promotes it to int as
> Scalar class does not have support for short (or char). So in the calculation of
> the size of that piece in value::AppendDataToHostBuffer, the scalar instance
> will return 4 instead of 2 (or 1) from Scalar::GetByteSize(). This messes up the
> calculation of piece size and variable evaluation fails.
> 
> Adding support of 16-bit (and 8-bit) in Scalar class solve this problem.
> Although it needs a lot of changes in this class, but most of them are
> mechanical. If this this approach seems right to you then I will send patches
> for review.
> 
> Thanks,
> Abid



More information about the lldb-dev mailing list