DDD Debug Opencore/stagefright

Source: Internet
Author: User

Reprint: http://blog.chinaunix.net/uid-10995602-id-2918710.html

Google provides an Eclipse plug-in for Android app development as a development tool, and it's easy to debug the APK based on eclipse, while the underlying developers (such as opencore development) do not offer similar intuitive development tools and debugging tools. The purpose of this paper is to introduce a debugging method based on Ddd+gdbserver, which is used for program debugging of C-level similar to Opencore.  The steps are as follows:Open a shell .
adb Shell
PS View MediaServer process number
gdbserver:5039--attach pid(why MediaServer, because opencore/stagefright are referenced by the mediaserver process) Open a shell again .
adb forward tcp:5039 tcp:5039
cd/working/myandroid
Ddd–debugger arm-eabi-gdb out/target/product/generic/symbols/system/bin/mediaserver
And then go into the DDD program .
The following two commands are executed in its console window, which in fact loads the so library from the directory specified below
Set Solib-absolute-prefix/working/myandroid/out/target/product/generic/symbols
the set Solib-search-path/working/myandroid/out/target/product/generic/symbols/system/lib next connects to the server side, Execute command target remote:5039
Wait a moment after executing the command, and GDB will load the required so library
At this point, you can break the point in the DDD Source browser window, or place a breakpoint in the console window via a command.
For example: B createplayer,
then execute command C This completes the ddd aspect, then enters the simulator, clicks the play video, then enters the breakpoint If you want to debug under a pure command line, perform
arm-eabi-gdb Out/target/product/generic/symbols/system/bin/mediaserverend.

DDD Debug Opencore/stagefright

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.