Skip to content

Instantly share code, notes, and snippets.

@tanb
Created December 5, 2013 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanb/7800671 to your computer and use it in GitHub Desktop.
Save tanb/7800671 to your computer and use it in GitHub Desktop.
~/.lldbinitです
script import os, sys
# So that ~/lldbutils.py takes precedence.
script sys.path[:0] = [os.path.expanduser('~')]
script import lldbutils
command script add -f lldbutils.print_data_as_string_function pdas
# -*- coding: utf-8
import lldb
def print_data_as_string_function(debugger, command, result, internal_dict):
cmd = "expr (void)NSLog(@\"%@\", (NSString *)[[NSString alloc] initWithData:"+ command +" encoding:4])"
lldb.debugger.HandleCommand(cmd)
@tanb
Copy link
Author

tanb commented Dec 5, 2013

こんなかんじで
(lldb) pdas operation.request.HTTPBody
2013-12-05 14:42:59.865 hoge[18510:70b] hogehoge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment