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

Add func_offset to pydbg #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jevinskie
Copy link

func_offset returns the offset of the specified function from the DLL's
base address

func_resolve wasn't working for me in the following use case. func_offset lets me work around the issue.

def handler_load_dll(dbg):
    last_dll = dbg.get_system_dll(-1)
    # Wait for the DLL we're looking for ...
    if "ftd2xx.dll".lower() == last_dll.name.lower():
        # Now resolve the address of the function (see note: requires debug symbols)
        write_off = dbg.func_offset(last_dll.name, "FT_Write")
        write_addr = last_dll.base + write_off
        # this didnt work
        # write_addr = dbg.func_resolve(last_dll.name, "FT_Write")

func_offset returns the offset of the specified function from the DLL's
base address
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

Successfully merging this pull request may close these issues.

1 participant