I have a debugging macro defined in .gdbinit says:
define printinfo
pinfo(stdout, $arg0)
end
however when I run gdb and use printinfo somedata, the gdb throws me:
No symbol "stdout" in current context.
As I know stdout is a standard file descriptor in c. But it failed to find it here.
Need your help!
You are likely using a libc version which uses
#define stdoutto something else. Preprocess a file containing this:then look at what
stdoutexpanded to. Chances are it’s notstdoutanymore after preprocessing.