Commit Graph

11 Commits

Author SHA1 Message Date
Joel Brobecker e2882c8578 Update copyright year range in all GDB files
gdb/ChangeLog:

        Update copyright year range in all GDB files
2018-01-02 07:38:06 +04:00
Simon Marchi a79b1bc6f6 Get rid of VEC(mem_range_s)
This patch replaces the last usages of VEC(mem_range_s) with
std::vector<mem_range>.  This allows getting rid of a few cleanups and
of the DEF_VEC_O(mem_range_s).

I added a test for normalize_mem_ranges to make sure I didn't break
anything there.

Regtested on the buildbot.

gdb/ChangeLog:

	* memrange.h (struct mem_range): Define operator< and operator==.
	(mem_range_s): Remove.
	(DEF_VEC_O (mem_range_s)): Remove.
	(normalize_mem_ranges): Change parameter type to std::vector.
	* memrange.c (compare_mem_ranges): Remove.
	(normalize_mem_ranges): Change parameter type to std::vector,
	adjust to vector change.
	* exec.c (section_table_available_memory): Return vector, remove
	parameter.
	(section_table_read_available_memory): Adjust to std::vector
	change.
	* remote.c (remote_read_bytes): Adjust to std::vector
	change.
	* tracepoint.h (traceframe_available_memory): Change parameter
	type to std::vector.
	* tracepoint.c (traceframe_available_memory): Change parameter
	type to std::vector, adjust.
	* gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
	std::vector change.
	* gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
	unittests/memrange-selftests.c.
	(SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
	* gdb/unittests/memrange-selftests.c: New file.
2017-10-16 11:07:18 -04:00
Simon Marchi 4cdd21a8d3 Use std::vector for traceframe_info::memory
Straightforward change from a VEC to std::vector.  This allows making
the destruction of a traceframe_info trivial.

I added a constructor with parameters to mem_range to be able to
emplace_back directly with the values.  It is necessary to leave a
default constructor there because mem_range is still used in a VEC.

gdb/ChangeLog:

	* memrange.h (struct mem_range): Add constructors.
	* tracepoint.h (struct traceframe_info) <memory>: Change type to
	std::vector<mem_range>.
	* tracepoint.c (free_traceframe_info): Don't manually free
	vector.
	(traceframe_info_start_memory): Adjust to vector change.
	(traceframe_available_memory): Likewise.
	* tracefile-tfile.c (build_traceframe_info): Likewise.
	* ctf.c (ctf_traceframe_info): Likewise.
2017-10-14 08:43:55 -04:00
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
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
Pedro Alves 3437254d7b Split vDSO range lookup to a gdbarch hook
We have a case in solib-svr4.c where we could reuse symfile-mem.c's
vDSO range lookup.  Since symfile-mem.c is not present in all
configurations solib-svr4.c is, move that lookup to a gdbarch hook.

This has the minor (good) side effect that we stop even trying the
target_auxv_search lookup against targets that don't have a concept of
a vDSO, in case symfile-mem.c happens to be linked in the build
(--enable-targets=all).

Tested on x86_64 Fedora 20.

gdb/
2014-10-10  Pedro Alves  <palves@redhat.com>

	* arch-utils.c (default_vsyscall_range): New function.
	* arch-utils.h (default_vsyscall_range): New declaration.
	* gdbarch.sh (vsyscall_range): New hook.
	* gdbarch.h, gdbarch.c: Regenerate.
	* linux-tdep.c (linux_vsyscall_range): New function.
	(linux_init_abi): Install linux_vsyscall_range as
	vsyscall_range gdbarch hook.
	* memrange.c (address_in_mem_range): New function.
	* memrange.h (address_in_mem_range): New declaration.
	* symfile-mem.c (find_vdso_size): Delete function.
	(add_vsyscall_page): Use gdbarch_vsyscall_range.
2014-10-10 15:57:13 +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
Joel Brobecker 0b30217134 Copyright year update in most files of the GDB Project.
gdb/ChangeLog:

        Copyright year update in most files of the GDB Project.
2012-01-04 08:17:56 +00:00
Pedro Alves 2a7498d819 2011-02-14 Pedro Alves <pedro@codesourcery.com>
gdb/
	* Makefile.in (SFILES): Add memrange.c.
	(HFILES_NO_SRCDIR): Add memrange.h.
	(COMMON_OBS): Add memrange.o.
	* memrange.c: New file.
	* memrange.h: New file.
	* tracepoint.c: Include memrange.h.
	(struct mem_range): Delete.
	(mem_range_s): Delete.
	(traceframe_available_memory): New function.
	* tracepoint.h (traceframe_available_memory): Declare.
2011-02-14 11:20:27 +00:00