diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..eadac78 --- /dev/null +++ b/.vscode/launch.json @@ -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 + } + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c11fca3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "files.associations": { + "string.h": "c", + "types.h": "c", + "random": "c" + } +} \ No newline at end of file diff --git a/Makefile b/Makefile index 5aaee8c..83999ca 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,17 @@ 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 - gcc -c webserver webserver.c + gcc -c webserver webserver.c -g 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 - gcc -c request_handler request_handler.c + gcc -c request_handler request_handler.c -g http_stuff: http_stuff.c http_stuff.h - gcc -c http_stuff http_stuff.c + gcc -c http_stuff http_stuff.c -g clean: rm -f *.o *.out \ No newline at end of file