Skip to content

Debugging and optimization #7

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

Open
davidmalcolm opened this issue May 21, 2024 · 0 comments
Open

Debugging and optimization #7

davidmalcolm opened this issue May 21, 2024 · 0 comments

Comments

@davidmalcolm
Copy link
Owner

Capturing this note here for now; should go on the debugging page:

Note that by default GCC is built with -O2 which lead to confusion in the debugger, where e.g. attempts to singlestep through the code fail, and it simply returns from the function you were hoping to debug. But if you cd into the "build/gcc" subfirectory and build there, it gets built without optimization. So it sometimes helps to rm some .o files that you plan to step through and rerun "make" (within build/gcc) to rebuild them without optimization.

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

1 participant