mulle-objc-tools are mulle-objc tools.
They are useful when developing mulle-objc projects. The mulle-objc-list tool
loads a shared library and dumps the mulle-objc load information contained
within, for instance classes or categories. The output is as
CSV, euro-style.
| Release Version | Release Notes | AI Documentation |
|---|---|---|
| RELEASENOTES | DeepWiki for mulle-objc-tools |
usage: mulle-objc-list [options] [command] [libraries] <binary>
The binary is listed. The preceeding libraries are
explicitly loaded but their contents aren't listed.
Implicitly loaded libraries by binary are listed.
Options:
-e : emit dependencies sentinel field
-l <id> : specify loader-class id for -d (default is 0x58bd58d3) -v : verbose
Commands:
-c : list classes and categories
-d : list classes and categories as +dependencies. Skips loaders
-i : dump loadinfo version information
-m : list methods (default)
-M : list also root -methods as +methods
-t : terse list methods (coverage like)
-T : terse list methods with root -methods also as +methods
mulle-objc-list loads a shared library or executable and prints a CSV list of all
class and categories or methods it finds. The binary must have been
compiled with mulle-clang.
For each class or category a line is printed. The format is:
classid;classname;categoryid;categoryname
| Index | Column name | Description |
|---|---|---|
| 1 | classid | the id of the class, 8 hex characters |
| 2 | classname | the name of the class |
| 3 | categoryid | optional: the id of the category |
| 4 | categoryname | optional: the name of the category |
Each line represents one exported method. The format is:
classid;classname;categoryid;categoryname;methodid;+/-name;variadic;bits;tpe
This has changed in 8.0.0
| Index | Column name | Description |
|---|---|---|
| 1 | classid | the id of the class, 8 hex characters |
| 2 | classname | the name of the class |
| 3 | categoryid | optional: the id of the category |
| 4 | categoryname | optional: the name of the category |
| 5 | methodid | the id of the method |
| 6 | name | methodname like takeValue:forKey: with +/- prefix |
| 7 | variadic | either ... or empty |
| 8 | bits | bits as hex value |
| 9 | type | decoded type of method, separated by comma |
| (may contain ';')
The intended use is to produce test skeleton code from this information.
Each line represents one exported method. The format is:
classid;classname;categoryid;categoryname;methodid;+/-name
| Index | Column name | Description |
|---|---|---|
| 1 | classid | the id of the class, 8 hex characters |
| 2 | classname | the name of the class |
| 3 | categoryid | optional: the id of the category |
| 4 | categoryname | optional: the name of the category |
| 5 | methodid | the id of the method |
| 6 | name | methodname like takeValue:forKey: with +/- prefix |
This is the same format as the runtime coverage output, if you remove the first two columns from the output. Then subtracting the modified coverage from this list, would show you all unused methods.
Each line represents a linked -o file with classes or categories.
path;runtime-version;foundation-version;user;optilevel;bits
| Index | Column name | Description |
|---|---|---|
| 1 | path | source of compiled .o file |
| 2 | runtime | version of the runtime the .o file was compiled |
| 3 | foundation | version of the foundation the .o file was compiled |
| 4 | user | user supplied version during compilation |
| 5 | optilevel | optimization level of the compiled .o file |
| 6 | bits | load info bits as hex |
Can be useful to find mixed-in old .o files
| Requirement | Release Version | Description |
|---|---|---|
| mulle-objc-runtime | β© A fast, portable Objective-C runtime written 100% in C |
mulle-sde init -d my-project -m mulle-objc/objc-developer executable
cd my-project
mulle-sde vibecoding on
mulle-sde run
mulle-sde dependency toc mulle-objc/mulle-objc-toolsYou are done, skip the following "Add" step.
Use mulle-sde to add mulle-objc-tools to your project.
As long as your sources are using #include "include-private.h" and your headers use #include "include.h", there will nothing more to do:
mulle-sde add github:mulle-objc/mulle-objc-toolsTo only add the sources of mulle-objc-tools with all the sources of its dependencies replace "github:" with clib::
One common denominator is that you will likely have to add
#include <mulle-objc-tools/mulle-objc-tools.h> to your source files.
clib install --out src/mulle-objc mulle-objc/mulle-objc-toolsAdd -isystem src/mulle-objc to your CFLAGS and compile all the
sources that were downloaded with your project. (In cmake add
include_directories( BEFORE SYSTEM src/mulle-objc) to your CMakeLists.txt
file).
Add mulle-objc-tools and its dependencies to your CMakeLists.txt with
FetchContent:
include( FetchContent)
include_directories( SYSTEM "${CMAKE_BINARY_DIR}/include")
set( MULLE__OBJC__RUNTIME_TAG "master" CACHE STRING "branch or tag to fetch mulle-objc-runtime from")
FetchContent_Declare( MULLE__OBJC__RUNTIME
GIT_REPOSITORY https://github.com/mulle-objc/mulle-objc-runtime.git
GIT_TAG "${MULLE__OBJC__RUNTIME_TAG}")
FetchContent_MakeAvailable( MULLE__OBJC__RUNTIME)
set( MULLE__OBJC__TOOLS_TAG "master" CACHE STRING "branch or tag to fetch mulle-objc-tools from")
FetchContent_Declare( MULLE__OBJC__TOOLS
GIT_REPOSITORY https://github.com/mulle-objc/mulle-objc-tools.git
GIT_TAG "${MULLE__OBJC__TOOLS_TAG}")
FetchContent_MakeAvailable( MULLE__OBJC__TOOLS)
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-objc-tools)Use mulle-sde to build and install mulle-objc-tools and all dependencies:
mulle-sde install --prefix /usr/local \
https://github.com/mulle-objc/mulle-objc-tools/archive/latest.tar.gzInstall all requirements
| Requirements | Description |
|---|---|
| mulle-objc-runtime | β© A fast, portable Objective-C runtime written 100% in C |
Download the latest tar or zip archive and unpack it.
Install mulle-objc-tools into /usr/local with cmake:
PREFIX_DIR="/usr/local"
cmake -B build \
-DMULLE_SDK_PATH="${PREFIX_DIR}" \
-DCMAKE_INSTALL_PREFIX="${PREFIX_DIR}" \
-DCMAKE_PREFIX_PATH="${PREFIX_DIR}" \
-DCMAKE_BUILD_TYPE=Release &&
cmake --build build --config Release &&
cmake --install build --config ReleaseNat! for Mulle kybernetiK