Skip to content

Commit

Permalink
add lldb-specific HostIoOpenFlags (#100)
Browse files Browse the repository at this point in the history
* add LLDB-specific HostIoOpenFlags

* update changelog

* update docs
  • Loading branch information
mrk-its committed Feb 22, 2022
1 parent 534aff1 commit c2d64fa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
13 changes: 12 additions & 1 deletion src/target/ext/host_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -24,6 +26,15 @@ bitflags! {
const O_TRUNC = 0x400;
/// Exclusive access.
const O_EXCL = 0x800;

/// LLDB extension: Do not block.
const O_NONBLOCK = 1 << 28;
/// LLDB extension: Do not follow symlinks.
const O_DONT_FOLLOW_SYMLINKS = 1 << 29;
/// LLDB extension: Close the file when executing a new process.
const O_CLOSE_ON_EXEC = 1 << 30;
/// LLDB extension: Invalid value.
const O_INVALID = 1 << 31;
}
}

Expand Down

0 comments on commit c2d64fa

Please sign in to comment.