ACM & MUG Tech Talk Software Development Tools on Unix October 15, 2002

Slides:



Advertisements
Similar presentations
C++ Development on Linux Agenda Introduction Editors Debuggers GUI IDEs Make Automake Exploring further.
Advertisements

Introduction to the Omega Server CSE Overview Intro to Omega Basic Unix Command Files Directories Printing C and C++ compilers GNU Debugger.
Utilizing the GDB debugger to analyze programs Background and application.
ENEE150: Discussion 1 Section 0104 Please Sit Down at a Computer and Login!
The UNIX SYSTEM Introduction to Networking. Unix Tools Shells Useful Commands Pipes & Redirects.
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.
THE UNIX SYSTEM Ashish Gupta TA, Intro to Networking Jan Recital 2 Introduction to Networking, Instructor: Prof. Yan Chen.
Linux+ Guide to Linux Certification, Second Edition
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
T UTORIAL OF U NIX C OMMAND & SHELL SCRIPT S 5027 Professor: Dr. Shu-Ching Chen TA: Samira Pouyanfar Spring 2015.
Source Code Management Or Configuration Management: How I learned to Stop Worrying and Hate My Co-workers Less.
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.
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Abstracting the Underlying Multiple Operating System Architecture for Comprehensive Command Line Graphical Interface.
Debugging Cluster Programs using symbolic debuggers.
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”
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
LINUX System : Lecture 3 Vmware, Cygwin, LINUX installation Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
2INC0 Operating Systems Introduction to Linux
Programming Tools gcc make utility Open Source code Static and Shared Libraries gdb Memory debugging tools.
© All rights reserved. U.S International Tech Support
Linux+ Guide to Linux Certification Chapter Four Exploring Linux Filesystems.
Old Chapter 10: Programming Tools A Developer’s Candy Store.
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
TAMU CSCE 313 (the basics). Basic Unix/Linux programming Accessing CS systems  PuTTY (putty.exe) – a Telnet and SSH client  Common hosts: unix.cs.tamu.edu.
Week 3 Exploring Linux Filesystems. Objectives  Understand and navigate the Linux directory structure using relative and absolute pathnames  Describe.
Active-HDL Interfaces Debugging C Code Course 10.
Chapter Ten g++ and make1 System Programming Software Development: g++ and make.
CVS – concurrent versions system Network Management Workshop intERlab at AIT Thailand March 11-15, 2008.
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.
ENEE150 – 0202 ANDREW GOFFIN Introduction to ENEE150.
Debugging and Profiling With some help from Software Carpentry resources.
A Tutorial on Introduction to gdb By Sasanka Madiraju Graduate Assistant Center for Computation and Technology.
CVS – concurrent versions system AROC Guatemala July 19-23, 2010 Guatemala City, Guatemala.
Basic of UNIX For fresh members of SPARCS
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
CPS120: Introduction to Computer Science Compiling a C++ Program From The Command Line.
Byoung-Jo CHOI Fall 2007 SW Project II Advanced Linux Programming.
More Unix Naomi Altman. Directories Directory = folder mkdir - makes a new directory rmdir - removes an empty directory cd mydirectory - moves you into.
Object Oriented Programming COP3330 / CGS5409.  Assignment Submission Overview  Compiling with g++  Using Makefiles  Misc. Review.
THE UNIX SYSTEM Jan Recitation 2 Introduction to Networking.
ENEE150: Discussion 1 Section 0104/0105 Please Sit Down at a Computer and Login!
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
Recitation 2: Abhijit Warkhedi2/25/20161 Today’s Agenda u CVS u GDB.
C P ROGRAMMING T OOLS. C OMPILING AND R UNNING S INGLE M ODULE P ROGRAM.
Object Oriented Programming COP3330 / CGS5409.  Compiling with g++  Using Makefiles  Debugging.
Object Oriented Programming COP3330 / CGS5409.  Assignment Submission Overview  Compiling with g++  Using Makefiles  Misc. Review.
Lecture 6 UNIX Development Tools. Software Development Tools.
Programming C++ in Linux by various IDEs and editors by: Danial Khashabi Master: Dr.B.Taheri November 2008.
1 © 2007 Mauro Morsiani Laboratorio di Sistemi Operativi Anno Accademico Software Development with uMPS Part 3 Mauro Morsiani Copyright © 2007.
Chapter 3: Mastering Editors Chapter 3 Mastering Editors (Emacs)
DEBUG.
ENEE150 Discussion 01 Section 0101 Adam Wang.
Tutorial of Unix Command & shell scriptS 5027
Development Environment Basics
Editor, Compiler, Linker, Debugger, Makefiles
INTRODUCTION TO UNIX: The Shell Command Interface
Tutorial of Unix Command & shell scriptS 5027
Tutorial of Unix Command & shell scriptS 5027
Introduction to Linux Week 0 - Thursday.
Tutorial of Unix Command & shell scriptS 5027
Getting Started: Developing Code with Cloud9
Unix Programming Environment
Overview Unit testing Building Version control.
Tutorial Unix Command & Makefile CIS 5027
Video Notes.
Presentation transcript:

ACM & MUG Tech Talk Software Development Tools on Unix October 15,

Overview Intro to Unix, getting around Text editors Gcc Debugging Profiling Revision management Searching files Useful programming and misc tools

Intro to Unix: Files Filesystem a single tree Filenames case senstitive Physical devices can be mounted anywhere / tmpdevetchomeusr chrislibmaryincludebinlocal libincludebin

Intro to Unix: Essential Cmds cd- change directory - cd mkdir- make a directory - md cp- copy a file - copy ls- list files - dir rm- remove a file - del mv- move a file - move & ren grep- expression searching top- cpu and memory usage who/w- who else is logged in man- read documentation

Intro to Unix: More A central idea in Unix: Make small tools that do one job well and that can be connected ACM Intro to Unix presentation: Online resources Lots, just search Books Again, lots CHUUG:

Text Editors Crucial tools for using Unix Two main editors (easy flamewar topic): emacs vi Great features in both: Syntax highlighting Brace matching Sophisticated text manipulation/movement Scriptable …

Text Editors: vi If it’s unix, vi is installed vim, Simple and small Modal Command: move, perform commands Insert Others (replace, selection, more) Built in help, “: help”

Text Editors: emacs Kitchen-sink powerful Configurable, extensible, complicated emacs and xemacs emacsclient Tutorial: C-h t

Text Editors: Pure IDEs KDevelop: KDE Anjuta: GTK/GNOME

Text Editors: IDEs KDevelop

Text Editors: IDEs Anjuta

gcc the Gnu Compiler Collection Frontends for: C: gcc C++: g++ More (ada, java, objective-c, fortran, …) Backends for: x86, ia-64, ppc, m68k, alpha, hppa, mips, sparc, mmix, pdp-11, vax, …

gcc/g++: Usage g++ foo.cpp Outputs./a.out binary g++ -g -Wall –pedantic foo.cpp bar.cpp baz.o –o foo -g: produce debugging information -Wall –pedantic: many types of warnings -o foo: output to file “foo” Linking libraries: eg math library: –lm The library foo is named libfoo.a under unix

gcc/g++: Usage Optimizations None/-O0: Compile afap, debugging as expected -O1: some reduction of code size & exec time -O2: most opts w/o space-speed tradeoffs -O3: more cpu-specific optimization flags as well eg scheduling, assembly style, native types (get 128bit doubles on x86!), aligning, …

gcc/g++: Usage Misc Run only preprocessor: -E -C: don’t discard comments -MM: dependency info (useful for makefiles) Macros: Define: -Dmacro and –Dmacro=defn See defined after preprocessing: -E –dM -fall-virtual: treat all member fns as virtual Except constructor and new/delete Cross-compile

Debugging gdb and dbx Frontends: insight (part of gdb) ddd gvd kdbg emacs

Debugging gdb: the Gnu DeBugger Debugs C, C++, and Modula-2 Text and graphical interfaces Program crashes Leaves a “core” file Memory dump of the program Run gdb on binary and core, explore state of program at crash Common usage: gdb binary gdb binary core

Debugging gdb: Essential Commands break [file:]function- set breakpoint break class::member_fn run [arglist]- run program bt- print function stack print expr- print the result of expr c- continue execution next, step- next instruction/line watch- watch an expr info locals- local variables help- builtin help

Profiling “90% exec time spent in 10% of the code” Popular tools for profiling: gprof Flat profile: time spent in fns and how often called Call graph: Which functions called which and how often Annotated source: source w/ #times each line executed gcov Test coverage SimpleScalar Program performance analysis Mirco-arch modeling Hardware-software co-verification

Profiling gprof Usage Use cc/cpp options: -pg –a Run the binary as normal, outputs gmon.out and bb.out Run gprof to analyze

Revision Management diffutils: Find differences among files (diff and diff3) Update a set of files from generated differences (patch) cvs Maintains a history of changes for groups of files Including: who, when, what, and optionally why Analogue of Visual SourceSafe New alternatives: subversion and bitkeeper

Revision Management What CVS lets you do Modify source code locally until it’s ready to be merged with what everyone sees Multiple people can modify the same file and be ok Develop multiple versions of software simultaneously And merge these branches later on Recall past versions of code base Based on time ago or version See committer's comments on their changes

Searching files: grep Searches lines of text for given pattern “grep”? From ed subcommand “g/re/p” “Globally search for the Regular Expression and Print the lines containing matches to it” Also great for parsing program output program_foo | grep regex

Searching files: grep Regex Examples RegexWill matchWon’t match abbabyborris ^ababbybaby ad$monadmonads [cC]hrisChris, chriscHris [0-9a-zA-Z]Any alphanumeric?, $ [^aeiou]sZrvwlsis a.barbitraryarkabane a*barkabanebardvark

Other Useful Programming Tools indent: format source code static checking C: splint Java: escjava lex and yacc (gnu: flex and bison) Code generators for lexical analyzers and parsers nm: lists symbols from object files

Other Useful Programming Tools, cont gengetopt: generates code to parse options Dynamic code generation lightning and vcode GUI layout gtk: glade (C and C++ code generation) qt: Kdevelop Glade and KDevelop: layout by hand or from XML fltk: fluid make Automates generation of files from sources files

Other Useful Programs screen: multiple terminals within a terminal wc: Word Count ssh and scp: remote login and file copy find: find files find. –name “foo*bar” –type f –exec wc –l {$1} \; Printing: a2ps and enscript Syntax highlighting, multipage, toc

Other Useful Programs, cont tar and gzip/bzip2: collect and compress files Analogue of winzip less/more: look through files wget: retrieve files via http and ftp xmms: winamp-like mp3 player

ACM & MUG Tech Talk Software Development Tools on Unix October 15,