The focus of this week's readings are developer tools, that is applications that will help with programming C/C++ on a typical Unix system.
The readings for Monday, February 1 are:
Compiling and Building:
Debugging and Profiling:
Optional:
Compiling and Building:
Debugging and Profiling:
Also, please take a look at the manual pages linked below.
In your reading03
folder write a simple hello.c
program that prints
"Hello, World". Next create a Makefile
that compiles your hello.c
with
six different targets:
hello-dynamic
: Compiles hello.c
into a dynamic executable
hello-static
: Compiles hello.c
into a static executable
hello-debug
: Compiles hello.c
into an executable with debugging symbols enabled
hello-profile
: Compiles hello.c
into an executable with profiling information enabled
all
: Builds all of the hello-*
executables (this should be the default target)
clean
: Removes all the hello-*
executables
In your reading03/README.md
file, describe what command you would use to
accomplish the following:
View all the text in ls
.
Determine which shared libraries ls
requires.
View all the system calls made during an invocation of ls
.
Debug the hello-debug
program to fix errors.
Check the hello-dynamic
program for memory leaks or errors.
Profile the hello-profile
program to find any bottlenecks.
In the reading03
folder, write at least five summary pages for the
following commands (since some of the commands perform similar functions, only
choose one from each set):
Note, your summaries should be in your own words and not simply copy and pasted from the manual pages. They should be short and concise and only include common use cases.
If you have any questions, comments, or concerns regarding the course, please provide your feedback at the end of your response.
To submit your assignment, please commit your work to the reading03
folder
in your Assignments Bitbucket repository by the beginning of class
on Monday, February 1.