Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 566 Bytes

C.md

File metadata and controls

38 lines (25 loc) · 566 Bytes

varargs:

#include <stdarg.h>

void log_error (const char * msg, ...) {
        va_list valist;

        va_start(valist, msg);

        fprintf(stderr, "ERROR: ");
        vfprintf(stderr, msg, valist);
        fprintf(stderr, "\n");

        va_end(valist);
}

lookup library symbol list:

nm /usr/local/lib/liblua.5.3.dylib

Linker

otool -L executable - macOS ldd executable - Linux

LD_LIBRARY_PATH # linux
DYLD_LIBRARY_PATH # macos

debugger

GDB to LLDB command map