buzz_assembler

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
buzz_assembler [2016/04/09 21:15] – [Debugging Information] rootbuzz_assembler [2016/04/09 21:28] – [Debugging Information] root
Line 52: Line 52:
 ==== Debugging Information ==== ==== Debugging Information ====
  
-To make human-readable error reporting possible, assembly code is typically annotated with extra information. This information is automatically generated by the [[buzz_toolset#bzzparse|tool ''bzzparse'']] upon compiling a Buzz script.+To make human-readable error reporting possible, assembly code can be annotated with extra information. Debugging annotations are added to each assembly code line. To mark the beginning of the information, the character ''|'' is used; after this character, the line number, column number, and file name are reported, separated by commas. No spaces are allowed before or after the commas. Line and column counts start from 1. For example: 
 + 
 +<file> 
 +@__label_0 
 + pushs 0 |7,18,/Users/myuser/test.bzz 
 + pushi 2 |7,20,/Users/myuser/test.bzz 
 + gstore |7,21,/Users/myuser/test.bzz 
 +</file> 
 + 
 +Debugging information is not mandatory for each line. In fact, the preamble of any Buzz assembly file (the part in which strings are recorded and global symbols are registered) have no associated debugging information. 
 + 
 +== Tool support == 
 + 
 +  * Debugging information is automatically generated by [[buzz_toolset#bzzparse|bzzparse]] upon compiling a Buzz script
 +  * [[buzz_toolset#bzzasm|bzzasm]] takes each assembly line and uses the assembly command to produce bytecode, and the associated debugging information to produce a debugging information file. 
 +  * [[buzz_toolset#bzzdeasm|bzzdeasm]] performs the opposite process: it takes as input a bytecode file and a debugging information file, and produces an annotated assembly code file.
  • buzz_assembler.txt
  • Last modified: 2016/07/14 23:47
  • by ilpincy