From fefcb453eb01c78f40549fa143d29ec09c03555b Mon Sep 17 00:00:00 2001 From: mwebster Date: Thu, 9 Nov 2006 13:31:42 +0000 Subject: [PATCH] Bug 159854 "Problem Diagnosis Guide" --- docs/pdGuideDB/ajcore.xml | 11 +++++ docs/pdGuideDB/ltwdump.xml | 18 ++++---- docs/pdGuideDB/messages.xml | 88 ++++++++++++++++++++++++++++++------- docs/pdGuideDB/pdguide.xml | 10 ++--- 4 files changed, 99 insertions(+), 28 deletions(-) diff --git a/docs/pdGuideDB/ajcore.xml b/docs/pdGuideDB/ajcore.xml index 838c6d7b4..3ca82849f 100644 --- a/docs/pdGuideDB/ajcore.xml +++ b/docs/pdGuideDB/ajcore.xml @@ -55,6 +55,17 @@ e.g. error. + + + org.aspectj.dump.directory + + + none + + + The directory used for ajcore files. + + diff --git a/docs/pdGuideDB/ltwdump.xml b/docs/pdGuideDB/ltwdump.xml index 049f2e4f5..a17ceae5b 100644 --- a/docs/pdGuideDB/ltwdump.xml +++ b/docs/pdGuideDB/ltwdump.xml @@ -5,16 +5,18 @@ Introduction - Very rarely, problems present not at build-time but at run-time, - with java.lang.VerifyError or incorrect behavior. - In these situations, it's most helpful to include the offending class - in the bug report. But with load-time weaving, the woven classes are - in memory only; to save classes woven at load-time, configure + Very rarely problems may be encountered with classes that have been + load-time woven. + Symptoms will include incorrect program function or a Java exception such as + java.lang.VerifyError. + In these situations it's most helpful to include the offending class + in the bug report. When using load-time weaving the woven classes are + in memory only so to save them to disk configure META-INF/aop.xml to dump the classes (by default to an _ajdump subdirectory of the current working - directory). Also, if the input class file is not available (e.g., if - the AspectJ weaver is after another bytecode weaver), you can - also configure the weaver to dump the input classes. + directory). Also if the input class file is not available + (e.g. it is a generated proxy or has already been instrumented by another agent) + you can configure the weaver to dump the input classes as well. Configuring bytecode dumping in load-time weaving diff --git a/docs/pdGuideDB/messages.xml b/docs/pdGuideDB/messages.xml index cadb2a0df..8d2a2ab97 100644 --- a/docs/pdGuideDB/messages.xml +++ b/docs/pdGuideDB/messages.xml @@ -6,10 +6,10 @@ Messages point out potential problems in the input program; some are clearly problems (errors), but many more may depend on what - the programmer intends. To keep the noise down, the latter are treated - as warnings that can be ignored by the programmer or information - hidden from the programmer. However, when investigating - unexpected behavior, it's helpful to show them. This describes how + the programmer intends. To keep the noise down the latter are treated + as warnings which can be ignored by the programmer or information + which are hidden. However, when investigating + unexpected behavior it's helpful to show them. This section describes how to configure messages, presents some problem scenarios when compiling or doing load-time weaving, and summarizes some of the more relevant messages. @@ -43,13 +43,16 @@ at build time is to emit both compiler and weaver messages. - The table below lists some options used to control AspectJ messages. The method - of configuration depends on your environment so refer to the relevant + The tables below list some options, System Properties (for LTW only) and Java 5 annotations + used to control AspectJ messages. The method + of configuration depends on your environment so please refer to the relevant documentation for ajc, - Ant or + Ant or LTW. + + @@ -97,34 +100,87 @@ - messageHolderClass + messageHolderClass/ + -XmessageHolderClass: - In Ant tasks, specify the class to receive all messages. + In Ant tasks and LTW respectively specify the class to receive all messages. See - iajc task options. + iajc task options or + + Weaver Options. + + + + + + + + + + + + + System Property + Description + + + + + + aj.weaving.verbose + + + Show informational messages including AspectJ version and build date + (same as -verbose option). + + + + + org.aspectj.weaver.showWeaveInfo + + + Show weaving messages + (same as -showWeaveInfo option). + + org.aspectj.weaving.messages - Set this system property to redirect compiler/weaver - messages to logging facilities, as described in - . + Set this system property to enable tracing of all compiler + messages. See . + + + + + + + + + + + Annotation + Description + + + @SuppressAjWarnings @@ -137,6 +193,8 @@ + + @@ -209,7 +267,7 @@ weaveinfo Join point 'method-execution(void HelloWorld.main(java.lang.String[]))' ... ]]> - If advice should be woven at this join point, you should get a + If advice is woven at this join point you should get the corresponding message. diff --git a/docs/pdGuideDB/pdguide.xml b/docs/pdGuideDB/pdguide.xml index 5581d5395..08af6fe28 100644 --- a/docs/pdGuideDB/pdguide.xml +++ b/docs/pdGuideDB/pdguide.xml @@ -29,14 +29,14 @@ - This describes how to configure the AspectJ compiler/weaver to provide - information for diagnosing problems in the input programs or in the - compiler/weaver itself. + This guide describes how to configure the AspectJ compiler/weaver to provide + information for diagnosing problems in the input programs, the + compiler/weaver or its configuration. The AspectJ compiler and weaver can provide lots of information for diagnosing problems in building AspectJ programs. For problems in the input program, - there are a number of default warning and error messages and many + there are a number of default warning and error messages, as well as many configurable "lint" messages, all of which can be emitted normally, logged using standard facilities, or intercepted programmatically. These are discussed in . Since most errors @@ -44,7 +44,7 @@ . - For problems with the compiler/weaver itself, there are three facilities + For problems with the compiler/weaver itself there are three facilities that enable the AspectJ developers to resolve bugs even when it is too hard to deliver a reproducible test case: -- 2.39.5