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=0x7fffffffddb8) at main.c:30
30      SAL_IMPLEMENT_MAIN() {

(gdb) c
Continuing.

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

(gdb) bt
#0  desktop::Desktop::Main (this=0x7fffffffdc00) at 
/mnt/build/openoffice/apache/trunk/main/desktop/source/app/app.cxx:1772
#1  0x00007ffff40ed3ba in ImplSVMain () at 
/mnt/build/openoffice/apache/trunk/main/vcl/source/app/svmain.cxx:193
#2  0x00007ffff40ed4ff in SVMain () at 
/mnt/build/openoffice/apache/trunk/main/vcl/source/app/svmain.cxx:230
#3  0x00007ffff79837eb in soffice_main () at 
/mnt/build/openoffice/apache/trunk/main/desktop/source/app/sofficemain.cxx:45
#4  0x00000000004011f4 in sal_main () at main.c:31
#5  0x00000000004011d9 in main (argc=1, argv=0x7fffffffddb8) 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

Attachment: pgpI4SbHBA9It.pgp
Description: PGP signature

Reply via email to