home *** CD-ROM | disk | FTP | other *** search
- head 1.6;
- branch ;
- access ;
- symbols ;
- locks ediger:1.6;
- comment @ * @;
-
-
- 1.6
- date 94.05.29.14.58.55; author ediger; state Exp;
- branches ;
- next 1.5;
-
- 1.5
- date 94.01.30.16.28.26; author ediger; state Exp;
- branches ;
- next 1.4;
-
- 1.4
- date 93.10.31.21.34.32; author ediger; state Exp;
- branches ;
- next 1.3;
-
- 1.3
- date 93.10.28.00.07.34; author ediger; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 93.10.27.23.42.43; author ediger; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 93.10.25.18.00.10; author ediger; state Exp;
- branches ;
- next ;
-
-
- desc
- @LoadCommand object interface and declaration
- @
-
-
- 1.6
- log
- @added - (struct load_command *)loadCommandAddress; to interface
- @
- text
- @/*
- * $Id: LoadCommand.h,v 1.5 94/01/30 16:28:26 ediger Exp Locker: ediger $
- * $Log: LoadCommand.h,v $
- * Revision 1.5 94/01/30 16:28:26 ediger
- * add support for getting pc of thread load commands
- *
- * Revision 1.4 93/10/31 21:34:32 ediger
- * removed declarations of +new and -printSections
- *
- * Revision 1.3 93/10/28 00:07:34 ediger
- * ditch an unused, unnecessary instance variable
- *
- * Revision 1.2 93/10/27 23:42:43 ediger
- * changed to one subclass per type of load command
- *
- */
- #import <objc/Object.h>
- #import <sys/types.h>
- #import <mach-o/loader.h>
- #import <mach/m68k/thread_status.h>
- #import <mach/i386/thread_status.h>
- #import <stdio.h>
- #import <libc.h>
- #import <assert.h>
-
- #import <MachOFile.h>
-
- @@interface LoadCommand: Object
- {
- struct load_command *loadCommand;
- BOOL mapped; // subclasses set as appropriate
- BOOL otherFile; // load command represents another file
- }
-
-
- + new:(caddr_t)loadCommandAddress;
-
- - free;
-
- - (unsigned long)commandSize;
-
- - (BOOL)isThread;
-
- - (BOOL)isMapped;
-
- - (BOOL)representsMappedFile;
-
- - (struct load_command *)loadCommandAddress;
-
- // subclasses need to override some or all of these:
- - init;
-
- - setLoadCommand: (caddr_t)loadCommandAddress;
-
- - (unsigned long)getBaseAddress;
-
- - (unsigned long)getUpperAddress;
-
- - (char *)commandName;
-
- - (int)numberOfSections;
-
- @@end
-
- // LC_SEGMENT load command has to implement a few
- // extra methods because of the array of "struct section"
- // things it carries around.
- @@interface SegmentCommand: LoadCommand
- {
- struct segment_command *segmentCommand;
- struct section **sections;
- }
-
- - fillSections;
-
- - (struct section *)getSection:(int)sectionNumber;
-
- @@end
-
- @@interface LoadFVMLibCommand: LoadCommand
- {
- struct fvmlib_command *fvmlibCommand;
- id theOtherFile;
- }
- - loadOtherFile;
- - otherFile;
- @@end
-
- @@interface IdFVMLibCommand: LoadFVMLibCommand
- {
- char *namebuf;
- }
- @@end
-
- @@interface IdentCommand: LoadCommand
- {
- }
- @@end
-
- @@interface FVMFileCommand: LoadCommand
- {
- struct fvmfile_command *fvmFileCommand;
- }
- @@end
-
- @@interface SymTabCommand: LoadCommand
- {
- struct symtab_command *symTabCommand;
- }
- @@end
-
- @@interface SymSegCommand: LoadCommand
- {
- struct symseg_command *symSegCommand;
- }
- @@end
-
- @@interface ThreadCommand: LoadCommand
- {
- struct thread_command *threadCommand;
- }
- - (unsigned long)pc;
- @@end
-
- @@interface UnixThreadCommand: ThreadCommand
- {
- }
- - (char *)commandName;
- @@end
- @
-
-
- 1.5
- log
- @add support for getting pc of thread load commands
- @
- text
- @d2 1
- a2 1
- * $Id: LoadCommand.h,v 1.4 93/10/31 21:34:32 ediger Exp Locker: ediger $
- d4 3
- d47 2
- @
-
-
- 1.4
- log
- @removed declarations of +new and -printSections
- @
- text
- @d2 1
- a2 1
- * $Id: LoadCommand.h,v 1.3 93/10/28 00:07:34 ediger Exp Locker: ediger $
- d4 3
- d17 2
- d21 1
- d39 2
- d117 1
- @
-
-
- 1.3
- log
- @ditch an unused, unnecessary instance variable
- @
- text
- @d2 1
- a2 1
- * $Id: LoadCommand.h,v 1.2 93/10/27 23:42:43 ediger Exp Locker: ediger $
- d4 3
- a39 2
- + new;
-
- a59 2
-
- - printSections;
- @
-
-
- 1.2
- log
- @changed to one subclass per type of load command
- @
- text
- @d2 5
- a6 2
- * $Id$
- * $Log$
- d19 2
- a20 2
- BOOL mapped; // subclasses set as appropriate
- BOOL otherFile; // load command represents another file
- d34 1
- a34 1
- // subclasses need to override these:
- d51 3
- a57 1
- int nextSection;
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d1 4
- d8 1
- d11 1
- a11 10
- union segment_hdr {
- struct load_command lc;
- struct segment_command segmentc;
- struct fvmlib_command fvmlibc;
- struct thread_command threadc;
- struct symtab_command symtabc;
- struct symseg_command symsegc;
- struct ident_command idc;
- struct fvmfile_command fvmfilec;
- };
- d15 3
- a17 2
- union segment_hdr *loadCommand;
- struct section **sections;
- a19 1
- + new;
- d21 2
- d25 7
- d34 1
- a34 1
- - fillSections;
- a35 2
- - (unsigned long)getBaseAddress;
-
- d40 2
- d44 1
- a44 1
- - (unsigned long)commandSize;
- d46 9
- d57 1
- a57 1
- //- (int)compareBaseAddress:anotherSegment;
- d59 52
- @
-