[PATCH] Fix the remainder of PR22762 (GDB is crashing on DW_OP_piece being used inside of DW_AT_frame_base)

Adrian Prantl aprantl at apple.com
Thu Mar 12 14:52:32 PDT 2015


> On Mar 12, 2015, at 2:42 PM, David Blaikie <dblaikie at gmail.com> wrote:
> 
> 
> 
> On Thu, Mar 12, 2015 at 2:39 PM, Adrian Prantl <aprantl at apple.com <mailto:aprantl at apple.com>> wrote:
> [Just noticed that I forgot to rename MayUsePieceForSubRegMask in DwarfCompileUnit.]
> 
> The problem is that the TargetRegisterInfo tells us that the frame register is ebp, for which there is no separate register number,
> 
> Well, we don't have one listed, but GDB/GCC might have one? Since the register numbering is an implementation detail, not part of the DWARF spec. But I haven't looked/wouldn't really know where to look to see if it's just a matter of us adding the appropriate number.

Even if it had one this would then break existing LLDB. As far as I understand it, the x86_64 ABI only defines register numbers for the 64-bit registers:

http://llvm.org/svn/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp <http://llvm.org/svn/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp>

-- adrian

>  
> so it must be constructed from rbp. The DWARF backend doesn't know about what is in the upper half of rbp so it must mask out the upper bits.
> 
> 
> http://reviews.llvm.org/D8233 <http://reviews.llvm.org/D8233>
> 
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/ <http://reviews.llvm.org/settings/panel/emailpreferences/>
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150312/2cf150f8/attachment.html>


More information about the llvm-commits mailing list