Skip to content

Commit

Permalink
Update DEBUGGING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mulle-nat committed Jul 8, 2024
1 parent ef48d48 commit d94e312
Showing 1 changed file with 41 additions and 37 deletions.
78 changes: 41 additions & 37 deletions dox/DEBUGGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,60 +9,64 @@ Use the following environment variables to let the runtime warn you about
inconsistencies. You can set the environment variables to "YES" or "NO".


Variable | Function
------------------------------------- | --------------------------------
`MULLE_OBJC_WARN_ENABLED` | Enables all the following warnings.
  |  
`MULLE_OBJC_WARN_METHOD_TYPE` | Warn if methods with identical names have different types. Example: `- (BOOL) load` and `+ (void) load`.
`MULLE_OBJC_WARN_PEDANTIC_METHODID_TYPE` | This is faster and complains more as it is just string comparing the signatures.
`MULLE_OBJC_WARN_PROTOCOLCLASS` | Warn if a class does not fit the requirements to be a protocol class, but a protocol of the same name exists.
`MULLE_OBJC_WARN_STUCK_LOADABLE` | Warn if classes or categories could not be integrated into the runtime class system. This indicates a missing class or category. The warning appears, when the runtime is released (end of the program). This is enabled by default currently.
| Variable | Function
|----------------------------------------|--------------------------------
| `MULLE_OBJC_WARN_ENABLED` | Enables all the following warnings.
|   |  
| `MULLE_OBJC_WARN_METHOD_TYPE` | Warn if methods with identical names have different types. Example: `- (BOOL) | load` and `+ (void) load`.
| `MULLE_OBJC_WARN_PEDANTIC_METHODID_TYPE` | This is faster and complains more as it is just string comparing the | signatures.
| `MULLE_OBJC_WARN_PROTOCOLCLASS` | Warn if a class does not fit the requirements to be a protocol class, but a | protocol of the same name exists.
| `MULLE_OBJC_WARN_STUCK_LOADABLE` | Warn if classes or categories could not be integrated into the runtime class | system. This indicates a missing class or category. The warning appears, when the runtime is released (end of the | program). This is enabled by default currently.
| `MULLE_OBJC_WARN_CRASH` | If set to `YES` a warning will force an `abort`
| `MULLE_OBJC_WARN_HANG` | If set to `YES` a warning will force a `mulle_objc_hang` | (`MULLE_OBJC_WARN_CRASH` had precedence though)

## Traces

Use the following environment variables to trace runtime operations. You can
set the environment variables to "YES" or "NO".


Variable | Function
----------------------------------------|--------------------------------
`MULLE_OBJC_TRACE_CLASS_CACHE` | Trace as the class cache is created and enlarged.
`MULLE_OBJC_TRACE_METHOD_CACHE` | Trace method caches as they are created and enlarged.
`MULLE_OBJC_TRACE_METHOD_SEARCH` | Trace the search for a methods implementation. This is a good way to learn about the way Objective-C does inheritance.
`MULLE_OBJC_TRACE_METHOD_CALL` | Trace the calling of Objective-C methods, creates lots of output.
  |  
`MULLE_OBJC_TRACE_ENABLED` | Enables all the following traces.
  |  
`MULLE_OBJC_TRACE_CATEGORY_ADD` | Trace whenever a category is added to the runtime system.
`MULLE_OBJC_TRACE_CLASS_ADD` | Trace whenever a class is added to the runtime system.
`MULLE_OBJC_TRACE_CLASS_FREE` | Trace whenever a class is freed.
`MULLE_OBJC_TRACE_DEPENDENCY` | Trace whenever a class or category is queued up to be added to the runtime system, when it's dependencies have not appeared yet.
`MULLE_OBJC_TRACE_DUMP_RUNTIME` | Periodically dump the runtime to tmp during loading.
`MULLE_OBJC_TRACE_FASTCLASS_ADD` | Trace whenever a "fast" class is added to the runtime system.
`MULLE_OBJC_TRACE_INITIALIZE` | Trace calls or non-calls of `+initialize` and +load
`MULLE_OBJC_TRACE_LOADINFO` | Trace the enqueing of loadinfos
`MULLE_OBJC_TRACE_PROTOCOL_ADD` | Trace whenever a protocol is added to the runtime system.
`MULLE_OBJC_TRACE_STATE_BIT` | Trace whenever a class state changes.
`MULLE_OBJC_TRACE_STRING_ADDS` | Trace whenever a constant string is added to the runtime system.
`MULLE_OBJC_TRACE_TAGGED_POINTER` | Trace whenever a class registers for tagged pointers (isa).
`MULLE_OBJC_TRACE_UNIVERSE` | Trace construction and destruction of universes
| Variable | Function
|----------------------------------------|--------------------------------
| `MULLE_OBJC_TRACE_CLASS_CACHE` | Trace as the class cache is created and enlarged.
| `MULLE_OBJC_TRACE_METHOD_CACHE` | Trace method caches as they are created and enlarged.
| `MULLE_OBJC_TRACE_METHOD_SEARCH` | Trace the search for a methods implementation. This is a good way to learn | about the way Objective-C does inheritance.
| `MULLE_OBJC_TRACE_METHOD_CALL` | Trace the calling of Objective-C methods, creates lots of output.
|   |  
| `MULLE_OBJC_TRACE_ENABLED` | Enables all the following traces.
|   |  
| `MULLE_OBJC_TRACE_CATEGORY_ADD` | Trace whenever a category is added to the runtime system.
| `MULLE_OBJC_TRACE_CLASS_ADD` | Trace whenever a class is added to the runtime system.
| `MULLE_OBJC_TRACE_CLASS_FREE` | Trace whenever a class is freed.
| `MULLE_OBJC_TRACE_DEPENDENCY` | Trace whenever a class or category is queued up to be added to the runtime | system, when it's dependencies have not appeared yet.
| `MULLE_OBJC_TRACE_DUMP_RUNTIME` | Periodically dump the runtime to tmp during loading.
| `MULLE_OBJC_TRACE_FASTCLASS_ADD` | Trace whenever a "fast" class is added to the runtime system.
| `MULLE_OBJC_TRACE_HASHSTRINGS` | Trace addition of hash strings
| `MULLE_OBJC_TRACE_INSTANCE` | Trace instance allocation and deallocation
| `MULLE_OBJC_TRACE_INITIALIZE` | Trace calls or non-calls of `+initialize` and +load
| `MULLE_OBJC_TRACE_LOADINFO` | Trace the enqueing of loadinfos
| `MULLE_OBJC_TRACE_PROTOCOL_ADD` | Trace whenever a protocol is added to the runtime system.
| `MULLE_OBJC_TRACE_STATE_BIT` | Trace whenever a class state changes.
| `MULLE_OBJC_TRACE_STRING_ADDS` | Trace whenever a constant string is added to the runtime system.
| `MULLE_OBJC_TRACE_TAGGED_POINTER` | Trace whenever a class registers for tagged pointers (isa).
| `MULLE_OBJC_TRACE_UNIVERSE` | Trace construction and destruction of universes

## Settings

Variable | Function
----------------------------------------|--------------------------------
`MULLE_OBJC_PEDANTIC_EXIT` | Force destruction of the universe at the end of the program run.
| Variable | Function
|----------------------------------------|--------------------------------
| `MULLE_OBJC_PEDANTIC_EXIT` | Force destruction of the universe at the end of the program run.


## Prints

Like a lesser variation of traces, either prints just once or modified a trace.


Variable | Function
----------------------------------------|--------------------------------
`MULLE_OBJC_PRINT_UNIVERSE_CONFIG` | Print the version of the universe, maybe more in the future.
`MULLE_OBJC_PRINT_ORIGIN` | Print the owner of methodlists in loadinfo traces. This is enabled by default currently.
| Variable | Function
|----------------------------------------|--------------------------------
| `MULLE_OBJC_PRINT_UNIVERSE_CONFIG` | Print the version of the universe, maybe more in the future.
| `MULLE_OBJC_PRINT_ORIGIN` | Print the owner of methodlists in loadinfo traces. This is enabled by default currently.


## Dumps
Expand Down

0 comments on commit d94e312

Please sign in to comment.