Fix gdb.base/all-architectures-2.exp failures
authorLaurent Morichetti <laurent.morichetti@amd.com>
Sun, 22 Dec 2019 05:52:59 +0000 (21:52 -0800)
committerLaurent Morichetti <laurent.morichetti@amd.com>
Sun, 22 Dec 2019 06:02:15 +0000 (22:02 -0800)
commit768f89bc8893662b043e4dc9b7a327eaddd093eb
treedf8db8b220da420b8d40ab99186060e3f2f3c015
parent86e751f51e687b88e0c39333c34fed59da893d15
Fix gdb.base/all-architectures-2.exp failures

print_insn_amdgcn fails to report an error if the memory is not mapped.

disassemble 0x0,+4 returns:
Dump of assembler code from 0x0 to 0x4:
   0x0000000000000000:  v_cndmask_b32_e32 v0, s0, v0, vcc

instead of:
Dump of assembler code from 0x0 to 0x4:
   0x0000000000000000:  Cannot access memory at address 0x0

print_insn_amdgcn should return -1 if target_read returns 0 or
TARGET_XFER_E_IO. Also, use TARGET_OBJECT_CODE_MEMORY since we are
disassembling code memory.

gdb/ChangeLog:

        * amdgcn-rocm-tdep.c (print_insn_amdgcn): Check target_read's
        return value and return -1 if it is 0 or TARGET_XFER_E_IO.
        (amdgcn_rocm_displaced_step_fixup): Fix indentation.
        (amdgcn_gdbarch_init): Fix indentation.

Change-Id: Iff607a45efd0d369d44e7a8b34c8eb612985b5de
gdb/amdgcn-rocm-tdep.c
This page took 0.024651 seconds and 4 git commands to generate.