xref, cxref, any crossref command?

Is there something similar to xref or cxref for the source code in FreeBSD? I used cscope which isn't bad, but that seems to be purely interactive. I'd like to be able to create a listing of cross references that I can print out and study.
 
Last edited by a moderator:
I found cxref in ports and tried it out, but it requires gcc which I'm not keen on adding to the system if I can avoid it.
 
I found cxref in ports and tried it out, but it requires gcc which I'm not keen on adding to the system if I can avoid it.
It does? Is that as a package? It's probably saying that in the configure script, when in reality it's only looking for cc. Build it from source.
Specify on the command line of cxref -CPP clang and you're fine.
 
Yeah, a ./configure without gcc installed 'worked.' Unfortunately, cxref doesn't know what a _Noreturn is and doesn't work so good on FreeBSD:

Code:
cxref src/cxref.c
/usr/include/stdlib.h:86: cxref: syntax error

The previous 10, current and next 10 symbols are:
  0 | 291 : void
  1 | 257 : abort
  2 |  40 : (
  3 | 291 : void
  4 |  41 : )
  5 |  59 : ;
  6 | 295 : int
  7 | 257 : abs
  8 |  40 : (
  9 | 295 : int
 10 |  41 : )
 
Yup, that's why I asked the question. Crange and crtags look like they might just fit the bill. Thanks.
 
Back
Top