Skip to content

Releases: kxxt/tracexec

v0.4.0: tracexec can now be used as a debugger launcher!

26 May 13:53
Compare
Choose a tag to compare

I am very excited to share that tracexec can now be used as a debugger launcher.

It's usually not trivial or convenient to debug a program executed by a shell/python script(which can use pipes as stdio for the program).
The following video shows how to use tracexec to launch gdb to debug two simple programs piped together by a shell script.

gdb-launcher.mp4

Solves:

To learn more about it, read the gdb-launcher example.

Changes since v0.3.1:

Added

  • Breakpoints.
    • The breakpoints can be set in CLI(--add-breakpoint/-b) and TUI.
  • Managing breakpoint hits.
    • in CLI: option --default-external-command
    • in TUI: Hit Manager
    • Detach, Resume, or Detach, stop and run external command
  • --tracer-delay option for setting the polling delay of the tracer, in microseconds. The default is 500 when seccomp-bpf is enabled, otherwise 1.

Changed

  • Docs: make the description of --seccomp-bpf more clear

v0.3.1

21 May 23:52
Compare
Choose a tag to compare

tracexec v0.3.1 released!

Changes since v0.3.0:

Fixed

  • TUI: Fix a bug that the event list is not refreshed when new events are available in some cases.

v0.3.0

20 May 15:40
Compare
Choose a tag to compare

tracexec v0.3.0 released!

Changes since v0.2.2:

Added

  • Shell completions are now available for bash, elvish, fish, powershell and zsh!
    • Run tracexec generate-completions <SHELL> to get the completion file to install for your favorite shell.
    • Or generate completions when packaging tracexec so that users don't need to install the completions themselves.
  • TUI: Toggle showing/hiding CWDS by pressing W.
  • Musl builds are now available for x86_64 and aarch64.
  • TUI: Add Ctrl+U key binding to bottom help text, which clears the text in the search bar when editing it.

Changed

  • TUI: To optimize memory usage(avoiding storing a contiguous string separately),
    the internal regex implementation is switched to regex-cursor from regex.
  • TUI: The order of the key bindings in the bottom help text is changed.

Fixed

  • Fix build issues on musl.
  • TUI: Fix search result not being updated after toggling show/hide CWD/Env.
  • TUI: Stop following when navigating through the search results.
  • TUI: Fix incorrect wrapping behavior of the bottom key binding help text by updating ratatui and use NBSPs.
  • TUI: Fix crash when resizing the terminal by updating ratatui.

Performance

  • Store more information as cached arcstr to reduce memory usage.
  • Other optimizations to reduce memory usage.

v0.3.0-alpha.1

19 May 00:42
Compare
Choose a tag to compare
v0.3.0-alpha.1 Pre-release
Pre-release

tracexec v0.3.0-alpha.1 released!

Changes since v0.2.2:

Added

  • Shell completions are now available for bash, elvish, fish, powershell and zsh!
    • Run tracexec generate-completions <SHELL> to get the completion file to install for your favorite shell.
  • TUI: Toggle showing/hiding CWDs by pressing W.
  • Musl builds are now available for x86_64 and aarch64.

Fixed

  • Fix build issues on musl.

v0.2.2

15 May 13:09
Compare
Choose a tag to compare

tracexec v0.2.2 released!

Changes since v0.2.1:

Fixed

  • Fix a race condition in the communication between the tracer and the TUI.
  • TUI: Change the modifier key that toggles case sensitivity and regex/plain text in the search bar from Ctrl to Alt
    because in most terminals, Ctrl+I is equivalent to Tab thus the toggle is not working as expected.
  • Clarify that the license is GPL-2.0-or-later in Cargo.toml(was GPL-2.0).

Performance

  • Keep a global cache of env keys/values to reduce memory usage.

Other

  • Mark tests that need to be run single-threaded with serial_test crate so that we don't need to set RUST_TEST_THREADS=1 when running tests.

v0.2.1

14 May 10:24
Compare
Choose a tag to compare

tracexec v0.2.1 released!

Changes since v0.2.0:

  • TUI: Fix a bug that when switching to follow mode, the event list is not scrolled to the bottom immediately.

v0.2.0

14 May 04:30
Compare
Choose a tag to compare

tracexec v0.2.0 released!

0.2.0

Changes since v0.1.0:

Added

  • TUI: The events can now be searched from a search bar(Ctrl+F).
    • Both case-sensitive and case-insensitive(default) are supported.
    • Both plain text(default) and regex search are supported.
  • TUI: Show status icons for events.
  • TUI: Show process status for exec events in details popup.
  • TUI: More help text in the help dialog (F1).

Changed

  • Tracer: Automatically resolve /proc/self/exe symlink filename. (Use --no-resolve-proc-self-exe to disable)
  • Log Mode: Control whether to set terminal foreground process group with --foreground/--no-foreground.
  • TUI: don't show terminal cursor when terminal is not focused.
  • Tweak log levels.

Fixed

  • Tracer: handle pid reuse correctly.
  • TUI: Correctly handle unicode in the event list.
  • TUI: Don't crash when inputting some control codes into the pseudo terminal(e.g. Ctrl+4).
  • Log Mode: print new child with green pid.
  • Don't set terminal foreground process group in tests.
  • Add missing help text for --no-decode-errno.
  • Fix CI for publishing to crates.io (excluding /sceeenshots from the package because it's too large)

v0.2.0-rc.0

13 May 13:10
Compare
Choose a tag to compare
v0.2.0-rc.0 Pre-release
Pre-release

tracexec v0.2.0-rc.0 released!

tracexec v0.1.0

Changes since v0.1.0:

Added

  • TUI: The events can now be searched from a search bar(Ctrl+F).
    • Both case-sensitive and case-insensitive(default) are supported.
    • Both plain text(default) and regex search are supported.
  • TUI: Show status icons for events.

Changed

  • Tracer: Automatically resolve /proc/self/exe symlink filename. (Use --no-resolve-proc-self-exe to disable)
  • Log Mode: Control whether to set terminal foreground process group with --foreground/--no-foreground.
  • TUI: don't show terminal cursor when terminal is not focused.
  • Tweak log levels.

Fixed

  • Tracer: handle pid reuse correctly.
  • TUI: Correctly handle unicode in the event list.
  • TUI: Don't crash when inputting some control codes into the pseudo terminal(e.g. Ctrl+4).
  • Log Mode: print new child with green pid.
  • Don't set terminal foreground process group in tests.
  • Add missing help text for --no-decode-errno.
  • Fix CI for publishing to crates.io (excluding /sceeenshots from the package because it's too large)

v0.1.0

08 May 04:36
Compare
Choose a tag to compare

tracexec v0.1.0 is now finally released! 🎉🎉🎉

tracexec v0.1.0

This release includes TUI feature and many improvements and bug fixes.

Notable changes since v0.0.5

Added

  • An awesome TUI built with awesome ratatui.
  • Tracing and diffing file descriptors to easily catch fd leaks and figure out inherited fds.
    • [Experimental] Try to construct cmdline that reproduces the same fds/stdio. (--stdio-in-cmdline/--fd-in-cmdline)
  • Add --user option to run as a different user. (This is mostly useful for tracing setuid/setgid binaries. Thanks to strace for the idea.)
    • Automatically disable seccomp-bpf when using --user because seccomp-bpf enforces no-new-privs.
  • Add -C option to change the working directory of tracexec.
  • Add --filter{,-include,-exclude} and --show-all-events option to filter events.
  • Warn on bad envp/argv/filename and empty argv.
  • TUI: Now tracexec can be themed at compile-time by changing src/tui/theme.rs.

Fixed

  • Fix hang when root child is stopped by other signals before ptrace is setup
  • Log mode: The formatting of interpreters now correctly respects color settings(e.g. NO_COLOR).
  • Fix the logic of argv[0] handling for both logging and TUI mode.
  • Log mode: Don't crash if tcsetpgrp returns ENOTTY.
  • Some typos.

Changed

  • Use BTreeMap to make environment variables sorted and deterministic.
  • Internal logs are now logged to $XDG_DATA_HOME/tracexec/tracexec.log.
  • Tracer thread now is named tracer.
  • Some colors are changed in log mode.
  • --verbose/--quiet is removed from CLI. Use --filter{,-include,-exclude} and --show-all-events instead.
  • Log mode: --show-cmdline no longer implies --successful-only.

Other

  • Add a few tests and CI.
  • Enable LTO for release builds.
  • Use opt-level=1 for debug builds.

Changes since v0.1.0-rc.1

  • TUI: improve the message of tracee spawn/exit.
  • TUI: don't omit tracee spawn event.

v0.1.0-rc.1

07 May 06:07
Compare
Choose a tag to compare
v0.1.0-rc.1 Pre-release
Pre-release

tracexec v0.1.0-rc.1 released!

tracexec v0.1.0-rc.1

Changes since v0.1.0-rc.0:

Added

  • Enable LTO for release builds.
  • TUI: Handle F1-F12 keys and Alt+key in pseudo terminal.
  • TUI: Now tracexec can be themed at compile-time by changing src/tui/theme.rs.

Changed

  • Set max tracing level to info for release builds.
  • Remove log dependency.
  • Use opt-level=1 for debug builds.
  • Documentation update.
  • Log: disable diff-fd by default when stdio-in-cmdline is enabled.

Fixed

  • Fix some typos.
  • TUI: Don't handle key event when there are modifers but shouldn't.
  • docs: update install command for cargo install to avoid installing fixtures.
  • Don't show O_CLOEXEC fds in cmdline.