소스 검색

include/exec: Move gdb open flags to gdbstub.h

There were 3 copies of these flags.  Place them in the
file with gdb_do_syscall, with which they belong.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Richard Henderson 3 년 전
부모
커밋
94b14fe08f
4개의 변경된 파일9개의 추가작업 그리고 23개의 파일을 삭제
  1. 9 0
      include/exec/gdbstub.h
  2. 0 7
      semihosting/arm-compat-semi.c
  3. 0 8
      target/m68k/m68k-semi.c
  4. 0 8
      target/nios2/nios2-semi.c

+ 9 - 0
include/exec/gdbstub.h

@@ -10,6 +10,15 @@
 #define GDB_WATCHPOINT_READ      3
 #define GDB_WATCHPOINT_READ      3
 #define GDB_WATCHPOINT_ACCESS    4
 #define GDB_WATCHPOINT_ACCESS    4
 
 
+/* For gdb file i/o remote protocol open flags. */
+#define GDB_O_RDONLY  0
+#define GDB_O_WRONLY  1
+#define GDB_O_RDWR    2
+#define GDB_O_APPEND  8
+#define GDB_O_CREAT   0x200
+#define GDB_O_TRUNC   0x400
+#define GDB_O_EXCL    0x800
+
 #ifdef NEED_CPU_H
 #ifdef NEED_CPU_H
 #include "cpu.h"
 #include "cpu.h"
 
 

+ 0 - 7
semihosting/arm-compat-semi.c

@@ -86,13 +86,6 @@
 #define O_BINARY 0
 #define O_BINARY 0
 #endif
 #endif
 
 
-#define GDB_O_RDONLY  0x000
-#define GDB_O_WRONLY  0x001
-#define GDB_O_RDWR    0x002
-#define GDB_O_APPEND  0x008
-#define GDB_O_CREAT   0x200
-#define GDB_O_TRUNC   0x400
-
 static int gdb_open_modeflags[12] = {
 static int gdb_open_modeflags[12] = {
     GDB_O_RDONLY,
     GDB_O_RDONLY,
     GDB_O_RDONLY,
     GDB_O_RDONLY,

+ 0 - 8
target/m68k/m68k-semi.c

@@ -69,14 +69,6 @@ struct gdb_timeval {
   uint64_t tv_usec;   /* microsecond */
   uint64_t tv_usec;   /* microsecond */
 } QEMU_PACKED;
 } QEMU_PACKED;
 
 
-#define GDB_O_RDONLY   0x0
-#define GDB_O_WRONLY   0x1
-#define GDB_O_RDWR     0x2
-#define GDB_O_APPEND   0x8
-#define GDB_O_CREAT  0x200
-#define GDB_O_TRUNC  0x400
-#define GDB_O_EXCL   0x800
-
 static int translate_openflags(int flags)
 static int translate_openflags(int flags)
 {
 {
     int hf;
     int hf;

+ 0 - 8
target/nios2/nios2-semi.c

@@ -71,14 +71,6 @@ struct gdb_timeval {
   uint64_t tv_usec;   /* microsecond */
   uint64_t tv_usec;   /* microsecond */
 } QEMU_PACKED;
 } QEMU_PACKED;
 
 
-#define GDB_O_RDONLY   0x0
-#define GDB_O_WRONLY   0x1
-#define GDB_O_RDWR     0x2
-#define GDB_O_APPEND   0x8
-#define GDB_O_CREAT  0x200
-#define GDB_O_TRUNC  0x400
-#define GDB_O_EXCL   0x800
-
 static int translate_openflags(int flags)
 static int translate_openflags(int flags)
 {
 {
     int hf;
     int hf;