My Blog List

Thursday, October 28, 2010

Time Standing Still: Scouting for Time Travel Methods




This GDB was configured as "x86_64-apple-darwin".tty /dev/ttys000
Loading program into debugger…
Program loaded.
run
[Switching to process 60450]
Running…
Scouting out Time Travel methods
Encountered a Clock
Within a Building
Within a Time Portal

Debugger stopped.
Program exited with status value:0.


.....

#include <stdio.h>
#import <Foundation/Foundation.h>

//Based on, Using Multi-Level Inheritance QStart page 131

@interface Portal : NSObject

-(void) print;

@end

@implementation Portal
-(void) print
{
    printf("Within a Time Portal\n");   
}
@end

@interface Building : Portal

-(void) print2;

@end

@implementation Building
-(void) print2
{
    printf("Within a Building\n");   
}
@end

//
@interface Clock : Building

-(void) print3;

@end

@implementation Clock
-(void) print3
{
    printf("Encountered a Clock\n");   
}
@end






int main (void)
{
    Clock *c3 = [Clock new];
   
    printf("Scouting out Time Travel methods\n");
    [c3 print3];
    [c3 print2];
    [c3 print];
   

    return 0;
}

No comments:

Post a Comment