From d94e31259ab1a1a9f5a78088692ba82b77fcb3cd Mon Sep 17 00:00:00 2001 From: Nat! Date: Mon, 8 Jul 2024 13:35:15 +0200 Subject: [PATCH] Update DEBUGGING.md --- dox/DEBUGGING.md | 78 +++++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/dox/DEBUGGING.md b/dox/DEBUGGING.md index 9737d78..4a5741d 100644 --- a/dox/DEBUGGING.md +++ b/dox/DEBUGGING.md @@ -9,14 +9,16 @@ 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 @@ -24,34 +26,36 @@ 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 @@ -59,10 +63,10 @@ set the environment variables to "YES" or "NO". 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