Archives by date

You are browsing the site archives by date.

How to print Chromium string16 values from lldb using python scripts

I found this here: http://stackoverflow.com/questions/12923873/how-to-print-wchar-t-string-in-lldb with a minor tweak of if -> elif Thanks stack overflow! Python file: $ cat ~/work/lldbscripts/unsignedshortptrsummary.py import lldb def unsignedshortptr_SummaryProvider(valobj, dict): e = lldb.SBError() s = u'”‘ if valobj.GetValue() != 0: i = 0 newchar = -1 while newchar != 0: # read next wchar character out of memory data_val […]

Git clean. No seriously, clean it.

Working on Chrome, there are lots of dependencies that get pulled, and when I make untracked temporary changes in those dependancies sometimes I just want everything back to normal. So, here’s the scorched earth method: git clean -f -f -x -d This blows away everything git doesn’t know about. Then I do another clean dependency […]

mach.h, dumping vm info

#import “mach/mach.h” …. – (void)logTimer { task_basic_info info; mach_msg_type_number_t size = sizeof(info); kern_return_t kerr = task_info(mach_task_self(), TASK_BASIC_INFO, (task_info_t)&info, &size); if ( kerr == KERN_SUCCESS ) { NSLog(@”task_info: %d.2MB\n”, info.resident_size / 1048576); } else { NSLog(@”task_info failed with error %d ( 0x%08d ), ‘%s’\n”, kerr, kerr, mach_error_string(kerr)); } }

Another weird git problem

Lately whenever I have to rebase I get a weird error about how I have a dirty tree and need to commit files. Falling back to patching base and 3-way merge… error: Your local changes to the following files would be overwritten by merge: Please, commit your changes or stash them before you can merge. […]