Skip to content

Conversation

andrurogerz
Copy link
Collaborator

@andrurogerz andrurogerz commented Oct 2, 2024

Purpose

Implement responses to the vFile:mode and vFile:size packets in ds2 platform and debug server sessions. Fully addresses issue #136.

Overview

  • Add File::fileMode support to the Host::File interface
  • Implement the POSIX version of Host::File::fileMode using stat(2)
  • Stub-out the Windows implementation of Host::File::fileMode
  • Override and implement the existing SessionDelegate::onFileGetSize method in FileOperationsMixin to call the exiting Host::File::fileSize method
  • Add a new SessionDelegate::onFileGetMode method and override it in FileOperationsMixin to call the new Host::File::fileMode method
  • Fix error response of vFile:size to match the lldb documentation.

Problem Details

DS2 does not properly implement responses to the vFile:mode and vFile:size packets. These packets are documented here. Most of the pieces for vFile:size were already present, but they were not all tied together.

Validation

With some other uncommitted local patches, verify the following lldb test cases pass on Android and Linux:

TestGdbRemotePlatformFile.TestGdbRemotePlatformFile.test_platform_file_mode_fail_llgs
TestGdbRemotePlatformFile.TestGdbRemotePlatformFile.test_platform_file_mode_llgs
TestGdbRemotePlatformFile.TestGdbRemotePlatformFile.test_platform_file_size_llgs

These test cases will be re-enabled in CI testing after this and a number of other patches are merged.

@andrurogerz andrurogerz marked this pull request as ready for review October 2, 2024 20:58
@andrurogerz andrurogerz merged commit b5622cb into compnerd:main Oct 7, 2024
23 checks passed
@andrurogerz andrurogerz deleted the vfile-mode branch October 7, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants