File: CMakeBuildLldbExt.py

package info (click to toggle)
hm 18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,544 kB
  • sloc: cpp: 71,684; python: 4,382; sh: 471; makefile: 186; ansic: 16
file content (13 lines) | stat: -rwxr-xr-x 548 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
import lldb

def Rectangle_SummaryProvider (valobj,internal_dict):
    height_val = valobj.GetChildMemberWithName('height')
    width_val = valobj.GetChildMemberWithName('width')
    height = height_val.GetValueAsUnsigned(0)
    width = width_val.GetValueAsUnsigned(0)
    area = height*width
    perimeter = 2*(height + width)
    return 'Area: ' + str(area) + ', Perimeter: ' + str(perimeter)

def __lldb_init_module( debugger, dict ):
    debugger.HandleCommand( 'type summary add -F CMakeBuildLldbExt.Rectangle_SummaryProvider -e  Rectangle' )