Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add a `memoryType: assembly` to `Variable`

Đang mở
#495 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
api, devtools

Hướng nghiên cứu

Bắt đầu bằng cách xác định các định nghĩa MemoryType và Variable trong protocol, sau đó xem xét các định nghĩa liên quan EvaluateResponse, Output và SetExpressionResponse được nêu trong đề xuất. Theo dõi cách memoryReference được ghi chép và biểu diễn qua các điểm vào này; công việc được hoàn tất khi kiểu bộ nhớ assembly được đặc tả nhất quán cho tất cả các kiểu phản hồi được đề xuất và hành vi hiện có của memoryReference vẫn rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Use case

For pointers, the memoryReference attached to a pointer points to the corresponding memory.
Currently, this memory is shown in VS-Code in the hex-editor.

However, for function pointers, it would be more ergonomic to show this memory area in the disassembly view.

Proposal

type MemoryType = 'raw' | 'assembly';

interface Variable {
  // ...
  
  /**
   * A memory reference associated with this variable.
   * For pointer type variables, this is generally a reference to the memory
   * address contained in the pointer.
   * For executable data, this reference may later be used in a `disassemble`
   * request.
   * This attribute may be returned by a debug adapter if corresponding
   * capability `supportsMemoryReferences` is true.
   */
  memoryReference?: string;
  /**
   * Determines the type of memory which this memory reference is
   * referring to.
   */
  memoryType?: MemoryType;
}

// Similar for `EvaluateResponse`, `Output`, `SetExpressionResponse`

The UI could then open either the disassembly or the hex-editor for the given memoryReference, as appropriate. (Or even offer a choice to the user whether to use the disassembly or the hex-editor view).

This might also be useful in combination with microsoft/vscode#197287, where extensions might introduce own, customMemoryType. E.g., I could imagine other extensions to contribute a PNG-viewer which allows viewing PNGs directly from within the program's memory. (But I don't have any particular use case in that direction. My main motivation here is to get better default-behavior for function pointers)

Ngôn ngữ chính
HTML
Star
1.8k
Fork
173
Merge trung bình
7 ngày 7 giờ
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/debug-adapter-protocol

Tất cả issue của microsoft/debug-adapter-protocol

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.