diff options
author | Tom de Vries <tdevries@suse.de> | 2021-01-20 22:02:33 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-01-20 22:02:33 +0100 |
commit | 7c794afd542aa6cca8263d137abc3767a48019f1 (patch) | |
tree | 8100806628737af70ffe40e4551a131cce6dbf46 /gdb/python/py-param.c | |
parent | 1402665c8f4327b303b8d152c698fe821874f3eb (diff) | |
download | gdb-7c794afd542aa6cca8263d137abc3767a48019f1.zip gdb-7c794afd542aa6cca8263d137abc3767a48019f1.tar.gz gdb-7c794afd542aa6cca8263d137abc3767a48019f1.tar.bz2 |
[gdb/testsuite] Fix gdb.python/py-format-string.exp with -m32
When running test-case gdb.python/py-format-string.exp with target board
unix/-m32, we run into:
...
(gdb) python print \
(gdb.parse_and_eval ('a_base_ref').format_string (deref_refs=True))^M
@0xffffc468: {_vptr.Base = 0x80487e0 <vtable for Deriv+8>, a = 42, \
static a_static_member = 2019}^M
(gdb) FAIL: gdb.python/py-format-string.exp: format_string: \
lang_cpp: a_base_ref with option deref_refs: deref_refs=true
...
while with -m64, we have instead:
...
@0x7fffffffd170: {_vptr.Base = 0x400910 <vtable for Deriv+16>, a = 42, \
static a_static_member = 2019}^M
(gdb) PASS: gdb.python/py-format-string.exp: format_string: \
lang_cpp: a_base_ref with option deref_refs: deref_refs=true
...
The vtable contains pointer entries which are 4-byte for -m32 and 8-byte for
-m64, so it's not surprising the offsets (Deriv+8 vs. Deriv+16) differ.
Fix this by allow Deriv+$decimal.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2021-01-20 Tom de Vries <tdevries@suse.de>
* gdb.python/py-format-string.exp: Allow Deriv+$decimal as vtable
offset.
Diffstat (limited to 'gdb/python/py-param.c')
0 files changed, 0 insertions, 0 deletions