- We're debugging a dylib,
libhello.dylib
- The dylib is linked from
hello
- The exported function is
helloworld()
- We do not have source, but have reversed a struct from the library and created a hand-crafted header file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<!-- iOS 10, macOS Sierra, and friends bring a new logging subsystem that's | |
supposed to scale from the kernel, up to frameworks, and up to apps. It defaults | |
to a more regimented, privacy-focused approach that large apps and complex | |
systems need. | |
It, along with Activity Tracing introduced in iOS 8 and macOS Yosemite and the | |
Console app in macOS Sierra, hope to help you graduate from caveman debugging to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MultiDirectionAdjudicatingScrollView.swift | |
// Khan Academy | |
// | |
// Created by Andy Matuschak on 12/16/14. | |
// Copyright (c) 2014 Khan Academy. All rights reserved. | |
// | |
import UIKit | |
import UIKit.UIGestureRecognizerSubclass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// LTClientBrowser.h | |
// LayerTreeServer | |
// | |
// Created by Indragie Karunaratne on 2014-05-21. | |
// Copyright (c) 2014 Indragie Karunaratne. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <LayerTreeKit/LayerTreeKit.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" File: reveal.py | |
Add to ~/.lldbinit: | |
command script import ~/.lldb-scripts/reveal.py | |
Q: Want to automatically load the Reveal lib on launch while debugging from Xcode? | |
A: In Xcode: | |
Add a Symbolic Breakpoint | |
Symbol: "UIApplicationMain" | |
Action: Debugger Command with value "reveal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static BOOL PSPDFIsDevelopmentBuild(void) { | |
#if TARGET_IPHONE_SIMULATOR | |
return YES; | |
#else | |
static BOOL isDevelopment = NO; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
// There is no provisioning profile in AppStore Apps. | |
NSData *data = [NSData dataWithContentsOfFile:[NSBundle.mainBundle pathForResource:@"embedded" ofType:@"mobileprovision"]]; | |
if (data) { |
This article is now published on my website: A one-off git repo server.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1) Created global token (in global token manager) called "ProcessorPort" with default value 8020 and checked persist. | |
// 2) Created system called "Localhost" to 127.0.0.1 | |
// 3) Created setup page with text input field with serial join 9999 with command "setPort" in "Send Value Actions > command" | |
// 4) Created command in "Localhost" system called "setPort" with following Javascript: | |
CF.setToken(CF.GlobalTokensJoin, "[ProcessorPort]", "[@s9999]"); | |
// 5) Made button on setup page called "What is my port" with code: | |
CF.getJoin(CF.GlobalTokensJoin, function(j, v, tokens) { var guiPort = tokens["[ProcessorPort]"]; CF.setJoins([{join: "s590", value: guiPort}]); }); | |
// This grabs the global token "[ProcessorPort]" and displays it in serial join s590 for testing. All works like a champ until I restart guiDesigner. I'd assume that from a fresh start and navigating to the setup page and pressing the "What is my port" button that the set persistent global token value would be displayed. Also, even from a fresh start p |