Shadow Stack  0.2
 All Classes Namespaces Files Functions Variables Typedefs Macros
parse_args.hpp
Go to the documentation of this file.
1 
2 #ifndef __PARSE_ARGS_HPP__
3 #define __PARSE_ARGS_HPP__
4 
5 #include "ss_mode.hpp"
6 
7 #include <boost/program_options.hpp>
8 
9 
10 /*********************************************************/
11 /* */
12 /* Argument keys */
13 /* */
14 /*********************************************************/
15 
16 
18 #define TARGET_ARGS "target-args"
19 
21 #define TARGET "target"
22 
24 #define MODE "ss_mode"
25 
26 
27 /*********************************************************/
28 /* */
29 /* Expected arguments */
30 /* */
31 /*********************************************************/
32 
33 
35 struct Args {
36 
38  Args( SSMode &&mode_, const std::string &targ, std::vector<std::string> &targ_args );
39 
41  const SSMode mode;
42 
44  const std::string target;
45 
47  const std::vector<std::string> target_args;
48 };
49 
50 
51 /*********************************************************/
52 /* */
53 /* Function declarations */
54 /* */
55 /*********************************************************/
56 
57 
59 Args parse_args( const int argc, const char *const argv[] );
60 
61 
62 #endif
const std::vector< std::string > target_args
Targe executable arguments.
Definition: parse_args.hpp:47
const std::string target
Path to target executable.
Definition: parse_args.hpp:44
const SSMode mode
The shadow stack mode.
Definition: parse_args.hpp:41
Args parse_args(const int argc, const char *const argv[])
Returns an args_t containing the parsed arguments.
Definition: parse_args.cpp:125
A tiny struct that represents a shadow stack mode.
Definition: ss_mode.hpp:17
Args(SSMode &&mode_, const std::string &targ, std::vector< std::string > &targ_args)
Constructor.
Definition: parse_args.cpp:120
A struct returned by the argument parser.
Definition: parse_args.hpp:35