Skip to content

arch: arm64: add GDB stub support - #117408

Open
chillihunter wants to merge 1 commit into
zephyrproject-rtos:mainfrom
chillihunter:dev_aarch64_gdbstub
Open

arch: arm64: add GDB stub support#117408
chillihunter wants to merge 1 commit into
zephyrproject-rtos:mainfrom
chillihunter:dev_aarch64_gdbstub

Conversation

@chillihunter

Copy link
Copy Markdown

AArch64 previously lacked CONFIG_GDBSTUB / ARCH_HAS_GDBSTUB, so the common debug/gdbstub subsystem could not be used on Cortex-A.

Add the architecture bits: register g/G packet layout matching GDB aarch64-tdep, exception entry from BRK and debug exceptions in switch.S (including GPRs not saved in arch_esf), and hardware breakpoints via DBGBVR/DBGBCR because W^X text cannot be patched for software breakpoints. Raise GDBSTUB_BUF_SZ for the larger g-packet.

@github-actions

Copy link
Copy Markdown

Hello @chillihunter, and thank you very much for your first Pull Request (PR) to the Zephyr Project!

All PRs must pass our Continuous Integration (CI) pipeline before merging. When the pipeline run for your PR completes, you are expected to investigate the results, fix any errors, and update your PR for a fresh round of review.

Since this is your first contribution, a project community member must manually approve your CI run (this helps us avoid abuse of our CI system). A bot should assign some reviewers who can start the run for you soon.

As a heads-up, you will probably have to update your PR to fix CI issues and address review feedback in order to get it ready for merge. Some key rules for updating your PR are:

  • do amend problematic commits on your computer and force push the fixed commits into your PR branch on GitHub
  • don't push new commits just to fix problems in existing PR commits (amend your commits instead)
  • don't close your PR and open an updated one unless reviewers specifically request it (force push to your branch instead)
  • do rebase your PR branch onto our main branch and force push to this PR to resolve merge conflicts
  • don't merge our main branch into your PR branch to fix merge conflicts

Also, see:

If you are stuck or need help, you can join us on Discord and ask questions; many community members try to help new contributors there 😊. Try to pick a Discord channel that is associated with the technical details of your request. If you're not sure, use the #general channel.

AArch64 previously lacked CONFIG_GDBSTUB / ARCH_HAS_GDBSTUB, so the
common debug/gdbstub subsystem could not be used on Cortex-A.

Add the architecture bits: register g/G packet layout matching GDB
aarch64-tdep, exception entry from BRK and debug exceptions in
switch.S (including GPRs not saved in arch_esf), and hardware
breakpoints via DBGBVR/DBGBCR because W^X text cannot be patched for
software breakpoints. Raise GDBSTUB_BUF_SZ for the larger g-packet.

Signed-off-by: Yuan Bian <bianyuan@kylinos.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Architectures area: ARM64 ARM (64-bit) Architecture

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants