1
$Id: debug.txt,v 1.2 2003/04/12 16:16:05 andrew_belov Exp $
5
This file is a reference for everyone who has to deal with ARJ technical
11
Debugging begins with compiling ARJ for debug mode. Supply a
12
DEBUG=1 clause to the make program, as in the following example:
14
nmake MODE=OS232 COMPILER=CSET2 DEBUG=1 prepare all
16
This will yield an unoptimized executable with some internal
17
assertions and, possibly, further debugging functionality which
18
is platform-specific (e.g. debug malloc() in IBM C Set/2 static
21
The debug flavor also supports a simple malloc() tracing with
22
"-hdm", probably useful for working out memory shortages in the
28
Whenever a large volume of changes is committed, or ARJ is being
29
tested under a new platform, we suggest the following test
32
1. Ensure that all modules compile normally, and the build
33
process finishes without errors when "make package" is issued.
34
This warrants basic functionality to be there.
36
2. Examine the usual operation of ARJ module with "arj a -jt1",
37
submitting a combination of options while archiving some
38
"payload" (the volume to be archived is of little importance, 10
39
files totaling 1 megabyte would be enough for testing):
41
arj a test -+ -v100K -jt1 -hk5 -i5 -jm -hg -garble
43
The "-jt1" will let you see if there are any major omissions
44
which would result in broken archives. Re-check the created
47
arj q test.arj [should report no damage]
49
arj t -v -garble test.arj
50
arj x -v -garble test.arj
52
3. Check the ARJSFX branches:
54
ARJSFXV -> arj a test -+ -va -je
55
ARJSFX -> arj a test -+ -je
56
ARJSFXJR -> arj a test -+ -je1 [may need "-2x", see the output]
58
Each of the SFX levels shares a portion of ARJ code while
59
bringing in some distinct routines, so we put a priority on
66
(need another archiver and a REARJ.CFG for that). REARJ utilizes
67
the platform-specific process creation routines.
69
5. Verify the compatibility with the mainstream versions of ARJ
70
available at the project download page, or from ARJ Software,
71
Inc. Extract the created archive by using a "branded"
72
distribution of ARJ, then do quite the contrary by packing the
73
archive in one version, then extracting it with another one.
75
Pay special attention to the encryption issue:
77
XOR encryption: arj a test -hg -g...
78
GOST 40-bit cipher: arj a test -hg! -g...
79
GOST 128-bit modular cipher: arj a test -hg -g...
81
Supply your password of choice for "-g..." when archiving and
85
APPENDIX: DEBUG OPTIONS
87
A list of debug options (-hd<opt>, followed by an optional argument):
89
. (ASR) Displays each file being added to a filelist.
90
? With ARJ v 2.75.03+, allows use of Extended license keys in standard
91
ARJ. The filelist capacity shall remain the same.
92
a Rigorous archive handling. Enables detailed information in index
93
files, and forces recovery of ARJ-PROTECTed archives.
94
b<u> Sets VBUF size. VBUF is used for buffering of archive input stream.
95
c Skips CRC checking for extracted files, thereby causing CRC errors.
96
d Sets the dictionary size on compression, thus making ARJ compress
97
better. The archives can still be extracted... with ARJZ only, though.
98
f Notifies about len_cnt fixes in encoding routine.
99
i<ld> Defines the flist_main capacity in ARJ. Extended license is not
100
required in this case.
101
k Zeroes compsize after the file has been unpacked.
102
l Displays the encryption version.
103
m (ASR, DEBUG builds only) Displays malloc()/farmalloc() arguments.
104
n Inhibits all kinds of file generation activities.
105
o<s> Sets archive modification time to the desired timestamp.
106
p<u> Sets TBUF size. TBUF is used for buffering of archive output stream.
107
q Reverts to the standard filelist type for flist_main.
108
s Enables unlimited ranges for numeric switch values.
109
t Enables the poor man's profiler (displays execution ticks).
110
v Dumps the command-line tokens as they are processed, shows memory
111
statistics and may have other effects as a "verbose" command.
112
x Inhibits any sort of hollow file processing.
113
y Uses a case-preserving way of filename/path storage.
114
z<ld> Sets the physical filelist capacity limit.
118
* -hdaflmv is a usual bug reporter's test case.
120
* -hdt may be used for performance measurements.