Instruction Level Debugging Research Based on Dalvik Virtual Machine

Author
ZhangPeng
Advisor
GaoHui
School
University of Electronic Science and Technology
Major
Computer Software and Theory
Classification
TP302 Design and Performance Analysis
Degree
Master's thesis
Year
2013
Downloads
23
Citations
0

Request the full text

Abstract

With the promotion of Google’s Andorid platform on the phone, tablet and othermobile terminals, the development and research of Dalvik virtual machine as theruntime core of ther Android operating system also comes to a flourishing. However,limiting factors like sepcial demand, narrow scope of usage, and non-open source, haveleft the demond for debugging tools for Java Virtual Machine including the Dalvikvirtual machine still not perfect enough, especially for Java instruction level debugging.Though enough tools can be found to do a Java sourcecode level debugging work, butno one mature tools appropriate to burden the duty of Java Instruction level debugggingwork.To make this problem history, this paper designed and implemented a Javaprogram instruction-level debugging module for Dalvik virtual machine, and integratedit to stardard Eclipse Java debug plugin, the research work mainly includes thefollowing4aspects:Firstly, we proposed a asynchronous working mechanism in the Dalvik VM,different with the debug commands that can self-complete on the debugger thread suchas get version number, single-step command requires the debugger thread and the userthread to cooperate to complete. The instruction-level single-step debugging and debugresults returnning is achieved by following steps: When single-step command isreceived, debugger thread set the corresponding single request mark on debugged thread,and the debugger side receive a confirm message,but not debug results immediately.The debugged thread then compares the request with current produced events until thecontrast established, and sent a single-setp event to debugger thread. debugger threadthen sends real single-step debug results to the debugger side.Secondly, in order to achieve single-step to instruction level, an instruction-levelsingle-step event is definded and added in the JPDA(Java Platform Debug Architecture)framework in Dalvik VM, and correspoinding debugging event processing module isadded in the user thread. Within this mechanism the debuggee thread can correctlyindentify our request in each proofreading requests and events, then trigger right single-step event and stop at the correct position.Thirdly, for the purpose of monitoring instruction-level debugging, we need todisplay related program data and instrcution stream. So we added two importantfunctions in the Dalvikvm, namely request for instruction stream and registers’ values,by which we can have a intuitive understanding of virtual machine state.lastly, on the Eclipse side, the function of standard Eclipse Java debug plug-in wasextended, including debug target, single instruction stepping, breakpoints, source locator,register view and instruction stream view,and made a test on a real application.The experimental results showed that the design and implementation of this tool iscorrect and feasible for Dalvik VM instruction debugging. So we now have ameaningful tool in Java VM’s assisting development.

Table of contents

Abstract 5-7 ABSTRACT 7-11 first chapter 11-16 1.1 Background 11-12 1.2 Research Status 12-14 1.3 research 14-15 1.4 article organizational structure 15-16 chapter related theory and Technology 16-45 2.1 JPDA debugging framework 16-27 2.1.1 JPDA Overview 16-18 2.1.2 JVMTI and Agent achieve 18-20 2.1.3 JDWP protocol and implementation 20-24 2.1.4 JDI Profile 24-27 2.2 DALVIK virtual machine 27-40 2.2.1 Dalvik virtual machine Overview 27-28 2.2.2 Dalvik virtual machine architecture 28-31 2.2 .3 Dalvik bytecode 31-32 2.2.4 DEX file format introduced 32-36 2.2.5 Dalvik characteristics and architecture interpreter 36-40 2.3 ECLIPSE framework introduced 40-44 2.3.1 Eclipse framework 40-41 2.3.2 extension points 41- 42 2.3.3 table 42-44 2.4 This chapter summarizes design and implementation of Chapter 44-45 virtual machine side debugging functions 45-59 3.1 virtual machine side script debugging design 45-46 3.2 single-step instruction module 46-52 3.2.1 JDWP protocol 47-48 3.2.2 JDWPHandler module 48-50 3.2.3 event processing module 50-52 3.3 instruction stream acquisition module 52-56 3.3.1 JDWP protocol 52-53 3.3.2 JDWPHandler module 53-56 3.4 register to get the module 56-58 3.4.1 JDWP protocol 56 3.4.2 JDWPHandler module nbsp 56-58 3.5 summarizes this chapter ; 58-59 <br / > Chapter IV ECLIPSE end debugging capabilities design and Implementation 59-85 4.1 ECLIPSE -side script debugging design achieve 59-60 4.2 interface part 60 -66 4.2.1 instruction-level function switching 60-62 4.2.2 instruction stream debug view 62-64 4.2.3 register view achieve 4.3 model section 64-66 66-81 4.3.1 debug target 66-69 4.3.2 instruction-level single-step 69-72 4.3.3 instruction stream to obtain 72-73 4.3.4 register to get 73 4.3.5 breakpoint 73- 76 4.3.6 source locator 76-81 4.4 with the results of laboratory tests to verify 81-84 4.5 This chapter summarizes 84-85 CHAPTER V Conclusion and Outlook 85-87 5.1 summary 85-86 5.2 Looking 86-87 Thanks 87-88 references made ??during the 88-90 attack Shuo research 90-91

Related dissertations

  1. Study on Application of student management system based on Android platform
    FuQiao ·Northwestern University ·2013 ·Master's thesis
  2. Design and Implementation of a Android-based Home Security Remote Monitoring Terminal System
  3. Research and Implementation of Vedio Surveillance System Based on Android Architecture and Smoke Detection
    ChenZhiMing ·Huaqiao University ·2013 ·Master's thesis
  4. Design and Implementation of Crane Monitoring System Based on Android
  5. Research and Implementation of Intelligent Video Surveillance System Based on Android
  6. Design and Research of Mobile Video Surveillance System Based on MJPG-Streamer
  7. Research and implementation of remote monitor system of ship based on the technology of the Internet of things
  8. Security Detection System Based on the Android Paltform
    ChenZuo ·Wuhan University of Technology ·2013 ·Master's thesis
  9. Research on Meteorological Data Acquisition and Processing System
    ZhaoSheng ·Wuhan University of Technology ·2013 ·Master's thesis
  10. The Research of Fall Detection Based on Mobile Terminal
    ZhouMin ·Xiangtan University ·2013 ·Master's thesis
  11. Design and Implementation of a Human Activity Monitoring System Based on Smart Mobile Terminal
    WuZhongZe ·South China University of Technology ·2013 ·Master's thesis
  12. The Smart Home Control System Based on Android System
    WuJian ·Liaoning Normal University ·2012 ·Master's thesis
  13. The Design and Implementation of Android Smart Home Control System
  14. Embedded System Applications in the Smart Home
    MingHang ·Hubei University ·2013 ·Master's thesis
  15. Design and Implementation of Intelligence Home System Based on ZigBee
  16. Design and Implementation of Smart Home System Based on Android Platform
    ZhouShiWei ·Huaqiao University ·2013 ·Master's thesis
  17. The Programing and Development of Automatic Control System for Alpha Gypsum Powder Production Line
    ZuoXingFei ·University of Jinan ·2013 ·Master's thesis
  18. Research and Design of Embedded Intelligent Bus Station Guideboard Control System
  19. The Design and Implementation of Multi-functional Smart Home System
  20. Research on Intelligent Home Furnishing system based on Android