本文整理汇总了Python中collector.Collector.parse_size_line方法的典型用法代码示例。如果您正苦于以下问题:Python Collector.parse_size_line方法的具体用法?Python Collector.parse_size_line怎么用?Python Collector.parse_size_line使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类collector.Collector
的用法示例。
在下文中一共展示了Collector.parse_size_line方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_ignores_incomplete_size_line_2
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import parse_size_line [as 别名]
def test_ignores_incomplete_size_line_2(self):
c = Collector()
line = "U __preinit_array_end"
self.assertFalse(c.parse_size_line(line))
self.assertDictEqual(c.symbols, {})
示例2: test_ignores_incomplete_size_line_1
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import parse_size_line [as 别名]
def test_ignores_incomplete_size_line_1(self):
c = Collector()
line = "0000059c D __dso_handle"
self.assertFalse(c.parse_size_line(line))
self.assertDictEqual(c.symbols, {})
示例3: test_parses_variable_line_from_initialized_data_section
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import parse_size_line [as 别名]
def test_parses_variable_line_from_initialized_data_section(self):
c = Collector()
line = "00000968 000000c8 D foo /Users/behrens/Documents/projects/pebble/puncover/pebble/build/puncover.c:15"
self.assertTrue(c.parse_size_line(line))
self.assertDictEqual(c.symbols, {0x00000968: {'name': 'foo', 'base_file': 'puncover.c', 'path': '/Users/behrens/Documents/projects/pebble/puncover/pebble/build/puncover.c', 'address': '00000968', 'line': 15, 'size': 200, 'type': 'variable'}})
示例4: test_parses_variable_line_from_uninitialized_data_section
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import parse_size_line [as 别名]
def test_parses_variable_line_from_uninitialized_data_section(self):
c = Collector()
line = "00000a38 00000008 b some_double_value /Users/behrens/Documents/projects/pebble/puncover/pebble/build/../src/puncover.c:17"
self.assertTrue(c.parse_size_line(line))
self.assertDictEqual(c.symbols, {0x00000a38: {'name': 'some_double_value', 'base_file': 'puncover.c', 'path': '/Users/behrens/Documents/projects/pebble/puncover/pebble/build/../src/puncover.c', 'address': '00000a38', 'line': 17, 'size': 8, 'type': 'variable'}})
示例5: test_parses_function_line
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import parse_size_line [as 别名]
def test_parses_function_line(self):
c = Collector()
line = "00000550 00000034 T main /Users/behrens/Documents/projects/pebble/puncover/puncover/build/../src/puncover.c:25"
self.assertTrue(c.parse_size_line(line))
self.assertDictEqual(c.symbols, {0x00000550: {'name': 'main', 'base_file': 'puncover.c', 'path': '/Users/behrens/Documents/projects/pebble/puncover/puncover/build/../src/puncover.c', 'address': '00000550', 'line': 25, 'size': 52, 'type': 'function'}})