Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/gdb/fiber.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,9 @@ def _get_reg(name):
return int(value)
except gdb.error:
# Flag registers (x86 eflags, arm64 pstate) are TYPE_CODE_FLAGS, which
# int() rejects; the C-cast evaluator coerces them to an integer.
return int(gdb.parse_and_eval(f"(unsigned long)${name}"))
# int() rejects and a C-cast coerces only on some targets (it raises
# "Invalid cast" for arm64 pstate). Read the raw register bytes instead.
return int.from_bytes(value.bytes, "little")


def _set_reg(name, value):
Expand Down
Loading