diff --git a/src/TargetDescription.cc b/src/TargetDescription.cc index 4b042579aba..92214a069e7 100644 --- a/src/TargetDescription.cc +++ b/src/TargetDescription.cc @@ -1,3 +1,5 @@ +/* -*- Mode: C++; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil; -*- */ + #include "TargetDescription.h" #include "GdbServerConnection.h" #include "kernel_abi.h" @@ -7,13 +9,13 @@ namespace rr { class FeatureStream { public: - std::string result() { return stream.str(); } + string result() { return stream.str(); } template friend FeatureStream& operator<<(FeatureStream& stream, Any any); private: - std::stringstream stream; + stringstream stream; const char* arch_prefix; }; @@ -115,7 +117,7 @@ static const char header[] = R"( )"; -std::string TargetDescription::to_xml() const { +string TargetDescription::to_xml() const { FeatureStream fs; fs << header << arch << "GNU/Linux\n"; for (const auto feature : target_features) { diff --git a/src/TargetDescription.h b/src/TargetDescription.h index 469ba8fa164..93569b47e40 100644 --- a/src/TargetDescription.h +++ b/src/TargetDescription.h @@ -1,10 +1,14 @@ -#pragma once +/* -*- Mode: C++; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil; -*- */ + +#ifndef RR_TARGET_DESCRIPTION_H_ +#define RR_TARGET_DESCRIPTION_H_ + #include "kernel_abi.h" #include -namespace rr { +using namespace std; -struct GdbServerRegisterValue; +namespace rr { enum class TargetFeature : uint32_t { Core = 0, @@ -17,11 +21,14 @@ enum class TargetFeature : uint32_t { }; class TargetDescription { - SupportedArch arch; - std::vector target_features; - public: explicit TargetDescription(rr::SupportedArch arch, uint32_t cpu_features); - std::string to_xml() const; + string to_xml() const; + +private: + SupportedArch arch; + vector target_features; }; -} // namespace rr \ No newline at end of file +} // namespace rr + +#endif /* RR_TARGET_DESCRIPTION_H_ */ \ No newline at end of file