~ubuntu-branches/ubuntu/precise/arj/precise-security

« back to all changes in this revision

Viewing changes to doc/debug.txt

  • Committer: Bazaar Package Importer
  • Author(s): Guillem Jover
  • Date: 2004-06-27 08:07:09 UTC
  • Revision ID: james.westby@ubuntu.com-20040627080709-1gkxm72ex66gkwe4
Tags: upstream-3.10.21
ImportĀ upstreamĀ versionĀ 3.10.21

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
$Id: debug.txt,v 1.2 2003/04/12 16:16:05 andrew_belov Exp $
 
2
 
 
3
ARJ DEBUGGER'S GUIDE
 
4
 
 
5
This file is a reference for everyone who has to deal with ARJ technical
 
6
support and debugging.
 
7
 
 
8
 
 
9
DEBUG CONFIGURATION
 
10
 
 
11
        Debugging begins with compiling   ARJ for debug mode.   Supply a
 
12
        DEBUG=1 clause to the make program, as in the following example:
 
13
 
 
14
        nmake MODE=OS232 COMPILER=CSET2 DEBUG=1 prepare all 
 
15
 
 
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
 
19
        libraries).
 
20
 
 
21
        The debug flavor also   supports a simple malloc() tracing  with
 
22
        "-hdm", probably useful for working  out memory shortages in the
 
23
        16-bit world.
 
24
 
 
25
 
 
26
TOP 5 TEST CASES
 
27
 
 
28
        Whenever a large volume of changes is committed, or ARJ is being
 
29
        tested under  a new  platform,  we  suggest  the following  test
 
30
        scenario:
 
31
 
 
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.
 
35
 
 
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):
 
40
 
 
41
        arj a test -+ -v100K -jt1 -hk5 -i5 -jm -hg -garble
 
42
 
 
43
        The "-jt1"  will let you see  if  there are  any major omissions
 
44
        which would result  in  broken  archives. Re-check the   created
 
45
        archive with:
 
46
 
 
47
        arj q test.arj  [should report no damage]
 
48
        arj v test.arj
 
49
        arj t -v -garble test.arj
 
50
        arj x -v -garble test.arj
 
51
 
 
52
        3. Check the ARJSFX branches:
 
53
 
 
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]
 
57
 
 
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
 
60
        testing the SFX.
 
61
 
 
62
        4. Check REARJ:
 
63
 
 
64
        rearj test.zip
 
65
 
 
66
        (need another archiver and a REARJ.CFG for that). REARJ utilizes
 
67
        the platform-specific process creation routines.
 
68
 
 
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.
 
74
 
 
75
        Pay special attention to the encryption issue:
 
76
 
 
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...
 
80
 
 
81
        Supply your  password of choice for   "-g..." when archiving and
 
82
        extracting/testing.
 
83
 
 
84
 
 
85
APPENDIX: DEBUG OPTIONS
 
86
 
 
87
A list of debug options (-hd<opt>, followed by an optional argument):
 
88
 
 
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.
 
115
 
 
116
Common examples:
 
117
 
 
118
* -hdaflmv is a usual bug reporter's test case.
 
119
 
 
120
* -hdt may be used for performance measurements.