diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-07 20:57:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-07 20:57:45 +0300 |
commit | c38ffbfc751eceb016da279cf7492dcc81a65585 (patch) | |
tree | 7a17b8ee8b6f2d6ce7df8f008dbaf3601633a1a1 | |
parent | c02dcae58141e56cacf8401fc225ed0d30ee2706 (diff) | |
download | paranucker-c38ffbfc751eceb016da279cf7492dcc81a65585.tar.gz paranucker-c38ffbfc751eceb016da279cf7492dcc81a65585.tar.bz2 paranucker-c38ffbfc751eceb016da279cf7492dcc81a65585.tar.xz paranucker-c38ffbfc751eceb016da279cf7492dcc81a65585.zip |
Add plugin command for dump unsupported node types.
New plugin command: dumpunsupported
-rw-r--r-- | src/command.h | 1 | ||||
-rw-r--r-- | src/parsers/generic.cpp | 18 | ||||
-rw-r--r-- | src/plugin.cpp | 4 |
3 files changed, 18 insertions, 5 deletions
diff --git a/src/command.h b/src/command.h index 2b1cf7a..0666464 100644 --- a/src/command.h +++ b/src/command.h @@ -25,6 +25,7 @@ enum Command : int Parse = 0, Dump, SmallDump, + DumpUnsupported, MemoryUsage }; diff --git a/src/parsers/generic.cpp b/src/parsers/generic.cpp index 5f53843..0e3f1ac 100644 --- a/src/parsers/generic.cpp +++ b/src/parsers/generic.cpp @@ -61,11 +61,19 @@ Node *createParseNode(Node *parent, break; #include "includes/nodeshandling.inc" default: - Log::log(parent, - 1, - "Not supported node type: %s - %s", - get_tree_code_name(TREE_CODE(gccNode)), - tag.c_str()); + if (command == Command::DumpUnsupported) + { + Log::error("Unsupported node type: %s", + get_tree_code_name(TREE_CODE(gccNode))); + } + else + { + Log::log(parent, + 1, + "Unsupported node type: %s - %s", + get_tree_code_name(TREE_CODE(gccNode)), + tag.c_str()); + } break; } if (node) diff --git a/src/plugin.cpp b/src/plugin.cpp index 19ed8b0..7499a54 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -69,6 +69,10 @@ int plugin_init (struct plugin_name_args *plugin_info, { command = Command::MemoryUsage; } + else if (cmd == "dumpunsupported") + { + command = Command::DumpUnsupported; + } else { error("Plugin %s. Unknown command: %s", |