aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-disasm.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-06-10 17:53:30 +0200
committerTom de Vries <tdevries@suse.de>2024-06-10 17:53:30 +0200
commit58a628530ee68fe705b443947643037319e7d44e (patch)
tree1adeb669a90c61c0ec70dbfa3def3a9816eb7537 /gdb/python/py-disasm.c
parent4cd214dce4579f86a85a96c882e0fc8c4d94601c (diff)
downloadbinutils-58a628530ee68fe705b443947643037319e7d44e.zip
binutils-58a628530ee68fe705b443947643037319e7d44e.tar.gz
binutils-58a628530ee68fe705b443947643037319e7d44e.tar.bz2
[gdb/python] Fix GDB_PY_{LL,LLU}_ARG on platform without long long
If in gdb/python/python-internal.h, we pretend to have a platform that doesn't support long long: ... -#ifdef HAVE_LONG_LONG +#if 0 ... I get on arm-linux: ... (gdb) placement_candidate() disassemble test^M Dump of assembler code for function test:^M 0x004004d8 <+0>: push {r11} @ (str r11, [sp, #-4]!)^M 0x004004dc <+4>: Python Exception <class 'ValueError'>: \ Buffer returned from read_memory is sized 0 instead of the expected 4^M ^M unknown disassembler error (error = -1)^M (gdb) FAIL: $exp: memory source api: second disassembler pass ... The problem is that gdb_py_longest is typedef-ed to long, but the corresponding format character GDB_PY_LL_ARG is defined to "L", meaning "long long" [1]. Fix this by using "l", meaning long instead. Likewise for GDB_PY_LLU_ARG. Tested on arm-linux. Approved-By: Tom Tromey <tom@tromey.com> PR python/31845 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31845 [1] https://docs.python.org/3/c-api/arg.html
Diffstat (limited to 'gdb/python/py-disasm.c')
0 files changed, 0 insertions, 0 deletions