mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-04 09:38:00 +08:00
provide builtin print-ruby-object / pro command to gdb
This commit is contained in:
@@ -514,7 +514,7 @@ def run_apk(mode)
|
||||
start_activity(activity_path, mode)
|
||||
at_exit { system("/bin/stty echo") } # make sure we set terminal echo back in case ndk-gdb messes it up
|
||||
trap('INT') { } # do nothing on ^C, since we wand ndk-gdb to handle it
|
||||
line = "\"#{App.config.ndk_path}/ndk-gdb\" #{adb_mode_flag(mode)} --adb=\"#{adb_path}\""
|
||||
line = "\"#{App.config.ndk_path}/ndk-gdb\" #{adb_mode_flag(mode)} --adb=\"#{adb_path}\" -x \"#{App.config.motiondir}/lib/motion/project/template/android/gdb.setup\""
|
||||
line << " --verbose" if Rake.application.options.trace
|
||||
sh line
|
||||
end
|
||||
|
||||
13
lib/motion/project/template/android/gdb.setup
Normal file
13
lib/motion/project/template/android/gdb.setup
Normal file
@@ -0,0 +1,13 @@
|
||||
define print-ruby-object
|
||||
print (char *)__rb_inspect_obj__($arg0)
|
||||
end
|
||||
define pro
|
||||
print (char *)__rb_inspect_obj__($arg0)
|
||||
end
|
||||
|
||||
document print-ruby-object
|
||||
print-ruby-object(obj): inspects the given object
|
||||
end
|
||||
document pro
|
||||
pro(obj): same as print-ruby-object
|
||||
end
|
||||
Reference in New Issue
Block a user