Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lldb-specific HostIoOpenFlags #100

Merged
merged 3 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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