Skip to content

Manage breakpoints with red-black tree #46

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

Merged
merged 1 commit into from
Sep 4, 2022
Merged

Manage breakpoints with red-black tree #46

merged 1 commit into from
Sep 4, 2022

Conversation

RinHizakura
Copy link
Collaborator

@RinHizakura RinHizakura commented Sep 2, 2022

This patch enables rv32emu to set more than one breakpoint (should be infinite if we assume our memory is always enough to
create a new tree node).

Note that it's still bad to query the PC address in every instruction step. This patch only aims to fix the limitation of the breakpoint number in a short time. We may make use of the emulator's trap mechanism to avoid frequently querying the RB tree

  1. Replace the instruction of the breakpoint's address with a breakpoint instruction
  2. Query the RB tree when the emulator hit the trap when executing such instruction

@jserv jserv changed the title Use red black tree to manage breakpoints Manage breakpoints with red-black tree Sep 2, 2022
This patch enables `rv32emu` to set more than one breakpoint
(should be infinite if we assume our memory is always enough to
create a new tree node).
@jserv jserv merged commit 94bb504 into sysprog21:master Sep 4, 2022
vestata pushed a commit to vestata/rv32emu that referenced this pull request Jan 24, 2025
Manage breakpoints with red-black tree
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.

2 participants