0% found this document useful (0 votes)
38 views9 pages

Advanced UNIX Progamming: Fall 2002 Instructor: Ashok Srinivasan

This document summarizes the topics covered in the first week of an Advanced UNIX Programming course. The topics included an overview of the course policies and syllabus, a review of the UNIX programming environment including editors, C compilers, debuggers and makefiles, and a review of some UNIX system calls and C language features.

Uploaded by

Bitcoin Bontang
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views9 pages

Advanced UNIX Progamming: Fall 2002 Instructor: Ashok Srinivasan

This document summarizes the topics covered in the first week of an Advanced UNIX Programming course. The topics included an overview of the course policies and syllabus, a review of the UNIX programming environment including editors, C compilers, debuggers and makefiles, and a review of some UNIX system calls and C language features.

Uploaded by

Bitcoin Bontang
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 9

Advanced UNIX progamming

Fall 2002 Instructor: Ashok Srinivasan


Lecture 1
Class web site: http://www.cs.fsu.edu/~asriniva/courses/aup-02

Acknowledgements: The syllabus and power point presentations are modified versions of those by T. Baker and X. Yuan

Announcements
Pre-requisite
COP 4610: Operating systems

Collect syllabus
http://www.cs.fsu.edu/~asriniva/courses/aup-02

Sign attendance sheet Read the class web page and check your garnet account frequently Use the following machines for programming assignments, as far as possible
program and linprog

Week 1 Topics
Course outline and policies UNIX programming environment
Editors C compilers and debuggers Makefiles

Review some features of C


Header files Command line arguments Utilities

Review some UNIX system calls


system, etc

Course outline and policies


Read the syllabus Important points will be mentioned in class

UNIX programming environment


Editors C compilers Debugger Makefiles
make

Editors
vi, pico, emacs, etc What is good about emacs?
emacs is more than just an editor You can compile and edit within emacs If you know lisp, you can expand its functionality Some useful commands to get started:
C-h t C-g C-x C-c C-h get tutorial cancel command quit emacs help

C compilers
gcc, cc Using ANSI C, the code must pass with flags
Wall ansi pedantic

with no warning messages See example1.c


How can we fix warning?

Some examples
gcc g Wall ansi pedantic example1.c gcc g c Wall ansi pedantic example1.c gcc g example1.o gcc g example.o -lm

Debugger
ddd, xxgdb, gdb The code must be compiled with g option. The power of a debugger:
Finding the line that causes coredump. See example:
Break point, show value, change value, step, next, continue, print

Very efficient in debugging sequential code Not very effective in debugging concurrent code (multiple threads, multiple processes) Good software development practice: You must have seen each line of your code execute in the debugger, at least once

Make
make [-f makefile][option] target
A tool to update files derived from other files The default files for make are ./makefile, ./Makefile, ./s.makefile Use the f option to specify some other file
make f makefile1

The makefile has three components


Macros: define constants Target rules: Specify how targets are made Inference rules: Specify how targets can be made, implicitly. make will first check if a target rule applies, before using inference rules.

You might also like