File tree 5 files changed +253
-77
lines changed
5 files changed +253
-77
lines changed Original file line number Diff line number Diff line change 2
2
path = cnfa
3
3
url = https://github.com/cntools/cnfa
4
4
shallow = true
5
+ [submodule "mini-gdbstub "]
6
+ path = mini-gdbstub
7
+ url = https://github.com/RinHizakura/mini-gdbstub.git
8
+ shallow = true
Original file line number Diff line number Diff line change @@ -105,6 +105,14 @@ OBJS := \
105
105
106
106
deps := $(OBJS:%.o=.%.o.d )
107
107
108
+ GDBSTUB_LIB := mini-gdbstub/build/libgdbstub.a
109
+ LDFLAGS += $(GDBSTUB_LIB )
110
+ mini-gdbstub/Makefile :
111
+ git submodule update --init $(dir $@ )
112
+ $(GDBSTUB_LIB ) : mini-gdbstub/Makefile
113
+ $(MAKE ) -C $(dir $< )
114
+ $(OBJS ) : $(GDBSTUB_LIB )
115
+
108
116
$(BIN ) : $(OBJS )
109
117
$(VECHO ) " LD\t$@ \n"
110
118
$(Q )$(CC ) -o $@ $^ $(LDFLAGS )
@@ -152,6 +160,7 @@ build-image:
152
160
153
161
clean :
154
162
$(Q )$(RM ) $(BIN ) $(OBJS ) $(deps )
163
+ $(Q )$(MAKE ) -C mini-gdbstub clean
155
164
156
165
distclean : clean
157
166
$(Q )$(RM ) riscv-harts.dtsi
Original file line number Diff line number Diff line change @@ -377,3 +377,15 @@ typedef struct {
377
377
virtio_snd_state_t vsnd ;
378
378
#endif
379
379
} emu_state_t ;
380
+
381
+
382
+ typedef struct {
383
+ emu_state_t emu ;
384
+ vm_t vm ;
385
+ uint32_t peripheral_update_ctr ;
386
+ bool debug ;
387
+
388
+ /* The fields used for debug mode */
389
+ bool is_interrupted ;
390
+ int curr_cpuid ;
391
+ } semu_t ;
You can’t perform that action at this time.
0 commit comments