-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
substring not found #3
Comments
also happens on ida 7.7 with 3.9 python when trying to view microcode for a large function
|
I ran into this same issue - here was the fix that worked for me: # lucid/text.py, ~line 84
def _generate_token_ranges(self):
"""
Generate the text span indexes (start:end) for each child token.
"""
token_ranges = []
parsing_offset = 0
for token in self.items:
token_index = self.text[parsing_offset:].index(token.text)
token_start = parsing_offset + token_index
token_end = token_start + len(token.text)
token_ranges.append((range(token_start, token_end), token))
if token_start > 2 and self.text.find(',', parsing_offset, token_start) > parsing_offset:
continue
parsing_offset = token_end
self._token_ranges = token_ranges |
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Executing action: lucid:view_microcode (View microcode)
Traceback (most recent call last):
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\util\ida.py", line 51, in activate
self.action_function(ctx)
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\core.py", line 119, in interactive_view_microcode
self.explorer.show(current_address)
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\ui\explorer.py", line 48, in show
self.select_function(address)
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\ui\explorer.py", line 98, in select_function
mtext = MicrocodeText(mba, self.model.verbose)
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 463, in init
self.refresh()
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 471, in refresh
self._generate_from_mba()
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 483, in _generate_from_mba
blk_token = MicroBlockText(blk, self.verbose)
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 275, in init
self.refresh()
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 283, in refresh
self._generate_from_blk()
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 298, in _generate_from_blk
insn_token = MicroInstructionToken(insn, insn_idx, self)
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 166, in init
self._generate_from_insn()
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 177, in _generate_from_insn
self._create_subop(mop)
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 191, in _create_subop
subop = MicroOperandToken(mop, parent=self)
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 100, in init
self._generate_from_op()
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 112, in _generate_from_op
self._create_subop(mop.d.r)
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 147, in _create_subop
subop = MicroOperandToken(mop, parent=self)
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\microtext.py", line 101, in init
self._generate_token_ranges()
File "C:/Program Files/IDA_Pro_v7.5_Portable/plugins\lucid\text.py", line 92, in _generate_token_ranges
token_index = self.text[parsing_offset:].index(token.text)
ValueError: substring not found
The text was updated successfully, but these errors were encountered: