Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Proposal: remove requirement for exact instruction count for disassemble response

未关闭
#234 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
32/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
领域
api, devtools

调研方向

先从 issue 中引用的反汇编请求定义和 instructionCount 规范开始,然后检查 VS Code 反汇编视图如何解释返回的地址。定义可用指令较少时的预期响应,并明确地址规则;当协议规范对客户端和调试适配器双方都没有歧义时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

under-discussion

The spec requires debug adapters to return exactly the number of instructions requested.

  /**
   * Number of instructions to disassemble starting at the specified location
   * and offset.
   * An adapter must return exactly this number of instructions - any
   * unavailable instructions should be replaced with an implementation-defined
   * 'invalid instruction' value.
   */
  instructionCount: number;

This presents an issue when there are not enough instructions available. The DA is then required to return an "implementation-defined" invalid instruction. It is unclear how those instructions will be used, and why they are even necessary to return. Scrolling through invalid instructions does not provide any additional information to users.

Also what the addresses should be for the invalid instructions is not defined in the spec so it is unclear how the editor can interpret them. For example, the VS Code implementation of a disassembly view will attempt to do a binary search using the addresses, which requires that the invalid instructions obey certain rules to implement this. This may also result in having to return negative addresses which also does not really make sense for an instruction.

Removing the requirement to return exactly the number of requested instructions would better define the expected disassembled instructions for both the client and server.

主要语言
HTML
星标
1.8k
派生
173
平均合并
7 天 7 小时
30 天内合并 PR
2

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/debug-adapter-protocol 的其他 Issue

查看 microsoft/debug-adapter-protocol 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。