I think gdb can do that with a little shell script hackery, but I want something like emacs has its own lisp command browser
man
is for. Or are you looking for an IDE which offers autocomplete when writing source code, and suggests functions? I know several of those, and I presume some (like eclipse) are available in FreeBSD. I don't know whether/how emacs can do this, never tried.nm --dynamic --extern-only --defined-only /lib/libc.so.7 | less
local ffi = require("ffi")
ffi.cdef[[
int printf(const char *fmt, ...);
]]
ffi.C.printf("Hello %s!", "world")
local ffi = require("ffi")
ffi.cdef[[
int MessageBoxA(void *w, const char *txt, const char *cap, int type);
]]
ffi.C.MessageBoxA(nil, "Hello world!", "Test", 0)
I have actually been looking for something similar to the OP that does work better with the complexities of C. Can I ask specifically how forth might be a good avenue? In my experience it is just a very portable stack based system. Can this interface better with C for various reasons I am missing?check out forth.
I suspect it can be made to build in FreeBSD if it doesn't already support that, but given that I have not tried it I don't know for sure.
Hmmm... there is no thumbs-up smiley.Heh, I actually made the initial port of Radare2 to FreeBSD (The hard work was already done by the authors, I just wrote the port's Makefile)
Yes, you could use it to call into C libraries. I would expect it to be quite unsafe and cause a lot of crashes for some of the more complex stuff though.
That said, perhaps one of the underlying technologies could be useful? http://www.unicorn-engine.org. It would require work to make something usable but it might be a start.