Fix setting breakpoints on ifunc functions after they're already resolved
[deliverable/binutils-gdb.git] / opcodes / s390-dis.c
index 2d97a2aa7055763e11aeb66aeb0c6c7b00a57f81..6763d9fefad3bd0316bed3bce757a8ccfb7e715e 100644 (file)
@@ -1,5 +1,5 @@
 /* s390-dis.c -- Disassemble S390 instructions
-   Copyright (C) 2000-2017 Free Software Foundation, Inc.
+   Copyright (C) 2000-2018 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
 
    This file is part of the GNU opcodes library.
@@ -22,7 +22,7 @@
 #include "sysdep.h"
 #include <stdio.h>
 #include "ansidecl.h"
-#include "dis-asm.h"
+#include "disassemble.h"
 #include "opintl.h"
 #include "opcode/s390.h"
 #include "libiberty.h"
@@ -72,7 +72,8 @@ disassemble_init_s390 (struct disassemble_info *info)
       else if (CONST_STRNEQ (p, "insnlength"))
        option_use_insn_len_bits_p = 1;
       else
-       fprintf (stderr, "Unknown S/390 disassembler option: %s\n", p);
+       /* xgettext:c-format */
+       opcodes_error_handler (_("unknown S/390 disassembler option: %s"), p);
 
       p = strchr (p, ',');
       if (p != NULL)
@@ -206,11 +207,20 @@ s390_print_insn_with_opcode (bfd_vma memaddr,
 
       /* For instructions with a last optional operand don't print it
         if zero.  */
-      if ((opcode->flags & S390_INSTR_FLAG_OPTPARM)
+      if ((opcode->flags & (S390_INSTR_FLAG_OPTPARM | S390_INSTR_FLAG_OPTPARM2))
          && val.u == 0
          && opindex[1] == 0)
        break;
 
+      if ((opcode->flags & S390_INSTR_FLAG_OPTPARM2)
+         && val.u == 0 && opindex[1] != 0 && opindex[2] == 0)
+       {
+         union operand_value next_op_val =
+           s390_extract_operand (buffer, s390_operands + opindex[1]);
+         if (next_op_val.u == 0)
+           break;
+       }
+
       if (flags & S390_OPERAND_GPR)
        info->fprintf_func (info->stream, "%c%%r%u", separator, val.u);
       else if (flags & S390_OPERAND_FPR)
This page took 0.030003 seconds and 4 git commands to generate.