-
-
Save naveenadi/f664c92481eedea80d1fce3fd11cad52 to your computer and use it in GitHub Desktop.
Revisions
-
ryanchang renamed this gist
Nov 26, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ryanchang revised this gist
Sep 5, 2014 . 1 changed file with 16 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # LLDB Cheat Sheet A complete [gdb to lldb command map](http://lldb.llvm.org/lldb-gdb.html). ### Print out * Print object ``` (lldb) po responseObject (lldb) po [responseObject objectForKey@"state"] @@ -10,19 +10,22 @@ A complete [gdb to lldb command map](http://lldb.llvm.org/lldb-gdb.html). * p - Print primitive type ### Breakpoints * List breakpoints ``` br l ``` * br delete - Delete breakpoint ``` (lldb) br delete 1 ``` * br e - Enable breakpoint * br di - Disable breakpoint * b - Add breakpoint ``` (lldb) b MyViewController.m:30 ``` * br set - Add symbolic breakpoint ``` (lldb) br set -n viewDidLoad ``` @@ -32,7 +35,7 @@ for(PlayerItem *item in player.inventory) { totalValue += item.value; } ``` Set a conditional breakpoint that triggers only when `totalValue` is greater than 1000: ``` (lldb) b MerchantViewController.m:32 Breakpoint 3: where = lootcollector`-[MerchantViewController] ... @@ -62,3 +65,7 @@ Enter your debugger command(s). Type 'DONE' to end. ``` (lldb) s ``` * Print backtrace ``` (lldb) bt ``` -
ryanchang revised this gist
Sep 5, 2014 . 1 changed file with 56 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,8 +2,63 @@ A complete [gdb to lldb command map](http://lldb.llvm.org/lldb-gdb.html). ### Print out * po - Print object ``` (lldb) po responseObject (lldb) po [responseObject objectForKey@"state"] ``` * p - Print primitive type ### Break points * br l - List break points * br delete - Delete break point ``` (lldb) br delete 1 ``` * br e - Enable break point * br di - Disable break point * b - Add break point ``` (lldb) b MyViewController.m:30 ``` * br set - Add symbolic break point ``` (lldb) br set -n viewDidLoad ``` * Conditional break ``` objc for(PlayerItem *item in player.inventory) { totalValue += item.value; } ``` Set a conditional break point that triggers only when `totalValue` is greater than 1000: ``` (lldb) b MerchantViewController.m:32 Breakpoint 3: where = lootcollector`-[MerchantViewController] ... (lldb) br mod -c "totalValue > 1000" 3 ``` Reset the condition: ``` (lldb) br mod -c "" 3 ``` * Run a debugger command from a breakpoint ``` (lldb) br com add 2 Enter your debugger command(s). Type 'DONE' to end. > bt > continue > DONE ``` * Resume excution ``` (lldb) continue ``` * Step over ``` (lldb) n ``` * Step in ``` (lldb) s ``` -
ryanchang revised this gist
Sep 5, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,9 @@ # LLDB Cheat Sheet A complete [gdb to lldb command map](http://lldb.llvm.org/lldb-gdb.html). ### Print out * po - Print object * p - Print primitive type ### Break points * br l - List break points * -
ryanchang created this gist
Sep 5, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ # LLDB Cheat Sheet ### Print out * po - Print object * p - Print primitive type ### Break points * br l - List break points *