Debug stagefright in DDD

Source: Internet
Author: User
Google provides eclipse and plug-ins for Android Application development as development tools. Based on Eclipse, you can easily debug the APK.
(For example, opencore Development) does not provide similar intuitive development tools and debugging methods. This article describes a debugging method based on DDD + gdbserver.
Opencore C-level program debugging. The procedure is as follows: open a shell
ADB Shell
PS view mediaserver process number
Gdbserver: 5039
-- Attach PID (why is it mediaserver, because opencore/stagefright is referenced by the mediaserver process) // 5039 is the port number and another shell is opened.
ADB forward TCP: 5039 TCP: 5039
CD/working/myandroid
Ddd
-Debugger arm-Eabi-GDB
Out/target/product/generic/symbols/system/bin/mediaserver and then enter the DDD Program
In
In the console window, execute the following two commands. In fact, the so library will be loaded from the specified directory below.
Set solib-absolute-Prefix
/Working/myandroid/out/target/product/generic/Symbols
Set
Solib-search-Path
/Working/myandroid/out/target/product/generic/symbols/system/lib
Run the command T arget remote: 5039 on the server.
After executing this command, wait a bit. At this time, GDB will load the required so library.
You can
Breakpoint in the DDD source code browser window, or breakpoint in the console window through commands,
For example, B createplayer,
Then execute the command C to complete the DDD operation. Next, go to the simulator and click play video to go To the breakpoint. If you want to debug on the command line, run
Arm-Eabi-GDB
For debugging in out/target/product/generic/symbols/system/bin/mediaserver DDD, refer to related documents for usage of DDD.

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.