aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year range in header of all files managed by GDBAndrew Burgess2024-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | This commit is the result of the following actions: - Running gdb/copyright.py to update all of the copyright headers to include 2024, - Manually updating a few files the copyright.py script told me to update, these files had copyright headers embedded within the file, - Regenerating gdbsupport/Makefile.in to refresh it's copyright date, - Using grep to find other files that still mentioned 2023. If these files were updated last year from 2022 to 2023 then I've updated them this year to 2024. I'm sure I've probably missed some dates. Feel free to fix them up as you spot them.
* sim: common: fix -Wunused-variable warningsMike Frysinger2023-12-191-3/+1
|
* sim: formally assume unistd.h always exists (via gnulib)Mike Frysinger2023-01-161-2/+0
| | | | | | | We have many uses of unistd.h that are unprotected by HAVE_UNISTD_H, so this is more formalizing the reality that we require this header. Since we switched to gnulib, it guarantees that a unistd.h exists for us to include, so we're doubly OK.
* Update copyright year range in header of all files managed by GDBJoel Brobecker2023-01-011-1/+1
| | | | | | | This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
* Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker2022-01-011-1/+1
| | | | | | | | This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
* sim: reorder header includesMike Frysinger2021-12-041-6/+8
| | | | | | | | | | | | We're including system headers after local headers in a bunch of places, but this leads to conflicts when our local headers happen to define symbols that show up in the system headers. Use the more standard order of: * config.h (via defs.h) * system headers * local library headers (e.g. bfd & libiberty) * sim specific headers
* sim: syscall: hoist argc/argn/argnlen to common codeMike Frysinger2021-11-161-0/+40
| | | | | Now that the callback framework supports argv & envp, we can move the Blackfin implementation of these syscalls to the common code.
* sim: syscall: fix argvlen & argv implementationMike Frysinger2021-11-161-42/+50
| | | | | | | Now that we have access to the argv & envp strings, finish implementing these syscalls. Delete unused variables, fix tbuf by incrementing the pointer instead of setting to the length, and make sure we don't write more data than the bufsize says is available.
* sim: drop unused targ-vals.h includesMike Frysinger2021-10-311-1/+0
| | | | | This is used in a few places where it's not needed. Drop the include to avoid the build-time generated header file as we move to drop it.
* sim: callback: add a kill interfaceMike Frysinger2021-06-231-0/+18
| | | | | | | This will make it easier to emulate the syscall. If the kill target is the sim itself, don't do anything. This forces the higher layers to make a decision as to how to handle this event: like halting the overall engine process.
* sim: callback: add a getpid interfaceMike Frysinger2021-06-221-1/+2
| | | | | Rather than hit the OS interface directly, use the existing callback layer so the instantiator can decide behavior.
* sim: switch config.h usage to defs.hMike Frysinger2021-05-161-3/+3
| | | | | | | | | | | | | | The defs.h header will take care of including the various config.h headers. For now, it's just config.h, but we'll add more when we integrate gnulib in. This header should be used instead of config.h, and should be the first include in every .c file. We won't rely on the old behavior where we expected files to include the port's sim-main.h which then includes the common sim-basics.h which then includes config.h. We have a ton of code that includes things before sim-main.h, and it sometimes needs to be that way. Creating a dedicated header avoids the ordering mess and implicit inclusion that shows up otherwise.
* sim: callback: convert time interface to 64-bitMike Frysinger2021-05-141-1/+1
| | | | | | | PR sim/27705 Rather than rely on time_t being the right size between the host & target, have the interface always be 64-bit. We can figure out if we need to truncate when actually outputting it to the right target.
* sim: create header namespaceMike Frysinger2021-05-141-1/+1
| | | | | | | The gdb/callback.h & gdb/remote-sim.h headers have nothing to do with gdb and are really definitions for the libsim API under the sim/ tree. While gdb uses those headers as a client, it's not specific to it. So create a new sim/ namespace and move the headers there.
* sim: syscall: add getpid supportMike Frysinger2021-04-181-0/+4
| | | | Hoist the Blackfin implementation up to the common one.
* sim: clean up C11 header includesMike Frysinger2021-01-111-6/+0
| | | | | | | | | | | | 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.
* Update copyright year range in all GDB filesJoel Brobecker2021-01-011-1/+1
| | | | | | | | | This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
* Update copyright year range in all GDB files.Joel Brobecker2020-01-011-1/+1
| | | | | | gdb/ChangeLog: Update copyright year range in all GDB files.
* Update copyright year range in all GDB files.Joel Brobecker2019-01-011-1/+1
| | | | | | | | | | | | | | | | This commit applies all changes made after running the gdb/copyright.py script. Note that one file was flagged by the script, due to an invalid copyright header (gdb/unittests/basic_string_view/element_access/char/empty.cc). As the file was copied from GCC's libstdc++-v3 testsuite, this commit leaves this file untouched for the time being; a patch to fix the header was sent to gcc-patches first. gdb/ChangeLog: Update copyright year range in all GDB files.
* Update copyright year range in all GDB filesJoel Brobecker2018-01-021-1/+1
| | | | | | gdb/ChangeLog: Update copyright year range in all GDB files
* update copyright year range in GDB filesJoel Brobecker2017-01-011-1/+1
| | | | | | | | | This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
* sim: drop common/cconfig.h in favor of a single config.hMike Frysinger2016-01-091-1/+1
| | | | | | | | | | The common subdir sets up a cconfig.h file to hold checks for the common code. In practice, most files still end up using config.h instead which just leads to confusion. Merge all the configure checks that went into cconfig.h into SIM_AC_COMMON so we can drop the cconfig.h file altogether. Now there is only a single config.h file like normal.
* GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker2016-01-011-1/+1
| | | | | | gdb/ChangeLog: Update year range in copyright notice of all files.
* sim: syscall: add common sim_syscall helpersMike Frysinger2015-06-171-1/+1
| | | | | | | Many ports have the same sim syscall logic, so add some helpers to handle all the common details. The arches still have to deal with the unpacking and packing of the syscall arguments, but the rest of the sim<->callback glue is now shared.
* Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker2015-01-011-1/+1
| | | | | | gdb/ChangeLog: Update year range in copyright notice of all files.
* callback.h:struct host_callback_struct compilation error on Windows hosts.Joel Brobecker2014-12-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, a recent gnulib update imported the lstat module, and this caused a remote-sim.c build failure in struct host_callback_struct: In file included from /[...]/gdb/remote-sim.c:34:0: /[...]/gdb/../include/gdb/callback.h:93:9: error: duplicate member '_stati64' int (*lstat) (host_callback *, const char *, struct stat *); ^ What happens it that gnulib's stat.h makes the following defines: /* Large File Support on native Windows. */ #if 1 # define stat _stati64 #endif and then: #if 1 # if ! 0 /* mingw does not support symlinks, therefore it does not have lstat. But without links, stat does just fine. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lstat stat # endif So, the following fields in struct host_callback_struct... int (*stat) (host_callback *, const char *, struct stat *); int (*fstat) (host_callback *, int, struct stat *); int (*lstat) (host_callback *, const char *, struct stat *); ... get translated to... int (*_stati64) (host_callback *, const char *, struct _stati64 *); int (*_fstati64) (host_callback *, int, struct _stati64 *); int (*_stati64) (host_callback *, const char *, struct _stati64 *); ... which causes two fields to have the same name. This patch fixes the issue by renaming the stat-related fields by adding a "to_" prefix, similar to what is done in GDB's target_ops vector. include/gdb/ChangeLog: * callback.h (struct host_callback_struct) <to_stat>: Renamed from "stat". <to_fstat>: Renamed from "fstat". <to_lstat>: Renamed from "lstat". sim/common/ChangeLog: * sim-io.c (sim_io_stat, sim_io_fstat): Adjust calls to "stat" and "fstat" callbacks by calls to "to_stat" and "to_fstat" (resp) callbacks following renaming in callback.h. * syscall.c (cb_syscall): Likewise. Adjust calls to "lstat" callback by call to "to_lstat" callback sim/cris/ChangeLog: * traps.c (cris_break_13_handler): Adjust call to "fstat" callback by call to "to_fstat" following renaming in callback.h. sim/h8300/ChangeLog: * compile.c (sim_resume): Adjust calls to "stat" and "fstat" callbacks by calls to "to_stat" and "to_fstat" (resp) callbacks following renaming in callback.h.
* sim: convert old style prototypesMike Frysinger2014-03-041-14/+4
| | | | | Most of these prototypes have been killed off, but we have a few left in the sim tree. Clean them up so we can enable the -W flag for it.
* Update Copyright year range in all files maintained by GDB.Joel Brobecker2014-01-011-1/+1
|
* Update years in copyright notice for the GDB files.Joel Brobecker2013-01-011-2/+1
| | | | | | | Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
* Copyright year update in most files of the GDB Project.Joel Brobecker2012-01-041-2/+2
| | | | | | gdb/ChangeLog: Copyright year update in most files of the GDB Project.
* sim: export cb_get_string for people to useMike Frysinger2011-12-031-3/+3
| | | | | | | | The common sim code provides a useful "get_string" function which reads a C string out of the target's memory space. So rename and export it for other people to use. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: fix func call style (space before paren)Mike Frysinger2011-05-111-2/+2
| | | | | | | | Committed this as obvious: -foo(...); +foo (...); Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: common: trim trailing whitespaceMike Frysinger2011-03-151-1/+1
|
* run copyright.sh for 2011.Joel Brobecker2011-01-011-1/+1
|
* Update copyright notices to add year 2010.Joel Brobecker2010-01-011-1/+1
|
* Update the copyright notice of some of the files I missedJoel Brobecker2009-01-141-1/+2
| | | | in the previous copyright update.
* Updated copyright notices for most files.Daniel Jacobowitz2008-01-011-1/+1
|
* 2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com>Daniel Jacobowitz2007-10-111-2/+2
| | | | | | | | | | | | | * callback.c (cb_is_stdin, cb_is_stdout, cb_is_stderr): Add functions. * syscall.c (cb_syscall): Test for stdin/out/err, not just fd 0/1/2. 2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com> * callback.h (cb_is_stdin, cb_is_stdout, cb_is_stderr): Add prototypes. 2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com> * sim/cris/c/freopen2.c: Added testcase.
* 2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com>Daniel Jacobowitz2007-10-111-1/+1
| | | | | | | | | * callback.c (cb_is_stdin): Add. * syscall.c (cb_syscall): Test for stdin, not just fd 0. 2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com> * callback.h (cb_is_stdin): Add prototype.
* Switch the license of all files explicitly copyright the FSFJoel Brobecker2007-08-241-3/+2
| | | | to GPLv3.
* Copyright updates for 2007.Daniel Jacobowitz2007-01-091-1/+1
|
* * callback.c: Remove ANSI_PROTOTYPES conditional code.Ben Elliston2005-07-081-4/+0
| | | | | * sim-load.c: Likewise. * syscall.c: Likewise.
* * syscall.c (cb_syscall) <case CB_SYS_pipe>: New case.Hans-Peter Nilsson2005-01-281-0/+27
| | | | | | | | | | * callback.c [HAVE_LIMITS_H]: Include limits.h. Include libiberty.h. (os_close, os_read, os_write, os_fstat, os_ftruncate): Support fd being either end of a pipe. (os_pipe, os_pipe_empty, os_pipe_nonempty): New functions. (os_shutdown): Clear pipe state. (default_callback): Initialize new members.
* * syscall.c (cb_syscall) <case CB_SYS_truncate>Hans-Peter Nilsson2004-12-151-0/+30
| | | | <case CB_SYS_ftruncate>: New cases.
* * syscall.c (cb_syscall) <case CB_SYS_rename>: New case.Hans-Peter Nilsson2004-12-131-0/+27
|
* * syscall.c (cb_syscall) <case CB_SYS_lstat>: New case.Hans-Peter Nilsson2004-12-131-0/+44
| | | | * callback.c (os_lstat): New function.
* * run.1: Document --sysroot=filepath.Hans-Peter Nilsson2004-12-081-3/+30
| | | | | | | | | | | | | * sim-options.c (STANDARD_OPTIONS): New member OPTION_SYSROOT. (standard_options): Support --sysroot=<path>. (standard_option_handler): Handle OPTION_SYSROOT. * syscall.c (simulator_sysroot): Define, initialized empty. (get_path): Prepend simulator_sysroot to absolute file path. [HAVE_STRING_H]: Include string.h. [!HAVE_STRING_H && HAVE_STRINGS_H]: Include strings.h. * nrun.c [HAVE_UNISTD_H]: Include unistd.h. (main): If simulator_sysroot is not empty, chdir there. * sim-config.h (simulator_sysroot): Declare.
* * callback.c: Update copyright dates.Daniel Jacobowitz2004-05-101-2/+2
| | | | | | | | | | | | | * run.c: Likewise. * sim-basics.h: Likewise. * sim-load.c: Likewise. * syscall.c: Likewise. From Maciej W. Rozycki <macro@ds2.pg.gda.pl> * callback.c: Include cconfig.h instead of config.h. * run.c: Likewise. * sim-basics.h: Likewise. * sim-load.c: Likewise. * syscall.c: Likewise.
* Move include/callback.h and include/remote-sim.h to include/gdb/.Andrew Cagney2002-06-091-1/+1
| | | | Update accordingly.
* Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1999-04-161-0/+482
|