X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Famdgcn-rocm-tdep.c;h=920291e752597368c1b8fe8ea2a556245233e0e9;hb=389fe8647555af73fca362bb066786b8cfe52761;hp=525c6341dc6abbe82f8bf24f617fdb7ffa2156ab;hpb=5922befae00a089879a0ff0d3e6a379a0f2f0e67;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/amdgcn-rocm-tdep.c b/gdb/amdgcn-rocm-tdep.c index 525c6341dc..920291e752 100644 --- a/gdb/amdgcn-rocm-tdep.c +++ b/gdb/amdgcn-rocm-tdep.c @@ -1,7 +1,7 @@ /* Target-dependent code for the ROCm amdgcn architecture. - Copyright (C) 2019 Free Software Foundation, Inc. - Copyright (C) 2019 Advanced Micro Devices, Inc. All rights reserved. + Copyright (C) 2019-2020 Free Software Foundation, Inc. + Copyright (C) 2019-2020 Advanced Micro Devices, Inc. All rights reserved. This file is part of GDB. @@ -303,10 +303,11 @@ amdgcn_rocm_displaced_step_fixup (struct gdbarch *gdbarch, closure->process_id, closure->wave_id, closure->displaced_stepping_id); if (status != AMD_DBGAPI_STATUS_SUCCESS) - error (_ ("amd_dbgapi_displaced_stepping_complete failed (rc=%d"), status); + error (_ ("amd_dbgapi_displaced_stepping_complete failed (rc=%d)"), + status); /* We may have written some registers, so flush the register cache. */ - registers_changed_ptid (regcache->ptid ()); + registers_changed_ptid (regcache->target (), regcache->ptid ()); } static int @@ -322,9 +323,9 @@ print_insn_amdgcn (bfd_vma memaddr, struct disassemble_info *di) (gdb_byte *)xmalloc (instruction_size)); instruction_size - = target_read (current_top_target (), TARGET_OBJECT_MEMORY, NULL, + = target_read (current_top_target (), TARGET_OBJECT_CODE_MEMORY, NULL, buffer.get (), memaddr, instruction_size); - if (!instruction_size) + if (instruction_size == TARGET_XFER_E_IO || instruction_size == 0) { (*di->memory_error_func) (-1, memaddr, di); return -1; @@ -582,8 +583,7 @@ amdgcn_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) gdb_byte *breakpoint_instruction_bytes; if (amd_dbgapi_architecture_get_info ( architecture_id, AMD_DBGAPI_ARCHITECTURE_INFO_BREAKPOINT_INSTRUCTION, - sizeof (breakpoint_instruction_bytes), - &breakpoint_instruction_bytes) + sizeof (breakpoint_instruction_bytes), &breakpoint_instruction_bytes) != AMD_DBGAPI_STATUS_SUCCESS) error (_ ("amd_dbgapi_architecture_get_info failed"));