Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6893809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:42:18+00:00 2026-05-27T06:42:18+00:00

Sometimes I am reading some code and would like to find the definition for

  • 0

Sometimes I am reading some code and would like to find the definition for a certain symbol, but it is sprinkled throughout the code to such an extent that grep is more or less insufficient for pointing me to its definition.

For example, I am working with Zlib and I want to figure out what FAR means.

Steven@Steven-PC /c/Users/Steven/Desktop/zlib-1.2.5
$ grep "FAR" * -R | wc -l
260

That’s a lot to scan through. It turns out it is in fact #defined to nothing but it took me some time to figure it out.

If I was using Eclipse I would have it easy because I can just hover over the symbol and it will tell me what it is.

What kinds of tools out there can I use to analyze code in this way? Can GCC do this for me? clang maybe? I’m looking for something command-line preferably. Some kind of tool that isn’t a full fledged IDE at any rate.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:42:18+00:00Added an answer on May 27, 2026 at 6:42 am

    You may want to check out cscope, it’s basically made for this, and a command line tool (if you like, using ncurses). Also, libclang (part of clang/llvm) can do so – but that’s just a library (but took me just ~100 lines of python to use libclang to emulate basic cscope features).

    cscope requires you to build a database first. libclang can parse code “live”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I reading some code, for integer, they use bunch of different type such
I'm writing some code for a statistics package, and I start off by reading
I found this while reading some source code. #define MACRO(x) if((void) 0, (x)); else
In reading Haskell-related stuff I sometimes come across the expression tying the knot, I
I am reading up about Encoding and Decoding and I noticed that sometimes people
I have been reading about Quicksort and found that sometimes it' s referred to
Sometimes I need to quickly extract some arbitrary data from XML files to put
Sometimes I have to work on code that moves the computer clock forward. In
Sometimes a labeled break or continue can make code a lot more readable. OUTERLOOP:
I am reading a million plus files to scrape out some data. The files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.