From: James M. D. <mdu...@ya...> - 2002-12-31 17:44:22
|
Dude! the cvs updates made a big difference! now l and w are working! you rock! --- "R. Bernstein" <ro...@pa...> wrote: > James Michael DuPont writes: > > ok, let me put this in another way : > > Is there a way to pull out all of the knowledge that you have > about a > > give bash routine into a file? or at least an interator function > that > > visits each node uniquly? > > Not that I know of. I don't see a need for this for debugger > operations. If you have a need for this perhaps you could write > something. Yes, I will. The whole problem is that a debugger is really needed, and sometimes we need to sift through a bash script with an editor looking for things. Or want to extract data out of a given bash script, then you need an intermediate form for the scripts. For me it is very important to be able to extract the data out of the build scripts, so Make uses bash all the time, and in order to be able to extract the data out of a makefile, we also have to be able to extract the data out of bash. > > > > > I would like to have a routine that visits all the internal > COMMAND and > > WORD objects, so that I can use that as input into the > introspector. > > > > The thing is that, I need to see : > > 1. what file a node (COMMAND,WORD) comes from. > > 2. what type it is (unary expr, function call, function decl) > > 3. what line number/column it came from > > The bash "declare" statement can probably give some of this > information. "declare -F" lists all functions. "declare -a" lists all > arrays. that is really cool!! I never used this before! >A variable name can be given too. See the bash documentation > on declare. (Note: make sure you look at the doc that comes with the > debugger since in fact declare has been extended to give line and > source file information for functions; it does this because the > debugger needs that info.) Ok, I will read the docs :) > > Names that pertain to the debugger start _bashdb. But alas there are > stll a few debugger variables however that don't start _bashdb; they > all do start with an underscore though. > > > > > I use the redland rdf lib for storing this information, and to be > able > > to gather all of that out of a ./configure file would be very > usefull. > > > > Also, we need to figure out the sources before they are > interpolated > > and afterwards. > > In bashdb, the command "info files" lists all the file the debugger > knows about - has seen so far. You can look at the code to find the > array that stores that. _bashdb_file2var as mentioned before does the > name mangling. From that, if you need a reverse mapping you can > probably create it. cool! that is really good. Now i can figure out this silly automake libtool stuff! so, happy new years again, I gotta get ready to party! mike ===== James Michael DuPont http://introspector.sourceforge.net/ __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |