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

Export all labels to debug symbols #25

Merged
merged 2 commits into from
Sep 9, 2017

Conversation

kemenaran
Copy link
Collaborator

This PR enables the rgbasm -E option, which exports all labels to debug symbols, including unreferenced and local labels.

This allows us to see local labels in our debug tools. For instance, in the following code:

RenderLoop::
    ; Set DidRenderFrame
    ld   a, 1
    ldh  [hDidRenderFrame], a

.applyRegularScrollYOffset
    ; Compose the base offset and the screen shake offset
    ld   hl, wScreenShakeVertical
    ldh  a, [hBaseScrollY]
    add  a, [hl]

.setScrollY
    ld   [rSCY], a ; scrollY

The RenderLoop label (which is global) would be exported and visible in our debugger—but applyRegularScrollYOffset (which is a local label) wouldn't show.

Note about rgbds version

This option requires at least rgbds v0.2.5.

Exporting local symbols allow them to appear in the debugger.
This fix a warning in rgbds v0.3.2
@kemenaran kemenaran merged commit 91e25bd into zladx:master Sep 9, 2017
@kemenaran kemenaran deleted the improve-debug-symbols branch September 9, 2017 06:27
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

Successfully merging this pull request may close these issues.

1 participant