|
| 1 | +/** |
| 2 | + * The ARTist Project (https://artist.cispa.saarland) |
| 3 | + * |
| 4 | + * Copyright (C) 2017 CISPA (https://cispa.saarland), Saarland University |
| 5 | + * |
| 6 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | + * you may not use this file except in compliance with the License. |
| 8 | + * You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, software |
| 13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + * See the License for the specific language governing permissions and |
| 16 | + * limitations under the License. |
| 17 | + * |
| 18 | + * @author "Oliver Schranz <[email protected]>" |
| 19 | + * @author "Sebastian Weisgerber <[email protected]>" |
| 20 | + * |
| 21 | + */ |
| 22 | + |
| 23 | +#include <atomic> |
| 24 | + |
| 25 | +#include <artist/artist_log.h> |
| 26 | +#include <artist/injection/injection_visitor.h> |
| 27 | +#include <artist/env/java_env.h> |
| 28 | +#include <artist/injection/primitives.h> |
| 29 | +#include <artist/injection/boolean.h> |
| 30 | +#include <artist/injection/integer.h> |
| 31 | +#include <artist/injection/float.h> |
| 32 | +#include <artist/verbose_printer.h> |
| 33 | +#include <artist/injection/char.h> |
| 34 | + |
| 35 | +#include "instrumentation_pass.h" |
| 36 | +#include "codelib.h" |
| 37 | + |
| 38 | +using std::string; |
| 39 | +using std::vector; |
| 40 | +using std::shared_ptr; |
| 41 | +using std::make_shared; |
| 42 | +using std::endl; |
| 43 | +using std::sort; |
| 44 | + |
| 45 | +using art::Target; |
| 46 | +using art::Parameter; |
| 47 | +using art::Char; |
| 48 | +using art::InjectionTarget ; |
| 49 | + |
| 50 | +vector<Injection> HTraceArtist::ProvideInjections() const { |
| 51 | + vector<shared_ptr<const Parameter>> params; |
| 52 | + auto param = make_shared<const Char>(); |
| 53 | + params.push_back(param); |
| 54 | + |
| 55 | + vector<const Target> targets; |
| 56 | + const Target target(Target::GENERIC_TARGET, InjectionTarget::METHOD_END); |
| 57 | + targets.push_back(target); |
| 58 | + |
| 59 | + Injection injection(TraceCodeLib::TRACELOG, params, targets); |
| 60 | + |
| 61 | + vector<Injection> results; |
| 62 | + results.push_back(injection); |
| 63 | + return results; |
| 64 | +} |
0 commit comments