This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug sim/14935] New: printf/swiwrite with arm-none-eabi targetsimulator only working on first run
- From: "htm at lavabit dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sun, 09 Dec 2012 01:11:50 +0000
- Subject: [Bug sim/14935] New: printf/swiwrite with arm-none-eabi targetsimulator only working on first run
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14935
Bug #: 14935
Summary: printf/swiwrite with arm-none-eabi target simulator
only working on first run
Product: gdb
Version: 7.5
Status: NEW
Severity: normal
Priority: P2
Component: sim
AssignedTo: unassigned@sourceware.org
ReportedBy: htm@lavabit.com
Classification: Unclassified
Hello,
the printf behaviour with 7.5 and arm-none-eabi simulator is strange.
It will only show output on the very first run of the programm. Running it
again will show no further output.
To make it worse there seem to be two bugs:
SWIWrite (from armos.c) is only called after the first "run" after "load".
"run" again after a finished inferior will not call SWIWrite again.
This is workaroundable by calling "load" again, but then at the second run the
file descriptor is wrong:
armos.c:
res = sim_callback->write (sim_callback, f, local, len);
this will call through
callback.c
os_write
where a call to
fdbad
will return -1 and set error to EBADF because
p->fd_buddy[fd] < 0
Until a real fix (the simulator seems to be not reinitialized well)
sim_callback->write_stdout (sim_callback, local, len);
can be substituted for the write.
But this still only works on the first run.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.