Is there any way how to pipe output of internal gdb command to some shell command like grep
- the variant of [cmd] ! grep
in mdb
?
To be more clear: in solaris mdb
you can e.g. write
main::dis ! grep call
to detect which functions are called from the main (or grep some register names to see how it is changed). I am interested if there is such possibility to do so just in gdb without necessarity to switching from gdb.
I am not sure if I have understood your question correctly. If you want to a log results of your GDB commands that you ran during a debug session, then Yes there is support for this from GDB.
show logging # displays weather logging is on / off
set logging on # enable logging
set logging off # disable logging
set logging file log-file.txt # set name for log file, default is gdb.txt
the log file will be generated in your current directory.
Further you can append logs of debug sessions or create new on every debug session using
set logging overwrite <on/off>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With