DXR is a source code cross-reference tool that uses static analysis data collected by instrumented compilers. DXR was created in order to build on tools like LXR and MXR. DXR runs only on Linux for the moment.
DXR is fairly well documented, so whether you're looking to deploy DXR,
write plugins or templates for DXR have a look at the docs/
folder.
The documents in this folder is a great starting point for anybody who wants
to deploy and/or develop DXR.
In case you would like try DXR on a HelloWorld-size project, one is located in
tests/test_basic
. First, read and install dependencies from
docs/deployment.mkd
. Then, install the dxr
Python package, either by
running python2.6 setup.py develop
(if you want to hack on DXR itself) or
python2.6 setup.py install
.
If you'd like to install it as non-root (recommended), use virtualenv:
virtualenv my-dxr-env
source my-dxr-env/bin/activate # You'll have to repeat this line each time
# you want to use DXR in a new shell.
pip install -r requirements.txt
python setup.py develop # Magic path munging will make this the
# copy of Python in the virtualenv.
Finally, run make
from tests/test_basic
to build the index. The makefile
contains instruction for launching the test server as well.
This is a short list of major things that could be done to improve DXR.
- Refactor the database schema
- Remove plugin specific tables
- Provide data collection API for plugins (ie. no direct database access for plugins)
- Optimize schema for search queries
- Store extents as a blob in *_refs, types, functions, etc.
- Use trilite for functions, types, macros, etc.
- Store the transitive closure of indirect calls
- Port search logic to new schema
- Write proper search query parser
- Space is a delimiter unless in dice
[ ]
, quotes" "
or escaped\
- Assume grep syntax for terms,
path:
,type:
, etc. (ie.*
is literal,\*
is kleene star) - Let quotes "text" be literal terms,
path:
,function:
, etc. - egrep syntax for
regexp:
,regex:
andegrep:
ie.*
is kleene star,\*
is literal) - Prefix
+
implies case sensitivity (and fully qualifiedtype:
,function:
, etc.) - Prefix
-
implies negation (prefix-+
and+-
is case sensitive negation) (Prefix+
,-
,+-
and-+
can be applied to terms,path:
,type:
,egrep:
, etc.)
- Space is a delimiter unless in dice
- Minor refactoring of template interface to minimize size
- Reuse annotations (i.e., don't store the same annotation for each line)
- Reuse menus (i.e., don't store the same menu for each occurrence)
- Minor UI fixes and cleanup
- Colorize highlighted matches (highlight with classes, .m1, .m2, ..., use merge-extents)
- Make the UI pretty
- Add option in "Advanced" search to disable redirect (use cookies to remember setting)
- Minimize template size (at 20 MiB for 20k lines, this is a real issue)
- Add tree format version number to generated trees (Don't merge generated output with different formats, when configuring update cron job)