aboutsummaryrefslogtreecommitdiff
path: root/lldb/scripts/Python/modify-python-lldb.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/Python/modify-python-lldb.py')
-rw-r--r--lldb/scripts/Python/modify-python-lldb.py39
1 files changed, 4 insertions, 35 deletions
diff --git a/lldb/scripts/Python/modify-python-lldb.py b/lldb/scripts/Python/modify-python-lldb.py
index af51ae6..1e2784b 100644
--- a/lldb/scripts/Python/modify-python-lldb.py
+++ b/lldb/scripts/Python/modify-python-lldb.py
@@ -77,9 +77,6 @@ one_liner_docstring_pattern = re.compile(
# This supports the iteration protocol.
iter_def = " def __iter__(self): return lldb_iter(self, '%s', '%s')"
-module_iter = " def module_iter(self): return lldb_iter(self, '%s', '%s')"
-breakpoint_iter = " def breakpoint_iter(self): return lldb_iter(self, '%s', '%s')"
-watchpoint_iter = " def watchpoint_iter(self): return lldb_iter(self, '%s', '%s')"
section_iter = " def section_iter(self): return lldb_iter(self, '%s', '%s')"
compile_unit_iter = " def compile_unit_iter(self): return lldb_iter(self, '%s', '%s')"
@@ -100,28 +97,7 @@ symbol_in_section_iter_def = '''
#
# This dictionary defines a mapping from classname to (getsize, getelem) tuple.
#
-d = {'SBBreakpoint': ('GetNumLocations', 'GetLocationAtIndex'),
- 'SBCompileUnit': ('GetNumLineEntries', 'GetLineEntryAtIndex'),
- 'SBDebugger': ('GetNumTargets', 'GetTargetAtIndex'),
- 'SBModule': ('GetNumSymbols', 'GetSymbolAtIndex'),
- 'SBProcess': ('GetNumThreads', 'GetThreadAtIndex'),
- 'SBSection': ('GetNumSubSections', 'GetSubSectionAtIndex'),
- 'SBThread': ('GetNumFrames', 'GetFrameAtIndex'),
-
- 'SBInstructionList': ('GetSize', 'GetInstructionAtIndex'),
- 'SBStringList': ('GetSize', 'GetStringAtIndex',),
- 'SBSymbolContextList': ('GetSize', 'GetContextAtIndex'),
- 'SBTypeList': ('GetSize', 'GetTypeAtIndex'),
- 'SBValueList': ('GetSize', 'GetValueAtIndex'),
-
- 'SBType': ('GetNumberChildren', 'GetChildAtIndex'),
- 'SBValue': ('GetNumChildren', 'GetChildAtIndex'),
-
- # SBTarget needs special processing, see below.
- 'SBTarget': {'module': ('GetNumModules', 'GetModuleAtIndex'),
- 'breakpoint': ('GetNumBreakpoints', 'GetBreakpointAtIndex'),
- 'watchpoint': ('GetNumWatchpoints', 'GetWatchpointAtIndex')
- },
+d = {'SBModule': ('GetNumSymbols', 'GetSymbolAtIndex'),
# SBModule has an additional section_iter(), see below.
'SBModule-section': ('GetNumSections', 'GetSectionAtIndex'),
@@ -238,16 +214,9 @@ for line in content.splitlines():
if match:
# We found the beginning of the __init__ method definition.
# This is a good spot to insert the iter support.
- #
- # But note that SBTarget has three types of iterations.
- if cls == "SBTarget":
- new_content.add_line(module_iter % (d[cls]['module']))
- new_content.add_line(breakpoint_iter % (d[cls]['breakpoint']))
- new_content.add_line(watchpoint_iter % (d[cls]['watchpoint']))
- else:
- if (state & DEFINING_ITERATOR):
- new_content.add_line(iter_def % d[cls])
- new_content.add_line(len_def % d[cls][0])
+
+ new_content.add_line(iter_def % d[cls])
+ new_content.add_line(len_def % d[cls][0])
# SBModule has extra SBSection, SBCompileUnit iterators and
# symbol_in_section_iter()!