ó ›à 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||}|j t j kr&|j||d |jƒq]ddd|Gd t|ƒ|jfGHq]W|dkrx|j|d|j ƒndd d|Gd |GHdS( Nts %sstruct %s {t iiRis /* %3d %3d */is%s %sis} %s(tNonettagtfieldsthasattrttypetstrip_typedefsR RtbitsizetsizeoftinttcodeRtTYPE_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 (Rt lookup_typeRRRt TypeErrorR(Rtargtfrom_ttyR((s+/usr/share/gdb/python/gdb/command/pahole.pytinvokeIs  (t__name__t __module__t__doc__RR RR#(((s+/usr/share/gdb/python/gdb/command/pahole.pyRs    '(RtCommandR(((s+/usr/share/gdb/python/gdb/command/pahole.pyts =