Recitation 2: Abhijit Warkhedi2/25/20161 Today’s Agenda u CVS u GDB.

Slides:



Advertisements
Similar presentations
1 IST 410/420 Software Version Control 2 DevelopmentIntegration Test System Test User Acceptance Testing ProductionArchive DEVELOPMENTUSERS - Developers.
Advertisements

 Please sit next to your partner.  If you don’t have a partner, please find one now.
1. What is Subversion? Why do we need CM? Basic concepts Repositories Options Setup Clients Options Setup Operation Troubleshooting Slide 2.
Version Control System (Sub)Version Control (SVN).
Debugging What can debuggers do? Run programs Make the program stops on specified places or on specified conditions Give information about current variables’
Version Control System Sui Huang, McMaster University Version Control SystemSui Huang, McMaster University Version Control System -- base on Subversion.
David Notkin Autumn 2009 CSE303 Lecture 22 Subversion is an open source version control system. Social Implications Friday version control system.
2/6/2008Prof. Hilfinger CS164 Lecture 71 Version Control Lecture 7.
Using subversion COMP 2400 Prof. Chris GauthierDickey.
Concurrent Versioning System Chapter 8 (ALBING’s).
6/27/20151 Doris Lee Concurrent Version System (CVS)
Guidelines for working with Microsoft Visual Studio 6.
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
CS 225 Lab #2 - Pointers, Copy Constructors, Destructors, and DDD.
Source Code Management Or Configuration Management: How I learned to Stop Worrying and Hate My Co-workers Less.
SubVersioN – the new Central Service at DESY by Marian Gawron.
Prof. Aiken CS 169 Lecture 71 Version Control CS169 Lecture 7.
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Subversion. What is Subversion? A Version Control System A successor to CVS and SourceSafe Essentially gives you a tracked, shared file system.
Memory & Storage Architecture Seoul National University GDB commands Hyeon-gyu School of Computer Science and Engineering.
The Design Workshop Introduction to Version Control 1.
Version Control with Subversion Quick Reference of Subversion.
With Mercurial and Progress.   Introduction  What is version control ?  Why use version control ?  Centralised vs. Distributed  Why Mercurial ?
Git – versioning and managing your software L. Grewe.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱 • CVS 簡介 • CVS 安裝 • CVS 設定 (Linux/Windows) • CVS 指令簡介 • CVS 多人環境的應用.
Compiling & Debugging Quick tutorial. What is gcc? Gcc is the GNU Project C compiler A command-line program Gcc takes C source files as input Outputs.
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin.
Chris Onions Getting started with CVS in ATLAS 11 Getting started with CVS in ATLAS Chris Onions (Tutorial based on that of Raúl Ramos Pollán CERN / IT.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
An Intro to Concurrent Versions System (CVS) ECE 417/617: Elements of Software Engineering Stan Birchfield Clemson University.
CVS – concurrent versions system Network Management Workshop intERlab at AIT Thailand March 11-15, 2008.
CSE 219 Computer Science III CVS
Configuring Sourceforge’s CVS to work with Forte (3.0 or later) on WindowsNT and Windows 2000 Specific for MAExplorer.sourceforge.net Written by Eric Shen,
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.
Prepared by: Steve Teo Contributors: Tong Huu Khiem.
CVS – concurrent versions system AROC Guatemala July 19-23, 2010 Guatemala City, Guatemala.
CSE 351 GDB Introduction. Lab 1 Status? How is Lab 1 going? I’ll be available at the end of class to answer questions There are office hours later today.
1 CSE306 Operating Systems Projects CVS/SSH tutorial.
CVS: Concurrent Version System Lecturer: Prof. Andrzej (AJ) Bieszczad Phone: “UNIX for Programmers and Users” Third.
1 MSTE Visual SourceSafe For more information, see:
Debugging 1/6/2016. Debugging 1/6/2016 Debugging  Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a program.
12 CVS Mauro Jaskelioff (originally by Gail Hopkins)
Version Control System
Presentation OLOMOLA,Afolabi( ). Update Changes in CSV/SVN.
WinCVS Training è Basic Concepts è Download & Setup è Importing a new module into CVS Repository è Getting new module from CVS è Getting Latest version.
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
CMSC 104, Version 8/061L14AssignmentOps.ppt Assignment Operators Topics Increment and Decrement Operators Assignment Operators Debugging Tips Reading Section.
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
HP-SEE Debugging with GDB Vladimir Slavnic Research Assistant SCL, Institute of Physics Belgrade The HP-SEE initiative.
Warren Jones, Fluke Co., Eugene Kramer, Remedy Co. Introduction to CVS 1999 Revised by David Svoboda 2003 Concurrent Versions System Overview of CVS architecture.
CVS repositories, and how to set them up for using CCPN.
Source Control Repositories for Enabling Team Working Doncho Minkov Telerik Corporation
1 Subversion Kate Hedstrom April Version Control Software System for managing source files –For groups of people working on the same code –When.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Problem Solving With C++ SVN ( Version Control ) April 2016.
Winter 2009 Tutorial #6 Arrays Part 2, Structures, Debugger
An Intro to Concurrent Versions System (CVS)
CVS revisions UML diagram
Debuggers.
Concurrent Version System (CVS)
CVS Concurrent Versioning System
Amandeep Jawa Worker Bee Software
Debugging.
Presentation transcript:

Recitation 2: Abhijit Warkhedi2/25/20161 Today’s Agenda u CVS u GDB

Recitation 2: Abhijit Warkhedi2/25/20162 What is CVS? u CVS is a version control system. u Allows retrieval of old versions of projects. u Reduces the need for communication between developers to coherently maintain files. u Stores all the versions of a file in a clever way that only stores the differences between versions.

Recitation 2: Abhijit Warkhedi2/25/20163 What CVS cannot do... u Not a build system. u Not a substitute for management. u Not a substitute for developer communication. u Does not have change control. u Not an automated testing program. u Does not have a built-in process model.

Recitation 2: Abhijit Warkhedi2/25/20164 File Management without CVS Project Files Dev_1 Dev_2Dev_3

Recitation 2: Abhijit Warkhedi2/25/20165 File Management with CVS Project Files Dev_1 Dev_2Dev_3

Recitation 2: Abhijit Warkhedi2/25/20166 Basic Concepts u All files stored in a central repository. u Each version of a file has a unique revision number. –(e.g. 1.1, 1.2, ) –always contains even number of digits. u CVS is not limited to linear development.

Recitation 2: Abhijit Warkhedi2/25/20167 An Example engine.cutil.cwindow.c prjv1 (tag) prjv2

Recitation 2: Abhijit Warkhedi2/25/20168 What is a tag? u A symbolic name given to a file revision or more typically a set of file revisions. u Tags can be used to represent versions of an entire project. u Should be used at strategic points in the development cycle.

Recitation 2: Abhijit Warkhedi2/25/20169 Non-linear development prjv1prjv2prjv3prjv4 b1b2 prjv1_fixes (branch)

Recitation 2: Abhijit Warkhedi2/25/ Why would I use a branch? u Allows for maintenance of bug fixes. u Provides means to backtrack and create experimental versions of a project. u Scenario: already tagged 3 versions of project. And users complain about bug in version 1 -- what do you do?

Recitation 2: Abhijit Warkhedi2/25/ Okay, how do I use this? u Creating the CVS repository. –setenv CVSROOT /usr/u/warkhedi/cvsroot –cvsinit u Assume project files in project directory. u Adding directory structure to CVS. –cd project –cvs import trialprj NONE INITIAL

Recitation 2: Abhijit Warkhedi2/25/ Here is how it looks... /usr/u/warkhedi/cvsroot trialprj engine.c,v util.c,v window.c,v

Recitation 2: Abhijit Warkhedi2/25/ Check in, Check out. u Checking out files in repository. –cvs co -d project1 trialprj –Creates files in project1 directory. –Notice CVS directory in project1. u E.g. modify engine.c u Checking in changes. –cvs commit –Only engine.c is checked in.

Recitation 2: Abhijit Warkhedi2/25/ Updating my copy engine.c 1.1 engine.c 1.2 engine.c 1.3 engine.c 1.1 (*) engine.c 1.3 (U) engine.c 1.4 local copy update commit

Recitation 2: Abhijit Warkhedi2/25/ Possibilities at an Update u If local file is un-modified: –CVS updates local copy with the latest. –U engine.c u If local file is modified: –CVS attempts to merge the two files, textually. –If there is conflict (defined as change on same line), modify local file to indicate this else merge the two files quietly.

Recitation 2: Abhijit Warkhedi2/25/ Let’s play tag... u Tag all files at a strategic point in time. u cvs tag -R prjv1. u Tagged files can have different revision numbers. u Later, the project version 1 can be checked out. –cvs co -r prjv1 -d project1 trialprj –remake to get object files for version 1.

Recitation 2: Abhijit Warkhedi2/25/ Creating Branches u cvs rtag -b -r prjv1 prjv1_fixes trialprj u CVS command rtag creates new tag in the repository. u Branch prjv1_fixes is spawned from tagged files of prjv1. u Bug fixes can be made on prjv1_fixes and subsequent branch versions can be merged later.

Recitation 2: Abhijit Warkhedi2/25/ Sticky tags u All subsequent commands operate on the tag. u cvs co -r prjv1 -d project1 trialprj –when you checkout with a specific tag, all files have a sticky tag. –cannot commit files with sticky tag. u Exception: branches. u Use update -A to eliminate sticky tags.

Recitation 2: Abhijit Warkhedi2/25/ An Example u cvs co -r prjv1 -d project1 trialprj u modify util.c u cvs commit –tries to commit to prjv1 –cannot commit changes to prjv1

Recitation 2: Abhijit Warkhedi2/25/ Another Example u cvs co -r prjv1_fixes -d project1_fixes trialprj u modify util.c u cvs commit –tries to commit to branch prjv1_fixes –works! makes sense.

Recitation 2: Abhijit Warkhedi2/25/ Merging Branches u cvs co -d latest trialprj u cd latest u cvs update -j prjv1_fixes –merges all changes in the branch into the latest copy. u cvs commit –all fixes incorporated into the mainline.

Recitation 2: Abhijit Warkhedi2/25/ Adding/Deleting Files u Adding a file to the repository. –cd project1 –cvs add mem.c –project1 must have CVS directory. u Removing a file from the repository. –cd project1 –cvs remove mem.c

Recitation 2: Abhijit Warkhedi2/25/ Status Checking u cvs status –provides complete information on all files in a directory –e.g. revision #s, stick tag, etc. u cvs diff –displays difference between the working version and the repository version. –diffs all files in the current directory.

Recitation 2: Abhijit Warkhedi2/25/ Lot more options available!! u Features discussed so far are most commonly used. u Feel free to explore others too. u Start experimenting now.

Recitation 2: Abhijit Warkhedi2/25/ GDB u Vanilla debugger. u XGDB - graphical version of GDB u Visual Studio debugger.

Recitation 2: Abhijit Warkhedi2/25/ What is a debugger? u Allows you to debug. Duh! u More specifically... –can step through code, set breakpoints, watch variables, examine structures, etc. u Source-Level debuggers. –allow user to visually interact with source code. u Assembly-Level debuggers. –well, they are just a pain to use.

Recitation 2: Abhijit Warkhedi2/25/ Example include #include void main() { int x, y, z; x = 0; y = 0; while (x <= 5) { x++; y = y + x; z = sqr(y); printf("%d ", z); } printf("\n"); } int sqr(int x) { int y; return(y); }

Recitation 2: Abhijit Warkhedi2/25/ Continued... u Compile program with -g option to include symbolic info. –gcc -g test.c –gdb a.out u break 7 -- sets breakpoint at line 7. u run -- runs the program. u Program stops at line 7.

Recitation 2: Abhijit Warkhedi2/25/ Continued... u step -- steps one source line. u watch x -- displays variable x upon change. u break sqr -- sets breakpoint on sqr() u continue u program displays change in x.

Recitation 2: Abhijit Warkhedi2/25/ Continued... u continue u program stops in sqr() u up -- goes up to main stack frame. u down -- back down to sqr() u step and print y -- displays value of y. u delete 1 -- deletes breakpoint 1

Recitation 2: Abhijit Warkhedi2/25/ Finally... u continue -- runs the program till the end. u watch is deleted when out of scope.

Recitation 2: Abhijit Warkhedi2/25/ Other useful features u next command –steps over an entire function. u finish command –execute until current stack frame returns. u And plenty others at your disposal!!