Age | Commit message (Collapse) | Author | Files | Lines |
|
In the ppc simulator's do_fstat function, which provides the fstat
call for the simulator, if the fstat is going to fail then we
currently write an uninitialized buffer into the simulated target.
In theory, I think this is fine, we also write the error status into
the simulated target, so, given that the fstat has failed, the target
shouldn't be relying on the buffer contents.
However, writing an uninitialized buffer means we might leak simulator
private data into the simulated target, which is probably a bad thing.
Plus it probably makes life easier if something consistent, like all
zeros, is written rather than random junk, which might look like a
successful call (except for the error code).
So, in this commit, I initialize the stat buffer to zero before
it is potentially used. If the stat call is not made then the buffer
will be left initialized as all zeros.
|
|
These are almost entirely unused. For the very few places using them,
replace with explicit signed types. This matches what was done in the
common sim code.
|
|
...by reordering includes.
1. sim-utils.c
sim/mips/sim-main.h defines UserMode, while there is a struct in winnt.h
which has UserMode as a member. So if sim-main.h is included before winnt.h,
compilation fails.
2. ppc
registers.h defines CR, which is used as a member in winnt.h.
winsock2.h is included by sys/time.h, so sys/time.h has to be included
before registers.h.
Bug: https://sourceware.org/PR28476
|
|
If the OS headers define the "errno" symbol, it breaks some of these
funcs that were using "int errno" itself. Rename local vars to "err"
to avoid that, and delete the old "extern int errno".
|
|
When compiling with --enable-werror and CFLAGS="-O0 -g -Wall", we run into:
...
src/sim/ppc/emul_netbsd.c: In function 'do_gettimeofday':
src/sim/ppc/emul_netbsd.c:770:16: error: null argument where non-null \
required (argument 1) [-Werror=nonnull]
int status = gettimeofday((t_addr != 0 ? &t : NULL),
^~~~~~~~~~~~
...
Fix this by unconditionally passing &t as first argument.
|
|
Since we require C11 now, we can assume many headers exist, and
clean up all of the conditional includes. It's not like any of
this code actually accounted for the headers not existing, just
whether we could include them.
The strings.h cleanup is a little nuanced: it isn't in C11, but
every use of it in the codebase will include strings.h only if
string.h doesn't exist. Since we now assume the C11 string.h
exists, we'll never include strings.h, so we can delete it.
|
|
number.
bfd * po/es.po: Fix printf format
binutils * windmc.c: Fix printf format
gas * config/tc-arc.c: Fix printf format
opcodes * po/es.po: Fix printf format
sim * arm/armos.c: Fix printf format
* ppc/emul_netbsd.c: Fix printf format
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
|
|
sim/ppc/ChangeLog:
* emul_netbsd.c (netbsd_signal_names): Sync with NetBSD 9.99.49.
|
|
sim/ppc/ChangeLog:
* emul_netbsd.c (netbsd_error_names): Sync with NetBSD 9.99.49.
|
|
|
|
This change tracks the "closed" state of file descriptors 0, 1, and 2,
introducing the function fdbad() to emul_netbsd.c and emul_unix.c.
Note that a function of the same name and purpose exists in
sim/common/callback.c.
This patch eliminates all of the "unresolved testcases" when testing
GDB against the powerpc simulator.
This occurs because the powerpc simulator closes, on behalf of the
testcase, the file descriptors associated with stdin, stdout, and
stderr. GDB still needs these descriptors to communicate with the
user or, in this case, with the testing framework.
|
|
sim/ChangeLog:
Update old contact info in GPL license notices.
|
|
gdb/sim/ChangeLog:
Update the non-FSF-copyrighted files in sim to GPLv3 or later.
|
|
The sim keeps track of which allocations are zero-ed internally (via
zalloc) and then calls a helper "zfree" function rather than "free".
But this "zfree" function simply calls "free" itself. Since I can
see no point in this and it is simply useless overhead, punt it.
The only real change is in hw-alloc.c where we remove the zalloc_p
tracking, and sim-utils.c where zfree is delete. The rest of the
changes are a simple `sed` from "zfree" to "free".
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
* emul_unix.c (emul_unix_create): Likewise.
* tree.c (libiberty.h): Include it.
(tree_quote_property): New function.
* tree.h (tree_quote_property): Declare.
|
|
* configure.in: Regenerate.
* config.in: Likewise.
* emul_netbsd.c (write_timezone): Guard with HAVE_GETTIMEOFDAY.
* emul_unix.c (do_unix_mkdir): Handle Win32 1-argument mkdir.
|
|
Committed by Andrew Cagney.
* configure.in: Check for sys/mount.h, sys/vfs.h, sys/statfs.h.
Check for struct statfs.
* emul_netbsd.c: If not HAVE_STRUCT_STATFS, #undef HAVE_FSTATFS.
* configure, config.in: Regenerate.
|
|
* emul_netbsd.c: Only a comment may follow an #endif.
|
|
SYS_* interfaces.
|
|
open syscall to the numbers supported by the host.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|