Re: debugging with gdb

2012-05-10 Thread Ochirov Nikolay
Hi, all!
Thank you, Ariel and Eric!
Thanks to your tips i begin to understand what's what)

and one more question:
build script gives this warning:
...
WARNING(S):
Some modules contain old output trees! Please check:
instsetoo_nativeuser@ubuntu:~/ooo/main/instsetoo_native$ clean output trees
...

What does it mean the message clean output trees? How to do that?
Regars,
Nikolay.
2012/5/9 Ariel Constenla-Haile arie...@apache.org

 Hi Nikolay,

 On Wed, May 09, 2012 at 07:07:49PM +0400, Ochirov Nikolay wrote:
  Hi all!
  Again, it doesn't work
 
  Here's the output gdb:
  ...
  0x0349594f in?? () From / opt / openoffice.org / ure / lib /
  bootstrap.uno.so
 
  I rebuilt the module stoc as Eric suggested:
 ooo cd / main / stoc
 mv unxlng *. pro unxlng *. pro_back
 build debug = t

 Don't miss the dbglevel if you want extra debug code (usually ifdefined)

 build debug=true dbglevel=3

 
  And if I understand correctly, received new libraries i copied to the
 /opt/
  openoffice.org/basis.3/programm/libs

 this library belongs to the URE:

 [ariel@localhost ~]$ locate bootstrap.uno.so
 /opt/openoffice.org/ure/lib/bootstrap.uno.so


 Regards
 --
 Ariel Constenla-Haile
 La Plata, Argentina



Re: debugging with gdb

2012-05-09 Thread Ochirov Nikolay
Hi all!
Again, it doesn't work

Here's the output gdb:
...
0x0349594f in?? () From / opt / openoffice.org / ure / lib /
bootstrap.uno.so

I rebuilt the module stoc as Eric suggested:
   ooo cd / main / stoc
   mv unxlng *. pro unxlng *. pro_back
   build debug = t

And if I understand correctly, received new libraries i copied to the /opt/
openoffice.org/basis.3/programm/libs
Maybe I did something wrong again?
Regards,
Nikolay.

2012/5/9 Ariel Constenla-Haile arie...@apache.org

 Hi Nikolay,

 On Tue, May 08, 2012 at 11:21:03PM +0400, Ochirov Nikolay wrote:
  Thank you for help, Ariel!
  Your hint is very usefull! I didn't clean, yes)
  And one more question if i may:
  Which module should be rebuilt in order to get the debugging symbols for
  bootstrap.uno.so?

 For modules not converted to gbuild, you can search the library in
 module/OUT/lib

 For example:

 ]$ cd trunk/main/
 ]$ find -name bootstrap.uno.so
 ./solver/340/unxlngx6/lib/bootstrap.uno.so
 ./stoc/unxlngx6/lib/bootstrap.uno.so
 ./instsetoo_native/unxlngx6/OpenOffice/installed/install/de/
 openoffice.org/ure/lib/bootstrap.uno.so
 ./instsetoo_native/unxlngx6/OpenOffice/installed/install/es/
 openoffice.org/ure/lib/bootstrap.uno.so
 ./instsetoo_native/unxlngx6/OpenOffice/installed/install/en-US/
 openoffice.org/ure/lib/bootstrap.uno.so


 The answer is module stoc.

 Modules converted to gbuild don't generate files inside the module
 folder (only logs, if you built with --html). I guess that here you can
 find the pattern module/Library_LIBNAME.mk

 For example, if you want to find vbaswobj.uno.so, strip all prefixes and
 suffixes from the library name (lib, uno, so) and search for

 Library_vbaswobj.mk

 ]$ find -name Library_vbaswobj.mk
 ./sw/Library_vbaswobj.mk


 It is built in sw.

 Hope this helps :)


 Regards
 --
 Ariel Constenla-Haile
 La Plata, Argentina



Re: debugging with gdb

2012-05-09 Thread Ariel Constenla-Haile
Hi Nikolay,

On Wed, May 09, 2012 at 07:07:49PM +0400, Ochirov Nikolay wrote:
 Hi all!
 Again, it doesn't work
 
 Here's the output gdb:
 ...
 0x0349594f in?? () From / opt / openoffice.org / ure / lib /
 bootstrap.uno.so
 
 I rebuilt the module stoc as Eric suggested:
ooo cd / main / stoc
mv unxlng *. pro unxlng *. pro_back
build debug = t

Don't miss the dbglevel if you want extra debug code (usually ifdefined)

build debug=true dbglevel=3

 
 And if I understand correctly, received new libraries i copied to the /opt/
 openoffice.org/basis.3/programm/libs

this library belongs to the URE:

[ariel@localhost ~]$ locate bootstrap.uno.so
/opt/openoffice.org/ure/lib/bootstrap.uno.so


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


pgpnDgGG6Joyi.pgp
Description: PGP signature


Re: debugging with gdb

2012-05-08 Thread Ochirov Nikolay
gdb is still writes to console - debugging symbols not found
Can anyone give an example of configure script for configuration with
debugging symbols
2012/5/8 Ariel Constenla-Haile arie...@apache.org

 Hi Nikolay,

 On Tue, May 08, 2012 at 12:25:15AM +0400, Ochirov Nikolay wrote:
  Thank you, Ariel!
  I will try to deal with gbuild. This is somwthing new)
  In general, I want to debug feature Desktop::Main().  After correcting i
  have error in it.

 then you should rebuild trunk/main/desktop with debugging symbols *and*
 also add trunk/main/vcl. Note that soffice is simple a shell script, you
 should debug soffice.bin. A typical gdb session:

 ]$ gdb soffice.bin
 Reading symbols from
 /home/ariel/OOo/AOOo/openoffice.org3/program/soffice.bin...done.

 (gdb) break desktop::Desktop::Main
 Function desktop::Desktop::Main not defined.
 Make breakpoint pending on future shared library load? (y or [n]) y
 Breakpoint 1 (desktop::Desktop::Main) pending.

 (gdb) start

 Temporary breakpoint 2 at 0x4011c3: file main.c, line 30.
 Temporary breakpoint 2, main (argc=1, argv=0x7fffddb8) at main.c:30
 30  SAL_IMPLEMENT_MAIN() {

 (gdb) c
 Continuing.

 Breakpoint 1, desktop::Desktop::Main (this=0x7fffdc00) at
 /mnt/build/openoffice/apache/trunk/main/desktop/source/app/app.cxx:1772
 1772pExecGlobals = new ExecuteGlobals();

 (gdb) bt
 #0  desktop::Desktop::Main (this=0x7fffdc00) at
 /mnt/build/openoffice/apache/trunk/main/desktop/source/app/app.cxx:1772
 #1  0x740ed3ba in ImplSVMain () at
 /mnt/build/openoffice/apache/trunk/main/vcl/source/app/svmain.cxx:193
 #2  0x740ed4ff in SVMain () at
 /mnt/build/openoffice/apache/trunk/main/vcl/source/app/svmain.cxx:230
 #3  0x779837eb in soffice_main () at
 /mnt/build/openoffice/apache/trunk/main/desktop/source/app/sofficemain.cxx:45
 #4  0x004011f4 in sal_main () at main.c:31
 #5  0x004011d9 in main (argc=1, argv=0x7fffddb8) at main.c:30



 Debugging AOO can take to very deep levels, there is no other way to
 learn this other than debugging. Some guys have set up an OpenGrok
 instance at http://opengrok.adfinis-sygroup.org/ you will find this tool
 rather useful.

 http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/desktop/source/app/app.cxx#1770


 I forgot to add that when building individual modules not ported to
 gbuild, you should run

 build
 deliver


 deliver will copy the files to the solver. You don't need to re-build,
 re-package the whole office. I simply copy the files from
 trunk/main/solver/340/*/lib|bin to the office installation.


 Regards
 --
 Ariel Constenla-Haile
 La Plata, Argentina



Re: debugging with gdb

2012-05-08 Thread Andre Fischer

Hm,

There was small typo in one of the build command line.  It should be

cd trunk/main/desktop
build debug=true dbglevel=3
^

The missing b does not lead to an error,  the debug information is just 
not added.


-Andre

On 08.05.2012 16:56, Ochirov Nikolay wrote:

gdb is still writes to console - debugging symbols not found
Can anyone give an example of configure script for configuration with
debugging symbols
2012/5/8 Ariel Constenla-Hailearie...@apache.org


Hi Nikolay,

On Tue, May 08, 2012 at 12:25:15AM +0400, Ochirov Nikolay wrote:

Thank you, Ariel!
I will try to deal with gbuild. This is somwthing new)
In general, I want to debug feature Desktop::Main().  After correcting i
have error in it.


then you should rebuild trunk/main/desktop with debugging symbols *and*
also add trunk/main/vcl. Note that soffice is simple a shell script, you
should debug soffice.bin. A typical gdb session:

]$ gdb soffice.bin
Reading symbols from
/home/ariel/OOo/AOOo/openoffice.org3/program/soffice.bin...done.

(gdb) break desktop::Desktop::Main
Function desktop::Desktop::Main not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (desktop::Desktop::Main) pending.

(gdb) start

Temporary breakpoint 2 at 0x4011c3: file main.c, line 30.
Temporary breakpoint 2, main (argc=1, argv=0x7fffddb8) at main.c:30
30  SAL_IMPLEMENT_MAIN() {

(gdb) c
Continuing.

Breakpoint 1, desktop::Desktop::Main (this=0x7fffdc00) at
/mnt/build/openoffice/apache/trunk/main/desktop/source/app/app.cxx:1772
1772pExecGlobals = new ExecuteGlobals();

(gdb) bt
#0  desktop::Desktop::Main (this=0x7fffdc00) at
/mnt/build/openoffice/apache/trunk/main/desktop/source/app/app.cxx:1772
#1  0x740ed3ba in ImplSVMain () at
/mnt/build/openoffice/apache/trunk/main/vcl/source/app/svmain.cxx:193
#2  0x740ed4ff in SVMain () at
/mnt/build/openoffice/apache/trunk/main/vcl/source/app/svmain.cxx:230
#3  0x779837eb in soffice_main () at
/mnt/build/openoffice/apache/trunk/main/desktop/source/app/sofficemain.cxx:45
#4  0x004011f4 in sal_main () at main.c:31
#5  0x004011d9 in main (argc=1, argv=0x7fffddb8) at main.c:30



Debugging AOO can take to very deep levels, there is no other way to
learn this other than debugging. Some guys have set up an OpenGrok
instance at http://opengrok.adfinis-sygroup.org/ you will find this tool
rather useful.

http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/desktop/source/app/app.cxx#1770


I forgot to add that when building individual modules not ported to
gbuild, you should run

build
deliver


deliver will copy the files to the solver. You don't need to re-build,
re-package the whole office. I simply copy the files from
trunk/main/solver/340/*/lib|bin to the office installation.


Regards
--
Ariel Constenla-Haile
La Plata, Argentina





Re: debugging with gdb

2012-05-08 Thread Ochirov Nikolay
Thank you, Andre, I notice that.
I rebuilt desktop module but still nothing happened.
I will try again)

2012/5/8 Andre Fischer a...@a-w-f.de

 Hm,

 There was small typo in one of the build command line.  It should be

cd trunk/main/desktop
build debug=true dbglevel=3
^

 The missing b does not lead to an error,  the debug information is just
 not added.

 -Andre


 On 08.05.2012 16:56, Ochirov Nikolay wrote:

 gdb is still writes to console - debugging symbols not found
 Can anyone give an example of configure script for configuration with
 debugging symbols
 2012/5/8 Ariel Constenla-Hailearielch@**apache.org arie...@apache.org

  Hi Nikolay,

 On Tue, May 08, 2012 at 12:25:15AM +0400, Ochirov Nikolay wrote:

 Thank you, Ariel!
 I will try to deal with gbuild. This is somwthing new)
 In general, I want to debug feature Desktop::Main().  After correcting i
 have error in it.


 then you should rebuild trunk/main/desktop with debugging symbols *and*
 also add trunk/main/vcl. Note that soffice is simple a shell script, you
 should debug soffice.bin. A typical gdb session:

 ]$ gdb soffice.bin
 Reading symbols from
 /home/ariel/OOo/AOOo/**openoffice.org3/program/**soffice.bin...done.

 (gdb) break desktop::Desktop::Main
 Function desktop::Desktop::Main not defined.
 Make breakpoint pending on future shared library load? (y or [n]) y
 Breakpoint 1 (desktop::Desktop::Main) pending.

 (gdb) start

 Temporary breakpoint 2 at 0x4011c3: file main.c, line 30.
 Temporary breakpoint 2, main (argc=1, argv=0x7fffddb8) at main.c:30
 30  SAL_IMPLEMENT_MAIN() {

 (gdb) c
 Continuing.

 Breakpoint 1, desktop::Desktop::Main (this=0x7fffdc00) at
 /mnt/build/openoffice/apache/**trunk/main/desktop/source/app/**
 app.cxx:1772
 1772pExecGlobals = new ExecuteGlobals();

 (gdb) bt
 #0  desktop::Desktop::Main (this=0x7fffdc00) at
 /mnt/build/openoffice/apache/**trunk/main/desktop/source/app/**
 app.cxx:1772
 #1  0x740ed3ba in ImplSVMain () at
 /mnt/build/openoffice/apache/**trunk/main/vcl/source/app/**
 svmain.cxx:193
 #2  0x740ed4ff in SVMain () at
 /mnt/build/openoffice/apache/**trunk/main/vcl/source/app/**
 svmain.cxx:230
 #3  0x779837eb in soffice_main () at
 /mnt/build/openoffice/apache/**trunk/main/desktop/source/app/**
 sofficemain.cxx:45
 #4  0x004011f4 in sal_main () at main.c:31
 #5  0x004011d9 in main (argc=1, argv=0x7fffddb8) at main.c:30



 Debugging AOO can take to very deep levels, there is no other way to
 learn this other than debugging. Some guys have set up an OpenGrok
 instance at 
 http://opengrok.adfinis-**sygroup.org/http://opengrok.adfinis-sygroup.org/you
  will find this tool
 rather useful.

 http://opengrok.adfinis-**sygroup.org/source/xref/aoo-**
 trunk/main/desktop/source/app/**app.cxx#1770http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/desktop/source/app/app.cxx#1770


 I forgot to add that when building individual modules not ported to
 gbuild, you should run

 build
 deliver


 deliver will copy the files to the solver. You don't need to re-build,
 re-package the whole office. I simply copy the files from
 trunk/main/solver/340/*/lib|**bin to the office installation.


 Regards
 --
 Ariel Constenla-Haile
 La Plata, Argentina





Re: debugging with gdb

2012-05-08 Thread Ariel Constenla-Haile
Hi Nikolay,

On Tue, May 08, 2012 at 08:47:37PM +0400, Ochirov Nikolay wrote:
 Thank you, Andre, I notice that.
 I rebuilt desktop module but still nothing happened.
 I will try again)

There might be some missing step, please copy the steps you are
following, how and where are you copying the libraries with debugging
symbols, etc.


 2012/5/8 Andre Fischer a...@a-w-f.de
 
  Hm,
 
  There was small typo in one of the build command line.  It should be
 
 cd trunk/main/desktop
 build debug=true dbglevel=3
 ^

ups, my mistake!
Fixing this, and following the steps posted in the other mails should
work out of the box.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


pgpT1waJ0PnOV.pgp
Description: PGP signature


Re: debugging with gdb

2012-05-08 Thread Ariel Constenla-Haile
Hi Nikolay,

On Tue, May 08, 2012 at 10:08:37PM +0400, Ochirov Nikolay wrote:
 Hi,
 that's part of gdb session:
 ...
 Continuing.
 #0  desktop::Desktop::Main (this=0xbfc28244)
 at /home/user/ooo/main/desktop/source/app/app.cxx:1670
 #1  0x018b410d in ImplSVMain() ()
from /opt/openoffice.org3/program/../basis-link/program/libvcl.so
 #2  0x018b42a4 in SVMain() ()
from /opt/openoffice.org3/program/../basis-link/program/libvcl.so
 #3  0x0027199c in soffice_main ()
 from /opt/openoffice.org3/program/../basis-link/program/libsofficeapp.so
 #4  0x08048d14 in main ()
 
 there are no symbols for module vcl,  although i have rebuil /main/vcl so:
 cd ooo/main/vcl

did you clean first?

cd trunk/main/vcl
make -sr clean

 make -sr DEBUG=yes
 what am i doing wrong ?

and then copy the libraries from the solver to the office installation.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


pgpImvrHByrIK.pgp
Description: PGP signature


Re: debugging with gdb

2012-05-08 Thread eric b


Le 8 mai 12 à 20:08, Ochirov Nikolay a écrit :


Hi,
that's part of gdb session:
...
Continuing.
#0  desktop::Desktop::Main (this=0xbfc28244)   at /home/user/ooo/ 
main/desktop/source/app/app.cxx:1670
#1  0x018b410d in ImplSVMain() ()   from /opt/openoffice.org3/ 
program/../basis-link/program/libvcl.so
#2  0x018b42a4 in SVMain() ()   from /opt/openoffice.org3/ 
program/../basis-link/program/libvcl.so
#3  0x0027199c in soffice_main () from /opt/openoffice.org3/ 
program/../basis-link/program/libsofficeapp.so

#4  0x08048d14 in main ()

there are no symbols for module vcl,  although i have rebuil /main/ 
vcl so:

cd ooo/main/vcl
make -sr DEBUG=yes
what am i doing wrong ?




in vcl, do :

mv unxlng*.pro  unxlng*.pro_back

build debug=t


= in  the new unxlng*.pro/lib, there will be some new libs,  
including symbols. Replace the stripped one you got in your set with  
these new libs.


Quit OpenOffice and run it again using gdb, and then you should be  
able to hit some breakpoints in vcl code.



FYI, I wrote this page some times ago : http://wiki.ooo4kids.org/ 
index.php/ClassRooms/gdbBasics




Regards,
Eric


sincerely,
Nikolay

2012/5/8 Ariel Constenla-Haile arie...@apache.org


Hi Nikolay,

On Tue, May 08, 2012 at 08:47:37PM +0400, Ochirov Nikolay wrote:

Thank you, Andre, I notice that.
I rebuilt desktop module but still nothing happened.
I will try again)


There might be some missing step, please copy the steps you are
following, how and where are you copying the libraries with debugging
symbols, etc.



2012/5/8 Andre Fischer a...@a-w-f.de


Hm,

There was small typo in one of the build command line.  It  
should be


   cd trunk/main/desktop
   build debug=true dbglevel=3
   ^


ups, my mistake!
Fixing this, and following the steps posted in the other mails should
work out of the box.


Regards
--
Ariel Constenla-Haile
La Plata, Argentina



--
qɔᴉɹə
Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
L'association EducOOo : http://www.educoo.org
Blog : http://eric.bachard.org/news







Re: debugging with gdb

2012-05-08 Thread Ochirov Nikolay
Thank you for help, Ariel!
Your hint is very usefull! I didn't clean, yes)
And one more question if i may:
Which module should be rebuilt in order to get the debugging symbols for
bootstrap.uno.so?
sincerely,
Nikolay.

2012/5/8 Ariel Constenla-Haile arie...@apache.org

 Hi Nikolay,

 On Tue, May 08, 2012 at 10:08:37PM +0400, Ochirov Nikolay wrote:
  Hi,
  that's part of gdb session:
  ...
  Continuing.
  #0  desktop::Desktop::Main (this=0xbfc28244)
  at /home/user/ooo/main/desktop/source/app/app.cxx:1670
  #1  0x018b410d in ImplSVMain() ()
 from /opt/openoffice.org3/program/../basis-link/program/libvcl.so
  #2  0x018b42a4 in SVMain() ()
 from /opt/openoffice.org3/program/../basis-link/program/libvcl.so
  #3  0x0027199c in soffice_main ()
  from /opt/openoffice.org3/program/../basis-link/program/libsofficeapp.so
  #4  0x08048d14 in main ()
 
  there are no symbols for module vcl,  although i have rebuil /main/vcl
 so:
  cd ooo/main/vcl

 did you clean first?

 cd trunk/main/vcl
 make -sr clean

  make -sr DEBUG=yes
  what am i doing wrong ?

 and then copy the libraries from the solver to the office installation.


 Regards
 --
 Ariel Constenla-Haile
 La Plata, Argentina



Re: debugging with gdb

2012-05-08 Thread Ariel Constenla-Haile
Hi Nikolay,

On Tue, May 08, 2012 at 11:21:03PM +0400, Ochirov Nikolay wrote:
 Thank you for help, Ariel!
 Your hint is very usefull! I didn't clean, yes)
 And one more question if i may:
 Which module should be rebuilt in order to get the debugging symbols for
 bootstrap.uno.so?

For modules not converted to gbuild, you can search the library in
module/OUT/lib

For example:

]$ cd trunk/main/
]$ find -name bootstrap.uno.so
./solver/340/unxlngx6/lib/bootstrap.uno.so
./stoc/unxlngx6/lib/bootstrap.uno.so
./instsetoo_native/unxlngx6/OpenOffice/installed/install/de/openoffice.org/ure/lib/bootstrap.uno.so
./instsetoo_native/unxlngx6/OpenOffice/installed/install/es/openoffice.org/ure/lib/bootstrap.uno.so
./instsetoo_native/unxlngx6/OpenOffice/installed/install/en-US/openoffice.org/ure/lib/bootstrap.uno.so


The answer is module stoc.

Modules converted to gbuild don't generate files inside the module
folder (only logs, if you built with --html). I guess that here you can
find the pattern module/Library_LIBNAME.mk

For example, if you want to find vbaswobj.uno.so, strip all prefixes and
suffixes from the library name (lib, uno, so) and search for

Library_vbaswobj.mk

]$ find -name Library_vbaswobj.mk
./sw/Library_vbaswobj.mk


It is built in sw.

Hope this helps :)


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


pgpDCr4qeYS9V.pgp
Description: PGP signature


debugging with gdb

2012-05-07 Thread Ochirov Nikolay
How to add debugging symbols of AOO in gdb?
I'm trying to debug the AOO but can't figure out how to add debug
information into gdb. I add  --enable-symbols in configure, and add the
path to the source into gdb(maybe it's not right?).
But when debugging gdb writes to the console - no debugging symbols
found. What's wrong?

Regards,
Nikolay.


Re: debugging with gdb

2012-05-07 Thread Ariel Constenla-Haile
Hello Nikolay,

On Mon, May 07, 2012 at 10:49:55PM +0400, Ochirov Nikolay wrote:
 How to add debugging symbols of AOO in gdb?
 I'm trying to debug the AOO but can't figure out how to add debug
 information into gdb. I add  --enable-symbols in configure, and add the
 path to the source into gdb(maybe it's not right?).
 But when debugging gdb writes to the console - no debugging symbols
 found. What's wrong?

Symbols are usually stripped, you should also add --disable-strip-solver

It's better to re-build some modules with special switches.

If the module is converted to gbuild:
make -sr clean
make -sr DEBUG=yes

In the older modules, clean the source tree and:
build debug=true dbglevel=3


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


pgpCBfKLtKBww.pgp
Description: PGP signature


Re: debugging with gdb

2012-05-07 Thread Ochirov Nikolay
Thank you, Ariel!
One more question - what is gbuild?

2012/5/7 Ariel Constenla-Haile arie...@apache.org

 Hello Nikolay,

 On Mon, May 07, 2012 at 10:49:55PM +0400, Ochirov Nikolay wrote:
  How to add debugging symbols of AOO in gdb?
  I'm trying to debug the AOO but can't figure out how to add debug
  information into gdb. I add  --enable-symbols in configure, and add the
  path to the source into gdb(maybe it's not right?).
  But when debugging gdb writes to the console - no debugging symbols
  found. What's wrong?

 Symbols are usually stripped, you should also add --disable-strip-solver

 It's better to re-build some modules with special switches.

 If the module is converted to gbuild:
 make -sr clean
 make -sr DEBUG=yes

 In the older modules, clean the source tree and:
 build debug=true dbglevel=3


 Regards
 --
 Ariel Constenla-Haile
 La Plata, Argentina



Re: debugging with gdb

2012-05-07 Thread Ariel Constenla-Haile
Hi Nikolay,

On Mon, May 07, 2012 at 11:16:55PM +0400, Ochirov Nikolay wrote:
 Thank you, Ariel!
 One more question - what is gbuild?

AOO build environment is a mix of a Perl script (build.pl) + Dmake and
the newly introduced Gbuild, a build system based only on GNU Make.

Some modules have been ported to the new build environment, you can
find it out by looking at the module folder, for example:

vcl, sfx2, sw:
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/

they all have 

* a main general Makefile 
* a Module_$MODULENAME.mk
* a Library_$LIBRARYNAME.mk per library
* etc.


Modules not ported to gbuild do not have those makefiles, see sd, sc,
avmedia for example
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/avmedia/


You build the whole office in trunk/main/instsetoo_native/ with

cd main/instsetoo_native/
build --html --all -P8 -- -P4 (an example, only)


You build individual modules not ported to gbuild with the build.pl script:

cd trunk/main/sc/
build deug=true dbglevel=3

You build individual modules ported to gbuild with make:

cd trunk/main/vcl/
make -sr DEBUG=yes


Of course, you have to know which modules to build with debugging
symbols. If you can't figure it out, just tell us what you are
interested in debugging and we'll give you a hint.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


pgpCYoMUkaDNL.pgp
Description: PGP signature


Re: debugging with gdb

2012-05-07 Thread Ochirov Nikolay
Thank you, Ariel!
I will try to deal with gbuild. This is somwthing new)
In general, I want to debug feature Desktop::Main().  After correcting i
have error in it.
Regards,
Nikolay
2012/5/7 Ariel Constenla-Haile arie...@apache.org

 Hi Nikolay,

 On Mon, May 07, 2012 at 11:16:55PM +0400, Ochirov Nikolay wrote:
  Thank you, Ariel!
  One more question - what is gbuild?

 AOO build environment is a mix of a Perl script (build.pl) + Dmake and
 the newly introduced Gbuild, a build system based only on GNU Make.

 Some modules have been ported to the new build environment, you can
 find it out by looking at the module folder, for example:

 vcl, sfx2, sw:
 http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/
 http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/
 http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/

 they all have

 * a main general Makefile
 * a Module_$MODULENAME.mk
 * a Library_$LIBRARYNAME.mk per library
 * etc.


 Modules not ported to gbuild do not have those makefiles, see sd, sc,
 avmedia for example
 http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/
 http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/
 http://svn.apache.org/viewvc/incubator/ooo/trunk/main/avmedia/


 You build the whole office in trunk/main/instsetoo_native/ with

 cd main/instsetoo_native/
 build --html --all -P8 -- -P4 (an example, only)


 You build individual modules not ported to gbuild with the build.plscript:

 cd trunk/main/sc/
 build deug=true dbglevel=3

 You build individual modules ported to gbuild with make:

 cd trunk/main/vcl/
 make -sr DEBUG=yes


 Of course, you have to know which modules to build with debugging
 symbols. If you can't figure it out, just tell us what you are
 interested in debugging and we'll give you a hint.


 Regards
 --
 Ariel Constenla-Haile
 La Plata, Argentina



Re: debugging with gdb

2012-05-07 Thread Ariel Constenla-Haile
Hi Nikolay,

On Tue, May 08, 2012 at 12:25:15AM +0400, Ochirov Nikolay wrote:
 Thank you, Ariel!
 I will try to deal with gbuild. This is somwthing new)
 In general, I want to debug feature Desktop::Main().  After correcting i
 have error in it.

then you should rebuild trunk/main/desktop with debugging symbols *and*
also add trunk/main/vcl. Note that soffice is simple a shell script, you
should debug soffice.bin. A typical gdb session:

]$ gdb soffice.bin
Reading symbols from 
/home/ariel/OOo/AOOo/openoffice.org3/program/soffice.bin...done.

(gdb) break desktop::Desktop::Main
Function desktop::Desktop::Main not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (desktop::Desktop::Main) pending.

(gdb) start

Temporary breakpoint 2 at 0x4011c3: file main.c, line 30.
Temporary breakpoint 2, main (argc=1, argv=0x7fffddb8) at main.c:30
30  SAL_IMPLEMENT_MAIN() {

(gdb) c
Continuing.

Breakpoint 1, desktop::Desktop::Main (this=0x7fffdc00) at 
/mnt/build/openoffice/apache/trunk/main/desktop/source/app/app.cxx:1772
1772pExecGlobals = new ExecuteGlobals();

(gdb) bt
#0  desktop::Desktop::Main (this=0x7fffdc00) at 
/mnt/build/openoffice/apache/trunk/main/desktop/source/app/app.cxx:1772
#1  0x740ed3ba in ImplSVMain () at 
/mnt/build/openoffice/apache/trunk/main/vcl/source/app/svmain.cxx:193
#2  0x740ed4ff in SVMain () at 
/mnt/build/openoffice/apache/trunk/main/vcl/source/app/svmain.cxx:230
#3  0x779837eb in soffice_main () at 
/mnt/build/openoffice/apache/trunk/main/desktop/source/app/sofficemain.cxx:45
#4  0x004011f4 in sal_main () at main.c:31
#5  0x004011d9 in main (argc=1, argv=0x7fffddb8) at main.c:30



Debugging AOO can take to very deep levels, there is no other way to
learn this other than debugging. Some guys have set up an OpenGrok
instance at http://opengrok.adfinis-sygroup.org/ you will find this tool
rather useful.
http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/desktop/source/app/app.cxx#1770


I forgot to add that when building individual modules not ported to
gbuild, you should run

build
deliver


deliver will copy the files to the solver. You don't need to re-build,
re-package the whole office. I simply copy the files from
trunk/main/solver/340/*/lib|bin to the office installation.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


pgpI4SbHBA9It.pgp
Description: PGP signature