Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45032 )
Change subject: src/arch/x86: Fix register accesses for x86_64 debugging ......................................................................
Patch Set 1:
(7 comments)
https://review.coreboot.org/c/coreboot/+/45032/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/45032/1//COMMIT_MSG@9 PS1, Line 9: filed filed, or filled?
https://review.coreboot.org/c/coreboot/+/45032/1//COMMIT_MSG@11 PS1, Line 11: compilation would fail : with x86_64 + debugging enabled. If some combination of settings results in a build failure when it shouldn't, it means it's not being build-tested. Please add a config file under configs/ to make sure it doesn't break again.
CB:43977 added an example config to build-test several options. Watch out for the filename, CB:43611 had to rename a file because Jenkins ignored it.
https://review.coreboot.org/c/coreboot/+/45032/1//COMMIT_MSG@9 PS1, Line 9: Code that interacts with GDB was accessing the eip and eflags filed in : the eregs struct. : Because those registers are rip and rflags in x86_64, compilation would fail : with x86_64 + debugging enabled. Please wrap lines at 72 characters.
https://review.coreboot.org/c/coreboot/+/45032/1//COMMIT_MSG@14 PS1, Line 14: compilation Does it work as intended, though?
https://review.coreboot.org/c/coreboot/+/45032/1//COMMIT_MSG@14 PS1, Line 14: accessing the fields with a macro IMHO, the macros are a bit of an eyesore. How about using inline functions that take in a `struct eregs` and return the register value?
https://review.coreboot.org/c/coreboot/+/45032/1//COMMIT_MSG@15 PS1, Line 15: expends expands
https://review.coreboot.org/c/coreboot/+/45032/1/src/arch/x86/exception.c File src/arch/x86/exception.c:
https://review.coreboot.org/c/coreboot/+/45032/1/src/arch/x86/exception.c@38... PS1, Line 382: uint32_t There's lots of assumptions about register sizes. Since `gdb_stub_registers` is an array of `uint32_t`, the following writes will truncate for x86_64.