Skip to content

Commit cbe8fa8

Browse files
committed
Remove various dead code
Change-Id: I38cd0577311c670ed965a5c064ef266aef915816 TN: RC14-025
1 parent 0cd6335 commit cbe8fa8

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

gnatdbg/maps.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ def get_node_iterator(self):
2020
raise NotImplementedError()
2121

2222
def children(self):
23-
names = iter('[{}]'.format(i) for i in count(0))
23+
# This is an infinite iterator by design: the exit path is not
24+
# coverable.
25+
names = iter('[{}]'.format(i) for i in count(0)) # no-code-coverage
26+
2427
for node in self.get_node_iterator():
2528
yield (next(names), node['key'])
2629
yield (next(names), node['element'])

gnatdbg/tagged.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from gnatdbg.utils import (
88
address_as_offset, addr_to_val, encode_name, get_system_address,
9-
ptr_to_int, strip_typedefs
9+
strip_typedefs
1010
)
1111

1212
# The reader of this module is assumed to be familiar with how GNAT implements

gnatdbg/utils.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,6 @@ def address_as_offset(addr):
6262
return int_addr
6363

6464

65-
def ptr_to_int(ptr_value):
66-
"""
67-
Convert an access GDB value into the corresponding Python integer.
68-
"""
69-
return int(ptr_value.cast(get_system_address()))
70-
71-
7265
def strip_typedefs(value):
7366
return value.cast(value.type.strip_typedefs())
7467

0 commit comments

Comments
 (0)