A walkthrough of using Ghidra to produce a GDB script for tracing function calls.
This tutorial gives an example showing how to fuzz a function out of a compiled binary using AFL's QEMU mode.