7

I was following this video: https://www.youtube.com/watch?v=3NTXFUxcKPc at the end it show how to do basic stuff with Radare2. When i try to set a break point with:

db 0x004005bd

where '0x004005bd' is the first address of the main function that just does:

push rbp

but after i run the db command it tells me:

Cannot place a breakpoint on 0x004005bd unmapped memory. See dbg.bpinmaps

I understand what its telling me, but how do i fix it ?

Thanks and sorry for the very noobish question (also, sorry for my english).

  • 1
    do you use r2 from git ? – oddcoder Oct 10 '16 at 21:17
6

Run radare2 in debug mode. r2 -d

3

You are probably using an obsolete version of radare2.

Uninstall your current radare2 version then git clone https://github.com/radare/radare2 && cd radare2 && ./sys/install.sh

If you are using archlinux use radare2-git

If you are using windows or another platform (like iOS or Android), please use the git link on rada.re or build it.

Lastly if you encounter an issue related to radare2 itself, I strongly suggest you come say hi on IRC or Telegram, you can also report issue on github.

1

you can check the exexcutable file using "file" command. then you can find the file is an "elf shared object" NOT an "elf executable". however you can execute it directly.

so you need to recomplie it using "gcc xxx.c -no-pie -o xxx" then debug it using "radare2 -d xxx" and you're good to go

0

I'm using a Debian OS(kali/parrot) and I got the same error.When you executing radare2 in a Mac OS and try to add breakpoint using the same method, it'll work properly. But when it comes to Linux OS, it'll probably give you this error.

I tried everything.Then I saw this when I trying to execute ood inside radare2 console,

WARNING: bin_strings buffer is too big (0xffffffffa9a2552c). Use -zzz or set bin.maxstrbuf (RABIN2_MAXSTRBUF) in r2 (rabin2)

First, you have to compile the C code using the following command,

gcc <name>.c -no-pie -o <any_name>

Then open it with -zzz option, as an example, let's say my compiled code name is "tool", then execute this command,

$radare2 -zzz tool3

and continue with the process. Now you'll be able to add a breakpoint.

0

You can also do e dbg.bpinmaps=0 so Radare2 allows you to set breakpoint without that restriction.

  • it could be helpful to explain what this flag does in r2. – Paweł Łukasik Aug 6 at 5:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.