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

Projects
None yet
1 participant
@kemenaran
Collaborator

kemenaran commented Sep 9, 2017

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.

kemenaran added some commits Sep 8, 2017

build: export all symbols
Exporting local symbols allow them to appear in the debugger.
src: convert `jp [hl]` to `jp hl`
This fix a warning in rgbds v0.3.2

@kemenaran kemenaran merged commit 91e25bd into mojobojo:master Sep 9, 2017

@kemenaran kemenaran deleted the kemenaran:improve-debug-symbols branch Sep 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment