ABC Tool Project
Overview
The SCAT tool has been renamed to ABC Tool and ported from Perl to Python.
Roadmap
References
- Assembly Branch Coverage for Deos (ABC) Tool Qualification Data, Operational Requirements (2023)
- DDC-I Additional Considerations (2025) (see Section 3 ASSEMBLY BRANCH COVERAGE)
- DDC-I IP Response (2002) (responses to specific issues raised by certification authorities)
NOTE: Branches have been moved. Instead of mainline (Perl) and python-port branches, they are now mainline (Python) and legacy-perl (retaining the older Perl implemenation).
- ABC Tool (Python port is now mainline branch)
- ABC Tool (legacy Perl moved from mainline to legacy-perl branch)
Historical
Design
Objectives
- Instrument start and end of basic blocks to verify all instructions were executed in the block during testing
- Instrument decision points (conditionally executed instructions, branches, etc.) to verify both paths were taken during testing
- Instrument the start of dead code sections to verify they were not executed during testing
- Provide a means to stop/start instrumentation, and insert instrumentation at indicated locations in the code.
- Manage nested stop/start instrumentation command pairs (push/pop)
- Implement the required features as architecture-agnostically as possible; customized to ARM, AARCH64, PowerPC, and X86_64 as required.
Simplifying: returning to first principles
- Instrument all conditional instructions (branch or operation) to report which path is taken at those points.
Once the above is assured, any additional instrumentation points which are needed must have a requirement to be implemented and tested.
- Detection of unreachable code
- Detection of start/end of basic code blocks
- Instrumentation on/off/insert/push/pop
To Be Addressed
- High-Level Design Decisions document needed (philosophy, intent,...)
- Design decisions:
- coverage of basic block entries
- coverage of whether conditional statement conditions (instruction, branch) are true or false
- coverage of basic block exits? (for report indication that code executed to that point before change of flow?)
- Operational Requirements doc:
- Should 3.2 Branch Coverage be 3.2 Conditional Branch Coverage?
- Should 3.25 Pos-independent relocation be section 3.3 (not under [cond] Branch Coverage)?
- (double checking, but thought I saw INSTRUMENTATION IGNORE in the tool code which is not in req doc..?)
- INSTRUMENTATION INSERT: should this override INSTRUMENTATION OFF or be ignored in that state?
- Allowance for updating hit indexing in the database after initial write (without interfering with files not being updated/re-instrumented)
- In the ABC Tool UG, sec 2.1 ends with "the GNU linker needs the "-Map" argument". Are we using that in v7.x?
- Add comments in code to explain functional behavior (especially where it might be unclear or takes additional info)
Requirements
| Requirement | Description | Verification Plan | Notes |
|---|---|---|---|
| Requirement tag | Summary of requirement | Verification plan | |
| ABC_REQ_Entry_050 | Report procedure entry executed | 4.5 | |
| ABC_REQ_Entry_060 | Report procedure entry never executed | 4.5 | |
| ABC_REQ_Entry_070 | Report label code segment entered | 4.5 | |
| ABC_REQ_Entry_080 | Report label code segment never entered | 4.5 | |
| ABC_REQ_Branch_100 | Report jump taken | 4.1, 4.2.1.1 thru .3, 4.2.2.1 thru .2, 4.2.3.1 thru .2 | |
| ABC_REQ_Branch_110 | Report jump never taken | 4.1, 4.2.1.1 thru .3, 4.2.2.1 thru .2, 4.2.3.1 thru .2 | |
| ABC_REQ_Branch_120 | Report jump both taken and not taken | 4.1, 4.2.1.1 thru .3, 4.2.2.1 thru .2, 4.2.3.1 thru .2 | |
| ABC_REQ_Branch_130 | Report jump condition never evaluated | 4.1, 4.2.1.1 thru .3, 4.2.2.1 thru .2, 4.2.3.1 thru .2 | |
| ABC_REQ_Branch_140 | Cope with PPC/ARM/MIPS PIC setup idiom | 4.2.2.4 | |
| ABC_REQ_Branch_150 | Cope with X86 PIC setup idiom | 4.2.1.5 | |
| ABC_REQ_Directive_160 | Handle INSTRUMENTATION ON/OFF | 4.4 | |
| ABC_REQ_Directive_170 | Handle INSTRUMENTATION INSERT | 4.4 | |
| ABC_REQ_Directive_175? | Handle INSTRUMENTATION PUSH/POP | ||
| ABC_REQ_Operation_180? | Report conditional operation executed | ||
| ABC_REQ_Operation_185? | Report conditional operation not executed | ||
| ABC_REQ_Operation_190? | Report conditional operation executed and not executed | ||
| ABC_REQ_Operation_195? | Report conditional operation never evaluated | ||
| ABC_REQ_Count_200 | Count points executed in module | 4.5 | |
| ABC_REQ_Count_210 | Count points in module | 4.5 | |
| ABC_REQ_Count_220 | Count points deemed unreachable in module | 4.5 | |
| ABC_REQ_Count_300 | Highlight jumps never taken | 4.1, 4.2.1.1 thru .3, 4.2.2.1, 4.2.3.1 thru .2 | |
| ABC_REQ_Count_310 | Highlight jumps never fell thru | 4.1, 4.2.1.1 thru .3, 4.2.2.1, 4.2.3.1 thru .2 | |
| ABC_REQ_Count_320 | Flag jumped and fell thru | 4.1, 4.2.1.1 thru .3, 4.2.2.1, 4.2.3.1 thru .2 | |
| ABC_REQ_Count_330 | Highlight jumps never executed | 4.1, 4.2.1.1 thru .3, 4.2.2.1, 4.2.3.1 thru .2 | |
| ABC_REQ_Uninst_400 | Warn file present not instrumented | 4.3 | |
| ABC_REQ_Uninst_410 | Warn file instrumented not present | 4.3 | |
| ABC_REQ_Uninst_420 | Warn file instrumented, other version present | 4.3 |
Missing requirements (need to check if they are referenced in the User Guide):
- Conditional instructions
- INSTRUMENTATION PUSH/POP
- Instrumentation of unconditional branches (to indicate end of instruction basic blocks executed for reports?)
- Behavior in 6.x (Perl): replaced ".syntax divided" with ".syntax unified" in ARM processing to allow instrumented insertions to compile. Where is this documented with justification?
TO DO
- Continue report coverage and justification notes handling cleanup and improvements.
- Address cases where added instrumentation breaks code relying on values derived from memory offset calculations (e.g. .byte .L3-.Lext0)
- This may be related to compiler generated jump table lookup use where forcing the compiler to use branches does not cause instrumented code to break on compile.
- Finish updating canonical instrumented code files.
- Get testsuite executing and reporting. Update all canonical files (object files, reports)
- Process full test suite as part of the build (not currently in the make system)
- Finish full cleanup and updates for Qualification Data, User Guide, test-abc document, abc example code and related files (make the example work in kismet)
- Clean up the python lint warnings
- Make names and ordering/layout (functions, enumerations, etc) consistent across ARM, AARCH64, PPC, and X86_64 specific files
- Make justification replacements editable from the coverage notes html page using javascript.
- Add notes in UG referencing making sure only one instance of desk-web-server is running, and how to shut down desk-web-server.
- AL: Such documentation seems more appropriate for the desk-web-server documentation than ABC.
Team Suggestions and Feedback
- Lisa/Kenney:
report coverage tool used to end with 'reportCoverage DONE' that OpenArbor automated test relied on to indicate the test is done. This is not working yet in abc-tool 7.x.- It would be better to have it report PASSED/FAILED rather than done when re-implemented.
- Lisa/MarkS: errors compiling instrumented arinc653 partition and math library code -- coprocessor out of range error, probably a branch to label far call fail due to added instrumentation code in long functions interfering with compiler calculated safe distance for text access.
- Discussion ongoing with Ron and Ryan to resolve similar issue where compiler optimization creates a jump table lookup instead of using branching. If the the code or compiler flag is changed, the instrumentation does not interfere.
- Adina: make sure report justification annotations are preserved. Add support to keep (or re-place) justifications after clean build if the index did not change or if the change can be used to remap justifications?
Verf Team Feedback
Issue List:
1. Combined reportCoverage Error -- addressed in abc-tool-7.1.0-16
- ABC Version: 7.1.0-15
- Component Name: GNU Language
- Details:
- We ran instrumented versions of the software on a qemu-ppc and a T2080rdb board. When coverage was being determined on the T2080rdb board, we get the error and traceback as shown below.
- Commands to reproduce this issue:
common/test-utils/regress -q gcc-so so qemu-ppc build local run release instrumented instrumented_optimized export DESK_IP_ADDR_t2080rdb=10.0.1.87 common/test-utils/regress -q gcc-so so t2080rdb build local run release instrumented instrumented_optimized
Traceback (most recent call last):
File "/desk/bin/abc", line 85, in <module>
main()
File "/desk/bin/abc", line 81, in main
args.entrypoint(args)
File "/desk/lib/python3/abcov/cmd/report/main.py", line 30, in main
coverage_pathnames = collect_coverage_log_pathnames(args.hitmap_location)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/desk/lib/python3/abcov/hitmap.py", line 61, in collect_coverage_log_pathnames
return [f.absolute() for f in coverage_files]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: collect_coverage_log_pathnames.<locals>.<lambda>() missing 2 required positional arguments: '_dir' and 'file'
- There was an error in the code for handling an input hitmap directory rather than single file.
- This occurred as a result of a call to abc report from run_tests.sh to combine hitmap results from multiple targets into a single report.
- This will be fixed in the -16 unrelease.
- Dev testing is still needed to confirm the hitmaps are actually combined in the report rather than sequentially replaced.
2. Edit capability missing from coverage justification -- addressed in abc-tool-7.1.0-16
- ABC Version: 7.1.0-15
- Component Name: GNU Language
- Details:
- Run the tests on qemu-arm for instrumented software
- Launch the desk-web-server from the /mainline folder:
desk-web-server ./ & - Next, navigate to the coverage report for qemu-arm/instrumented, and then select the "see notes" link for a structural coverage hole.
- There is no option to modify/edit the justification file.
- This appears to be an issue occurring when multiple instances of desk-web-server are running in the same container.
3. Improve the comment block at the top of the justification files -- addressed in abc-tool-7.1.0-16
- When a justification file is generated by a user (via the coverage tool), it contains a comment block at the top of the justification file (justification.js). The information within the comment block (e.g. the justification replacement info) should be moved to the UG.
- A new comment should exist at the top of the justification.js file that has the following:
// Refer to the ABC Tool User Guide "Editing justifications.js" for information on how to create and modify this file.
- It is a bad idea to include section numbers in referencing documentation. You can provide a URL fragment abc-tool-ug.htm#sect-mumble, or use the title.
5. Qemu-arm instrumented_optimized Tests Will Not Run -- addressed in abc-tool-7.1.0-18
- ABC Version: 7.1.0-17
- Component Name: cffsapi653p2
- Details:
- Running the tests on the instrumented_optimized software using the qemu-arm will result in an exception and the test infrastructure will eventually time out
- Command
common/test-utils/regress -q cffsapi653p2 so qemu-arm build local run instrumented_optimized tp0001
- This was due to mishandling of the compiler's optimized jump table insertion. The instrumentor misinterpreted the table as dead code and mangled it. Jump table construct handling has been added to the instrumentation code for arm.
Status
Working on:
Making sure all mnemonics (opcodes) from technical documentation for each architecture is captured in the lark grammar file for the architecture.- Separate them into unconditional and conditional sets, setting up for the rules to handle all conditional statement forms.
- I am using a text file with all mnemonics for each architecture. Within each architecture, mnemonics can be designated as conditional by placing a * at the start of the line.
- Getting hitmap working: in memory, clearing and collecting, confirming report generation works.
- It appears the Clear Hitmap and Gather Hitmap in OpenArbor do NOT use the abc clear-hitmap or abc collect-bitmap, but some other code which does not support the 4 byte signature now in place.
- After a bit of work, ftp clear and collect hitmap memory via abc tooling is working.
- Report generation looks good for hello-world after some work. Still need to check multiple instrumented files and justification handling in the reports (that's up next)
Instrumentation of procedure entries specifically (was generically part of label block entries, but separate explicit requirement) is now implemented.
| Task | Requirement | Implemented | Instrumentation Tested | Report Working | Notes |
|---|---|---|---|---|---|
| entry point detection | ABC_REQ_Entry_050 ABC_REQ_Entry_060 ABC_REQ_Entry_070 ABC_REQ_Entry_080 |
Yes | Done | Done | |
| conditional branches | ABC_REQ_Branch_100 ABC_REQ_Branch_110 ABC_REQ_Branch_120 ABC_REQ_Branch_130 |
Yes | Done | Done | |
| position-independent relocation | ABC_REQ_Branch_140 ABC_REQ_Branch_150 |
Yes | In Work | Pending | Investigating if working correctly |
| conditional instructions | Yes | Done | Done | ||
| INSTRUMENTATION OFF/ON | ABC_REQ_Directive_160 | Done-ish | In Work | Pending | initial testing looks good |
| INSTRUMENTATION INSERT | ABC_REQ_Directive_170 | Done-ish | In Work | Pending | detection and instrumentation working |
| unreachable (dead) code | ABC_REQ_Count_220 | Done-ish | In Work | Pending | Detection working, not clear the code is marking or instrumenting dead code, need to check reporting also working correctly |
| unconditional branches | ABC_REQ_Branch_100 | Done | Done | Done | |
| (ARM) pop pc branching | ABC_REQ_Branch_100 | Done | Done | Done | |
| INSTRUMENTATION PUSH/POP | In Work | In Work | Pending | Behavior not checked/confirmed yet in 7.x tool | |
| (ARM) mov/ldr/arithmetic pc-relative addressing | Done-ish | Done-ish | Pending | Does not appear to work yet, investigating | |
| (ARM) load multiple registers pc-relative addressing | Done-ish | Done-ish | Pending | Not thoroughly checked yet | |
| iterative updates of CAN instrumented files | In Work | In Work | Pending | Updates to CAN files to match current instrumentation where cosmetic or carefully confirmed as correct in the new version | |
| (ARM) bl 1b -- subroutine call to nearest preceding label "1:" | Done | Done | Pending | Need to check report representation |
Below: Succeeded indicates that
- instrumentation of the test was completed and a (html) diff was generated for arm and ppc
- an instrumentation of the test was created (as well as an html diff pre/post instrumentation assembly),the instrumented version compiled to object code successfully and objdump-ed without errors for aarch64 and x86_64.
Succeeded does not indicate all instrumentation is working or is exactly as the Perl tool version produced.
Correctness of instrumentation as being the same as the CAN files content will be checked once CAN files matching the current approach (layout, labeling, etc) are ready.
Succeeded:
output-tests/can-compare/inst_abcexpr1-arm-diff.html
output-tests/can-compare/inst_abcexpr1-arm.dis
output-tests/can-compare/inst_abcexpr1-arm-diff-can.html
output-tests/can-compare/inst_abcexpr2-arm-diff.html
output-tests/can-compare/inst_abcexpr2-arm.dis
output-tests/can-compare/inst_abcexpr2-arm-diff-can.html
output-tests/can-compare/inst_abcexpr3-arm-diff.html
output-tests/can-compare/inst_abcexpr3-arm.dis
output-tests/can-compare/inst_abcexpr3-arm-diff-can.html
output-tests/can-compare/inst_abcexpr4-arm-diff.html
output-tests/can-compare/inst_abcexpr4-arm.dis
output-tests/can-compare/inst_abcexpr4-arm-diff-can.html
output-tests/can-compare/inst_abcexpr5-arm-diff.html
output-tests/can-compare/inst_abcexpr5-arm.dis
output-tests/can-compare/inst_abcexpr5-arm-diff-can.html
output-tests/can-compare/inst_abcexpr6-arm-diff.html
output-tests/can-compare/inst_abcexpr6-arm.dis
output-tests/can-compare/inst_abcexpr6-arm-diff-can.html
output-tests/can-compare/inst_abcexpr7-arm-diff.html
output-tests/can-compare/inst_abcexpr7-arm.dis
output-tests/can-compare/inst_abcexpr7-arm-diff-can.html
output-tests/can-compare/inst_abcpic-arm-diff.html
output-tests/can-compare/inst_abcpic-arm.dis
output-tests/can-compare/inst_abcpic-arm-diff-can.html
output-tests/can-compare/inst_abctest-arm-diff.html
output-tests/can-compare/inst_abctest-arm.dis
output-tests/can-compare/inst_abctest-arm-diff-can.html
output-tests/can-compare/inst_asm_br_opcode-arm-diff.html
output-tests/can-compare/inst_asm_br_opcode-arm.dis
output-tests/can-compare/inst_asm_br_opcode-arm-diff-can.html
output-tests/can-compare/inst_asm_conditional-arm-diff.html
output-tests/can-compare/inst_asm_conditional-arm.dis
output-tests/can-compare/inst_asm_conditional-arm-diff-can.html
output-tests/can-compare/inst_asm_driver-arm-diff.html
output-tests/can-compare/inst_asm_driver-arm.dis
output-tests/can-compare/inst_asm_driver-arm-diff-can.html
output-tests/can-compare/inst_asm_fp_conditional-arm-diff.html
output-tests/can-compare/inst_asm_fp_conditional-arm.dis
output-tests/can-compare/inst_asm_fp_conditional-arm-diff-can.html
output-tests/can-compare/inst_asm_ub_opcodes-arm-diff.html
output-tests/can-compare/inst_asm_ub_opcodes-arm.dis
output-tests/can-compare/inst_asm_ub_opcodes-arm-diff-can.html
output-tests/can-compare/inst_instonly_arm_conditionals-arm-diff.html
output-tests/can-compare/inst_instonly_arm_conditionals-arm.dis
output-tests/can-compare/inst_instonly_arm_conditionals-arm-diff-can.html
output-tests/can-compare/inst_instonly_asm_pc_unsupported-arm-diff.html
output-tests/can-compare/inst_instonly_asm_pc_unsupported-arm.dis
output-tests/can-compare/inst_instonly_asm_pc_unsupported-arm-diff-can.html
output-tests/can-compare/inst_instrButUninstrPres-arm-diff.html
output-tests/can-compare/inst_instrButUninstrPres-arm.dis
output-tests/can-compare/inst_instrButUninstrPres-arm-diff-can.html
output-tests/can-compare/inst_instrNotPres-arm-diff.html
output-tests/can-compare/inst_instrNotPres-arm.dis
output-tests/can-compare/inst_instrNotPres-arm-diff-can.html
output-tests/can-compare/inst_testInstrumDirectivesActive-arm-diff.html
output-tests/can-compare/inst_testInstrumDirectivesActive-arm.dis
output-tests/can-compare/inst_testInstrumDirectivesActive-arm-diff-can.html
output-tests/can-compare/inst_testInstrumDirectivesInactive-arm-diff.html
output-tests/can-compare/inst_testInstrumDirectivesInactive-arm.dis
output-tests/can-compare/inst_testInstrumDirectivesInactive-arm-diff-can.html
output-tests/can-compare/inst_abcexpr1-ppc-diff.html
output-tests/can-compare/inst_abcexpr1-ppc.dis
output-tests/can-compare/inst_abcexpr1-ppc-diff-can.html
output-tests/can-compare/inst_abcexpr2-ppc-diff.html
output-tests/can-compare/inst_abcexpr2-ppc.dis
output-tests/can-compare/inst_abcexpr2-ppc-diff-can.html
output-tests/can-compare/inst_abcexpr3-ppc-diff.html
output-tests/can-compare/inst_abcexpr3-ppc.dis
output-tests/can-compare/inst_abcexpr3-ppc-diff-can.html
output-tests/can-compare/inst_abcexpr4-ppc-diff.html
output-tests/can-compare/inst_abcexpr4-ppc.dis
output-tests/can-compare/inst_abcexpr4-ppc-diff-can.html
output-tests/can-compare/inst_abcexpr5-ppc-diff.html
output-tests/can-compare/inst_abcexpr5-ppc.dis
output-tests/can-compare/inst_abcexpr5-ppc-diff-can.html
output-tests/can-compare/inst_abcexpr6-ppc-diff.html
output-tests/can-compare/inst_abcexpr6-ppc.dis
output-tests/can-compare/inst_abcexpr6-ppc-diff-can.html
output-tests/can-compare/inst_abcexpr7-ppc-diff.html
output-tests/can-compare/inst_abcexpr7-ppc.dis
output-tests/can-compare/inst_abcexpr7-ppc-diff-can.html
output-tests/can-compare/inst_abcpic-ppc-diff.html
output-tests/can-compare/inst_abcpic-ppc.dis
output-tests/can-compare/inst_abcpic-ppc-diff-can.html
output-tests/can-compare/inst_abctest-ppc-diff.html
output-tests/can-compare/inst_abctest-ppc.dis
output-tests/can-compare/inst_abctest-ppc-diff-can.html
output-tests/can-compare/inst_asm_ctr_opcode-ppc-diff.html
output-tests/can-compare/inst_asm_ctr_opcode-ppc.dis
output-tests/can-compare/inst_asm_ctr_opcode-ppc-diff-can.html
output-tests/can-compare/inst_asm_driver-ppc-diff.html
output-tests/can-compare/inst_asm_driver-ppc.dis
output-tests/can-compare/inst_asm_driver-ppc-diff-can.html
output-tests/can-compare/inst_asm_lr_opcode-ppc-diff.html
output-tests/can-compare/inst_asm_lr_opcode-ppc.dis
output-tests/can-compare/inst_asm_lr_opcode-ppc-diff-can.html
output-tests/can-compare/inst_asm_std_opcode-ppc-diff.html
output-tests/can-compare/inst_asm_std_opcode-ppc.dis
output-tests/can-compare/inst_asm_std_opcode-ppc-diff-can.html
output-tests/can-compare/inst_asm_std_opcode_pm-ppc-diff.html
output-tests/can-compare/inst_asm_std_opcode_pm-ppc.dis
output-tests/can-compare/inst_asm_std_opcode_pm-ppc-diff-can.html
output-tests/can-compare/inst_instrButUninstrPres-ppc-diff.html
output-tests/can-compare/inst_instrButUninstrPres-ppc.dis
output-tests/can-compare/inst_instrButUninstrPres-ppc-diff-can.html
output-tests/can-compare/inst_instrNotPres-ppc-diff.html
output-tests/can-compare/inst_instrNotPres-ppc.dis
output-tests/can-compare/inst_instrNotPres-ppc-diff-can.html
output-tests/can-compare/inst_testInstrumDirectivesActive-ppc-diff.html
output-tests/can-compare/inst_testInstrumDirectivesActive-ppc.dis
output-tests/can-compare/inst_testInstrumDirectivesActive-ppc-diff-can.html
output-tests/can-compare/inst_testInstrumDirectivesInactive-ppc-diff.html
output-tests/can-compare/inst_testInstrumDirectivesInactive-ppc.dis
output-tests/can-compare/inst_testInstrumDirectivesInactive-ppc-diff-can.html
Failed:
None
Builds from c/cpp tests for all architectures:
Succeeded:
output-tests/inst_abcexpr1-arm.dis
output-tests/inst_abcexpr2-arm.dis
output-tests/inst_abcexpr3-arm.dis
output-tests/inst_abcexpr4-arm.dis
output-tests/inst_abcexpr5-arm.dis
output-tests/inst_abcexpr6-arm.dis
output-tests/inst_abcexpr7-arm.dis
output-tests/inst_abcpic-arm.dis
output-tests/inst_abctest-arm.dis
output-tests/inst_clearmap-arm.dis
output-tests/inst_instrButUninstrPres-arm.dis
output-tests/inst_instrNotPres-arm.dis
output-tests/inst_testInstrumDirectivesActive-arm.dis
output-tests/inst_testInstrumDirectivesInactive-arm.dis
output-tests/inst_uninstrPres-arm.dis
output-tests/inst_asm_ctr_opcode-ppc.dis
output-tests/inst_asm_driver-ppc.dis
output-tests/inst_asm_lr_opcode-ppc.dis
output-tests/inst_asm_std_opcode-ppc.dis
output-tests/inst_asm_std_opcode_pm-ppc.dis
output-tests/inst_abcexpr1-ppc.dis
output-tests/inst_abcexpr2-ppc.dis
output-tests/inst_abcexpr3-ppc.dis
output-tests/inst_abcexpr4-ppc.dis
output-tests/inst_abcexpr5-ppc.dis
output-tests/inst_abcexpr6-ppc.dis
output-tests/inst_abcexpr7-ppc.dis
output-tests/inst_abcpic-ppc.dis
output-tests/inst_abctest-ppc.dis
output-tests/inst_clearmap-ppc.dis
output-tests/inst_instrButUninstrPres-ppc.dis
output-tests/inst_instrNotPres-ppc.dis
output-tests/inst_testInstrumDirectivesActive-ppc.dis
output-tests/inst_testInstrumDirectivesInactive-ppc.dis
output-tests/inst_uninstrPres-ppc.dis
output-tests/inst_abcexpr1-aarch64.dis
output-tests/inst_abcexpr2-aarch64.dis
output-tests/inst_abcexpr3-aarch64.dis
output-tests/inst_abcexpr4-aarch64.dis
output-tests/inst_abcexpr5-aarch64.dis
output-tests/inst_abcexpr6-aarch64.dis
output-tests/inst_abcexpr7-aarch64.dis
output-tests/inst_abcpic-aarch64.dis
output-tests/inst_abctest-aarch64.dis
output-tests/inst_clearmap-aarch64.dis
output-tests/inst_instrButUninstrPres-aarch64.dis
output-tests/inst_instrNotPres-aarch64.dis
output-tests/inst_testInstrumDirectivesActive-aarch64.dis
output-tests/inst_testInstrumDirectivesInactive-aarch64.dis
output-tests/inst_uninstrPres-aarch64.dis
output-tests/inst_exerciseIntN-mc-x86_64.dis
output-tests/inst_exerciseIntN-x86_64.dis
output-tests/inst_stimulateGccX86Pic1-mc-x86_64.dis
output-tests/inst_stimulateGccX86Pic1-x86_64.dis
output-tests/inst_stimulateGccX86Pic2-mc-x86_64.dis
output-tests/inst_stimulateGccX86Pic2-x86_64.dis
output-tests/inst_x86SpecificTests-x86_64.dis
output-tests/inst_abcexpr1-x86_64.dis
output-tests/inst_abcexpr2-x86_64.dis
output-tests/inst_abcexpr3-x86_64.dis
output-tests/inst_abcexpr4-x86_64.dis
output-tests/inst_abcexpr5-x86_64.dis
output-tests/inst_abcexpr6-x86_64.dis
output-tests/inst_abcexpr7-x86_64.dis
output-tests/inst_abcpic-x86_64.dis
output-tests/inst_abctest-x86_64.dis
output-tests/inst_clearmap-x86_64.dis
output-tests/inst_instrButUninstrPres-x86_64.dis
output-tests/inst_instrNotPres-x86_64.dis
output-tests/inst_testInstrumDirectivesActive-x86_64.dis
output-tests/inst_testInstrumDirectivesInactive-x86_64.dis
output-tests/inst_uninstrPres-x86_64.dis
Failed:
None
In source code comments TODO List
Last captured Tuesday, July 29, 2025
Code
$ grep -rns TODO: code
code/abc.py:18:# This one should be already in my path but for some reason it is not, TODO: inquire Aaron later
code/abc.py:21:# This one is not here either? TODO: Fix this
code/report/fsm.py:87: # print(f'transition_state: {transition_state}, {self.value} -> {event.value}', flush=True) # TODO: PZ: debug print
code/report/fsm.py:175: # TODO: PZ: Is this handling all legitimate possible multi-instrumentations for a given line?
code/report/devenv.py:22: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/report/devenv.py:165: print(f'linkmap path:{str(self.mapfile_path)}, linker_map: {self.linker_map}', flush=True) # TODO: PZ: debug print
code/report/templates/summary.html:25: {# TODO: Throw this table away in favor of something that is not wack #}
code/report/report.py:1:# TODO: PZ: Refactor this class to not need disabling pylint warning
code/report/report.py:26:# TODO: PZ: label pattern filtering is disabled below, remove this in cleanup?
code/report/report.py:161: # print(f'hits={num_hits}, points={num_points}, misses={num_misses}, discarded={num_discarded}, dead={num_dead}, percent={coverage_percentage}', flush=True) # TODO: PZ: debug print
code/report/report.py:187: TODO: A lot of this boils down to me bending the knee to legacy abcJavascriptUtils
code/report/report.py:195: # TODO: This code made the assumption that there was only one hitpoint per assembly
code/report/report.py:274: print(f'arch={self.selected_arch}, file: {self.source_filename}', flush=True) # TODO: PZ: debug print
code/report/report.py:275: print(f'Exception: {e}', flush=True) # TODO: PZ: debug print
code/report/report.py:322: print(f' {curr_function}, {str(self.linkonce_functions[curr_function])[:-2] + '.s_'} != {self.assembly_filename}', flush=True) # TODO: PZ: debug print
code/report/report.py:425: # TODO: PZ: Note: .cfi_start_proc is handled as a label, not a directive
code/report/report.py:426: if True: # TODO: PZ: get feedback on label filtering: was: INCLUDED_LABEL_PAT.match(tree_node.children[0].value):
code/report/report.py:491: # total_points = self.index.num_points # TODO: PZ: original code has much larger number, why?
code/report/report.py:498: # print(f'TOTALS: hits={total_hits}, points={total_points}, misses={total_misses}, discarded={total_discarded}, dead={total_dead}, percent={total_coverage}, num_points={self.index.num_points}', flush=True) # TODO: PZ: debug print
code/report/report.py:595: # print(f'Cannot open file: {dwarf_path}', flush=True) # TODO: PZ: indicate finding file names like <built-in>
code/report/report.py:615: # print(f'filename: {filename}, is_in_linkmap: {is_in_linkmap}', flush=True) # TODO: PZ: debug print
code/report/report.py:689: # print(f'report mapfile_path: {self.mapfile_path}', flush=True) # TODO: PZ: debug
code/instrument/GNUPowerPC.py:1:# TODO: PZ Find a better way to avoid lint errors for the generated itpl members (from file names).
code/instrument/GNUPowerPC.py:2:# TODO: PZ: Refactor this class to not need disabling pylint warning
code/instrument/GNUPowerPC.py:76: # TODO: PZ repeat something like uninstrumented above for unreachable code annotation?
code/instrument/GNUPowerPC.py:284: # print(f'cond_branch_taken_not_taken_shorthand bi={point.bi}', flush=True) # TODO: PZ: debug print
code/instrument/GNUPowerPC.py:388: # print(f'instrument cond_sub_call_ret: \n\toriginal_seq={original_seq}; point={point}', flush=True) # TODO: PZ: debug print
code/instrument/__init__.py:32: # TODO: PZ: cleanup from: indentation = ilen(takewhile(lambda c: c.isspace(), line))
code/instrument/__init__.py:60: # hitbase = 0 # TODO: PZ: modify hitbase to match file offset, originally was: len(index)
code/instrument/__init__.py:64: hitbase = len(index) # TODO: PZ: restructure hitbase tracking, maybe offset in file entry and hit index 0-end per file points
code/instrument/__init__.py:79: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/instrument/GNUARM.py:1:# TODO: PZ Find a better way to avoid lint errors for the generated itpl members (from file names).
code/instrument/GNUARM.py:2:# TODO: PZ: Refactor this class to not need disabling pylint warning
code/instrument/GNUARM.py:38: # print('indent not defined, using 4 spaces by default') # TODO: PZ: debug print
code/instrument/GNUARM.py:76: # TODO: PZ repeat something like uninstrumented above for unreachable code annotation?
code/instrument/GNUARM.py:590: # print('instrumented all points') # TODO: PZ debug print
code/instrument/GNUAArch64.py:1:# TODO: PZ Find a better way to avoid lint errors for the generated itpl members (from file names).
code/instrument/GNUAArch64.py:2:# TODO: PZ: Refactor this class to not need disabling pylint warning
code/instrument/GNUAArch64.py:37: # if indent: # TODO: PZ: in configure_indentation really needed?
code/instrument/GNUx8664.py:1:# TODO: PZ Find a better way to avoid lint errors for the generated itpl members (from file names).
code/instrument/GNUx8664.py:2:# TODO: PZ: Refactor this class to not need disabling pylint warning
code/transform/GNUPowerPC.py:149: print(f'no string match for {self}', flush=True) # TODO: PZ: debug print
code/transform/GNUPowerPC.py:175: # print(f'program: implicit_uncond_subroutine_call node: {node}', flush=True) # TODO: PZ: debug print
code/transform/GNUPowerPC.py:214: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/transform/GNUPowerPC.py:295: # print(f'cond_branch_thru_reg: {children}', flush=True) # TODO: PZ: debug print
code/transform/GNUPowerPC.py:307: # print('cond_branch_shorthand: ', meta, children) # TODO: PZ: debug print
code/transform/GNUPowerPC.py:329: # print(f'cond_branch_thru_reg_shorthand: {meta}, {opcode}, {bi}', flush=True) # TODO: PZ: debug print
code/transform/GNUPowerPC.py:332: # print(f' using: reg_suffix={reg_suffix}, cc_suffix={cc_suffix}', flush=True) # TODO: PZ: debug print
code/transform/GNUPowerPC.py:434: # print(f'cond_subroutine_call_thru_reg_shorthand: meta.line={meta.line}, opcode={opcode}, bi={bi}, reg_suffix={reg_suffix}, cc_suffix={cc_suffix}', flush=True) # TODO: PZ: debug print
code/transform/GNUPowerPC.py:450: # print(f'cond_subroutine_call_thru_reg_shorthand_no_cr: meta.line={meta.line}, opcode={opcode}, reg_suffix={reg_suffix}, cc_suffix={cc_suffix}', flush=True) # TODO: PZ: debug print
code/transform/GNUPowerPC.py:505: # print('implicit_cond_branch_thru_reg: ', meta.line, children, flush=True) # TODO: PZ: debug print
code/transform/GNUPowerPC.py:506: cc_suffix='eq' # TODO: PZ: use a match to process bo, bi input for conditional suffix
code/transform/GNUPowerPC.py:507: # print(' using cc_suffix="eq"', flush=True) # TODO: PZ: debug print
code/transform/GNUPowerPC.py:520: # print('implicit_uncond_subroutine_call: ', meta, children) # TODO: PZ: debug print
code/transform/GNUPowerPC.py:531: # print('implicit_uncond_branch_thru_reg: ', meta, children, flush=True) # TODO: PZ: debug print
code/transform/__init__.py:3:# TODO: PZ: Refactor this class to not need disabling pylint warning
code/transform/virtual.py:43: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/transform/virtual.py:63: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/transform/virtual.py:89: # TODO: PZ If this works, clarify if it should work inside INSTRUMENTATION OFF or not
code/transform/virtual.py:99: # TODO: PZ figure out why abc__insert does not convert to an AsmPoint so this screen can be removed
code/transform/virtual.py:107: # file_tablenums.sort() # TODO: PZ: sorting here was producing the wrong base source code listing for reports?
code/transform/virtual.py:143: #print(f'virtual.py:gas__dwarf5_line: {children}') # TODO: PZ: debug print
code/transform/virtual.py:151: # TODO: Lexer bug somehow does not separate these operands
code/transform/virtual.py:258: # TODO: PZ remove debug prints once this is working
code/transform/virtual.py:259: # print('abc insert called') # TODO: PZ: debug print
code/transform/virtual.py:260: # print(f'{[n for n in children]}') # TODO: PZ: debug print
code/transform/GNUARM.py:87: # TODO: It seems like "parallel" and "reverse" here are the wrong terms. Perhaps complement? Inverse?
code/transform/GNUARM.py:207: # print(f'to_review: {dest}, {subtree.data}') # TODO: PZ: debug print
code/transform/GNUARM.py:211: # print(f'cond_pop_stack: pc in {dest}') # TODO: PZ: debug print
code/transform/GNUARM.py:275: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/transform/GNUARM.py:408: #print(f'modify_pc: {children}') # TODO: PZ: debug print
code/transform/GNUARM.py:420: #print(f'modify_pc_cond: {children}') # TODO: PZ: debug print
code/transform/GNUARM.py:434: # print(f'cond_load_register: {opcode}, {operands}', flush=True) # TODO: PZ: debug print
code/transform/GNUARM.py:436: return Discard # TODO: PZ: confirm this is correct. Should it process as load_register if pc in the mix?
code/transform/GNUARM.py:486: # print(f'cond_load_float: {opcode}, {operands}', flush=True) # TODO: PZ: debug print
code/transform/GNUARM.py:492: return Discard # TODO: PZ: confirm this is correct. Should it process as load_float?
code/transform/GNUARM.py:542: return Discard # TODO: PZ: confirm this is correct. Should it process as load_multiple_registers?
code/transform/GNUARM.py:576: return Discard # TODO: PZ: confirm this is correct. Should it process as pop_stack if pc in the mix?
code/transform/GNUARM.py:589: return Discard # TODO: PZ: confirm this is correct. Should it process as pop_stack_return if pc in the mix?
code/transform/GNUARM.py:601: # print(f'zero_state_cond_branch: {opcode}, {operands}', flush=True) # TODO: PZ: debug print
code/transform/GNUARM.py:603: return Discard # TODO: PZ: confirm this is correct. Should it process as something?
code/transform/GNUARM.py:626: # print(f'exchange_isa_cond_branch: {children}', flush=True) # TODO: PZ: debug print
code/transform/GNUARM.py:628: return Discard # TODO: PZ: confirm this is correct. Should it process as something?
code/transform/GNUARM.py:667: # print(f'cond_subroutine_call: {children}', flush=True) # TODO: PZ: debug print
code/transform/GNUARM.py:688: return Discard # TODO: PZ: confirm this is correct. Should it process as something?
code/transform/agnostic.py:55: # print(f'dead code detector: {node.pretty()}', flush=True) # TODO: PZ: debug print
code/transform/agnostic.py:60: # print(f'dead code detector: skipping {node.pretty().replace('\n',' ')}', flush=True) # TODO: PZ: debug print
code/transform/agnostic.py:114: # TODO: PZ Find a way to ignore debug labels in the filter here rather than below?
code/transform/agnostic.py:136: # TODO: PZ The labels handling below is used to ignore debug labels and fall through to
code/transform/agnostic.py:173: # TODO: PZ clean up this debug printing when it is no longer needed
code/transform/agnostic.py:179: # TODO: PZ: confirm the addition of label_consumed works and is needed after preventing exess empty pruning
code/transform/agnostic.py:182: # print('entrypoint') # TODO: PZ: debug printing
code/transform/agnostic.py:212: # TODO: PZ combine the segments below. Should handle one or more similarly.
code/transform/agnostic.py:223: # TODO: PZ This section fixed the intermittent unconditional branch instrumentation issue,
code/transform/agnostic.py:232: # TODO: PZ check for unreachable/dead code. What is done with these? Looking for report/instrumentation handlers
code/transform/agnostic.py:264: # TODO: PZ Is the AST image value added? It becomes unwieldy for larger programs. Remove this later.
code/transform/GNUAArch64.py:156: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/transform/GNUAArch64.py:205: # print(f'cond_branch: {children}') # TODO: PZ: debug print
code/transform/GNUAArch64.py:214: # print(f'cond_branch: {children[0][:2]}') # TODO: PZ: debug print
code/transform/GNUAArch64.py:226: # print(f'cond_branch: {children[0][:1]}') # TODO: PZ: debug print
code/transform/GNUx8664.py:137: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/index.py:181: fd = open(path, "r+") # TODO: PZ: Cleanup
code/index.py:185: fcntl.lockf(fd.fileno(), fcntl.LOCK_EX) # TODO: PZ: Do we actually need to lock this file access??
code/index.py:204: fcntl.lockf(index._fd.fileno(), fcntl.LOCK_UN) # TODO: PZ: Do we actually need to lock this file access??
code/index.py:207: #if fd: # TODO: PZ: try closing the file to write clean later
code/index.py:208: #fcntl.lockf(index._fd.fileno(), fcntl.LOCK_UN) # TODO: PZ: Do we actually need to lock this file access??
code/index.py:214: self._fd.seek(0) # TODO: PZ: This is problematic: if there are fewer points, the write leaves residual lines at the end that break the next read/use
code/index.py:218: #fcntl.lockf(fd.fileno(), fcntl.LOCK_EX) # TODO: PZ: Do we actually need to lock this file access??
code/index.py:230: fcntl.lockf(self._fd.fileno(), fcntl.LOCK_UN) # TODO: PZ: Do we actually need to lock this file access??
code/itpl/aarch64/zero_state_branch_tpt_ntpt.itpl:1:#// TODO: this can be substantially optimized similarly to bit_branch_tpt_ntpt.itpl
code/itpl/aarch64/conditional_branch_taken_not_taken.itpl:1:#// TODO: this can be substantially optimized similarly to bit_branch_tpt_ntpt.itpl
code/itpl/aarch64/conditional_executed_not_executed.itpl:1:#// TODO: this can be substantially optimized similarly to bit_branch_tpt_ntpt.itpl
code/itpl/arm/conditional_call_taken_not_taken_return_point.itpl:4:#// TODO: PZ: hitmap+ in hitpointAddress causes error in strb lines below
code/itpl/arm/tpt_ntpt.itpl:10:#// TODO: The syntax for following code doesn't look correct. If this was intended to be an IT
code/itpl/__init__.py:36: # TODO: PZ: Clean up outdated commented out lines
code/parsers/__init__.py:54: # TODO: PZ: Figure out best/safest cache approach across architectures to prevent cross-pollenization
code/parsers/grammars/GNUARM.lark:54: | load_register // TODO: PZ Must be in conditional rule set to get processed
code/parsers/grammars/GNUARM.lark:113:// TODO: PZ Should pc_arithmetic be changed to the following?
code/parsers/grammars/GNUARM.lark:146:// TODO: PZ: Ideally, the grammar should detect if pc is in the list or not and allow separate rules,
code/parsers/grammars/GNUARM.lark:161:// TODO: PZ: Ideally, the grammar should detect local labels for "bl" which are numbers with a suffix of b(for most
code/parsers/grammars/GNUARM.lark:251:// TODO: Hacky, this needs to be its own parse tree pass to correct after parsing
code/parsers/grammars/GNUARM.lark:252:// TODO: PZ try removing "pc"i from here and move to pc_arithmetic rule above
code/parsers/grammars/gas.lark:228: // | ".macro"i // TODO: PZ: Can this be re-enabled?
code/parsers/grammars/gas.lark:293:// TODO: The above is very permissive, perhaps this?
code/parsers/grammars/gas.lark:306:// TODO: Floating point constants have some variance across different architectures,
code/parsers/grammars/GNUAArch64.lark:77:// TODO: PZ cond_invocation rule should be implemented in the aarch64 grammar
code/parsers/grammars/GNUAArch64.lark:115:// TODO: Identify PIC, PC-relative things
code/parsers/grammars/GNUAArch64.lark:119:// TODO: The /br$/i rather than "br"i is because "br" does not preclude there being other
code/parsers/grammars/GNUAArch64.lark:140:// TODO: PZ Why are the conditionals included here AND CC_SUFFIX?
code/parsers/grammars/GNUAArch64.lark:141:// TODO: PZ Remove?: COND_CONSISTENT_BRANCH_MNEMONIC.3 : /bc(?=(ne|eq|cc|cs|pl|mi|vc|vs|ls|hi|lt|ge|le|gt|nv|al))/i CC_SUFFIX
code/parsers/grammars/GNUAArch64.lark:168: | ".req"i // TODO: investigate register aliasing with name
code/parsers/grammars/GNUPowerPC.lark:190:// COND_BRANCH_MNEMONIC.2 : "bc"i "a"i? ("+" | "-")? // TODO: PZ: make sure this is obsolete
code/parsers/grammars/GNUx8664.lark:38:// TODO: PZ: missing | cond_invocation
code/parsers/grammars/GNUx8664.lark:73:// TODO: PZ: cond_invocation rule should be implemented in the x86_64 grammar
code/parsers/grammars/GNUx8664.lark:93:// TODO: PZ This should use LOOP_MNEMONIC instead of an identically defined CONDLOOP_MNEMONIC
code/parsers/grammars/GNUx8664.lark:94:// TODO: PZ Remove: loop_on_cond : CONDLOOP_MNEMONIC CC_SUFFIX x64_operand STMT_DELIM
code/parsers/grammars/GNUx8664.lark:130:// TODO: PZ There is no need for CONDLOOP_MNEMONIC when LOOP_MNEMONIC can be used in both rules above
code/parsers/grammars/GNUx8664.lark:131:// TODO: PZ Remove: CONDLOOP_MNEMONIC.2 : "loop"i
code/parsers/grammars/mnemonics_AARCH64.txt:473:-hvc // TODO: PZ Moved to exception token:
code/parsers/grammars/mnemonics_AARCH64.txt:1020:-smc // TODO: PZ Moved to exception token
code/parsers/grammars/abc.lark:8:// TODO: continuity definition seems incomplete below and incorrect in FOR_DEVELOPERS.md,
code/parsers/grammars/abc.lark:14:// TODO: PZ Cleanup above -- "optional" has been changed to "conditional" and moved to the continuity
code/parsers/grammars/abc.lark:17:// TODO: Should settle on branch vs jump and not always say both. I suggest branch.
code/parsers/grammars/abc.lark:52:// TODO: old and new ABC seem to instrument unconditional branches, but it is not clear why.
code/parsers/grammars/abc.lark:68: // subroutine or system calls. TODO: should have a note about common use in
code/hitmap.py:47: print(f'hitmap_location: {hitmap_location}, is_file={hitmap_location.is_file()}', flush=True) # TODO: PZ: debug print
code/hitmap.py:54: print(f'hitmap_location.walk(): {[n for n in hitmap_location.walk()]}', flush=True) # TODO: PZ: debug print
code/hitmap.py:141: print(f'collect_from_target: hitmap_size {hitmap_size}, hitmap_start {hex(hitmap_start_addr)}, ip_addr = {ip_addr}, hitmap_pathname = {hitmap_pathname}') # TODO: PZ: debug print
code/hitmap.py:178: print(f'clear_on_target: hitmap_size {hitmap_size}, hitmap_start {hex(hitmap_start_addr)}, ip_addr = {ip_addr}, hitmap_pathname = {hitmap_pathname}, crc = {hex(crc)}') # TODO: PZ: debug print
code/cmd/report/cli.py:11: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/cmd/instrument/cli.py:10: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/cmd/instrument/main.py:3:# TODO: PZ: Refactor this class to not need disabling pylint warning
code/cmd/instrument/main.py:212: # TODO: PZ: Need to document justification for this replacement
code/cmd/__init__.py:12: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/cmd/collect/cli.py:7: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/cmd/merge/cli.py:6: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/cmd/clear/cli.py:7: # TODO: PZ: Refactor this class to not need disabling pylint warning
code/makefile.mk:28:# TODO: move PYLINT_FILE to build-utils?
code/makefile.mk:30:# TODO: This supports relative sub-directories. I found that having the .list files in