command line source navigation tools

This is a discussion on command line source navigation tools within the Linux Programming forums, part of the Platform Specific Boards category; Q1 I've seen the way 'less' can interact with ctags... i.e. less -t <tagname> firing up sourcecode for a function ...

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    1

    command line source navigation tools

    Q1 I've seen the way 'less' can interact with ctags...
    i.e. less -t <tagname> firing up sourcecode for a function definition...
    Anyone know the most convineint way of making a directory recursive version of this behaviour?

    Q2 are there command line tools for linux to generate and navigate call-graphs and so on from c/c++ source?

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    Quote Originally Posted by ceti331 View Post
    Q1 I've seen the way 'less' can interact with ctags...
    i.e. less -t <tagname> firing up sourcecode for a function definition...
    Anyone know the most convineint way of making a directory recursive version of this behaviour?
    Have you looked at cscope? Its interface is more complicated than a simple command line but it works inside a terminal. I use it plugged straight into emacs.

    Q2 are there command line tools for linux to generate and navigate call-graphs and so on from c/c++ source?
    Do you want to do this statically, as in generate a printout of the program graph? I've never had the need to do that, but I use cscope all the time to jump around in code quickly. It's easy to ask where a function or symbol is defined, every location where it is referenced, get a list of all functions called by function X(), get a list of all functions which call function X(), etc.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,494
    Doxygen perhaps?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Threads to keep the CPU faster than the disk?
    By matthew180 in forum C Programming
    Replies: 4
    Last Post: 06-06-2007, 03:23 PM
  2. Source routing
    By failure_to in forum Networking/Device Communication
    Replies: 2
    Last Post: 06-04-2004, 04:34 PM
  3. Tutorial review
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-22-2004, 08:40 PM
  4. source style recommendations: in search of...
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-04-2001, 06:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21