From d88a4083b02129048fd51cefefd14f089686efd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Kry=C5=84ski?= Date: Mon, 21 Feb 2022 23:12:14 +0100 Subject: [PATCH 1/3] add LLDB-specific HostIoOpenFlags --- src/target/ext/host_io.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/target/ext/host_io.rs b/src/target/ext/host_io.rs index 783342d4..c9201122 100644 --- a/src/target/ext/host_io.rs +++ b/src/target/ext/host_io.rs @@ -24,6 +24,18 @@ bitflags! { const O_TRUNC = 0x400; /// Exclusive access. const O_EXCL = 0x800; + + // LLDB-specific flags, as documented at: + // https://github.com/llvm/llvm-project/blob/ec642ceebc1aacc8b16249df7734b8cf90ae2963/lldb/include/lldb/Host/File.h#L47-L66 + + /// Do not block + const O_NONBLOCK = 1 << 28; + /// Do not follow symlinks + const O_DONT_FOLLOW_SYMLINKS = 1 << 29; + /// Close the file when executing a new process + const O_CLOSE_ON_EXEC = 1 << 30; + /// Invalid value + const O_INVALID = 1 << 31; } } From 93eff84098a91a3df09acd47cf1ffdebfc46959c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Kry=C5=84ski?= Date: Mon, 21 Feb 2022 23:26:32 +0100 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b151c3d1..4125b9c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +# 0.6.1 + +- add LLDB-specific HostIoOpenFlags [\#100](https://github.com/daniel5151/gdbstub/pull/100) ([mrk](https://github.com/mrk-its)) + # 0.6.0 After over a half-year of development, `gdbstub` 0.6 has finally been released! From 4a636c4b8e824d6a676a7875ad1a4b13db11d851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Kry=C5=84ski?= Date: Tue, 22 Feb 2022 10:02:29 +0100 Subject: [PATCH 3/3] update docs --- src/target/ext/host_io.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/target/ext/host_io.rs b/src/target/ext/host_io.rs index c9201122..77dbed07 100644 --- a/src/target/ext/host_io.rs +++ b/src/target/ext/host_io.rs @@ -8,7 +8,9 @@ bitflags! { /// Host flags for opening files. /// /// Extracted from the GDB documentation at - /// [Open Flags](https://sourceware.org/gdb/current/onlinedocs/gdb/Open-Flags.html#Open-Flags) + /// [Open Flags](https://sourceware.org/gdb/current/onlinedocs/gdb/Open-Flags.html#Open-Flags), + /// and the LLDB source code at + /// [`lldb/include/lldb/Host/File.h`](https://github.com/llvm/llvm-project/blob/ec642ceebc1aacc8b16249df7734b8cf90ae2963/lldb/include/lldb/Host/File.h#L47-L66) pub struct HostIoOpenFlags: u32 { /// A read-only file. const O_RDONLY = 0x0; @@ -25,16 +27,13 @@ bitflags! { /// Exclusive access. const O_EXCL = 0x800; - // LLDB-specific flags, as documented at: - // https://github.com/llvm/llvm-project/blob/ec642ceebc1aacc8b16249df7734b8cf90ae2963/lldb/include/lldb/Host/File.h#L47-L66 - - /// Do not block + /// LLDB extension: Do not block. const O_NONBLOCK = 1 << 28; - /// Do not follow symlinks + /// LLDB extension: Do not follow symlinks. const O_DONT_FOLLOW_SYMLINKS = 1 << 29; - /// Close the file when executing a new process + /// LLDB extension: Close the file when executing a new process. const O_CLOSE_ON_EXEC = 1 << 30; - /// Invalid value + /// LLDB extension: Invalid value. const O_INVALID = 1 << 31; } }