summaryrefslogtreecommitdiff
path: root/gdb/xstormy16-tdep.c
AgeCommit message (Collapse)Author
2018-01-02Update copyright year range in all GDB filesJoel Brobecker
gdb/ChangeLog: Update copyright year range in all GDB files
2017-10-05Clean up includes of doublest.h and floatformat.hUlrich Weigand
As a first small step to getting rid of doublest.h, this patch removes the include of "floatformat.h" in "doublest.h". This is actually not needed for the file itself. A few source files now need to include "floatformat.h" directly, since they got it indirectly via "doublest.h" and still need it. In reviewing which files need it, I found a number of files that include "floatformat.h" directly without actually needing it at all. Similarly, a number of files include "doublest.h" without needing it. I've also removed those unnecessary include statements. gdb/ChangeLog: 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com> * doublest.h: Do not include "floatformat.h". Remove stale comments. * gdbtypes.c: Include "floatformat.h". * value.c: Likewise. * m68k-tdep.c: Likewise. * findvar.c: Do not include "floatformat.h". * amd64-darwin-tdep.c: Likewise. * arm-linux-tdep.c: Likewise. * i386-darwin-tdep.c: Likewise. * i387-tdep.c: Likewise. * m68k-linux-tdep.c: Likewise. * mep-tdep.c: Likewise. * mips-tdep.c: Likewise. * nios2-tdep.c: Likewise. * s390-linux-tdep.c: Likewise. * sparc-obsd-tdep.c: Likewise. * sparc-tdep.c: Likewise. * sparc64-tdep.c: Likewise. * spu-tdep.c: Likewise. * tic6x-tdep.c: Likewise. * tilegx-tdep.c: Likewise. * vax-tdep.c: Likewise. * xstormy16-tdep.c: Likewise. * xtensa-tdep.c: Likewise. * top.c: Do not include "doublest.h". * aarch64-tdep.c: Likewise. * alpha-tdep.c: Likewise. * arm-linux-tdep.c: Likewise. * m68k-linux-tdep.c: Likewise. * tilegx-tdep.c: Likewise. * xstormy16-tdep.c: Likewise.
2017-09-29Remove cleanup from xstormy16-tdep.cTom Tromey
This removes a cleanup from xstormy16-tdep.c, using gdb::byte_vector. gdb/ChangeLog 2017-09-29 Tom Tromey <tom@tromey.com> * xstormy16-tdep.c (xstormy16_push_dummy_call): Use gdb::byte_vector.
2017-09-09Remove unnecessary function prototypes.John Baldwin
These prototypes were required when compiling GDB as C but are not required for C++. gdb/ChangeLog: * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat prototype. * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep prototype. * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep prototype. * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype. * ada-exp.y: Remove _initialize_ada_exp prototype. * ada-lang.c: Remove _initialize_ada_language prototype. * ada-tasks.c: Remove _initialize_tasks prototype. * addrmap.c: Remove _initialize_addrmap prototype. * agent.c: Remove _initialize_agent prototype. * aix-thread.c: Remove _initialize_aix_thread prototype. * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype. * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype. * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep prototype. * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype. * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype. * alpha-tdep.c: Remove _initialize_alpha_tdep prototype. * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep prototype. * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep prototype. * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype. * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype. * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype. * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep prototype. * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype. * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype. * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype. * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype. * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype. * amd64-tdep.c: Remove _initialize_amd64_tdep prototype. * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat prototype. * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep prototype. * annotate.c: Remove _initialize_annotate prototype. * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype. * arc-tdep.c: Remove _initialize_arc_tdep prototype. * arch-utils.c: Remove _initialize_gdbarch_utils prototype. * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype. * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype. * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype. * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype. * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep prototype. * arm-tdep.c: Remove _initialize_arm_tdep prototype. * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype. * auto-load.c: Remove _initialize_auto_load prototype. * auxv.c: Remove _initialize_auxv prototype. * avr-tdep.c: Remove _initialize_avr_tdep prototype. * ax-gdb.c: Remove _initialize_ax_gdb prototype. * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype. * bfin-tdep.c: Remove _initialize_bfin_tdep prototype. * break-catch-sig.c: Remove _initialize_break_catch_sig prototype. * break-catch-syscall.c: Remove _initialize_break_catch_syscall prototype. * break-catch-throw.c: Remove _initialize_break_catch_throw prototype. * breakpoint.c: Remove _initialize_breakpoint prototype. * bsd-uthread.c: Remove _initialize_bsd_uthread prototype. * btrace.c: Remove _initialize_btrace prototype. * charset.c: Remove _initialize_charset prototype. * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype. * cli/cli-dump.c: Remove _initialize_cli_dump prototype. * cli/cli-interp.c: Remove _initialize_cli_interp prototype. * cli/cli-logging.c: Remove _initialize_cli_logging prototype. * cli/cli-script.c: Remove _initialize_cli_script prototype. * coff-pe-read.c: Remove _initialize_coff_pe_read prototype. * coffread.c: Remove _initialize_coffread prototype. * compile/compile.c: Remove _initialize_compile prototype. * complaints.c: Remove _initialize_complaints prototype. * completer.c: Remove _initialize_completer prototype. * copying.awk: Remove _initialize_copying prototype. * copying.c: Regenerate. * core-regset.c: Remove _initialize_core_regset prototype. * corefile.c: Remove _initialize_core prototype. * corelow.c: Remove _initialize_corelow prototype. * cp-abi.c: Remove _initialize_cp_abi prototype. * cp-namespace.c: Remove _initialize_cp_namespace prototype. * cp-support.c: Remove _initialize_cp_support prototype. * cp-valprint.c: Remove _initialize_cp_valprint prototype. * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype. * cris-tdep.c: Remove _initialize_cris_tdep prototype. * ctf.c: Remove _initialize_ctf prototype. * d-lang.c: Remove _initialize_d_language prototype. * darwin-nat-info.c: Remove _initialize_darwin_info_commands prototype. * darwin-nat.c: Remove _initialize_darwin_inferior prototype. * dbxread.c: Remove _initialize_dbxread prototype. * dcache.c: Remove _initialize_dcache prototype. * demangle.c: Remove _initialize_demangler prototype. * disasm-selftests.c: Remove _initialize_disasm_selftests prototype. * disasm.c: Remove _initialize_disasm prototype. * dtrace-probe.c: Remove _initialize_dtrace_probe prototype. * dummy-frame.c: Remove _initialize_dummy_frame prototype. * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame prototype. * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype. * dwarf2expr.c: Remove _initialize_dwarf2expr prototype. * dwarf2loc.c: Remove _initialize_dwarf2loc prototype. * dwarf2read.c: Remove _initialize_dwarf2_read prototype. * elfread.c: Remove _initialize_elfread prototype. * exec.c: Remove _initialize_exec prototype. * extension.c: Remove _initialize_extension prototype. * f-lang.c: Remove _initialize_f_language prototype. * f-valprint.c: Remove _initialize_f_valprint prototype. * fbsd-nat.c: Remove _initialize_fbsd_nat prototype. * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype. * filesystem.c: Remove _initialize_filesystem prototype. * findcmd.c: Remove _initialize_mem_search prototype. * fork-child.c: Remove _initialize_fork_child prototype. * frame-base.c: Remove _initialize_frame_base prototype. * frame-unwind.c: Remove _initialize_frame_unwind prototype. * frame.c: Remove _initialize_frame prototype. * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype. * frv-tdep.c: Remove _initialize_frv_tdep prototype. * ft32-tdep.c: Remove _initialize_ft32_tdep prototype. * gcore.c: Remove _initialize_gcore prototype. * gdb_bfd.c: Remove _initialize_gdb_bfd prototype. * gdbarch.c: Regenerate. * gdbarch.sh: Remove _initialize_gdbarch prototype. * gdbtypes.c: Remove _initialize_gdbtypes prototype. * gnu-nat.c: Remove _initialize_gnu_nat prototype. * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype. * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype. * go-lang.c: Remove _initialize_go_language prototype. * go32-nat.c: Remove _initialize_go32_nat prototype. * guile/guile.c: Remove _initialize_guile prototype. * h8300-tdep.c: Remove _initialize_h8300_tdep prototype. * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype. * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype. * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype. * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype. * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype. * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype. * hppa-tdep.c: Remove _initialize_hppa_tdep prototype. * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype. * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep prototype. * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep prototype. * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype. * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype. * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype. * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype. * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype. * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype. * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype. * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype. * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype. * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype. * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype. * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype. * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype. * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype. * i386-tdep.c: Remove _initialize_i386_tdep prototype. * i386-windows-nat.c: Remove _initialize_i386_windows_nat prototype. * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame prototype. * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype. * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype. * ia64-tdep.c: Remove _initialize_ia64_tdep prototype. * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype. * infcall.c: Remove _initialize_infcall prototype. * infcmd.c: Remove _initialize_infcmd prototype. * inferior.c: Remove _initialize_inferiors prototype. * inflow.c: Remove _initialize_inflow prototype. * infrun.c: Remove _initialize_infrun prototype. * interps.c: Remove _initialize_interpreter prototype. * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype. * jit.c: Remove _initialize_jit prototype. * language.c: Remove _initialize_language prototype. * linux-fork.c: Remove _initialize_linux_fork prototype. * linux-nat.c: Remove _initialize_linux_nat prototype. * linux-tdep.c: Remove _initialize_linux_tdep prototype. * linux-thread-db.c: Remove _initialize_thread_db prototype. * lm32-tdep.c: Remove _initialize_lm32_tdep prototype. * m2-lang.c: Remove _initialize_m2_language prototype. * m32c-tdep.c: Remove _initialize_m32c_tdep prototype. * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype. * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype. * m32r-tdep.c: Remove _initialize_m32r_tdep prototype. * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype. * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype. * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype. * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype. * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype. * m68k-tdep.c: Remove _initialize_m68k_tdep prototype. * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype. * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype. * machoread.c: Remove _initialize_machoread prototype. * macrocmd.c: Remove _initialize_macrocmd prototype. * macroscope.c: Remove _initialize_macroscope prototype. * maint.c: Remove _initialize_maint_cmds prototype. * mdebugread.c: Remove _initialize_mdebugread prototype. * memattr.c: Remove _initialize_mem prototype. * mep-tdep.c: Remove _initialize_mep_tdep prototype. * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype. * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype. * mi/mi-interp.c: Remove _initialize_mi_interp prototype. * mi/mi-main.c: Remove _initialize_mi_main prototype. * microblaze-linux-tdep.c: Remove _initialize_microblaze_linux_tdep prototype. * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype. * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype. * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype. * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype. * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype. * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype. * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype. * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype. * mips-tdep.c: Remove _initialize_mips_tdep prototype. * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype. * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep prototype. * mipsread.c: Remove _initialize_mipsread prototype. * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep prototype. * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype. * moxie-tdep.c: Remove _initialize_moxie_tdep prototype. * msp430-tdep.c: Remove _initialize_msp430_tdep prototype. * mt-tdep.c: Remove _initialize_mt_tdep prototype. * nds32-tdep.c: Remove _initialize_nds32_tdep prototype. * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep prototype. * nios2-tdep.c: Remove _initialize_nios2_tdep prototype. * nto-procfs.c: Remove _initialize_procfs prototype. * nto-tdep.c: Remove _initialize_nto_tdep prototype. * objc-lang.c: Remove _initialize_objc_language prototype. * objfiles.c: Remove _initialize_objfiles prototype. * observer.c: Remove observer_test_first_notification_function, observer_test_second_notification_function, observer_test_third_notification_function, and _initialize_observer prototypes. * opencl-lang.c: Remove _initialize_opencl_language prototypes. * osabi.c: Remove _initialize_gdb_osabi prototype. * osdata.c: Remove _initialize_osdata prototype. * p-valprint.c: Remove _initialize_pascal_valprint prototype. * parse.c: Remove _initialize_parse prototype. * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype. * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype. * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype. * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype. * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype. * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype. * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype. * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype. * printcmd.c: Remove _initialize_printcmd prototype. * probe.c: Remove _initialize_probe prototype. * proc-api.c: Remove _initialize_proc_api prototype. * proc-events.c: Remove _initialize_proc_events prototype. * proc-service.c: Remove _initialize_proc_service prototype. * procfs.c: Remove _initialize_procfs prototype. * psymtab.c: Remove _initialize_psymtab prototype. * python/python.c: Remove _initialize_python prototype. * ravenscar-thread.c: Remove _initialize_ravenscar prototype. * record-btrace.c: Remove _initialize_record_btrace prototype. * record-full.c: Remove _initialize_record_full prototype. * record.c: Remove _initialize_record prototype. * regcache.c: Remove _initialize_regcache prototype. * reggroups.c: Remove _initialize_reggroup prototype. * remote-notif.c: Remove _initialize_notif prototype. * remote-sim.c: Remove _initialize_remote_sim prototype. * remote.c: Remove _initialize_remote prototype. * reverse.c: Remove _initialize_reverse prototype. * rl78-tdep.c: Remove _initialize_rl78_tdep prototype. * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype. * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep prototype. * rs6000-nat.c: Remove _initialize_rs6000_nat prototype. * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype. * rust-exp.y: Remove _initialize_rust_exp prototype. * rx-tdep.c: Remove _initialize_rx_tdep prototype. * s390-linux-nat.c: Remove _initialize_s390_nat prototype. * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype. * score-tdep.c: Remove _initialize_score_tdep prototype. * selftest-arch.c: Remove _initialize_selftests_foreach_arch prototype. * ser-go32.c: Remove _initialize_ser_dos prototype. * ser-mingw.c: Remove _initialize_ser_windows prototype. * ser-pipe.c: Remove _initialize_ser_pipe prototype. * ser-tcp.c: Remove _initialize_ser_tcp prototype. * ser-unix.c: Remove _initialize_ser_hardwire prototype. * serial.c: Remove _initialize_serial prototype. * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype. * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype. * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype. * sh-tdep.c: Remove _initialize_sh_tdep prototype. * skip.c: Remove _initialize_step_skip prototype. * sol-thread.c: Remove _initialize_sol_thread prototype. * solib-aix.c: Remove _initialize_solib_aix prototype. * solib-darwin.c: Remove _initialize_darwin_solib prototype. * solib-dsbt.c: Remove _initialize_dsbt_solib prototype. * solib-frv.c: Remove _initialize_frv_solib prototype. * solib-spu.c: Remove _initialize_spu_solib prototype. * solib-svr4.c: Remove _initialize_svr4_solib prototype. * solib-target.c: Remove _initialize_solib_target prototype. * solib.c: Remove _initialize_solib prototype. * source.c: Remove _initialize_source prototype. * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype. * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep prototype. * sparc-nat.c: Remove _initialize_sparc_nat prototype. * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype. * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype. * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep prototype. * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype. * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype. * sparc-tdep.c: Remove _initialize_sparc_tdep prototype. * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat prototype. * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep prototype. * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat prototype. * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep prototype. * sparc64-nat.c: Remove _initialize_sparc64_nat prototype. * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat prototype. * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep prototype. * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat prototype. * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep prototype. * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep prototype. * spu-linux-nat.c: Remove _initialize_spu_nat prototype. * spu-multiarch.c: Remove _initialize_spu_multiarch prototype. * spu-tdep.c: Remove _initialize_spu_tdep prototype. * stabsread.c: Remove _initialize_stabsread prototype. * stack.c: Remove _initialize_stack prototype. * stap-probe.c: Remove _initialize_stap_probe prototype. * std-regs.c: Remove _initialize_frame_reg prototype. * symfile-debug.c: Remove _initialize_symfile_debug prototype. * symfile-mem.c: Remove _initialize_symfile_mem prototype. * symfile.c: Remove _initialize_symfile prototype. * symmisc.c: Remove _initialize_symmisc prototype. * symtab.c: Remove _initialize_symtab prototype. * target-dcache.c: Remove _initialize_target_dcache prototype. * target-descriptions.c: Remove _initialize_target_descriptions prototype. * thread.c: Remove _initialize_thread prototype. * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep prototype. * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype. * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype. * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep prototype. * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype. * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype. * tracefile.c: Remove _initialize_tracefile prototype. * tracepoint.c: Remove _initialize_tracepoint prototype. * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype. * tui/tui-interp.c: Remove _initialize_tui_interp prototype. * tui/tui-layout.c: Remove _initialize_tui_layout prototype. * tui/tui-regs.c: Remove _initialize_tui_regs prototype. * tui/tui-stack.c: Remove _initialize_tui_stack prototype. * tui/tui-win.c: Remove _initialize_tui_win prototype. * tui/tui.c: Remove _initialize_tui prototype. * typeprint.c: Remove _initialize_typeprint prototype. * user-regs.c: Remove _initialize_user_regs prototype. * utils.c: Remove _initialize_utils prototype. * v850-tdep.c: Remove _initialize_v850_tdep prototype. * valarith.c: Remove _initialize_valarith prototype. * valops.c: Remove _initialize_valops prototype. * valprint.c: Remove _initialize_valprint prototype. * value.c: Remove _initialize_values prototype. * varobj.c: Remove _initialize_varobj prototype. * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype. * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype. * vax-tdep.c: Remove _initialize_vax_tdep prototype. * windows-nat.c: Remove _initialize_windows_nat, _initialize_check_for_gdb_ini, and _initialize_loadable prototypes. * windows-tdep.c: Remove _initialize_windows_tdep prototype. * xcoffread.c: Remove _initialize_xcoffread prototype. * xml-support.c: Remove _initialize_xml_support prototype. * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype. * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat prototype. * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep prototype. * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2017-05-24Delegate opcodes to select disassembler in GDBYao Qi
This patch changes GDB to use disassembler selected by opcodes in default, so that we don't have to duplicate the selection logic again in GDB side. For example, gdb/score-tdep.c has static int score_print_insn (bfd_vma memaddr, struct disassemble_info *info) { if (info->endian == BFD_ENDIAN_BIG) return print_insn_big_score (memaddr, info); else return print_insn_little_score (memaddr, info); } and opcodes/disassemble.c has the same logic, case bfd_arch_score: if (big) disassemble = print_insn_big_score; else disassemble = print_insn_little_score; This patch removes the logic in GDB and calls opcodes/disassemble.c:disassembler in default to select disassembler. gdb: 2017-05-24 Yao Qi <yao.qi@linaro.org> * alpha-tdep.c (alpha_gdbarch_init): Don't call set_gdbarch_print_insn. * arc-tdep.c (arc_gdbarch_init): Likewise. * arch-utils.c: include dis-asm.h. (default_print_insn): New function. * arch-utils.h (default_print_insn): Declare. * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn. * bfin-tdep.c (bfin_gdbarch_init): Likewise. * cris-tdep.c (cris_delayed_get_disassembler): Remove. (cris_gdbarch_init): Don't call set_gdbarch_print_insn. * frv-tdep.c (frv_gdbarch_init): Likewise. * ft32-tdep.c (ft32_gdbarch_init): Likewise. * gdbarch.sh (print_insn): Use default_print_insn. * gdbarch.c: Regenerated. * hppa-tdep.c (hppa_gdbarch_init): Likewise. * iq2000-tdep.c (iq2000_gdbarch_init): Likewise. * lm32-tdep.c (lm32_gdbarch_init): Likewise. * m32c-tdep.c (m32c_gdbarch_init): Likewise. * m32r-tdep.c (m32r_gdbarch_init): Likewise. * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove. (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn. * m68k-tdep.c (m68k_gdbarch_init): Likewise. * m88k-tdep.c (m88k_gdbarch_init): Likewise. * microblaze-tdep.c (microblaze_gdbarch_init): Likewise. * mn10300-tdep.c (mn10300_gdbarch_init): Likewise. * moxie-tdep.c (moxie_gdbarch_init): Likewise. * msp430-tdep.c (msp430_gdbarch_init): Likewise. * mt-tdep.c (mt_gdbarch_init): Likewise. * nds32-tdep.c (nds32_gdbarch_init): Likewise. * nios2-tdep.c (nios2_print_insn): Remove. (nios2_gdbarch_init): Don't call set_gdbarch_print_insn. * rx-tdep.c (rx_gdbarch_init): Likewise. * s390-linux-tdep.c (s390_gdbarch_init): Likewise. * score-tdep.c (score_print_insn): Remove. (score_gdbarch_init): Don't call set_gdbarch_print_insn. * sh-tdep.c (sh_gdbarch_init): Likewise. * sh64-tdep.c (sh64_gdbarch_init): Likewise. * sparc-tdep.c (sparc32_gdbarch_init): Likewise. * tic6x-tdep.c (tic6x_print_insn): Remove. (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn. * tilegx-tdep.c (tilegx_gdbarch_init): Likewise. * v850-tdep.c (v850_gdbarch_init): Likewise. * vax-tdep.c (vax_gdbarch_init): Likewise. * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise. * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
2017-04-12Teach GDB that wchar_t is a built-in type in C++ modePedro Alves
GDB is currently not aware that wchar_t is a built-in type in C++ mode. This is usually not a problem because the debug info describes the type, so when you have a program loaded, you don't notice this. However, if you try expressions involving wchar_t before a program is loaded, gdb errors out: (gdb) p (wchar_t)-1 No symbol table is loaded. Use the "file" command. (gdb) p L"hello" No type named wchar_t. (gdb) ptype L"hello" No type named wchar_t. This commit teaches gdb about the type. After: (gdb) p (wchar_t)-1 $1 = -1 L'\xffffffff' (gdb) p L"hello" $2 = L"hello" (gdb) ptype L"hello" type = wchar_t [6] Unlike char16_t/char32_t, unfortunately, the underlying type of wchar_t is implementation dependent, both size and signness. So this requires adding a couple new gdbarch hooks. I grepped the GCC code base for WCHAR_TYPE and WCHAR_TYPE_SIZE, and it seems to me that the majority of the ABIs have a 4-byte signed wchar_t, so that's what I made the default for GDB too. And then I looked for which ports have a 16-bit and/or unsigned wchar_t, and made GDB follow suit. gdb/ChangeLog: 2017-04-12 Pedro Alves <palves@redhat.com> PR gdb/21323 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>: New enum value. (cplus_language_arch_info): Register cplus_primitive_type_wchar_t. * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field. * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type. * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values. * gdbarch.h, gdbarch.c: Regenerate. * aarch64-tdep.c (aarch64_gdbarch_init): Override gdbarch_wchar_bit and gdbarch_wchar_signed. * alpha-tdep.c (alpha_gdbarch_init): Likewise. * arm-tdep.c (arm_gdbarch_init): Likewise. * avr-tdep.c (avr_gdbarch_init): Likewise. * h8300-tdep.c (h8300_gdbarch_init): Likewise. * i386-nto-tdep.c (i386nto_init_abi): Likewise. * i386-tdep.c (i386_go32_init_abi): Likewise. * m32r-tdep.c (m32r_gdbarch_init): Likewise. * moxie-tdep.c (moxie_gdbarch_init): Likewise. * nds32-tdep.c (nds32_gdbarch_init): Likewise. * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise. * sh-tdep.c (sh_gdbarch_init): Likewise. * sparc-tdep.c (sparc32_gdbarch_init): Likewise. * sparc64-tdep.c (sparc64_init_abi): Likewise. * windows-tdep.c (windows_init_abi): Likewise. * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise. gdb/testsuite/ChangeLog: 2017-04-12 Pedro Alves <palves@redhat.com> PR gdb/21323 * gdb.cp/wide_char_types.c: Include <wchar.h>. (wchar): New global. * gdb.cp/wide_char_types.exp (wide_char_types_program) (do_test_wide_char, wide_char_types_no_program, top level): Add wchar_t testing.
2017-04-05-Wwrite-strings: The RestPedro Alves
This is the remainder boring constification that all looks more of less borderline obvious IMO. gdb/ChangeLog: 2017-04-05 Pedro Alves <palves@redhat.com> * ada-exp.y (yyerror): Constify. * ada-lang.c (bound_name, get_selections) (ada_variant_discrim_type) (ada_variant_discrim_name, ada_value_struct_elt) (ada_lookup_struct_elt_type, is_unchecked_variant) (ada_which_variant_applies, standard_exc, ada_get_next_arg) (catch_ada_exception_command_split) (catch_ada_assert_command_split, catch_assert_command) (ada_op_name): Constify. * ada-lang.h (ada_yyerror, get_selections) (ada_variant_discrim_name, ada_value_struct_elt): Constify. * arc-tdep.c (arc_print_frame_cache): Constify. * arm-tdep.c (arm_skip_stub): Constify. * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref) (gen_aggregate_elt_ref): Constify. * bcache.c (print_bcache_statistics): Constify. * bcache.h (print_bcache_statistics): Constify. * break-catch-throw.c (catch_exception_command_1): * breakpoint.c (struct ep_type_description::description): Constify. (add_solib_catchpoint): Constify. (catch_fork_command_1): Add cast. (add_catch_command): Constify. * breakpoint.h (add_catch_command, add_solib_catchpoint): Constify. * bsd-uthread.c (bsd_uthread_state): Constify. * buildsym.c (patch_subfile_names): Constify. * buildsym.h (next_symbol_text_func, patch_subfile_names): Constify. * c-exp.y (yyerror): Constify. (token::oper): Constify. * c-lang.h (c_yyerror, cp_print_class_member): Constify. * c-varobj.c (cplus_describe_child): Constify. * charset.c (find_charset_names): Add cast. (find_charset_names): Constify array and add const_cast. * cli/cli-cmds.c (complete_command, cd_command): Constify. (edit_command): Constify. * cli/cli-decode.c (lookup_cmd): Constify. * cli/cli-dump.c (dump_memory_command, dump_value_command): Constify. (struct dump_context): Constify. (add_dump_command, restore_command): Constify. * cli/cli-script.c (get_command_line): Constify. * cli/cli-script.h (get_command_line): Constify. * cli/cli-utils.c (check_for_argument): Constify. * cli/cli-utils.h (check_for_argument): Constify. * coff-pe-read.c (struct read_pe_section_data): Constify. * command.h (lookup_cmd): Constify. * common/print-utils.c (decimal2str): Constify. * completer.c (gdb_print_filename): Constify. * corefile.c (set_gnutarget): Constify. * cp-name-parser.y (yyerror): Constify. * cp-valprint.c (cp_print_class_member): Constify. * cris-tdep.c (cris_register_name, crisv32_register_name): Constify. * d-exp.y (yyerror): Constify. (struct token::oper): Constify. * d-lang.h (d_yyerror): Constify. * dbxread.c (struct header_file_location::name): Constify. (add_old_header_file, add_new_header_file, last_function_name) (dbx_next_symbol_text, add_bincl_to_list) (find_corresponding_bincl_psymtab, set_namestring) (find_stab_function_addr, read_dbx_symtab, start_psymtab) (dbx_end_psymtab, read_ofile_symtab, process_one_symbol): * defs.h (command_line_input, print_address_symbolic) (deprecated_readline_begin_hook): Constify. * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name): Constify. * event-top.c (handle_line_of_input): Constify and add cast. * exceptions.c (catch_errors): Constify. * exceptions.h (catch_errors): Constify. * expprint.c (print_subexp_standard, op_string, op_name) (op_name_standard, dump_raw_expression, dump_raw_expression): * expression.h (op_name, op_string, dump_raw_expression): Constify. * f-exp.y (yyerror): Constify. (struct token::oper): Constify. (struct f77_boolean_val::name): Constify. * f-lang.c (f_word_break_characters): Constify. * f-lang.h (f_yyerror): Constify. * fork-child.c (fork_inferior): Add cast. * frv-tdep.c (struct gdbarch_tdep::register_names): Constify. (new_variant): Constify. * gdbarch.sh (pstring_ptr, pstring_list): Constify. * gdbarch.c: Regenerate. * gdbcore.h (set_gnutarget): Constify. * go-exp.y (yyerror): Constify. (token::oper): Constify. * go-lang.h (go_yyerror): Constify. * go32-nat.c (go32_sysinfo): Constify. * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify. * guile/scm-cmd.c (cmdscm_function): Constify. * guile/scm-param.c (pascm_param_value): Constify. * h8300-tdep.c (h8300_register_name, h8300s_register_name) (h8300sx_register_name): Constify. * hppa-tdep.c (hppa32_register_name, hppa64_register_name): Constify. * ia64-tdep.c (ia64_register_names): Constify. * infcmd.c (construct_inferior_arguments): Constify. (path_command, attach_post_wait): Constify. * language.c (show_range_command, show_case_command) (unk_lang_error): Constify. * language.h (language_defn::la_error) (language_defn::la_name_of_this): Constify. * linespec.c (decode_line_2): Constify. * linux-thread-db.c (thread_db_err_str): Constify. * lm32-tdep.c (lm32_register_name): Constify. * m2-exp.y (yyerror): Constify. * m2-lang.h (m2_yyerror): Constify. * m32r-tdep.c (m32r_register_names): Constify and make static. * m68hc11-tdep.c (m68hc11_register_names): Constify. * m88k-tdep.c (m88k_register_name): Constify. * macroexp.c (appendmem): Constify. * mdebugread.c (fdr_name, add_data_symbol, parse_type) (upgrade_type, parse_external, parse_partial_symbols) (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab) (new_symbol): Constify. * memattr.c (mem_info_command): Constify. * mep-tdep.c (register_name_from_keyword): Constify. * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env): Constify. * mi/mi-cmd-stack.c (list_args_or_locals): Constify. * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify. * mi/mi-main.c (captured_mi_execute_command): Constify and add cast. (mi_execute_async_cli_command): Constify. * mips-tdep.c (mips_register_name): Constify. * mn10300-tdep.c (register_name, mn10300_generic_register_name) (am33_register_name, am33_2_register_name) * moxie-tdep.c (moxie_register_names): Constify. * nat/linux-osdata.c (osdata_type): Constify fields. * nto-tdep.c (nto_parse_redirection): Constify. * objc-lang.c (lookup_struct_typedef, lookup_objc_class) (lookup_child_selector): Constify. (objc_methcall::name): Constify. * objc-lang.h (lookup_objc_class, lookup_child_selector) (lookup_struct_typedef): Constify. * objfiles.c (pc_in_section): Constify. * objfiles.h (pc_in_section): Constify. * p-exp.y (struct token::oper): Constify. (yyerror): Constify. * p-lang.h (pascal_yyerror): Constify. * parser-defs.h (op_name_standard): Constify. (op_print::string): Constify. (exp_descriptor::op_name): Constify. * printcmd.c (print_address_symbolic): Constify. * psymtab.c (print_partial_symbols): Constify. * python/py-breakpoint.c (stop_func): Constify. (bppy_get_expression): Constify. * python/py-cmd.c (cmdpy_completer::name): Constify. (cmdpy_function): Constify. * python/py-event.c (evpy_add_attribute) (gdbpy_initialize_event_generic): Constify. * python/py-event.h (evpy_add_attribute) (gdbpy_initialize_event_generic): Constify. * python/py-evts.c (add_new_registry): Constify. * python/py-finishbreakpoint.c (outofscope_func): Constify. * python/py-framefilter.c (get_py_iter_from_func): Constify. * python/py-inferior.c (get_buffer): Add cast. * python/py-param.c (parm_constant::name): Constify. * python/py-unwind.c (fprint_frame_id): Constify. * python/python.c (gdbpy_parameter_value): Constify. * remote-fileio.c (remote_fio_func_map): Make 'name' const. * remote.c (memory_packet_config::name): Constify. (show_packet_config_cmd, remote_write_bytes) (remote_buffer_add_string): * reverse.c (exec_reverse_once): Constify. * rs6000-tdep.c (variant::name, variant::description): Constify. * rust-exp.y (rustyyerror): Constify. * rust-lang.c (rust_op_name): Constify. * rust-lang.h (rustyyerror): Constify. * serial.h (serial_ops::name): Constify. * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name) (sh_sh3e_register_name, sh_sh2e_register_name) (sh_sh2a_register_name, sh_sh2a_nofpu_register_name) (sh_sh_dsp_register_name, sh_sh3_dsp_register_name) (sh_sh4_register_name, sh_sh4_nofpu_register_name) (sh_sh4al_dsp_register_name): Constify. * sh64-tdep.c (sh64_register_name): Constify. * solib-darwin.c (lookup_symbol_from_bfd): Constify. * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify. * stabsread.c (patch_block_stabs, read_type_number) (ref_map::stabs, ref_add, process_reference) (symbol_reference_defined, define_symbol, define_symbol) (error_type, read_type, read_member_functions, read_cpp_abbrev) (read_one_struct_field, read_struct_fields, read_baseclasses) (read_tilde_fields, read_struct_type, read_array_type) (read_enum_type, read_sun_builtin_type, read_sun_floating_type) (read_huge_number, read_range_type, read_args, common_block_start) (find_name_end): Constify. * stabsread.h (common_block_start, define_symbol) (process_one_symbol, symbol_reference_defined, ref_add): * symfile.c (get_section_index, add_symbol_file_command): * symfile.h (get_section_index): Constify. * target-descriptions.c (tdesc_type::name): Constify. (tdesc_free_type): Add cast. * target.c (find_default_run_target): (add_deprecated_target_alias, find_default_run_target) (target_announce_detach): Constify. (do_option): Constify. * target.h (add_deprecated_target_alias): Constify. * thread.c (print_thread_info_1): Constify. * top.c (deprecated_readline_begin_hook, command_line_input): Constify. (init_main): Add casts. * top.h (handle_line_of_input): Constify. * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify. * tracepoint.c (tvariables_info_1, trace_status_mi): Constify. (tfind_command): Rename to ... (tfind_command_1): ... this and constify. (tfind_command): New function. (tfind_end_command, tfind_start_command): Adjust. (encode_source_string): Constify. * tracepoint.h (encode_source_string): Constify. * tui/tui-data.c (tui_partial_win_by_name): Constify. * tui/tui-data.h (tui_partial_win_by_name): Constify. * tui/tui-source.c (tui_set_source_content_nil): Constify. * tui/tui-source.h (tui_set_source_content_nil): Constify. * tui/tui-win.c (parse_scrolling_args): Constify. * tui/tui-windata.c (tui_erase_data_content): Constify. * tui/tui-windata.h (tui_erase_data_content): Constify. * tui/tui-winsource.c (tui_erase_source_content): Constify. * tui/tui.c (tui_enable): Add cast. * utils.c (defaulted_query): Constify. (init_page_info): Add cast. (puts_debug, subset_compare): Constify. * utils.h (subset_compare): Constify. * varobj.c (varobj_format_string): Constify. * varobj.h (varobj_format_string): Constify. * vax-tdep.c (vax_register_name): Constify. * windows-nat.c (windows_detach): Constify. * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify. * xml-support.c (gdb_xml_end_element): Constify. * xml-tdesc.c (tdesc_start_reg): Constify. * xstormy16-tdep.c (xstormy16_register_name): Constify. * xtensa-tdep.c (xtensa_find_register_by_name): Constify. * xtensa-tdep.h (xtensa_register_t::name): Constify. gdb/gdbserver/ChangeLog: 2017-04-05 Pedro Alves <palves@redhat.com> * gdbreplay.c (sync_error): Constify. * linux-x86-low.c (push_opcode): Constify.
2017-01-01update copyright year range in GDB filesJoel Brobecker
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.
2016-11-03Remove GDBARCH_BREAKPOINT_MANIPULATION and SET_GDBARCH_BREAKPOINT_MANIPULATIONYao Qi
Both of them are used in conversion. We can remove them since the conversion is done. There are many architectures only have one breakpoint instruction, so their gdbarch methods breakpoint_kind_from_pc and sw_breakpoint_from_kind look very similar. Instead of macro, we use template "template <size_t, const gdb_byte *> struct bp_manipulation" for these architectures. In order to use template, I also change breakpoint instruction of type "static const gdb_byte[]" to "constexpr gdb_byte[]", and rename them to ARCH_break_insn. gdb: 2016-11-03 Yao Qi <yao.qi@linaro.org> Pedro Alves <palves@redhat.com> * aarch64-tdep.c (aarch64_default_breakpoint): Change it to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (aarch64_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * alpha-tdep.c (break_insn): Rename to alpha_break_insn. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (alpha_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * arc-tdep.c (arc_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * arch-utils.h (GDBARCH_BREAKPOINT_MANIPULATION): Remove. (struct bp_manipulation): New. (SET_GDBARCH_BREAKPOINT_MANIPULATION): Remove. (struct bp_manipulation_endian): New. (BP_MANIPULATION): New. (BP_MANIPULATION_ENDIAN): New. * arm-tdep.c (arm_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * avr-tdep.c (avr_break_insn): Change it constexpr. (avr_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * bfin-tdep.c (bfin_gdbarch_init): Likewise. * cris-tdep.c (cris_gdbarch_init): Likewise. * frv-tdep.c (breakpoint): Rename it to frv_break_insn, and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (frv_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * ft32-tdep.c (breakpoint): Rename it to ft32_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (ft32_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * h8300-tdep.c (breakpoint): Rename it to h8300_break_insn. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (h8300_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * hppa-tdep.c (breakpoint): Rename it to h8300_break_insn. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (hppa_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * i386-tdep.c (break_insn): Rename it to i386_break_insn. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (i386_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * iq2000-tdep.c (iq2000_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * lm32-tdep.c (breakpoint): Rename it to lm32_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (lm32_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * m32c-tdep.c (break_insn): Rename it to m32c_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (m32c_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * m32r-tdep.c (m32r_gdbarch_init): Likewise. * m68hc11-tdep.c (breakpoint): Rename it to m68hc11_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (m68hc11_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * m68k-tdep.c (break_insn): Rename it to m68k_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (m68k_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * m88k-tdep.c (break_insn): Rename it to m88k_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (m88k_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * mep-tdep.c (breakpoint): Rename it to mep_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (mep_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * microblaze-tdep.c (break_insn): Rename it to microblaze_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (microblaze_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * mips-tdep.c (mips_gdbarch_init): Likewise. * mn10300-tdep.c (breakpoint): Rename it to mn10300_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (mn10300_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * moxie-tdep.c (breakpoint): Rename it to moxie_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (moxie_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * msp430-tdep.c (breakpoint): Rename it to msp430_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (msp430_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * mt-tdep.c (mt_gdbarch_init): Likewise. * nds32-tdep.c (break_insn): Rename it to nds32_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (nds32_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * nios2-tdep.c (nios2_gdbarch_init): Likewise. * rl78-tdep.c (breakpoint): Rename it to rl78_break_ins and change its type to rl78_break_insn. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (rl78_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * rs6000-tdep.c (big_breakpoint): Change its type to constexpr. (little_breakpoint): Likewise. Don't use GDBARCH_BREAKPOINT_MANIPULATION_ENDIAN. (rs6000_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * rx-tdep.c (breakpoint): Rename it to rx_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (rx_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * s390-linux-tdep.c (breakpoint): Rename it to s390_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION (s390_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * score-tdep.c (score_gdbarch_init): Likewise. * sh-tdep.c (sh_gdbarch_init): Likewise. * sh64-tdep.c (sh64_gdbarch_init): Likewise. * sparc-tdep.c (break_insn): Rename it to sparc_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (sparc32_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * spu-tdep.c (breakpoint): Rename it to spu_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (spu_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * tic6x-tdep.c (tic6x_gdbarch_init): Likewise. * tilegx-tdep.c (breakpoint): Rename it to tilegx_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (tilegx_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * v850-tdep.c (v850_gdbarch_init): Likewise. * vax-tdep.c (break_insn): Rename it to vax_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (vax_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * xstormy16-tdep.c (breakpoint): Rename it to xstormy16_break_insn and change its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION. (xstormy16_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION. * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
2016-11-03GDBARCH_BREAKPOINT_MANIPULATION and SET_GDBARCH_BREAKPOINT_MANIPULATIONYao Qi
Many archs have only one kind of breakpoint, so their breakpoint_from_pc implementations are quite similar. This patch uses macro GDBARCH_BREAKPOINT_MANIPULATION and SET_GDBARCH_BREAKPOINT_MANIPULATION for breakpoint_from_pc, so that we can easily switch from breakpoint_from_pc to breakpoint_kind_from_pc and sw_breakpoint_from_kind later. gdb: 2016-11-03 Yao Qi <yao.qi@linaro.org> * arch-utils.h (GDBARCH_BREAKPOINT_MANIPULATION): New macro. (SET_GDBARCH_BREAKPOINT_MANIPULATION): New macro. aarch64-tdep.c (aarch64_breakpoint_from_pc): Remove. Use GDBARCH_BREAKPOINT_MANIPULATION. (aarch64_gdbarch_init): Replace set_gdbarch_breakpoint_from_pc with SET_GDBARCH_BREAKPOINT_MANIPULATION. * alpha-tdep.c: Likewise. * avr-tdep.c: Likewise. * frv-tdep.c: Likewise. * ft32-tdep.c: Likewise. * h8300-tdep.c: Likewise. * hppa-tdep.c: Likewise. * i386-tdep.c: Likewise. * lm32-tdep.c: Likewise. * m32c-tdep.c: Likewise. * m68hc11-tdep.c: Likewise. * m68k-tdep.c: Likewise. * m88k-tdep.c: Likewise. * mep-tdep.c: Likewise. * microblaze-tdep.c: Likewise. * mn10300-tdep.c: Likewise. * moxie-tdep.c: Likewise. * msp430-tdep.c: Likewise. * rl78-tdep.c: Likewise. * rx-tdep.c: Likewise. * s390-linux-tdep.c: Likewise. * sparc-tdep.c: Likewise. * spu-tdep.c: Likewise. * tilegx-tdep.c: Likewise. * vax-tdep.c: Likewise. * xstormy16-tdep.c: Likewise.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-09-25Add some more casts (2/2)Simon Marchi
See previous patch's description. gdb/ChangeLog: * macrocmd.c (print_macro_callback): Add cast(s). * macrotab.c (macro_bcache_str): Likewise. (new_macro_definition): Likewise. * main.c (captured_main): Likewise. * maint.c (print_bfd_section_info): Likewise. * mdebugread.c (mdebug_build_psymtabs): Likewise. (basic_type): Likewise. * memattr.c (mem_region_cmp): Likewise. * memory-map.c (memory_map_start_memory): Likewise. (memory_map_end_memory): Likewise. (memory_map_start_property): Likewise. (memory_map_end_property): Likewise. (clear_result): Likewise. * memrange.c (compare_mem_ranges): Likewise. * mep-tdep.c (mep_analyze_frame_prologue): Likewise. * mi/mi-cmd-var.c (mi_cmd_var_update_iter): Likewise. * mi/mi-console.c (mi_console_file_delete): Likewise. (mi_console_file_fputs): Likewise. (mi_console_raw_packet): Likewise. (mi_console_file_flush): Likewise. (mi_console_set_raw): Likewise. * mi/mi-interp.c (mi_interpreter_resume): Likewise. (mi_new_thread): Likewise. (mi_thread_exit): Likewise. (mi_record_changed): Likewise. (mi_inferior_added): Likewise. (mi_inferior_appeared): Likewise. (mi_inferior_exit): Likewise. (mi_inferior_removed): Likewise. (mi_interp_data): Likewise. (mi_on_normal_stop): Likewise. (mi_traceframe_changed): Likewise. (mi_tsv_created): Likewise. (mi_tsv_deleted): Likewise. (mi_tsv_modified): Likewise. (mi_breakpoint_created): Likewise. (mi_breakpoint_deleted): Likewise. (mi_breakpoint_modified): Likewise. (mi_output_running_pid): Likewise. (mi_inferior_count): Likewise. (mi_solib_loaded): Likewise. (mi_solib_unloaded): Likewise. (mi_command_param_changed): Likewise. (mi_memory_changed): Likewise. (report_initial_inferior): Likewise. (mi_ui_out): Likewise. (mi_set_logging): Likewise. * mi/mi-main.c (collect_cores): Likewise. (print_one_inferior): Likewise. (free_vector_of_ints): Likewise. (free_splay_tree): Likewise. (mi_execute_command): Likewise. * mi/mi-out.c (mi_table_body): Likewise. (mi_table_end): Likewise. (mi_table_header): Likewise. (mi_begin): Likewise. (mi_end): Likewise. (mi_field_int): Likewise. (mi_field_string): Likewise. (mi_field_fmt): Likewise. (mi_flush): Likewise. (mi_redirect): Likewise. (field_separator): Likewise. (mi_open): Likewise. (mi_close): Likewise. (mi_out_buffered): Likewise. (mi_out_rewind): Likewise. (mi_out_put): Likewise. (mi_version): Likewise. (mi_out_data_dtor): Likewise. * mi/mi-parse.c (mi_parse_cleanup): Likewise. * microblaze-tdep.c (microblaze_frame_cache): Likewise. * minidebug.c (lzma_open): Likewise. (lzma_pread): Likewise. (lzma_close): Likewise. (lzma_stat): Likewise. * mips-linux-tdep.c (mips_linux_init_abi): Likewise. * mips-sde-tdep.c (mips_sde_frame_cache): Likewise. (mips_sde_elf_osabi_sniff_abi_tag_sections): Likewise. * mips-tdep.c (mips_insn16_frame_cache): Likewise. (mips_micro_frame_cache): Likewise. (mips_insn32_frame_cache): Likewise. (mips_stub_frame_cache): Likewise. (gdb_print_insn_mips): Likewise. (value_of_mips_user_reg): Likewise. (mips_gdbarch_init): Likewise. * mips64obsd-tdep.c (mips64obsd_supply_gregset): Likewise. * mipsnbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise. (mipsnbsd_supply_gregset): Likewise. * mn10300-linux-tdep.c (am33_supply_fpregset_method): Likewise. (am33_collect_gregset_method): Likewise. (am33_collect_fpregset_method): Likewise. * mn10300-tdep.c (mn10300_analyze_frame_prologue): Likewise. * moxie-tdep.c (moxie_frame_cache): Likewise. * msp430-tdep.c (msp430_get_opcode_byte): Likewise. (msp430_analyze_frame_prologue): Likewise. * mt-tdep.c (mt_frame_unwind_cache): Likewise. * nios2-linux-tdep.c (nios2_supply_gregset): Likewise. (nios2_collect_gregset): Likewise. * nios2-tdep.c (nios2_frame_unwind_cache): Likewise. (nios2_stub_frame_cache): Likewise. * objc-lang.c (find_methods): Likewise. * objfiles.c (objfiles_pspace_data_cleanup): Likewise. (get_objfile_pspace_data): Likewise. (get_objfile_bfd_data): Likewise. (objfile_bfd_data_free): Likewise. (add_to_objfile_sections): Likewise. (do_free_objfile_cleanup): Likewise. (resume_section_map_updates_cleanup): Likewise. * opencl-lang.c (builtin_opencl_type): Likewise. * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Likewise. * osdata.c (osdata_start_osdata): Likewise. (osdata_start_item): Likewise. (osdata_start_column): Likewise. (osdata_end_column): Likewise. (clear_parsing_data): Likewise. (osdata_free_cleanup): Likewise. * parse.c (type_stack_cleanup): Likewise. (exp_uses_objfile_iter): Likewise. * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise. (ppc_linux_collect_gregset): Likewise. (ppu2spu_prev_arch): Likewise. (ppu2spu_this_id): Likewise. (ppu2spu_prev_register): Likewise. (ppu2spu_unwind_register): Likewise. (ppu2spu_sniffer): Likewise. (ppu2spu_dealloc_cache): Likewise. (ppc_linux_init_abi): Likewise. * ppcfbsd-tdep.c (ppcfbsd_sigtramp_frame_cache): Likewise. * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_cache): Likewise. * progspace.c (restore_program_space): Likewise. * psymtab.c (find_pc_sect_psymtab): Likewise. (compare_psymbols): Likewise. (psymbol_bcache_full): Likewise. (allocate_psymtab): Likewise. (discard_psymtabs_upto): Likewise. * python/py-block.c (set_block): Likewise. (del_objfile_blocks): Likewise. * python/py-breakpoint.c (build_bp_list): Likewise. * python/py-inferior.c (inferior_to_inferior_object): Likewise. (build_inferior_list): Likewise. (py_free_inferior): Likewise. * python/py-objfile.c (py_free_objfile): Likewise. (objfile_to_objfile_object): Likewise. * python/py-prettyprint.c (py_restore_tstate): Likewise. * python/py-progspace.c (py_free_pspace): Likewise. (pspace_to_pspace_object): Likewise. * python/py-symbol.c (set_symbol): Likewise. (del_objfile_symbols): Likewise. * python/py-symtab.c (set_sal): Likewise. (set_symtab): Likewise. (del_objfile_symtab): Likewise. (del_objfile_sal): Likewise. * python/py-type.c (save_objfile_types): Likewise. (set_type): Likewise. * python/py-unwind.c (pyuw_prev_register): Likewise. (pyuw_on_new_gdbarch): Likewise. * python/py-utils.c (py_decref): Likewise. (py_xdecref): Likewise. (gdb_py_generic_dict): Likewise. * python/py-xmethods.c (gdbpy_free_xmethod_worker_data): Likewise. (gdbpy_clone_xmethod_worker_data): Likewise. (gdbpy_get_xmethod_arg_types): Likewise. (gdbpy_get_xmethod_result_type): Likewise. (gdbpy_invoke_xmethod): Likewise. * python/python.c (gdbpy_apply_type_printers): Likewise. (gdbpy_free_type_printers): Likewise. * record-btrace.c (record_btrace_disable_callback): Likewise. (bfcache_hash): Likewise. (bfcache_eq): Likewise. (btrace_get_frame_function): Likewise. (record_btrace_frame_unwind_stop_reason): Likewise. (record_btrace_frame_this_id): Likewise. (record_btrace_frame_prev_register): Likewise. (record_btrace_frame_dealloc_cache): Likewise. * record-full.c (record_full_message_wrapper): Likewise. (record_full_save_cleanups): Likewise. * regcache.c (regcache_descr): Likewise. (do_regcache_xfree): Likewise. (do_regcache_invalidate): Likewise. (do_cooked_read): Likewise. (regcache_transfer_regset): Likewise. * reggroups.c (reggroup_add): Likewise. (reggroup_next): Likewise. (reggroup_prev): Likewise. * remote-fileio.c (do_remote_fileio_request): Likewise. * remote-notif.c (remote_async_get_pending_events_handler): Likewise. (do_notif_event_xfree): Likewise. * remote.c (get_remote_arch_state): Likewise. (remote_pspace_data_cleanup): Likewise. (get_remote_exec_file): Likewise. (set_pspace_remote_exec_file): Likewise. (compare_pnums): Likewise. (clear_threads_listing_context): Likewise. (remote_newthread_step): Likewise. (start_thread): Likewise. (end_thread): Likewise. (remove_child_of_pending_fork): Likewise. (remove_stop_reply_for_inferior): Likewise. (remove_stop_reply_of_remote_state): Likewise. (remote_notif_remove_once_on_match): Likewise. (stop_reply_match_ptid_and_ws): Likewise. (kill_child_of_pending_fork): Likewise. (register_remote_g_packet_guess): Likewise. (remote_read_description_p): Likewise. (remote_read_description): Likewise. (free_actions_list_cleanup_wrapper): Likewise. (remote_async_serial_handler): Likewise. * rl78-tdep.c (rl78_get_opcode_byte): Likewise. (rl78_analyze_frame_prologue): Likewise. * rs6000-tdep.c (ppc_supply_gregset): Likewise. (ppc_supply_fpregset): Likewise. (ppc_supply_vsxregset): Likewise. (ppc_supply_vrregset): Likewise. (ppc_collect_gregset): Likewise. (ppc_collect_fpregset): Likewise. (ppc_collect_vsxregset): Likewise. (ppc_collect_vrregset): Likewise. (e500_move_ev_register): Likewise. (do_regcache_raw_write): Likewise. (rs6000_frame_cache): Likewise. (rs6000_epilogue_frame_cache): Likewise. (rs6000_gdbarch_init): Likewise. * rx-tdep.c (rx_get_opcode_byte): Likewise. (rx_analyze_frame_prologue): Likewise. (rx_frame_type): Likewise. (rx_frame_sniffer_common): Likewise. * s390-linux-tdep.c (s390_check_for_saved): Likewise. (s390_frame_unwind_cache): Likewise. (s390_stub_frame_unwind_cache): Likewise. (s390_sigtramp_frame_unwind_cache): Likewise. * score-tdep.c (score_make_prologue_cache): Likewise. * sentinel-frame.c (sentinel_frame_prev_register): Likewise. (sentinel_frame_prev_arch): Likewise. * ser-base.c (fd_event): Likewise. (push_event): Likewise. (ser_base_write): Likewise. * ser-pipe.c (pipe_close): Likewise. * serial.c (serial_write): Likewise. * sh-tdep.c (sh_frame_cache): Likewise. (sh_stub_this_id): Likewise. * sh64-tdep.c (sh64_frame_cache): Likewise. * solib-aix.c (get_solib_aix_inferior_data): Likewise. (library_list_start_library): Likewise. (library_list_start_list): Likewise. (solib_aix_free_library_list): Likewise. * solib-darwin.c (get_darwin_info): Likewise. * solib-dsbt.c (get_dsbt_info): Likewise. * solib-spu.c (append_ocl_sos): Likewise. * solib-svr4.c (svr4_pspace_data_cleanup): Likewise. (get_svr4_info): Likewise. (library_list_start_library): Likewise. (svr4_library_list_start_list): Likewise. (hash_probe_and_action): Likewise. (equal_probe_and_action): Likewise. (svr4_update_solib_event_breakpoint): Likewise. (set_solib_svr4_fetch_link_map_offsets): Likewise. (svr4_fetch_link_map_offsets): Likewise. (svr4_have_link_map_offsets): Likewise. * solib-target.c (library_list_start_segment): Likewise. (library_list_start_section): Likewise. (library_list_start_library): Likewise. (library_list_end_library): Likewise. (library_list_start_list): Likewise. (solib_target_free_library_list): Likewise. * solib.c (solib_ops): Likewise. (set_solib_ops): Likewise. * sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_cache): Likewise. * sparc-tdep.c (sparc_frame_cache): Likewise. (sparc32_frame_cache): Likewise. (sparc32_supply_gregset): Likewise. (sparc32_collect_gregset): Likewise. (sparc32_supply_fpregset): Likewise. (sparc32_collect_fpregset): Likewise. * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_cache): Likewise. * sparc64-tdep.c (sparc64_supply_gregset): Likewise. (sparc64_collect_gregset): Likewise. (sparc64_supply_fpregset): Likewise. (sparc64_collect_fpregset): Likewise. * sparc64fbsd-tdep.c (sparc64fbsd_sigtramp_frame_cache): Likewise. * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_cache): Likewise. * sparc64obsd-tdep.c (sparc64obsd_frame_cache): Likewise. (sparc64obsd_trapframe_cache): Likewise. * sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_cache): Likewise. * sparcobsd-tdep.c (sparc32obsd_sigtramp_frame_cache): Likewise. * spu-multiarch.c (spu_gdbarch): Likewise. * spu-tdep.c (spu_frame_unwind_cache): Likewise. (spu2ppu_prev_arch): Likewise. (spu2ppu_this_id): Likewise. (spu2ppu_prev_register): Likewise. (spu2ppu_dealloc_cache): Likewise. (spu_dis_asm_print_address): Likewise. (gdb_print_insn_spu): Likewise. (spu_get_overlay_table): Likewise. * stabsread.c (rs6000_builtin_type): Likewise. * stack.c (do_print_variable_and_value): Likewise. * stap-probe.c (get_stap_base_address_1): Likewise. * symfile-debug.c (debug_qf_has_symbols): Likewise. (debug_qf_find_last_source_symtab): Likewise. (debug_qf_forget_cached_source_info): Likewise. (debug_qf_map_symtabs_matching_filename): Likewise. (debug_qf_lookup_symbol): Likewise. (debug_qf_print_stats): Likewise. (debug_qf_dump): Likewise. (debug_qf_relocate): Likewise. (debug_qf_expand_symtabs_for_function): Likewise. (debug_qf_expand_all_symtabs): Likewise. (debug_qf_expand_symtabs_with_fullname): Likewise. (debug_qf_map_matching_symbols): Likewise. (debug_qf_expand_symtabs_matching): Likewise. (debug_qf_find_pc_sect_compunit_symtab): Likewise. (debug_qf_map_symbol_filenames): Likewise. (debug_sym_get_probes): Likewise. (debug_sym_new_init): Likewise. (debug_sym_init): Likewise. (debug_sym_read): Likewise. (debug_sym_read_psymbols): Likewise. (debug_sym_finish): Likewise. (debug_sym_offsets): Likewise. (debug_sym_read_linetable): Likewise. (debug_sym_relocate): Likewise. (uninstall_symfile_debug_logging): Likewise. * symfile-mem.c (symbol_file_add_from_memory_wrapper): Likewise. * symfile.c (place_section): Likewise. (add_section_size_callback): Likewise. (load_progress): Likewise. (load_section_callback): Likewise. (clear_memory_write_data): Likewise. (allocate_symtab): Likewise. * symmisc.c (maintenance_expand_file_matcher): Likewise. * symtab.c (lookup_symtab_callback): Likewise. (hash_demangled_name_entry): Likewise. (eq_demangled_name_entry): Likewise. (get_symbol_cache): Likewise. (symbol_cache_cleanup): Likewise. (set_symbol_cache_size): Likewise. (symbol_cache_flush): Likewise. (maintenance_print_symbol_cache): Likewise. (maintenance_print_symbol_cache_statistics): Likewise. (delete_filename_seen_cache): Likewise. (output_partial_symbol_filename): Likewise. (search_symbols_file_matches): Likewise. (search_symbols_name_matches): Likewise. (do_free_completion_list): Likewise. (maybe_add_partial_symtab_filename): Likewise. (get_main_info): Likewise. (main_info_cleanup): Likewise. * target-dcache.c (target_dcache_cleanup): Likewise. (target_dcache_init_p): Likewise. (target_dcache_invalidate): Likewise. (target_dcache_get): Likewise. (target_dcache_get_or_init): Likewise. * target-descriptions.c (target_find_description): Likewise. (tdesc_find_type): Likewise. (tdesc_data_cleanup): Likewise. (tdesc_find_arch_register): Likewise. (tdesc_register_name): Likewise. (tdesc_register_type): Likewise. (tdesc_register_reggroup_p): Likewise. (set_tdesc_pseudo_register_name): Likewise. (set_tdesc_pseudo_register_type): Likewise. (set_tdesc_pseudo_register_reggroup_p): Likewise. (tdesc_use_registers): Likewise. (free_target_description): Likewise. * target-memory.c (compare_block_starting_address): Likewise. (cleanup_request_data): Likewise. (cleanup_write_requests_vector): Likewise. * target.c (open_target): Likewise. (cleanup_restore_target_terminal): Likewise. (free_memory_read_result_vector): Likewise. * thread.c (disable_thread_stack_temporaries): Likewise. (finish_thread_state_cleanup): Likewise. (do_restore_current_thread_cleanup): Likewise. (restore_current_thread_cleanup_dtor): Likewise. (set_thread_refcount): Likewise. (tp_array_compar): Likewise. (do_captured_thread_select): Likewise. * tic6x-tdep.c (tic6x_frame_unwind_cache): Likewise. (tic6x_stub_this_id): Likewise. * tilegx-tdep.c (tilegx_frame_cache): Likewise. * top.c (do_restore_instream_cleanup): Likewise. (gdb_readline_wrapper_cleanup): Likewise. (kill_or_detach): Likewise. (print_inferior_quit_action): Likewise. * tracefile-tfile.c (match_blocktype): Likewise. (build_traceframe_info): Likewise. * tracefile.c (trace_file_writer_xfree): Likewise. * tracepoint.c (memrange_cmp): Likewise. (do_collect_symbol): Likewise. (do_clear_collection_list): Likewise. (do_restore_current_traceframe_cleanup): Likewise. (restore_current_traceframe_cleanup_dtor): Likewise. (free_current_marker): Likewise. (traceframe_info_start_memory): Likewise. (traceframe_info_start_tvar): Likewise. (free_result): Likewise. * tramp-frame.c (tramp_frame_cache): Likewise. * tui/tui-file.c (tui_file_delete): Likewise. (tui_fileopen): Likewise. (tui_sfileopen): Likewise. (tui_file_isatty): Likewise. (tui_file_rewind): Likewise. (tui_file_put): Likewise. (tui_file_fputs): Likewise. (tui_file_get_strbuf): Likewise. (tui_file_adjust_strbuf): Likewise. (tui_file_flush): Likewise. * tui/tui-layout.c (make_command_window): Likewise. (make_data_window): Likewise. (show_source_disasm_command): Likewise. (show_data): Likewise. (make_source_or_disasm_window): Likewise. (show_source_or_disasm_and_command): Likewise. * tui/tui-out.c (tui_field_int): Likewise. (tui_field_string): Likewise. (tui_field_fmt): Likewise. (tui_text): Likewise. * typeprint.c (hash_typedef_field): Likewise. (eq_typedef_field): Likewise. (do_free_typedef_hash): Likewise. (copy_typedef_hash_element): Likewise. (do_free_global_table): Likewise. (find_global_typedef): Likewise. (find_typedef_in_hash): Likewise. * ui-file.c (ui_file_write_for_put): Likewise. (do_ui_file_xstrdup): Likewise. (mem_file_delete): Likewise. (mem_file_rewind): Likewise. (mem_file_put): Likewise. (mem_file_write): Likewise. (stdio_file_delete): Likewise. (stdio_file_flush): Likewise. (stdio_file_read): Likewise. (stdio_file_write): Likewise. (stdio_file_write_async_safe): Likewise. (stdio_file_fputs): Likewise. (stdio_file_isatty): Likewise. (stdio_file_fseek): Likewise. (tee_file_delete): Likewise. (tee_file_flush): Likewise. (tee_file_write): Likewise. (tee_file_fputs): Likewise. (tee_file_isatty): Likewise. * ui-out.c (do_cleanup_table_end): Likewise. (do_cleanup_end): Likewise. * user-regs.c (user_reg_add): Likewise. (user_reg_map_name_to_regnum): Likewise. (usernum_to_user_reg): Likewise. (maintenance_print_user_registers): Likewise. * utils.c (do_bfd_close_cleanup): Likewise. (do_fclose_cleanup): Likewise. (do_obstack_free): Likewise. (do_ui_file_delete): Likewise. (do_ui_out_redirect_pop): Likewise. (do_free_section_addr_info): Likewise. (restore_integer): Likewise. (do_unpush_target): Likewise. (do_htab_delete_cleanup): Likewise. (do_restore_ui_file): Likewise. (do_value_free): Likewise. (do_free_so): Likewise. (free_current_contents): Likewise. (do_regfree_cleanup): Likewise. (core_addr_hash): Likewise. (core_addr_eq): Likewise. (do_free_char_ptr_vec): Likewise. * v850-tdep.c (v850_frame_cache): Likewise. * varobj.c (do_free_variable_cleanup): Likewise. * vax-tdep.c (vax_supply_gregset): Likewise. (vax_frame_cache): Likewise. * vaxobsd-tdep.c (vaxobsd_sigtramp_frame_cache): Likewise. * xml-support.c (gdb_xml_body_text): Likewise. (gdb_xml_values_cleanup): Likewise. (gdb_xml_start_element): Likewise. (gdb_xml_start_element_wrapper): Likewise. (gdb_xml_end_element): Likewise. (gdb_xml_end_element_wrapper): Likewise. (gdb_xml_cleanup): Likewise. (gdb_xml_fetch_external_entity): Likewise. (gdb_xml_parse_attr_enum): Likewise. (xinclude_start_include): Likewise. (xinclude_end_include): Likewise. (xml_xinclude_default): Likewise. (xml_xinclude_start_doctype): Likewise. (xml_xinclude_end_doctype): Likewise. (xml_xinclude_cleanup): Likewise. (xml_fetch_content_from_file): Likewise. * xml-syscall.c (free_syscalls_info): Likewise. (syscall_start_syscall): Likewise. * xml-tdesc.c (tdesc_end_arch): Likewise. (tdesc_end_osabi): Likewise. (tdesc_end_compatible): Likewise. (tdesc_start_target): Likewise. (tdesc_start_feature): Likewise. (tdesc_start_reg): Likewise. (tdesc_start_union): Likewise. (tdesc_start_struct): Likewise. (tdesc_start_flags): Likewise. (tdesc_start_field): Likewise. (tdesc_start_vector): Likewise. (fetch_available_features_from_target): Likewise. * xstormy16-tdep.c (xstormy16_frame_cache): Likewise. * xtensa-tdep.c (xtensa_supply_gregset): Likewise. (xtensa_frame_cache): Likewise. (xtensa_frame_prev_register): Likewise. (xtensa_extract_return_value): Likewise.
2015-09-25Add casts to memory allocation related callsSimon Marchi
Most allocation functions (if not all) return a void* pointing to the allocated memory. In C++, we need to add an explicit cast when assigning the result to a pointer to another type (which is the case more often than not). The content of this patch is taken from Pedro's branch, from commit "(mostly) auto-generated patch to insert casts needed for C++". I validated that the changes make sense and manually reflowed the code to make it respect the coding style. I also found multiple places where I could use XNEW/XNEWVEC/XRESIZEVEC/etc. Thanks a lot to whoever did that automated script to insert casts, doing it completely by hand would have taken a ridiculous amount of time. Only files built on x86 with --enable-targets=all are modified. This means that all other -nat.c files are untouched and will have to be dealt with later by using appropiate compilers. Or maybe we can try to build them with a regular g++ just to know where to add casts, I don't know. I built-tested this with --enable-targets=all and reg-tested. Here's the changelog entry, which was not too bad to make despite the size, thanks to David Malcom's script. I fixed some bits by hand, but there might be some wrong parts left (hopefully not). gdb/ChangeLog: * aarch64-linux-tdep.c (aarch64_stap_parse_special_token): Add cast to allocation result assignment. * ada-exp.y (write_object_renaming): Likewise. (write_ambiguous_var): Likewise. (ada_nget_field_index): Likewise. (write_var_or_type): Likewise. * ada-lang.c (ada_decode_symbol): Likewise. (ada_value_assign): Likewise. (value_pointer): Likewise. (cache_symbol): Likewise. (add_nonlocal_symbols): Likewise. (ada_name_for_lookup): Likewise. (symbol_completion_add): Likewise. (ada_to_fixed_type_1): Likewise. (ada_get_next_arg): Likewise. (defns_collected): Likewise. * ada-lex.l (processId): Likewise. (processString): Likewise. * ada-tasks.c (read_known_tasks_array): Likewise. (read_known_tasks_list): Likewise. * ada-typeprint.c (decoded_type_name): Likewise. * addrmap.c (addrmap_mutable_create_fixed): Likewise. * amd64-tdep.c (amd64_push_arguments): Likewise. (amd64_displaced_step_copy_insn): Likewise. (amd64_classify_insn_at): Likewise. (amd64_relocate_instruction): Likewise. * amd64obsd-tdep.c (amd64obsd_sigtramp_p): Likewise. * arch-utils.c (simple_displaced_step_copy_insn): Likewise. (initialize_current_architecture): Likewise. * arm-linux-tdep.c (arm_stap_parse_special_token): Likewise. * arm-symbian-tdep.c (arm_symbian_osabi_sniffer): Likewise. * arm-tdep.c (arm_exidx_new_objfile): Likewise. (arm_push_dummy_call): Likewise. (extend_buffer_earlier): Likewise. (arm_adjust_breakpoint_address): Likewise. (arm_skip_stub): Likewise. * auto-load.c (filename_is_in_pattern): Likewise. (maybe_add_script_file): Likewise. (maybe_add_script_text): Likewise. (auto_load_objfile_script_1): Likewise. * auxv.c (ld_so_xfer_auxv): Likewise. * ax-general.c (new_agent_expr): Likewise. (grow_expr): Likewise. (ax_reg_mask): Likewise. * bcache.c (bcache_full): Likewise. * breakpoint.c (program_breakpoint_here_p): Likewise. * btrace.c (parse_xml_raw): Likewise. * build-id.c (build_id_to_debug_bfd): Likewise. * buildsym.c (end_symtab_with_blockvector): Likewise. * c-exp.y (string_exp): Likewise. (qualified_name): Likewise. (write_destructor_name): Likewise. (operator_stoken): Likewise. (parse_number): Likewise. (scan_macro_expansion): Likewise. (yylex): Likewise. (c_print_token): Likewise. * c-lang.c (c_get_string): Likewise. (emit_numeric_character): Likewise. * charset.c (wchar_iterate): Likewise. * cli/cli-cmds.c (complete_command): Likewise. (make_command): Likewise. * cli/cli-dump.c (restore_section_callback): Likewise. (restore_binary_file): Likewise. * cli/cli-interp.c (cli_interpreter_exec): Likewise. * cli/cli-script.c (execute_control_command): Likewise. * cli/cli-setshow.c (do_set_command): Likewise. * coff-pe-read.c (add_pe_forwarded_sym): Likewise. (read_pe_exported_syms): Likewise. * coffread.c (coff_read_struct_type): Likewise. (coff_read_enum_type): Likewise. * common/btrace-common.c (btrace_data_append): Likewise. * common/buffer.c (buffer_grow): Likewise. * common/filestuff.c (gdb_fopen_cloexec): Likewise. * common/format.c (parse_format_string): Likewise. * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append): Likewise. * common/xml-utils.c (xml_escape_text): Likewise. * compile/compile-object-load.c (copy_sections): Likewise. (compile_object_load): Likewise. * compile/compile-object-run.c (compile_object_run): Likewise. * completer.c (filename_completer): Likewise. * corefile.c (read_memory_typed_address): Likewise. (write_memory_unsigned_integer): Likewise. (write_memory_signed_integer): Likewise. (complete_set_gnutarget): Likewise. * corelow.c (get_core_register_section): Likewise. * cp-name-parser.y (d_grab): Likewise. (allocate_info): Likewise. (cp_new_demangle_parse_info): Likewise. * cp-namespace.c (cp_scan_for_anonymous_namespaces): Likewise. (cp_lookup_symbol_in_namespace): Likewise. (lookup_namespace_scope): Likewise. (find_symbol_in_baseclass): Likewise. (cp_lookup_nested_symbol): Likewise. (cp_lookup_transparent_type_loop): Likewise. * cp-support.c (copy_string_to_obstack): Likewise. (make_symbol_overload_list): Likewise. (make_symbol_overload_list_namespace): Likewise. (make_symbol_overload_list_adl_namespace): Likewise. (first_component_command): Likewise. * cp-valprint.c (cp_print_value): Likewise. * ctf.c (ctf_xfer_partial): Likewise. * d-exp.y (StringExp): Likewise. * d-namespace.c (d_lookup_symbol_in_module): Likewise. (lookup_module_scope): Likewise. (find_symbol_in_baseclass): Likewise. (d_lookup_nested_symbol): Likewise. * dbxread.c (find_stab_function_addr): Likewise. (read_dbx_symtab): Likewise. (dbx_end_psymtab): Likewise. (cp_set_block_scope): Likewise. * dcache.c (dcache_alloc): Likewise. * demangle.c (_initialize_demangler): Likewise. * dicos-tdep.c (dicos_load_module_p): Likewise. * dictionary.c (dict_create_hashed_expandable): Likewise. (dict_create_linear_expandable): Likewise. (expand_hashtable): Likewise. (add_symbol_linear_expandable): Likewise. * dwarf2-frame.c (add_cie): Likewise. (add_fde): Likewise. (dwarf2_build_frame_info): Likewise. * dwarf2expr.c (dwarf_expr_grow_stack): Likewise. (dwarf_expr_fetch_address): Likewise. (add_piece): Likewise. (execute_stack_op): Likewise. * dwarf2loc.c (chain_candidate): Likewise. (dwarf_entry_parameter_to_value): Likewise. (read_pieced_value): Likewise. (write_pieced_value): Likewise. * dwarf2read.c (dwarf2_read_section): Likewise. (add_type_unit): Likewise. (read_comp_units_from_section): Likewise. (fixup_go_packaging): Likewise. (dwarf2_compute_name): Likewise. (dwarf2_physname): Likewise. (create_dwo_unit_in_dwp_v1): Likewise. (create_dwo_unit_in_dwp_v2): Likewise. (read_func_scope): Likewise. (read_call_site_scope): Likewise. (dwarf2_attach_fields_to_type): Likewise. (process_structure_scope): Likewise. (mark_common_block_symbol_computed): Likewise. (read_common_block): Likewise. (abbrev_table_read_table): Likewise. (guess_partial_die_structure_name): Likewise. (fixup_partial_die): Likewise. (add_file_name): Likewise. (dwarf2_const_value_data): Likewise. (dwarf2_const_value_attr): Likewise. (build_error_marker_type): Likewise. (guess_full_die_structure_name): Likewise. (anonymous_struct_prefix): Likewise. (typename_concat): Likewise. (dwarf2_canonicalize_name): Likewise. (dwarf2_name): Likewise. (write_constant_as_bytes): Likewise. (dwarf2_fetch_constant_bytes): Likewise. (copy_string): Likewise. (parse_macro_definition): Likewise. * elfread.c (elf_symfile_segments): Likewise. (elf_rel_plt_read): Likewise. (elf_gnu_ifunc_resolve_by_cache): Likewise. (elf_gnu_ifunc_resolve_by_got): Likewise. (elf_read_minimal_symbols): Likewise. (elf_gnu_ifunc_record_cache): Likewise. * event-top.c (top_level_prompt): Likewise. (command_line_handler): Likewise. * exec.c (resize_section_table): Likewise. * expprint.c (print_subexp_standard): Likewise. * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise. * findcmd.c (parse_find_args): Likewise. * findvar.c (address_from_register): Likewise. * frame.c (get_prev_frame_always): Likewise. * gdb_bfd.c (gdb_bfd_ref): Likewise. (get_section_descriptor): Likewise. * gdb_obstack.c (obconcat): Likewise. (obstack_strdup): Likewise. * gdbtypes.c (lookup_function_type_with_arguments): Likewise. (create_set_type): Likewise. (lookup_unsigned_typename): Likewise. (lookup_signed_typename): Likewise. (resolve_dynamic_union): Likewise. (resolve_dynamic_struct): Likewise. (add_dyn_prop): Likewise. (copy_dynamic_prop_list): Likewise. (arch_flags_type): Likewise. (append_composite_type_field_raw): Likewise. * gdbtypes.h (INIT_FUNC_SPECIFIC): Likewise. * gnu-v3-abi.c (gnuv3_rtti_type): Likewise. * go-exp.y (string_exp): Likewise. * go-lang.c (go_demangle): Likewise. * guile/guile.c (compute_scheme_string): Likewise. * guile/scm-cmd.c (gdbscm_parse_command_name): Likewise. (gdbscm_canonicalize_command_name): Likewise. * guile/scm-ports.c (ioscm_init_stdio_buffers): Likewise. (ioscm_init_memory_port): Likewise. (ioscm_reinit_memory_port): Likewise. * guile/scm-utils.c (gdbscm_gc_xstrdup): Likewise. (gdbscm_gc_dup_argv): Likewise. * h8300-tdep.c (h8300_push_dummy_call): Likewise. * hppa-tdep.c (internalize_unwinds): Likewise. (read_unwind_info): Likewise. * i386-cygwin-tdep.c (core_process_module_section): Likewise. (windows_core_xfer_shared_libraries): Likewise. * i386-tdep.c (i386_displaced_step_copy_insn): Likewise. (i386_stap_parse_special_token_triplet): Likewise. (i386_stap_parse_special_token_three_arg_disp): Likewise. * i386obsd-tdep.c (i386obsd_sigtramp_p): Likewise. * inf-child.c (inf_child_fileio_readlink): Likewise. * inf-ptrace.c (inf_ptrace_fetch_register): Likewise. (inf_ptrace_store_register): Likewise. * infrun.c (follow_exec): Likewise. (displaced_step_prepare_throw): Likewise. (save_stop_context): Likewise. (save_infcall_suspend_state): Likewise. * jit.c (jit_read_descriptor): Likewise. (jit_read_code_entry): Likewise. (jit_symtab_line_mapping_add_impl): Likewise. (finalize_symtab): Likewise. (jit_unwind_reg_get_impl): Likewise. * jv-exp.y (QualifiedName): Likewise. * jv-lang.c (get_java_utf8_name): Likewise. (type_from_class): Likewise. (java_demangle_type_signature): Likewise. (java_class_name_from_physname): Likewise. * jv-typeprint.c (java_type_print_base): Likewise. * jv-valprint.c (java_value_print): Likewise. * language.c (add_language): Likewise. * linespec.c (add_sal_to_sals_basic): Likewise. (add_sal_to_sals): Likewise. (decode_objc): Likewise. (find_linespec_symbols): Likewise. * linux-fork.c (fork_save_infrun_state): Likewise. * linux-nat.c (linux_nat_detach): Likewise. (linux_nat_fileio_readlink): Likewise. * linux-record.c (record_linux_sockaddr): Likewise. (record_linux_msghdr): Likewise. (Do): Likewise. * linux-tdep.c (linux_core_info_proc_mappings): Likewise. (linux_collect_regset_section_cb): Likewise. (linux_get_siginfo_data): Likewise. * linux-thread-db.c (try_thread_db_load_from_pdir_1): Likewise. (try_thread_db_load_from_dir): Likewise. (thread_db_load_search): Likewise. (info_auto_load_libthread_db): Likewise. * m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise. (m32c_m16c_pointer_to_address): Likewise. * m68hc11-tdep.c (m68hc11_pseudo_register_write): Likewise. * m68k-tdep.c (m68k_get_longjmp_target): Likewise. * machoread.c (macho_check_dsym): Likewise. * macroexp.c (resize_buffer): Likewise. (gather_arguments): Likewise. (maybe_expand): Likewise. * macrotab.c (new_macro_key): Likewise. (new_source_file): Likewise. (new_macro_definition): Likewise. * mdebugread.c (parse_symbol): Likewise. (parse_type): Likewise. (parse_partial_symbols): Likewise. (psymtab_to_symtab_1): Likewise. * mem-break.c (default_memory_insert_breakpoint): Likewise. * mi/mi-cmd-break.c (mi_argv_to_format): Likewise. * mi/mi-main.c (mi_cmd_data_read_memory): Likewise. (mi_cmd_data_read_memory_bytes): Likewise. (mi_cmd_data_write_memory_bytes): Likewise. (mi_cmd_trace_frame_collected): Likewise. * mi/mi-parse.c (mi_parse_argv): Likewise. (mi_parse): Likewise. * minidebug.c (lzma_open): Likewise. (lzma_pread): Likewise. * mips-tdep.c (mips_read_fp_register_single): Likewise. (mips_print_fp_register): Likewise. * mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Likewise. * mipsread.c (read_alphacoff_dynamic_symtab): Likewise. * mt-tdep.c (mt_register_name): Likewise. (mt_registers_info): Likewise. (mt_push_dummy_call): Likewise. * namespace.c (add_using_directive): Likewise. * nat/linux-btrace.c (perf_event_read): Likewise. (linux_enable_bts): Likewise. * nat/linux-osdata.c (linux_common_core_of_thread): Likewise. * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Likewise. * nto-tdep.c (nto_find_and_open_solib): Likewise. (nto_parse_redirection): Likewise. * objc-lang.c (objc_demangle): Likewise. (find_methods): Likewise. * objfiles.c (get_objfile_bfd_data): Likewise. (set_objfile_main_name): Likewise. (allocate_objfile): Likewise. (objfile_relocate): Likewise. (update_section_map): Likewise. * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Likewise. * p-exp.y (exp): Likewise. (yylex): Likewise. * p-valprint.c (pascal_object_print_value): Likewise. * parse.c (initialize_expout): Likewise. (mark_completion_tag): Likewise. (copy_name): Likewise. (parse_float): Likewise. (type_stack_reserve): Likewise. * ppc-linux-tdep.c (ppc_stap_parse_special_token): Likewise. (ppu2spu_prev_register): Likewise. * ppc-ravenscar-thread.c (supply_register_at_address): Likewise. * printcmd.c (printf_wide_c_string): Likewise. (printf_pointer): Likewise. * probe.c (parse_probes): Likewise. * python/py-cmd.c (gdbpy_parse_command_name): Likewise. (cmdpy_init): Likewise. * python/py-gdb-readline.c (gdbpy_readline_wrapper): Likewise. * python/py-symtab.c (set_sal): Likewise. * python/py-unwind.c (pyuw_sniffer): Likewise. * python/python.c (python_interactive_command): Likewise. (compute_python_string): Likewise. * ravenscar-thread.c (get_running_thread_id): Likewise. * record-full.c (record_full_exec_insn): Likewise. (record_full_core_open_1): Likewise. * regcache.c (regcache_raw_read_signed): Likewise. (regcache_raw_read_unsigned): Likewise. (regcache_cooked_read_signed): Likewise. (regcache_cooked_read_unsigned): Likewise. * remote-fileio.c (remote_fileio_func_open): Likewise. (remote_fileio_func_rename): Likewise. (remote_fileio_func_unlink): Likewise. (remote_fileio_func_stat): Likewise. (remote_fileio_func_system): Likewise. * remote-mips.c (mips_xfer_memory): Likewise. (mips_load_srec): Likewise. (pmon_end_download): Likewise. * remote.c (new_remote_state): Likewise. (map_regcache_remote_table): Likewise. (remote_register_number_and_offset): Likewise. (init_remote_state): Likewise. (get_memory_packet_size): Likewise. (remote_pass_signals): Likewise. (remote_program_signals): Likewise. (remote_start_remote): Likewise. (remote_check_symbols): Likewise. (remote_query_supported): Likewise. (extended_remote_attach): Likewise. (process_g_packet): Likewise. (store_registers_using_G): Likewise. (putpkt_binary): Likewise. (read_frame): Likewise. (compare_sections_command): Likewise. (remote_hostio_pread): Likewise. (remote_hostio_readlink): Likewise. (remote_file_put): Likewise. (remote_file_get): Likewise. (remote_pid_to_exec_file): Likewise. (_initialize_remote): Likewise. * rs6000-aix-tdep.c (rs6000_aix_ld_info_to_xml): Likewise. (rs6000_aix_core_xfer_shared_libraries_aix): Likewise. * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise. (bfd_uses_spe_extensions): Likewise. * s390-linux-tdep.c (s390_displaced_step_copy_insn): Likewise. * score-tdep.c (score7_malloc_and_get_memblock): Likewise. * solib-dsbt.c (decode_loadmap): Likewise. (fetch_loadmap): Likewise. (scan_dyntag): Likewise. (enable_break): Likewise. (dsbt_relocate_main_executable): Likewise. * solib-frv.c (fetch_loadmap): Likewise. (enable_break2): Likewise. (frv_relocate_main_executable): Likewise. * solib-spu.c (spu_relocate_main_executable): Likewise. (spu_bfd_open): Likewise. * solib-svr4.c (lm_info_read): Likewise. (read_program_header): Likewise. (find_program_interpreter): Likewise. (scan_dyntag): Likewise. (elf_locate_base): Likewise. (open_symbol_file_object): Likewise. (read_program_headers_from_bfd): Likewise. (svr4_relocate_main_executable): Likewise. * solib-target.c (solib_target_relocate_section_addresses): Likewise. * solib.c (solib_find_1): Likewise. (exec_file_find): Likewise. (solib_find): Likewise. * source.c (openp): Likewise. (print_source_lines_base): Likewise. (forward_search_command): Likewise. * sparc-ravenscar-thread.c (supply_register_at_address): Likewise. * spu-tdep.c (spu2ppu_prev_register): Likewise. (spu_get_overlay_table): Likewise. * stabsread.c (patch_block_stabs): Likewise. (define_symbol): Likewise. (again:): Likewise. (read_member_functions): Likewise. (read_one_struct_field): Likewise. (read_enum_type): Likewise. (common_block_start): Likewise. * stack.c (read_frame_arg): Likewise. (backtrace_command): Likewise. * stap-probe.c (stap_parse_register_operand): Likewise. * symfile.c (syms_from_objfile_1): Likewise. (find_separate_debug_file): Likewise. (load_command): Likewise. (load_progress): Likewise. (load_section_callback): Likewise. (reread_symbols): Likewise. (add_filename_language): Likewise. (allocate_compunit_symtab): Likewise. (read_target_long_array): Likewise. (simple_read_overlay_table): Likewise. * symtab.c (symbol_set_names): Likewise. (resize_symbol_cache): Likewise. (rbreak_command): Likewise. (completion_list_add_name): Likewise. (completion_list_objc_symbol): Likewise. (add_filename_to_list): Likewise. * target-descriptions.c (maint_print_c_tdesc_cmd): Likewise. * target-memory.c (target_write_memory_blocks): Likewise. * target.c (target_read_string): Likewise. (read_whatever_is_readable): Likewise. (target_read_alloc_1): Likewise. (simple_search_memory): Likewise. (target_fileio_read_alloc_1): Likewise. * tilegx-tdep.c (tilegx_push_dummy_call): Likewise. * top.c (command_line_input): Likewise. * tracefile-tfile.c (tfile_fetch_registers): Likewise. * tracefile.c (tracefile_fetch_registers): Likewise. * tracepoint.c (add_memrange): Likewise. (init_collection_list): Likewise. (add_aexpr): Likewise. (trace_dump_actions): Likewise. (parse_trace_status): Likewise. (parse_tracepoint_definition): Likewise. (parse_tsv_definition): Likewise. (parse_static_tracepoint_marker_definition): Likewise. * tui/tui-file.c (tui_sfileopen): Likewise. (tui_file_adjust_strbuf): Likewise. * tui/tui-io.c (tui_expand_tabs): Likewise. * tui/tui-source.c (tui_set_source_content): Likewise. * typeprint.c (find_global_typedef): Likewise. * ui-file.c (do_ui_file_xstrdup): Likewise. (ui_file_obsavestring): Likewise. (mem_file_write): Likewise. * utils.c (make_hex_string): Likewise. (get_regcomp_error): Likewise. (puts_filtered_tabular): Likewise. (gdb_realpath_keepfile): Likewise. (ldirname): Likewise. (gdb_bfd_errmsg): Likewise. (substitute_path_component): Likewise. * valops.c (search_struct_method): Likewise. (find_oload_champ_namespace_loop): Likewise. * valprint.c (print_decimal_chars): Likewise. (read_string): Likewise. (generic_emit_char): Likewise. * varobj.c (varobj_delete): Likewise. (varobj_value_get_print_value): Likewise. * vaxobsd-tdep.c (vaxobsd_sigtramp_sniffer): Likewise. * windows-tdep.c (display_one_tib): Likewise. * xcoffread.c (read_xcoff_symtab): Likewise. (process_xcoff_symbol): Likewise. (swap_sym): Likewise. (scan_xcoff_symtab): Likewise. (xcoff_initial_scan): Likewise. * xml-support.c (gdb_xml_end_element): Likewise. (xml_process_xincludes): Likewise. (xml_fetch_content_from_file): Likewise. * xml-syscall.c (xml_list_of_syscalls): Likewise. * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise. gdb/gdbserver/ChangeLog: * ax.c (gdb_parse_agent_expr): Add cast to allocation result assignment. (gdb_unparse_agent_expr): Likewise. * hostio.c (require_data): Likewise. (handle_pread): Likewise. * linux-low.c (disable_regset): Likewise. (fetch_register): Likewise. (store_register): Likewise. (get_dynamic): Likewise. (linux_qxfer_libraries_svr4): Likewise. * mem-break.c (delete_fast_tracepoint_jump): Likewise. (set_fast_tracepoint_jump): Likewise. (uninsert_fast_tracepoint_jumps_at): Likewise. (reinsert_fast_tracepoint_jumps_at): Likewise. (validate_inserted_breakpoint): Likewise. (clone_agent_expr): Likewise. * regcache.c (init_register_cache): Likewise. * remote-utils.c (putpkt_binary_1): Likewise. (decode_M_packet): Likewise. (decode_X_packet): Likewise. (look_up_one_symbol): Likewise. (relocate_instruction): Likewise. (monitor_output): Likewise. * server.c (handle_search_memory): Likewise. (handle_qxfer_exec_file): Likewise. (handle_qxfer_libraries): Likewise. (handle_qxfer): Likewise. (handle_query): Likewise. (handle_v_cont): Likewise. (handle_v_run): Likewise. (captured_main): Likewise. * target.c (write_inferior_memory): Likewise. * thread-db.c (try_thread_db_load_from_dir): Likewise. * tracepoint.c (init_trace_buffer): Likewise. (add_tracepoint_action): Likewise. (add_traceframe): Likewise. (add_traceframe_block): Likewise. (cmd_qtdpsrc): Likewise. (cmd_qtdv): Likewise. (cmd_qtstatus): Likewise. (response_source): Likewise. (response_tsv): Likewise. (cmd_qtnotes): Likewise. (gdb_collect): Likewise. (initialize_tracepoint): Likewise.
2015-08-02Complete the previous commit (block_found refactoring)Pierre-Marie de Rodat
The previous commit (Replace the block_found global with explicit data-flow) lacks updates in a couple of files because it was not tested building GDB with --enable-targets=all... but buildbots did. This adds the appropriate simple updates to fix the build. gdb/ChangeLog: * alpha-mdebug-tdep.c (find_proc_desc): Update call to lookup_symbol. * ft32-tdep.c (ft32_skip_prologue): Likewise. * moxie-tdep.c (moxie_skip_prologue): Likewise. * mt-tdep.c (mt_skip_prologue): Likewise. * xstormy16-tdep.c (xstormy16_skip_prologue): Likewise.
2015-05-26Rename in_function_epilogue_p to stack_frame_destroyed_pMartin Galvan
We concluded that gdbarch_in_function_epilogue_p is misnamed, since it returns true if the given PC is one instruction after the one that destroyed the stack (which isn't necessarily inside an epilogue), therefore it should be renamed to stack_frame_destroyed_p. I also took the liberty of renaming the arch-specific implementations to *_stack_frame_destroyed_p as well for consistency. gdb: 2015-05-26 Martin Galvan <martin.galvan@tallertechnologies.com> * amd64-tdep.c: Replace in_function_epilogue_p with stack_frame_destroyed_p throughout. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * arm-tdep.c: Ditto. * breakpoint.c: Ditto. * gdbarch.sh: Ditto. * hppa-tdep.c: Ditto. * i386-tdep.c: Ditto. * mips-tdep.c: Ditto. * nios2-tdep.c: Ditto. * rs6000-tdep.c: Ditto. * s390-linux-tdep.c: Ditto. * score-tdep.c: Ditto. * sh-tdep.c: Ditto. * sparc-tdep.c: Ditto. * sparc-tdep.h: Ditto. * sparc64-tdep.c: Ditto. * spu-tdep.c: Ditto. * tic6x-tdep.c: Ditto. * tilegx-tdep.c: Ditto. * xstormy16-tdep.c: Ditto. * gdbarch.c, gdbarch.h: Re-generated.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-10-09PR tdep/9390: Fix typo on xstorxstormy16-tdep.cSergio Durigan Junior
This patch fixes the bug described in PR tdep/9390, which is about a wrong check in the following code: ... /* optional copying of args in r2-r7 to r10-r13. */ /* Probably only in optimized case but legal action for prologue. */ else if ((inst & 0xff00) == 0x4600 /* 46SD mov rD, rS */ && (inst & 0x00f0) >= 0x0020 && (inst & 0x00f0) <= 0x0070 && (inst & 0x000f) >= 0x00a0 && (inst & 0x000f) <= 0x000d) ^^^^^^^^^^^^^^^^^^^^^^^^^ ... This condition will never trigger, and the fix proposed in the bug (which made sense to me) was to test against 0x000a. I tried finding documentation about this target, but couldn't find anything. I don't even know if it is still used, but decided to submit the fix anyway. Tested on my x86_64 Fedora 20 GNU/Linux. gdb/ChangeLog: 2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com> PR tdep/9390 * xstorxstormy16-tdep.c (xstormy16_analyze_prologue): Fix possible typo when using logical AND to determine instruction type.
2014-08-07Include string.h in common-defs.hGary Benson
This commit includes string.h in common-defs.h and removes all other inclusions. gdb/ 2014-08-07 Gary Benson <gbenson@redhat.com> * common/common-defs.h: Include string.h. * aarch64-tdep.c: Do not include string.h. * ada-exp.y: Likewise. * ada-lang.c: Likewise. * ada-lex.l: Likewise. * ada-typeprint.c: Likewise. * ada-valprint.c: Likewise. * aix-thread.c: Likewise. * alpha-linux-tdep.c: Likewise. * alpha-mdebug-tdep.c: Likewise. * alpha-nat.c: Likewise. * alpha-osf1-tdep.c: Likewise. * alpha-tdep.c: Likewise. * alphanbsd-tdep.c: Likewise. * amd64-dicos-tdep.c: Likewise. * amd64-linux-tdep.c: Likewise. * amd64-nat.c: Likewise. * amd64-sol2-tdep.c: Likewise. * amd64fbsd-tdep.c: Likewise. * amd64obsd-tdep.c: Likewise. * arch-utils.c: Likewise. * arm-linux-nat.c: Likewise. * arm-linux-tdep.c: Likewise. * arm-tdep.c: Likewise. * arm-wince-tdep.c: Likewise. * armbsd-tdep.c: Likewise. * armnbsd-nat.c: Likewise. * armnbsd-tdep.c: Likewise. * armobsd-tdep.c: Likewise. * avr-tdep.c: Likewise. * ax-gdb.c: Likewise. * ax-general.c: Likewise. * bcache.c: Likewise. * bfin-tdep.c: Likewise. * breakpoint.c: Likewise. * build-id.c: Likewise. * buildsym.c: Likewise. * c-exp.y: Likewise. * c-lang.c: Likewise. * c-typeprint.c: Likewise. * c-valprint.c: Likewise. * charset.c: Likewise. * cli-out.c: Likewise. * cli/cli-cmds.c: Likewise. * cli/cli-decode.c: Likewise. * cli/cli-dump.c: Likewise. * cli/cli-interp.c: Likewise. * cli/cli-logging.c: Likewise. * cli/cli-script.c: Likewise. * cli/cli-setshow.c: Likewise. * cli/cli-utils.c: Likewise. * coffread.c: Likewise. * common/agent.c: Likewise. * common/buffer.c: Likewise. * common/buffer.h: Likewise. * common/common-utils.c: Likewise. * common/filestuff.c: Likewise. * common/filestuff.c: Likewise. * common/format.c: Likewise. * common/print-utils.c: Likewise. * common/rsp-low.c: Likewise. * common/signals.c: Likewise. * common/vec.h: Likewise. * common/xml-utils.c: Likewise. * core-regset.c: Likewise. * corefile.c: Likewise. * corelow.c: Likewise. * cp-abi.c: Likewise. * cp-name-parser.y: Likewise. * cp-support.c: Likewise. * cp-valprint.c: Likewise. * cris-tdep.c: Likewise. * d-exp.y: Likewise. * darwin-nat.c: Likewise. * dbxread.c: Likewise. * dcache.c: Likewise. * demangle.c: Likewise. * dicos-tdep.c: Likewise. * disasm.c: Likewise. * doublest.c: Likewise. * dsrec.c: Likewise. * dummy-frame.c: Likewise. * dwarf2-frame.c: Likewise. * dwarf2loc.c: Likewise. * dwarf2read.c: Likewise. * elfread.c: Likewise. * environ.c: Likewise. * eval.c: Likewise. * event-loop.c: Likewise. * exceptions.c: Likewise. * exec.c: Likewise. * expprint.c: Likewise. * f-exp.y: Likewise. * f-lang.c: Likewise. * f-typeprint.c: Likewise. * f-valprint.c: Likewise. * fbsd-nat.c: Likewise. * findcmd.c: Likewise. * findvar.c: Likewise. * fork-child.c: Likewise. * frame.c: Likewise. * frv-linux-tdep.c: Likewise. * frv-tdep.c: Likewise. * gdb.c: Likewise. * gdb_bfd.c: Likewise. * gdbarch.c: Likewise. * gdbarch.sh: Likewise. * gdbtypes.c: Likewise. * gnu-nat.c: Likewise. * gnu-v2-abi.c: Likewise. * gnu-v3-abi.c: Likewise. * go-exp.y: Likewise. * go-lang.c: Likewise. * go32-nat.c: Likewise. * guile/guile.c: Likewise. * guile/scm-auto-load.c: Likewise. * hppa-hpux-tdep.c: Likewise. * hppa-linux-nat.c: Likewise. * hppanbsd-tdep.c: Likewise. * hppaobsd-tdep.c: Likewise. * i386-cygwin-tdep.c: Likewise. * i386-dicos-tdep.c: Likewise. * i386-linux-tdep.c: Likewise. * i386-nto-tdep.c: Likewise. * i386-sol2-tdep.c: Likewise. * i386-tdep.c: Likewise. * i386bsd-tdep.c: Likewise. * i386gnu-nat.c: Likewise. * i386nbsd-tdep.c: Likewise. * i386obsd-tdep.c: Likewise. * i387-tdep.c: Likewise. * ia64-libunwind-tdep.c: Likewise. * ia64-linux-nat.c: Likewise. * inf-child.c: Likewise. * inf-ptrace.c: Likewise. * inf-ttrace.c: Likewise. * infcall.c: Likewise. * infcmd.c: Likewise. * inflow.c: Likewise. * infrun.c: Likewise. * interps.c: Likewise. * iq2000-tdep.c: Likewise. * irix5-nat.c: Likewise. * jv-exp.y: Likewise. * jv-lang.c: Likewise. * jv-typeprint.c: Likewise. * jv-valprint.c: Likewise. * language.c: Likewise. * linux-fork.c: Likewise. * linux-nat.c: Likewise. * lm32-tdep.c: Likewise. * m2-exp.y: Likewise. * m2-typeprint.c: Likewise. * m32c-tdep.c: Likewise. * m32r-linux-nat.c: Likewise. * m32r-linux-tdep.c: Likewise. * m32r-rom.c: Likewise. * m32r-tdep.c: Likewise. * m68hc11-tdep.c: Likewise. * m68k-tdep.c: Likewise. * m68kbsd-tdep.c: Likewise. * m68klinux-nat.c: Likewise. * m68klinux-tdep.c: Likewise. * m88k-tdep.c: Likewise. * machoread.c: Likewise. * macrocmd.c: Likewise. * main.c: Likewise. * mdebugread.c: Likewise. * mem-break.c: Likewise. * memattr.c: Likewise. * memory-map.c: Likewise. * mep-tdep.c: Likewise. * mi/mi-cmd-break.c: Likewise. * mi/mi-cmd-disas.c: Likewise. * mi/mi-cmd-env.c: Likewise. * mi/mi-cmd-stack.c: Likewise. * mi/mi-cmd-var.c: Likewise. * mi/mi-cmds.c: Likewise. * mi/mi-console.c: Likewise. * mi/mi-getopt.c: Likewise. * mi/mi-interp.c: Likewise. * mi/mi-main.c: Likewise. * mi/mi-parse.c: Likewise. * microblaze-rom.c: Likewise. * microblaze-tdep.c: Likewise. * mingw-hdep.c: Likewise. * minidebug.c: Likewise. * minsyms.c: Likewise. * mips-irix-tdep.c: Likewise. * mips-linux-tdep.c: Likewise. * mips-tdep.c: Likewise. * mips64obsd-tdep.c: Likewise. * mipsnbsd-tdep.c: Likewise. * mipsread.c: Likewise. * mn10300-linux-tdep.c: Likewise. * mn10300-tdep.c: Likewise. * monitor.c: Likewise. * moxie-tdep.c: Likewise. * mt-tdep.c: Likewise. * nat/linux-btrace.c: Likewise. * nat/linux-osdata.c: Likewise. * nat/linux-procfs.c: Likewise. * nat/linux-ptrace.c: Likewise. * nat/linux-waitpid.c: Likewise. * nbsd-tdep.c: Likewise. * nios2-linux-tdep.c: Likewise. * nto-procfs.c: Likewise. * nto-tdep.c: Likewise. * objc-lang.c: Likewise. * objfiles.c: Likewise. * opencl-lang.c: Likewise. * osabi.c: Likewise. * osdata.c: Likewise. * p-exp.y: Likewise. * p-lang.c: Likewise. * p-typeprint.c: Likewise. * parse.c: Likewise. * posix-hdep.c: Likewise. * ppc-linux-nat.c: Likewise. * ppc-sysv-tdep.c: Likewise. * ppcfbsd-tdep.c: Likewise. * ppcnbsd-tdep.c: Likewise. * ppcobsd-tdep.c: Likewise. * printcmd.c: Likewise. * procfs.c: Likewise. * prologue-value.c: Likewise. * python/py-auto-load.c: Likewise. * python/py-gdb-readline.c: Likewise. * ravenscar-thread.c: Likewise. * regcache.c: Likewise. * registry.c: Likewise. * remote-fileio.c: Likewise. * remote-m32r-sdi.c: Likewise. * remote-mips.c: Likewise. * remote-notif.c: Likewise. * remote-sim.c: Likewise. * remote.c: Likewise. * reverse.c: Likewise. * rs6000-aix-tdep.c: Likewise. * ser-base.c: Likewise. * ser-go32.c: Likewise. * ser-mingw.c: Likewise. * ser-pipe.c: Likewise. * ser-tcp.c: Likewise. * ser-unix.c: Likewise. * serial.c: Likewise. * sh-tdep.c: Likewise. * sh64-tdep.c: Likewise. * shnbsd-tdep.c: Likewise. * skip.c: Likewise. * sol-thread.c: Likewise. * solib-dsbt.c: Likewise. * solib-frv.c: Likewise. * solib-osf.c: Likewise. * solib-som.c: Likewise. * solib-spu.c: Likewise. * solib-target.c: Likewise. * solib.c: Likewise. * somread.c: Likewise. * source.c: Likewise. * sparc-nat.c: Likewise. * sparc-sol2-tdep.c: Likewise. * sparc-tdep.c: Likewise. * sparc64-tdep.c: Likewise. * sparc64fbsd-tdep.c: Likewise. * sparc64nbsd-tdep.c: Likewise. * sparcnbsd-tdep.c: Likewise. * spu-linux-nat.c: Likewise. * spu-multiarch.c: Likewise. * spu-tdep.c: Likewise. * stabsread.c: Likewise. * stack.c: Likewise. * std-regs.c: Likewise. * symfile.c: Likewise. * symmisc.c: Likewise. * symtab.c: Likewise. * target.c: Likewise. * thread.c: Likewise. * tilegx-linux-nat.c: Likewise. * tilegx-tdep.c: Likewise. * top.c: Likewise. * tracepoint.c: Likewise. * tui/tui-command.c: Likewise. * tui/tui-data.c: Likewise. * tui/tui-disasm.c: Likewise. * tui/tui-file.c: Likewise. * tui/tui-layout.c: Likewise. * tui/tui-out.c: Likewise. * tui/tui-regs.c: Likewise. * tui/tui-source.c: Likewise. * tui/tui-stack.c: Likewise. * tui/tui-win.c: Likewise. * tui/tui-windata.c: Likewise. * tui/tui-winsource.c: Likewise. * typeprint.c: Likewise. * ui-file.c: Likewise. * ui-out.c: Likewise. * user-regs.c: Likewise. * utils.c: Likewise. * v850-tdep.c: Likewise. * valarith.c: Likewise. * valops.c: Likewise. * valprint.c: Likewise. * value.c: Likewise. * varobj.c: Likewise. * vax-tdep.c: Likewise. * vaxnbsd-tdep.c: Likewise. * vaxobsd-tdep.c: Likewise. * windows-nat.c: Likewise. * xcoffread.c: Likewise. * xml-support.c: Likewise. * xstormy16-tdep.c: Likewise. * xtensa-linux-nat.c: Likewise. gdb/gdbserver/ 2014-08-07 Gary Benson <gbenson@redhat.com> * server.h: Do not include string.h. * event-loop.c: Likewise. * linux-low.c: Likewise. * regcache.c: Likewise. * remote-utils.c: Likewise. * spu-low.c: Likewise. * utils.c: Likewise.
2014-08-07Include gdb_assert.h in common-defs.hGary Benson
This commit includes gdb_assert.h in common-defs.h and removes all other inclusions. gdb/ 2014-08-07 Gary Benson <gbenson@redhat.com> * common/common-defs.h: Include gdb_assert.h. * aarch64-tdep.c: Do not include gdb_assert.h. * addrmap.c: Likewise. * aix-thread.c: Likewise. * alpha-linux-tdep.c: Likewise. * alpha-mdebug-tdep.c: Likewise. * alphanbsd-tdep.c: Likewise. * amd64-nat.c: Likewise. * amd64-tdep.c: Likewise. * amd64bsd-nat.c: Likewise. * amd64fbsd-nat.c: Likewise. * amd64fbsd-tdep.c: Likewise. * amd64nbsd-nat.c: Likewise. * amd64nbsd-tdep.c: Likewise. * amd64obsd-nat.c: Likewise. * amd64obsd-tdep.c: Likewise. * arch-utils.c: Likewise. * arm-tdep.c: Likewise. * armbsd-tdep.c: Likewise. * auxv.c: Likewise. * bcache.c: Likewise. * bfin-tdep.c: Likewise. * blockframe.c: Likewise. * breakpoint.c: Likewise. * bsd-kvm.c: Likewise. * bsd-uthread.c: Likewise. * buildsym.c: Likewise. * c-exp.y: Likewise. * c-lang.c: Likewise. * charset.c: Likewise. * cleanups.c: Likewise. * cli-out.c: Likewise. * cli/cli-decode.c: Likewise. * cli/cli-dump.c: Likewise. * cli/cli-logging.c: Likewise. * cli/cli-script.c: Likewise. * cli/cli-utils.c: Likewise. * coffread.c: Likewise. * common/common-utils.c: Likewise. * common/queue.h: Likewise. * common/signals.c: Likewise. * common/vec.h: Likewise. * complaints.c: Likewise. * completer.c: Likewise. * corelow.c: Likewise. * cp-abi.c: Likewise. * cp-name-parser.y: Likewise. * cp-namespace.c: Likewise. * cp-support.c: Likewise. * cris-tdep.c: Likewise. * dbxread.c: Likewise. * dictionary.c: Likewise. * doublest.c: Likewise. * dsrec.c: Likewise. * dummy-frame.c: Likewise. * dwarf2-frame-tailcall.c: Likewise. * dwarf2-frame.c: Likewise. * dwarf2expr.c: Likewise. * dwarf2loc.c: Likewise. * dwarf2read.c: Likewise. * eval.c: Likewise. * event-loop.c: Likewise. * exceptions.c: Likewise. * expprint.c: Likewise. * f-valprint.c: Likewise. * fbsd-nat.c: Likewise. * findvar.c: Likewise. * frame-unwind.c: Likewise. * frame.c: Likewise. * frv-tdep.c: Likewise. * gcore.c: Likewise. * gdb-dlfcn.c: Likewise. * gdb_bfd.c: Likewise. * gdbarch.c: Likewise. * gdbarch.sh: Likewise. * gdbtypes.c: Likewise. * gnu-nat.c: Likewise. * gnu-v3-abi.c: Likewise. * go-lang.c: Likewise. * guile/scm-exception.c: Likewise. * guile/scm-gsmob.c: Likewise. * guile/scm-lazy-string.c: Likewise. * guile/scm-math.c: Likewise. * guile/scm-pretty-print.c: Likewise. * guile/scm-safe-call.c: Likewise. * guile/scm-utils.c: Likewise. * guile/scm-value.c: Likewise. * h8300-tdep.c: Likewise. * hppa-hpux-nat.c: Likewise. * hppa-tdep.c: Likewise. * hppanbsd-tdep.c: Likewise. * hppaobsd-tdep.c: Likewise. * i386-darwin-nat.c: Likewise. * i386-darwin-tdep.c: Likewise. * i386-nto-tdep.c: Likewise. * i386-tdep.c: Likewise. * i386bsd-nat.c: Likewise. * i386fbsd-tdep.c: Likewise. * i386gnu-nat.c: Likewise. * i386nbsd-tdep.c: Likewise. * i386obsd-tdep.c: Likewise. * i387-tdep.c: Likewise. * ia64-libunwind-tdep.c: Likewise. * ia64-tdep.c: Likewise. * inf-ptrace.c: Likewise. * inf-ttrace.c: Likewise. * infcall.c: Likewise. * infcmd.c: Likewise. * infrun.c: Likewise. * inline-frame.c: Likewise. * interps.c: Likewise. * jv-lang.c: Likewise. * jv-typeprint.c: Likewise. * linux-fork.c: Likewise. * linux-nat.c: Likewise. * linux-thread-db.c: Likewise. * m32c-tdep.c: Likewise. * m32r-linux-nat.c: Likewise. * m32r-tdep.c: Likewise. * m68k-tdep.c: Likewise. * m68kbsd-nat.c: Likewise. * m68kbsd-tdep.c: Likewise. * m88k-tdep.c: Likewise. * machoread.c: Likewise. * macroexp.c: Likewise. * macrotab.c: Likewise. * maint.c: Likewise. * mdebugread.c: Likewise. * memory-map.c: Likewise. * mep-tdep.c: Likewise. * mi/mi-common.c: Likewise. * microblaze-tdep.c: Likewise. * mingw-hdep.c: Likewise. * mips-linux-nat.c: Likewise. * mips-linux-tdep.c: Likewise. * mips-tdep.c: Likewise. * mips64obsd-tdep.c: Likewise. * mipsnbsd-tdep.c: Likewise. * mn10300-linux-tdep.c: Likewise. * mn10300-tdep.c: Likewise. * moxie-tdep.c: Likewise. * mt-tdep.c: Likewise. * nat/linux-btrace.c: Likewise. * nat/linux-osdata.c: Likewise. * nat/linux-ptrace.c: Likewise. * nat/mips-linux-watch.c: Likewise. * nios2-linux-tdep.c: Likewise. * nios2-tdep.c: Likewise. * objc-lang.c: Likewise. * objfiles.c: Likewise. * obsd-nat.c: Likewise. * opencl-lang.c: Likewise. * osabi.c: Likewise. * parse.c: Likewise. * ppc-linux-nat.c: Likewise. * ppc-sysv-tdep.c: Likewise. * ppcfbsd-nat.c: Likewise. * ppcfbsd-tdep.c: Likewise. * ppcnbsd-nat.c: Likewise. * ppcnbsd-tdep.c: Likewise. * ppcobsd-nat.c: Likewise. * ppcobsd-tdep.c: Likewise. * printcmd.c: Likewise. * procfs.c: Likewise. * prologue-value.c: Likewise. * psymtab.c: Likewise. * python/py-lazy-string.c: Likewise. * python/py-value.c: Likewise. * regcache.c: Likewise. * reggroups.c: Likewise. * registry.c: Likewise. * remote-sim.c: Likewise. * remote.c: Likewise. * rs6000-aix-tdep.c: Likewise. * rs6000-tdep.c: Likewise. * s390-linux-tdep.c: Likewise. * score-tdep.c: Likewise. * ser-base.c: Likewise. * ser-mingw.c: Likewise. * sh-tdep.c: Likewise. * sh64-tdep.c: Likewise. * solib-darwin.c: Likewise. * solib-spu.c: Likewise. * solib-svr4.c: Likewise. * source.c: Likewise. * sparc-nat.c: Likewise. * sparc-sol2-tdep.c: Likewise. * sparc-tdep.c: Likewise. * sparc64-sol2-tdep.c: Likewise. * sparc64-tdep.c: Likewise. * sparc64fbsd-tdep.c: Likewise. * sparc64nbsd-tdep.c: Likewise. * sparc64obsd-tdep.c: Likewise. * sparcnbsd-tdep.c: Likewise. * sparcobsd-tdep.c: Likewise. * spu-multiarch.c: Likewise. * spu-tdep.c: Likewise. * stabsread.c: Likewise. * stack.c: Likewise. * symfile.c: Likewise. * symtab.c: Likewise. * target-descriptions.c: Likewise. * target-memory.c: Likewise. * target.c: Likewise. * tic6x-linux-tdep.c: Likewise. * tic6x-tdep.c: Likewise. * tilegx-linux-nat.c: Likewise. * tilegx-tdep.c: Likewise. * top.c: Likewise. * tramp-frame.c: Likewise. * tui/tui-out.c: Likewise. * tui/tui-winsource.c: Likewise. * ui-out.c: Likewise. * user-regs.c: Likewise. * utils.c: Likewise. * v850-tdep.c: Likewise. * valops.c: Likewise. * value.c: Likewise. * varobj.c: Likewise. * vax-nat.c: Likewise. * xml-syscall.c: Likewise. * xml-tdesc.c: Likewise. * xstormy16-tdep.c: Likewise. * xtensa-linux-nat.c: Likewise. * xtensa-tdep.c: Likewise. gdb/gdbserver/ 2014-08-07 Gary Benson <gbenson@redhat.com> * server.h: Do not include gdb_assert.h.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker
2013-11-18remove gdb_string.hTom Tromey
This removes gdb_string.h. This patch is purely mechanical. I created it by running the two commands: git rm common/gdb_string.h perl -pi -e's/"gdb_string.h"/<string.h>/;' *.[chyl] */*.[chyl] 2013-11-18 Tom Tromey <tromey@redhat.com> * common/gdb_string.h: Remove. * aarch64-tdep.c: Use string.h, not gdb_string.h. * ada-exp.y: Use string.h, not gdb_string.h. * ada-lang.c: Use string.h, not gdb_string.h. * ada-lex.l: Use string.h, not gdb_string.h. * ada-typeprint.c: Use string.h, not gdb_string.h. * ada-valprint.c: Use string.h, not gdb_string.h. * aix-thread.c: Use string.h, not gdb_string.h. * alpha-linux-tdep.c: Use string.h, not gdb_string.h. * alpha-mdebug-tdep.c: Use string.h, not gdb_string.h. * alpha-nat.c: Use string.h, not gdb_string.h. * alpha-osf1-tdep.c: Use string.h, not gdb_string.h. * alpha-tdep.c: Use string.h, not gdb_string.h. * alphanbsd-tdep.c: Use string.h, not gdb_string.h. * amd64-dicos-tdep.c: Use string.h, not gdb_string.h. * amd64-linux-nat.c: Use string.h, not gdb_string.h. * amd64-linux-tdep.c: Use string.h, not gdb_string.h. * amd64-nat.c: Use string.h, not gdb_string.h. * amd64-sol2-tdep.c: Use string.h, not gdb_string.h. * amd64fbsd-tdep.c: Use string.h, not gdb_string.h. * amd64obsd-tdep.c: Use string.h, not gdb_string.h. * arch-utils.c: Use string.h, not gdb_string.h. * arm-linux-nat.c: Use string.h, not gdb_string.h. * arm-linux-tdep.c: Use string.h, not gdb_string.h. * arm-tdep.c: Use string.h, not gdb_string.h. * arm-wince-tdep.c: Use string.h, not gdb_string.h. * armbsd-tdep.c: Use string.h, not gdb_string.h. * armnbsd-nat.c: Use string.h, not gdb_string.h. * armnbsd-tdep.c: Use string.h, not gdb_string.h. * armobsd-tdep.c: Use string.h, not gdb_string.h. * avr-tdep.c: Use string.h, not gdb_string.h. * ax-gdb.c: Use string.h, not gdb_string.h. * ax-general.c: Use string.h, not gdb_string.h. * bcache.c: Use string.h, not gdb_string.h. * bfin-tdep.c: Use string.h, not gdb_string.h. * breakpoint.c: Use string.h, not gdb_string.h. * build-id.c: Use string.h, not gdb_string.h. * buildsym.c: Use string.h, not gdb_string.h. * c-exp.y: Use string.h, not gdb_string.h. * c-lang.c: Use string.h, not gdb_string.h. * c-typeprint.c: Use string.h, not gdb_string.h. * c-valprint.c: Use string.h, not gdb_string.h. * charset.c: Use string.h, not gdb_string.h. * cli-out.c: Use string.h, not gdb_string.h. * cli/cli-cmds.c: Use string.h, not gdb_string.h. * cli/cli-decode.c: Use string.h, not gdb_string.h. * cli/cli-dump.c: Use string.h, not gdb_string.h. * cli/cli-interp.c: Use string.h, not gdb_string.h. * cli/cli-logging.c: Use string.h, not gdb_string.h. * cli/cli-script.c: Use string.h, not gdb_string.h. * cli/cli-setshow.c: Use string.h, not gdb_string.h. * cli/cli-utils.c: Use string.h, not gdb_string.h. * coffread.c: Use string.h, not gdb_string.h. * common/common-utils.c: Use string.h, not gdb_string.h. * common/filestuff.c: Use string.h, not gdb_string.h. * common/linux-procfs.c: Use string.h, not gdb_string.h. * common/linux-ptrace.c: Use string.h, not gdb_string.h. * common/signals.c: Use string.h, not gdb_string.h. * common/vec.h: Use string.h, not gdb_string.h. * core-regset.c: Use string.h, not gdb_string.h. * corefile.c: Use string.h, not gdb_string.h. * corelow.c: Use string.h, not gdb_string.h. * cp-abi.c: Use string.h, not gdb_string.h. * cp-support.c: Use string.h, not gdb_string.h. * cp-valprint.c: Use string.h, not gdb_string.h. * cris-tdep.c: Use string.h, not gdb_string.h. * d-lang.c: Use string.h, not gdb_string.h. * dbxread.c: Use string.h, not gdb_string.h. * dcache.c: Use string.h, not gdb_string.h. * demangle.c: Use string.h, not gdb_string.h. * dicos-tdep.c: Use string.h, not gdb_string.h. * disasm.c: Use string.h, not gdb_string.h. * doublest.c: Use string.h, not gdb_string.h. * dsrec.c: Use string.h, not gdb_string.h. * dummy-frame.c: Use string.h, not gdb_string.h. * dwarf2-frame.c: Use string.h, not gdb_string.h. * dwarf2loc.c: Use string.h, not gdb_string.h. * dwarf2read.c: Use string.h, not gdb_string.h. * elfread.c: Use string.h, not gdb_string.h. * environ.c: Use string.h, not gdb_string.h. * eval.c: Use string.h, not gdb_string.h. * event-loop.c: Use string.h, not gdb_string.h. * exceptions.c: Use string.h, not gdb_string.h. * exec.c: Use string.h, not gdb_string.h. * expprint.c: Use string.h, not gdb_string.h. * f-exp.y: Use string.h, not gdb_string.h. * f-lang.c: Use string.h, not gdb_string.h. * f-typeprint.c: Use string.h, not gdb_string.h. * f-valprint.c: Use string.h, not gdb_string.h. * fbsd-nat.c: Use string.h, not gdb_string.h. * findcmd.c: Use string.h, not gdb_string.h. * findvar.c: Use string.h, not gdb_string.h. * fork-child.c: Use string.h, not gdb_string.h. * frame.c: Use string.h, not gdb_string.h. * frv-linux-tdep.c: Use string.h, not gdb_string.h. * frv-tdep.c: Use string.h, not gdb_string.h. * gdb.c: Use string.h, not gdb_string.h. * gdb_bfd.c: Use string.h, not gdb_string.h. * gdbarch.c: Use string.h, not gdb_string.h. * gdbtypes.c: Use string.h, not gdb_string.h. * gnu-nat.c: Use string.h, not gdb_string.h. * gnu-v2-abi.c: Use string.h, not gdb_string.h. * gnu-v3-abi.c: Use string.h, not gdb_string.h. * go-exp.y: Use string.h, not gdb_string.h. * go-lang.c: Use string.h, not gdb_string.h. * go32-nat.c: Use string.h, not gdb_string.h. * hppa-hpux-tdep.c: Use string.h, not gdb_string.h. * hppa-linux-nat.c: Use string.h, not gdb_string.h. * hppanbsd-tdep.c: Use string.h, not gdb_string.h. * hppaobsd-tdep.c: Use string.h, not gdb_string.h. * i386-cygwin-tdep.c: Use string.h, not gdb_string.h. * i386-dicos-tdep.c: Use string.h, not gdb_string.h. * i386-linux-nat.c: Use string.h, not gdb_string.h. * i386-linux-tdep.c: Use string.h, not gdb_string.h. * i386-nto-tdep.c: Use string.h, not gdb_string.h. * i386-sol2-tdep.c: Use string.h, not gdb_string.h. * i386-tdep.c: Use string.h, not gdb_string.h. * i386bsd-tdep.c: Use string.h, not gdb_string.h. * i386gnu-nat.c: Use string.h, not gdb_string.h. * i386nbsd-tdep.c: Use string.h, not gdb_string.h. * i386obsd-tdep.c: Use string.h, not gdb_string.h. * i387-tdep.c: Use string.h, not gdb_string.h. * ia64-libunwind-tdep.c: Use string.h, not gdb_string.h. * ia64-linux-nat.c: Use string.h, not gdb_string.h. * inf-child.c: Use string.h, not gdb_string.h. * inf-ptrace.c: Use string.h, not gdb_string.h. * inf-ttrace.c: Use string.h, not gdb_string.h. * infcall.c: Use string.h, not gdb_string.h. * infcmd.c: Use string.h, not gdb_string.h. * inflow.c: Use string.h, not gdb_string.h. * infrun.c: Use string.h, not gdb_string.h. * interps.c: Use string.h, not gdb_string.h. * iq2000-tdep.c: Use string.h, not gdb_string.h. * irix5-nat.c: Use string.h, not gdb_string.h. * jv-exp.y: Use string.h, not gdb_string.h. * jv-lang.c: Use string.h, not gdb_string.h. * jv-typeprint.c: Use string.h, not gdb_string.h. * jv-valprint.c: Use string.h, not gdb_string.h. * language.c: Use string.h, not gdb_string.h. * linux-fork.c: Use string.h, not gdb_string.h. * linux-nat.c: Use string.h, not gdb_string.h. * lm32-tdep.c: Use string.h, not gdb_string.h. * m2-exp.y: Use string.h, not gdb_string.h. * m2-typeprint.c: Use string.h, not gdb_string.h. * m32c-tdep.c: Use string.h, not gdb_string.h. * m32r-linux-nat.c: Use string.h, not gdb_string.h. * m32r-linux-tdep.c: Use string.h, not gdb_string.h. * m32r-rom.c: Use string.h, not gdb_string.h. * m32r-tdep.c: Use string.h, not gdb_string.h. * m68hc11-tdep.c: Use string.h, not gdb_string.h. * m68k-tdep.c: Use string.h, not gdb_string.h. * m68kbsd-tdep.c: Use string.h, not gdb_string.h. * m68klinux-nat.c: Use string.h, not gdb_string.h. * m68klinux-tdep.c: Use string.h, not gdb_string.h. * m88k-tdep.c: Use string.h, not gdb_string.h. * macrocmd.c: Use string.h, not gdb_string.h. * main.c: Use string.h, not gdb_string.h. * mdebugread.c: Use string.h, not gdb_string.h. * mem-break.c: Use string.h, not gdb_string.h. * memattr.c: Use string.h, not gdb_string.h. * memory-map.c: Use string.h, not gdb_string.h. * mep-tdep.c: Use string.h, not gdb_string.h. * mi/mi-cmd-break.c: Use string.h, not gdb_string.h. * mi/mi-cmd-disas.c: Use string.h, not gdb_string.h. * mi/mi-cmd-env.c: Use string.h, not gdb_string.h. * mi/mi-cmd-stack.c: Use string.h, not gdb_string.h. * mi/mi-cmd-var.c: Use string.h, not gdb_string.h. * mi/mi-cmds.c: Use string.h, not gdb_string.h. * mi/mi-console.c: Use string.h, not gdb_string.h. * mi/mi-getopt.c: Use string.h, not gdb_string.h. * mi/mi-interp.c: Use string.h, not gdb_string.h. * mi/mi-main.c: Use string.h, not gdb_string.h. * mi/mi-parse.c: Use string.h, not gdb_string.h. * microblaze-rom.c: Use string.h, not gdb_string.h. * microblaze-tdep.c: Use string.h, not gdb_string.h. * mingw-hdep.c: Use string.h, not gdb_string.h. * minidebug.c: Use string.h, not gdb_string.h. * minsyms.c: Use string.h, not gdb_string.h. * mips-irix-tdep.c: Use string.h, not gdb_string.h. * mips-linux-tdep.c: Use string.h, not gdb_string.h. * mips-tdep.c: Use string.h, not gdb_string.h. * mips64obsd-tdep.c: Use string.h, not gdb_string.h. * mipsnbsd-tdep.c: Use string.h, not gdb_string.h. * mipsread.c: Use string.h, not gdb_string.h. * mn10300-linux-tdep.c: Use string.h, not gdb_string.h. * mn10300-tdep.c: Use string.h, not gdb_string.h. * monitor.c: Use string.h, not gdb_string.h. * moxie-tdep.c: Use string.h, not gdb_string.h. * mt-tdep.c: Use string.h, not gdb_string.h. * nbsd-tdep.c: Use string.h, not gdb_string.h. * nios2-linux-tdep.c: Use string.h, not gdb_string.h. * nto-procfs.c: Use string.h, not gdb_string.h. * nto-tdep.c: Use string.h, not gdb_string.h. * objc-lang.c: Use string.h, not gdb_string.h. * objfiles.c: Use string.h, not gdb_string.h. * opencl-lang.c: Use string.h, not gdb_string.h. * osabi.c: Use string.h, not gdb_string.h. * osdata.c: Use string.h, not gdb_string.h. * p-exp.y: Use string.h, not gdb_string.h. * p-lang.c: Use string.h, not gdb_string.h. * p-typeprint.c: Use string.h, not gdb_string.h. * parse.c: Use string.h, not gdb_string.h. * posix-hdep.c: Use string.h, not gdb_string.h. * ppc-linux-nat.c: Use string.h, not gdb_string.h. * ppc-sysv-tdep.c: Use string.h, not gdb_string.h. * ppcfbsd-tdep.c: Use string.h, not gdb_string.h. * ppcnbsd-tdep.c: Use string.h, not gdb_string.h. * ppcobsd-tdep.c: Use string.h, not gdb_string.h. * printcmd.c: Use string.h, not gdb_string.h. * procfs.c: Use string.h, not gdb_string.h. * prologue-value.c: Use string.h, not gdb_string.h. * python/py-auto-load.c: Use string.h, not gdb_string.h. * python/py-gdb-readline.c: Use string.h, not gdb_string.h. * ravenscar-thread.c: Use string.h, not gdb_string.h. * regcache.c: Use string.h, not gdb_string.h. * registry.c: Use string.h, not gdb_string.h. * remote-fileio.c: Use string.h, not gdb_string.h. * remote-m32r-sdi.c: Use string.h, not gdb_string.h. * remote-mips.c: Use string.h, not gdb_string.h. * remote-sim.c: Use string.h, not gdb_string.h. * remote.c: Use string.h, not gdb_string.h. * reverse.c: Use string.h, not gdb_string.h. * rs6000-aix-tdep.c: Use string.h, not gdb_string.h. * ser-base.c: Use string.h, not gdb_string.h. * ser-go32.c: Use string.h, not gdb_string.h. * ser-mingw.c: Use string.h, not gdb_string.h. * ser-pipe.c: Use string.h, not gdb_string.h. * ser-tcp.c: Use string.h, not gdb_string.h. * ser-unix.c: Use string.h, not gdb_string.h. * serial.c: Use string.h, not gdb_string.h. * sh-tdep.c: Use string.h, not gdb_string.h. * sh64-tdep.c: Use string.h, not gdb_string.h. * shnbsd-tdep.c: Use string.h, not gdb_string.h. * skip.c: Use string.h, not gdb_string.h. * sol-thread.c: Use string.h, not gdb_string.h. * solib-dsbt.c: Use string.h, not gdb_string.h. * solib-frv.c: Use string.h, not gdb_string.h. * solib-osf.c: Use string.h, not gdb_string.h. * solib-spu.c: Use string.h, not gdb_string.h. * solib-target.c: Use string.h, not gdb_string.h. * solib.c: Use string.h, not gdb_string.h. * somread.c: Use string.h, not gdb_string.h. * source.c: Use string.h, not gdb_string.h. * sparc-nat.c: Use string.h, not gdb_string.h. * sparc-sol2-tdep.c: Use string.h, not gdb_string.h. * sparc-tdep.c: Use string.h, not gdb_string.h. * sparc64-tdep.c: Use string.h, not gdb_string.h. * sparc64fbsd-tdep.c: Use string.h, not gdb_string.h. * sparc64nbsd-tdep.c: Use string.h, not gdb_string.h. * sparcnbsd-tdep.c: Use string.h, not gdb_string.h. * spu-linux-nat.c: Use string.h, not gdb_string.h. * spu-multiarch.c: Use string.h, not gdb_string.h. * spu-tdep.c: Use string.h, not gdb_string.h. * stabsread.c: Use string.h, not gdb_string.h. * stack.c: Use string.h, not gdb_string.h. * std-regs.c: Use string.h, not gdb_string.h. * symfile.c: Use string.h, not gdb_string.h. * symmisc.c: Use string.h, not gdb_string.h. * symtab.c: Use string.h, not gdb_string.h. * target.c: Use string.h, not gdb_string.h. * thread.c: Use string.h, not gdb_string.h. * tilegx-linux-nat.c: Use string.h, not gdb_string.h. * tilegx-tdep.c: Use string.h, not gdb_string.h. * top.c: Use string.h, not gdb_string.h. * tracepoint.c: Use string.h, not gdb_string.h. * tui/tui-command.c: Use string.h, not gdb_string.h. * tui/tui-data.c: Use string.h, not gdb_string.h. * tui/tui-disasm.c: Use string.h, not gdb_string.h. * tui/tui-file.c: Use string.h, not gdb_string.h. * tui/tui-layout.c: Use string.h, not gdb_string.h. * tui/tui-out.c: Use string.h, not gdb_string.h. * tui/tui-regs.c: Use string.h, not gdb_string.h. * tui/tui-source.c: Use string.h, not gdb_string.h. * tui/tui-stack.c: Use string.h, not gdb_string.h. * tui/tui-win.c: Use string.h, not gdb_string.h. * tui/tui-windata.c: Use string.h, not gdb_string.h. * tui/tui-winsource.c: Use string.h, not gdb_string.h. * typeprint.c: Use string.h, not gdb_string.h. * ui-file.c: Use string.h, not gdb_string.h. * ui-out.c: Use string.h, not gdb_string.h. * user-regs.c: Use string.h, not gdb_string.h. * utils.c: Use string.h, not gdb_string.h. * v850-tdep.c: Use string.h, not gdb_string.h. * valarith.c: Use string.h, not gdb_string.h. * valops.c: Use string.h, not gdb_string.h. * valprint.c: Use string.h, not gdb_string.h. * value.c: Use string.h, not gdb_string.h. * varobj.c: Use string.h, not gdb_string.h. * vax-tdep.c: Use string.h, not gdb_string.h. * vaxnbsd-tdep.c: Use string.h, not gdb_string.h. * vaxobsd-tdep.c: Use string.h, not gdb_string.h. * windows-nat.c: Use string.h, not gdb_string.h. * xcoffread.c: Use string.h, not gdb_string.h. * xml-support.c: Use string.h, not gdb_string.h. * xstormy16-tdep.c: Use string.h, not gdb_string.h. * xtensa-linux-nat.c: Use string.h, not gdb_string.h.
2013-07-01add -Wold-style-declarationTom Tromey
This adds -Wold-style-declaration to gdb's list of warnings. It turns out that a few places use "const static" rather than "static const". The former is deprecated according to the C standard. Tested by rebuilding with --enable-targets=all on x86-64 Fedora 18. * configure.ac (build_warnings): Add -Wold-style-declaration. * configure: Rebuild. * dsrec.c (make_srec): Use "static const", not "const static". * h8300-tdep.c (h8300_breakpoint_from_pc): Use "static const", not "const static". * mi/mi-parse.c (mi_no_values, mi_simple_values, mi_all_values): Use "static const", not "const static". * mn10300-tdep.c (mn10300_breakpoint_from_pc): Use "static const", not "const static". * moxie-tdep.c (moxie_breakpoint_from_pc): Use "static const", not "const static". * rs6000-tdep.c (rs6000_breakpoint_from_pc): Use "static const", not "const static". * v850-tdep.c (v850_breakpoint_from_pc): Use "static const", not "const static". (v850_dbtrap_breakpoint_from_pc): Likewise. * xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Use "static const", not "const static".
2013-04-19-Wpointer-sign: char -> gdb_byte.Pedro Alves
-Wpointer-sign catches all these cases across the codebase that should be using gdb_byte for raw target bytes. I think these are all obvious, hence I've collapsed into a single patch. gdb/ 2013-04-19 Pedro Alves <palves@redhat.com> * aarch64-tdep.c (aarch64_default_breakpoint): Change type to gdb_byte[]. (aarch64_breakpoint_from_pc): Change return type to gdb_byte *. * ada-lang.c (ada_value_assign): Use gdb_byte. * alphanbsd-tdep.c (sigtramp_retcode): Change type to gdb_byte[]. (alphanbsd_sigtramp_offset): Use gdb_byte. * arm-linux-tdep.c (arm_linux_arm_le_breakpoint) (arm_linux_arm_be_breakpoint, eabi_linux_arm_le_breakpoint) (eabi_linux_arm_be_breakpoint, arm_linux_thumb_be_breakpoint) (arm_linux_thumb_le_breakpoint, arm_linux_thumb2_be_breakpoint) (arm_linux_thumb2_le_breakpoint): Change type to gdb_byte[]. * arm-tdep.c (arm_stub_unwind_sniffer) (arm_displaced_init_closure): Use gdb_byte. (arm_default_arm_le_breakpoint, arm_default_arm_be_breakpoint) (arm_default_thumb_le_breakpoint) (arm_default_thumb_be_breakpoint): Change type to gdb_byte[]. * arm-tdep.h (struct gdbarch_tdep) <arm_breakpoint, thumb_breakpoint, thumb2_breakpoint>: Change type to gdb_byte *. * arm-wince-tdep.c (arm_wince_le_breakpoint) (arm_wince_thumb_le_breakpoint): Change type to gdb_byte[]. * armnbsd-tdep.c (arm_nbsd_arm_le_breakpoint) (arm_nbsd_arm_be_breakpoint, arm_nbsd_thumb_le_breakpoint) (arm_nbsd_thumb_be_breakpoint): Change type to gdb_byte[]. * armobsd-tdep.c (arm_obsd_thumb_le_breakpoint) (arm_obsd_thumb_be_breakpoint): Change type to gdb_byte[]. * cris-tdep.c (push_stack_item, cris_push_dummy_call) (cris_store_return_value, cris_extract_return_value): Use gdb_byte. (constraint): Change type of parameter to char * from signed char*. Use gdb_byte. * dwarf2loc.c (read_pieced_value, write_pieced_value): Change type of local buffer to gdb_byte *. * dwarf2read.c (read_index_from_section): Use gdb_byte. (create_dwp_hash_table): Change type of locals to gdb_byte *. (add_address_entry): Change type of local buffer to gdb_byte[]. * frv-tdep.c (frv_adjust_breakpoint_address, find_func_descr) (frv_push_dummy_call): Use gdb_byte. * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code) (hppa_hpux_supply_ss_fpblock, hppa_hpux_supply_ss_wide) (hppa_hpux_supply_save_state): Use gdb_byte. * hppa-tdep.c (hppa32_push_dummy_call) (hppa64_convert_code_addr_to_fptr): Use gdb_byte. * ia64-tdep.c (extract_bit_field, replace_bit_field) (slotN_contents, replace_slotN_contents): Change type of parameter to gdb_byte *. (fetch_instruction, ia64_pseudo_register_write) (ia64_register_to_value, ia64_value_to_register) (ia64_extract_return_value, ia64_store_return_value) (ia64_push_dummy_call): Use gdb_byte. * m32c-tdep.c (m32c_return_value): Remove cast. * m68hc11-tdep.c (m68hc11_pseudo_register_write) (m68hc11_push_dummy_call, m68hc11_store_return_value): Use gdb_byte. * mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Use gdb_byte. * mn10300-tdep.c (mn10300_store_return_value) (mn10300_breakpoint_from_pc, mn10300_push_dummy_call): Use gdb_byte. * moxie-tdep.c (moxie_process_readu): Use gdb_byte. (moxie_process_record): Remove casts. * ppc-ravenscar-thread.c (supply_register_at_address) (ppc_ravenscar_generic_store_registers): Use gdb_byte. * ravenscar-thread.c (get_running_thread_id): Use gdb_byte. * remote-m32r-sdi.c (m32r_fetch_register): Use gdb_byte. * remote-mips.c (mips_xfer_memory): Use gdb_byte. * remote.c (compare_sections_command): Use gdb_byte. * score-tdep.c (score7_free_memblock): Change type of parameter to gdb_byte *. * sh-tdep.c (sh_justify_value_in_reg): Change return type to gdb_byte *. Use gdb_byte. (sh_push_dummy_call_fpu): Use gdb_byte. (sh_extract_return_value_nofpu, sh_extract_return_value_fpu) (sh_store_return_value_nofpu, sh_store_return_value_fpu) (sh_register_convert_to_virtual, sh_register_convert_to_raw): Change parameter type to 'gdb_byte *'. Use gdb_byte. (sh_pseudo_register_read, sh_pseudo_register_write): Use gdb_byte. * sh64-tdep.c (sh64_push_dummy_call): Use gdb_byte. (sh64_store_return_value, sh64_register_convert_to_virtual): Change parameter type to 'gdb_byte *'. Use gdb_byte. (sh64_pseudo_register_write): Use gdb_byte. * solib-darwin.c (darwin_current_sos): Add casts to 'gdb_byte *'. * solib-irix.c (fetch_lm_info): Likewise. Use gdb_byte for byte buffer. (irix_current_sos): Use gdb_byte. * solib-som.c (som_current_sos): Use gdb_byte. * sparc-ravenscar-thread.c (supply_register_at_address) (sparc_ravenscar_generic_store_registers): Use gdb_byte. * spu-multiarch.c (spu_xfer_partial): Add cast to 'char *'. * spu-tdep.c (spu_get_overlay_table): Use gdb_byte. * tic6x-tdep.c (tic6x_breakpoint_from_pc): Change return type to 'gdb_byte *'. * tic6x-tdep.h (struct gdbarch_tdep) <breakpoint>: Change type to 'gdb_byte *'. * tracepoint.c (tfile_fetch_registers): Use gdb_byte. * xstormy16-tdep.c (xstormy16_extract_return_value) (xstormy16_store_return_value): Change parameter type to 'gdb_byte *'. Adjust. (xstormy16_push_dummy_call): Use gdb_byte. * xtensa-tdep.c (xtensa_scan_prologue, call0_ret) (call0_analyze_prologue, execute_code): Use gdb_byte.
2013-03-01Use gdb_byte for bytes from the program being debugged.Pedro Alves
gdb_byte should be used for bytes from the program being debugged. We have many places using char or unsigned char instead all over the existing ports, and more ends up added over time due to copy/paste as new code is based on old code. I've greped the tree for "char buf[", and fixed all I found. Tested by building with --enable-targets=all. 2013-03-01 Pedro Alves <palves@redhat.com> Use gdb_byte for bytes from the program being debugged. * arm-tdep.c (arm_store_return_value, arm_get_longjmp_target): Change type of local 'buf' to gdb_byte. * avr-tdep.c (avr_frame_prev_register, avr_push_dummy_call): Likewise. * bfin-tdep.c (bfin_push_dummy_call): Likewise. * cris-tdep.c (cris_sigcontext_addr) (cris_sigtramp_frame_unwind_cache): Likewise. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp) (frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache): Likewise. * frv-tdep.c (frv_pseudo_register_write, frv_analyze_prologue): Likewise. * hppa-hpux-tdep.c (hppa32_hpux_find_global_pointer) (hppa32_hpux_search_dummy_call_sequence) (hppa_hpux_supply_save_state): Likewise. * hppa-linux-tdep.c (insns_match_pattern) (hppa_linux_find_global_pointer): Likewise. * hppa-tdep.c (hppa_in_function_epilogue_p) (skip_prologue_hard_way, hppa_frame_cache): Likewise. * i386-nto-tdep.c (i386nto_sigcontext_addr): Likewise. * i386fbsd-tdep.c (i386fbsd_supply_uthread) (i386fbsd_collect_uthread): Likewise. * ia64-hpux-tdep.c (ia64_hpux_push_dummy_code): Likewise. * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Likewise. * ia64-tdep.c (examine_prologue, ia64_frame_cache) (ia64_frame_prev_register, ia64_sigtramp_frame_cache) (ia64_sigtramp_frame_prev_register, ia64_access_reg) (ia64_access_rse_reg, ia64_libunwind_frame_this_id) (ia64_libunwind_frame_prev_register) (ia64_libunwind_sigtramp_frame_this_id) (ia64_find_global_pointer_from_dynamic_section) (find_extant_func_descr, find_func_descr, ia64_dummy_id) (ia64_unwind_pc): Likewise. * iq2000-tdep.c (iq2000_store_return_value): Likewise. * m68hc11-tdep.c (m68hc11_push_dummy_call) (m68hc11_extract_return_value): Likewise. * m68klinux-nat.c (fetch_register, store_register): Likewise. * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_cr32_write) (mep_get_insn, mep_push_dummy_call): Likewise. * mips-linux-tdep.c (mips_linux_get_longjmp_target) (mips_linux_in_dynsym_stub): Likewise. * mn10300-tdep.c (mep_pseudo_cr32_write): Likewise. * ppc-linux-nat.c (fetch_register, store_register): Likewise. * regcache.c (dump_endian_bytes): Change type of parameter 'buf' to gdb_byte. * remote-mips.c (mips_set_register): Likewise. * remote-sim.c (gdbsim_fetch_register): Likewise. * score-tdep.c (score7_fetch_inst): Change type of parameter 'memblock' and local 'buf' to gdb_byte. (score7_malloc_and_get_memblock): Change return type to gdb_byte. Change type of local 'buf' to gdb_byte. Adjust. (score7_adjust_memblock_ptr): Change type of parameter 'memblock' to gdb_byte**. (score7_analyze_prologue): Change type of 'memblock' and 'memblock_ptr' locals to gdb_byte*. * sh64-tdep.c (sh64_extract_return_value) (sh64_store_return_value): Change type of local 'buf' to gdb_byte. * solib-darwin.c (darwin_current_sos, darwin_read_exec_load_addr): * solib-pa64.c (pa64_solib_create_inferior_hook) (pa64_open_symbol_file_object): Remove local 'buf'. * solib-som.c (som_solib_create_inferior_hook, link_map_start) (som_open_symbol_file_object): Likewise. * solib-spu.c (spu_current_sos): Likewise. * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise. * spu-multiarch.c (parse_spufs_run, spu_fetch_registers) (spu_store_registers): Likewise. * target.c (debug_print_register): Likewise. * tic6x-tdep.c (tic6x_get_longjmp_target): Likewise. * xstormy16-tdep.c (xstormy16_store_return_value) (xstormy16_push_dummy_call, xstormy16_resolve_jmp_table_entry) (xstormy16_find_jmp_table_entry): Likewise.
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker
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.
2012-08-24 * h8300-tdep.c (h8300_push_dummy_call): Replace unsafe allocaSiddhesh Poyarekar
with xmalloc/cleanup. * mt-tdep.c (mt_push_dummy_call): Likewise. * tilegx-tdep.c (tilegx_push_dummy_call): Likewise. * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
2012-05-16 gdb/Maciej W. Rozycki
* breakpoint.h (bp_location): Add related_address member. * inferior.h (get_return_value): Take a pointer to struct value instead of struct type for the function requested. * value.h (using_struct_return): Likewise. * gdbarch.sh (return_value): Take a pointer to struct value instead of struct type for the function requested. * breakpoint.c (set_breakpoint_location_function): Initialize related_address for bp_gnu_ifunc_resolver breakpoints. * elfread.c (elf_gnu_ifunc_resolver_return_stop): Pass the requested function's address to gdbarch_return_value. * eval.c (evaluate_subexp_standard): Pass the requested function's address to using_struct_return. * infcall.c (call_function_by_hand): Pass the requested function's address to using_struct_return and gdbarch_return_value. * infcmd.c (get_return_value): Take a pointer to struct value instead of struct type for the function requested. (print_return_value): Update accordingly. (finish_command_continuation): Likewise. * stack.c (return_command): Pass the requested function's address to using_struct_return and gdbarch_return_value. * value.c (using_struct_return): Take a pointer to struct value instead of struct type for the function requested. Pass the requested function's address to gdbarch_return_value. * python/py-finishbreakpoint.c (finish_breakpoint_object): New function_value member, replacing function_type. (bpfinishpy_dealloc): Update accordingly. (bpfinishpy_pre_stop_hook): Likewise. (bpfinishpy_init): Likewise. Record the requested function's address. * mips-tdep.c (mips_fval_reg): New enum. (mips_o32_push_dummy_call): For MIPS16 FP doubles do not swap words put in GP registers. (mips_o64_push_dummy_call): Update a comment. (mips_o32_return_value): Take a pointer to struct value instead of struct type for the function requested and use it to check if using the MIPS16 calling convention. Return the designated general purpose registers for floating-point values returned in MIPS16 mode. (mips_o64_return_value): Likewise. * ppc-tdep.h (ppc_sysv_abi_return_value): Update prototype. (ppc_sysv_abi_broken_return_value): Likewise. (ppc64_sysv_abi_return_value): Likewise. * alpha-tdep.c (alpha_return_value): Take a pointer to struct value instead of struct type for the function requested. * amd64-tdep.c (amd64_return_value): Likewise. * amd64-windows-tdep.c (amd64_windows_return_value): Likewise. * arm-tdep.c (arm_return_value): Likewise. * avr-tdep.c (avr_return_value): Likewise. * bfin-tdep.c (bfin_return_value): Likewise. * cris-tdep.c (cris_return_value): Likewise. * frv-tdep.c (frv_return_value): Likewise. * h8300-tdep.c (h8300_return_value): Likewise. (h8300h_return_value): Likewise. * hppa-tdep.c (hppa32_return_value): Likewise. (hppa64_return_value): Likewise. * i386-tdep.c (i386_return_value): Likewise. * ia64-tdep.c (ia64_return_value): Likewise. * iq2000-tdep.c (iq2000_return_value): Likewise. * lm32-tdep.c (lm32_return_value): Likewise. * m32c-tdep.c (m32c_return_value): Likewise. * m32r-tdep.c (m32r_return_value): Likewise. * m68hc11-tdep.c (m68hc11_return_value): Likewise. * m68k-tdep.c (m68k_return_value): Likewise. (m68k_svr4_return_value): Likewise. * m88k-tdep.c (m88k_return_value): Likewise. * mep-tdep.c (mep_return_value): Likewise. * microblaze-tdep.c (microblaze_return_value): Likewise. * mn10300-tdep.c (mn10300_return_value): Likewise. * moxie-tdep.c (moxie_return_value): Likewise. * mt-tdep.c (mt_return_value): Likewise. * ppc-linux-tdep.c (ppc_linux_return_value): Likewise. * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): Likewise. (ppc_sysv_abi_broken_return_value): Likewise. (ppc64_sysv_abi_return_value): Likewise. * ppcnbsd-tdep.c (ppcnbsd_return_value): Likewise. * rl78-tdep.c (rl78_return_value): Likewise. * rs6000-aix-tdep.c (rs6000_return_value): Likewise. * rx-tdep.c (rx_return_value): Likewise. * s390-tdep.c (s390_return_value): Likewise. * score-tdep.c (score_return_value): Likewise. * sh-tdep.c (sh_return_value_nofpu): Likewise. (sh_return_value_fpu): Likewise. * sh64-tdep.c (sh64_return_value): Likewise. * sparc-tdep.c (sparc32_return_value): Likewise. * sparc64-tdep.c (sparc64_return_value): Likewise. * spu-tdep.c (spu_return_value): Likewise. * tic6x-tdep.c (tic6x_return_value): Likewise. * v850-tdep.c (v850_return_value): Likewise. * vax-tdep.c (vax_return_value): Likewise. * xstormy16-tdep.c (xstormy16_return_value): Likewise. * xtensa-tdep.c (xtensa_return_value): Likewise. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. gdb/testsuite/ * gdb.base/return-nodebug.exp: Also test float and double types.
2012-02-02 * blockframe.c (find_pc_partial_function_gnu_ifunc): Change type ofDoug Evans
"name" parameter to const char ** from char **. All callers updated. (find_pc_partial_function): Ditto. (cache_pc_function_name): Change type to const char * from char *. * symtab.h ((find_pc_partial_function_gnu_ifunc): Update. (find_pc_partial_function): Update. * alpha-tdep.h (struct gdbarch_tdep, member pc_in_sigtramp): Change type of "name" parameter to const char * from char *. All uses updated. * arch-utils.c (generic_in_solib_return_trampoline): Change type of "name" parameter to const char * from char *. * arch-utils.h (generic_in_solib_return_trampoline): Update. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Change type of "name" parameter to const char * from char *. * gdbarch.sh (in_solib_return_trampoline): Ditto. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Update. * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Update. * m32r-linux-tdep.c (m32r_linux_pc_in_sigtramp): Change type of "name" parameter to const char * from char *. * skip.c (skip_function_pc): Ditto. * sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Ditto. * sparc-tdep.h (sparc_sol2_pc_in_sigtramp): Update. * sparc64fbsd-tdep.c (sparc64fbsd_pc_in_sigtramp): Ditto. * sparc64nbsd-tdep.c (sparc64nbsd_pc_in_sigtramp): Ditto. * sparc64obsd-tdep.c (sparc64obsd_pc_in_sigtramp): Ditto. * sparcnbsd-tdep.c (sparc32nbsd_pc_in_sigtramp): Ditto. * sparcobsd-tdep.c (sparc32obsd_pc_in_sigtramp): Ditto. * nbsd-tdep.c (nbsd_pc_in_sigtramp): Similary for "func_name". * nbsd-tdep.h (nbsd_pc_in_sigtramp): Update.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-04-19 * xstormy16-tdep.c (xstormy16_push_dummy_call): Add localPierre Muller
variables to simplify code and avoid == operator at end of line as this is against GNU coding standards.
2011-03-18 gdb/Pedro Alves
* frame.c (frame_unwind_register): Throw an error if unwinding the register failed. * get_prev_frame_1 (get_prev_frame_1): Ask the unwinder if there's an unwind stop reason. (frame_stop_reason_string): Handle UNWIND_UNAVAILABLE. * frame.h (enum unwind_stop_reason) <UNWIND_OUTERMOST, UNWIND_UNAVAILABLE>: New. * inline-frame.c (inline_frame_unwind): Install default_frame_unwind_stop_reason. * frame-unwind.c: Include "exceptions.h". (frame_unwind_find_by_frame): Swallow NOT_AVAILABLE_ERROR errors. (default_frame_unwind_stop_reason): New. * frame-unwind.h (frame_unwind_stop_reason_ftype): New typedef. (default_frame_unwind_stop_reason): Declare. (struct frame_unwind) <stop_reason>: New function pointer. * dummy-frame.c: Install default_frame_unwind_stop_reason. * dwarf2-frame.c: Include exceptions.h. (struct dwarf2_frame_cache) <unavailable_retaddr>: New field. (dwarf2_frame_cache): Swallow NOT_AVAILABLE_ERROR errors when computing the CFA. If such an error was thrown, set unavailable_retaddr. (dwarf2_frame_unwind_stop_reason): New. (dwarf2_frame_this_id): Don't build a frame id if the CFA was unavailable. (dwarf2_frame_unwind): Install dwarf2_frame_unwind_stop_reason. (dwarf2_signal_frame_unwind): Ditto. * amd64-tdep.c: Include "exceptions.h". (struct amd64_frame_cache): New field "base_p". (amd64_init_frame_cache): Clear it. (amd64_frame_cache_1): New, factored out from amd64_frame_cache. Avoid reading registers with functions that throw if the register is not necessary to compute the frame base. (amd64_frame_cache): Reimplement wrapping amd64_frame_cache_1, and swallowing NOT_AVAILABLE_ERROR. (amd64_frame_unwind_stop_reason): New. (amd64_frame_this_id): Don't build a frame id if the frame base was unavailable. (amd64_frame_unwind): Install amd64_frame_unwind_stop_reason. (amd64_sigtramp_frame_cache): Swallow NOT_AVAILABLE_ERROR, and set base_p if the frame base was computable. (amd64_sigtramp_frame_unwind_stop_reason): New. (amd64_sigtramp_frame_this_id): Don't build a frame id if the frame base was unavailable. (amd64_sigtramp_frame_unwind): Install amd64_sigtramp_frame_unwind_stop_reason. (amd64_epilogue_frame_cache): Swallow NOT_AVAILABLE_ERROR, and set base_p if the frame base was computable. (amd64_epilogue_frame_unwind_stop_reason): New. (amd64_epilogue_frame_this_id): Don't build a frame id if the frame base was unavailable. (amd64_epilogue_frame_unwind): Install amd64_epilogue_frame_unwind_stop_reason. * i386-tdep.c: Include "exceptions.h". (struct i386_frame_cache): New field "base_p". (i386_init_frame_cache): Clear it. (i386_frame_cache_1): New, factored out from amd64_frame_cache. Avoid reading registers with functions that throw if the register is not necessary to compute the frame base. (i386_frame_cache): Reimplement wrapping amd64_frame_cache_1, and swallowing NOT_AVAILABLE_ERROR. (i386_frame_unwind_stop_reason): New. (i386_frame_this_id): Don't build a frame id if the frame base was unavailable. (i386_frame_prev_register): Handle unavailable SP. (i386_frame_unwind): Install i386_frame_unwind_stop_reason. (i386_epilogue_frame_cache): Swallow NOT_AVAILABLE_ERROR, and set base_p if the frame base was computable. (i386_epilogue_frame_unwind_stop_reason): New. (i386_epilogue_frame_this_id): Don't build a frame id if the frame base was unavailable. (i386_epilogue_frame_unwind): Install i386_epilogue_frame_unwind_stop_reason. (i386_sigtramp_frame_cache): Swallow NOT_AVAILABLE_ERROR, and set base_p if the frame base was computable. (i386_sigtramp_frame_unwind_stop_reason): New. (i386_sigtramp_frame_this_id): Don't build a frame id if the frame base was unavailable. (i386_sigtramp_frame_unwind): Install i386_sigtramp_frame_unwind_stop_reason. * sentinel-frame.c (sentinel_frame_prev_register): Use the value type's size, not the register's. (sentinel_frame_unwind): Install default_frame_unwind_stop_reason. * alpha-mdebug-tdep.c (alpha_mdebug_frame_unwind): Install default_frame_unwind_stop_reason. * alpha-tdep.c (alpha_sigtramp_frame_unwind) (alpha_heuristic_frame_unwind): Ditto. * amd64obsd-tdep.c (amd64obsd_trapframe_unwind): Ditto. * arm-tdep.c (arm_prologue_unwind, arm_stub_unwind): Ditto. * avr-tdep.c (avr_frame_unwind): Ditto. * cris-tdep.c (cris_sigtramp_frame_unwind, cris_frame_unwind): Ditto. * frv-linux-tdep.c (frv_linux_sigtramp_frame_unwind): Ditto. * frv-tdep.c (frv_frame_unwind): Ditto. * h8300-tdep.c (h8300_frame_unwind): Ditto. * hppa-hpux-tdep.c (hppa_hpux_sigtramp_frame_unwind): Ditto. * hppa-linux-tdep.c (hppa_linux_sigtramp_frame_unwind): Ditto. * hppa-tdep.c (hppa_frame_unwind, hppa_fallback_frame_unwind) (hppa_stub_frame_unwind): Ditto. * i386obsd-tdep.c (i386obsd_trapframe_unwind): Ditto. * ia64-tdep.c (ia64_frame_unwind, ia64_sigtramp_frame_unwind) (ia64_libunwind_frame_unwind) (ia64_libunwind_sigtramp_frame_unwind): Ditto. * iq2000-tdep.c (iq2000_frame_unwind): Ditto. * lm32-tdep.c (lm32_frame_unwind): Ditto. * m32c-tdep.c (m32c_unwind): Ditto. * m32r-linux-tdep.c (m32r_linux_sigtramp_frame_unwind): Ditto. * m32r-tdep.c (m32r_frame_unwind): Ditto. * m68hc11-tdep.c (m68hc11_frame_unwind): Ditto. * m68k-tdep.c (m68k_frame_unwind): Ditto. * m68klinux-tdep.c (m68k_linux_sigtramp_frame_unwind): Ditto. * m88k-tdep.c (m88k_frame_unwind): Ditto. * mep-tdep.c (mep_frame_unwind): Ditto. * microblaze-tdep.c (microblaze_frame_unwind): Ditto. * mips-tdep.c (mips_insn16_frame_unwind, mips_insn32_frame_unwind) (mips_stub_frame_unwind): Ditto. * mn10300-tdep.c (mn10300_frame_unwind): Ditto. * moxie-tdep.c (moxie_frame_unwind): Ditto. * mt-tdep.c (mt_frame_unwind): Ditto. * ppc-linux-tdep.c (ppu2spu_unwind): Ditto. * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_unwind): Ditto. * rs6000-tdep.c (rs6000_frame_unwind): Ditto. * s390-tdep.c (s390_frame_unwind, s390_stub_frame_unwind) (s390_sigtramp_frame_unwind): Ditto. * score-tdep.c (score_prologue_unwind): Ditto. * sh-tdep.c (sh_frame_unwind): Ditto. * sh64-tdep.c (sh64_frame_unwind): Ditto. * sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_unwind): Ditto. * sparc-tdep.c (sparc32_frame_unwind): Ditto. * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_unwind): Ditto. * sparc64-tdep.c (sparc64_frame_unwind): Ditto. * sparc64fbsd-tdep.c (sparc64fbsd_sigtramp_frame_unwind): Ditto. * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_unwind): Ditto. * sparc64obsd-tdep.c (sparc64obsd_frame_unwind) (sparc64obsd_trapframe_unwind): Ditto. * sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_unwind): Ditto. * sparcobsd-tdep.c (sparc32obsd_sigtramp_frame_unwind): Ditto. * spu-tdep.c (spu_frame_unwind, spu2ppu_unwind): Ditto. * v850-tdep.c (v850_frame_unwind): Ditto. * vax-tdep.c (vax_frame_unwind): Ditto. * vaxobsd-tdep.c (vaxobsd_sigtramp_frame_unwind): Ditto. * xstormy16-tdep.c (frame_unwind xstormy16_frame_unwind): Ditto. * xtensa-tdep.c (xtensa_unwind): Ditto.
2011-01-122011-01-11 Michael Snyder <msnyder@vmware.com>Michael Snyder
* ui-file.c: Comment cleanup, mostly periods and spaces. * ui-file.h: Ditto. * ui-out.c: Ditto. * ui-out.h: Ditto. * utils.c: Ditto. * v850-tdep.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * value.h: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vax-tdep.c: Ditto. * vec.c: Ditto. * vec.h: Ditto. * version.h: Ditto. * windows-nat.c: Ditto. * windows-tdep.c: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xml-support.c: Ditto. * xstormy16-tdep.c: Ditto. * xtensa-tdep.c: Ditto. * xtensa-tdep.h: Ditto.
2011-01-01run copyright.sh for 2011.Joel Brobecker
2010-08-06 * dwarf2-frame.c (struct dwarf2_cie): Add ptr_size member.Corinna Vinschen
Throughout, call read_encoded_value with ptr_size rather than addr_size. (decode_frame_entry_1): Remove redundant setting of addr_size. Call gdbarch_dwarf2_addr_size rather than gdbarch_ptr_bit to determine addr_size in Dwarf versions < 4. Set ptr_size dependent on examined frame section. Add comment to explain why. * gdbarch.sh (dwarf2_addr_size): Define as variable. Add lengthy comment to explain usage. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * xstormy16-tdep.c (xstormy16_gdbarch_init): Set dwarf2_addr_size to 4.
2010-01-01Update copyright year in most headers.Joel Brobecker
Automatic update by copyright.sh.
2009-07-02 * defs.h (extract_signed_integer, extract_unsigned_integer,Ulrich Weigand
extract_long_unsigned_integer, store_signed_integer, store_unsigned_integer): Add BYTE_ORDER parameter. * findvar.c (extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer, store_signed_integer, store_unsigned_integer): Add BYTE_ORDER parameter. Use it instead of current_gdbarch. * gdbcore.h (read_memory_integer, safe_read_memory_integer, read_memory_unsigned_integer, write_memory_signed_integer, write_memory_unsigned_integer): Add BYTE_ORDER parameter. * corefile.c (struct captured_read_memory_integer_arguments): Add BYTE_ORDER member. (safe_read_memory_integer): Add BYTE_ORDER parameter. Store it into struct captured_read_memory_integer_arguments. (do_captured_read_memory_integer): Pass it to read_memory_integer. (read_memory_integer): Add BYTE_ORDER parameter. Pass it to extract_signed_integer. (read_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to extract_unsigned_integer. (write_memory_signed_integer): Add BYTE_ORDER parameter. Pass it to store_signed_integer. (write_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to store_unsigned_integer. * target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter. * target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter. Pass it to extract_unsigned_integer. Update calls to extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer, store_signed_integer, store_unsigned_integer, read_memory_integer, read_memory_unsigned_integer, safe_read_memory_integer, write_memory_signed_integer, write_memory_unsigned_integer, and get_target_memory_unsigned to pass byte order: * ada-lang.c (ada_value_binop): Update. * ada-valprint.c (char_at): Update. * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update. * alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call, alpha_extract_return_value, alpha_read_insn, alpha_get_longjmp_target): Update. * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update. * amd64obsd-tdep.c (amd64obsd_supply_uthread, amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update. * amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue, amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel, amd64_displaced_step_fixup): Update. * arm-linux-tdep.c (arm_linux_sigreturn_init, arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update. * arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc, arm_get_next_pc, arm_extract_return_value, arm_store_return_value, arm_return_value): Update. * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update. * auxv.c (default_auxv_parse): Update. * avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address, avr_scan_prologue, avr_extract_return_value, avr_frame_prev_register, avr_push_dummy_call): Update. * bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset, bsd_uthread_wait, bsd_uthread_thread_alive, bsd_uthread_extra_thread_info): Update. * c-lang.c (c_printstr, print_wchar): Update. * cp-valprint.c (cp_print_class_member): Update. * cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache, cris_push_dummy_call, cris_scan_prologue, cris_store_return_value, cris_extract_return_value, find_step_target, dip_prefix, sixteen_bit_offset_branch_op, none_reg_mode_jump_op, move_mem_to_reg_movem_op, get_data_from_address): Update. * dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update. * dwarf2-frame.c (execute_cfa_program): Update. * dwarf2loc.c (find_location_expression): Update. * dwarf2read.c (dwarf2_const_value): Update. * expprint.c (print_subexp_standard): Update. * findvar.c (unsigned_pointer_to_address, signed_pointer_to_address, unsigned_address_to_pointer, address_to_signed_pointer, read_var_value): Update. * frame.c (frame_unwind_register_signed, frame_unwind_register_unsigned, get_frame_memory_signed, get_frame_memory_unsigned): Update. * frame-unwind.c (frame_unwind_got_constant): Update. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp, frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache): Update. * frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue, frv_extract_return_value, find_func_descr, frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update. * f-valprint.c (f_val_print): Update. * gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr): Update. * h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue, h8300_push_dummy_call, h8300_extract_return_value, h8300h_extract_return_value, h8300_store_return_value, h8300h_store_return_value): Update. * hppabsd-tdep.c (hppabsd_find_global_pointer): Update. * hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register): Update. * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline, hppa64_hpux_in_solib_call_trampoline, hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code, hppa_hpux_sigtramp_frame_unwind_cache, hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer, hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern, hppa32_hpux_search_dummy_call_sequence, hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state, hppa_hpux_unwind_adjust_stub): Update. * hppa-linux-tdep.c (insns_match_pattern, hppa_linux_find_global_pointer): Update. * hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call, hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call, skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache, hppa_pseudo_register_read, hppa_frame_prev_register_helper, hppa_match_insns): Update. * hpux-thread.c (hpux_thread_fetch_registers): Update. * i386-tdep.c (i386bsd_sigcontext_addr): Update. * i386-cygwin-tdep.c (core_process_module_section): Update. * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn, amd64_darwin_sstep_at_sigreturn): Update. * i386-darwin-tdep.c (i386_darwin_sigcontext_addr, amd64_darwin_sigcontext_addr): Likewise. * i386-linux-nat.c (i386_linux_sigcontext_addr): Update. * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update. * i386-nto-tdep.c (i386nto_sigcontext_addr): Update. * i386obsd-nat.c (i386obsd_supply_pcb): Update. * i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread, i386obsd_trapframe_cache): Update. * i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump, i386_analyze_frame_setup, i386_analyze_prologue, i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache, i386_get_longjmp_target, i386_push_dummy_call, i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr, i386_fetch_pointer_argument): Update. * i387-tdep.c (i387_supply_fsave): Update. * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update. * ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write, examine_prologue, ia64_frame_cache, ia64_frame_prev_register, ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register, ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id, ia64_libunwind_frame_prev_register, ia64_libunwind_sigtramp_frame_this_id, ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer, find_extant_func_descr, find_func_descr, ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id, ia64_unwind_pc): Update. * iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer, iq2000_scan_prologue, iq2000_extract_return_value, iq2000_push_dummy_call): Update. * irix5nat.c (fill_gregset): Update. * jv-lang.c (evaluate_subexp_java): Update. * jv-valprint.c (java_value_print): Update. * lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call, lm32_extract_return_value, lm32_store_return_value): Update. * m32c-tdep.c (m32c_push_dummy_call, m32c_return_value, m32c_skip_trampoline_code, m32c_m16c_address_to_pointer, m32c_m16c_pointer_to_address): Update. * m32r-tdep.c (m32r_store_return_value, decode_prologue, m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value): Update. * m68hc11-tdep.c (m68hc11_pseudo_register_read, m68hc11_pseudo_register_write, m68hc11_analyze_instruction, m68hc11_push_dummy_call): Update. * m68linux-tdep.c (m68k_linux_pc_in_sigtramp, m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache): Update. * m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup, m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache, m68k_get_longjmp_target): Update. * m88k-tdep.c (m88k_fetch_instruction): Update. * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write, mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update. * mi/mi-main.c (mi_cmd_data_write_memory): Update. * mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg, mips64_linux_get_longjmp_target, mips64_fill_gregset, mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update. * mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update. * mips-tdep.c (mips_fetch_instruction, fetch_mips_16, mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call, mips_o32_push_dummy_call, mips_o64_push_dummy_call, mips_single_step_through_delay, mips_skip_pic_trampoline_code, mips_integer_to_address): Update. * mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call): Update. * monitor.c (monitor_supply_register, monitor_write_memory, monitor_read_memory_single): Update. * moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value, moxie_analyze_prologue): Update. * mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor, mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info, mt_push_dummy_call): Update. * objc-lang.c (read_objc_method, read_objc_methlist_nmethods, read_objc_methlist_method, read_objc_object, read_objc_super, read_objc_class, find_implementation_from_class): Update. * ppc64-linux-tdep.c (ppc64_desc_entry_point, ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache): Update. * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer, ppcobsd_sigtramp_frame_cache): Update. * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call, do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call, ppc64_sysv_abi_return_value): Update. * ppc-linux-nat.c (ppc_linux_auxv_parse): Update. * procfs.c (procfs_auxv_parse): Update. * p-valprint.c (pascal_val_print): Update. * regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned, regcache_raw_write_signed, regcache_raw_write_unsigned, regcache_cooked_read_signed, regcache_cooked_read_unsigned, regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update. * remote-m32r-sdi.c (m32r_fetch_register): Update. * remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory): Update. * rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value, rs6000_convert_from_func_ptr_addr, branch_dest, rs6000_software_single_step): Update. * rs6000-tdep.c (rs6000_in_function_epilogue_p, ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence, bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue, rs6000_skip_main_prologue, rs6000_skip_trampoline_code, rs6000_frame_cache): Update. * s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write, s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load, s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache, extend_simple_arg, s390_push_dummy_call, s390_return_value): Update. * scm-exp.c (scm_lreadr): Update. * scm-lang.c (scm_get_field, scm_unpack): Update. * scm-valprint.c (scm_val_print): Update. * score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call, score_fetch_inst): Update. * sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way, sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value, sh64_pseudo_register_read, sh64_pseudo_register_write, sh64_frame_prev_register): Update: * sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu, sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu, sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update. * solib-darwin.c (darwin_load_image_infos): Update. * solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2, find_canonical_descriptor_in_load_object): Update. * solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos, irix_open_symbol_file_object): Update. * solib-som.c (som_solib_create_inferior_hook, link_map_start, som_current_sos, som_open_symbol_file_object): Update. * solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME): Update. * solib-svr4.c (read_program_header, scan_dyntag_auxv, solib_svr4_r_ldsomap): Update. * sparc64-linux-tdep.c (sparc64_linux_step_trap): Update. * sparc64obsd-tdep.c (sparc64obsd_supply_uthread, sparc64obsd_collect_uthread): Update. * sparc64-tdep.c (sparc64_pseudo_register_read, sparc64_pseudo_register_write, sparc64_supply_gregset, sparc64_collect_gregset): Update. * sparc-linux-tdep.c (sparc32_linux_step_trap): Update. * sparcobsd-tdep.c (sparc32obsd_supply_uthread, sparc32obsd_collect_uthread): Update. * sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code, sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow, sparc_collect_rwindow): Update. * spu-linux-nat.c (parse_spufs_run): Update. * spu-tdep.c (spu_pseudo_register_read_spu, spu_pseudo_register_write_spu, spu_pointer_to_address, spu_analyze_prologue, spu_in_function_epilogue_p, spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step, spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect, info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist, info_spu_dma_command, info_spu_proxydma_command): Update. * stack.c (print_frame_nameless_args, frame_info): Update. * symfile.c (read_target_long_array, simple_read_overlay_table, simple_read_overlay_region_table): Update. * target.c (debug_print_register): Update. * tramp-frame.c (tramp_frame_start): Update. * v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call, v850_extract_return_value, v850_store_return_value, * valarith.c (value_binop, value_bit_index): Update. * valops.c (value_cast): Update. * valprint.c (val_print_type_code_int, val_print_string, read_string): Update. * value.c (unpack_long, unpack_double, unpack_field_as_long, modify_field, pack_long): Update. * vax-tdep.c (vax_store_arguments, vax_push_dummy_call, vax_skip_prologue): Update. * xstormy16-tdep.c (xstormy16_push_dummy_call, xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p, xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry, xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update. * xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read, xtensa_pseudo_register_write, xtensa_frame_cache, xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update. * dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral, decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter. (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT parameters. (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters. (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters. * dfp.c (match_endianness): Add BYTE_ORDER parameter. Use it instead of current_gdbarch. (decimal_to_string, decimal_from_integral, decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter. Pass it to match_endianness. (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT parameters. Pass them to match_endianness. (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters. Pass them to match_endianness. (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters. Pass them to match_endianness. * valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and BYTE_ORDER_Y output parameters. (value_binop): Update call to value_args_as_decimal. Update calls to decimal_to_string, decimal_from_string, decimal_from_integral, decimal_from_floating, decimal_to_doublest, decimal_is_zero, decimal_binop, decimal_compare and decimal_convert to pass/receive byte order: * c-exp.y (parse_number): Update. * printcmd.c (printf_command): Update. * valarith.c (value_args_as_decimal, value_binop, value_logical_not, value_equal, value_less): Update. * valops.c (value_cast, value_one): Update. * valprint.c (print_decimal_floating): Update. * value.c (unpack_long, unpack_double): Update. * python/python-value.c (valpy_nonzero): Update. * ada-valprint.c (char_at): Add BYTE_ORDER parameter. (printstr): Update calls to char_at. (ada_val_print_array): Likewise. * valprint.c (read_string): Add BYTE_ORDER parameter. (val_print_string): Update call to read_string. * c-lang.c (c_get_string): Likewise. * charset.h (target_wide_charset): Add BYTE_ORDER parameter. * charset.c (target_wide_charset): Add BYTE_ORDER parameter. Use it instead of current_gdbarch. * printcmd.c (printf_command): Update calls to target_wide_charset. * c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter. Pass to target_wide_charset. Use it instead of current_gdbarch. (classify_type): Add BYTE_ORDER parameter. Pass to charset_for_string_type. Allow NULL encoding pointer. (print_wchar): Add BYTE_ORDER parameter. (c_emit_char): Update calls to classify_type and print_wchar. (c_printchar, c_printstr): Likewise. * gdbarch.sh (in_solib_return_trampoline): Convert to type "m". * gdbarch.c, gdbarch.h: Regenerate. * arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH parameter. * arch-utils.c (generic_in_solib_return_trampoline): Likewise. * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise. * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise. (rs6000_skip_trampoline_code): Update call. * alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to dynamic_sigtramp_offset and pc_in_sigtramp callbacks. (alpha_read_insn): Add GDBARCH parameter. * alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter. (alpha_register_to_value): Pass architecture to alpha_sts. (alpha_extract_return_value): Likewise. (alpha_value_to_register): Pass architecture to alpha_lds. (alpha_store_return_value): Likewise. (alpha_read_insn): Add GDBARCH parameter. (alpha_skip_prologue): Pass architecture to alpha_read_insn. (alpha_heuristic_proc_start): Likewise. (alpha_heuristic_frame_unwind_cache): Likewise. (alpha_next_pc): Likewise. (alpha_sigtramp_frame_this_id): Pass architecture to tdep->dynamic_sigtramp_offset callback. (alpha_sigtramp_frame_sniffer): Pass architecture to tdep->pc_in_sigtramp callback. * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter. (alphafbsd_sigtramp_offset): Likewise. * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH parameter. Pass to alpha_read_insn. (alpha_linux_sigtramp_offset): Add GDBARCH parameter. Pass to alpha_linux_sigtramp_offset_1. (alpha_linux_pc_in_sigtramp): Add GDBARCH parameter. Pass to alpha_linux_sigtramp_offset. (alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn and alpha_linux_sigtramp_offset. * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter. (alphanbsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to alphanbsd_sigtramp_offset. * alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter. (alphaobsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to alpha_read_insn. (alphaobsd_sigcontext_addr): Pass architecture to alphaobsd_sigtramp_offset. * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH parameter. * amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter. (amd64_skip_prologue): Pass architecture to amd64_analyze_prologue. (amd64_frame_cache): Likewise. * arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove. (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue, thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros. * arm-wince-tdep.c: Include "frame.h". * avr-tdep.c (EXTRACT_INSN): Remove. (avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN. (avr_skip_prologue): Pass architecture to avr_scan_prologue. (avr_frame_unwind_cache): Likewise. * cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member. (find_step_target): Initialize it. (get_data_from_address): Add BYTE_ORDER parameter. (bdap_prefix): Pass byte order to get_data_from_address. (handle_prefix_assign_mode_for_aritm_op): Likewise. (three_operand_add_sub_cmp_and_or_op): Likewise. (handle_inc_and_index_mode_for_aritm_op): Likewise. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter. (frv_linux_sigcontext_reg_addr): Pass architecture to frv_linux_pc_in_sigtramp. (frv_linux_sigtramp_frame_sniffer): Likewise. * h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter. (h8300_analyze_prologue): Add GDBARCH parameter. Pass to h8300_is_argument_spill. (h8300_frame_cache, h8300_skip_prologue): Pass architecture to h8300_analyze_prologue. * hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to in_solib_call_trampoline callback. (hppa_in_solib_call_trampoline): Add GDBARCH parameter. * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH parameter. (hppa64_push_dummy_call): Pass architecture to hppa64_convert_code_addr_to_fptr. (hppa_match_insns): Add GDBARCH parameter. (hppa_match_insns_relaxed): Add GDBARCH parameter. Pass to hppa_match_insns. (hppa_skip_trampoline_code): Pass architecture to hppa_match_insns. (hppa_in_solib_call_trampoline): Add GDBARCH parameter. Pass to hppa_match_insns_relaxed. (hppa_stub_unwind_sniffer): Pass architecture to tdep->in_solib_call_trampoline callback. * hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter. (hppa32_hpux_search_dummy_call_sequence): Pass architecture to hppa_hpux_search_pattern. * hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter. (hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter. Pass to insns_match_pattern. (hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to hppa_linux_sigtramp_find_sigcontext. (hppa_linux_sigtramp_frame_sniffer): Likewise. (hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter. (hppa64_hpux_in_solib_call_trampoline): Likewise. * i386-tdep.c (i386_follow_jump): Add GDBARCH parameter. (i386_analyze_frame_setup): Add GDBARCH parameter. (i386_analyze_prologue): Add GDBARCH parameter. Pass to i386_follow_jump and i386_analyze_frame_setup. (i386_skip_prologue): Pass architecture to i386_analyze_prologue and i386_follow_jump. (i386_frame_cache): Pass architecture to i386_analyze_prologue. (i386_pe_skip_trampoline_code): Add FRAME parameter. * i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter. * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass frame to i386_pe_skip_trampoline_code. * ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to sigcontext_register_address callback. * ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter. (ia64_find_unwind_table): Pass architecture to ia64_find_global_pointer. (find_extant_func_descr): Add GDBARCH parameter. (find_func_descr): Pass architecture to find_extant_func_descr and ia64_find_global_pointer. (ia64_sigtramp_frame_init_saved_regs): Pass architecture to tdep->sigcontext_register_address callback. * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add GDBARCH parameter. * iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter. (iq2000_frame_cache): Pass architecture to iq2000_scan_prologue. * lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter. (lm32_skip_prologue, lm32_frame_cache): Pass architecture to lm32_analyze_prologue. * m32r-tdep.c (decode_prologue): Add GDBARCH parameter. (m32r_skip_prologue): Pass architecture to decode_prologue. * m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter. (m68hc11_scan_prologue): Pass architecture to m68hc11_analyze_instruction. * m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter. (m68k_analyze_prologue): Pass architecture to m68k_analyze_frame_setup. * m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter. (m88k_analyze_prologue): Add GDBARCH parameter. Pass byte order to m88k_fetch_instruction. (m88k_skip_prologue): Pass architecture to m88k_analyze_prologue. (m88k_frame_cache): Likewise. * mep-tdep.c (mep_get_insn): Add GDBARCH parameter. (mep_analyze_prologue): Pass architecture to mep_get_insn. * mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter. (mips32_next_pc): Pass architecture to mips_fetch_instruction. (deal_with_atomic_sequence): Likewise. (unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction. (mips16_scan_prologue): Likewise. (mips32_scan_prologue): Likewise. (mips16_in_function_epilogue_p): Likewise. (mips32_in_function_epilogue_p): Likewise. (mips_about_to_return): Likewise. (mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue. (mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue. (mips_skip_prologue): Pass architecture to mips16_scan_prologue and mips32_scan_prologue. (mips_in_function_epilogue_p): Pass architecture to mips16_in_function_epilogue_p and mips32_in_function_epilogue_p. (heuristic_proc_start): Pass architecture to mips_fetch_instruction and mips_about_to_return. (mips_skip_mips16_trampoline_code): Pass architecture to mips_fetch_instruction. (fetch_mips_16): Add GDBARCH parameter. (mips16_next_pc): Pass architecture to fetch_mips_16. (extended_mips16_next_pc): Pass architecture to unpack_mips16 and fetch_mips_16. * objc-lang.c (read_objc_method, read_objc_methlist_nmethods, read_objc_methlist_method, read_objc_object, read_objc_super, read_objc_class): Add GDBARCH parameter. (find_implementation_from_class): Add GDBARCH parameter, pass to read_objc_class, read_objc_methlist_nmethods, and read_objc_methlist_method. (find_implementation): Add GDBARCH parameter, pass to read_objc_object and find_implementation_from_class. (resolve_msgsend, resolve_msgsend_stret): Pass architecture to find_implementation. (resolve_msgsend_super, resolve_msgsend_super_stret): Pass architecture to read_objc_super and find_implementation_from_class. * ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter. (ppc64_standard_linkage1_target, ppc64_standard_linkage2_target, ppc64_standard_linkage3_target): Pass architecture to ppc64_desc_entry_point. * rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter. (skip_prologue): Pass byte order to bl_to_blrl_insn_p. (rs6000_fetch_instruction): Add GDBARCH parameter. (rs6000_skip_stack_check): Add GDBARCH parameter, pass to rs6000_fetch_instruction. (skip_prologue): Pass architecture to rs6000_fetch_instruction. * remote-mips.c (mips_store_word): Return old_contents as host integer value instead of target bytes. * s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member. (s390_analyze_prologue): Initialize it. (extend_simple_arg): Add GDBARCH parameter. (s390_push_dummy_call): Pass architecture to extend_simple_arg. * scm-lang.c (scm_get_field): Add BYTE_ORDER parameter. * scm-lang.h (scm_get_field): Add BYTE_ORDER parameter. (SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field. * scm-valprint.c (scm_scmval_print): Likewise. (scm_scmlist_print, scm_ipruk, scm_scmval_print): Define SCM_BYTE_ORDER. * sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter. (sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to look_for_args_moves. (sh64_skip_prologue): Pass architecture to sh64_skip_prologue_hard_way. * sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter. (sh_skip_prologue): Pass architecture to sh_analyze_prologue. (sh_frame_cache): Likewise. * solib-irix.c (extract_mips_address): Add GDBARCH parameter. (fetch_lm_info, irix_current_sos, irix_open_symbol_file_object): Pass architecture to extract_mips_address. * sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter. * sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter. (sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture to sparc_fetch_wcookie. (sparc32_frame_prev_register): Likewise. * sparc64-tdep.c (sparc64_frame_prev_register): Likewise. * sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise. * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise. * spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter. (spu_skip_prologue): Pass architecture to spu_analyze_prologue. (spu_virtual_frame_pointer): Likewise. (spu_frame_unwind_cache): Likewise. (info_spu_mailbox_list): Add BYTE_ORER parameter. (info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list. (info_spu_dma_cmdlist): Add BYTE_ORER parameter. (info_spu_dma_command, info_spu_proxydma_command): Pass byte order to info_spu_dma_cmdlist. * symfile.c (read_target_long_array): Add GDBARCH parameter. (simple_read_overlay_table, simple_read_overlay_region_table, simple_overlay_update_1): Pass architecture to read_target_long_array. * v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter. (v850_frame_cache): Pass architecture to v850_analyze_prologue. * xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH parameter. (xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture to xstormy16_analyze_prologue. (xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter. (xstormy16_find_jmp_table_entry): Likewise. (xstormy16_skip_trampoline_code): Pass architecture to xstormy16_resolve_jmp_table_entry. (xstormy16_pointer_to_address): Likewise. (xstormy16_address_to_pointer): Pass architecture to xstormy16_find_jmp_table_entry. * xtensa-tdep.c (call0_track_op): Add GDBARCH parameter. (call0_analyze_prologue): Add GDBARCH parameter, pass to call0_track_op. (call0_frame_cache): Pass architecture to call0_analyze_prologue. (xtensa_skip_prologue): Likewise.
2009-07-02 * gdbtypes.h (builtin_type_int0, builtin_type_int8, builtin_type_uint8,Ulrich Weigand
builtin_type_int16, builtin_type_uint16, builtin_type_int32, builtin_type_uint32, builtin_type_int64, builtin_type_uint64, builtin_type_int128, builtin_type_uint128): Remove. (struct builtin_type): New members builtin_int0, builtin_int8, builtin_uint8, builtin_int16, builtin_uint16, builtin_int32, builtin_uint32, builtin_int64, builtin_uint64, builtin_int128, and builtin_uint128. * gdbtypes.c (builtin_type_int0, builtin_type_int8, builtin_type_uint8, builtin_type_int16, builtin_type_uint16, builtin_type_int32, builtin_type_uint32, builtin_type_int64, builtin_type_uint64, builtin_type_int128, builtin_type_uint128): Remove. (_initialize_gdbtypes): Do not initialize them. (gdbtypes_post_init): Initialize fixed-size integer types. * dwarf2expr.c (unsigned_address_type, signed_address_type): Add GDBARCH argument. Return platform-specific type. (dwarf2_read_address, execute_stack_op): Update calls. * target-descriptions.c (tdesc_gdb_type): Use platform-specific types instead of global builtin_int_... variables. * mi/mi-main.c (mi_cmd_data_read_memory): Likewise. * printcmd.c (do_examine): Likewise. * jv-exp.y (parse_number): Likewise. * alpha-tdep.c (alpha_register_type, alpha_push_dummy_call, alpha_store_return_value): Likewise. * amd64-linux-tdep.c (amd64_linux_register_type): Likewise. * amd64-tdep.c (amd64_register_type): Likewise. * arm-tdep.c (arm_register_type): Likewise. * avr-tdep.c (avr_register_type): Likewise. * cris-tdep.c (cris_register_type, crisv32_register_type): Likewise. * frv-tdep.c (frv_register_type): Likewise. * h8300-tdep.c h8300_register_type): Likewise. * hppa-tdep.c (hppa64_push_dummy_call, hppa32_register_type, hppa64_register_type): Likewise. * i386-tdep.c (i386_mmx_type, i386_sse_type): Likewise. * iq2000-tdep.c (iq2000_register_type): Likewise. * lm32-tdep.c (lm32_register_type, lm32_push_dummy_call): Likewise. * m32r-tdep.c (m32r_register_type): Likewise. * m68hc11-tdep.c (m68hc11_register_type, m68hc11_pseudo_register_read, m68hc11_pseudo_register_write): Likewise. * m68k-tdep.c (m68k_register_type): Likewise. * m88k-tdep.c (m88k_register_type, m88k_store_arguments): Likewise. * mep-tdep.c (mep_register_type): Likewise. * mips-tdep.c (mips_register_type, mips_pseudo_register_type, mips_print_fp_register): Likewise. * moxie-tdep.c (moxie_register_type): Likewise. * mt-tdep.c (mt_copro_register_type, mt_register_type): Likewise. * rs6000-tdep.c (rs6000_builtin_type_vec64, rs6000_builtin_type_vec128): Likewise. * score-tdep.c (score_register_type): Likewise. * sparc-tdep.c (sparc32_register_type, sparc32_store_arguments): Likewise. * sparc64-tdep.c (sparc64_register_type, sparc64_store_arguments): Likewise. * spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise. * v850-tdep.c (v850_register_type): Likewise. * xstormy16-tdep.c (xstormy16_register_type): Likewise. * xtensa-tdep.c (xtensa_register_type): Likewise. * mt-tdep.c (struct gdbarch_tdep): New data structure. (mt_gdbarch_init): Alloc TDEP structures. (mt_register_type): Cache coprocessor type in TDEP instead of static global variable. * xtensa-tdep.h (struct gdbarch_tdep): Add type_entries member. * xtensa-tdep.c (type_entries): Remove. (xtensa_register_type): Cache fixed-size types in TDEP instead of in global variable.
2009-06-17 * gdbarch.sh (pointer_to_address): Change to type 'm'.Ulrich Weigand
(address_to_pointer): Likewise. * gdbarch.c, gdbarch.h: Regenerate. * inferior.h (unsigned_pointer_to_address): Add GDBARCH argument. (signed_pointer_to_address): Likewise. (unsigned_address_to_pointer, address_to_signed_pointer): Likewise. * findvar.c (unsigned_pointer_to_address): Likewise. (signed_pointer_to_address): Likewise. (unsigned_address_to_pointer, address_to_signed_pointer): Likewise. * avr-tdep.c (avr_address_to_pointer): Likewise. (avr_pointer_to_address): Likewise. * iq2000-tdep.c (iq2000_pointer_to_address): Likewise. (iq2000_address_to_pointer): Likewise. * m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise. (m32c_m16c_pointer_to_address): Likewise. * spu-tdep.c (spu_pointer_to_address): Likewise. * xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise. (xstormy16_address_to_pointer): Likewise.
2009-01-03 Updated copyright notices for most files.Joel Brobecker
2008-08-21 * arm-tdep.c (arm_pc_is_thumb): Use obj_section_addr.Pedro Alves
* hppa-hpux-tdep.c (hppa_hpux_find_dummy_bpaddr): Likewise. * hppa-linux-tdep.c (hppa_linux_find_global_pointer): Use obj_section_addr and obj_section_endaddr. * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Likewise. * hppabsd-tdep.c (hppabsd_find_global_pointer): Likewise. * ia64-tdep.c (ia64_find_global_pointer): Likewise. (find_extant_func_descr): Likewise. * solib-frv.c (frv_relocate_main_executable): Use obj_section_addr. * xstormy16-tdep.c (xstormy16_find_jmp_table_entry): Use obj_section_addr and obj_section_endaddr.
2008-06-28 * alphafbsd-tdep.c: Update for unwinder changes.Ulrich Weigand
* alpha-linux-tdep.c: Likewise. * alphanbsd-tdep.c: Likewise. * alphaobsd-tdep.c: Likewise. * avr-tdep.c: Likewise. * cris-tdep.c: Likewise. * frv-linux-tdep.c: Likewise. * frv-tdep.c: Likewise. * h8300-tdep.c: Likewise. * hppa-linux-tdep.c: Likewise. * iq2000-tdep.c: Likewise. * m32c-tdep.c: Likewise. * m32r-linux-tdep.c: Likewise. * m32r-tdep.c: Likewise. * m68hc11-tdep.c: Likewise. * mep-tdep.c: Likewise. * mn10300-tdep.c: Likewise. * mt-tdep.c: Likewise. * score-tdep.c: Likewise. * sh64-tdep.c: Likewise. * sh-tdep.c: Likewise. * sparc64fbsd-tdep.c: Likewise. * sparc64nbsd-tdep.c: Likewise. * sparc64obsd-tdep.c: Likewise. * v850-tdep.c: Likewise. * vaxobsd-tdep.c: Likewise. * vax-tdep.c: Likewise. * xstormy16-tdep.c: Likewise.
2008-05-19 * symtab.h (lookup_symbol_in_language): Remove SYMTAB parameter.Ulrich Weigand
(lookup_symbol): Likewise. * symtab.c (lookup_symbol_in_language): Remove SYMTAB parameter. (lookup_symbol): Likewise. (search_symbols): Update. * linespec.c (find_methods, collect_methods): Update. (add_matching_methods, add_constructors): Update. (decode_compound, decode_dollar, decode_variable): Update. (lookup_prefix_sym): Update. (symbol_found): Remove SYM_SYMTAB parameter. Use SYMBOL_SYMTAB (sym) instead. * gdbtypes.c (lookup_typename): Update. (lookup_struct, lookup_union, lookup_enum): Update. (lookup_template_type): Update. (check_typedef): Update. * language.c (lang_bool_type): Update. * mdebugread.c (parse_procedure): Update. * mi/mi-cmd-stack.c (list_args_or_locals): Update. * parse.c (write_dollar_variable): Update. * printcmd.c (address_info): Update. * source.c (select_source_symtab): Update. * stack.c (print_frame_args, print_frame_arg_vars): Update. * valops.c (find_function_in_inferior): Update. (value_struct_elt_for_reference): Update. * value.c (value_static_field, value_fn_field): Update. * alpha-mdebug-tdep.c (find_proc_desc): Update. * arm-tdep.c (arm_skip_prologue): Update. * mt-tdep.c (mt_skip_prologue): Update. * xstormy16-tdep.c (xstormy16_skip_prologue): Update. * ada-lang.h (struct ada_symbol_info): Remove SYMTAB member. * ada-lang.c (ada_add_block_symbols): Remove SYMTAB parameter. (add_defn_to_vec): Likewise. (ada_add_block_symbols): Likewise. (lookup_cached_symbol, cache_symbol): Likewise. (standard_lookup): Update. (ada_lookup_symbol_list): Update. * c-valprint.c (c_val_print): Update. * cp-support.c (cp_lookup_rtti_type): Update. * jv-lang.c (java_lookup_class, get_java_object_type): Update. * objc-lang.c (lookup_struct_typedef, find_imps): Update. * p-valprint.c (pascal_val_print): Update. * scm-lang.c (scm_lookup_name): Update. * c-exp.y: Update. * f-exp.y: Update. * jv-exp.y: Update. * m2-exp.y: Update. * objc-exp.y: Update. * p-exp.y: Update.
2008-04-22doc/ChangeLog:Corinna Vinschen
-------------- * gdb.texinfo (Set SH Calling convention): New @item. (Show SH Calling convention): Ditto. ChangeLog: ---------- * NEWS: Add information on calling convention and new SH CLI options. * sh-tdep.c (sh_cc_gcc): New static string. (sh_cc_renesas): Ditto. (sh_cc_enum): New static string array. (sh_active_calling_convention): New static string pointer denoting active user chosen ABI. (sh_is_renesas_calling_convention): New function to return function specific ABI, or user choice if necessary. (sh_use_struct_convention): Rename first argument and turn around its meaning. Check for renesas ABI and return accordingly. (sh_use_struct_convention_nofpu): New function. (sh_next_flt_argreg): Get function type as third parameter. Check for renesas ABI and choose floating registers accordingly. (sh_push_dummy_call_fpu): Check for ABI and choose argument slot and struct return slot accordingly. (sh_push_dummy_call_nofpu): Ditto. (sh_return_value_nofpu): Call sh_use_struct_convention_nofpu from here. Evaluate ABI and give to sh_use_struct_convention_nofpu. (sh_return_value_fpu): Evaluate ABI and give to sh_use_struct_convention. (show_sh_command): New function. (set_sh_command): Ditto. (_initialize_sh_tdep): Initialize `set/show sh calling-convention CLI command. * gdbarch.sh (return_value): Add func_type argument. * gdbarch.c: Regenerate. * gdbarch.h: Ditto. * eval.c (evaluate_subexp_standard): Rename local variable value_type to val_type so as not to collide with value_type function. Call using_struct_return with additional function type argument. * infcall.c (call_function_by_hand): Call using_struct_return and gdbarch_return_value with additional function type argument. * infcmd.c (print_return_value): Take addition func_type argument. Call gdbarch_return_value with additional function type argument. (finish_command_continuation): Call print_return_value with additional function type argument. (finish_command): Ditto. * sparc-tdep.c (sparc32_push_dummy_code): Call using_struct_return with additional function type argument. * stack.c (return_command): Call using_struct_return and gdbarch_return_value with additional function type argument. * value.c (using_struct_return): Take additional function type argument. * value.h (using_struct_return): Accommodate declaration. * alpha-tdep.c (alpha_return_value): Add func_type argument. * amd64-tdep.c (amd64_return_value): Ditto. * arm-tdep.c (arm_return_value): Ditto. * avr-tdep.c (avr_return_value): Ditto. * cris-tdep.c (cris_return_value): Ditto. * frv-tdep.c (frv_return_value): Ditto. * h8300-tdep.c (h8300_return_value): Ditto. (h8300h_return_value): Ditto. * hppa-tdep.c (hppa32_return_value): Ditto. (hppa64_return_value): Ditto. * i386-tdep.c (i386_return_value): Ditto. * ia64-tdep.c (ia64_return_value): Ditto. * iq2000-tdep.c (iq2000_return_value): Ditto. * m32c-tdep.c (m32c_return_value): Ditto. * m32r-tdep.c (m32r_return_value): Ditto. * m68hc11-tdep.c (m68hc11_return_value): Ditto. * m68k-tdep.c (m68k_return_value): Ditto. (m68k_svr4_return_value): Ditto. * m88k-tdep.c (m88k_return_value): Ditto. * mep-tdep.c (mep_return_value): Ditto. * mips-tdep.c (mips_eabi_return_value): Ditto. (mips_n32n64_return_value): Ditto. (mips_o32_return_value): Ditto. (mips_o64_return_value): Ditto. * mn10300-tdep.c (mn10300_return_value): Ditto. * mt-tdep.c (mt_return_value): Ditto. * ppc-linux-tdep.c (ppc_linux_return_value): Ditto. * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): Ditto. (ppc_sysv_abi_broken_return_value): Ditto. (ppc64_sysv_abi_return_value): Ditto. * ppc-tdep.h (ppc_sysv_abi_return_value): Ditto. (ppc_sysv_abi_broken_return_value): Ditto. (ppc64_sysv_abi_return_value): Ditto. * ppcnbsd-tdep.c (ppcnbsd_return_value): Ditto. * rs6000-tdep.c (rs6000_return_value): Ditto. * s390-tdep.c (s390_return_value): Ditto. * score-tdep.c (score_return_value): Ditto. * sh-tdep.c (sh_return_value_nofpu): Ditto. (sh_return_value_fpu): Ditto. * sh64-tdep.c (sh64_return_value): Ditto. * sparc-tdep.c (sparc32_return_value): Ditto. * sparc64-tdep.c (sparc64_return_value): Ditto. * spu-tdep.c (spu_return_value): Ditto. * v850-tdep.c (v850_return_value): Ditto. * vax-tdep.c (vax_return_value): Ditto. * xstormy16-tdep.c (xstormy16_return_value): Ditto. * xtensa-tdep.c (xtensa_return_value): Ditto. * gdbtypes.h (struct type): Add calling_convention member. * dwarf2read.c (read_subroutine_type): Add calling convention read from DW_AT_calling_convention attribute to function type.
2008-01-11 * gdbarch.sh (skip_prologue): Add gdbarchMarkus Deuling
as parameter. * gdbarch.{c,h}: Regenerate. * alpha-tdep.c (alpha_skip_prologue): Add gdbarch as parameter. * amd64-tdep.c (amd64_skip_prologue): Likewise. * avr-tdep.c (avr_skip_prologue): Likewise. * cris-tdep.c (cris_skip_prologue): Likewise. * frv-tdep.c (frv_skip_prologue): Likewise. * h8300-tdep.c (h8300_skip_prologue): Likewise. * hppa-tdep.c (hppa_skip_prologue): Likewise. * i386-tdep.c (i386_skip_prologue): Likewise. * ia64-tdep.c (ia64_skip_prologue): Likewise. * iq2000-tdep.c (iq2000_skip_prologue): Likewise. * m32r-tdep.c (m32r_skip_prologue): Likewise. * m68hc11-tdep.c (m68hc11_skip_prologue): Likewise. * m68k-tdep.c (m68k_skip_prologue): Likewise. * m88k-tdep.c (m88k_skip_prologue): Likewise. * mep-tdep.c (mep_skip_prologue): Likewise. * mips-tdep.c (mips_skip_prologue): Likewise. * mn10300-tdep.c (mn10300_skip_prologue): Likewise. * mt-tdep.c (mt_skip_prologue): Likewise. * rs6000-tdep.c (rs6000_skip_prologue): Likewise. * score-tdep.c (score_skip_prologue): Likewise. * sh64-tdep.c (sh64_skip_prologue): Likewise. * sh-tdep.c (sh_skip_prologue): Likewise. * sparc64-tdep.c (sparc64_skip_prologue): Likewise. * sparc-tdep.c (sparc32_skip_prologue): Likewise. * spu-tdep.c (spu_skip_prologue): Likewise. * v850-tdep.c (v850_skip_prologue): Likewise. * vax-tdep.c (vax_skip_prologue): Likewise. * xstormy16-tdep.c (xstormy16_skip_prologue): Likewise. * xtensa-tdep.c (xtensa_skip_prologue): Likewise. * arm-tdep.c (arm_skip_prologue): Add gdbarch as parameter. Replace current_gdbarch by gdbarch. * m32c-tdep.c (m32c_skip_prologue): Likewise. * s390-tdep.c (s390_skip_prologue): Likewise.
2008-01-01 Updated copyright notices for most files.Daniel Jacobowitz
2007-11-072007-11-07 Markus Deuling <deuling@de.ibm.com>Markus Deuling
* shnbsd-tdep.c (shnbsd_supply_gregset, shnbsd_collect_gregset): Use get_regcache_arch to get at the current architecture by regcache. * xstormy16-tdep.c (xstormy16_frame_prev_register): Use get_frame_arch to get at the current architecture by frame_info. * fbsd-nat.c (fbsd_make_corefile_notes): Use get_regcache_arch to get at the current architecture by regcache. * gnu-v3-abi.c (gnuv3_skip_trampoline): Use get_frame_arch to get at the current architecture by frame_info. (build_gdb_vtable_type): Replace current_gdbarch by gdbarch. * aix-thread.c (special_register_p): Add gdbarch as parameter. (fetch_regs_kernel_thread, store_regs_kernel_thread): Add gdbarch to caller of special_register_p.
2007-11-07*** empty log message ***Markus Deuling
2007-11-022007-11-02 Markus Deuling <deuling@de.ibm.com>Ulrich Weigand
* gdbarch.sh (register_name): Add gdbarch parameter. * gdbarch.{c,h}: Regenerate. * target-descriptions.c (tdesc_register_name): Add gdbarch parameter. (tdesc_register_name): Replace current_gdbarch by gdbarch. * target-descriptions.h (tdesc_register_name): Add gdbarch parameter. * xstormy16-tdep.c (xstormy16_register_name): Add gdbarch parameter. * vax-tdep.c (vax_register_name): Add gdbarch parameter. * spu-tdep.c (spu_register_name): Add gdbarch parameter. * s390-tdep.c (s390_register_name): Add gdbarch parameter. * mt-tdep.c (mt_register_name): Add gdbarch parameter. (mt_registers_info): Replace current_gdbarch by gdbarch. (mt_register_reggroup_p): Add gdbarch to mt_register_name call. * mips-tdep.c (mips_register_name): Add gdbarch parameter. Replace current_gdbarch by gdbarch. (mips_register_name): Add gdbarch to tdesc_register_name call. * mep-tdep.c (mep_register_name): Add gdbarch parameter. Replace current_gdbarch by gdbarch. (mep_register_reggroup_p): Add gdbarch to mep_register_name call. * m32c-tdep.c (m32c_register_name): Add gdbarch parameter. Replace current_gdbarch by gdbarch. * m88k-tdep.c (m88k_register_name): Add gdbarch parameter. * m68k-tdep.c (m68k_register_name): Add gdbarch parameter. * m32r-tdep.c (m32r_register_name): Add gdbarch parameter. (m32r_frame_unwind_cache): Use get_frame_arch to get at the current architecture by frame_info. * iq2000-tdep.c (iq2000_register_name): Add gdbarch parameter. * ia64-tdep.c (ia64_register_name): Add gdbarch parameter. * hppa-tdep.c (hppa32_register_name, hppa64_register_name): Add gdbarch parameter. * h8300-tdep.c (h8300_register_name, h8300s_register_name) (h8300sx_register_name): Add gdbarch parameter. * cris-tdep.c (cris_register_name, crisv32_register_name): Add gdbarch parameter. Replace current_gdbarch by gdbarch. (cris_gdbarch_init): Replace current_gdbarch by gdbarch (comment). * avr-tdep.c (avr_register_name): Add gdbarch parameter. * arm-tdep.c (arm_register_name): Add gdbarch paramete * amd64-tdep.c (amd64_register_name): Add gdbarch parameter. Update caller. * amd64-tdep.h (amd64_register_name): Add gdbarch parameter. * amd64-linux-tdep.c (amd64_linux_register_name): Add gdbarch parameter. * alpha-tdep.c (alpha_register_name): Add gdbarch parameter. (alpha_cannot_fetch_register, alpha_cannot_store_register): Update call of alpha_register_name. * frv-tdep.c (frv_register_name): Add gdbarch parameter. * i386-tdep.c (i386_register_name): Add gdbarch parameter. Replace current_gdbarch by gdbarch. (i386_register_type): Replace ?current_gdbarch by gdbarch. * i386-tdep.h (i386_register_name): Add gdbarch parameter. * i386-linux-tdep.c (i386_linux_register_name): Add gdbarch parameter. * m68hc11-tdep.c (m68hc11_register_name): Add gdbarch parameter. (m68hc11_register_reggroup_p): Add gdbarch to call of m68hc11_register_name. * mn10300-tdep.c (mn10300_generic_register_name, am33_register_name) (am33_2_register_name): Add gdbarch parameter. (mn10300_frame_unwind_cache): Use get_frame_arch to get at the current architecture by frame_info. (mn10300_dump_tdep): Replace current_gdbarch by gdbarch. * rs6000-tdep.c (rs6000_register_name): Add gdbarch parameter. Replace current_gdbarch by gdbarch. * score-tdep.c (score_register_name): Add gdbarch parameter. (score_return_value, score_push_dummy_call): Replace current_gdbarch by gdbarch. * sh64-tdep.c (sh64_register_name): Add gdbarch parameter. (sh64_compact_reg_base_num, sh64_register_convert_to_virtual) (sh64_register_convert_to_raw, sh64_fv_reg_base_num) (sh64_dr_reg_base_num, sh64_fpp_reg_base_num): Add gdbarch parameter and update caller. Replace current_gdbarch by gdbarch. (sh64_extract_return_value, sh64_store_return_value): Use get_regcache_arch to get at the current architecture by regcache. * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name) (sh_sh3e_register_name, sh_sh2e_register_name, sh_sh2a_register_name) (sh_sh2a_nofpu_register_name, sh_sh_dsp_register_name) (sh_sh3_dsp_register_name, sh_sh4_register_name) (sh_sh4_nofpu_register_name, sh_sh4al_dsp_register_name): Add gdbarch parameter. (fv_reg_base_num, dr_reg_base_num, sh_justify_value_in_reg) (sh_next_flt_argreg): Add gdbarch parameter and update caller. Replace current_gdbarch by gdbarch. (sh_extract_return_value_fpu, sh_store_return_value_fpu): Use get_regcache_arch to get at the current architecture by regcache. * sparc-tdep.c (sparc32_register_name): Add gdbarch parameter. * sparc64-tdep.c (sparc64_register_name): Add gdbarch parameter. * v850-tdep.c (v850_register_name, v850e_register_name): Add gdbarch parameter. (v850_unwind_sp, v850_unwind_pc): Replace current_gdbarch by gdbarch. * xtensa-tdep.c (xtensa_register_name): Add gdbarch parameter. Replace current_gdbarch by gdbarch. (xtensa_pseudo_register_read, xtensa_pseudo_register_write) (xtensa_frame_prev_register): Add gdbarch parameter to xtensa_register_name call.
2007-08-23 Switch the license of all .c files to GPLv3.Joel Brobecker
Switch the license of all .h files to GPLv3. Switch the license of all .cc files to GPLv3.
2007-06-15 * gdbarch.sh (read_pc): Add REGCACHE argument. Remove PTID argument.Ulrich Weigand
(write_pc): Likewise. Remove default implementation, add predicate. * gdbarch.c, gdbarch.h: Regenerate. * regcache.c (read_pc_pid): Use current regcache instead of calling read_register_pid. (write_pc_pid): Check gdbarch_write_pc predicate, implement default case inline. (generic_target_write_pc): Remove. * inferior.h (generic_target_write_pc): Remove. * frv-tdep.c (frv_gdbarch_init): Do not install it. * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise. * rs6000-tdep.c (rs6000_gdbarch_init): Likewise. * sh64-tdep.c (sh64_gdbarch_init): Likewise. * sh-tdep.c (sh_gdbarch_init): Likewise. * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise. * avr-tdep.c (avr_read_pc): Add REGCACHE argument. Remove PTID argument. Use REGCACHE instead of calling read_register_pid. * hppa-hpux-tdep.c (hppa_hpux_read_pc): Likewise. * hppa-tdep.c (hppa_read_pc): Likewise. * hppa-tdep.h (hppa_read_pc): Likewise. * ia64-tdep.c (ia64_read_pc): Likewise. * m32r-tdep.c (m32r_read_pc): Likewise. * mep-tdep.c (mep_read_pc): Likewise. * mn10300-tdep.c (mn10300_read_pc): Likewise. * spu-tdep.c (spu_read_pc): Likewise. * arm-tdep.c (arm_write_pc): Add REGCACHE argument. Remove PTID argument. Use REGCACHE instead of calling write_register_pid. * avr-tdep.c (avr_write_pc): Likewise. * hppa-hpux-tdep.c (hppa_hpux_write_pc): Likewise. * hppa-tdep.c (hppa_write_pc): Likewise. * hppa-tdep.h (hppa_write_pc): Likewise. * i386-linux-tdep.c (i386_linux_write_pc): Likewise. * amd64-linux-tdep.c (amd64_linux_write_pc): Likewise. * ia64-linux-tdep.c (ia64_linux_write_pc): Likewise. * ia64-tdep.c (ia64_write_pc): Likewise. * ia64-tdep.h (ia64_write_pc): Likewise. * m32r-tdep.c (m32r_write_pc): Likewise. * m88k-tdep.c (m88k_write_pc): Likewise. * mep-tdep.c (mep_write_pc): Likewise. * mips-tdep.c (mips_write_pc): Likewise. * mips-linux-tdep.c (mips_linux_write_pc): Likewise. * mn10300-tdep.c (mn10300_write_pc): Likewise. * sparc-tdep.c (sparc_write_pc): Likewise. * spu-tdep.c (spu_write_pc): Likewise. * mips-tdep.c (read_signed_register): Remove. (read_signed_register_pid): Likewise. (mips_read_pc): Add REGCACHE argument. Remove PTID argument. Use REGCACHE instead of calling read_signed_register_pid.