"Debug" is a library program, and therefore, it is not part of a specific program. It is a tool to be used by developers who want to view the contents of registers. When the project is completed the developer should withdraw the "Debug statements" and deliver only the basic program without any evidence of the use of this tool.
The author does not claim that Debug is free of errors. In fact, Debug is still in the Alpha stage of testing. The author stopped development of this library program a number of years ago when other projects arrived with much higher priorities. Because work on Debug was suddenly stopped, the final cosmetic polish is missing. For instance, the FOSS (free open source software) license is missing. Some comments are waiting to be written. The program is posted here with the hope that someone may find a use for this tool.
Things of interest: if you are reading this you may find an interest in the use of a header file in place of a prototype. The reader may be familiar with the term "programming with a macro". Calling a macro is similar to calling a function without the overhead of activation records. You can see a macro defined in the file "debug.inc". You can see a call to different macros in the file "explore.asm".
Finally, the reader should be aware that is a static tool because it can only output values. This tool cannot updates data while execution is in progress. Effectively , GDB is a more versatile debugger than this program. "Debug" has value in serving to teach how to make and use macros.
Debug is a multi-purpose static tool.
1. Debug.asm must be assembled first
2. The header #include "debug.inc" should be place near the top of any assembly function
3. The debug object file must be linked to the executable file running.
4. At any point in the execution of the program underdevelopment the programmer may ask to see any of the following:
a. All gprs with names such as rax, rbx, rcs, rdi, rsi, rsp, and so on.
b. The system stack near the top of the stack.
c. The floating point registers in SSE known as xmm registers.
d. The floating point registers in AVX known as ymm registers.
e. The floating point registers in FPU known as st registers.
Test the sample program here and determine if there is something you can use.
Available for download
debug.7z //Down load all 5 program files in one zipped file.
//For assistance in using the 7z compression program visit: How to use 7zip in a Linux Shell