summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/URIMap.cpp12
-rw-r--r--wscript4
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
diff --git a/wscript b/wscript
index 6988a478..82650d55 100644
--- a/wscript
+++ b/wscript
@@ -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',