What would I have to do to use gdb as a C repl? I'm not very familiar with gdb other than using the backtrace to debug segmentation faults.
Compile your executable with debug info, and then make use of gdb expressions.
https://sourceware.org/gdb/current/onlinedocs/gdb/Expression...
It is not fully featured REPL, don't expect to use it to create stuff on the fly, it is more to query and call existing code.
For a proper REPL, check one of the listed interpreters.
So what you are saying that it's not actually a C REPL. It's a GDB expression REPL which is very different. What was the original point of your comment?
Re:Swift as a C Language REPL
by mlthoughts2018 on Thursday January 02, 2020 @07:02AM
(#21934699)
CPython is my personal favorite C language REPL.
And if their pseudo-REPL features aren't enough, there are a couple of C interpreters to choose from.
http://www.softintegration.com/
https://gitlab.com/zsaleeba/picoc
https://root.cern.ch/cling