Add clangd and clang-format configs

This commit is contained in:
Konstantin Nazarov 2024-12-09 00:48:40 +00:00
parent fd67be0d89
commit 79177d17e5
Signed by: knazarov
GPG key ID: 4CFE0A42FA409C22
3 changed files with 22 additions and 12 deletions

4
.clang-format Normal file
View file

@ -0,0 +1,4 @@
---
BasedOnStyle: Google
...

2
.clangd Normal file
View file

@ -0,0 +1,2 @@
CompileFlags:
Add: [-xc++, -std=c++23, -Isrc/]

View file

@ -1,16 +1,19 @@
#pragma once #pragma once
#include <iostream> #include <netinet/in.h>
#include <sys/socket.h>
#include <unistd.h>
#include <atomic>
#include <cstring> #include <cstring>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <stdexcept> #include <stdexcept>
#include <thread> #include <thread>
#include <atomic>
#include <vector> #include <vector>
#include <sstream>
#include <iomanip> #include "vm.hpp"
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
class GDBStub { class GDBStub {
public: public:
@ -38,7 +41,8 @@ private:
void handle_packet(const std::string &packet); void handle_packet(const std::string &packet);
bool parse_memory_request(const std::string &packet, size_t &addr, size_t &length); bool parse_memory_request(const std::string &packet, size_t &addr,
size_t &length);
std::string read_registers(); std::string read_registers();