add debug stuff

This commit is contained in:
Nayan
2025-05-07 22:36:08 -04:00
parent a419e6436d
commit 52b6dd9b17
3 changed files with 54 additions and 5 deletions

42
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,42 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/webserver.out",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
},
{
"description": "Enable thread auto-attach",
"text": "thread-auto-attach true",
"ignoreFailures": true
},
{
"description": "Auto display thread info",
"text": "thread-auto-display enabled",
"ignoreFailures": true
}
]
}
]
}

7
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"files.associations": {
"string.h": "c",
"types.h": "c",
"random": "c"
}
}

View File

@@ -1,17 +1,17 @@
all: webserver.o client_handler.o request_handler.o http_stuff.o all: webserver.o client_handler.o request_handler.o http_stuff.o
gcc -o webserver.out *.o -lpthread gcc -o webserver.out *.o -lpthread -g
webserver: webserver.c webserver: webserver.c
gcc -c webserver webserver.c gcc -c webserver webserver.c -g
client_handler: client_handler.c client_handler.h request_handler.h client_handler: client_handler.c client_handler.h request_handler.h
gcc -c client_handler client_handler.c gcc -c client_handler client_handler.c -g
request_handler: request_handler.c request_handler.h http_stuff.h request_handler: request_handler.c request_handler.h http_stuff.h
gcc -c request_handler request_handler.c gcc -c request_handler request_handler.c -g
http_stuff: http_stuff.c http_stuff.h http_stuff: http_stuff.c http_stuff.h
gcc -c http_stuff http_stuff.c gcc -c http_stuff http_stuff.c -g
clean: clean:
rm -f *.o *.out rm -f *.o *.out