mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-01 12:07:42 +03:00
serialize: parameterize on pattern as well
This commit is contained in:
committed by
Matthew Barr
parent
a97ec56aee
commit
1376f3849a
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Intel Corporation
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -48,10 +48,15 @@ int record_cb(unsigned id, unsigned long long, unsigned long long to,
|
||||
return (int)c->halt;
|
||||
}
|
||||
|
||||
std::ostream &operator<< (std::ostream &o, const MatchRecord &m) {
|
||||
std::ostream &operator<<(std::ostream &o, const MatchRecord &m) {
|
||||
return o << "[" << m.to << ", " << m.id << "]";
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &o, const pattern &p) {
|
||||
return o << "[" << "expr=\"" << p.expression << "\", flags=" << p.flags
|
||||
<< ", id=" << p.id << "]";
|
||||
}
|
||||
|
||||
hs_database_t *buildDB(const vector<pattern> &patterns, unsigned int mode,
|
||||
hs_platform_info *plat) {
|
||||
vector<const char *> expressions;
|
||||
|
Reference in New Issue
Block a user