Misc Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are the 3 steps for running gdb?
1.
2.
3.

A
  1. make clean debug
  2. gdb (executable name)
  3. gdb run
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do < and > do in terms of redirection

A

The < symbol tells the shell to perform input redirection:
input is taken from the file infile (which must exist) instead of
from the terminal.

The > symbol tells the shell to perform “output redirection”:
the file outfile is created (or truncated if it already existed – be careful!)
and the output produced by the program is sent to that file instead
of to the terminal.

Redirection
is handled by the shell and that the bin/xyz program never sees any of the redirection arguments; in the above example it sees only bin/xyz …args… and it just reads from stdin and writes to stdout.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to obtain a ‘Flat Profile’ using gprof?

A
  1. bin/xyz < fileName > /dev/null
  2. gprof bin/xyz
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does a header file define?

A

Interfaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly