Looks good. Then, you should use gdb to debug your application