I want to use this kernel to learn how to do remote debugging with gdb . So I integrate i386-stub.c
from gdb-6.8 tar ball. i386-stub.c needs stdio.h and string.h. So i modify the include path in my makefile
Code: Select all
INCLUDE_PATH=$(CURDIR)/include /usr/include
CFLAGS = -g -fno-stack-protector -O -fstrength-reduce -fomit-frame-pointer -finline-functions -I$(INCLUDE_PATH)
CFLAGS += -nostdinc -fno-builtin
CFLAGS += -iwithprefix include
I have my own functions like "puts" in this kernel. Is it possible I don't need remove the directives "-nostdinc and -fno-builtin"
and I can still compile i386-stub.c successfully?
Another question is I noticed there is a variable "_registers" in i386-stub.c. Is it defined in one of the required header files?