Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Development (http://www.linux-archive.org/fedora-development/)
-   -   Java debugging (http://www.linux-archive.org/fedora-development/78084-java-debugging.html)

"Jerry James" 04-28-2008 07:32 PM

Java debugging
 
To be able to debug a Java problem, I need class files compiled with
-g and the source files. Java packages set up for AOT compilation
with GCJ do have debuginfo packages, but they are symbol files for the
GCJ-compiled .so files only, with no source files. Has anybody looked
at what it would take to set things up for a reasonable Java debugging
environment? The source file problem can be solved pretty easily, I
think, but what about compiling with -g? I see 4 answers to that
question:

1. Never compile with -g. People who want to debug have to recompile
their own JARs.
2. Always compile with -g and make everybody eat the bloat.
3. Compile all Java code twice, once to create a debug JAR and once to
create the normal distribution JAR. The debug JAR goes into the
corresponding debuginfo package.
4. Always compile with -g. Store the original JAR in the
corresponding debuginfo package, then strip out the debug symbols and
put the resulting JAR into the regular package.

I looked through both the JPackage and the Fedora Java guidelines but
did not see anything that addresses this issue. Has anybody thought
about this before? I prefer the answer to be "not #1". :-)

This came up, by the way, because I'm having problems with a web
service call. It looks like an AXIS bug to me, but I can't step into
the AXIS code....
--
Jerry James
http://loganjerry.googlepages.com/

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Nicolas Mailhot 04-28-2008 07:49 PM

Java debugging
 
Le lundi 28 avril 2008 à 13:32 -0600, Jerry James a écrit :

> I looked through both the JPackage and the Fedora Java guidelines but
> did not see anything that addresses this issue.

This was never discussed jpp-side. If you have bright spec pattern
ideas, just write a jpp or Fedora proposal and I'm sure you won't have
any problem in getting it adopted.

--
Nicolas Mailhot
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Jason L Tibbitts III 04-28-2008 07:50 PM

Java debugging
 
>>>>> "JJ" == Jerry James <loganjerry@gmail.com> writes:

JJ> Java packages set up for AOT compilation with GCJ do have
JJ> debuginfo packages, but they are symbol files for the GCJ-compiled
JJ> .so files only, with no source files.

I believe that's actually a bug, which I thought had been fixed.
Check the thread rooted at
http://www.redhat.com/archives/fedora-devel-list/2007-November/msg01948.html

- J<

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Andrew Haley 04-29-2008 08:38 AM

Java debugging
 
Jerry James wrote:
> To be able to debug a Java problem, I need class files compiled with
> -g and the source files. Java packages set up for AOT compilation
> with GCJ do have debuginfo packages, but they are symbol files for the
> GCJ-compiled .so files only, with no source files. Has anybody looked
> at what it would take to set things up for a reasonable Java debugging
> environment? The source file problem can be solved pretty easily, I
> think, but what about compiling with -g? I see 4 answers to that
> question:
>
> 1. Never compile with -g. People who want to debug have to recompile
> their own JARs.
> 2. Always compile with -g and make everybody eat the bloat.
> 3. Compile all Java code twice, once to create a debug JAR and once to
> create the normal distribution JAR. The debug JAR goes into the
> corresponding debuginfo package.
> 4. Always compile with -g. Store the original JAR in the
> corresponding debuginfo package, then strip out the debug symbols and
> put the resulting JAR into the regular package.

Most of this should not be necessary. We have, or had, a modified version of
ecj that always generates debuginfo when an RPM is being compiled, so
if there exists any RPM that is missing debuginfo, that is a regression.

Also, when AOT-compiling, we should be generating the full paths for all
the source files and therefore all the sources should be in the debuginfo
packages.

Please tell me which package is missing these, and I'll find out which
of these mechanisms has broken.

Andrew.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Kevin Kofler 04-29-2008 02:11 PM

Java debugging
 
Andrew Haley <aph <at> redhat.com> writes:
> Please tell me which package is missing these, and I'll find out which
> of these mechanisms has broken.

As a wild guess, packages built with IcedTea/OpenJDK maybe?

Kevin Kofler

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Andrew Haley 04-29-2008 02:26 PM

Java debugging
 
Kevin Kofler wrote:
> Andrew Haley <aph <at> redhat.com> writes:
>> Please tell me which package is missing these, and I'll find out which
>> of these mechanisms has broken.
>
> As a wild guess, packages built with IcedTea/OpenJDK maybe?

Well, I'm not going to guess; let's see. :-)

Andrew.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

"Jerry James" 04-29-2008 04:38 PM

Java debugging
 
On Tue, Apr 29, 2008 at 2:38 AM, Andrew Haley <aph@redhat.com> wrote:
> Most of this should not be necessary. We have, or had, a modified version of
> ecj that always generates debuginfo when an RPM is being compiled, so
> if there exists any RPM that is missing debuginfo, that is a regression.
>
> Also, when AOT-compiling, we should be generating the full paths for all
> the source files and therefore all the sources should be in the debuginfo
> packages.
>
> Please tell me which package is missing these, and I'll find out which
> of these mechanisms has broken.

axis-debuginfo-1.2.1-2jpp.7.fc7.x86_64.rpm which, despite the name, is
the current package for F8. It looks like it was generated before the
fix went in. Dare I suggest a rebuild of all Java packages of
sufficient age?

Also, if anyone cares, my problem did indeed turn out to be a bug in
axis 1.2.1 which was fixed in 1.3 or 1.4. (I went straight to 1.4 to
check, so I don't know which version fixed the bug.) I see there is a
request for an upgrade to 1.4 [1], but it is being held up by some
problems with xml-security [2]. I'm not sure we should even bother,
though, since the project has been obsoleted by axis2 [3].

References:
[1] https://bugzilla.redhat.com/show_bug.cgi?id=231153
[2] https://bugzilla.redhat.com/show_bug.cgi?id=231305
[3] http://ws.apache.org/axis2/
--
Jerry James
http://loganjerry.googlepages.com/

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Andrew Haley 04-29-2008 05:20 PM

Java debugging
 
Jerry James wrote:
> On Tue, Apr 29, 2008 at 2:38 AM, Andrew Haley <aph@redhat.com> wrote:
>> Most of this should not be necessary. We have, or had, a modified version of
>> ecj that always generates debuginfo when an RPM is being compiled, so
>> if there exists any RPM that is missing debuginfo, that is a regression.
>>
>> Also, when AOT-compiling, we should be generating the full paths for all
>> the source files and therefore all the sources should be in the debuginfo
>> packages.
>>
>> Please tell me which package is missing these, and I'll find out which
>> of these mechanisms has broken.
>
> axis-debuginfo-1.2.1-2jpp.7.fc7.x86_64.rpm which, despite the name, is
> the current package for F8. It looks like it was generated before the
> fix went in.

Right, that makes sense.

> Dare I suggest a rebuild of all Java packages of sufficient age?

You can suggest it, but I doubt that it's worthwhile. After all, it's
easy for anyone to rebuild the package. Trouble is, they have know way
to know that's all they have to do; I know of no easy solution for that.

Andrew.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

"Jerry James" 04-29-2008 05:36 PM

Java debugging
 
On Tue, Apr 29, 2008 at 11:20 AM, Andrew Haley <aph@redhat.com> wrote:
> Jerry James wrote:
> > Dare I suggest a rebuild of all Java packages of sufficient age?
>
> You can suggest it, but I doubt that it's worthwhile. After all, it's
> easy for anyone to rebuild the package. Trouble is, they have know way
> to know that's all they have to do; I know of no easy solution for that.

That last sentence is precisely why it is worthwhile. I could have
saved a lot of time had I known that.
--
Jerry James
http://loganjerry.googlepages.com/

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Andrew Haley 04-30-2008 09:07 AM

Java debugging
 
Jerry James wrote:
> On Tue, Apr 29, 2008 at 11:20 AM, Andrew Haley <aph@redhat.com> wrote:
>> Jerry James wrote:
>> > Dare I suggest a rebuild of all Java packages of sufficient age?
>>
>> You can suggest it, but I doubt that it's worthwhile. After all, it's
>> easy for anyone to rebuild the package. Trouble is, they have know way
>> to know that's all they have to do; I know of no easy solution for that.
>
> That last sentence is precisely why it is worthwhile. I could have
> saved a lot of time had I known that.

I take your point. Does simply rebuilding that RPM fix this problem?

Andrew.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list


All times are GMT. The time now is 07:02 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.