MCPcopy Create free account
hub / github.com/apache/arrow / byte_order

Function byte_order

cpp/gdb_arrow.py:100–112  ·  view source on GitHub ↗

Get the target program (not the GDB host's) endianness.

()

Source from the content-addressed store, hash-verified

98
99@lru_cache()
100def byte_order():
101 """
102 Get the target program (not the GDB host's) endianness.
103 """
104 s = gdb.execute("show endian", to_string=True).strip()
105 if 'big' in s:
106 return 'big'
107 elif 'little' in s:
108 return 'little'
109 warnings.warn('Could not determine target endianness '
110 f'from GDB\'s response:\n"""{s}"""')
111 # Fall back to host endianness
112 return sys.byteorder
113
114
115def for_evaluation(val, ty=None):

Callers 1

wordsMethod · 0.85

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected