This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sim/1538: Gdb does not honor -tty option for built in simulator


>Number:         1538
>Category:       sim
>Synopsis:       Gdb does not honor -tty option for built in simulator
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 30 17:48:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Fred Fish
>Release:        current sourceware head revision
>Organization:
>Environment:
Arm-elf but probably applies to all configurations with a builtin simulator.
>Description:
For programs run inside gdb's internal simulator, gdb does not honor the -tty command line option (or the gdb "tty" command) to send the target's stdout and stderr streams to a specified tty.
 
One place this shows up as a problem is when running gdb from eclipse, where eclipse starts gdb with a specific -tty option in order to capture the target stdout/stderr streams and display the output in the eclipse console window.
 
Attached is a typescript that demonstrates the problem, using arm-elf-gdb and attempting to send the target stdout/stderr to another xterm window. Instead, the output shows up in gdb's stderr (stdout?) stream.
 
Also included is a somewhat hackish patch that does fix the problem, though may not be the optimal long term solution.  Comments on how to fix this properly would be appreciated as this is a part of gdb I'm not intimately familiar with.
>How-To-Repeat:
See attached typescript
>Fix:
See attached patch for a possible fix.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="t"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="t"

U2NyaXB0IHN0YXJ0ZWQgb24gRnJpIDMwIEphbiAyMDA0IDEwOjIyOjE5IEFNIE1TVAokIGNhdCBo
ZWxsby5jCiNpbmNsdWRlIDxzdGRpby5oPgptYWluICgpCnsKICBmcHJpbnRmIChzdGRvdXQsICJU
aGlzIG1lc3NhZ2UgdG8gc3Rkb3V0IG9uIGZpbGVubyAlZFxuIiwgZmlsZW5vKHN0ZG91dCkpOwog
IGZmbHVza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