The Design and Implementation of Improvement Gdb Debugger Supported Memory Error Detection

Author
LiuYe
Advisor
ShaoDong , LiuHaiTao
School
Nanjing University
Major
Software Engineering
Classification
TP311.11 Programming method
Degree
Master's thesis
Year
2012
Downloads
63
Citations
0

Request the full text

Abstract

C language has been widely used in the development of a variety of system and application software. Its memory management machinery and operating pointer enables it great expression power and flexibility, which, however, also leads to a large number of memory errors. Those errors are hard to reproduce and perform cause analysis for, and thus difficult to detect in general.Existing memory error detection approaches can roughly be divided into two categories, dynamic detection and static detection, based on whether it depends on program execution. Static detection methods perform error examination on source code, which is very efficient but leads to high rate of both false-positive and false-negative detection due to the uncertainty and unpredictability during program execution. By contrast, the dynamic approaches achieve better performance by making use of the memory state information gathered during program running. However, as most existing dynamic approaches demand for source code modification, it may undermine the potential structures and functionalities of the programs to analyze. In addition, most existing detection approaches fail to deal with cross-boundary error of static arrays.To address above problems, in this paper, we propose a gdb debugger based memory error detection framework, when packing with which, the gdb debugger can not only locate both the cross-boundary visiting and memory leak error, but also avoid the false-positive and false-negative detection error. The basic idea of the framework consists of following respects:1) During gdb debugging, capture the memory allocation information with specific strategy according to the memory distribution states;2) Analyze the captured information and construct memory debugging symbol table and memory leak error list for detecting cross-boundary visiting and memory leak error respectively.3) Monitor the memory allocation and explore cross-boundary visiting error with debugging symbol table based on the watchpoint theory, as well as memory leak error by analyzing memory leak error lists.4) By calling the original debugging functionality the memory errors can be accurately positioned when detected.

Table of contents

Summary 5-6 Abstract 6-7 directory 7-9 LIST 9-10 Article Chapter Introduction 10-16 1.1 project Background 10-11 1.2 domestic and foreign research status 11-14 1.2.1 static detection technology 11-12 1.2.2 dynamic detection technology main work 12-14 1.3 article 14-16 chapter related technologies Summary 16-23 2.1 program memory error performance and analysis 16-18 2.1.1 memory leak 16-17 2.1.2 memory cross-border access 17-18 2.2 open source gdb debugger introduced 18-22 2.2.1 gdb profile and its principle 18-19 2.2 .2 gdb architecture analysis 19 2.2.3 gdb code structure analysis 19-20 2.2.4 gdb debugger process tracking implementations 20-21 2.2.5 gdb debugger observation points (watchpoint) introduced 21-22 2.3 Summary 22-23 the third chapter in gdb debugging memory error detection reactor design 23-32 3.1 the basic idea of ??memory error detection processing thinking 23-26 3.1.1 bounds memory access 23-24 3.1.2 memory leak processing thoughts framework designed nbsp 24-26 3.2 memory error detection module ; 26-27 3.3 memory error detection basic execution flow 27-29 3.4 nbsp integrated memory error detection in the gdb debugger ; 29-31 3.5 Summary 31-32 Chapter IV memory error detection nbsp implemented in gdb debugger ; 32-52 4.1 program memory distribution 32-33 4.2 static memory allocation information storage area access 33 -38 4.3 stack memory allocation information acquisition 38-40 4.4 dynamic heap memory allocation information acquisition 40-43 4.5 memory bounds checking achieve achieve 43-45 4.6 memory leak check 45-47 4.7 Comparative analysis results 47-51 4.7.1 results 47-50 4.7.2 Comparative analysis 50-51 4.8 summary 51-52 Chapter summary and Outlook 52-54 5.1 summarizes 52 5.2 job Outlook 52-54 References 54-57 Thanks 57-59

Related dissertations

  1. The Research and Design of the Debugger Basing on ACoral Operating System
  2. Design and Implementation of Embedded Debugging System Based on ColdFire
    ChenDai ·Suzhou University ·2008 ·Master's thesis
  3. Research and Application of Cross-Developing Environment Based on Embedded MIPS Linux
  4. Developing Integrated Development Environment GDB-Based for Embedded System
    QuLei ·Taiyuan University of Technology ·2004 ·Master's thesis
  5. The Primary Research on the Technology of Platform Integration for SoC System-level Design
  6. Embedded software development environment integrated debugger Design and Implementation
  7. Research and Implementation of embedded system debugger
  8. Research of the Embeded Operation System μCLinux and Debugging Environment
    JiaJunLi ·Taiyuan University of Technology ·2005 ·Master's thesis
  9. Worm warning system - worm propagation model and scalability Alert System
    HeXueZuo ·Institute of Software ·2005 ·Master's thesis
  10. Research and Implementation of the Cluster Network Job Manager Systerm
    PanWei ·Northwestern Polytechnical University ·2005 ·Master's thesis
  11. JTAG Based Debugger Design and Implement
    LuZuo ·Zhejiang University ·2005 ·Master's thesis
  12. Research and Implementation of the ARM debug system
  13. Research and Implementation of Embedded Debugging Technology
    LianLiHong ·Xiamen University ·2009 ·Master's thesis
  14. The Research and Implementation of ADSP Platform Embedded Debugger
  15. Based on multicore GDB remote task -level debugging improvements
  16. Research and Implementation of dual-core debugger based on GDB
  17. The embedded software supports USB remote debugger Design and Implementation