Code Browser Download

0 views
Skip to first unread message

Danel Potvin

unread,
Aug 4, 2024, 7:33:07 PM8/4/24
to planfeleavi
Thefunction signature contains the name of all the argument (useful to know what 'false, true' means), in addition to the type of each argument and their default value if any.

For virtual functions, you can quickly go to the implementation of the inherited functions


Clicking on a function brings you directly to the implementation. Just like normal URL, you can open it in a tab or new window and use the back button of your browser to come back where you came from.


Semantic highlighting makes reading a piece of code easier as it helps differentiating what is what. You can quickly differentiate local variables from member variables or global variables. Virtual functions are in italic. You can see what is a macros, a typedef, or a type.


If you are interested in the implementation, you can browse the sources of the generator using the Code Browser itself. Or clone the repository from github. You can report issues on the github bugtracker.


I sometimes need to modify OSS code or other peoples' code (usually C-based, but sometimes C++/Java) and find myself "grep"ing headers for types, function declarations etc. as I follow code flow and try to understand the system. Is there a good tool that exists to aid in code browsing. I'd love to be able to click on a type and be taken to the declaration or click on a function name and be taken to it's implementation. I'm on a linux box, so replies like "just use Visual Studio" won't necessarily work for me. Thanks!


I use Vim with ctags and taglist plugins. You can move the cursor to a variable name and with a key combination it will take you to the declaration of the variable (and back). Taglist will also show an overview of all functions, classes etc. in a side bar.


OpenGrok is a fast and usable source code search and cross reference engine. It helps you search, cross-reference and navigate your source tree. It can understand various program file formats and version control histories like Mercurial, Git, SCCS, RCS, CVS, Subversion, Teamware, ClearCase, Perforce and Bazaar. In other words it lets you grok (profoundly understand) the open source, hence the name OpenGrok. It is written in Java.


edit: Why has this been voted down? It is a valid answer. Eclipse with the C/C++ addon will allow the question author to do what he is wanting to do. I am not the only one to have suggested, yet the others have not been voted down. So why has this one been voted down?


ctags is very useful. There are two steps involved. First run the program ctags on all your source and include directories. This creates a file named 'tags' in the local directory. ctags *.c *.h would do fine if all your source is in a single directory. When you work with source in multiple directories, it can be worth running ctags in multiple locations. Then, within vi, with your cursor on any function, defined type or variable use ctl-] to go to the definition of that entity. Use etags if you're using emacs.


Doxygen is wonderful. I've had to get across several legacy code bases that I was never involved in before, and it's been fantastic for that (even though the code bases were not documented using Doxygen format).


If you are involved in projects which have a mix of HLL code along with Assembly i'd recommend Opengrok, i have recently shifted to Opengrok and find it amazing, Opengrok + Firefox + Extensions is the best combination in my opinion, a few firefox extensions like Scrapbook etc allow you to modify and add notes while you are browsing code, again this is mostly for 'Browsing' through code and not for modifying it on the fly.


This tool generated a javadoc like bunch of html pages, allowing to index all the code, to browse in it (where is this function used, and by which function...), like you can do in an IDE. It is very easy to make it work.


I had once to maintain 2000 files of C code of a 15 years old C project. It took me an hour to index the code with doxygen a provide the other developers with the generated doc. (I know, this phrase sounds like an add, but it is true... It's really a nice tool)


IntelliJ is pretty good as a source browser under Linux. It's got really good support for jumping between source and function declarations. Haven't tried it with C/C++ code, but it works well with Ruby and Java.


I've not used it directly, but I have used sites created with lxr and thought it very handy. It converts your project into line-numbered and cross-referenced HTML files, using links to cross-reference function and file names. There are some examples of projects source indexed with it here.


I use kscope, which uses cscope in the background, but provides function lists etc. as well. Seems to handle large projects like the linux kernel well too. Thekscope homepage has a good concise description of what it does and doesn't do.


A language-sensitive source code search engine can be foundat SD Source Code Search Engine. It can handle many languages at the same time.Searches can be performed for patterns in a specific langauge,or patterns across languages (such as "find identifiers involving TAX").By being sensitive to langauge tokens, the number of false positives is reduced,saving time for the user. It understands C, C++, C#, COBOL, Java, ECMAScript, Java, XML, Verilog, VHDL, and a number of other languages.


Thank you for your post and welcome to the community! If the recipient provides you with their PayPal email address, phone number, or username, you would be able to use one of those pieces of information for making the payment from a web browser.


I am doing this as a donation, and would like to be able to make the payment semi-anonymously . i.e similar to be able to pay a invoice link with a credit card via browser page as a guest not logged into the paypal account.


How to open the Code Browser in cadence. I have trouble finding out all the child functions that are used by some of the bigger functions. What approach are you guys following? I am just trying to get the coordinates of the bounding boxes for all the different metal layers that exist in the layout.


There are a few things you can use to help you find functions, but there isn't really a code browser. From a shell window you can run "cdsFinder" or from your CIW "startFinder". This interface will help you find skill functions and their basic usage.


If you own a Skill Development license, you can profile the peformance of the code your run and then view a tree of this code. In most cases, if it is a Cadence built in command, you won't see much of a tree, but for your internal code you'll see a full tree. To run this, go to your CIW->Tools->Skill Development, then press the Profiler button. On the new interface, press the triangle button (start) and then invoke your top level Skill command. When the command finishes, press the stop button. Then press the tree button to get an interface to browse the tree. Right clicking on a command will give you the option to expand the tree.


Another option is to turn tracing on. In your CIW, type trace(t). This will create an enormous amount of output to your CIW, so you only want to turn it on just before you run a command and then turn it off with untrace(). This will trace all the function calls that take place and show you the return values of the calls.


Actually there is a code browser in the SKILL Development tools (it's been there for as long as I can remember) - without you having to run the profiler - but you'll only be able to browse your own code (essentially code that isn't read protected). Not that sure what you are trying to do here...


I would like to share code between the client and the server. I have only just started with Node.js and my knowledge of modern JavaScript is a little rusty, to say the least. So I am still getting my head around the CommonJS require() function. If I am creating my packages by using the 'export' object, then I cannot see how I could use the same JavaScript files in the browser.


I want to create a set of methods and classes that are used on both ends to facilitate encoding and decoding messages, and other mirrored tasks. However, the Node.js/CommonJS packaging systems seems to preclude me from creating JavaScript files that can be used on both sides.


I also tried using JS.Class to get a tighter OO model, but I gave up because I couldn't figure out how to get the provided JavaScript files to work with require(). Is there something am I missing here?


If you want to write a module that can be used both client side and server side, I have a short blog post on a quick and easy method: Writing for Node.js and the browser, essentially the following (where this is the same as window):


Don't forget that the string representation of a JavaScript function represents the source code for that function. You could simply write your functions and constructors in an encapsulated way so they can be toString()'d and sent to the client.


Another way to do it is use a build system, put the common code in separate files, and then include them in both the server and client scripts. I'm using that approach for a simple client/server game via WebSockets where the server and client both run essentially the same game loop and the client synchronises up with the server every tick to make sure nobody's cheating.


My build system for the game is a simple Bash script that runs the files through the C preprocessor and then through sed to clean up some junk cpp leaves behind, so I can use all the normal preprocessor stuff like #include, #define, #ifdef, etc.


I would recommend looking into the RequireJS adapter for Node.js. The problem is that the CommonJS module pattern Node.js uses by default isn't asynchronous, which blocks loading in the web browser. RequireJS uses the AMD pattern, which is both asynchronous and compatible with both server and client, as long as you use the r.js adapter.


I wanted to make a couple of simple string utility functions, declared on String.prototype, available to both node and the browser. I simply keep these functions in a file called utilities.js (in a subfolder) and can easily reference it both from a script-tag in my browser code, and by using require (omitting the .js extension) in my Node.js script:

3a8082e126
Reply all
Reply to author
Forward
0 new messages