Files
binutils-gdb/gdb/testsuite/gdb.python
Tom de Vries 61ed16ee63 [gdb/testsuite] Add gdb.python/py-disasm-{exec,obj}.exp
I tried to reproduce a problem in test-case gdb.python/py-disasm.exp on a
s390x machine, but when running with target board unix/-m31 I saw that the
required libraries were missing, so I couldn't generate an executable.

However, I realized that I did have an object file, and the test-case should
mostly also work with an object file.

I've renamed gdb.python/py-disasm.exp to gdb.python/py-disasm.exp.tcl and
included it from two new minimal test-case wrappers:
- gdb.python/py-disasm-exec.exp, and
- gdb.python/py-disasm-obj.exp
where the former uses an executable as before, and the latter uses an object
file.

Using an object file required changing the info.read_memory calls in
gdb.python/py-disasm.py:
...
-            info.read_memory(1, -info.address + 2)
+            info.read_memory(1, -info.address - 1)
...
because reading from address 2 succeeds.  Using address -1 instead does
generate the expected gdb.MemoryError.

Tested on x86_64-linux.
2024-07-31 13:24:20 +02:00
..
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00