apple suggested me to use "strings" or "otool" to dect the private api (isinf) in my code , I am totally newbie so any help how to use those tools
            Asked
            
        
        
            Active
            
        
            Viewed 6.5k times
        
    26
            
            
        - 
                    3Duplicate of http://stackoverflow.com/questions/1229018/whats-the-trick-to-use-otool-on-the-mac, http://stackoverflow.com/questions/2842357/how-does-apple-know-you-are-using-private-api and http://stackoverflow.com/questions/1863764/how-to-detect-avoid-the-use-of-private-apis-in-third-party-libraries – Chetan Bhalara May 10 '11 at 07:48
3 Answers
16
            Open Terminal ( Ctrl + Space -> Type 'Terminal')..
and print example:
otool -MVv yourlib.a
for help:
otool --help
 
    
    
        Alex Nazarov
        
- 1,178
- 8
- 16
- 
                    4This set of parameters are no longer supported by otool. Would you care to explain what did they mean? – leolobato Dec 20 '16 at 14:16
- 
                    @leolobato according to the documentation, `-M` used to "print the module table of a dynamic shared library" – lukas Feb 17 '19 at 15:39
- 
                    FYI: `warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: -M functionality obsolete OVERVIEW: llvm object file dumper` – Abbey Jackson Apr 25 '19 at 19:36
- 
                    
13
            
            
        I use nm to inspect my binaries. Usage can't be simpler:
 nm <filename>
It will list some weird memory-address or whatever, then a visibility character and lastly the symbol. T is public, but check out the man page of nm to find out more about this.
Press Ctrl+space to open up the terminal.
 
    
    
        vidstige
        
- 12,492
- 9
- 66
- 110
- 
                    2
- 
                    you know how to start up a terminal? Just type "nm" and then you binary and you will see a long list of symbols. You can then grep for stuff like so "nm| grep isinf" – vidstige May 10 '11 at 08:06
0
            
            
        On macOS, the otool tools is alternative to the objdump on the Windows. You should open Terminal and print example:
$ man otool  //Usage for otool
If you want to disassemble a file, Just type like this:
$ otool -tV filename
 
    
    
        dolphin chng
        
- 1
- 1
 
    