in gdb to list active breakpoints is
info b how to do the same in radare2? is there any similar command in radare2 or something else?
db is used both to set a breakpoint and to list all breakpoints. As you can be see in the command's help output:
[0x00007f60]> db? |Usage: db # Breakpoints commands | db List breakpoints | db sym.main Add breakpoint into sym.main | db <addr> Add breakpoint | db -<addr> Remove breakpoint | db. Show breakpoint info in current offset | dbj List breakpoints in JSON format | dbc <addr> <cmd> Run command when breakpoint is hit | dbC <addr> <cmd> Set breakpoint condition on command | dbd <addr> Disable breakpoint ... ...
So simply do something like this:
$ r2 -d /bin/cat Process with PID 261 started... = attach 261 261 bin.baddr 0x00400000 Using 0x400000 asm.bits 64 -- Hang in there, Baby! [0x7f5399600c30]> db entry0 [0x7f5399600c30]> db main [0x7f5399600c30]> db 0x004025b0 - 0x004025b1 1 --x sw break enabled cmd="" cond="" name="entry0" module="/bin/cat" 0x004019e0 - 0x004019e1 1 --x sw break enabled cmd="" cond="" name="main" module="/bin/cat" [0x7f5399600c30]>