Current File : //usr/share/gdb/python/gdb/command/pahole.pyo
�
�� Rc@s0ddlZdejfd��YZe�dS(i����NtPaholecBs2eZdZd�Zd�Zd�Zd�ZRS(s�Show the holes in a structure.
This command takes a single argument, a type name.
It prints the type and displays comments showing where holes are.cCs&tt|�jdtjtj�dS(Ntpahole(tsuperRt__init__tgdbtCOMMAND_NONEtCOMPLETE_SYMBOL(tself((s+/usr/share/gdb/python/gdb/command/pahole.pyRscCs&||kr"||}d|GHndS(Ns$  /* XXX %d bit hole, try to pack */((Rtbitpostfield_bitposthole((s+/usr/share/gdb/python/gdb/command/pahole.pytmaybe_print_holes
c	Cs�|dkrd}n|j}|dkr3d}nddd||fGHd}x�|j�D]�}t|d�sxq]n|jj�}|j||j�|j}|jdkr�|j}n
d|j	}dt
|d�t
|d�fG||}|jtj
kr&|j||d	|j�q]ddd|Gd
t|�|jfGHq]W|dkrx|j|d|j	�nddd|Gd|GHdS(
Nts
%sstruct %s {t iiRis /* %3d %3d */is%s %sis} %s(tNonettagtfieldsthasattrttypetstrip_typedefsRRtbitsizetsizeoftinttcodeRtTYPE_CODE_STRUCTRtnametstr(	RRtlevelRRRtfieldtftypet	fieldsize((s+/usr/share/gdb/python/gdb/command/pahole.pyR"s4				
"
cCsXtj|�}|j�}|jtjkr=td|�ndG|j|dd�dS(Ns%s is not a struct typeR
iiRs              (Rtlookup_typeRRRt	TypeErrorR(Rtargtfrom_ttyR((s+/usr/share/gdb/python/gdb/command/pahole.pytinvokeIs(t__name__t
__module__t__doc__RRRR#(((s+/usr/share/gdb/python/gdb/command/pahole.pyRs
			'(RtCommandR(((s+/usr/share/gdb/python/gdb/command/pahole.pyt<module>s=