Tools for Source Browsing and Debugging

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

Debugging What can debuggers do? Run programs Make the program stops on specified places or on specified conditions Give information about current variables’
Introduction to UNIX CSE 2031 Fall May 2015.
Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
CSCC69: Operating Systems Tutorial 2 Some of the slides were borrowed from csc369 course, U of T, St George.
THE UNIX SYSTEM Ashish Gupta TA, Intro to Networking Jan Recital 2 Introduction to Networking, Instructor: Prof. Yan Chen.
VIM: The basics Tang Wai-Chung, Matthew (MaFai) 29/12/2006.
Java Programming Working with TextPad. Using TextPad to Work with Java This text editor is designed for working with Java You can download a trial version.
Linux+ Guide to Linux Certification, Second Edition
Scite Scintilla integrated text editor. Click here.
1 Basics of Linux On linux machine: Login at your home directory Open a “shell” or “terminal” or “xterm” workspace (4) On windows machine Intall linux.
UNIX Overview. 2 UNIX UNIX is a multi-user and multi-tasking operating system. Multi-tasking: Multiple processes can run concurrently. Multi-user: different.
CS0007: Introduction to Computer Programming Setting Up Java.
Filters using Regular Expressions grep: Searching a Pattern.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
Git: Part 1 Overview & Object Model These slides were largely cut-and-pasted from tutorial/, with some additions.
Source code indexer. What does it do?  Indexes source code for fast lookups of methods, variables, structs, macros, …  But LXR does this… Ctags can.
MCB Lecture #3 Sept 2/14 Intro to UNIX terminal.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
®® Microsoft Windows 7 for Power Users Tutorial 13 Using the Command-Line Environment.
A few Linux basics Network Monitoring & Management.
Linux+ Guide to Linux Certification, Third Edition
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it.
Week 3 Exploring Linux Filesystems. Objectives  Understand and navigate the Linux directory structure using relative and absolute pathnames  Describe.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
ENEE150 – 0202 ANDREW GOFFIN Introduction to ENEE150.
UNIX Introduction CSCE 221H Texas A&M University.
CSE 232: C++ debugging in Visual Studio and emacs C++ Debugging (in Visual Studio and emacs) We’ve looked at programs from a text-based mode –Shell commands.
NA-MIC National Alliance for Medical Image Computing Slicer / ITK / VTK Development Tools Steve Pieper, PhD.
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
Debugging. Outline Announcements: –HW II due Fridayl db.
Debugging Computer Networks Sep. 26, 2007 Seunghwan Hong.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 11 – gdb and Debugging.
NA-MIC National Alliance for Medical Image Computing Slicer / ITK / VTK Development Tools Steve Pieper, PhD.
COP 3530 Spring 12 Discussion Session 1. Agenda 1.Introduction 2.Remote programming 3.Separate code 4.Compile -- g++,makefile 5.Debug -- gdb 6.Questions?
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part B Shell Commands Professional Training.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
CSC 352– Unix Programming, Fall 2011 November 8, 2011, Week 11, a useful subset of regular expressions, grep and sed, parts of Chapter 11.
 Wind River Systems, Inc Chapter - 4 CrossWind.
Review Why do we use protection levels? Why do we use constructors?
DEBUG.
Introduction to the Command Line for Data Analysts Gus Cavanaugh
Tutorial of Unix Command & shell scriptS 5027
Chapter 2: The Visual Studio .NET Development Environment
Getting started with CentOS Linux
Chapter 11 Command-Line Master Class
CSC 352– Unix Programming, Spring 2016
UNIX The Basics Source:
A Short DOS Presentation
introduction to Linux/Unix environment
Guide To UNIX Using Linux Third Edition
Software Tools Recitation 1
CENG2400 Tutorial 1 Keil IDE CENG2400 tutorial 1 v.7a.
Tutorial of Unix Command & shell scriptS 5027
UNIX Introduction Peter Wad Sackett.
CSC 352– Unix Programming, Fall 2012
Tutorial of Unix Command & shell scriptS 5027
Operating System Discussion Section.
Tutorial of Unix Command & shell scriptS 5027
A Brief Overview of Unix
Run Java file with Window cmd
GNU DEBUGGER TOOL. What is the GDB ? GNU Debugger It Works for several languages – including C/C++ [Assembly, Fortran,Go,Objective-C,Pascal]
Getting started with CentOS Linux
UNIX Introduction Peter Wad Sackett.
Tutorial Unix Command & Makefile CIS 5027
Download and Installation of code::blocks
Using emacs and G++ at U. W.
Command line.
Introduction to Linux and Code Editing
Presentation transcript:

Tools for Source Browsing and Debugging CSE 451 14au Section #2 Tools for Source Browsing and Debugging

Finding Files tree find Dumps the directory hierarchy to stdout Pipe to less for easy scanning/searching tree | less Arrow keys or h/j/k/l to move PgUp/PgDn or ctrl-U/ctrl-D to jump by half-screens / to search down, ? to search up n to repeat search, N to repeat search in the other direction q to quit find Powerful file search tool find <dir> -name '<pattern>'

Searching Files git grep Better than normal grep when in a git repo git grep [options] pattern [files/dirs...] -i for case-insensitive matching -w to match the pattern on word boundaries -v to invert the match … and much, much more! git help grep

Searching Code ctags (or etags) Vim + ctags Emacs + etags Index of all symbols in your source code In your compile directory (e.g. kern/compile/ASST0) run bmake ctags (or bmake etags) Vim + ctags ctrl-] jumps to tag under cursor :tag <tag> to jump to specific tag ctrl-T jumps back one level in tag stack Emacs + etags M-. <RET> jumps to tag under cursor M-. <tag> jumps to specific tag M-* jumps back one level in tag stack

Superpowered Search cscope cscope -bR to generate database cscope -d for the cscope GUI Incredibly powerful! man cscope Also has editor integration with vim/emacs Requires some setup, so use your search-fu

Debugging cse451-gdb Not your normal gdb! Download http://courses.cs.washington.edu/courses/cse451/14au/gdbinit to your root folder and rename to .gdbinit wget http://courses.cs.washington.edu/courses/cse451/14au/gdbinit && mv gdbinit .gdbinit Sets up gdb settings to make things a little nicer Points to ASST0 code right now – you should edit this file to point to ASST1/2/3 when necessary

How to Debug In one window: In another window: sys161 -w kernel Or just hit ctrl-G while the kernel is running In another window: cse451-gdbtui kernel Or cse451-gdb -tui kernel Or cse451-gdb kernel and hit ctrl-X a Then use db to connect to sys161

Common GDB Commands next step break [if ...] print continue backtrace up down Once you get comfortable with the basic commands, check out http://www.eecs.harvard.edu/~margo/cs161/resources/gdb.html

Git Very powerful, very versatile source control tool Basic git tutorial: http://courses.cs.washington.edu/courses/cse451/14au/tutorials/tu torial_git.html Once you have your group folders, take a look at this: http://courses.cs.washington.edu/courses/cse451/14au/repo.html