Return-Path: X-Original-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77DAB98DF for ; Mon, 7 May 2012 22:04:16 +0000 (UTC) Received: (qmail 28499 invoked by uid 500); 7 May 2012 22:04:16 -0000 Delivered-To: apmail-incubator-ooo-dev-archive@incubator.apache.org Received: (qmail 28409 invoked by uid 500); 7 May 2012 22:04:16 -0000 Mailing-List: contact ooo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-dev@incubator.apache.org Received: (qmail 28400 invoked by uid 99); 7 May 2012 22:04:16 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 May 2012 22:04:16 +0000 Received: from localhost (HELO localhost) (127.0.0.1) (smtp-auth username arielch, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 May 2012 22:04:15 +0000 Date: Mon, 7 May 2012 19:04:19 -0300 From: Ariel Constenla-Haile To: ooo-dev@incubator.apache.org Subject: Re: debugging with gdb Message-ID: <20120507220419.GD5270@localhost> References: <20120507191212.GA5270@localhost> <20120507193314.GB5270@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2iBwrppp/7QCDedR" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) --2iBwrppp/7QCDedR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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.b= in...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=3D1, argv=3D0x7fffffffddb8) at main.c:30 30 SAL_IMPLEMENT_MAIN() { (gdb) c Continuing. Breakpoint 1, desktop::Desktop::Main (this=3D0x7fffffffdc00) at /mnt/build/= openoffice/apache/trunk/main/desktop/source/app/app.cxx:1772 1772 pExecGlobals =3D new ExecuteGlobals(); (gdb) bt #0 desktop::Desktop::Main (this=3D0x7fffffffdc00) at /mnt/build/openoffice= /apache/trunk/main/desktop/source/app/app.cxx:1772 #1 0x00007ffff40ed3ba in ImplSVMain () at /mnt/build/openoffice/apache/tru= nk/main/vcl/source/app/svmain.cxx:193 #2 0x00007ffff40ed4ff in SVMain () at /mnt/build/openoffice/apache/trunk/m= ain/vcl/source/app/svmain.cxx:230 #3 0x00007ffff79837eb in soffice_main () at /mnt/build/openoffice/apache/t= runk/main/desktop/source/app/sofficemain.cxx:45 #4 0x00000000004011f4 in sal_main () at main.c:31 #5 0x00000000004011d9 in main (argc=3D1, argv=3D0x7fffffffddb8) 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/sour= ce/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 --=20 Ariel Constenla-Haile La Plata, Argentina --2iBwrppp/7QCDedR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBCAAGBQJPqEbjAAoJEMjP1bm45QNWVBUP/iEYCWFYH2RfgD9kE1Uzs61a lA3HUHNYViZ0k9Lw+ZZC0zEcGvldEdTU2xD043Nbo3R+7y902adP6dDqxesG+yon TNT+bhqr4onFJn5k4j33L+7VD5EyEExa9sAKOft9r1xnX6Q2p7xdDAgECP8tF4Iu 9mcxokSCJ5C+jGAW0hefYRy8SR+1XoGR2FMw9aWheKK+C7Sb6X7ZhWfhdnUunV2h VNygvdCF5P/EJ9hl9I/pig/EPmT0Zd8HAaesbFjXD/Igk6kk4YtFsog93N/1DsMj e/AG9nXXkmMm2DXXi2/aB8cm5ttlZAB0BGUKOLEUWdjnQxb14yuH/R43H2Hh8eEf Wc99QjhzUlYajSUzpXHSbOYJgr/x1MbydWOzoYDZJQSYMzTuovuwqsfHbW5qd9mD gUfPBjYpYD0j2py+OstU9PJDmw0ePANwnqCIXWXRSufsCtBGVCen7etE6Mu3Bjyh IlEK0QPa7PxIymi1ShzMnA2Nven3e4q1rhLpLz7U/HEf16EN7emWqUtWS13/2i5h fRSGzKwi8fpkV7JgDw7yDHbhzhO8vOiZG6wUCvWhqKTs3eZgIvogT+VngCLNFIqx 8F9hqzH7lojm21tyVPX1pJy5a+fNGROK+6bKRR7LCCDfI1ezu4tSuOTShjRtMpQR CLjYhVeoSZGBy1yY+Up/ =NTsa -----END PGP SIGNATURE----- --2iBwrppp/7QCDedR--