in the VM folder (~/documents/cs162-vm/),
vagrant up
to set up VM. if this fails, usevagrant provision
to fixvagrant halt
to stop the VM. next time to run VM, justvagrant up
+vagrant ssh
.
see section1_tools
- Open Finder
- In the menu bar, select
Go
->Connect to Server...
- The server address is
smb://192.168.162.162/vagrant
- The username is
vagrant
and the password isvagrant
You should be able to see the contents of the vagrant user's home directory.
$ gcc programname.c -o programname
# if you don't supply -c, gcc will both compile and link for you behind the scenes.
## compile with debugging symbols
$ gcc -g programname.c -o programname
## run programs with the debugger
$ gdb programname
# next use the `run` command in gdb to start execution
## restart a program running in a debugger
$ kill
$ run
## quit the debugger
$ quit
## debugging
$ l # showing program
$ break 16 # set breakpoint at line 16
$ break func # set breakpoint at func()
$ info break # list breakpoints
$ r # run program
$ n # next program
$ c # continue
$ p i # print variable