mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
sim: m68hc11: warn when emul_write fails
Not sure what we should do here when this fails, so just emit a warning for now to satisfy unused result compiler warnings. We can see if any users actually notice here.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2021-05-06 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* emulos.c: Include errno.h & stdio.h.
|
||||
(emul_write): Print a warning when the write fails.
|
||||
|
||||
2021-05-04 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* dv-m68hc11.c (struct m68hc11cpu): Change attach_size to unsigned int.
|
||||
|
@ -23,6 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
@ -104,7 +106,8 @@ emul_write (sim_cpu *cpu)
|
||||
{
|
||||
uint8 val = memory_read8 (cpu, addr);
|
||||
|
||||
write(0, &val, 1);
|
||||
if (write (0, &val, 1) != 1)
|
||||
printf ("write failed: %s\n", strerror (errno));
|
||||
addr ++;
|
||||
size--;
|
||||
}
|
||||
|
Reference in New Issue
Block a user