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

Can this directly set breakpoints in lldb/gdb? #43

Open
dvcrn opened this issue Jun 28, 2020 · 3 comments
Open

Can this directly set breakpoints in lldb/gdb? #43

dvcrn opened this issue Jun 28, 2020 · 3 comments
Assignees
Labels

Comments

@dvcrn
Copy link

@dvcrn dvcrn commented Jun 28, 2020

I wasn't completely sure because all the breakpoint commands mention over windebug which doesn't exist on mac.

From my short test with IDA, setting breakpoints in IDA doesn't reflect inside lldb so I'm guessing no, but might also just be my setup that's the problem.

@bootleg
Copy link
Owner

@bootleg bootleg commented Jun 29, 2020

Setting breakpoints from the disassembler (IDA/Ghidra) is supported for GDB but not for LLDB. I'm not familliar with the API, it may be possible without too much efforts, I'll look into it when I have time.

@bootleg bootleg self-assigned this Jun 29, 2020
@bootleg bootleg added the enhancement label Jun 29, 2020
@dvcrn
Copy link
Author

@dvcrn dvcrn commented Jun 30, 2020

If you give me some pointers on where you do it in gdb I could try to take a look 👍

@bootleg
Copy link
Owner

@bootleg bootleg commented Jun 30, 2020

Nothing complex. Basically one needs the ability to poll the socket safely for incoming commands like:

class Poller(threading.Thread):

Then I guess using something like the core of the cmd command will do the trick.

    ci = sc._dbg.GetCommandInterpreter()
    res = lldb.SBCommandReturnObject()

    ci.HandleCommand(command, res)
    if res.Succeeded():
        out = res.GetOutput()
        if not out:
            return
        out = base64.b64encode(out)
        pinfo = sc.procinfo()
        if not pinfo:
            return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.