diff options
author | David Robillard <d@drobilla.net> | 2014-08-29 22:50:20 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-08-29 22:50:20 +0000 |
commit | 6f6ab43c58693a6c509500d5365eb36ad4a2a571 (patch) | |
tree | 69125358b344e67ea83426ca6f82c9f5a20f9da0 | |
parent | edc189c98fe4f3f4bbadc273dcaca0eb6b31704c (diff) | |
download | ingen-6f6ab43c58693a6c509500d5365eb36ad4a2a571.tar.gz ingen-6f6ab43c58693a6c509500d5365eb36ad4a2a571.tar.bz2 ingen-6f6ab43c58693a6c509500d5365eb36ad4a2a571.zip |
Add compile-time feature to log URID mapping.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5458 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/URIMap.cpp | 12 | ||||
-rw-r--r-- | wscript | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/URIMap.cpp b/src/URIMap.cpp index b5fe8712..d770a493 100644 --- a/src/URIMap.cpp +++ b/src/URIMap.cpp @@ -89,13 +89,21 @@ URIMap::URIDUnmapFeature::unmap(LV2_URID urid) uint32_t URIMap::map_uri(const char* uri) { - return _urid_map_feature->map(uri); + const uint32_t urid = _urid_map_feature->map(uri); +#ifdef INGEN_DEBUG_URIDS + fprintf(stderr, "Map URI %3u <= %s\n", urid, uri); +#endif + return urid; } const char* URIMap::unmap_uri(uint32_t urid) const { - return _urid_unmap_feature->unmap(urid); + const char* uri = _urid_unmap_feature->unmap(urid); +#ifdef INGEN_DEBUG_URIDS + fprintf(stderr, "Unmap URI %3u => %s\n", urid, uri); +#endif + return uri; } } // namespace Ingen @@ -32,6 +32,8 @@ def options(opt): help='Do not build Socket interface') opt.add_option('--test', action='store_true', dest='build_tests', help='Build unit tests') + opt.add_option('--debug-urids', action='store_true', dest='debug_urids', + help='Print a trace of URI mapping') def configure(conf): conf.load('compiler_cxx') @@ -86,6 +88,8 @@ def configure(conf): mandatory=False) if not Options.options.no_jack_session: autowaf.define(conf, 'INGEN_JACK_SESSION', 1) + if Options.options.debug_urids: + autowaf.define(conf, 'INGEN_DEBUG_URIDS', 1) conf.check(function_name='jack_set_property', header_name='jack/metadata.h', |