home *** CD-ROM | disk | FTP | other *** search
- head 1.13;
- branch ;
- access ;
- symbols ;
- locks ediger:1.13;
- comment @ * @;
-
-
- 1.13
- date 94.05.29.14.59.23; author ediger; state Exp;
- branches ;
- next 1.12;
-
- 1.12
- date 94.05.23.20.32.37; author ediger; state Exp;
- branches ;
- next 1.11;
-
- 1.11
- date 94.05.17.23.08.53; author ediger; state Exp;
- branches ;
- next 1.10;
-
- 1.10
- date 94.05.10.22.41.28; author ediger; state Exp;
- branches ;
- next 1.9;
-
- 1.9
- date 94.05.04.11.20.40; author ediger; state Exp;
- branches ;
- next 1.8;
-
- 1.8
- date 94.05.01.17.33.12; author ediger; state Exp;
- branches ;
- next 1.7;
-
- 1.7
- date 94.02.07.21.21.39; author ediger; state Exp;
- branches ;
- next 1.6;
-
- 1.6
- date 94.01.30.21.29.39; author ediger; state Exp;
- branches ;
- next 1.5;
-
- 1.5
- date 94.01.30.16.29.04; author ediger; state Exp;
- branches ;
- next 1.4;
-
- 1.4
- date 94.01.01.23.02.51; author ediger; state Exp;
- branches ;
- next 1.3;
-
- 1.3
- date 93.12.30.19.01.09; author ediger; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 93.12.19.14.31.21; author ediger; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 93.12.19.12.59.49; author ediger; state Exp;
- branches ;
- next ;
-
-
- desc
- @Header file for a 'MachOView', subclass of View that knows a bit
- about Mach-O files, and how to display a representation of them.
- @
-
-
- 1.13
- log
- @added support for drawing in section names
- @
- text
- @
- #import <appkit/appkit.h>
- #import <MachOFile.h>
- #import <MappedFile.h>
- #import <Queue.h>
- #import <MachOViewwraps.h>
-
- /* $Id: MachOView.h,v 1.12 94/05/23 20:32:37 ediger Exp Locker: ediger $ */
- /* $Log: MachOView.h,v $
- * Revision 1.12 94/05/23 20:32:37 ediger
- * stuff to support address bracket zoom-in
- *
- * Revision 1.11 94/05/17 23:08:53 ediger
- * support for stacking of zoomed address ranges, changed types of
- * some instance vars from id to pointer to that kind of object.
- *
- * Revision 1.10 94/05/10 22:41:28 ediger
- * support for showing a "zooming box" by mouse-down dragging
- *
- * Revision 1.9 94/05/04 11:20:40 ediger
- * support for drawing thread's program counter(s)
- *
- * Revision 1.8 94/05/01 17:33:12 ediger
- * efficiency improvements
- *
- * Revision 1.7 94/02/07 21:21:39 ediger
- * added instance var to hold a memory-mapped file.
- * added methods and change struct addressMapping so that segment names
- * can be displayed.
- *
- * Revision 1.6 94/01/30 21:29:39 ediger
- * ditched doFont pswrap function, added theFont Font object instance
- * to get the benefits of using a Font.
- *
- * Revision 1.5 94/01/30 16:29:04 ediger
- * some magic numbers relating to address label printing
- *
- * Revision 1.4 94/01/01 23:02:51 ediger
- * broke address label spacing calcs into separate method.
- *
- * Revision 1.3 93/12/30 19:01:09 ediger
- * support for showing upper and lower addresses of memor
- * mapped segments
- *
- * Revision 1.2 93/12/19 14:31:21 ediger
- * corrected scaling and inclusion of mapped segments of library files
- *
- * Revision 1.1 93/12/19 12:59:49 ediger
- * Initial revision
- *
- */
-
- struct addressMapping {
- float yCoordBaseLabel;
- float yCoordTopLabel;
-
- float nameXcoord;
- float nameYcoord;
-
- unsigned long baseAddress;
- unsigned long endAddress;
- char *segmentName;
-
- float yCoordBase;
- float yCoordTop;
-
- struct sectionNameMapping *sectionMap;
- };
-
- struct sectionNameMapping {
- float nameYcoord;
-
- unsigned long sectionAddress;
- char *sectionName;
- };
-
- struct zoomAddress {
- unsigned long hiAddr;
- unsigned long loAddr;
- unsigned long sumAddr;
- };
-
- /* some magic numbers relating to drawing */
- #define LABEL_HT 12.0
- #define LABEL_LEADING 1.0
- #define LABEL_MARGIN 2.0
- #define LINE_WDTH 5.0
- #define LINE_STAGGER 7.0
- #define SEGMENT_GAP 2.0
- #define VERT_MARGIN 5.0
-
- @@interface MachOView:View
- {
- // ids to store "connections" built by Interface Builder
- id theWindow;
- id theFont;
- id cpuType;
- id cpuSubtype;
- id maxAddress;
- id minAddress;
- id zoomButton;
- id unzoomButton;
- id showSectionsButton;
-
- // ids to store objects used by MachOView to do stuff
- MachOFile *theFile; // represents Mach-O object file.
- MappedFile *mappedFile; // manages memory mapping/unmapping, Mach style.
- Queue *zoomStack; // stack of addresses that have been zoomed to.
-
- unsigned long hiAddr, hiAddrZoom;
- unsigned long loAddr, loAddrZoom;
- unsigned long sumAddr;
-
- char *currentFileName;
-
- float scaleSlope, scaleYintercept;
- float smashedSlope, smashedYintercept;
- struct addressMapping *addressMap;
- struct sectionNameMapping *sectionNames;
-
- // display options boolean state variables
- BOOL toScale;
- BOOL showLibraries;
- BOOL showAddresses;
- BOOL showNames;
- BOOL showThreads;
- BOOL showSectionNames;
-
- // drag out a rectangle for address zooming
- NXPoint sMouseDown, sFirstMouseDown;
- BOOL yLooping;
- }
-
- - free;
- - freeInternals;
- - findSizes;
- - rescale;
- - openFileNamed:(char *)fileName;
- - windowWillClose:sender;
- - initFrame:(const NXRect *)frameRect;
- - drawSelf:(NXRect *)rects :(int)rectCount;
- - mouseDown:(NXEvent *)theEvent;
- - drawThreads;
- - drawAddresses;
- - drawSegmentNames;
- - drawSectionNames;
- - show:sender;
-
- - (char *)fileType;
-
- - toggleScaling:sender;
- - toggleLibraries:sender;
- - toggleAddresses:sender;
- - toggleNames:sender;
- - toggleThreads:sender;
- - toggleSections:sender;
-
- - zoom:sender;
- - unzoom:sender;
-
- - spaceLabels;
- - spaceNames;
- - spaceSectionNames;
-
- @@end
- @
-
-
- 1.12
- log
- @stuff to support address bracket zoom-in
- @
- text
- @d8 1
- a8 1
- /* $Id: MachOView.h,v 1.11 94/05/17 23:08:53 ediger Exp Locker: ediger $ */
- d10 3
- d66 2
- d70 7
- d103 1
- d116 4
- a119 3
- float scaleSlope, scaleYintercept;
- float smashedSlope, smashedYintercept;
- struct addressMapping *addressMap;
- d121 1
- d129 1
- d146 1
- d163 1
- @
-
-
- 1.11
- log
- @support for stacking of zoomed address ranges, changed types of
- some instance vars from id to pointer to that kind of object.
- @
- text
- @d8 1
- a8 1
- /* $Id: MachOView.h,v 1.10 94/05/10 22:41:28 ediger Exp Locker: ediger $ */
- d10 4
- d68 1
- d78 1
- d93 3
- a95 3
- MachOFile *theFile; // represents Mach-O object file
- MappedFile *mappedFile; // manages memory mapping/unmapping, Mach style
- Queue *zoomStack; // stack of addresses that have been zoomed to
- @
-
-
- 1.10
- log
- @support for showing a "zooming box" by mouse-down dragging
- @
- text
- @d5 1
- d8 1
- a8 1
- /* $Id: MachOView.h,v 1.9 94/05/04 11:20:40 ediger Exp Locker: ediger $ */
- d10 3
- a45 7
- #undef DEBUG
- #ifdef DEBUG
- #define D(c) c
- #else
- #define D(c)
- #endif
-
- d61 5
- d76 1
- a76 2
- id theFile;
- id mappedFile;
- d81 4
- d86 7
- a92 2
- unsigned long hiAddr;
- unsigned long loAddr;
- d113 1
- d134 3
- @
-
-
- 1.9
- log
- @support for drawing thread's program counter(s)
- @
- text
- @d7 1
- a7 1
- /* $Id: MachOView.h,v 1.8 94/05/01 17:33:12 ediger Exp Locker: ediger $ */
- d9 3
- d97 3
- d109 1
- @
-
-
- 1.8
- log
- @efficiency improvements
- @
- text
- @d7 1
- a7 1
- /* $Id: MachOView.h,v 1.7 94/02/07 21:21:39 ediger Exp Locker: ediger $ */
- d9 3
- a58 2
-
- unsigned long *threadPC;
- d92 2
- d103 3
- d114 2
- @
-
-
- 1.7
- log
- @added instance var to hold a memory-mapped file.
- added methods and change struct addressMapping so that segment names
- can be displayed.
- @
- text
- @d7 1
- a7 1
- /* $Id: MachOView.h,v 1.6 94/01/30 21:29:39 ediger Exp Locker: ediger $ */
- d9 5
- d56 2
- d85 1
- d109 2
- a110 2
- - spaceLabels:(struct addressMapping *)addrMap;
- - spaceNames:(struct addressMapping *)addrMap;
- @
-
-
- 1.6
- log
- @ditched doFont pswrap function, added theFont Font object instance
- to get the benefits of using a Font.
- @
- text
- @d4 1
- d7 1
- a7 1
- /* $Id: MachOView.h,v 1.5 94/01/30 16:29:04 ediger Exp Locker: ediger $ */
- d9 4
- d42 3
- d47 1
- d64 1
- d82 1
- a84 1
- - init;
- a88 1
- /*- windowDidResize:sender;*/
- d99 1
- d102 1
- @
-
-
- 1.5
- log
- @some magic numbers relating to address label printing
- @
- text
- @d6 1
- a6 1
- /* $Id: MachOView.h,v 1.4 94/01/01 23:02:51 ediger Exp Locker: ediger $ */
- d8 3
- d56 1
- @
-
-
- 1.4
- log
- @broke address label spacing calcs into separate method.
- @
- text
- @d6 1
- a6 1
- /* $Id: MachOView.h,v 1.3 93/12/30 19:01:09 ediger Exp Locker: ediger $ */
- d8 3
- d41 7
- a47 1
- #define LABEL_HT 10.0
- @
-
-
- 1.3
- log
- @support for showing upper and lower addresses of memor
- mapped segments
- @
- text
- @d6 1
- a6 1
- /* $Id: MachOView.h,v 1.2 93/12/19 14:31:21 ediger Exp Locker: ediger $ */
- d8 4
- d28 3
- d33 3
- a35 2
- float yCoord;
- float yCoord2;
- d38 2
- d64 1
- d66 1
- a66 1
- - windowDidResize:sender;
- d71 1
- d73 1
- d77 2
- @
-
-
- 1.2
- log
- @corrected scaling and inclusion of mapped segments of library files
- @
- text
- @d4 1
- d6 1
- a6 1
- /* $Id: MachOView.h,v 1.1 93/12/19 12:59:49 ediger Exp Locker: ediger $ */
- d8 3
- d16 1
- a16 1
- #define DEBUG
- d23 7
- d48 1
- d63 1
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d5 5
- a9 2
- /* $Id$ */
- /* $Log$
- d32 2
- a33 1
- float slope, yintercept;
- @
-