diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-01-24 15:12:34 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2023-05-12 18:24:24 +0100 |
commit | 6a667807390b7091b5ec088d979c779f65d3dfa5 (patch) | |
tree | 46e7b61bd054ee66836a41b01a66127d3727270b /gdb/testsuite/gdb.python/py-disasm.exp | |
parent | 15ccb5e393f7c4032a8ee005a8183830a9c6accb (diff) | |
download | binutils-gdb-6a667807390b7091b5ec088d979c779f65d3dfa5.tar.gz |
gdb/python: implement DisassemblerResult.__str__ method
Add the DisassemblerResult.__str__ method. This gives the same result
as the DisassemblerResult.string attribute, but can be useful
sometimes depending on how the user is trying to print the object.
There's a test for the new functionality.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-disasm.exp')
-rw-r--r-- | gdb/testsuite/gdb.python/py-disasm.exp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-disasm.exp b/gdb/testsuite/gdb.python/py-disasm.exp index 854cdbbce1e..2550e60111e 100644 --- a/gdb/testsuite/gdb.python/py-disasm.exp +++ b/gdb/testsuite/gdb.python/py-disasm.exp @@ -76,6 +76,7 @@ set test_plans \ [list "ShowInfoRepr" "${base_pattern}\\s+## <gdb.disassembler.DisassembleInfo address=$hex architecture=\[^>\]+>\r\n.*"] \ [list "ShowInfoSubClassRepr" "${base_pattern}\\s+## <MyInfo address=$hex architecture=\[^>\]+>\r\n.*"] \ [list "ShowResultRepr" "${base_pattern}\\s+## <gdb.disassembler.DisassemblerResult length=$decimal string=\"\[^\r\n\]+\">\r\n.*"] \ + [list "ShowResultStr" "${base_pattern}\\s+## ${nop}\r\n.*"] \ [list "GlobalPreInfoDisassembler" "${base_pattern}\\s+## ad = $hex, ar = ${curr_arch}\r\n.*"] \ [list "GlobalPostInfoDisassembler" "${base_pattern}\\s+## ad = $hex, ar = ${curr_arch}\r\n.*"] \ [list "GlobalReadDisassembler" "${base_pattern}\\s+## bytes =( $hex)+\r\n.*"] \ |