Similar to the recent patch to arm's gdb stub in rS368414.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 35491 Build 32396: arc lint + arc unit
Event Timeline
Comment Actions
Can we lift the condition out and just have two switches? Not sure if that’s any better but it seems sort of ugly as is.
Comment Actions
Update to use two switch statements. This version fits vertically on a single screen, and more closely matches the formatting of gdb_cpu_setreg().
sys/amd64/amd64/gdb_machdep.c | ||
---|---|---|
103 | I think the two switch statements is fine. I think the style of the case bodies is perhaps atypical for FreeBSD though. Ah, I see it matches getreg. Oh well. Changing getreg to use the new constants might be a nice followup as well. |
sys/amd64/amd64/gdb_machdep.c | ||
---|---|---|
103 | Yeah, this is a bit of a weird construct with no ideal way to format it. With expanded case bodies the function becomes unreasonably long, so this is the best option, to my eye. I am planning on that follow-up to getreg(). |