Commit Graph

626 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
Sergio Durigan Junior 21ea5acdd1 Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory.  In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively.  Bleh...

After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system.  I
decided to tackle this issue.

The patch is simple.  All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them.  The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables.  For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.

It should now be easier to update the native dependencies of hosts in
this single file.

This has been tested on x86_64 without regressions.

gdb/ChangeLog:
2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>

	* Makefile.in: Remove "@host_makefile_frag@".  Add variables
	NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
	NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
	"@nat_extra_makefile_frag@".
	(Makefile): Remove dependency on "@frags@".
	($(GNULIB_BUILDDIR)/Makefile): Likewise.
	(data-directory/Makefile): Likewise.
	* config/aarch64/linux.mh: Deleted; moved contents to
	"gdb/configure.nat".
	* config/alpha/alpha-linux.mh: Likewise.
	* config/alpha/nbsd.mh: Likewise.
	* config/arm/linux.mh: Likewise.
	* config/arm/nbsdelf.mh: Likewise.
	* config/i386/cygwin.mh: Likewise.
	* config/i386/cygwin64.mh: Likewise.
	* config/i386/darwin.mh: Likewise.
	* config/i386/fbsd.mh: Likewise.
	* config/i386/fbsd64.mh: Likewise.
	* config/i386/go32.mh: Likewise.
	* config/i386/i386gnu.mh: Likewise.
	* config/i386/i386sol2.mh: Likewise.
	* config/i386/linux.mh: Likewise.
	* config/i386/linux64.mh: Likewise.
	* config/i386/mingw.mh: Likewise.
	* config/i386/mingw64.mh: Likewise.
	* config/i386/nbsd64.mh: Likewise.
	* config/i386/nbsdelf.mh: Likewise.
	* config/i386/nto.mh: Likewise.
	* config/i386/obsd.mh: Likewise.
	* config/i386/obsd64.mh: Likewise.
	* config/i386/sol2-64.mh: Likewise.
	* config/ia64/linux.mh: Likewise.
	* config/m32r/linux.mh: Likewise.
	* config/m68k/linux.mh: Likewise.
	* config/m68k/nbsdelf.mh: Likewise.
	* config/m68k/obsd.mh: Likewise.
	* config/m88k/obsd.mh: Likewise.
	* config/mips/fbsd.mh: Likewise.
	* config/mips/linux.mh: Likewise.
	* config/mips/nbsd.mh: Likewise.
	* config/mips/obsd64.mh: Likewise.
	* config/pa/linux.mh: Likewise.
	* config/pa/nbsd.mh: Likewise.
	* config/pa/obsd.mh: Likewise.
	* config/powerpc/aix.mh: Likewise.
	* config/powerpc/fbsd.mh: Likewise.
	* config/powerpc/linux.mh: Likewise.
	* config/powerpc/nbsd.mh: Likewise.
	* config/powerpc/obsd.mh: Likewise.
	* config/powerpc/ppc64-linux.mh: Likewise.
	* config/powerpc/spu-linux.mh: Likewise.
	* config/s390/linux.mh: Likewise.
	* config/sh/nbsd.mh: Likewise.
	* config/sparc/fbsd.mh: Likewise.
	* config/sparc/linux.mh: Likewise.
	* config/sparc/linux64.mh: Likewise.
	* config/sparc/nbsd64.mh: Likewise.
	* config/sparc/nbsdelf.mh: Likewise.
	* config/sparc/obsd64.mh: Likewise.
	* config/sparc/sol2.mh: Likewise.
	* config/tilegx/linux.mh: Likewise.
	* config/vax/nbsdelf.mh: Likewise.
	* config/vax/obsd.mh: Likewise.
	* config/xtensa/linux.mh: Likewise.
	* config/i386/i386gnu.mn: New file, with excerpts from
	"config/i386/i386gnu.mh".
	* configure: Regenerate.
	* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
	*.mh files under "gdb/config".
	* configure.nat: New file, with contents from the
	"gdb/config/*/*.mh" files.

gdb/doc/ChangeLog:
2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>

	* Makefile: Remove "@host_makefile_frag@".
2017-05-06 10:09:35 -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
Thomas Schwinge 21389b7f34 Hurd, C++: Mach/Hurd headers and MIG stubs are not yet fit for C++
..., so handle these in "C" mode still:

	gdb/
	* config/i386/i386gnu.mh (%_S.o %_U.o): Add "-x c" to
	"COMPILE.post".
	* gnu-nat.c: #include Mach/Hurd headers before all others.  Wrap
	Mach/Hurd headers and MIG stubs' prototypes in 'extern "C"'.
	* i386-gnu-nat.c: Likewise.
2016-12-08 08:29:39 +01:00
Simon Marchi 03b62bbbce Normalize names of some source files
Most tdep/nat files are named:

  <cpu>-<os>-tdep.c
  <cpu>-<os>-nat.c

A few files do not respect this scheme.  This patch renames them so that
they are consistent with the rest of the files.  It builds fine with
--enable-targets=all, but that doesn't test the nat files.  I can only
hope that my grep skill is good enough.

gdb/ChangeLog:

	* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS,
	HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
	* alphabsd-nat.c: Rename to ...
	* alpha-bsd-nat.c: ... this, adjust include.
	* alphabsd-tdep.c: Rename to ...
	* alpha-bsd-tdep.c: ... this, adjust include.
	* alphabsd-tdep.h: Rename to ...
	* alpha-bsd-tdep.h: ... this, adjust include barrier and comment.
	* alphafbsd-tdep.c: Rename to ...
	* alpha-fbsd-tdep.c: ... this.
	* alphanbsd-tdep.c: Rename to ...
	* alpha-nbsd-tdep.c: ... this, adjust include.
	* alphaobsd-tdep.c: Rename to ...
	* alpha-obsd-tdep.c: ... this, adjust include.
	* amd64bsd-nat.c: Rename to ...
	* amd64-bsd-nat.c: ... this, adjust include.
	* amd64fbsd-nat.c: Rename to ...
	* amd64-fbsd-nat.c: ... this, adjust include.
	* amd64fbsd-tdep.c: Rename to ...
	* amd64-fbsd-tdep.c: ... this, adjust include.
	* amd64nbsd-nat.c: Rename to ...
	* amd64-nbsd-nat.c: ... this.
	* amd64nbsd-tdep.c: Rename to ...
	* amd64-nbsd-tdep.c: ... this.
	* amd64obsd-nat.c: Rename to ...
	* amd64-obsd-nat.c: ... this.
	* amd64obsd-tdep.c: Rename to ...
	* amd64-obsd-tdep.c: ... this.
	* amd64-tdep.h: Update comments.
	* armbsd-tdep.c: Rename to ...
	* arm-bsd-tdep.c: ... this.
	* armnbsd-nat.c: Rename to ...
	* arm-nbsd-nat.c: ... this.
	* armnbsd-tdep.c: Rename to ...
	* arm-nbsd-tdep.c: ... this.
	* armobsd-tdep.c: Rename to ...
	* arm-obsd-tdep.c: ... this.
	* arm-tdep.h: Update comments.
	* hppabsd-tdep.c: Rename to ...
	* hppa-bsd-tdep.c: ... this, adjust include.
	* hppabsd-tdep.h: Rename to ...
	* hppa-bsd-tdep.h: ... this, adjust include barrier and comment.
	* hppanbsd-nat.c: Rename to ...
	* hppa-nbsd-nat.c: ... this.
	* hppanbsd-tdep.c: Rename to ...
	* hppa-nbsd-tdep.c: ... this, adjust include.
	* hppaobsd-nat.c: Rename to ...
	* hppa-obsd-nat.c: ... this.
	* hppaobsd-tdep.c: Rename to ...
	* hppa-obsd-tdep.c: ... this, adjust include.
	* i386bsd-nat.c: Rename to ...
	* i386-bsd-nat.c: ... this, adjust include.
	* i386bsd-nat.h: Rename to ...
	* i386-bsd-nat.h: ... this, adjust include barrier and comment.
	* i386bsd-tdep.c: Rename to ...
	* i386-bsd-tdep.c: ... this.
	* i386fbsd-nat.c: Rename to ...
	* i386-fbsd-nat.c: ... this, adjust include.
	* i386fbsd-tdep.c: Rename to ...
	* i386-fbsd-tdep.c: ... this, adjust include.
	* i386fbsd-tdep.h: Rename to ...
	* i386-fbsd-tdep.h: ... this, adjust include barrier and comment.
	* i386gnu-nat.c: Rename to ...
	* i386-gnu-nat.c: ... this.
	* i386gnu-tdep.c: Rename to ...
	* i386-gnu-tdep.c: ... this.
	* i386nbsd-nat.c: Rename to ...
	* i386-nbsd-nat.c: ... this, adjust include.
	* i386nbsd-tdep.c: Rename to ...
	* i386-nbsd-tdep.c: ... this.
	* i386obsd-nat.c: Rename to ...
	* i386-obsd-nat.c: ... this, adjust include.
	* i386obsd-tdep.c: Rename to ...
	* i386-obsd-tdep.c: ... this.
	* i386v4-nat.c: Rename to ...
	* i386-v4-nat.c: ... this.
	* i386-tdep.h: Update comments.
	* m68k-tdep.h: Update comments.
	* m68kbsd-nat.c: Rename to ...
	* m68k-bsd-nat.c: ... this.
	* m68kbsd-tdep.c: Rename to ...
	* m68k-bsd-tdep.c: ... this.
	* m68klinux-nat.c: Rename to ...
	* m68k-linux-nat.c: ... this.
	* m68klinux-tdep.c: Rename to ...
	* m68k-linux-tdep.c: ... this.
	* m88kbsd-nat.c: Rename to ...
	* m88k-bsd-nat.c: ... this.
	* mipsnbsd-nat.c: Rename to ...
	* mips-nbsd-nat.c: ... this, adjust include.
	* mipsnbsd-tdep.c: Rename to ...
	* mips-nbsd-tdep.c: ... this, adjust include.
	* mipsnbsd-tdep.h: Rename to ...
	* mips-nbsd-tdep.h: ... this, adjust include barrier and comment.
	* mips64obsd-nat.c: Rename to ...
	* mips64-obsd-nat.c: ... this.
	* mips64obsd-tdep.c: Rename to ...
	* mips64-obsd-tdep.c: ... this.
	* ppcfbsd-nat.c: Rename to ...
	* ppc-fbsd-nat.c: ... this, adjust include.
	* ppcfbsd-tdep.c: Rename to ...
	* ppc-fbsd-tdep.c: ... this, adjust include.
	* ppcfbsd-tdep.h: Rename to ...
	* ppc-fbsd-tdep.h: ... this, adjust include barrier and comment.
	* ppcnbsd-nat.c: Rename to ...
	* ppc-nbsd-nat.c: ... this, adjust include.
	* ppcnbsd-tdep.c: Rename to ...
	* ppc-nbsd-tdep.c: ... this, adjust include.
	* ppcnbsd-tdep.h: Rename to ...
	* ppc-nbsd-tdep.h: ... this, adjust include barrier and comment.
	* ppcobsd-nat.c: Rename to ...
	* ppc-obsd-nat.c: ... this, adjust include.
	* ppcobsd-tdep.c: Rename to ...
	* ppc-obsd-tdep.c: ... this, adjust include.
	* ppcobsd-tdep.h: Rename to ...
	* ppc-obsd-tdep.h: ... this, adjust include barrier and comment.
	* shnbsd-nat.c: Rename to ...
	* sh-nbsd-nat.c: ... this.
	* shnbsd-tdep.c: Rename to ...
	* sh-nbsd-tdep.c: ... this.
	* sparcnbsd-nat.c: Rename to ...
	* sparc-nbsd-nat.c: ... this.
	* sparcnbsd-tdep.c: Rename to ...
	* sparc-nbsd-tdep.c: ... this.
	* sparcobsd-tdep.c: Rename to ...
	* sparc-obsd-tdep.c: ... this.
	* sparc64fbsd-nat.c: Rename to ...
	* sparc64-fbsd-nat.c: ... this.
	* sparc64fbsd-tdep.c: Rename to ...
	* sparc64-fbsd-tdep.c: ... this.
	* sparc64nbsd-nat.c: Rename to ...
	* sparc64-nbsd-nat.c: ... this.
	* sparc64nbsd-tdep.c: Rename to ...
	* sparc64-nbsd-tdep.c: ... this.
	* sparc64obsd-nat.c: Rename to ...
	* sparc64-obsd-nat.c: ... this.
	* sparc64obsd-tdep.c: Rename to ...
	* sparc64-obsd-tdep.c: ... this.
	* sparc64-tdep.h: Update comments.
	* vaxbsd-nat.c: Rename to ...
	* vax-bsd-nat.c: ... this.
	* vaxnbsd-tdep.c: Rename to ...
	* vax-nbsd-tdep.c: ... this.
	* vaxobsd-tdep.c: Rename to ...
	* vax-obsd-tdep.c: ... this.
	* x86bsd-nat.h: Rename to ...
	* x86-bsd-nat.h: ... this, adjust include barrier and comment.
	* x86bsd-nat.c: Rename to ...
	* x86-bsd-nat.c: ... this, adjust include.
	* configure.tgt: Update renamed files.
	* config/alpha/fbsd.mh: Update renamed files.
	* config/alpha/nbsd.mh: Update renamed files.
	* config/arm/nbsdelf.mh: Update renamed files.
	* config/djgpp/fnchange.lst: Update renamed files.
	* config/i386/fbsd.mh: Update renamed files.
	* config/i386/fbsd64.mh: Update renamed files.
	* config/i386/i386gnu.mh: Update renamed files.
	* config/i386/i386sol2.mh: Update renamed files.
	* config/i386/nbsd64.mh: Update renamed files.
	* config/i386/nbsdelf.mh: Update renamed files.
	* config/i386/obsd.mh: Update renamed files.
	* config/i386/obsd64.mh: Update renamed files.
	* config/i386/sol2-64.mh: Update renamed files.
	* config/m68k/linux.mh: Update renamed files.
	* config/m68k/nbsdelf.mh: Update renamed files.
	* config/m68k/obsd.mh: Update renamed files.
	* config/m88k/obsd.mh: Update renamed files.
	* config/mips/nbsd.mh: Update renamed files.
	* config/mips/obsd64.mh: Update renamed files.
	* config/pa/nbsd.mh: Update renamed files.
	* config/pa/obsd.mh: Update renamed files.
	* config/powerpc/fbsd.mh: Update renamed files.
	* config/powerpc/nbsd.mh: Update renamed files.
	* config/powerpc/obsd.mh: Update renamed files.
	* config/sh/nbsd.mh: Update renamed files.
	* config/sparc/fbsd.mh: Update renamed files.
	* config/sparc/nbsd64.mh: Update renamed files.
	* config/sparc/nbsdelf.mh: Update renamed files.
	* config/sparc/obsd64.mh: Update renamed files.
	* config/vax/nbsdelf.mh: Update renamed files.
	* config/vax/obsd.mh: Update renamed files.
2016-11-23 09:45:23 -05:00
John Baldwin a3405d124e Consolidate x86 debug register code for BSD native targets.
Move the debug register support code from amd64bsd-nat.c and
i386bsd-nat.c into a shared x86bsd-nat.c.

Instead of setting up x86_dr_low in amd64fbsd-nat.c and
i386fbsd-nat.c, add a x86bsd_target function that creates a new target
that inherits from inf_ptrace and sets up x86 debug registers if
supported.  In addition to initializing x86_dr_low, the x86bsd target
installs a custom mourn_inferior target operation to clean up the
x86 debug register state.  Previously this was only done on amd64.
Now it will be done for both i386 and amd64.  The i386bsd_target and
amd64bsd_target functions create targets that inherit from x86bsd
rather than inf_ptrace.

gdb/ChangeLog:

	* Makefile.in [HFILES_NO_SRCDIR]: Replace 'amd64bsd-nat.h' with
	'x86bsd-nat.h'.
	* amd64bsd-nat.c: Include 'x86bsd-nat.h' instead of
	'amd64bsd-nat.h'.
	(amd64bsd_xsave_len): Rename and move to x86bsd-nat.c.
	(amd64bsd_fetch_inferior_registers): Replace 'amd64bsd_xsave_len'
	with 'x86bsd_xsave_len'.
	(amd64bsd_store_inferior_registers): Likewise.
	(amd64bsd_target): Inherit from x86bsd_target.
	(amd64bsd_dr_get): Rename and move to x86bsd-nat.c.
	(amd64bsd_dr_set): Likewise.
	(amd64bsd_dr_set_control): Likewise.
	(amd64bsd_dr_set_addr): Likewise.
	(amd64bsd_dr_get_addr): Likewise.
	(amd64bsd_dr_get_status): Likewise.
	(amd64bsd_dr_get_control): Likewise.
	* amd64fbsd-nat.c: Include 'x86bsd-nat.h' instead of
	'amd64bsd-nat.h'.
	(super_mourn_inferior): Move to x86bsd-nat.c.
	(amd64fbsd_mourn_inferior): Rename and move to x86bsd-nat.c.
	(amd64fbsd_read_description): Replace 'amd64bsd_xsave_len' with
	'x86bsd_xsave_len'.
	(_initialize_amd64fbsd_nat): Remove x86 watchpoint setup and
	mourn_inferior' target op.
	* config/i386/fbsd.mh (NATDEPFILES): Add x86bsd-nat.o.
	* config/i386/fbsd64.mh: Likewise.
	* config/i386/nbsd64.mh: Likewise.
	* config/i386/nbsdelf.mh: Likewise.
	* config/i386/obsd.mh: Likewise.
	* config/i386/obsd64.mh: Likewise.
	* i386bsd-nat.c: Include 'x86bsd-nat.h'.
	(i386bsd_xsave_len): Rename and move to x86bsd-nat.c.
	(i386bsd_fetch_inferior_registers): Replace 'i386bsd_xsave_len'
	with 'x86bsd_xsave_len'.
	(i386bsd_store_inferior_registers): Likewise.
	(i386bsd_target): Inherit from x86bsd_target.
	(i386bsd_dr_get): Rename and move to x86bsd-nat.c.
	(i386bsd_dr_set): Likewise.
	(i386bsd_dr_set_control): Likewise.
	(i386bsd_dr_set_addr): Likewise.
	(i386bsd_dr_get_addr): Likewise.
	(i386bsd_dr_get_status): Likewise.
	(i386bsd_dr_get_control): Likewise.
	* i386bsd-nat.h (i386bsd_xsave_len): Remove.
	(i386bsd_dr_set_control): Remove.
	(i386bsd_dr_set_addr): Remove.
	(i386bsd_dr_get_addr): Remove.
	(i386bsd_dr_get_status): Remove.
	(i386bsd_dr_get_control): Remove.
	* i386fbsd-nat.c: Include 'x86bsd-nat.h'.
	(i386fbsd_read_description): Replace 'i386bsd_xsave_len' with
	'x86bsd_xsave_len'.
	(_initialize_i386fbsd_nat): Remove x86 watchpoint setup and
	mourn_inferior' target op.
	* x86bsd-nat.c: New file.
	* x86bsd-nat.h: New file.
2016-07-01 07:00:38 -07:00
Walfred Tedeschi 93813b37c8 Merge gdb and gdbserver implementations for siginfo
Extract the compatible siginfo handling from amd64-linux-nat.c and
gdbserver/linux-x86-low to a new file nat/amd64-linux-siginfo.c.

2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>

gdb/ChangeLog:

	* nat/amd64-linux-siginfo.c: New file.
	* nat/amd64-linux-siginfo.h: New file.
	* Makefile.in (HFILES_NO_SRCDIR): Add nat/amd64-linux-siginfo.h.
	(amd64-linux-siginfo.o): New rule.
	* config/i386/linux64.mh (NATDEPFILES): Add amd64-linux-siginfo.o.
	* amd64-linux-nat.c (nat/amd64-linux-siginfo.h): New include.
	(compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
	(compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
	(compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
	(cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
	(cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
	(cpt_si_fd, si_timerid, si_overrun): Move to nat/amd64-linux-siginfo.c.

gdb/gdbserver/ChangeLog:

	* configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
	to srv_tgtobj.
	(i[34567]86-*-linux*): Add amd64-linux-siginfo.o
	to srv_tgtobj.
	* linux-x86-low.c [__x86_64__]: Include
	"nat/amd64-linux-siginfo.h".
	(compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
	(compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
	(compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
	(cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
	(cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
	(cpt_si_fd, si_timerid, si_overrun): Move from
	nat/amd64-linux-siginfo.c.
	* Makefile.in (amd64-linux-siginfo.o:): New rule.
2016-02-02 11:42:56 +01: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
Jan Kratochvil db1ff28b60 Revert the previous 7 commits of: Validate binary before use
ddc98fbf2f Create empty nat/linux-maps.[ch] and common/target-utils.[ch]
6e5b4429db Move gdb_regex* to common/
f7af1fcd75 Prepare linux_find_memory_regions_full & co. for move
9904185cfd Move linux_find_memory_regions_full & co.
700ca40f6f gdbserver build-id attribute generator
ca5268b6be Validate symbol file using build-id
0a94970d66 Tests for validate symbol file using build-id

gdb/ChangeLog
2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Revert the previous 6 commits:
	Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
	Move gdb_regex* to common/
	Prepare linux_find_memory_regions_full & co. for move
	Move linux_find_memory_regions_full & co.
	gdbserver build-id attribute generator
	Validate symbol file using build-id

gdb/gdbserver/ChangeLog
2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Revert the previous 3 commits:
	Move gdb_regex* to common/
	Move linux_find_memory_regions_full & co.
	gdbserver build-id attribute generator

gdb/doc/ChangeLog
2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Revert the previous 2 commits:
	gdbserver build-id attribute generator
	Validate symbol file using build-id

gdb/testsuite/ChangeLog
2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Revert the previous commit:
	Tests for validate symbol file using build-id.
2015-07-15 20:27:32 +02:00
Jan Kratochvil ddc98fbf2f Create empty nat/linux-maps.[ch] and common/target-utils.[ch]
Prepare new files for later move.

gdb/ChangeLog
2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
	* Makefile.in (HFILES_NO_SRCDIR); Add nat/linux-maps.h,
	common/target-utils.h.
	(COMMON_OBS): Add target-utils.o.
	(linux-maps.o, target-utils.o): New.
	* target/target-utils.c: New file.
	* target/target-utils.h: New file.
	* config/i386/linux.mh (NATDEPFILES): Add linux-maps.o.
	* config/i386/linux64.mh (NATDEPFILES): Ditto.
	* nat/linux-maps.c: New file.
	* nat/linux-maps.h: New file.

gdb/gdbserver/ChangeLog
2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
	* Makefile.in (OBS): Add target-utils.o.
	(linux-maps.o, target-utils.o): New.
	* configure.srv (srv_linux_obj): Add linux-maps.o.
2015-07-15 17:37:27 +02:00
Gary Benson 4b8b5e7245 Introduce nat/linux-namespaces.[ch]
This commit introduces new shared files nat/linux-namespaces.[ch]
containing code to support Linux namespaces that will be used by
both GDB and gdbserver.

gdb/ChangeLog:

	* configure.ac (AC_CHECK_FUNCS): Add setns.
	* config.in: Regenerate.
	* configure: Likewise.
	* nat/linux-namespaces.h: New file.
	* nat/linux-namespaces.c: Likewise.
	* Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-namespaces.h.
	(linux-namespaces.o): New rule.
	* config/aarch64/linux.mh (NATDEPFILES): Add linux-namespaces.o.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
	* config/arm/linux.mh (NATDEPFILES): Likewise.
	* config/i386/linux.mh (NATDEPFILES): Likewise.
	* config/i386/linux64.mh (NATDEPFILES): Likewise.
	* config/ia64/linux.mh (NATDEPFILES): Likewise.
	* config/m32r/linux.mh (NATDEPFILES): Likewise.
	* config/m68k/linux.mh (NATDEPFILES): Likewise.
	* config/mips/linux.mh (NATDEPFILES): Likewise.
	* config/pa/linux.mh (NATDEPFILES): Likewise.
	* config/powerpc/linux.mh (NATDEPFILES): Likewise.
	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
	* config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
	* config/s390/linux.mh (NATDEPFILES): Likewise.
	* config/sparc/linux.mh (NATDEPFILES): Likewise.
	* config/sparc/linux64.mh (NATDEPFILES): Likewise.
	* config/tilegx/linux.mh (NATDEPFILES): Likewise.
	* config/xtensa/linux.mh (NATDEPFILES): Likewise.

gdb/gdbserver/ChangeLog:

	* configure.ac (AC_CHECK_FUNCS): Add setns.
	* config.in: Regenerate.
	* configure: Likewise.
	* Makefile.in (SFILES): Add nat/linux-namespaces.c.
	(linux-namespaces.o): New rule.
	* configure.srv (srv_linux_obj): Add linux-namespaces.o.
2015-06-10 14:28:43 +01:00
Gary Benson 8e5d407004 Move low-level Linux x86 debug register code to a shared file
This commit moves the now-identical low-level Linux x86 debug register
code from gdb/x86-linux-nat.c and gdb/gdbserver/linux-x86-low.c into a
new shared file gdb/nat/x86-linux-dregs.c.

gdb/ChangeLog:

	* nat/x86-linux-dregs.h: New file.
	* nat/x86-linux-dregs.c: Likewise.
	* Makefile.in (HFILES_NO_SRCDIR): Add nat/x86-linux-dregs.h.
	(x86-linux-dregs.o): New rule.
	* config/i386/linux.mh (NATDEPFILES): Add x86-linux-dregs.o.
	* config/i386/linux64.mh (NATDEPFILES): Likewise.
	* x86-linux-nat.c: Include nat/x86-linux-dregs.h.
	(u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
	(x86_linux_dr_get): Likewise.
	(x86_linux_dr_set): Likewise.
	(x86_linux_dr_get_addr): Likewise.
	(x86_linux_dr_get_control): Likewise.
	(x86_linux_dr_get_status): Likewise.
	(update_debug_registers_callback): Likewise.
	(x86_linux_dr_set_control): Likewise.
	(x86_linux_dr_set_addr): Likewise.
	(x86_linux_update_debug_registers): Likewise.

gdb/gdbserver/ChangeLog:

	* Makefile.in (x86-linux-dregs.o): New rule.
	* configure.srv: Add x86-linux-dregs.o to relevant targets.
	* linux-x86-low.c: Include nat/x86-linux-dregs.h.
	(u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
	(x86_linux_dr_get): Likewise.
	(x86_linux_dr_set): Likewise.
	(update_debug_registers_callback): Likewise.
	(x86_linux_dr_set_addr): Likewise.
	(x86_linux_dr_get_addr): Likewise.
	(x86_linux_dr_set_control): Likewise.
	(x86_linux_dr_get_control): Likewise.
	(x86_linux_dr_get_status): Likewise.
	(x86_linux_update_debug_registers): Likewise.
2015-03-24 14:05:45 +00:00
Gary Benson 4b134ca108 Make lwp_info.arch_private handling shared
This commit moves the code to handle lwp_info.arch_private for
Linux x86 into a new shared file, nat/x86-linux.c.

gdb/ChangeLog:

	* nat/x86-linux.h: New file.
	* nat/x86-linux.c: Likewise.
	* Makefile.in (HFILES_NO_SRCDIR): Add nat/x86-linux.h.
	(x86-linux.o): New rule.
	* config/i386/linux.mh (NATDEPFILES): Add x86-linux.o.
	* config/i386/linux64.mh (NATDEPFILES): Likewise.
	* nat/linux-nat.h (struct arch_lwp_info): New forward declaration.
	(lwp_set_arch_private_info): New declaration.
	(lwp_arch_private_info): Likewise.
	* linux-nat.c (lwp_set_arch_private_info): New function.
	(lwp_arch_private_info): Likewise.
	* x86-linux-nat.c: Include nat/x86-linux.h.
	(arch_lwp_info): Removed structure.
	(update_debug_registers_callback):
	Use lwp_set_debug_registers_changed.
	(x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
	and lwp_set_debug_registers_changed.
	(x86_linux_new_thread): Use lwp_set_debug_registers_changed.

gdb/gdbserver/ChangeLog:

	* Makefile.in (x86-linux.o): New rule.
	* configure.srv: Add x86-linux.o to relevant targets.
	* linux-low.c (lwp_set_arch_private_info): New function.
	(lwp_arch_private_info): Likewise.
	* linux-x86-low.c: Include nat/x86-linux.h.
	(arch_lwp_info): Removed structure.
	(update_debug_registers_callback):
	Use lwp_set_debug_registers_changed.
	(x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
	and lwp_set_debug_registers_changed.
	(x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2015-03-24 14:05:44 +00:00
Sergio Durigan Junior 8cc73a3902 Move code to disable ASR to nat/
This patch moves the shared code present on
gdb/linux-nat.c:linux_nat_create_inferior and
gdb/gdbserver/linux-low.c:linux_create_inferior to
nat/linux-personality.c.  This code is responsible for disabling
address space randomization based on user setting, and using
<sys/personality.h> to do that.  I decided to put the prototype of the
maybe_disable_address_space_randomization on nat/linux-osdata.h
because it seemed the best place to put it.

I regression-tested this patch on Fedora 20 x86_64, and found no
regressions.

gdb/ChangeLog
2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>

	* Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-personality.h.
	(linux-personality.o): New rule.
	* common/common-defs.h: Include <stdint.h>.
	* config/aarch64/linux.mh (NATDEPFILES): Include
	linux-personality.o.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
	* config/arm/linux.mh (NATDEPFILES): Likewise.
	* config/i386/linux64.mh (NATDEPFILES): Likewise.
	* config/i386/linux.mh (NATDEPFILES): Likewise.
	* config/ia64/linux.mh (NATDEPFILES): Likewise.
	* config/m32r/linux.mh (NATDEPFILES): Likewise.
	* config/m68k/linux.mh (NATDEPFILES): Likewise.
	* config/mips/linux.mh (NATDEPFILES): Likewise.
	* config/pa/linux.mh (NATDEPFILES): Likewise.
	* config/powerpc/linux.mh (NATDEPFILES): Likewise.
	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
	* config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
	* config/s390/linux.mh (NATDEPFILES): Likewise.
	* config/sparc/linux64.mh (NATDEPFILES): Likewise.
	* config/sparc/linux.mh (NATDEPFILES): Likewise.
	* config/tilegx/linux.mh (NATDEPFILES): Likewise.
	* config/xtensa/linux.mh (NATDEPFILES): Likewise.
	* defs.h: Remove #include <stdint.h> (moved to
	common/common-defs.h).
	* linux-nat.c: Include nat/linux-personality.h.  Remove #include
	<sys/personality.h>; do not define ADDR_NO_RANDOMIZE (moved to
	nat/linux-personality.c).
	(linux_nat_create_inferior): Remove code to disable address space
	randomization (moved to nat/linux-personality.c).  Create cleanup
	to disable address space randomization.
	* nat/linux-personality.c: New file.
	* nat/linux-personality.h: Likewise.

gdb/gdbserver/ChangeLog
2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>

	* Makefile.in (SFILES): Add linux-personality.c.
	(linux-personality.o): New rule.
	* configure.srv (srv_linux_obj): Add linux-personality.o to the
	list of objects to be built.
	* linux-low.c: Include nat/linux-personality.h.
	(linux_create_inferior): Remove code to disable address space
	randomization (moved to ../nat/linux-personality.c).  Create
	cleanup to disable address space randomization.
2015-01-15 15:10:49 -05: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
Ulrich Weigand ac3d87c0d2 Use core regset iterators on GNU Hurd
Remove native-only core file handling on GNU Hurd.  Instead, enable the
x86 target generic core regset logic on the Hurd by providing an
appropriate register offset map.

Thanks to Samuel Thibault for testing!

gdb/

	* config/i386/i386gnu.mh (NATDEPFILES): Remove core-regset.o.
	* i386gnu-nat.c: Do not include <sys/procfs.h> or "gregset.h".
	(CREG_OFFSET, creg_offset, CREG_ADDR): Remove.
	(supply_gregset, supply_fpregset): Remove.
	* i386gnu-tdep.c (i386gnu_gregset_reg_offset): New variable.
	(i386gnu_init_abi): Set tdep->gregset_reg_offset, gregset_num_regs,
	and sizeof_gregset.
2014-12-01 13:42:41 +01:00
Yao Qi 2acf986b74 Don't set CC in config/i386/go32.mh
I cross-compile gdb for msdosdjgpp (both target and host is
i586-pc-msdosdjgpp), so the CC should be i586-pc-msdosdjgpp-gcc.
However, CC is set incorrectly to gcc after config/i386/go32.mh is inlined
into the Makefile.

This patch is to remove the CC setting in config/i386/go32.mh.

gdb:

2014-11-19  Yao Qi  <yao@codesourcery.com>

	* config/i386/go32.mh (CC): Remove.
2014-11-19 15:44:35 +08:00
Samuel Thibault 05db5edd79 Add hardware watchpoint support for x86 GNU Hurd.
gdb/
	* config/i386/i386gnu.mh (NATDEPFILES): Add x86-nat.o and
	x86-dregs.o.
	* gnu-nat.c (inf_threads): New function.
	* gnu-nat.h (inf_threads_ftype): New typedef.
	(inf_threads): New declaration.
	* i386gnu-nat.c: Include "x86-nat.h" and "inf-child.h".
	[i386_DEBUG_STATE] (i386_gnu_dr_get, i386_gnu_dr_set)
	(i386_gnu_dr_set_control_one, i386_gnu_dr_set_control)
	(i386_gnu_dr_set_addr_one, i386_gnu_dr_set_addr)
	(i386_gnu_dr_get_reg, i386_gnu_dr_get_addr, 386_gnu_dr_get_status)
	(i386_gnu_dr_get_control): New functions.
	(reg_addr): New structure.
	(_initialize_i386gnu_nat) [i386_DEBUG_STATE]: Initialize hardware
	i386 debugging register hooks.
	* NEWS: Mention this.
2014-09-16 14:38:09 +02:00
Gary Benson df7e526582 Rename 32- and 64-bit Intel files from "i386" to "x86"
This commit renames nine files that contain code used by both 32- and
64-bit Intel ports such that their names are prefixed with "x86"
rather than "i386".  All types, functions and variables within these
files are likewise renamed such that their names are prefixed with
"x86" rather than "i386".  This makes GDB follow the convention used
by gdbserver such that 32-bit Intel code lives in files called
"i386-*", 64-bit Intel code lives in files called "amd64-*", and code
for both 32- and 64-bit Intel lives in files called "x86-*".

This commit only renames OS-independent files.  The Linux ports of
both GDB and gdbserver now follow the i386/amd64/x86 convention fully.
Some ports still use the old convention where "i386" in file/function/
type/variable names can mean "32-bit only" or "32- and 64-bit" but I
don't want to touch ports I can't fully test except where absolutely
necessary.

gdb/ChangeLog:

	* i386-nat.h: Renamed as...
	* x86-nat.h: New file.  All type, function and variable name
	prefixes changed from "i386_" to "x86_".  All references updated.
	* i386-nat.c: Renamed as...
	* x86-nat.c: New file.  All type, function and variable name
	prefixes changed from "i386_" to "x86_".  All references updated.
	* common/i386-xstate.h: Renamed as...
	* common/x86-xstate.h: New file.  All type, function and variable
	name prefixes changed from "i386_" to "x86_".  All references
	updated.
	* nat/i386-cpuid.h: Renamed as...
	* nat/x86-cpuid.h: New file.  All type, function and variable name
	prefixes changed from "i386_" to "x86_".  All references updated.
	* nat/i386-gcc-cpuid.h: Renamed as...
	* nat/x86-gcc-cpuid.h: New file.  All type, function and variable
	name prefixes changed from "i386_" to "x86_".  All references
	updated.
	* nat/i386-dregs.h: Renamed as...
	* nat/x86-dregs.h: New file.  All type, function and variable name
	prefixes changed from "i386_" to "x86_".  All references updated.
	* nat/i386-dregs.c: Renamed as...
	* nat/x86-dregs.c: New file.  All type, function and variable name
	prefixes changed from "i386_" to "x86_".  All references updated.

gdb/gdbserver/ChangeLog:

	* i386-low.h: Renamed as...
	* x86-low.h: New file.  All type, function and variable name
	prefixes changed from "i386_" to "x86_".  All references updated.
	* i386-low.c: Renamed as...
	* x86-low.c: New file.  All type, function and variable name
	prefixes changed from "i386_" to "x86_".  All references updated.
2014-09-02 16:54:08 +01:00
Gary Benson 040baaf6de Move duplicated code into new files
This commit moves the duplicated code in {i386,amd64}-linux-nat.c
into the new files x86-linux-nat.[ch].  Additionally, a new
file i386-linux-nat.h was required to expose a value required
by the 32-bit code in x86-linux-nat.c.

gdb/
2014-07-11  Gary Benson  <gbenson@redhat.com>

	* i386-linux-nat.h: New file.
	* x86-linux-nat.h: Likewise.
	* x86-linux-nat.c: Likewise.
	* Makefile.in (HFILES_NO_SRCDIR): Add the above new headers.
	* config/i386/linux.mh (NATDEPFILES): Add x86-linux-nat.o.
	* config/i386/linux64.mh (NATDEPFILES): Likewise.
	* amd64-linux-nat.c (x86-linux-nat.h): New include.
	(PTRACE_GETREGSET): Now in x86-linux-nat.h.
	(PTRACE_SETREGSET): Likewise.
	(arch_lwp_info): Now in x86-linux-nat.c.
	(have_ptrace_getregset): Now in x86-linux-nat.h.
	(x86_linux_dr_get): Now in x86-linux-nat.c.
	(x86_linux_dr_set): Likewise.
	(x86_linux_dr_get_addr): Likewise.
	(x86_linux_dr_get_control): Likewise.
	(x86_linux_dr_get_status): Likewise.
	(update_debug_registers_callback): Likewise.
	(x86_linux_dr_set_control): Likewise.
	(x86_linux_dr_set_addr): Likewise.
	(x86_linux_prepare_to_resume): Likewise.
	(x86_linux_new_thread): Likewise.
	(x86_linux_new_fork): Likewise.
	(x86_linux_get_thread_area): Likewise.
	(super_post_startup_inferior): Likewise.
	(x86_linux_child_post_startup_inferior): Likewise.
	(AMD64_LINUX_USER64_CS): Likewise.
	(AMD64_LINUX_X32_DS): Likewise.
	(x86_linux_read_description): Likewise.
	(x86_linux_enable_btrace): Likewise.
	(x86_linux_disable_btrace): Likewise.
	(x86_linux_teardown_btrace): Likewise.
	(x86_linux_read_btrace): Likewise.
	(x86_linux_create_target): Likewise.
	(x86_linux_add_target): Likewise.
	* i386-linux-nat.c (x86-linux-nat.h): New include.
	(PTRACE_GETREGSET): Now in x86-linux-nat.h.
	(PTRACE_SETREGSET): Likewise.
	(arch_lwp_info): Now in x86-linux-nat.c.
	(have_ptrace_getregset): Now in x86-linux-nat.h.
	(x86_linux_dr_get): Now in x86-linux-nat.c.
	(x86_linux_dr_set): Likewise.
	(x86_linux_dr_get_addr): Likewise.
	(x86_linux_dr_get_control): Likewise.
	(x86_linux_dr_get_status): Likewise.
	(update_debug_registers_callback): Likewise.
	(x86_linux_dr_set_control): Likewise.
	(x86_linux_dr_set_addr): Likewise.
	(x86_linux_prepare_to_resume): Likewise.
	(x86_linux_new_thread): Likewise.
	(x86_linux_new_fork): Likewise.
	(x86_linux_get_thread_area): Likewise.
	(super_post_startup_inferior): Likewise.
	(x86_linux_child_post_startup_inferior): Likewise.
	(AMD64_LINUX_USER64_CS): Likewise.
	(AMD64_LINUX_X32_DS): Likewise.
	(x86_linux_read_description): Likewise.
	(x86_linux_enable_btrace): Likewise.
	(x86_linux_disable_btrace): Likewise.
	(x86_linux_teardown_btrace): Likewise.
	(x86_linux_read_btrace): Likewise.
	(x86_linux_create_target): Likewise.
	(x86_linux_add_target): Likewise.
2014-07-11 12:24:26 +01:00
Gary Benson 3a8ee006fb Create nat/i386-dregs.c
This commit moves code to be shared from i386-{nat,low}.[ch]
into a new file, nat/i386-dregs.c.

gdb/
2014-06-19  Gary Benson  <gbenson@redhat.com>

	* nat/i386-dregs.c: New file.
	* Makefile.in (i386-dregs.o): New rule.
	* config/i386/cygwin.mh (NATDEPFILES): Add i386-dregs.o.
	* config/i386/cygwin64.mh (NATDEPFILES): Likewise.
	* config/i386/darwin.mh (NATDEPFILES): Likewise.
	* config/i386/fbsd.mh (NATDEPFILES): Likewise.
	* config/i386/fbsd64.mh (NATDEPFILES): Likewise.
	* config/i386/go32.mh (NATDEPFILES): Likewise.
	* config/i386/linux.mh (NATDEPFILES): Likewise.
	* config/i386/linux64.mh (NATDEPFILES): Likewise.
	* config/i386/mingw.mh (NATDEPFILES): Likewise.
	* config/i386/mingw64.mh (NATDEPFILES): Likewise.
	* i386-nat.h (debug_hw_points): New declaration.
	* i386-nat.c (breakpoint.h): Remove include.
	(command.h): Likewise.
	(target.h): Likewise.
	(gdb_assert.h): Likewise.
	(debug_hw_points): Made nonstatic.
	(debug_printf): Now in i386-dregs.c.
	(TARGET_HAS_DR_LEN_8): Likewise.
	(DR_CONTROL_SHIFT): Likewise.
	(DR_CONTROL_SIZE): Likewise.
	(DR_RW_EXECUTE): Likewise.
	(DR_RW_WRITE): Likewise.
	(DR_RW_READ): Likewise.
	(DR_RW_IORW): Likewise.
	(DR_LEN_1): Likewise.
	(DR_LEN_2): Likewise.
	(DR_LEN_4): Likewise.
	(DR_LEN_8): Likewise.
	(DR_LOCAL_ENABLE_SHIFT): Likewise.
	(DR_GLOBAL_ENABLE_SHIFT): Likewise.
	(DR_ENABLE_SIZE): Likewise.
	(DR_LOCAL_SLOWDOWN): Likewise.
	(DR_GLOBAL_SLOWDOWN): Likewise.
	(DR_CONTROL_RESERVED): Likewise.
	(I386_DR_CONTROL_MASK): Likewise.
	(I386_DR_VACANT): Likewise.
	(I386_DR_LOCAL_ENABLE): Likewise.
	(I386_DR_GLOBAL_ENABLE): Likewise.
	(I386_DR_DISABLE): Likewise.
	(I386_DR_SET_RW_LEN): Likewise.
	(I386_DR_GET_RW_LEN): Likewise.
	(I386_DR_WATCH_HIT): Likewise.
	(i386_wp_op_t): Likewise.
	(i386_show_dr): Likewise.
	(i386_length_and_rw_bits): Likewise.
	(i386_insert_aligned_watchpoint): Likewise.
	(i386_remove_aligned_watchpoint): Likewise.
	(i386_handle_nonaligned_watchpoint): Likewise.
	(i386_update_inferior_debug_regs): Likewise.
	(i386_insert_watchpoint): Use i386_dr_insert_watchpoint.
	(i386_remove_watchpoint): Use i386_dr_remove_watchpoint.
	(i386_region_ok_for_watchpoint):
	Use i386_dr_region_ok_for_watchpoint.
	(i386_stopped_data_address): Use i386_dr_stopped_data_address.

gdb/gdbserver/
2014-06-19  Gary Benson  <gbenson@redhat.com>

	* Makefile.in (i386-dregs.o): New rule.
	* configure.srv: Add i386-dregs.o to all targets using i386-low.o.
	* i386-low.c (target.h): Remove include.
	(TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
	(DR_CONTROL_SHIFT): Likewise.
	(DR_CONTROL_SIZE): Likewise.
	(DR_RW_EXECUTE): Likewise.
	(DR_RW_WRITE): Likewise.
	(DR_RW_READ): Likewise.
	(DR_RW_IORW): Likewise.
	(DR_LEN_1): Likewise.
	(DR_LEN_2): Likewise.
	(DR_LEN_4): Likewise.
	(DR_LEN_8): Likewise.
	(DR_LOCAL_ENABLE_SHIFT): Likewise.
	(DR_GLOBAL_ENABLE_SHIFT): Likewise.
	(DR_ENABLE_SIZE): Likewise.
	(DR_LOCAL_SLOWDOWN): Likewise.
	(DR_GLOBAL_SLOWDOWN): Likewise.
	(DR_CONTROL_RESERVED): Likewise.
	(I386_DR_CONTROL_MASK): Likewise.
	(I386_DR_VACANT): Likewise.
	(I386_DR_LOCAL_ENABLE): Likewise.
	(I386_DR_GLOBAL_ENABLE): Likewise.
	(I386_DR_DISABLE): Likewise.
	(I386_DR_SET_RW_LEN): Likewise.
	(I386_DR_GET_RW_LEN): Likewise.
	(I386_DR_WATCH_HIT): Likewise.
	(i386_wp_op_t): Likewise.
	(i386_show_dr): Likewise.
	(i386_length_and_rw_bits): Likewise.
	(i386_insert_aligned_watchpoint): Likewise.
	(i386_remove_aligned_watchpoint): Likewise.
	(i386_handle_nonaligned_watchpoint): Likewise.
	i386_update_inferior_debug_regs(): Likewise.
	(i386_dr_insert_watchpoint): Likewise.
	(i386_dr_remove_watchpoint): Likewise.
	(i386_dr_region_ok_for_watchpoint): Likewise.
	(i386_dr_stopped_data_address): Likewise.
	(i386_dr_stopped_by_watchpoint): Likewise.
2014-06-19 10:56:00 +01:00
Mark Kettenis a900370fa1 Enable rhreads support on OpenBSD/i386.
gdb/ChangeLog:

        * i386obsd-nat.c: Include "obsd-nat.h".
        (_initialize_i386obsd_nat): Call obsd_add_target instead of
        add_target.
        * config/i386/obsd.mh (NATDEPFILES): Add obsd-nat.o.
2014-03-01 15:29:34 +01:00
Mark Kettenis 874a80af9f Enable rthreads support on OpenBSD/amd64.
gdb/ChangeLog:

        * amd64obsd-nat.c (_initialize_amd64obsd_nat): Call
        obsd_add_target instead of add_target.
        * config/i386/obsd64.mh (NATDEPFILES): Add obsd-nat.o.
2014-03-01 11:49:58 +01:00
Joel Brobecker ecd75fc8ee Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Jan Kratochvil 2659903bfa Remove a.out NetBSD and OpenBSD hosts
gdb/
2013-09-21  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Remove a.out NetBSD and OpenBSD hosts.
	* NEWS (Removed native configurations): New.
	* config/arm/nbsdaout.mh: Remove.
	* config/i386/nbsdaout.mh: Remove.
	* config/i386/obsdaout.mh: Remove.
	* config/m68k/nbsdaout.mh: Remove.
	* config/sparc/nbsdaout.mh: Remove.
	* config/vax/nbsdaout.mh: Remove.
	* configure.host (arm*-*-netbsd*, i[34567]86-*-netbsd*)
	(i[34567]86-*-openbsd[0-2].*, i[34567]86-*-openbsd3.[0-3])
	(m68*-*-netbsd*, sparc-*-netbsd*, vax-*-netbsd*): Add them to obsolete
	error.
	(arm*-*-netbsd*, i[34567]86-*-netbsd*, i[34567]86-*-openbsd[0-2].*)
	(i[34567]86-*-openbsd3.[0-3], m68*-*-netbsd*, sparc-*-netbsdaout*)
	(sparc-*-netbsd*, vax-*-netbsd*): Remove.
2013-09-24 13:48:44 +00:00
Luis Machado 96d7229d2a Unify ptrace options discovery code and make both GDB and
gdbserver use it.

	gdb/
	* Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-nat.h and
	nat/linux-waitpid.h.
	(linux-waitpid.o): New object file rule.
	* common/linux-ptrace.c: Include nat/linux-waitpid.h.
	(current_ptrace_options): Moved from linux-nat.c.
	(linux_ptrace_test_ret_to_nx): Use type casts for ptrace
	parameters.
	(linux_fork_to_function): New function.
	(linux_grandchild_function): Likewise.
	(linux_child_function): Likewise.
	(linux_check_ptrace_features): New function, heavily
	based on linux-nat.c:linux_test_for_tracefork.
	(linux_enable_event_reporting): New function.
	(ptrace_supports_feature): Likewise.
	(linux_supports_tracefork): Likewise.
	(linux_supports_traceclone): Likewise.
	(linux_supports_tracevforkdone): Likewise.
	(linux_supports_tracesysgood): Likewise.
	* common/linux-ptrace.h (HAS_NOMMU): Moved from
	gdbserver/linux-low.c.
	(linux_enable_event_reporting): New declaration.
	(linux_supports_tracefork): Likewise.
	(linux_supports_traceclone): Likewise.
	(linux_supports_tracevforkdone): Likewise.
	(linux_supports_tracesysgood): Likewise.
	* config.in (PTRACE_TYPE_ARG4): Regenerate.
	* config/aarch64/linux.mh (NATDEPFILES): Add linux-waitpid.o.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
	* config/arm/linux.mh (NATDEPFILES): Likewise.
	* config/i386/linux.mh (NATDEPFILES): Likewise.
	* config/i386/linux64.mh (NATDEPFILES): Likewise.
	* config/ia64/linux.mh (NATDEPFILES): Likewise.
	* config/m32r/linux.mh (NATDEPFILES): Likewise.
	* config/m68k/linux.mh (NATDEPFILES): Likewise.
	* config/mips/linux.mh (NATDEPFILES): Likewise.
	* config/pa/linux.mh (NATDEPFILES): Likewise..
	* config/powerpc/linux.mh (NATDEPFILES): Likewise..
	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
	* config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
	* config/sparc/linux.mh (NATDEPFILES): Likewise.
	* config/sparc/linux64.mh (NATDEPFILES): Likewise.
	* config/tilegx/linux.mh (NATDEPFILES): Likewise.
	* config/xtensa/linux.mh (NATDEPFILES): Likewise.
	* configure.ac (AC_CACHE_CHECK): Add void * to the list of
	ptrace's 4th argument's types.
	Check the type of PTRACE_TYPE_ARG4.
	* configure: Regenerate.
	* linux-nat.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
	(SYSCALL_SIGTRAP): Moved to nat/linux-nat.h.
	(linux_supports_tracefork_flag): Remove.
	(linux_supports_tracesysgood_flag): Likewise.
	(linux_supports_tracevforkdone_flag): Likewise.
	(current_ptrace_options): Moved to
	common/linux-ptrace.c.
	(linux_tracefork_child): Remove.
	(my_waitpid): Remove.
	(linux_test_for_tracefork): Renamed to
	linux_check_ptrace_features and moved to common/linux-ptrace.c.
	(linux_test_for_tracesysgood): Remove.
	(linux_supports_tracesysgood): Remove.
	(linux_supports_tracefork): Remove.
	(linux_supports_tracevforkdone): Remove.
	(linux_enable_tracesysgood): Remove.
	(linux_enable_event_reporting): Remove.
	(linux_init_ptrace): New function.
	(linux_child_post_attach): Call linux_init_ptrace.
	(linux_child_post_startup_inferior): Call linux_init_ptrace.
	(linux_child_follow_fork): Call linux_supports_tracefork
	and linux_supports_tracevforkdone.
	(linux_child_insert_fork_catchpoint): Call
	linux_supports_tracefork.
	(linux_child_insert_vfork_catchpoint): Likewise.
	(linux_child_set_syscall_catchpoint): Call
	linux_supports_tracesysgood.
	(lin_lwp_attach_lwp): Call linux_supports_tracefork.
	* nat/linux-nat.h: New file.
	* nat/linux-waitpid.c: New file.
	* nat/linux-waitpid.h: New file.

	gdb/gdbserver/
	* Makefile.in: Explain why ../target and ../nat are not
	listed as include file search paths.
	(linux-waitpid.o): New object file rule.
	* configure.srv (srv_native_linux_obj): New variable.
	Replace all occurrences of linux native object files with
	$srv_native_linux_obj.
	* linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
	(HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
	(linux_enable_event_reporting): Remove declaration.
	(my_waitpid): Moved to common/linux-waitpid.c.
	(linux_wait_for_event): Pass ptid when calling
	linux_enable_event_reporting.
	(linux_supports_tracefork_flag): Remove.
	(linux_enable_event_reporting): Likewise.
	(linux_tracefork_grandchild): Remove.
	(STACK_SIZE): Moved to common/linux-ptrace.c.
	(linux_tracefork_child): Remove.
	(linux_test_for_tracefork): Remove.
	(linux_look_up_symbols): Call linux_supports_traceclone.
	(initialize_low): Remove call to linux_test_for_tracefork.
	* linux-low.h (PTRACE_TYPE_ARG3): Move to
	common/linux-ptrace.h.
	(PTRACE_TYPE_ARG4): Likewise.
	Include linux-ptrace.h.
2013-08-22 23:46:30 +00:00
Pedro Alves d8d2a3ee47 Normalize on PATH_MAX instead of MAXPATHLEN throughout.
With the pathmax gnulib module in place, we can use PATH_MAX
consistently throughout, instead of the current mixbag of PATH_MAX and
MAXPATHLEN uses.  It's no longer necessary to include sys/param.h
(supposedly, I can't check all ports touched here) for MAXPATHLEN.

Don't remove sys/param.h from GDB's configure.ac, as later tests in
the file use HAVE_SYS_PARAM_H checks.

Tested on x86_64 Fedora 17.

Also cross-built for --host=i686-w64-mingw32, and --host=i586-pc-msdosdjgpp.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

	* defs.h: Include "pathmax.h".
	* utils.c: Don't include sys/param.h.
	(gdb_realpath): Remove code that checks for MAXPATHLEN.
	* solib-ia64-hpux.c (ia64_hpux_handle_load_event): Use PATH_MAX
	instead of MAXPATHLEN.
	* solib-sunos.c: Don't include sys/param.h.
	* xcoffread.c: Don't include sys/param.h.
	* bsd-kvm.c: Don't include sys/param.h.
	* darwin-nat.c: Don't include sys/param.h.
	(darwin_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN.
	* darwin-nat-info.c: Don't include sys/param.h.
	* fbsd-nat.c (fbsd_pid_to_exec_file): Use PATH_MAX instead of
	MAXPATHLEN.
	* i386obsd-nat.c: Don't include sys/param.h.
	* inf-child.c: Don't include sys/param.h.
	(inf_child_fileio_readlink): Use PATH_MAX instead of MAXPATHLEN.
	* linux-fork.c: Don't include sys/param.h.
	(fork_save_infrun_state): Use PATH_MAX instead of MAXPATHLEN.
	* linux-nat.c: Don't include sys/param.h.
	(linux_child_pid_to_exec_file, linux_proc_pending_signals)
	(linux_proc_pending_signals): Use PATH_MAX instead of MAXPATHLEN.
	* m68klinux-nat.c: Don't include sys/param.h.
	* nbsd-nat.c: Don't include sys/param.h.
	(nbsd_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN.
	* ppc-linux-nat.c: Don't include sys/param.h.
	* rs6000-nat.c: Don't include sys/param.h.
	* spu-linux-nat.c. Don't include sys/param.h.
	* windows-nat.c: Don't include sys/param.h.
	* xtensa-linux-nat.c: Don't include sys/param.h.
	* config/i386/nm-fbsd.h: Don't include sys/param.h.

gdb/gdbserver/
2013-07-01  Pedro Alves  <palves@redhat.com>

	* server.h: Include "pathmax.h".
	* linux-low.c: Don't include sys/param.h.
	(linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
	MAXPATHLEN.
	* win32-low.c: Don't include sys/param.h.
	(win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2013-07-01 11:28:30 +00:00
Jan Kratochvil b292c78318 gdb/
* Makefile.in (HAVE_NATIVE_GCORE_TARGET): New.
	(generated_files): Add gcore.
	(install-only, uninstall): Add gcore if HAVE_NATIVE_GCORE_TARGET or
	HAVE_NATIVE_GCORE_HOST.
	(gcore): New.
	* NEWS (Changes since GDB 7.6): Mention newly installed gcore.
	* config/alpha/alpha-osf3.mh, config/i386/fbsd.mh,
	config/i386/fbsd64.mh, config/i386/i386gnu.mh, config/i386/i386sol2.mh,
	config/i386/sol2-64.mh, config/mips/irix5.mh, config/mips/irix6.mh,
	config/powerpc/fbsd.mh, config/sparc/fbsd.mh, config/sparc/sol2.mh:
	Add HAVE_NATIVE_GCORE_HOST.
	* configure: Regenerate.
	* configure.ac (HAVE_NATIVE_GCORE_TARGET): New, set it, AC_SUBST it.
	New AC_SUBST fir GDB_TRANSFORM_NAME and GCORE_TRANSFORM_NAME.  New
	AC_CONFIG_FILES for gcore.
	* configure.tgt: Add gdb_have_gcore to the initial comment.  Set
	gdb_have_gcore.
	* gdb_gcore.sh: Rename to ...
	* gcore.in: ... here.  Remove gcore.sh comment.  Use GDB_TRANSFORM_NAME
	and GCORE_TRANSFORM_NAME substitutions.

gdb/doc/
	* Makefile.in (MAN1S): Add gcore.1.
	Remove "Host, target, and site specific Makefile fragments" comment.
	(@host_makefile_frag@, HAVE_NATIVE_GCORE_TARGET): New.
	(install-man1, uninstall-man1): Conditionalize gcore.1.
	(gcore.1): New.
	* gdb.texinfo (Man Pages): Add gcore man.
	(gcore man): New node.
2013-04-11 14:13:44 +00:00
Markus Metzger 3e3aea48e2 Install the btrace target ops for i386-linux-nat and amd64-linux-nat.
gdb/
	* amd64-linux-nat.c: Include btrace.h and linux-btrace.h.
	(amd64_linux_enable_btrace): New.
	(amd64_linux_disable_btrace): New.
	(amd64_linux_teardown_btrace): New.
	(_initialize_amd64_linux_nat): Initialize btrace ops.
	* i386-linux.nat.c: Include btrace.h and linux-btrace.h.
	(i386_linux_enable_btrace): New.
	(i386_linux_disable_btrace): New.
	(i386_linux_teardown_btrace): New.
	(_initialize_i386_linux_nat): Initialize btrace ops.
	* config/i386/linux.mh: Add linux-btrace.o.
	* config/i386/linux64.mh: Add linux-btrace.o.
2013-03-11 08:25:58 +00:00
Corinna Vinschen b5b0b0afd0 * configure.host: Add x86_64-*-cygwin* as host.
* configure.tgt: Add x86_64-*-cygwin* as target.
	* config/i386/cygwin64.mh: New file.

	* gdbserver/configure.srv: Add x86_64-*-cygwin* as target.
2013-03-05 13:37:11 +00:00
Pedro Alves 0b1afbb37b Consistent use of (C) after "Copyright".
While writing the previous patch, I noticed that we're not consistent
with the (C) in the copyright header.  The maintainers manual prefers
having it, though also says it's optional.  We have over 10x more
files with (C) than without in gdb's code, so I spent a few minutes
grepping and fixing.  Funny enough, the testsuite has it backwards.
I'll leave that for another time.

gdb/
2013-02-12  Pedro Alves  <palves@redhat.com>

	* amd64-darwin-tdep.c: Add (C) after Copyright.
	* cli/cli-cmds.h: Ditto.
	* cli/cli-decode.c: Ditto.
	* cli/cli-decode.h: Ditto.
	* cli/cli-dump.c: Ditto.
	* cli/cli-dump.h: Ditto.
	* cli/cli-interp.c: Ditto.
	* cli/cli-logging.c: Ditto.
	* cli/cli-script.c: Ditto.
	* cli/cli-script.h: Ditto.
	* cli/cli-setshow.c: Ditto.
	* cli/cli-setshow.h: Ditto.
	* cli/cli-utils.c: Ditto.
	* cli/cli-utils.h: Ditto.
	* config/alpha/nm-osf3.h: Ditto.
	* config/djgpp/djconfig.sh: Ditto.
	* config/i386/nm-fbsd.h: Ditto.
	* config/i386/nm-i386gnu.h: Ditto.
	* config/nm-linux.h: Ditto.
	* config/nm-nto.h: Ditto.
	* config/rs6000/nm-rs6000.h: Ditto.
	* config/sparc/nm-sol2.h: Ditto.
	* darwin-nat-info.c: Ditto.
	* dfp.c: Ditto.
	* dfp.h: Ditto.
	* gdb-demangle.h: Ditto.
	* i386-darwin-nat.c: Ditto.
	* i386-darwin-tdep.c: Ditto.
	* linux-fork.h: Ditto.
	* m32c-tdep.c: Ditto.
	* microblaze-linux-tdep.c: Ditto.
	* microblaze-rom.c: Ditto.
	* microblaze-tdep.c: Ditto.
	* microblaze-tdep.h: Ditto.
	* mips-linux-tdep.h: Ditto.
	* ppc-ravenscar-thread.c: Ditto.
	* ppc-ravenscar-thread.h: Ditto.
	* prologue-value.c: Ditto.
	* prologue-value.h: Ditto.
	* ravenscar-thread.c: Ditto.
	* ravenscar-thread.h: Ditto.
	* sparc-ravenscar-thread.c: Ditto.
	* sparc-ravenscar-thread.h: Ditto.
	* tilegx-linux-tdep.c: Ditto.
	* unwind_stop_reasons.def: Ditto.
	* windows-nat.h: Ditto.
	* xtensa-linux-tdep.c: Ditto.
	* xtensa-xtregs.c: Ditto.
	* regformats/regdat.sh: Ditto.
	* regformats/regdef.h: Ditto.

gdb/gdbserver/
2013-02-12  Pedro Alves  <palves@redhat.com>

	* linux-xtensa-low.c: Ditto.
	* xtensa-xtregs.c: Ditto.
2013-02-12 19:03:57 +00:00
Tom Tromey 4f05add48d * config/i386/darwin.mh (NATDEPFILES): Remove machoread.o.
* configure.ac: Check for Mach-O support in BFD.  Update
	CONFIG_OBS.
	* configure: Rebuild.
2013-01-02 14:58:15 +00: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
Jan Kratochvil 5f572decf9 gdb/
* Makefile.in (linux-ptrace.o): New.
	* common/linux-procfs.c (linux_proc_pid_is_zombie): New,
	from linux-nat.c.
	* common/linux-procfs.h (linux_proc_pid_is_zombie): New declaration.
	* common/linux-ptrace.c: New file.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Add linux-ptrace.o.
	* config/arm/linux.mh: Likewise.
	* config/i386/linux.mh: Likewise.
	* config/i386/linux64.mh: Likewise.
	* config/ia64/linux.mh: Likewise.
	* config/m32r/linux.mh: Likewise.
	* config/m68k/linux.mh: Likewise.
	* config/mips/linux.mh: Likewise.
	* config/pa/linux.mh: Likewise.
	* config/powerpc/linux.mh: Likewise.
	* config/powerpc/ppc64-linux.mh: Likewise.
	* config/powerpc/spu-linux.mh: Likewise.
	* config/s390/s390.mh: Likewise.
	* config/sparc/linux.mh: Likewise.
	* config/sparc/linux64.mh: Likewise.
	* config/xtensa/linux.mh: Likewise.
	* linux-nat.c (linux_lwp_is_zombie): Remove, move it to
	common/linux-procfs.c.
	(wait_lwp): Rename linux_lwp_is_zombie to linux_proc_pid_is_zombie.

gdb/gdbserver/
	* Makefile.in (linux-ptrace.o): New.
	* configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
	(cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
	(m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
	(s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
	(x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
	of these targets.
	* linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
2012-03-13 15:00:37 +00:00
Pedro Alves 1916efaf84 2012-02-09 Valery Khromov <valery.khromov@gmail.com>
PR gdb/12953
	* Makefile.in (HFILES_NO_SRCDIR): Add amd64bsd-nat.h.
	* amd64bsd-nat.c: Add support for debug registers (adapted from
	i386bsd-nat.c).
	[HAVE_PT_GETDBREGS] (amd64bsd_dr_get, amd64bsd_dr_set)
	(amd64bsd_dr_set_control, amd64bsd_dr_set_addr)
	(amd64bsd_dr_get_addr, amd64bsd_dr_get_status)
	(amd64bsd_dr_get_control): New functions.
	* amd64bsd-nat.h: New file (adapted from i386bsd-nat.h).
	* amd64fbsd-nat.c: Include "amd64bsd-nat.h", "i386-nat.h".
	[HAVE_PT_GETDBREGS] (_initialize_amd64fbsd_nat): Add hardware
	watchpoints initialization.
	* config/i386/fbsd64.mh (NATDEPFILES): Add i386-nat.o.
2012-02-09 16:06:44 +00:00
Jan Kratochvil 06b9f45fe4 gdb/
Fix duplicate .o files after omitting libbfd.a.
	* Makefile.in (ALL_TARGET_OBS): Remove corelow.o.
	(SFILES): Add corelow.c.
	(COMMON_OBS): Add corelow.o.
	(ALLDEPFILES): Remove corelow.c.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Remove corelow.o.
	* config/alpha/alpha-osf3.mh: Likewise.
	* config/alpha/fbsd.mh: Likewise.
	* config/arm/nbsdaout.mh: Likewise.
	* config/arm/nbsdelf.mh: Likewise.
	* config/i386/i386gnu.mh: Likewise.
	* config/ia64/hpux.mh: Likewise.
	* config/ia64/linux.mh: Likewise.
	* config/m32r/linux.mh: Likewise.
	* config/m68k/linux.mh: Likewise.
	* config/mips/irix5.mh: Likewise.
	* config/mips/irix6.mh: Likewise.
	* config/pa/hpux.mh: Likewise.
	* config/pa/linux.mh: Likewise.
	* config/powerpc/aix.mh: Likewise.
	* config/sparc/linux.mh: Likewise.
	* config/sparc/linux64.mh: Likewise.
	* config/sparc/sol2.mh: Likewise.
	* config/vax/vax.mh: Likewise.
	* configure.tgt (alpha*-*-freebsd* alpha*-*-kfreebsd*-gnu)
	(alpha*-*-netbsd*, alpha*-*-knetbsd*-gnu, alpha*-*-openbsd*)
	(am33_2.0*-*-linux*, arm*-wince-pe, arm*-*-mingw32ce*, arm*-*-linux*)
	(arm*-*-openbsd*, cris*, frv-*-*, hppa*-*-hpux*, hppa*-*-netbsd*)
	(hppa*-*-openbsd*, i[34567]86-*-dicos*, i[34567]86-*-freebsd*)
	(i[34567]86-*-kfreebsd*-gnu, i[34567]86-*-netbsd*)
	(i[34567]86-*-knetbsd*-gnu, i[34567]86-*-openbsd*, i[34567]86-*-nto*)
	(i[34567]86-*-solaris2.1[0-9]*, x86_64-*-solaris2.1[0-9]*)
	(i[34567]86-*-solaris*, i[34567]86-*-linux*, i[34567]86-*-cygwin*)
	(i[34567]86-*-mingw32*, m68*-*-netbsd*, m68*-*-knetbsd*-gnu)
	(m68*-*-openbsd*, m88*-*-openbsd*, microblaze*-linux-*)
	(microblaze*-*-linux*, mips*-*-linux*, mips*-*-netbsd*)
	(mips*-*-knetbsd*-gnu, mips64*-*-openbsd*, powerpc-*-netbsd*)
	(powerpc-*-knetbsd*-gnu, powerpc-*-openbsd*, powerpc-*-linux*)
	(powerpc64-*-linux*, s390*-*-*, score-*-*, sh*-*-linux*)
	(sh*-*-netbsdelf*, sh*-*-knetbsd*-gnu, sh*-*-openbsd*)
	(sparc*-*-freebsd*, sparc*-*-kfreebsd*-gnu, sparc-*-netbsd*)
	(sparc-*-knetbsd*-gnu, sparc64-*-netbsd*, sparc64-*-knetbsd*-gnu)
	(sparc-*-openbsd*, sparc64-*-openbsd*, tic6x-*-*linux, vax-*-netbsd*)
	(vax-*-knetbsd*-gnu, vax-*-openbsd*, x86_64-*-dicos*, x86_64-*-linux*)
	(x86_64-*-freebsd*, x86_64-*-kfreebsd*-gnu, x86_64-*-netbsd*)
	(x86_64-*-knetbsd*-gnu, x86_64-*-openbsd*, xtensa*-*-linux*): Remove
	corelow.o from gdb_target_obs.
	* corefile.c (core_target): Update the comment on NULL value.
	(core_file_command): Replace error by gdb_assert on CORE_TARGET.
	* corelow.c (sniff_core_bfd): Call error instead of warning on zero
	MATCHES.  Drop YUMMY set on NULL.
	(core_close): Do not call exit_inferior_silent on zero PID.  Do not
	reclaim CORE_DATA if it is already NULL.
2012-01-10 16:30:49 +00:00
Jan Kratochvil 2e6af8c045 gdb/
Partially fix duplicate .o files after omitting libbfd.a.
	* config/alpha/alpha-osf3.mh (NATDEPFILES): Remove solib.o.
	* config/i386/nbsdaout.mh (NATDEPFILES): Remove solib.o.
	* config/i386/obsdaout.mh (NATDEPFILES): Remove solib.o.
	* config/m68k/nbsdaout.mh (NATDEPFILES): Remove solib.o.
	* config/m68k/obsd.mh (NATDEPFILES): Remove solib.o.
	* config/powerpc/aix.mh (NATDEPFILES): Remove xcoffread.o.
	* config/vax/nbsdaout.mh (NATDEPFILES): Remove solib.o.
2012-01-09 15:21:13 +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
Luis Machado 13da1c9782 Move common linux procfs code to common/ 2011-08-24 12:07:28 +00:00
Kwok Yeung d26e3629bb 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
gdb/
	* defs.h: Add guard against inclusion in gdbserver.
	(struct ptid, ptid_t): Move to common/ptid.h.
	(xfree, xzalloc, xasprintf, xvasprintf, xstrprintf, xstrvprintf,
	xsnprintf, internal_error): Move to common/common-utils.h.
	(nomem): Delete.
	* gdb_assert.h: Move into common/ sub-directory.
	* gdb_locale.h: Ditto.
	* gdb_dirent.h: Ditto.
	* inferior.h (minus_one_ptid, null_ptid, ptid_build, pid_to_ptid,
	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid):
	Move into common/ptid.h.
	* xml-support.c (xml_escape_text): Move into common/xml-utils.c.
	(gdb_xml_create_parser_and_cleanup_1, xml_fetch_context_from_file):
	Change nomem to malloc_failure.
	* xml-support.h (xml_escape_text): Move into common/xml-utils.h.
	* utils.c (nomem): Rename to malloc_failure.
	(xmalloc, xzalloc, xrealloc, xcalloc, xfree, xstrprintf, xasprintf,
	xvasprintf, xstrvprintf, xsnprintf): Move to common/common-utils.c.
	(gdb_buildargv): Change nomem to malloc_failure.
	* infrun.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
	ptid_is_pid): Move into common/ptid.c.
	(initialize_infrun): Delete initialization of null_ptid and
	minus_one_ptid.
	* linux-nat.c (linux_nat_xfer_osdata): Defer to
	linux_common_xfer_osdata.
	* Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
	common/ptid.c and common/buffer.c.
	(HFILES_NO_SRCDIR): Add common/common-utils.h, common/xml-utils.h,
	common/ptid.h, common/buffer.h and common/linux-osdata.h.
	(COMMON_OBS): Add xml-utils.o, common-utils.o, buffer.o and ptid.o.
	(common-utils.o, xml-utils.o, ptid.o, buffer.o, linux-osdata.o): New
	rules.
	* common/gdb_assert.h: New.
	* common/gdb_dirent.h: New.
	* common/gdb_locale.h: New.
	* common/buffer.c: New.
	* common/buffer.h: New.
	* common/ptid.c: New.
	* common/ptid.h: New.
	* common/xml-utils.c: New.
	* common/xml-utils.h: New.
	* common/common-utils.c: New.
	* common/common-utils.h: New.
	* common/linux-osdata.c: New.
	* common/linux-osdata.h: New.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Add linux-osdata.o.
	* config/arm/linux.mh (NATDEPFILES): Ditto.
	* config/i386/linux.mh (NATDEPFILES): Ditto.
	* config/i386/linux64.mh (NATDEPFILES): Ditto.
	* config/ia64/linux.mh (NATDEPFILES): Ditto.
	* config/m32r/linux.mh (NATDEPFILES): Ditto.
	* config/m68k/linux.mh (NATDEPFILES): Ditto.
	* config/mips/linux.mh (NATDEPFILES): Ditto.
	* config/pa/linux.mh (NATDEPFILES): Ditto.
	* config/powerpc/linux.mh (NATDEPFILES): Ditto.
	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Ditto.
	* config/s390/s390.mh (NATDEPFILES): Ditto.
	* config/sparc/linux.mh (NATDEPFILES): Ditto.
	* config/sparc/linux64.mh (NATDEPFILES): Ditto.
	* config/xtensa/linux.mh (NATDEPFILES): Ditto.

gdbserver/
	* linux-low.c (compare_ints, unique, list_threads, show_process,
	linux_core_of_thread): Delete.
	(linux_target_ops): Change linux_core_of_thread to
	linux_common_core_of_thread.
	(linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
	* utils.c (malloc_failure): Change type of argument.
	(xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
	* Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
	common/linux-osdata.c, common/ptid.c and common/buffer.c.
	(OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
	(IPA_OBJS): Add common-utils-ipa.o.
	(ptid_h, linux_osdata_h): New macros.
	(server_h): Add common/common-utils.h, common/xml-utils.h,
	common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
	common/ptid.h.
	(common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
	ptid.o, buffer.o): New rules.
	(linux-low.o): Add common/linux-osdata.h as a dependency.
	* configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
	* configure.ac: Add AC_HEADER_DIRENT check.
	* config.in: Regenerate.
	* configure: Regenerate.
	* remote-utils.c (xml_escape_text): Delete.
	(buffer_grow, buffer_free, buffer_init, buffer_finish,
	buffer_xml_printf): Move to common/buffer.c.
	* server.c (main): Remove call to initialize_inferiors.
	* server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
	ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
	ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
	internal_error, gdb_assert, gdb_assert_fail): Delete.
	(struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
	buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
	common/buffer.h.
	* inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
	initialize_inferiors): Delete.
2011-07-21 23:46:12 +00:00
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Ulrich Weigand b7a8b4ef6b * gregset.h (GDB_FPXREGSET_T): Remove.
(gdb_fpxregset_t): Likewise.
	(supply_fpxregset): Remove prototype.
	(fill_fpxregset): Likewise.
	* i386-linux-nat.c (supply_fpxregset): Remove.
	(fill_fpxregset): Likewise.
	(fetch_fpxregs): Inline supply_fpxregset call.
	(store_fpxregs): Inline fill_fpxregset call.

	* config/i386/linux.mh: Set NAT_FILE to config/nm-linux.h.
	* config/i386/nm-linux.h: Remove file.
2010-06-11 12:08:51 +00:00
Jan Kratochvil f6528abd64 gdb/
* Makefile.in (RDYNAMIC): New.
	(SFILES): Add proc-service.list.
	* config/alpha/alpha-linux.mh (NAT_CDEPS): New.
	(LOADLIBES): Replace -rdynamic by $(RDYNAMIC).
	* config/arm/linux.mh: Likewise.
	* config/i386/linux.mh: Likewise.
	* config/i386/linux64.mh: Likewise.
	* config/ia64/linux.mh: Likewise.
	* config/m32r/linux.mh: Likewise.
	* config/m68k/linux.mh: Likewise.
	* config/mips/linux.mh: Likewise.
	* config/pa/linux.mh: Likewise.
	* config/powerpc/linux.mh: Likewise.
	* config/powerpc/ppc64-linux.mh: Likewise.
	* config/s390/s390.mh: Likewise.
	* config/sparc/linux.mh: Likewise.
	* config/sparc/linux64.mh: Likewise.
	* config/xtensa/linux.mh: Likewise.
	* configure.ac: New RDYNAMIC on native host and GCC.
	(solaris*): Replace -Wl,-export-dynamic by $RDYNAMIC.
	* configure: Regenerate.
	* proc-service.list: New.

gdb/gdbserver/
	* Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
	(CDEPS): New.
	* configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
	-Wl,--dynamic-list.
	* configure: Regenerate.
	* proc-service.list: New.
2010-05-28 18:50:35 +00:00
Pierre Muller e790e06ecb Removal of config/i386/nm-i386sol2.h native configuration file.
* config/i386/nm-i386sol2.h: Remove file.
	* config/i386/i386sol2.mh: Remove NAT_FILE definition.
	* config/i386/sol2-64.mh: Idem.
	* config/djgpp/fnchange.lst: Idem.
	* Makefile.in (HFILES_NO_SRCDIR): Remove reference to that file.
2010-04-26 13:53:57 +00:00
Pierre Muller b7da9e9f5f PR breakpoints/11531.
* config/i386/nm-i386sol2.h (CANNOT_STEP_HW_WATCHPOINTS): Remove
	macro definition and related comment.
	* infrun.c (CANNOT_STEP_HW_WATCHPOINTS): Remove macro.
	(resume): Remove code and comment related to this macro.

doc ChangeLog entry:
	* gdbint.texinfo (CANNOT_STEP_HW_WATCHPOINTS): Remove explanation
	of macro deleted from GDB code.
2010-04-26 12:01:44 +00:00
Joel Brobecker 4c38e0a4fc Update copyright year in most headers.
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Hui Zhu 9b4eba8eb8 2009-10-26 Michael Snyder <msnyder@vmware.com>
Hui Zhu  <teawater@gmail.com>

	* Makefile.in (SFILES): Add gcore.c.
	(COMMON_OBS): Add gcore.o.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Delete gcore.o.
	* config/alpha/fbsd.mh (NATDEPFILES): Ditto.
	* config/arm/linux.mh (NATDEPFILES): Ditto.
	* config/i386/fbsd.mh (NATDEPFILES): Ditto.
	* config/i386/fbsd64.mh (NATDEPFILES): Ditto.
	* config/i386/i386sol2.mh (NATDEPFILES): Ditto.
	* config/i386/linux.mh (NATDEPFILES): Ditto.
	* config/i386/linux64.mh (NATDEPFILES): Ditto.
	* config/i386/sol2-64.mh (NATDEPFILES): Ditto.
	* config/ia64/linux.mh (NATDEPFILES): Ditto.
	* config/m32r/linux.mh (NATDEPFILES): Ditto.
	* config/m68k/linux.mh (NATDEPFILES): Ditto.
	* config/mips/linux.mh (NATDEPFILES): Ditto.
	* config/pa/linux.mh (NATDEPFILES): Ditto.
	* config/powerpc/linux.mh (NATDEPFILES): Ditto.
	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Ditto.
	* config/s390/s390.mh (NATDEPFILES): Ditto.
	* config/sparc/fbsd.mh (NATDEPFILES): Ditto.
	* config/sparc/linux.mh (NATDEPFILES): Ditto.
	* config/sparc/linux64.mh (NATDEPFILES): Ditto.
	* config/sparc/sol2.mh (NATDEPFILES): Ditto.
	* config/xtensa/linux.mh (NATDEPFILES): Ditto.
	* target.c (dummy_find_memory_regions): Change output.
	(dummy_make_corefile_notes): Ditto.
2009-10-26 18:30:39 +00:00
Tristan Gingold 02b96ddcb6 2009-07-07 Tristan Gingold <gingold@adacore.com>
* config/i386/darwin.mh	(NATDEPFILES): Remove excServer.o.
	Remove excServer.c target.  Remove _all target.
	* darwin.defs: Removed.
2009-07-07 07:47:22 +00:00
Pedro Alves d1a7880c77 2009-06-07 Pedro Alves <pedro@codesourcery.com>
* procfs.h: New.
	* proc-utils.h (procfs_first_available): Don't declare here.
	* sol-thread.c: Include procfs.h instead of sys/procfs.h and
	proc-utils.h.
	* procfs.c: Include procfs.h.
	(procfs_target): Make it public.  Don't register
	procfs_can_use_hw_breakpoint here.
	(proc_set_watchpoint): Check for PCWATCH or PIOCSWATCH being
	defined instead of TARGET_HAS_HARDWARE_WATCHPOINTS.
	(procfs_can_use_hw_breakpoint): Remove check of
	TARGET_HAS_HARDWARE_WATCHPOINTS.
	(procfs_use_watchpoints): Register procfs_can_use_hw_breakpoint
	here.
	(_initialize_procfs): Don't add the procfs target here.

	* i386-sol2-nat.c: Include target.h and procfs.h.
	(_initialize_amd64_sol2_nat): Install the procfs target here,
	customized with watchpoints support.
	* irix5-nat.c: Include target.h.
	(_initialize_core_irix5): Rename to ...
	(_initialize_irix5_nat): ... this.  Install the procfs target
	here, customized with watchpoints support.
	* alpha-nat.c: Include procfs.h.
	(_initialize_core_alpha): Rename to...
	(_initialize_alpha_nat): ... this.  Install the procfs target
	here, customized with watchpoints support.
	* sparc-sol2-nat.c: Include target.h and procfs.h.
	(_initialize_sparc_sol2_nat): New.

	* config/i386/nm-i386sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
	* config/sparc/nm-sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
	* config/mips/irix5.mh (NAT_FILE): Delete.
	* config/mips/irix6.mh (NAT_FILE): Delete.
	* config/mips/nm-irix5.h: Delete.

2009-06-07  Pedro Alves  <pedro@codesourcery.com>

	* gdbint.texinfo (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete all
	references.
2009-06-07 22:33:25 +00:00
Pierre Muller 7099259781 * symfile.c (add_shared_symbol_files_command): Remove
prototype and function.
	(_initialize _symfile): Move "add-shared-symbol-files"
	command and "assf" alias.
	* windows-nat.c (_initialize_windows_nat): to here.
	Change "add-shared-symbol-files" to alias.

	* config/i386/cygwin.mh: Remove NAT_FILE.
	* config/i386/mingw.mh: Remove NAT_FILE.
	* config/i386/mingw64.mh: Remove NAT_FILE.
	* config/i386/nm-cygwin.h: Remove file.
	* config/i386/nm-cygwin64.h: Remove file.
2009-05-24 12:27:35 +00:00