Commit Graph

10 Commits

Author SHA1 Message Date
Joel Brobecker 61baf725ec update copyright year range in GDB files
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.
2017-01-01 10:52:34 +04:00
Joel Brobecker 618f726fcb GDB copyright headers update after running GDB's copyright.py script.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2016-01-01 08:43:22 +04:00
Pedro Alves e5b85ead63 gdb.base/info-os.c: Include stdlib.h
Fixes:

 > gdb compile failed, /gdb/testsuite/gdb.base/info-os.c: In function 'main':
 > /gdb/testsuite/gdb.base/info-os.c:65:3: warning: implicit declaration of function 'atexit' [-Wimplicit-function-declaration]
 >    atexit (ipc_cleanup);
 >    ^
 > FAIL: gdb.base/info-os.exp: cannot compile test program

with recent GCCs.

gdb/testsuite/ChangeLog:
2015-02-23  Pedro Alves  <palves@redhat.com>

	* gdb.base/info-os.c: Include stdlib.h.
2015-02-23 14:03:48 +00:00
Don Breazeal b9394193d0 Clean up System V IPC objects allocated by test.
This commit modifies the test program gdb.base/info-os.c so that
it cleans up all allocated System V IPC objects when a fatal
error occurs.  Without this, it was possible for the program
to leave IPC objects on the system, and such objects persist
until they are manually deleted or the system reboots.

I looked at changing the SysV IPC key for allocating the IPC objects to
IPC_PRIVATE.  That would prevent errors due to namespace conflicts with the
key.  However, the test needs to read the actual key number from the 'info
os' command output, and IPC_PRIVATE won't work for that.

gdb/testsuite/ChangeLog:
2015-02-04  Don Breazeal  <donb@codesourcery.com>

        * gdb.base/info-os.c (shmid, semid, msqid): Make variables static
        and initialize them.
        (ipc_cleanup): New function.
        (main): Don't declare shmid, semid, and msqid.  Add a call to
        atexit so that we call ipc_cleanup on exit.
2015-02-04 13:24:35 -08:00
Joel Brobecker 32d0add0a6 Update year range in copyright notice of all files owned by the GDB project.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2015-01-01 13:32:14 +04:00
Andreas Arnez a59add0c2e GDB testsuite: Fix warnings with -std=gnu11
Since upstream GCC has changed the default C language dialect to
'gnu11', it yields multiple warnings in the GDB testsuite for missing
function return types and implicit function declarations.  This patch
attempts to fix these.

gdb/testsuite/ChangeLog:

	* gdb.ada/cond_lang/foo.c (callme): Add return type.
	* gdb.base/call-sc.c (zed): Likewise.
	* gdb.base/checkpoint.c (main): Likewise.
	* gdb.base/dump.c (main): Likewise.
	* gdb.base/gcore.c (main): Likewise.
	* gdb.base/huge.c (main): Likewise.
	* gdb.base/multi-forks.c (main): Likewise.
	* gdb.base/pr10179-a.c (main): Likewise.
	* gdb.base/savedregs.c (main): Likewise.
	* gdb.base/sigaltstack.c (main): Likewise.
	* gdb.base/siginfo.c (main): Likewise.
	* gdb.base/structs.c (zed): Likewise.
	* gdb.mi/mi-stack.c (callee3, callee2, callee1, main): Likewise.
	* gdb.mi/mi-syn-frame.c (main): Likewise.
	* gdb.mi/until.c (foo, main): Likewise.
	* gdb.base/global-var-nested-by-dso.c (b_main, c_main): Declare.
	* gdb.base/solib-weak.c (foo): Declare.
	* gdb.base/attach-twice.c: Include stdio.h.
	* gdb.base/weaklib1.c: Likewise.
	* gdb.base/weaklib2.c: Likewise.
	* gdb.base/catch-signal-fork.c: Include stdio.h and sys/wait.h.
	* gdb.mi/mi-condbreak-call-thr-state-mt.c: Include stdio.h and
	unistd.h.
	* gdb.base/attach-pie-misread.c: Include stdlib.h.
	* gdb.mi/mi-exit-code.c: Likewise.
	* gdb.base/break-interp-lib.c: Include string.h.
	* gdb.base/coremaker.c: Likewise.
	* gdb.base/testenv.c: Likewise.
	* gdb.python/py-finish-breakpoint.c: Likewise.
	* gdb.base/inferior-died.c: Include sys/wait.h.
	* gdb.base/fileio.c: Include time.h.
	* gdb.base/async-shell.c: Include unistd.h.
	* gdb.base/dprintf-non-stop.c: Likewise.
	* gdb.base/info-os.c: Likewise.
	* gdb.mi/mi-console.c: Likewise.
	* gdb.mi/watch-nonstop.c: Likewise.
	* gdb.python/py-events.c: Likewise.
	* gdb.base/async.c (baz): Move up before its invocation.
	* gdb.base/code_elim2.c (my_global_func): Likewise.
	* gdb.base/skip-solib-lib.c (multiply): Likewise.
	* gdb.base/advance.c (func2): Likewise.
2014-11-13 10:20:44 +01:00
Joel Brobecker ecd75fc8ee Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Joel Brobecker 28e7fd6234 Update years in copyright notice for the GDB files.
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.
2013-01-01 06:33:28 +00:00
Stan Shebs 855ba978e4 * gdb.base/info-os.c (main): Retry resource acquisition until an
available one is found.
	* gdb.base/info-os.exp: Collect resource keys from the program
	and use them in matching.
2012-07-03 23:17:13 +00:00
Stan Shebs 85d4a67695 2012-05-11 Stan Shebs <stan@codesourcery.com>
Kwok Cheung Yeung  <kcy@codesourcery.com>

	* NEWS: Describe new info os commands.
	* common/linux-osdata.c (PID_T, TIME_T): Define.
	(MAX_PID_T_STRLEN): New.
	(linux_common_core_of_thread): Add comment.  Change to use PID_T and
	MAX_PID_T_STRLEN.
	(command_from_pid): Add comment.  Change to use PID_T.
	(commandline_from_pid):  Change to use PID_T.
	(user_from_pid): Add comment.
	(get_process_owner): Add comment. Change to use PID_T and
	MAX_PID_T_STRLEN.
	(get_number_of_cpu_cores): Add comment.
	(get_cores_used_by_process): Add comment.  Change to use PID_T and
	MAX_PID_T_STRLEN.
	(linux_xfer_osdata_processes): Change to use PID_T and
	MAX_PID_T_STRLEN.
	(compare_processes): New function.
	(linux_xfer_osdata_processgroups): New function.
	(linux_xfer_osdata_threads): Change to use PID_T.
	(linux_xfer_osdata_fds): New function.
	(format_socket_state, print_sockets): New functions.
	(union socket_addr): New union.
	(linux_xfer_osdata_isockets): New function.
	(time_from_time_t, group_from_gid): New functions.
	(linux_xfer_osdata_shm): New function.
	(linux_xfer_osdata_sem): New function.
	(linux_xfer_osdata_msg): New function.
	(linux_xfer_osdata_modules): New function.
	(osdata_table): Add new entries.
	* common/buffer.c (buffer_xml_printf): Add support for long and
	long long format specifiers.

	* gdb.texinfo (Operating System Auxiliary Information): Document new
	'info os' subcommands.

	* gdb.base/info-os.exp: New file.
	* gdb.base/info-os.c: New file.
2012-05-11 22:24:24 +00:00