Revert "Fix gdb on OpenBSD/amd64 by:"

This reverts commit 065617a6a9.
This commit is contained in:
Kurt Miller
2026-07-06 16:38:41 -04:00
parent 6cc3631608
commit 319ab576d4

View File

@@ -19,7 +19,6 @@ import bisect
from dataclasses import dataclass
import re
from typing import Callable, Dict, List, Optional, Sequence, Set, Tuple, Union
import platform
import gdb
@@ -468,7 +467,7 @@ class RegisterDesc:
def get_register_descs(arch: gdb.Architecture, group: str = 'all') -> List[
Union[RegisterDesc, gdb.RegisterDescriptor]]:
if hasattr(arch, "registers") and platform.system() != "OpenBSD":
if hasattr(arch, "registers"):
try:
return list(arch.registers(group))
except ValueError: # No such group, or version too old
@@ -482,7 +481,7 @@ def get_register_descs(arch: gdb.Architecture, group: str = 'all') -> List[
regset = gdb.execute(
f"info registers", to_string=True).strip().split('\n')
for line in regset:
if not line.startswith(" ") and "<unavailable>" not in line:
if not line.startswith(" "):
tokens = line.strip().split()
descs.append(RegisterDesc(tokens[0]))
return descs