reverse engineering - How do you debug libc in OSX? -
i expect able statically link against build of libc debug symbols, run program through lldb.
otool -l <my binary>
makes dynamically linked library (dll) is:
/usr/lib/libsystem.b.dylib (compatibility version 1.0.0, current version 1226.10.1)
which guess libc dll (though nm
doesn't list i'd expect in libc). maybe kind of stub loader.
in /usr/lib/
seems apple not supply debug build of libsystem.
how debug libc on osx (10.11.3)?
possible duplicate of: on mac os x, how can debug build of system/libc source level debugging?
i'm having hard time following question, there points made think cover you're asking:
otool -l show dylibs linking against.
/usr/lib/libsystem.b.dylib umbrella library re-exports multiple dylibs, including libc (/usr/lib/system/libsystem_c.dylib). if want see symbols part of system's c runtime, want use nm on dylib, not libsystem.
if statically linking in own libc, won't show in 'otool -l' because it's static library , part of executable.
if staticy linked own libc executable, using nm on binary possibly not show symbols expecting because linker optimize away dead code not needed executable. can ensure added using -force_load option ld. check out ld man page more details on that.
Comments
Post a Comment