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

Is there any way to relate the program counter to the line in the code? #16

Closed
SuperJMN opened this issue Nov 1, 2022 · 2 comments
Closed

Comments

@SuperJMN
Copy link

SuperJMN commented Nov 1, 2022

I mean, if Program Counter (PC) is 9, for example, is there any way to know which line of the generated assembly corresponds to it?

Thanks :)

@informedcitizenry
Copy link
Owner

informedcitizenry commented Nov 2, 2022

Have you looked at the --list and --verbose-asm? Example:

 dotnet 6502.net.dll mysource.s -o myprogram.bin --list mysource_list.s --verbose-asm

Let me know if that works. If your question is whether any object contains a reference from a specific line of source to generated code, not really.

@SuperJMN
Copy link
Author

SuperJMN commented Nov 5, 2022

Thanks! I've located the exact information I need to provide debug info (program counter to line).

I've updated my fork to provide such information in this commit:
SuperJMN@bb49876

I ignored the StatementListing because it's string formatted and doesn't provide the line number.

I had to come with a custom solution (DebugInfo).

I hope your code could provide this information in the future.
Thanks a lot!

@SuperJMN SuperJMN closed this as completed Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants