mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-02 19:46:09 +08:00
Fix break on Python 2
This changes the return type of "gdb.BtraceInstruction.data ()" from "memoryview" to "buffer" on Python 2.7 and below, similar to what "gdb.Inferior.read_memory ()" does.
This commit is contained in:
@ -85,7 +85,11 @@ with_test_prefix "instruction " {
|
||||
gdb_test "python print(i.error)" "None"
|
||||
gdb_test "python print(i.sal)" "symbol and line for .*"
|
||||
gdb_test "python print(i.pc)" "$decimal"
|
||||
gdb_test "python print(i.data)" "<memory at $hex>"
|
||||
if { $gdb_py_is_py3k == 0 } {
|
||||
gdb_test "python print(repr(i.data))" "<read-only buffer for $hex,.*>"
|
||||
} else {
|
||||
gdb_test "python print(repr(i.data))" "<memory at $hex>"
|
||||
}
|
||||
gdb_test "python print(i.decoded)" ".*"
|
||||
gdb_test "python print(i.size)" "$decimal"
|
||||
gdb_test "python print(i.is_speculative)" "False"
|
||||
|
Reference in New Issue
Block a user