Difference between revisions of "Education Project/Effort/Math baseline alignment/Debuging starmath"
(→Interesting breakpoints) |
|||
Line 47: | Line 47: | ||
===Interesting breakpoints=== | ===Interesting breakpoints=== | ||
+ | |||
+ | SmRectangleNode::Arrange ( starmath/source/node.cxx, line 2329 ) | ||
+ | |||
+ | SmSubSupNode::Arrange ( starmath/source/node.cxx, line 1437 ) | ||
+ | |||
+ | SmMathSymbolNode::Arrange ( starmath/source/node.cxx, line 2731 ) | ||
+ | |||
+ | SmBinVerNode::Arrange ( starmath/source/node.cxx, line 1087 ) | ||
+ | |||
+ | === How add breakpoints === | ||
+ | |||
+ | |||
First try: | First try: | ||
Line 53: | Line 65: | ||
then create a new equation containing %tau a^2 + b^2 and notice the difference. | then create a new equation containing %tau a^2 + b^2 and notice the difference. | ||
+ | |||
Revision as of 10:20, 18 February 2008
Contents
Milestone
Current Build is m245
install it wherever ( Desktop is a good option on Mac OS X)
Debug
all libmath are stripped by default, and you'll have to add the symbols for debugging. Thus you'll have to rebuild starmath, and symlink with the new math libs.
Process
1) Build adding rectangles (for baselines and co )
-> uncomment line 93 in node.cxx : all formulas will be drawn with colored lines giving all alignment information ( Top Bottom Baseline when existing ..etc ) -> See screenshot
2) Build starmath again using :
cd starmath
mv unxmacxi.pro unxmacxi.pro_backup /* adapt to your architecture / OS */ build, debug="something_but_not_empty"
3) Link the new libs ( or use linkoo ) from inside the bundle :
3.1) cd ~/Desktop/test_print/OpenOffice.org 2.4.app/Contents/MacOS
3.2 remove the striped libs :
rm -f libsm680mxi.dylib libsmd680mxi.dylib
3.3 create symlinks for the non strippied one :
ln -s ~/Desktop/SRC680_m245/starmath/unxmacxi.pro/lib/libsm680mxi.dylib . ln -s ~/Desktop/SRC680_m245/starmath/unxmacxi.pro/lib/libsmd680mxi.dylib .
!! don't forget the points !!
4) run gdb (from the previous location, inside the bundle) :
gdb --args soffice.bin - ( the " - " will open a new empty Writer document )
Interesting breakpoints
SmRectangleNode::Arrange ( starmath/source/node.cxx, line 2329 )
SmSubSupNode::Arrange ( starmath/source/node.cxx, line 1437 )
SmMathSymbolNode::Arrange ( starmath/source/node.cxx, line 2731 )
SmBinVerNode::Arrange ( starmath/source/node.cxx, line 1087 )
How add breakpoints
First try:
type an equation containing a^2 + b^2 , exit formula ( ESC twice ) then enter the word "text"
then create a new equation containing %tau a^2 + b^2 and notice the difference.
First breakpoint: parse.cxx:398
When entering whatever letter, you hit a breakpoint. Just trace after it, and compare the two equations (e.g.)
Entering %tau a^2 + b^2 , you'll see the line starmath/source/parse.cxx:770
- FIXME* : verify what makes ( if (aTmpRes.TokenType & KParseType::IDENTNAME)) true