Currently, all DOMSources and DOMFunctions are at the same level in the tree, meaning when an iteration is done to find a particular function, it must search through every function in the source tree even though we know which source file it is located in. This can be fixed by making the function jdom objects children of source objects.
Log message: frysk-core/frysk/dom: 2007-01-05 Mike Cvet <mcvet@redhat.com> * DOMFunction.java (parent): Changed to a DOMSource. Now resides with DOMSource as a parent rather than DOMImage. Fixes #3834. (createDOMFunction): Takes a DOMSource. (setParent): Ditto. (getSource): Can now just return the parent, being a DOMSource. * DOMImage.java (addFunction): Moved to DOMSource. (getFunction): Ditto. (getFunctions): Ditto. (findFunction): Ditto. * DOMInlineInstance.java: Applied GNU formatting. (NUM_LINE): Added - tag for source line this inline instance is called from. (parent): Added. (setParent): Added. (DOMInlineInstance): Now takes another int, being the line number of this inline instance in the source. (getDeclaration): Now returns the function from the DOMSource parent. (getLine): Added. (addInlineInst): Takes an extra int for line number. * DOMLine.java (getInlines): Moved to DOMSource. (addInlineInst): Ditto. (getInlineInst): Ditto. * DOMSource.java: Now is a DOM parent for DOMInlineInstance and DOMFunction. Fixes #3834. (addFunction): Moved from DOMImage. (getFunction): Ditto. (findFunction): Ditto. (getFunctions): Ditto. (addInlineInst): Moved from DOMLine. (getInlineInst): Ditto. (getInlines): Ditto (also takes an int for line number). * TestDOM.java (testDOMSource): Added some inline tests. (testDOMLine): Removed some inline tests. (testDOMInlineInstance): Now calls a * cparser/CDTParser.c (image): Removed. Made redundant by new DOMSource. (enterFunctionBody): Now uses DOMSource and calls updated addFunction() method. (exitFunctionBody): Calls source instead of image. frysk-gui/frysk/gui/srcwin: 2007-01-05 Mike Cvet <mcvet@redhat.com> * SourceWindow.java (generateProcStackTrace): Calls updated findFunction in DOMSource. * SourceBuffer.java (getInlineInstance): Gets inlines from DOMSource. (createTags): Ditto. * InlineBuffer.java: Applied GNU formatting. (createTags): Gets inlines from DOMSource.