+ Reply to Thread
Results 1 to 3 of 3

Thread: r2 + threads + breakpoints problem

  1. #1

    Default r2 + threads + breakpoints problem

    Hello all

    I have a small trouble, I working a lot with linux binaries, and last time found what they have a lot of threads. But can't set the breakpoits in common places like recv, or write, etc
    in sym.imp I can't see it, the same if I just place "db printf"


    small poc C code
    Compilled with "gcc -o test test.c -lpthread"





    In gdb I can catch bp in printf, but with r2 can't.

    Any help how to deal with it?

    Best regards
    Last edited by doomedraven; 09-07-2015 at 14:01.

  2. #2
    dukeBarman's Avatar

    Default Re: r2 + threads + breakpoints problem

    Copypaste from telegram chat (xvilka):

    r2 is a lowlevel debugger, so it stops on the 'start', not the 'main'. But adding 'future' breakpoints is nearly completed.

    You may try:
    1. To set a breakpoint on a 'print' function, keep in mind the special naming scheme in the radare2. In our case 'printf' is just 'sym.imp.printf' (may be without 'aa'), I hope it is easy to figure out the rest.
    2. change entrypoint ('Setting breakpoint on the entrypoint = main'): 'e dbg.bep'
    Last edited by dukeBarman; 11-07-2015 at 21:20.
    A hacker without a cat is not a hacker!

  3. 2 пользователя(ей) сказали cпасибо:
    root (11-07-2015) ximera (11-07-2015)
  4. #3

    Default Re: r2 + threads + breakpoints problem

    The problem is what printf is not in sym.imp, only sleep, from that code, what I tried to do is:

    db printf
    db sym.imp.printf

    Tried search something related, but no luck, no way :(

    PS i can put bp in sleep, after printf, but is not interesting for me
    Last edited by doomedraven; 12-07-2015 at 12:50.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT. The time now is 01:25
vBulletin® Copyright ©2000 - 2018
www.reverse4you.org