Changes to work with my release script:

Changed install path to /
Made libMachObjC.a an explicit dependancy, so that building with xcodebuild works.
1 file changed
tree: 965107a104999a1de8d0111343520de4348385cb
  1. class-dump.xcodeproj/
  2. Tests/
  3. UnitTests/
  4. cd_objc2.h
  5. CDBalanceFormatter.h
  6. CDBalanceFormatter.m
  7. CDClassDump.h
  8. CDClassDump.m
  9. CDClassDumpVisitor.h
  10. CDClassDumpVisitor.m
  11. CDClassFrameworkVisitor.h
  12. CDClassFrameworkVisitor.m
  13. CDDataCursor.h
  14. CDDataCursor.m
  15. CDFatArch.h
  16. CDFatArch.m
  17. CDFatFile.h
  18. CDFatFile.m
  19. CDFile.h
  20. CDFile.m
  21. CDFindMethodVisitor.h
  22. CDFindMethodVisitor.m
  23. CDLCDyldInfo.h
  24. CDLCDyldInfo.m
  25. CDLCDylib.h
  26. CDLCDylib.m
  27. CDLCDylinker.h
  28. CDLCDylinker.m
  29. CDLCDynamicSymbolTable.h
  30. CDLCDynamicSymbolTable.m
  31. CDLCEncryptionInfo.h
  32. CDLCEncryptionInfo.m
  33. CDLCFunctionStarts.h
  34. CDLCFunctionStarts.m
  35. CDLCLinkeditData.h
  36. CDLCLinkeditData.m
  37. CDLCPrebindChecksum.h
  38. CDLCPrebindChecksum.m
  39. CDLCPreboundDylib.h
  40. CDLCPreboundDylib.m
  41. CDLCRoutines32.h
  42. CDLCRoutines32.m
  43. CDLCRoutines64.h
  44. CDLCRoutines64.m
  45. CDLCRunPath.h
  46. CDLCRunPath.m
  47. CDLCSegment.h
  48. CDLCSegment.m
  49. CDLCSegment32.h
  50. CDLCSegment32.m
  51. CDLCSegment64.h
  52. CDLCSegment64.m
  53. CDLCSubClient.h
  54. CDLCSubClient.m
  55. CDLCSubFramework.h
  56. CDLCSubFramework.m
  57. CDLCSubLibrary.h
  58. CDLCSubLibrary.m
  59. CDLCSubUmbrella.h
  60. CDLCSubUmbrella.m
  61. CDLCSymbolTable.h
  62. CDLCSymbolTable.m
  63. CDLCTwoLevelHints.h
  64. CDLCTwoLevelHints.m
  65. CDLCUnixThread.h
  66. CDLCUnixThread.m
  67. CDLCUnknown.h
  68. CDLCUnknown.m
  69. CDLCUUID.h
  70. CDLCUUID.m
  71. CDLCVersionMinimum.h
  72. CDLCVersionMinimum.m
  73. CDLoadCommand.h
  74. CDLoadCommand.m
  75. CDMachOFile.h
  76. CDMachOFile.m
  77. CDMachOFileDataCursor.h
  78. CDMachOFileDataCursor.m
  79. CDMethodType.h
  80. CDMethodType.m
  81. CDMultiFileVisitor.h
  82. CDMultiFileVisitor.m
  83. CDObjectiveC1Processor.h
  84. CDObjectiveC1Processor.m
  85. CDObjectiveC2Processor.h
  86. CDObjectiveC2Processor.m
  87. CDObjectiveCProcessor.h
  88. CDObjectiveCProcessor.m
  89. CDOCCategory.h
  90. CDOCCategory.m
  91. CDOCClass.h
  92. CDOCClass.m
  93. CDOCIvar.h
  94. CDOCIvar.m
  95. CDOCMethod.h
  96. CDOCMethod.m
  97. CDOCModule.h
  98. CDOCModule.m
  99. CDOCProperty.h
  100. CDOCProperty.m
  101. CDOCProtocol.h
  102. CDOCProtocol.m
  103. CDOCSymtab.h
  104. CDOCSymtab.m
  105. CDRelocationInfo.h
  106. CDRelocationInfo.m
  107. CDSearchPathState.h
  108. CDSearchPathState.m
  109. CDSection.h
  110. CDSection.m
  111. CDSection32.h
  112. CDSection32.m
  113. CDSection64.h
  114. CDSection64.m
  115. CDStructureInfo.h
  116. CDStructureInfo.m
  117. CDStructureTable.h
  118. CDStructureTable.m
  119. CDSymbol.h
  120. CDSymbol.m
  121. CDSymbolReferences.h
  122. CDSymbolReferences.m
  123. CDTextClassDumpVisitor.h
  124. CDTextClassDumpVisitor.m
  125. CDTopologicalSortProtocol.h
  126. CDTopoSortNode.h
  127. CDTopoSortNode.m
  128. CDType.h
  129. CDType.m
  130. CDTypeController.h
  131. CDTypeController.m
  132. CDTypeFormatter.h
  133. CDTypeFormatter.m
  134. CDTypeLexer.h
  135. CDTypeLexer.m
  136. CDTypeName.h
  137. CDTypeName.m
  138. CDTypeParser.h
  139. CDTypeParser.m
  140. CDUnitTests-Info.plist
  141. CDVisitor.h
  142. CDVisitor.m
  143. CDVisitorPropertyState.h
  144. CDVisitorPropertyState.m
  145. class-dump-Prefix.pch
  146. class-dump.m
  147. deprotect-Prefix.pch
  148. deprotect.m
  149. dyld-info-compat.h
  150. formatType-Prefix.pch
  151. formatType.m
  152. Info.plist
  153. keys.txt
  154. MachObjC-Prefix.pch
  155. NSArray-Extensions.h
  156. NSArray-Extensions.m
  157. NSData-CDExtensions.h
  158. NSData-CDExtensions.m
  159. NSError-CDExtensions.h
  160. NSError-CDExtensions.m
  161. NSScanner-Extensions.h
  162. NSScanner-Extensions.m
  163. NSString-Extensions.h
  164. NSString-Extensions.m
  165. README.md
README.md

class-dump

class-dump is a command-line utility for examining the Objective-C segment of Mach-O files. It generates declarations for the classes, categories and protocols. This is the same information provided by using ‘otool -ov’, but presented as normal Objective-C declarations.

The latest version and information is available at:

http://www.codethecode.com/projects/class-dump

The source code is also available from my Github repository at:

https://github.com/nygard/class-dump

Usage

class-dump 3.3.4 (64 bit)
Usage: class-dump [options] <mach-o-file>

  where options are:
        -a             show instance variable offsets
        -A             show implementation addresses
        --arch <arch>  choose a specific architecture from a universal binary (ppc, ppc64, i386, x86_64)
        -C <regex>     only display classes matching regular expression
        -f <str>       find string in method name
        -H             generate header files in current directory, or directory specified with -o
        -I             sort classes, categories, and protocols by inheritance (overrides -s)
        -o <dir>       output directory used for -H
        -r             recursively expand frameworks and fixed VM shared libraries
        -s             sort classes and categories by name
        -S             sort methods by name
        -t             suppress header in output, for testing
        --list-arches  list the arches in the file, then exit
        --sdk-ios      specify iOS SDK version (will look in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS<version>.sdk
        --sdk-mac      specify Mac OS X version (will look in /Developer/SDKs/MacOSX<version>.sdk
        --sdk-root     specify the full SDK root path (or use --sdk-ios/--sdk-mac for a shortcut)
  • class-dump AppKit:

    class-dump /System/Library/Frameworks/AppKit.framework

  • class-dump UIKit:

    class-dump /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/UIKit.framework

  • class-dump UIKit and all the frameworks it uses:

    class-dump /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/UIKit.framework -r --sdk-ios 4.3

  • class-dump UIKit (and all the frameworks it uses) from developer tools that have been installed in /Dev42 instead of /Developer:

    class-dump /Dev42/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/UIKit.framework -r --sdk-root /Dev42/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk

License

This file is part of class-dump, a utility for examining the Objective-C segment of Mach-O files. Copyright (C) 1997-1998, 2000-2001, 2004-2011 Steve Nygard.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Contact

You may contact the author by: e-mail: class-dump at codethecode.com