Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-debug-dev] Where does GDB's stderr go?

GDB can print valuable information to stderr, e.g the string "Hello
world there" below is printed to stderr. 

I believe this information currently goes into the bit-bucket.

Background:

- The GDB remote serial protocol supports the application being
  debugged accessing IO functions on the machine on which GDB is
  running:

http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gdb/file-i-o-remote-protocol-extension.html

- Presumably some JTAG-like(BDM?) debuggers exploit this as a channel to
  print error messages to stderr. 


This is a copy&paste from a GDB session ran w/--interperter=mi from
bash. No CDT involved.

(gdb) 
continue
&"continue\n"
Hello world there
@"aHello world\n"
~"Current language:  auto; currently c\n"
^done,reason="signal-received",signal-name="SIGTRAP",signal-meaning="Trace/breakpoint trap",thread-id="0",frame={addr="0x0005b448",func="_exit",args=[{name="status",value="0"}],file="/home/oyvind/workspace/ecosboard/zpu/toolchain/gcc/libgloss/zpu/syscalls.c",line="54"}
(gdb) 

-- 
Øyvind Harboe
http://www.zylin.com



Back to the top