Run clang-format on all my new code

This commit is contained in:
RichardG867
2022-03-16 14:12:45 -03:00
parent 66e565000f
commit fd6646f21b
7 changed files with 1877 additions and 1857 deletions

View File

@@ -15,12 +15,12 @@
* Copyright 2022 RichardG.
*/
#ifndef EMU_GDBSTUB_H
# define EMU_GDBSTUB_H
#define EMU_GDBSTUB_H
#include <86box/mem.h>
#define GDBSTUB_MEM_READ 0
#define GDBSTUB_MEM_WRITE 16
#define GDBSTUB_MEM_AWATCH 32
#define GDBSTUB_MEM_READ 0
#define GDBSTUB_MEM_WRITE 16
#define GDBSTUB_MEM_AWATCH 32
enum {
GDBSTUB_EXEC = 0,
@@ -35,21 +35,21 @@ enum {
#ifdef USE_GDBSTUB
#define GDBSTUB_MEM_ACCESS(addr, access, width) \
uint32_t gdbstub_page = addr >> MEM_GRANULARITY_BITS; \
if (gdbstub_watch_pages[gdbstub_page >> 6] & (1 << (gdbstub_page & 63)) || (addr == 0xb8dd4)) { \
uint32_t gdbstub_addrs[width]; \
for (int gdbstub_i = 0; gdbstub_i < width; gdbstub_i++) \
gdbstub_addrs[gdbstub_i] = addr + gdbstub_i; \
gdbstub_mem_access(gdbstub_addrs, access | width); \
}
# define GDBSTUB_MEM_ACCESS(addr, access, width) \
uint32_t gdbstub_page = addr >> MEM_GRANULARITY_BITS; \
if (gdbstub_watch_pages[gdbstub_page >> 6] & (1 << (gdbstub_page & 63))) { \
uint32_t gdbstub_addrs[width]; \
for (int gdbstub_i = 0; gdbstub_i < width; gdbstub_i++) \
gdbstub_addrs[gdbstub_i] = addr + gdbstub_i; \
gdbstub_mem_access(gdbstub_addrs, access | width); \
}
#define GDBSTUB_MEM_ACCESS_FAST(addrs, access, width) \
uint32_t gdbstub_page = addr >> MEM_GRANULARITY_BITS; \
if (gdbstub_watch_pages[gdbstub_page >> 6] & (1 << (gdbstub_page & 63)) || (addr == 0xb8dd4)) \
gdbstub_mem_access(addrs, access | width);
# define GDBSTUB_MEM_ACCESS_FAST(addrs, access, width) \
uint32_t gdbstub_page = addr >> MEM_GRANULARITY_BITS; \
if (gdbstub_watch_pages[gdbstub_page >> 6] & (1 << (gdbstub_page & 63))) \
gdbstub_mem_access(addrs, access | width);
extern int gdbstub_step, gdbstub_next_asap;
extern int gdbstub_step, gdbstub_next_asap;
extern uint64_t gdbstub_watch_pages[(((uint32_t) -1) >> (MEM_GRANULARITY_BITS + 6)) + 1];
extern void gdbstub_cpu_init();
@@ -61,17 +61,17 @@ extern void gdbstub_close();
#else
#define GDBSTUB_MEM_ACCESS(addr, access, width)
#define GDBSTUB_MEM_ACCESS_FAST(addrs, access, width)
# define GDBSTUB_MEM_ACCESS(addr, access, width)
# define GDBSTUB_MEM_ACCESS_FAST(addrs, access, width)
#define gdbstub_step 0
#define gdbstub_next_asap 0
# define gdbstub_step 0
# define gdbstub_next_asap 0
#define gdbstub_cpu_init()
#define gdbstub_instruction() 0
#define gdbstub_int3() 0
#define gdbstub_init()
#define gdbstub_close()
# define gdbstub_cpu_init()
# define gdbstub_instruction() 0
# define gdbstub_int3() 0
# define gdbstub_init()
# define gdbstub_close()
#endif