gdb: error if /r and /b are used with disassemble command
[binutils-gdb.git] / gdb / cli / cli-cmds.c
index 8cadd6371515ce7f9f808eb9cddbceb4050c576f..90989588babc0ffdedda086ce9e651fa3e8b73ce 100644 (file)
@@ -1644,6 +1644,10 @@ disassemble_command (const char *arg, int from_tty)
       == (DISASSEMBLY_SOURCE_DEPRECATED | DISASSEMBLY_SOURCE))
     error (_("Cannot specify both /m and /s."));
 
+  if ((flags & (DISASSEMBLY_RAW_INSN | DISASSEMBLY_RAW_BYTES))
+      == (DISASSEMBLY_RAW_INSN | DISASSEMBLY_RAW_BYTES))
+    error (_("Cannot specify both /r and /b."));
+
   if (! p || ! *p)
     {
       flags |= DISASSEMBLY_OMIT_FNAME;