Giter Site home page Giter Site logo

cs162's Introduction

cs162

Setup

Mac OS X

in the VM folder (~/documents/cs162-vm/),

  • vagrant up to set up VM. if this fails, use vagrant provision to fix
  • vagrant halt to stop the VM. next time to run VM, just vagrant up + vagrant ssh.

see section1_tools

  1. Open Finder
  2. In the menu bar, select Go -> Connect to Server...
  3. The server address is smb://192.168.162.162/vagrant
  4. The username is vagrant and the password is vagrant You should be able to see the contents of the vagrant user's home directory.

Compile File

$ gcc programname.c -o programname
# if you don't supply -c, gcc will both compile and link for you behind  the scenes.

gdb debugger tool

manual easy-tutorial

## 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 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.