Tracing a function with jprobes

One problem with kprobes is that you can't check validity of the arguments passed to the function you are monitoring. For that matter, jprobes comes in. It's basically make a wrapper for the existing function and will be called instead without make any changes to the existing function. jprobes is an extention to the kprobes… Continue reading Tracing a function with jprobes

How to build a module with source codes in separate directories.

If you want to use separate directories for source files and target modules, you can use below scheme. mod_main.c #include #include MODULE_LICENSE("GPL"); static int __init mod_entry(void) { return 0; } static void __exit mod_exit(void) { return; } module_init(mod_entry); module_exit(mod_exit); sub_mod.c #include #include int sub_func(int i) { printk("Hello %d", i); return 0; } EXPORT_SYMBOL(sub_func); http://pagead2.googlesyndication.com/pagead/show_ads.js Makefile… Continue reading How to build a module with source codes in separate directories.

Using single-tap and double-tap in the same view

If you are going to use two similar gestures in a view, it could cause the problem. For example, in the following code snippet, I tried to use single tap for changing screen mode while double tap is used to toggle bookmark flag. [self.svContent addGestureRecognizer:toggleFavoriteTap]; [self.svContent addGestureRecognizer:toggleFullScreenTap]; But, there's one problem with this. When you… Continue reading Using single-tap and double-tap in the same view

Do you need a UI that used in twitter for iPad?

Twitter for iPad's UI is so great. It uses very efficient and elegant method to show hierarchical information. If you want to implement this in your app, there's a good news. Check the following screen. Isn't look similar to the twitter's interface? You can download source code from here: https://github.com/aaronbrethorst/StackScrollView It's still need some improvement… Continue reading Do you need a UI that used in twitter for iPad?

Use TabBar and Navigation Controller at the same time

Interface Builder is a great tool to minimize your typing and make you see the output before you compile it. But, sometimes, it blocks you to implement your thought clearly. Combining TabBar and NavigationBar is one of those cases. If you want to use TabBar, you easily can make it using Interface Builder, but Interface… Continue reading Use TabBar and Navigation Controller at the same time

Registers which are using when passing function arguments on x86_64

Brief notes for me which registers are used when passing function arguments on x86_64: %rdi - 1st argument (%rdi:64, %edi:32, %di:16, %dl:8) %rsi - 2nd argument (%rsi:64, %esi:32, %si:16, %sl:8) %rdx - 3rd argument (%rdx:64, %edx:32, %dx:16, %dl:8) %rcx - 4th argument (%rcx:64, %ecx:32, %cx:16, %cl:8) %r8 - 5th argument (%r8:64, %r8d:32, %r8w:16, %r8b:8) %r9… Continue reading Registers which are using when passing function arguments on x86_64