Saturday, February 22, 2014

using gdb with unix pipe ./lexer a.cl | ./parser

The normal command line arg won't work because there is nowhere to insert the gdb command. You can try ./lexer a.cl | gdb parser but this isn't the same as sending the output of the lexer to the debugger.

Tricky solution:
Have to create a temp file to serve as the output of the lexer command and have linux block on this command. Then create a separate process to read from the temp file from inside the debugger.