Skip to content

低レイヤを知りたい人のためのCコンパイラ作成入門

License

Notifications You must be signed in to change notification settings

morihiro1978/9cc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

9cc

What is this?

A C-language compiler made by C-language.

Following "低レイヤを知りたい人のためのCコンパイラ作成入門" by Rui Ueyama

Requiement

Tools

  • Windows 10
  • Ubuntu on WSL1
  • VSCode

WSL commands

  • gcc, make
    $ sudo apt install build-essential
  • gdb
    $ sudo apt install gdb
  • git
    $ sudo apt install git

VSCode Extensions

How to build

  1. Open the repository folder by VSCode
  2. Ctrl+@ to open the terminal
  3. $ make

How to test

  1. Ctrl+@ to open the terminal
  2. $ make test

You can find "OK" in a test log if all tests are done.

How to debug

  1. Open a source file you want to debug
  2. Left-click at the left side of the line number you want to break
  3. Ctrl+Shift+D to open Debug view
  4. Select "9cc" configuration
  5. F5 to start debug

//

About

低レイヤを知りたい人のためのCコンパイラ作成入門

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published