https://bugs.kde.org/show_bug.cgi?id=471311

            Bug ID: 471311
           Summary: gdb --multi mode stdout redirecting to stderr
    Classification: Developer tools
           Product: valgrind
           Version: 3.21.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: jsew...@acm.org
          Reporter: m...@klomp.org
                CC: ahajk...@redhat.com
  Target Milestone: ---

Sasha is working on a real solution for redirecting all of the stdin/out/err
file descriptors:
https://git.sr.ht/~sasshka/binutils-gdb/log/split_fd

But that needs a new gdb that understand the new proposed FdSwitch packet.

As a temporary workaround we can at least redirect stdout to stderr (and close
stdin) for the inferior (unless --port is used).

Something like:
/* close stdin */
close (0);
/* open /dev/null as new stdin */
open ("/dev/null", O_RDONLY);
/* redirect stdout as stderr */
dup2 (2, 1);

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to