from Hacker News

Show HN: GdbShellPipe – Pipe output of gdb commands to shell

by hq6 on 7/19/18, 12:59 AM with 6 comments

  • by xvilka on 7/19/18, 1:53 AM

    Similar thing is available within radare2 [1] too, it is available as a small library for different languages and called r2pipe [2].

    [1] https://github.com/radareorg/radare2

    [2] https://radare.gitbooks.io/radare2book/content/

  • by jolmg on 7/19/18, 1:55 AM

    I didn't understand the example in the README. There is no "main" in those lines, so why did grep output them?
  • by wazari972 on 7/19/18, 1:27 PM

    nice and easy ! I remember that the piping functionality was discussed in GDB mailing list long ago, but I guess it never got accepted!

    it would have allowed writing

        (gdb) disas | grep mov
    
    instead of

        (gdb) shell-pipe disas | grep mov