]> git.saurik.com Git - apple/xnu.git/blobdiff - tools/lldbmacros/README.md
xnu-6153.101.6.tar.gz
[apple/xnu.git] / tools / lldbmacros / README.md
index ed75ee9c7343e43ae22ffbda22fb3bfaed92a54e..ccff5196fd806ba817f719d3e8e61fe06fcaf7c4 100644 (file)
@@ -170,6 +170,8 @@ Following is a step by step guideline on how to add a new command ( e.g showtask
 
   6. If your function finds issue with the passed argument then you can `raise ArgumentError('error_message')` to notify the user. The framework will automatically catch this and show appropriate help using the function doc string.
 
+  7. Please use "##" for commenting your code. This is important because single "#" based strings may be mistakenly considered in `unifdef` program.
+
  Time for some code example? Try reading the code for function ShowTaskVmeHelper in memory.py.
 
 SPECIAL Note: Very often you will find yourself making changes to a file for some command/summary and would like to test it out in lldb.
@@ -185,6 +187,10 @@ To easily reload your changes in lldb please follow the below example.
          memory is reloaded from ./memory.py
         (lldb)
 
+  * Alternatively, you can use lldb`s command for script loading as
+        (lldb) command script import /path/to/memory.py
+    You can re-run the same command every time you update the code in file.
+
  It is very important that you do reload using xnudebug command as it does the plumbing of commands and types for your change in the module. Otherwise you could easily get confused
  why your changes are not reflected in the command.
 
@@ -193,7 +199,7 @@ D. Kernel type summaries.
 ==========================
 i. Using summaries
 ------------------
-The lldb debugger provides ways for user to customize how a particular type of object be decsribed when printed. These are very useful in displaying complex and large structures
+The lldb debugger provides ways for user to customize how a particular type of object be described when printed. These are very useful in displaying complex and large structures
 where only certain fields are important based on some flag or value in some field or variable. The way it works is every time lldb wants to print an object it checks
 for registered summaries. We can define python functions and hook it up with lldb as callbacks for type summaries.  For example.