How To Build Busybox with Gcov by Yunho Kim Provable Software Lab, KAIST.

Slides:



Advertisements
Similar presentations
Introduction to the Omega Server CSE Overview Intro to Omega Basic Unix Command Files Directories Printing C and C++ compilers GNU Debugger.
Advertisements

Utilizing the GDB debugger to analyze programs Background and application.
1 Introduction to UNIX Ke Liu
Lab6 CPCS361 I.Mona Alshehri. Working with Files and Directories Creating files Create a file with the cat command type the command cat > name_of_file.
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
Scite Scintilla integrated text editor. Click here.
Memory & Storage Architecture Seoul National University Computer Architecture “ Bomb Lab Hints” 2nd semester, 2014 Modified version : The original.
Introduction to ArcGIS Add-Ins Exercises GIS/LIS Conference, 2014 Rochester, MN.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
7/17/2009 rwjBROOKDALE COMMUNITY COLLEGE1 Unix Comp-145 C HAPTER 2.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel.
CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training module provides an overview of optimization techniques used in.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
File Permissions. What are the three categories of users that apply to file permissions? Owner (or user) Group All others (public, world, others)
ABAQUS Installation on LINUX Platform D. Hanumanthappa, A. Jérusalem May 5th, 2010.
Makefiles CISC/QCSE 810. BeamApp and Tests in C++ 5 source code files After any modification, changed source needs to be recompiled all object files need.
The UNIX development environment CS 400/600 – Data Structures.
Vim Editor and Unix Command gcc compiler Computer Networks.
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
COMPUTER SYSTEM LABORATORY Lab6 - Root Filesystem.
CGS 3460 Why we choose UNIX n Powerful lMulti-user operating system lGood programming tools Most heavy-duty database management systems started out on.
Linux Commands C151 Multi-User Operating Systems.
HW4: Due Nov 24th 23:59 1.Describe test cases to reach full path coverage of the triangle program by completing the path condition table below. Also, draw.
AE6382 MinGW l The MinGW (Minimalist GNU for Windows) GNU compilers u C/C++ u Fortran 77 u Fortran 95 l Generate native Windows code l User Windows libraries.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
CPS120: Introduction to Computer Science Compiling a C++ Program From The Command Line.
1 How to Install OpenGL u Software running under Microsoft Windows makes extensive use of "dynamic link libraries." A dynamic link library (DLL) is a set.
1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part A Shell Commands Professional Training.
More on Using onyx 8/28/13. Program 1 Due a week from today. See website for details.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Installing Applications in FreeBSD lctseng. Computer Center, CS, NCTU 2 Before we start  Permission issue root: the super user Like administrator in.
Lab 8 Department of Computer Science and Information Engineering National Taiwan University Lab8 - Root Filesystem 2015/11/10/ 22 1.
Install CB 1.8 on Ubuntu. Steps Followed Install Ubuntu (Ubuntu LTS) on Virtual machine – (VMware Workstation) (
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  There are many different.
Familiarizing with UNIX Commands. UNIX Commands Unix systems are heavily command based. This often makes us feel uncomfortable. Moreover the system is.
HW7: Due Dec 5th 23:59 1.Describe test cases to reach full path coverage of the triangle program by completing the path condition table below. Also, draw.
Implementation of Embedded OS
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 - OS Kernel 2014/10/21/ 16 1.
Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
UNIX-21 WEEK 2 4/5/2005. UNIX-22 TOPICS Functions (contd.) pushd, popd, dirs Debugging Shell scripts Scheduling Unix jobs Job Management.
Chapter 19 File System Backup. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To describe how files and directories can be archived.
Installing Applications in FreeBSD
First Day in Lab Making a C++ program
Getting started with CentOS Linux
Andy Wang Object Oriented Programming in C++ COP 3330
C151 Multi-User Operating Systems
Useful Linux Commands.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands:
Engineering Innovation Center
Computer Architecture “Bomb Lab Hints”
IS3440 Linux Security Unit 7 Securing the Linux Kernel
Introduction Paul Flynn
Run Java file with Window cmd
Getting started with CentOS Linux
Andy Wang Object Oriented Programming in C++ COP 3330
Using emacs and G++ at U. W.
GNU gcov gcov is a test coverage program running with gcc.
Computer System Laboratory
Lab 2: Terminal Basics.
1.3 Given a scenario, apply appropriate Microsoft command line tools
HW4: Concolic testing Busybox expr (due Nov 30 23:59)
HW4: Due Nov 22nd 23:59 Describe test cases to reach full path coverage of the triangle program by completing the path condition table below. Also,
Presentation transcript:

How To Build Busybox with Gcov by Yunho Kim Provable Software Lab, KAIST

Contents Yunho Kim, Provable Software Lab, KAIST2/14 How to compile busybox with gcov How to get coverage information

Compile Busybox Yunho Kim, Provable Software Lab, KAIST3/14 How to compile busybox with gcov

Compile Busybox (Step 1~3) Yunho Kim, Provable Software Lab, KAIST4/14 1) Download busybox version and unzip the archive file. 2) Execute the following command – $ make allnoconfig to uncheck all build options 3) Execute the following command – $ make menuconfig This command requires a ncurses library

Compile Busybox (Step 4) Yunho Kim, Provable Software Lab, KAIST5/14 4) Go to Busybox Settings -> Build Options -> Additional CFLAGS and enter --coverage

Compile Busybox (Step 5) Yunho Kim, Provable Software Lab, KAIST6/14 5) Go to Busybox Settings -> Debugging Options and check ‘Build BusyBox with extra Debugging symbols’ and ‘Disable compiler optimizations’ option.

Compile Busybox (Step 6) Yunho Kim, Provable Software Lab, KAIST7/14 6) Check the 5 utilities(vi, expr, prinf, grep, ls) in Applets Coreutils -> expr, printf, ls Editors -> vi Finding Utilities -> grep

Compile Busybox (Step 7) Yunho Kim, Provable Software Lab, KAIST8/14 7) Go to Busybox Settings -> General Configuration and check ‘Show terse applet usage messages’ and its sub-options

Compile Busybox (Step 8) Yunho Kim, Provable Software Lab, KAIST9/14 8) Save your configuration and exit. Then, execute $ make When the build process terminates successfully, ‘busybox’ and ‘busybox_unstripped’ files are generated. – ‘busybox’ is stripped version of ‘busybox_unstripped’ – ‘busybox’ does not have any symbol information. – Thus, you should use busybox_unstripped to get symbol information

Compile Busybox (Step 9) Yunho Kim, Provable Software Lab, KAIST10/14 9) Execute./busybox_unstripped and check expr, grep, ls, printf, and vi are defined in the binary.

Compile Busybox (Step 10) Yunho Kim, Provable Software Lab, KAIST11/14 10) Check that sourcefile.gcno are generated in sub- directories. – If not, you may make a mistake in step 4

Get Coverage Information Yunho Kim, Provable Software Lab, KAIST12/14 How to get coverage information

Get Coverage Information (Step 1~2) Yunho Kim, Provable Software Lab, KAIST13/14 1) Execute ls utility $./busybox_unstripped ls 2) Copy coreutils/ls.gcno and coreutils/ls.gcda into the busybox root directory(parent directory of coreutils directory) $ cp coreutils/ls.gcda coreutils ls.gcno.

Get Coverage Information (Step 3~4) Yunho Kim, Provable Software Lab, KAIST14/14 3) Execute gcov to get coverage information $ gcov -b ls.c 4) You can find coverage information from ls.c.gcov – You can obtain coverage information of other source files in a similar way.