Return-Path: X-Original-To: apmail-openoffice-dev-archive@www.apache.org Delivered-To: apmail-openoffice-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9EEAE19281 for ; Thu, 17 Mar 2016 00:13:58 +0000 (UTC) Received: (qmail 1465 invoked by uid 500); 17 Mar 2016 00:13:58 -0000 Delivered-To: apmail-openoffice-dev-archive@openoffice.apache.org Received: (qmail 1385 invoked by uid 500); 17 Mar 2016 00:13:58 -0000 Mailing-List: contact dev-help@openoffice.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openoffice.apache.org Delivered-To: mailing list dev@openoffice.apache.org Received: (qmail 1373 invoked by uid 99); 17 Mar 2016 00:13:58 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Mar 2016 00:13:58 +0000 Received: from mail-oi0-f42.google.com (mail-oi0-f42.google.com [209.85.218.42]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 041F71A0046 for ; Thu, 17 Mar 2016 00:13:58 +0000 (UTC) Received: by mail-oi0-f42.google.com with SMTP id r187so51392943oih.3 for ; Wed, 16 Mar 2016 17:13:57 -0700 (PDT) X-Gm-Message-State: AD7BkJKzKI+qYI7T/2QW+eeMy6e9fByBHqyjBT1Z8lx/KcCEmQH1kwIWlJ/P7i8OA1ncuwi2ICZ9YadSZjyJ7w== X-Received: by 10.202.195.146 with SMTP id t140mr4287158oif.26.1458173637439; Wed, 16 Mar 2016 17:13:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.38.168 with HTTP; Wed, 16 Mar 2016 17:13:37 -0700 (PDT) In-Reply-To: <56E9EF97.2010406@acm.org> References: <56E6C472.9000405@acm.org> <95220ED8-DC18-4A9E-8516-31B220653A42@gmx.de> <56E9A367.4010502@acm.org> <56E9AAA4.7010508@acm.org> <56E9E79A.7050108@acm.org> <56E9EF97.2010406@acm.org> From: Damjan Jovanovic Date: Thu, 17 Mar 2016 02:13:37 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Debug on Windows To: Apache OO Content-Type: multipart/alternative; boundary=001a1134f9b4ae395e052e338141 --001a1134f9b4ae395e052e338141 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Mar 17, 2016 at 1:43 AM, Patricia Shanahan wrote: > > > On 3/16/2016 4:37 PM, Damjan Jovanovic wrote: > >> On Thu, Mar 17, 2016 at 1:09 AM, Patricia Shanahan wrote: >> >> >>> >>> On 3/16/2016 12:07 PM, Damjan Jovanovic wrote: >>> >>> On Wed, Mar 16, 2016 at 8:49 PM, Patricia Shanahan wrote= : >>>> >>>> >>>> >>>>> On 3/16/2016 11:24 AM, Damjan Jovanovic wrote: >>>>> >>>>> On Wed, Mar 16, 2016 at 8:18 PM, Patricia Shanahan >>>>> wrote: >>>>> >>>>>> >>>>>> On 3/14/2016 10:49 AM, Oliver Brinzing wrote: >>>>>> >>>>>> >>>>>>> Hi Patricia, >>>>>>> >>>>>>> >>>>>>>> Has anyone nailed getting e.g. windbg running with AOO on Windows? >>>>>>>> If >>>>>>>> so, >>>>>>>> >>>>>>>> I have some questions. >>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> better try with vs 2013 community edition =F0=9F=98=89 >>>>>>>>> >>>>>>>> I remember I had a lot of trouble with windbg. >>>>>>>> >>>>>>>> >>>>>>>> Thanks for the tip - it does work better than windbg. >>>>>>>> >>>>>>> >>>>>>> However, I seem to have a problem with it not loading all the >>>>>>> symbols, >>>>>>> so >>>>>>> I cannot set a breakpoint where I want. >>>>>>> >>>>>>> My general procedure is to build AOO with configure parameter >>>>>>> --enable-symbols. I unzip the archive version, copy soffice.bin, an= d >>>>>>> rename >>>>>>> the copy sofficebin.exe. >>>>>>> >>>>>>> In Visual Studio, I do File-Open-Project/Solution and select my >>>>>>> sofficebin.exe. It seems to do some symbol loading, but not the >>>>>>> module >>>>>>> I >>>>>>> want. >>>>>>> >>>>>>> Anyone have any suggestions? >>>>>>> >>>>>>> >>>>>>> Which module are you trying to debug this way? --enable-symbols onl= y >>>>>>> >>>>>>> seems >>>>>> to work for dmake modules, gbuild modules don't get any debug >>>>>> symbols. I >>>>>> have a preliminary fix. >>>>>> >>>>>> >>>>>> I was trying to debug in main/tools/source/generic. >>>>> >>>>> >>>>> main/tools uses gbuild, so it won't have debug symbols with >>>> --enable-symbols. >>>> >>>> As a workaround, after "source winenv.set.sh", "cd" to "tools", and ru= n >>>> "make clean debug=3Dtrue" to rebuild it with debug symbols. Then "buil= d >>>> --all" from instsetoo_native to pull in that debug copy when building >>>> the >>>> new installation package, or (much faster especially on Windows) if yo= u >>>> know which files it built, you can copy those yourself from >>>> solver/420/... >>>> over the ones in your pre-existing AOO installation. >>>> >>>> >>>> This workaround works, but I keep needing to apply it to additional >>> modules, which makes debug slow. Is there a list, or a quick way of >>> identifying, the gbuild modules so I can just remake them all? >>> >>> Thanks, >>> >>> Patricia >>> >>> >>> This may sound strange coming from someone that's been merging 132 gbui= ld >> patches between branches in the last few weeks, but I am not sure what t= he >> definitive list is: >> * main/Module_ooo.mk seems to list every gbuild module, but sd is not >> there, and is a gbuild module on my branch... >> * gbuild modules usually have an empty /prj/d.lst, but AOO build= s >> when it's not empty >> * gbuild modules usually have a 2 line /prj/build.lst >> * gbuild modules usually have a /prj/makefile.mk, which usually >> calls $(GNUMAKE) with various options. Since $(GNUMAKE) is needed to >> launch >> the gbuild makefiles, it is a robust check, but it could theoretically b= e >> launched from any file specified in /prj/build.lst... >> * gbuild modules usually have a /Makefile >> >> The /Makefile should be easiest for now ("ls main/*/Makefile"). >> > > I can work with that for now. It is not a disaster if I miss some, and > have to do them manually as needed. In the long term, I see a lot of AOO > debug in my future, so I have a vested interest in getting this automated= . > > > > This sort of patch fixes the problem for all gbuild modules on FreeBSD. You'd have to dig around in windows.mk and use the correct flags for MSVC. I am against committing it as the gbuild branch I am hoping to merge soon changes how compiler flags get set, so it would need to be rewritten: Index: AOO/main/solenv/gbuild/platform/freebsd.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- AOO/main/solenv/gbuild/platform/freebsd.mk (revision 1733494) +++ AOO/main/solenv/gbuild/platform/freebsd.mk (working copy) @@ -238,6 +238,16 @@ endif endif +ifeq ($(ENABLE_SYMBOLS),TRUE) +ifeq ($(COM),CLANG) +gb_LinkTarget_CXXFLAGS +=3D -ggdb3 -fno-inline +gb_LinkTarget_CFLAGS +=3D -ggdb3 -fno-inline +else +gb_LinkTarget_CXXFLAGS +=3D -ggdb3 -finline-limit=3D0 -fno-inline -fno-default-inline +gb_LinkTarget_CFLAGS +=3D -ggdb3 -finline-limit=3D0 -fno-inline -fno-default-inline +endif +endif + gb_LinkTarget_INCLUDE :=3D $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))= ) gb_LinkTarget_INCLUDE_STL :=3D $(filter %/stl, $(subst -I. , ,$(SOLARINC))= ) --001a1134f9b4ae395e052e338141--