Automatically type all block arguments in function definitions with Block_literal *

オープン
#7,342 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp, objective-c, swift

調査の方向性

The issue names no source file, test, or entry point. Start by locating the parsing of Objective-C and Swift function metadata and block literals; done means block arguments receive copied Block_literal * types and that type propagation reaches their call sites.

索引モデルが issue の本文から書いたものです。

説明

Component: Objective-C Workflow Effort: Medium Impact: Medium

When parsing Objective-C and Swift function metadata, you often encounter blocks which are stack or global closures.

When you encounter these, apply a copy of the type Block_literal * to them.

struct Block_literal {
    void *isa;                    // Pointer to block's class ("isa" pointer)
    int flags;                    // Block flags
    int reserved;                 // Reserved for future use
    void (*invoke)(void *, ...);  // Function pointer to the block's code
    struct Block_descriptor *descriptor;  // Pointer to block's descriptor
    // ... captured variables (optional, not part of base header)
};

This type is the base type of all blocks in Objective-C and Swift. It will enable proper type propagation at all the call sites. The type is just the base type -- it can be further refined by parsing the Block_descriptor. I would prefer you make a copy of the block literal, because each call site will be different and we can fine the type in a second pass.

It goes a long way towards making ObjC and Swift easier to reverse

Image

vs

Image
主要言語
C++
スター
1.3k
フォーク
298
平均マージ
5日 5時間
マージ済み PR(30日)
19

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Vector35/binaryninja-api のほかの issue

Vector35/binaryninja-api の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。