mulle-objc-list
is a mulle-objc tool.
It's useful when developing mulle-objc projects. It 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 |
---|---|
RELEASENOTES |
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 C11 | |
mulle-atinit | π€±πΌ Compatibility library for deterministic initializers | |
mulle-atexit | πΌ Compatibility library to fix atexit |
Use mulle-sde to add mulle-objc-list 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-list
To only add the sources of mulle-objc-list with dependency sources use clib:
One common denominator is that you will likely have to add
#include <mulle-objc-list/mulle-objc-list.h>
to your source files.
clib install --out src/mulle-objc mulle-objc/mulle-objc-list
Add -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).
git submodule add -f --name "mulle-core" \
"https://github.com/mulle-core/mulle-core.git" \
"stash/mulle-core"
git submodule add -f --name "mulle-objc-runtime" \
"https://github.com/mulle-objc/mulle-objc-runtime.git" \
"stash/mulle-objc-runtime"
git submodule add -f --name "mulle-atinit" \
"https://github.com/mulle-core/mulle-atinit.git" \
"stash/mulle-atinit"
git submodule add -f --name "mulle-atexit" \
"https://github.com/mulle-core/mulle-atexit.git" \
"stash/mulle-atexit"
git submodule add -f --name "mulle-objc-list" \
"https://github.com/mulle-objc/mulle-objc-list" \
"stash/mulle-objc-list"
git submodule update --init --recursive
add_subdirectory( stash/mulle-objc-list)
add_subdirectory( stash/mulle-atexit)
add_subdirectory( stash/mulle-atinit)
add_subdirectory( stash/mulle-objc-runtime)
add_subdirectory( stash/mulle-core)
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-objc-list)
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-atexit)
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-atinit)
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-objc-runtime)
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-core)
Use mulle-sde to build and install mulle-objc-list and all dependencies:
mulle-sde install --prefix /usr/local \
https://github.com/mulle-objc/mulle-objc-list/archive/latest.tar.gz
Install the Requirements and then install mulle-objc-list with cmake:
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_PREFIX_PATH=/usr/local \
-DCMAKE_BUILD_TYPE=Release &&
cmake --build build --config Release &&
cmake --install build --config Release
Nat! for Mulle kybernetiK