Commit Graph

11 Commits

Author SHA1 Message Date
Joel Brobecker ecd75fc8ee Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Sergio Durigan Junior eb14d40688 This patch implements the new gdbarch method gdbarch_gdb_signal_to_target.
It will be used when one wants to convert between the internal GDB signal
representation (enum gdb_signal) and the target's representation.

The idea of this patch came from a chat between Pedro and I on IRC, plus
the discussion of my patches to add the new $_exitsignal convenience
variable:

	<http://sourceware.org/ml/gdb-patches/2013-06/msg00452.html>
	<http://sourceware.org/ml/gdb-patches/2013-06/msg00352.html>

What I did was to investigate, on the Linux kernel, which targets shared
the signal numbers definition with the generic definition, present at
<include/uapi/asm-generic/signal.h>.  For the record, I used linux-3.10-rc7
as the main source of information, always looking at
<arch/<ARCH_NAME>/include/uapi/asm/signal.h>.  For SIGRTMAX (which defaults
to _NSIG in most cases), I had to look at different signal-related
files, but most of them (except MIPS) were defined to 64 anyway.

Then, with all the differences in hand, I implemented the bits on each
target.

2013-08-09  Sergio Durigan Junior  <sergiodj@redhat.com>

	* linux-tdep.c: Define enum with generic signal numbers.
	(linux_gdb_signal_from_target): New function.
	(linux_gdb_signal_to_target): Likewise.
	(linux_init_abi): Set gdbarch_gdb_signal_{to,from}_target
	methods to the functions above.
	* linux-tdep.h (linux_gdb_signal_from_target): New prototype.
	(linux_gdb_signal_to_target): Likewise.
	* alpha-linux-tdep.c: Define new enum with signals different
	from generic Linux kernel.
	(alpha_linux_gdb_signal_from_target): New function.
	(alpha_linux_gdb_signal_to_target): Likewise.
	(alpha_linux_init_abi): Set gdbarch_gdb_signal_{to,from}_target
	with the functions mentioned above.
	* avr-tdep.c: Define enum with differences between Linux kernel
	and AVR signals.
	(avr_linux_gdb_signal_from_target): New function.
	(avr_linux_gdb_signal_to_target): Likewise.
	(avr_gdbarch_init): Set gdbarch_gdb_signal_{to,from}_target to
	the functions mentioned above.
	* sparc-linux-tdep.c: Define enum with differences between SPARC
	and generic Linux kernel signal numbers.
	(sparc32_linux_gdb_signal_from_target): New function.
	(sparc32_linux_gdb_signal_to_target): Likewise.
	(sparc32_linux_init_abi): Set gdbarch_gdb_signal_{to,from}_target
	to the functions defined above.
	* xtensa-linux-tdep.c: Define enum with differences between
	Xtensa and Linux kernel generic signals.
	(xtensa_linux_gdb_signal_from_target): New function.
	(xtensa_linux_gdb_signal_to_target): Likewise.
	(xtensa_linux_init_abi): Set gdbarch_gdb_signal_to_target
	to the functions defined above.
	* mips-linux-tdep.c: Define enum with differences between
	signals in MIPS and Linux kernel generic ones.
	(mips_gdb_signal_to_target): New function.
	(mips_gdb_signal_from_target): Redefine to use new enum, handle
	only different signals from the Linux kernel generic.
	(mips_linux_init_abi): Set gdbarch_gdb_signal_{to,from}_target
	the functions defined above.
	* mips-linux-tdep.h (enum mips_signals): Remove.
2013-08-09 16:54:43 +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
Joel Brobecker 8acc9f485b 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:41:43 +00:00
Joel Brobecker c5a5708100 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:28:28 +00:00
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Pedro Alves a5ee0f0c4d * corelow.c (core_pid_to_str): Default to using normal_pid_to_str
instead of printing "Thread" here.
	* linux-tdep.c: Include inferior.h.
	(linux_core_pid_to_str): New.
	(linux_init_abi): New.
	* linux-tdep.h (linux_init_abi): Declare.
	* alpha-linux-tdep.c: Include linux-tdep.h.
	(alpha_linux_init_abi): Call linux_init_abi.
	* amd64-linux-tdep.c (amd64_linux_init_abi): Call linux_init_abi.
	* arm-linux-tdep.c (arm_linux_init_abi): Call linux_init_abi.
	* frv-linux-tdep.c: Include linux-tdep.h
	(frv_linux_init_abi): Call linux_init_abi.
	* hppa-linux-tdep.c: Include linux-tdep.h
	(hppa_linux_init_abi): Call linux_init_abi.
	* i386-linux-tdep.c (i386_linux_init_abi): Call linux_init_abi.
	* ia64-linux-tdep.c: Include linux-tdep.h.
	(ia64_linux_init_abi): Call linux_init_abi.
	* m32r-linux-tdep.c: Include linux-tdep.h.
	(m32r_linux_init_abi): Call linux_init_abi.
	* m68klinux-tdep.c: Include linux-tdep.h.
	(m68k_linux_init_abi): Call linux_init_abi.
	* microblaze-linux-tdep.c: Include linux-tdep.h.
	(microblaze_linux_init_abi): Call linux_init_abi.
	* mips-linux-tdep.c: Include linux-tdep.h.
	(mips_linux_init_abi): Call linux_init_abi.
	* mn10300-linux-tdep.c: Include linux-tdep.h.
	(am33_linux_init_osabi): Call linux_init_abi.  Rename the
	'gdbinfo' parameter to 'info'.
	* ppc-linux-tdep.c: Include linux-tdep.h.
	(ppc_linux_init_abi): Call linux_init_abi.
	* sh-linux-tdep.c: Include linux-tdep.h.
	(sh_linux_init_abi): Call linux_init_abi.
	* sparc-linux-tdep.c: Include linux-tdep.h.
	(sparc32_linux_init_abi): Call linux_init_abi.
	* sparc64-linux-tdep.c: Include linux-tdep.h.
	(sparc64_linux_init_abi): Call linux_init_abi.
	* xtensa-linux-tdep.c: Include linux-tdep.h.
	(xtensa_linux_init_abi): Call linux_init_abi.
	* i386-cygwin-tdep.c (i386_windows_core_pid_to_str): New.
	(i386_cygwin_init_abi): Install it as gdbarch_core_pid_to_str
	callback.
2010-08-04 15:27:57 +00:00
Joel Brobecker 4c38e0a4fc Update copyright year in most headers.
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Pedro Alves 63807e1d0d Silence a few -Wmissing-prototypes warnings.
PR build/9877:
        * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make
	it static.
        * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare.
        * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static.
        * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ...
	(_initialize_amd64nbsd_tdep): ... this.
	* arm-linux-tdep.c (arm_linux_software_single_step): Make it static.
	(_initialize_arm_linux_tdep): Declare.
	* armbsd-tdep.c (armbsd_fpreg_offset): Make it static.
	* armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare.
	* armobsd-tdep.c (_initialize_armobsd_tdep): Declare.
	* avr-tdep.c (avr_return_value): Make it static.
	(avr_frame_unwind_cache): Ditto.
	* bsd-uthread.c (bsd_uthread_inferior_created): Ditto.
	(bsd_uthread_solib_loaded): Ditto.
	(bsd_uthread_solib_unloaded): Ditto.
	(bsd_uthread_target): Ditto.
	(_initialize_bsd_uthread): Declare.
	* cris-tdep.c (crisv32_single_step_through_delay): Make it static.
	(cris_frame_unwind_cache): Ditto.
	* frv-tdep.c (frv_return_value): Ditto.
	* h8300-tdep.c (h8300_use_struct_convention): Ditto.
	(h8300h_use_struct_convention): Ditto.
	* hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend):
	Ditto.
	* hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete
	declarations.
	* hppabsd-tdep.c: Include hppabsd-tdep.h.
	(hppabsd_find_global_pointer): Make it static.
	* hppabsd-tdep.h: New.
	* hppanbsd-tdep.c: Include hppabsd-tdep.h.
	(hppabsd_init_abi): Remove declaration.
	(_initialize_hppabsd_tdep): Remove declaration.
	(_initialize_hppanbsd_tdep): Declare.
	* hppaobsd-tdep.c: Include hppabsd-tdep.h.
	(hppabsd_init_abi): Delete declaration.
	(hppaobsd_init_abi): Make it static.
	* i386-nto-tdep.c (_initialize_i386nto_tdep): Declare.
	* i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare.
	* ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare.
	* ia64-tdep.c (ia64_register_reggroup_p): Make it static.
	* iq2000-tdep.c (_initialize_iq2000_tdep): Declare.
	* m32c-tdep.c (m32c_register_reggroup_p): Make it static.
	(m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto.
	(_initialize_m32c_tdep): Declare.
	* m32r-rom.c (_initialize_m32r_rom): Declare.
	* m32r-tdep.c (m32r_skip_prologue): Make it static.
	(m32r_return_value): Ditto.
	* m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static.
	(m68hc11_return_value): Ditto.
	* m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare.
	* m88k-tdep.c (m88k_frame_cache): Make it static.
	* mep-tdep.c (mep_gdb_print_insn): Ditto.
	(mep_return_value): Ditto.
	(_initialize_mep_tdep): Declare.
	* mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare.
	* mips-linux-tdep.c (supply_64bit_reg): Make it static.
	(mips_linux_syscall_next_pc): Ditto.
	(_initialize_mips_linux_tdep): Declare.
	* mips-tdep.c (mips_single_step_through_delay): Make it static.
	* mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare.
	* mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare.
	* mn10300-tdep.c (_initialize_mn10300_tdep): Declare.
	* mt-tdep.c (_initialize_mt_tdep): Declare.
	* nbsd-tdep.c: Include nbsd-tdep.h.
	* nto-tdep.c (find_load_phdr): Make it static.
	(_initialize_nto_tdep): Declare.
	* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it
	static.
	(_initialize_ppc_linux_tdep): Declare.
	* remote-m32r-sdi.c (m32r_can_use_hw_watchpoint)
	(m32r_insert_watchpoint, m32r_remove_watchpoint)
	(m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make
	static.
	* rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare.
	* rs6000-nat.c: Include xcoffread.h.
	(find_toc_address): Don't extern declare get_toc_offset.  Adjust
	to call xcoff_get_to_offset.
	* rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup)
	(rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline)
	(rs6000_skip_trampoline_code): Make static.
	* s390-tdep.c (s390_regset_from_core_section): Ditto.
	* sh-tdep.c (sh_register_reggroup_p): Ditto.
	* shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto.
	(_initialize_shnbsd_tdep): Declare.
	* solib-frv.c (displacement_from_map): Make static.
	(_initialize_frv_solib): Declare.
	* solib-irix.c (fetch_lm_info): Make static.
	(_initialize_irix_solib): Declare.
	* solib-som.c: Include solib-som.h.
	(som_solib_select): Line break.
	* sparc-tdep.c (sparc_regset_from_core_section): Make static.
	* sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ...
	(_initialize_sparcnbsd_tdep): ... this.
	* spu-tdep.c (spu_software_single_step): Make it static.
	(_initialize_spu_tdep): Declare.
	* vax-tdep.c (vax_frame_cache): Make it static.
	* xcoffread.c: Include xcoffread.h.
	(get_toc_offset): Rename to ...
	(xcoff_get_toc_offset): ... this.
	(_initialize_xcoffread): Declare.
	* xcoffread.h: New.
	* xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare.
	* xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make
	static.
	(_initialize_xtensa_tdep): Declare.
2009-02-22 01:02:20 +00:00
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Maxim Grigoriev 94a0e87711 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
* NEWS (New native configurations): Xtensa GNU/Linux.
	(New targets): Xtensa GNU/Linux.
	* Makefile.in (ALL_TARGET_OBS): Add xtensa-linux-nat.o and
	xtensa-linux-tdep.o
	(ALLDEPFILES): Add xtensa-linux-tdep.c and xtensa-linux-nat.c
	(xtensa-linux-nat.o, xtensa-linux-tdep.o): New dependencies.
	* configure.tgt (xtensa*-*-linux*): New entry.
	* xtensa-config.c (xtensa_tdep): New variable.
	(xtensa_config_byte_order, xtensa_config_tdep): Removed.
	(rmap): Change format based on new macro XTREG.
	(XTENSA_CONFIG_INSTANTIATE): Use new macro defined in xtensa-tdep.h.
	* xtensa-linux-nat.c: New.
	* xtensa-linux-tdep.c: New.
	* xtensa-xtregs.c: New.
	* xtensa-tdep.h (xtensa_elf_gregset_t): Update.
	(XTENSA_ELF_NGREG, XTREG, XTREG_END, XTENSA_GDBARCH_TDEP_INSTANTIATE)
	(XCHAL_NUM_CONTEXTS, XCHAL_HAVE_EXCEPTIONS): New macros.
	(xtensa_register_t): New field coprocessor.
	(XTENSA_REGISTER_FLAGS_PRIVILEGED): Name spelling corrected.
	* xtensa-tdep.c (xtensa_config_tdep, xtensa_config_byte_order): Removed.
	(xtensa_pseudo_register_read, xtensa_pseudo_register_write):
	Update to handle privileged registers.
	(xtensa_supply_gregset) Remove exccause and excvaddr registers.
	(xtensa_push_dummy_call): Set windowstart register correctly.
	(call0_analyze_prologue): Initialize xtensa_default_isa.
	(xtensa_derive_tdep): New.
	(xtensa_gdbarch_init): Get rid of xtensa_config_byte_order and
	xtensa_config_tdep, use XCHAL_HAVE_BE and xtensa_tdep instead.
	Call xtensa_derive_tdep().
	* config/xtensa/linux.mh: New.
	* regformats/reg-xtensa.dat: New.
2008-02-11 21:58:41 +00:00