Skip to content
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

unable to find disassembly on x64 #24

Open
kn0t3k opened this issue Feb 8, 2024 · 1 comment
Open

unable to find disassembly on x64 #24

kn0t3k opened this issue Feb 8, 2024 · 1 comment

Comments

@kn0t3k
Copy link

kn0t3k commented Feb 8, 2024

The plugin is not able to find disassembly window when running a x64 sample.
Solution is as follows - patch function find_disass_view in file custom.py:

 def find_disass_view(self):
        ip_name: str = dbg.registers.pc
        # if on x64 arch, the ip register is called RIP, but the view is NOT called IDA View-RIP, but IDA View-EIP
        # thus need to change RIP to EIP, for this purpose
        if ip_name == "RIP":
            ip_name = "EIP"

        widget = idaapi.find_widget("IDA View-%s" % ip_name)
        if widget:
            return widget

        for c in map(chr, range(65, 75)):
            widget = idaapi.find_widget("IDA View-%s" % c)
            if widget:
                return widget
        return None

Feel free to pull request / update code, I'm too lazy to pull request.

@Harding-Stardust
Copy link

This is not longer the case in IDA 9.0. ida_kernwin.find_widget("IDA View-RIP") works fine on x64.
I suggest the following change of code to fix it for old and new IDA:

    def find_disass_view(self):
        widget = idaapi.find_widget(f'IDA View-{dbg.registers.pc}')
        if widget:
            return widget
        
        widget = idaapi.find_widget('IDA View-EIP') # IDA < 9.0 called the windows "IDA View-EIP" even for x64 targets
        if widget:
            return widget 
        
        for c in range('A', 'Z'):
            widget = idaapi.find_widget(f'IDA View-{c}')
            if widget:
                return widget
        return None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants