pyocd / pyocd/pyOCD

Thread/context code isn't coping with doubles

Open
#555 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backlog bug
Dominant language
Python
Stars
1.5k
Forks
560
Avg merge
1h 41m
Merged PRs (30d)
3

Description

The double<->single transformation is occurring in CortexM::xxx_core_registers_raw, effectively at the lowest level.

There is no corresponding handling in the various contexts used for RTOS awareness - if a double register is requested for a thread context, they're looking up the double register id in their offset table, not finding it, and passing it on to the parent context.

This is now more visible since #483, which makes the gdbserver rely on requesting doubles.

I can look at this, but would prefer to do so by incorporating it on top of #453 rather than doing something which would conflict.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the double-to-single handling in CortexM::xxx_core_registers_raw with the register lookup and offset behavior in the RTOS-aware thread contexts. Check how #453 and #483 affect this area; done means thread-context requests for double registers are handled consistently rather than passed to the parent context.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.