Does logging work with fifo?

Peng Yu pengyu.ut@gmail.com
Tue Jan 22 05:15:00 GMT 2019


I use the following command in the batch mode to print out the
backtrace information.  /tmp/tmp.TNLBr685Zp is a fifo.

###
set logging redirect
set logging file /tmp/tmp.TNLBr685Zp
set logging on
commands 1-2644
backtrace 2
continue
end
run
###

While the gdb process runs in the background (via & in shell), the
fifo is catted (via the command cat) and piped (via pipeline '|' in
shell) to a following process for reading and processing the logging
output. However, it seems that sometimes it finishes prematurely. I
have no clue what the problem is. Could it be that logging does not
work well with fifo?

Thanks.

-- 
Regards,
Peng



More information about the Gdb mailing list