File tree Expand file tree Collapse file tree 2 files changed +20
-11
lines changed Expand file tree Collapse file tree 2 files changed +20
-11
lines changed Original file line number Diff line number Diff line change
1
+ /* -*- Mode: C++; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil; -*- */
2
+
1
3
#include " TargetDescription.h"
2
4
#include " GdbServerConnection.h"
3
5
#include " kernel_abi.h"
@@ -7,13 +9,13 @@ namespace rr {
7
9
8
10
class FeatureStream {
9
11
public:
10
- std:: string result () { return stream.str (); }
12
+ string result () { return stream.str (); }
11
13
12
14
template <typename Any>
13
15
friend FeatureStream& operator <<(FeatureStream& stream, Any any);
14
16
15
17
private:
16
- std:: stringstream stream;
18
+ stringstream stream;
17
19
const char * arch_prefix;
18
20
};
19
21
@@ -115,7 +117,7 @@ static const char header[] = R"(<?xml version="1.0"?>
115
117
<target>
116
118
)" ;
117
119
118
- std:: string TargetDescription::to_xml () const {
120
+ string TargetDescription::to_xml () const {
119
121
FeatureStream fs;
120
122
fs << header << arch << " <osabi>GNU/Linux</osabi>\n " ;
121
123
for (const auto feature : target_features) {
Original file line number Diff line number Diff line change 1
- #pragma once
1
+ /* -*- Mode: C++; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil; -*- */
2
+
3
+ #ifndef RR_TARGET_DESCRIPTION_H_
4
+ #define RR_TARGET_DESCRIPTION_H_
5
+
2
6
#include " kernel_abi.h"
3
7
#include < cstdint>
4
8
5
- namespace rr {
9
+ using namespace std ;
6
10
7
- struct GdbServerRegisterValue ;
11
+ namespace rr {
8
12
9
13
enum class TargetFeature : uint32_t {
10
14
Core = 0 ,
@@ -17,11 +21,14 @@ enum class TargetFeature : uint32_t {
17
21
};
18
22
19
23
class TargetDescription {
20
- SupportedArch arch;
21
- std::vector<TargetFeature> target_features;
22
-
23
24
public:
24
25
explicit TargetDescription (rr::SupportedArch arch, uint32_t cpu_features);
25
- std::string to_xml () const ;
26
+ string to_xml () const ;
27
+
28
+ private:
29
+ SupportedArch arch;
30
+ vector<TargetFeature> target_features;
26
31
};
27
- } // namespace rr
32
+ } // namespace rr
33
+
34
+ #endif /* RR_TARGET_DESCRIPTION_H_ */
You can’t perform that action at this time.
0 commit comments