Machoview 2.4 M1 Version

MachOView is a visual Mach-O file browser. It provides a complete solution for exploring and in-place editing Intel and ARM binaries.

旧版本代码编译之后打开文件可能会报下面的错误:
NSWindow drag regions should only be invalidated on the Main Thread!'
这个是由于进行状态更新的逻辑没有在主线程执行,通过下面的代码修复即可:
//----------------------------------------------------------------------------
- (void)handleThreadStateChanged:(NSNotification *)notification
{
  if ([notification object] == dataController)
  {
    NSString * threadState = [[notification userInfo] objectForKey:MVStatusUserInfoKey];
    if ([threadState isEqualToString:MVStatusTaskStarted] == YES)
    {
      if (OSAtomicIncrement32(&threadCount) == 1)
      {
        [progressIndicator setUsesThreadedAnimation:YES];
        [progressIndicator startAnimation:nil];
//        [stopButton setHidden:NO];
          dispatch_async(dispatch_get_main_queue(), ^{
              [stopButton setHidden:NO];
          });
       }
    }
    else if ([threadState isEqualToString:MVStatusTaskTerminated] == YES)
    {
      if (OSAtomicDecrement32(&threadCount) == 0)
      {
        [progressIndicator stopAnimation:nil]; 
        [statusText setStringValue:@""];
          dispatch_async(dispatch_get_main_queue(), ^{
              [stopButton setHidden:YES];
          });
//        [stopButton setHidden:YES];
      }
    }
  }
}

另外xcode 10以上在编译的时候会报下面的错误 “string” file not found:

修改c++链接库即可,按照下面步骤修复即可:

1. 修改Build Phases 在link Binary with libraries下添加libc++.tbd

2.修改Apple Clang -Language – C++下的 C++ Standard Library为 libc++ (LLVM C++ standard library with C++ 11 support即可)

编译后文件下载地址:

https://cloud.189.cn/t/MvAFja6b6zEf(访问码:czm7)

☆版权☆

* 网站名称:obaby@mars
* 网址:https://h4ck.org.cn/
* 个性:https://oba.by/
* 本文标题: 《Machoview 2.4 M1 Version》
* 本文链接:https://h4ck.org.cn/2021/05/8189
* 短链接:https://oba.by/?p=8189
* 转载文章请标明文章来源,原文标题以及原文链接。请遵从 《署名-非商业性使用-相同方式共享 2.5 中国大陆 (CC BY-NC-SA 2.5 CN) 》许可协议。


猜你喜欢:

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注