Font Size: a A A

Research And Primitive Implementation Of Backtracking Debugging Based On Process Snapshotting In Kernel Mode

Posted on:2009-04-03Degree:MasterType:Thesis
Country:ChinaCandidate:Y LuoFull Text:PDF
GTID:2178360242482987Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Programmers spend considerable time debugging code. Normal debuggers provide some help but the task remains difficult and time-cost. Many techniques were introduced to support backtracking debugging based on snapshot, most of them were implemented in user mode library. In this paper, we present a prototype debugging tool modified from gdb, based on snapshot of process by modifying Linux kernel, and backtracking debugging techniques. The most common use of snapshot is in fault tolerant computing where the goal is to minimize loss of CPU cycles when a long executing program crashes before completion. We discuss how to save and restore process state by snapshotting, and how to modified gdb to support backtracking debugging to improve efficiency of debugging.First, we introduce present situation of research home and abroad. Then we discuss how to implement backtracking debugging, based on snapshot of process in kernel mode. There are two part of work in the paper, how to save and restore process state in snapshot file and how to modified gdb to support backtracking debugging.To save and restore process state in snapshot file, we design an elf-based snapshot file format named 'snap', discuss the way to save and restore the information in kernel and user mode of process, design a tool named 'generate_snap' to generate snap file, a tool named 'dump_snap' to dump snapshot file, modify Linux kernel and design a kernel mode named 'binfmt_elf_snap.ko' to load snapshot file.To modified gdb to support backtracking debugging, we discuss the architecture of gdb, modify gdb to debug snapshot file, add some command to generate snapshot file and switch to some checkpoint to debug.The statistics of experiment shows we can backtrack debug in this way, which enhance efficiency of debugging greatly.
Keywords/Search Tags:debug, process, snapshot, kernel information, checkpoint, backtracking
PDF Full Text Request
Related items