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-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 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 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



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 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 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: Question about OOo, AOO

2012-04-11 Thread Ochirov Nikolay
Thank you, Andre!
Yes, in different process, not threads.
Do you think it is possible to make such AOO?
If possible, could you suggest how to solve this problem?
What source to look, what funstions, classes, etc.
I'll be glad for any help)

Regards,
Nikolay

11 апреля 2012 г. 5:38 пользователь Andre Fischer a...@a-w-f.de написал:

 Hi Nikolay,


 On 11.04.2012 02:02, Ochirov Nikolay wrote:

 Thank you very much, Regina!

 I just noticed that the AOO open all documents in one process, it became
 interesting.
 But I would like to write code that would do so would AOO every single
 document open in a single process)))
 I began to look as it does AOO, found the function OfficeIPCThread ::
 EnableOfficeIPCThread (), changed code a bit.


 Hm, you are talking about running AOO in different processes not threads,
 right?  Both approaches pose different difficulties.

 Using multiple threads (which we do to some small extend) would require
 our base libraries do be thread safe.  Which they are not as far as I know.

 Using different processes might lead to all dlls loaded several times
 (from the top of my head I don´t know if they can be shared over process
 boundaries) and thereby multiplying our memory consumption.

 Regards,
 Andre


  But it didn't work -  first document is opened, while others will not
 open.
 AOO gives a messgebox

  The application cannot be started.
  [context = user] caught unexpected exception! (user -
 my
 account in system, system - Ubuntu)

 I have no much experience in this question in particular and programming
 in
 general. If anyone will be willing to help with this - I will be very
 happy!
 Regards,
 Nikolay

 10 апреля 2012 г. 21:09 пользователь Regina Henschel
 rb.hensc...@t-online.de  написал:

 Hi Nikolay,

 Ochirov Nikolay schrieb:

  Hello!
 I hope I haven't t bothered with my questions.
 But I don't have anyone to ask for advice, so I rely on your wisdom,
 the Jedi of this mailing list

 So,
 Why AOO all documents open in a single process?
 Has anyone tried to make AOO open documents in different processes?



 Why do you want to do it?

 This things are possible:

 Generate a folder for a second user. Call AOO with the -env parameter.
 You
 get one process, but two different users. For example one user can use a
 German UI and the other user can use an English UI.

 Install the AOO in administrative mode with setting a different user path

 on

 bootstrap.ini. Then you can run two processes soffice.exe.

 If a user starts soffice.exe he gets a .lock file in his user directory,
 which prevents, that soffice.exe is started a second time for the same

 user.


 Kind regards
 Regina





Question about OOo, AOO

2012-04-10 Thread Ochirov Nikolay
Hello!
I hope I haven't t bothered with my questions.
But I don't have anyone to ask for advice, so I rely on your wisdom,
the Jedi of this mailing list

So,
Why AOO all documents open in a single process?
Has anyone tried to make AOO open documents in different processes?

Regards,
Nikolay


Re: Question about OOo, AOO

2012-04-10 Thread Ochirov Nikolay
Thank you very much, Regina!

I just noticed that the AOO open all documents in one process, it became
interesting.
But I would like to write code that would do so would AOO every single
document open in a single process)))
I began to look as it does AOO, found the function OfficeIPCThread ::
EnableOfficeIPCThread (), changed code a bit.
But it didn't work -  first document is opened, while others will not open.
AOO gives a messgebox

 The application cannot be started.
 [context = user] caught unexpected exception! (user - my
account in system, system - Ubuntu)

I have no much experience in this question in particular and programming in
general. If anyone will be willing to help with this - I will be very
happy!
Regards,
Nikolay

10 апреля 2012 г. 21:09 пользователь Regina Henschel 
rb.hensc...@t-online.de написал:
 Hi Nikolay,

 Ochirov Nikolay schrieb:

 Hello!
 I hope I haven't t bothered with my questions.
 But I don't have anyone to ask for advice, so I rely on your wisdom,
 the Jedi of this mailing list

 So,
 Why AOO all documents open in a single process?
 Has anyone tried to make AOO open documents in different processes?


 Why do you want to do it?

 This things are possible:

 Generate a folder for a second user. Call AOO with the -env parameter. You
 get one process, but two different users. For example one user can use a
 German UI and the other user can use an English UI.

 Install the AOO in administrative mode with setting a different user path
on
 bootstrap.ini. Then you can run two processes soffice.exe.

 If a user starts soffice.exe he gets a .lock file in his user directory,
 which prevents, that soffice.exe is started a second time for the same
user.

 Kind regards
 Regina


Re: How to logging in AOO

2012-04-04 Thread Ochirov Nikolay
Thank you for links, Joost
They are useful, if you want to parse the logs. But i need to create
the log files and then parse them.
I still don't understand how to do it, Drew.

3 апреля 2012 г. 18:38 пользователь Joost Andrae joost.and...@gmx.de написал:
 Hi,

 probably these links are of help:

 http://wiki.services.openoffice.org/wiki/RTLLogFileAnalysis
 http://www.openoffice.org/tools/profiling/profiling-howto.html
 http://wiki.services.openoffice.org/wiki/RTLLog2ODF

 Am 03.04.2012 15:57, schrieb Очиров Николай:

 Hi Drew
 Thank you for your help. I do not connect to any database.
 I just want to log all function calls during startup AOO. I corrected a
 bit the source code - and AOO falls, cause I can't understand why I want to
 see the order of function calls, and find which function error. Analyzing
 the sources I couldn't find a reason, but I noticed that everywhere there
 are macros in the code - RTL_LOGFILE_TRACE () or RTL_LOGFILE_CONTEXT () and
 etc. and it seems to me that they can use to track where the error occurs.
 Is this possible?


 Kind regards, Joost



How to logging in AOO

2012-04-02 Thread Ochirov Nikolay
Hello,

I want to enable logging in AOO3.4. The site has only this article
http://wiki.services.openoffice.org/wiki/Category:Logging, but from it
 i don't understand anything. Is there any configuration file for the
logging system, or need to insert some code into the source?  What do
i do?
Hope for your help!