Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEAL assembly details #2870

Closed
barnjamin opened this issue Sep 10, 2021 · 2 comments
Closed

TEAL assembly details #2870

barnjamin opened this issue Sep 10, 2021 · 2 comments
Labels
new-feature-request Feature request that needs triage

Comments

@barnjamin
Copy link
Contributor

barnjamin commented Sep 10, 2021

Problem

When debugging a TEAL program, given an error message from a Application Call, there is no straightforward way to map the PC returned in the error message to the line of TEAL.

Solution

We could append the PC to each line during disassembly by default or given an appropriate flag.

Alternatively, during assembly, we could output a JSON file with these details and any other details about the program. Other details might include program cost or some details about Template Variables or hash of the contract.

Dependencies

Probably the assembler and maybe an ARC or spec addition?

@barnjamin barnjamin added the new-feature-request Feature request that needs triage label Sep 10, 2021
@barnjamin
Copy link
Contributor Author

This may be a reasonable place to put the ABI method descriptions as well

@barnjamin
Copy link
Contributor Author

It looks like the assembler already tracks the pc=>source line here https://github.com/algorand/go-algorand/blob/master/data/transactions/logic/assembler.go#L246

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature-request Feature request that needs triage
Projects
None yet
Development

No branches or pull requests

2 participants