summaryrefslogtreecommitdiff
path: root/gdb/Makefile.in
Commit message (Collapse)AuthorAgeFilesLines
* Remove ada-varobj.h.qiyao2013-10-171-1/+1
| | | | | | | | | | | | | | | | | | | As a result of previous patch, extern functions in ada-varobj.c can be made static, and ada-varobj.h can be removed too. gdb: 2013-10-17 Yao Qi <yao@codesourcery.com> * Makefile.in (HFILES_NO_SRCDIR): Remove ada-varobj.h. * ada-varobj.c: Remove the include of ada-varobj.h. (ada_varobj_get_number_of_children): Declare. (ada_varobj_get_name_of_child): Make it static. (ada_varobj_get_path_expr_of_child): Likewise. (ada_varobj_get_value_of_child): Likewise. (ada_varobj_get_type_of_child): Likewise. (ada_varobj_get_value_of_array_variable): Likewise. * ada-varobj.h: Remove.
* gdb/qiyao2013-10-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (SFILES): Add c-varobj.c and jv-varobj.c. (COMMON_OBS): Add c-varobj.o and jv-varobj.o. * ada-varobj.c: Include "varobj.h". (ada_number_of_children): New. Moved from varobj.c. (ada_name_of_variable, ada_name_of_child): Likewise. (ada_path_expr_of_child, ada_value_of_child): Likewise. (ada_type_of_child, ada_value_of_variable): Likewise. (ada_value_is_changeable_p, ada_value_has_mutated): Likewise. (ada_varobj_ops): New. * c-varobj.c, jv-varobj.c: New file. Moved from varobj.c. * gdbtypes.c (get_target_type): New. Moved from varobj.c. * gdbtypes.h (get_target_type): Declare. * varobj.c: Remove the inclusion of "ada-varobj.h" and "ada-lang.h". (ANONYMOUS_STRUCT_NAME): Move it to c-varobj.c. (ANONYMOUS_UNION_NAME): Likewise. (get_type, get_value_type, get_target_type): Remove declarations. (value_get_print_value, varobj_value_get_print_value): Likewise. (c_number_of_children, c_name_of_variable): Likewise. (c_name_of_child, c_path_expr_of_child): Likewise. (c_value_of_child, c_type_of_child): Likewise. (c_value_of_variable, cplus_number_of_children): Likewise. (cplus_class_num_children, cplus_name_of_variable): Likewise. (cplus_name_of_child, cplus_path_expr_of_child): Likewise. (cplus_value_of_child, cplus_type_of_child): Likewise. (cplus_value_of_variable, java_number_of_children): Likewise. (java_name_of_variable, java_name_of_child): Likewise. (java_path_expr_of_child, java_value_of_child): Likewise. (java_type_of_child, java_value_of_variable): Likewise. (ada_number_of_children, ada_name_of_variable): Likewise. (ada_name_of_child, ada_path_expr_of_child): Likewise. (ada_value_of_child, ada_type_of_child): Likewise. (ada_value_of_variable, ada_value_is_changeable_p): Likewise. (ada_value_has_mutated): Likewise. (struct language_specific): Move it to varobj.h. (CPLUS_FAKE_CHILD): Move it to varobj.h. (restrict_range): Rename it varobj_restrict_range. Make it extern. Callers update. (get_path_expr_parent): Rename it to varobj_get_path_expr_parent. Make it extern. (is_anonymous_child): Move it to c-varobj.c and rename to varobj_is_anonymous_child. Caller update. (get_type): Move it to c-varobj.c. (get_value_type): Rename it varobj_get_value_type. Make it extern. (get_target_type): Move it gdbtypes.c. (varobj_formatted_print_options): New function. (value_get_print_value): Rename it to varobj_value_get_print_value and make it extern. (varobj_value_is_changeable_p): Make it extern. (adjust_value_for_child_access): Move it to c-varobj.c. (default_value_is_changeable_p): Rename it to varobj_default_value_is_changeable_p. Make it extern. (c_number_of_children, c_name_of_variable): Move it to c-varobj.c (c_name_of_child, c_path_expr_of_child): Likewise. (c_value_of_child, c_type_of_child): Likewise. (c_value_of_variable, cplus_number_of_children): Likewise. (cplus_class_num_children, cplus_name_of_variable): Likewise. (cplus_name_of_child, cplus_path_expr_of_child): Likewise. (cplus_value_of_child, cplus_type_of_child): Likewise. (cplus_value_of_variable): Likewise. (java_number_of_children, java_name_of_variable): Move it to jv-varobj.c. (java_name_of_child, java_path_expr_of_child): Likewise. (java_value_of_child, java_type_of_child): Likewise. (java_value_of_variable): Likewise. (ada_number_of_children, ada_name_of_variable): Move it to ada-varobj.c. (ada_name_of_child, ada_path_expr_of_child): Likewise. (ada_value_of_child, ada_type_of_child): Likewise. (ada_value_of_variable, ada_value_is_changeable_p): Likewise. (ada_value_has_mutated): Likewise. * varobj.h (CPLUS_FAKE_CHILD): New macro, moved from varobj.c. (struct lang_varobj_ops): New. Renamed by 'struct language_specific'. (c_varobj_ops, cplus_varobj_ops): Declare. (java_varobj_ops, ada_varobj_ops): Declare. (varobj_default_value_is_changeable_p): Declare. (varobj_value_is_changeable_p): Declare. (varobj_get_value_type, varobj_is_anonymous_child): Declare. (varobj_get_path_expr_parent): Declare. (varobj_value_get_print_value): Declare. (varobj_formatted_print_options): Declare. (varobj_restrict_range): Declare.
* * Makefile.in (GDBFLAGS): New variable.Doug Evans2013-10-111-0/+7
| | | | (run): New rule.
* fix PR symtab/15597Tom Tromey2013-10-081-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes gdb PR symtab/15597. The bug is that the .gnu_debugaltlink section includes the build-id of the alt file, but gdb does not use it. This patch fixes the problem by changing gdb to do what it ought to always have done: verify the build id of the file found using the filename in .gnu_debugaltlink; and if that does not match, try to find the correct debug file using the build-id and debug-file-directory. This patch touches BFD. Previously, gdb had its own code for parsing .gnu_debugaltlink; I changed it to use the BFD functions after those were introduced. However, the BFD functions are incorrect -- they assume that .gnu_debugaltlink is formatted like .gnu_debuglink. However, it it is not. Instead, it consists of a file name followed by the build-id -- no alignment, and the build-id is not a CRC. Fixing this properly is a bit of a pain. But, because separate_alt_debug_file_exists just has a FIXME for the build-id case, I did not fix it properly. Instead I introduced a hack. This leaves BFD working just as well as it did before my patch. I'm willing to do something better here but I could use some guidance as to what. It seems that the build-id code in BFD is largely punted on. FWIW gdb is the only user of bfd_get_alt_debug_link_info outside of BFD itself. I moved the build-id logic out of elfread.c and into a new file. This seemed cleanest to me. Writing a test case was a bit of a pain. I added a couple new features to the DWARF assembler to handle this. Built and regtested on x86-64 Fedora 18. * bfd-in2.h: Rebuild. * opncls.c (bfd_get_alt_debug_link_info): Add buildid_len parameter. Change type of buildid_out. Update. (get_alt_debug_link_info_shim): New function. (bfd_follow_gnu_debuglink): Use it. * Makefile.in (SFILES): Add build-id.c. (HFILES_NO_SRCDIR): Add build-id.h. * build-id.c: New file, largely from elfread.c. Modified most functions. * build-id.h: New file. * dwarf2read.c (dwarf2_get_dwz_file): Update for change to bfd_get_alt_debug_link_info. Verify dwz file's build-id. Search for dwz file using build-id. * elfread.c (build_id_bfd_get, build_id_verify) (build_id_to_debug_filename, find_separate_debug_file): Remove. * gdb.dwarf2/dwzbuildid.exp: New file. * lib/dwarf.exp (Dwarf::_section): Add "flags" and "type" parameters. (Dwarf::_defer_output): Change "section" parameter to "section_spec"; update. (Dwarf::gnu_debugaltlink, Dwarf::_note, Dwarf::build_id): New procs.
* New option "set debug symfile on".Doug Evans2013-09-251-2/+3
| | | | | | | | | | | | | * NEWS: Mention "set debug symfile". * Makefile.in (SFILES): Add symfile-debug.c. (COMMON_OBS): Add symfile-debug.o. * elfread.c (elf_symfile_read): Use objfile_set_sym_fns to set the objfile's symbol functions. * objfiles.h (objfile_set_sym_fns): Declare. * symfile-debug.c: New file. * symfile.c (syms_from_objfile_1): Use objfile_set_sym_fns to set the objfile's symbol functions. (reread_symbols): Ditto.
* Remove solib-sunos.cJan Kratochvil2013-09-241-1/+1
| | | | | | | | | | | | | | gdb/ 2013-09-24 Jan Kratochvil <jan.kratochvil@redhat.com> Remove solib-sunos.c. * Makefile.in (ALLDEPFILES): Remove solib-sunos.c. * config/m68k/obsd.mh (NATDEPFILES): Remove solib-sunos.o. * objfiles.c (rt_common_objfile): Remove. (free_objfile): Remove rt_common_objfile comparison. * objfiles.h (rt_common_objfile): Remove. * solib-sunos.c: Remove. * symfile.c (reread_symbols): Remove solib-sunos.c comment.
* Extract Linux-specific portitions of cris-tdep.c to a new file.ricard2013-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | This brings in some standard functionality hitherdo missing from the CRIS/CRISv32 port thanks to the new call to gdbarch_init_osabi, as well as clearly showing that there is Linux support for this platform by virtue of the existence of a cris-linux-tdep.c file. 2013-09-06 Ricard Wanderlof <ricardw@axis.com> * Makefile.in (ALL_TARGET_OBS): Add cris-linux-tdep.o. * configure.tgt: Add cris-linux-tdep.o and linux-tdep.o to gdb_target_obs for cris target. * cris-tdep.c (struct gdbarch_tdep): Move to cris-tdep.h. (cris_gdbarch_init): Move calls to set_gdbarch_fetch_tls_load_module_address and set_solib_svr4_fetch_link_map_offsets to cris-linux-tdep.c. Add call to gdbarch_init_osabi. * cris-linux-tdep.c: New file. * cris-tdep.h: New file.
* Unify ptrace options discovery code and make both GDB andLuis Machado2013-08-221-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdbserver use it. gdb/ * Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-nat.h and nat/linux-waitpid.h. (linux-waitpid.o): New object file rule. * common/linux-ptrace.c: Include nat/linux-waitpid.h. (current_ptrace_options): Moved from linux-nat.c. (linux_ptrace_test_ret_to_nx): Use type casts for ptrace parameters. (linux_fork_to_function): New function. (linux_grandchild_function): Likewise. (linux_child_function): Likewise. (linux_check_ptrace_features): New function, heavily based on linux-nat.c:linux_test_for_tracefork. (linux_enable_event_reporting): New function. (ptrace_supports_feature): Likewise. (linux_supports_tracefork): Likewise. (linux_supports_traceclone): Likewise. (linux_supports_tracevforkdone): Likewise. (linux_supports_tracesysgood): Likewise. * common/linux-ptrace.h (HAS_NOMMU): Moved from gdbserver/linux-low.c. (linux_enable_event_reporting): New declaration. (linux_supports_tracefork): Likewise. (linux_supports_traceclone): Likewise. (linux_supports_tracevforkdone): Likewise. (linux_supports_tracesysgood): Likewise. * config.in (PTRACE_TYPE_ARG4): Regenerate. * config/aarch64/linux.mh (NATDEPFILES): Add linux-waitpid.o. * config/alpha/alpha-linux.mh (NATDEPFILES): Likewise. * config/arm/linux.mh (NATDEPFILES): Likewise. * config/i386/linux.mh (NATDEPFILES): Likewise. * config/i386/linux64.mh (NATDEPFILES): Likewise. * config/ia64/linux.mh (NATDEPFILES): Likewise. * config/m32r/linux.mh (NATDEPFILES): Likewise. * config/m68k/linux.mh (NATDEPFILES): Likewise. * config/mips/linux.mh (NATDEPFILES): Likewise. * config/pa/linux.mh (NATDEPFILES): Likewise.. * config/powerpc/linux.mh (NATDEPFILES): Likewise.. * config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise. * config/powerpc/spu-linux.mh (NATDEPFILES): Likewise. * config/sparc/linux.mh (NATDEPFILES): Likewise. * config/sparc/linux64.mh (NATDEPFILES): Likewise. * config/tilegx/linux.mh (NATDEPFILES): Likewise. * config/xtensa/linux.mh (NATDEPFILES): Likewise. * configure.ac (AC_CACHE_CHECK): Add void * to the list of ptrace's 4th argument's types. Check the type of PTRACE_TYPE_ARG4. * configure: Regenerate. * linux-nat.c: Include nat/linux-nat.h and nat/linux-waitpid.h. (SYSCALL_SIGTRAP): Moved to nat/linux-nat.h. (linux_supports_tracefork_flag): Remove. (linux_supports_tracesysgood_flag): Likewise. (linux_supports_tracevforkdone_flag): Likewise. (current_ptrace_options): Moved to common/linux-ptrace.c. (linux_tracefork_child): Remove. (my_waitpid): Remove. (linux_test_for_tracefork): Renamed to linux_check_ptrace_features and moved to common/linux-ptrace.c. (linux_test_for_tracesysgood): Remove. (linux_supports_tracesysgood): Remove. (linux_supports_tracefork): Remove. (linux_supports_tracevforkdone): Remove. (linux_enable_tracesysgood): Remove. (linux_enable_event_reporting): Remove. (linux_init_ptrace): New function. (linux_child_post_attach): Call linux_init_ptrace. (linux_child_post_startup_inferior): Call linux_init_ptrace. (linux_child_follow_fork): Call linux_supports_tracefork and linux_supports_tracevforkdone. (linux_child_insert_fork_catchpoint): Call linux_supports_tracefork. (linux_child_insert_vfork_catchpoint): Likewise. (linux_child_set_syscall_catchpoint): Call linux_supports_tracesysgood. (lin_lwp_attach_lwp): Call linux_supports_tracefork. * nat/linux-nat.h: New file. * nat/linux-waitpid.c: New file. * nat/linux-waitpid.h: New file. gdb/gdbserver/ * Makefile.in: Explain why ../target and ../nat are not listed as include file search paths. (linux-waitpid.o): New object file rule. * configure.srv (srv_native_linux_obj): New variable. Replace all occurrences of linux native object files with $srv_native_linux_obj. * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h. (HAS_NOMMU): Move defining logic to common/linux-ptrace.c. (linux_enable_event_reporting): Remove declaration. (my_waitpid): Moved to common/linux-waitpid.c. (linux_wait_for_event): Pass ptid when calling linux_enable_event_reporting. (linux_supports_tracefork_flag): Remove. (linux_enable_event_reporting): Likewise. (linux_tracefork_grandchild): Remove. (STACK_SIZE): Moved to common/linux-ptrace.c. (linux_tracefork_child): Remove. (linux_test_for_tracefork): Remove. (linux_look_up_symbols): Call linux_supports_traceclone. (initialize_low): Remove call to linux_test_for_tracefork. * linux-low.h (PTRACE_TYPE_ARG3): Move to common/linux-ptrace.h. (PTRACE_TYPE_ARG4): Likewise. Include linux-ptrace.h.
* gdb/Luis Machado2013-08-191-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (SFILES): Remove common/target-common.c and add target/waitstatus.c. (HFILES_NO_SRCDIR): Remove common/target-common.h and add target/resume.h, target/wait.h and target/waitstatus.h. (COMMON_OBS): Remove target-common.o and add waitstatus.o. (target-common.o): Remove. (waitstatus.o): New target object file. * common/target-common.c: Move contents to target/waitstatus.c and remove. * common/target-common.h: Move contents to other files and remove. (enum resume_kind: Move to target/resume.h. (TARGET_WNOHANG): Move to target/wait.h. (enum target_waitkind): Move to target/waitstatus.h. (struct target_waitstatus): Likewise. * target.h: Do not include target-common.h and include target/resume.h, target/wait.h and target/waitstatus.h. * target/resume.h: New file. * target/wait.h: New file. * target/waitstatus.h: New file. * target/waitstatus.c: New file. gdb/gdbserver/ * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../. (SFILES): Remove $(srcdir)/common/target-common.c and add $(srcdir)/target/waitstatus.c. (OBS): Remove target-common.o and add waitstatus.o. (server_h): Remove $(srcdir)/../common/target-common.h and add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h and $(srcdir)/../target/waitstatus.h. (target-common.o): Remove. (waitstatus.o): New target object file. * target.h: Do not include target-common.h and include target/resume.h, target/wait.h and target/waitstatus.h.
* Make functions in cli-dump.c static and remove cli-dump.h.Pedro Alves2013-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed the functions declared in cli-dump.h aren't used anywhere outside cli-dump.c. The original patch that introduced cli-dump.c didn't include this header: http://sourceware.org/ml/gdb-patches/2002-03/msg00518.html But for some reason that I couldn't find from reading the archives around that patch's discussion, cli-dump.h was introduced in the final checkin, at: http://sourceware.org/ml/gdb-patches/2002-03/msg00596.html There seems to be no point in keeping this around nowadays. gdb/ 2013-08-09 Pedro Alves <palves@redhat.com> * cli/cli-dump.c: Don't include cli/cli-dump.h. (scan_expression_with_cleanup, scan_filename_with_cleanup) (fopen_with_cleanup, add_dump_command): Make static. * cli/cli-dump.h: Delete file. * Makefile.in (HFILES_NO_SRCDIR): Remove reference to cli/cli-dump.h.
* gdb/qiyao2013-07-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (HFILES_NO_SRCDIR): Add common/mips-linux-watch.h. (mips-linux-watch.o): New rule. * common/mips-linux-watch.c: New. * common/mips-linux-watch.h: New. * config/mips/linux.mh (NATDEPFILES): Add mips-linux-watch.o * mips-linux-nat.c: Include mips-linux-watch.h. (W_BIT, R_BIT, I_BIT, W_MASK, R_MASK, I_MASK, IRW_MASK): Move to common/mips-linux-watch.h. (MAX_DEBUG_REGISTER): Likewise. (enum pt_watch_style): Likewise. (struct mips32_watch_regs): Likewise. (struct mips64_watch_regs): Likewise. (struct pt_watch_regs): Likewise. (struct mips_watchpoint): Likewise. (mips_linux_watch_get_irw_mask): Move to common/mips-linux-watch.c. (get_reg_mask, mips_linux_watch_get_num_valid): Likewise. (mips_linux_watch_get_watchlo): Likewise. (mips_linux_watch_set_watchlo): Likewise. (mips_linux_watch_get_watchhi): Likewise. (mips_linux_watch_set_watchhi): Likewise. (mips_linux_read_watch_registers): Likewise. (mips_linux_watch_type_to_irw): Likewise. (mips_linux_stopped_data_address, fill_mask): Likewise. (mips_linux_watch_try_one_watch): Likewise. (mips_linux_watch_populate_regs): Likewise.
* gdb/Luis Machado2013-07-241-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (SFILES): Add common/target-common.c. Add common/target-common.h to headers. (COMMON_OBS): Add target-common.o. (target-common.o): New target. * linux-nat.h (resume_kind): Move to common/target-common.h. * target.c (target_waitstatus_to_string): Move to common/target-common.c. * target.h: Include target-common.h. (target_waitkind): Move to common/target-common.h. (target_waitstatus): Likewise. (TARGET_WNOHANG): Likewise. * common/target-common.c: New file. * common/target-common.h: New file. gdb/gdbserver/ * Makefile.in (SFILES): /common/target-common.c. (OBS): Add target-common.o. (server_h): Add $(srcdir)/../common/target-common.h. (target-common.o): New target. * server.c (queue_stop_reply_callback): Free status string after use. * target.c (target_waitstatus_to_string): Remove. * target.h: Include target-common.h. (resume_kind): Likewise. (target_waitkind): Likewise. (target_waitstatus): Likewise. (TARGET_WNOHANG): Likewise.
* * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS, ADA_EXP_C): New macros.Tom Tromey2013-07-101-0/+13
| | | | (ada-exp.o): New target.
* On mainline/development, also link GDBserver with -lmcheck.Pedro Alves2013-07-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This factors --enable-libmcheck related bits from GDB's configure.ac and makes GDBserver use them too. Specifically, the 'development' global is moved to a separate script to it can be sourced by both GDB and GDBserver, and the --enable-libmcheck/--disable-libmcheck bits proper are moved to a new m4 file. I started out by defining 'development' in the m4 file, but in the end decided against it, as a separate script has the advantage that changing it in release branches does not require regenerating configure, unlike today. I had also started out by making the new GDB_AC_LIBMCHECK itself handle the yes/no default fallback depending on release/developement, but since I had split out 'development' to a separate script, and, GDB needs the python checks anyway (hence we'd need to do the python checks in gdb's configure.ac, and pass in a 'default lmcheck yes/no' parameter to GDB_AC_LIBMCHECK anyway), I ended up keeping GDB_AC_LIBMCHECK isolated from the 'development' global. IOW, it's the caller's business to handle it. Tested on x86_64 Fedora 17. Built GDB and GDBserver with and without --enable-libmcheck, and observed --enable-libmcheck overrides the disablement of -lmcheck caused by python supporting threads, and that GDBserver links with -lmcheck when expected. Also observed that changing the 'development' global, and issuing "make" triggers a relink, and '-lmcheck' is included or not from the link accordingly. gdb/ 2013-07-03 Pedro Alves <palves@redhat.com> * Makefile.in (config.status): Depend on development.sh. (aclocal_m4_deps): Add libmcheck.m4. * acinclude.m4: Include libmcheck.m4. * configure.ac: Source development.sh instead of setting 'development' here. --enable-libmcheck/--disable-libmcheck code factored out to GDB_AC_LIBMCHECK. Run it. * development.sh: New file. * libmcheck.m4: New file. * configure: Regenerate. gdb/gdbserver/ 2013-07-03 Pedro Alves <palves@redhat.com> * Makefile.in (config.status): Depend on development.sh. * acinclude.m4: Include libmcheck.m4. * configure: Regenerate.
* move version.in from gdb/common back to gdbTom Tromey2013-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts part of the earlier version.in change. It moves version.in back to the gdb directory. This works around the CVS bug we've found. gdb * Makefile.in (version.c): Use version.in, not common/version.in. * common/create-version.sh: Likewise. * common/version.in: Move... * version.in: ...here. gdb/doc * Makefile.in (version.subst): Use version.in, not common/version.in. * gdbint.texinfo (Versions and Branches, Releasing GDB): Likewise. gdb/gdbserver * Makefile.in (version.c): Use version.in, not common/version.in. sim/common * Make-common.in (version.c): Use version.in, not common/version.in. * create-version.sh: Likewise. sim/ppc: * Make-common.in (version.c): Use version.in, not common/version.in.
* * Makefile.in (ALL_TARGET_OBS): Add msp430-tdep.o.Kevin Buettner2013-06-251-0/+2
| | | | | | (ALLDEPFILES): Add msp430-tdep.c. * configure.tgt (msp430*-*-elf): New target. * msp430-tdep.c: New file.
* don't keep a gdb-specific dateTom Tromey2013-06-241-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now there are two nightly commits to update a file in the tree with the current date. One commit is for BFD, one is for gdb. It seems unnecessary to me to do this twice. We can make do with a single such commit. This patch changes gdb in a minimal way to reuse the BFD date -- it extracts it from bfd/version.h and changes version.in to use the placeholder string "DATE" for those times when a date is wanted. I propose removing the cron job that updates the version on trunk, and then check in this patch. For release branches, we can keep the cron job, but just tell it to rewrite bfd/version.h. I believe this is a simple change in the crontab -- the script will work just fine on this file. This also moves version.in and version.h into common/, to reflect their shared status; and updates gdbserver to use version.h besides. * common/create-version.sh: New file. * Makefile.in (version.c): Use bfd/version.h, common/version.in, create-version.sh. (HFILES_NO_SRCDIR): Use common/version.h. * version.in: Move to ... * common/version.in: ... here. Replace date with "DATE". * version.h: Move to ... * common/version.h: ... here. gdbserver: * Makefile.in (version.c): Use bfd/version.h, common/version.in, create-version.sh. (version.o): Remove. * gdbreplay.c: Include version.h. (version, host_name): Don't declare. * server.h: Include version.h. (version, host_name): Don't declare. doc: * Makefile.in (POD2MAN1, POD2MAN5): Use version.subst. (GDBvn.texi): Use version.subst. (version.subst): New target. (mostlyclean): Remove version.subst.
* gdb: clean up x86 cpuid implementationsMike Frysinger2013-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've currently got 3 files doing open coded implementations of cpuid. Each has its own set of workarounds and varying levels of how well they're written and are generally hardcoded to specific cpuid functions. If you try to build the latest gdb as a PIE on an i386 system, the build will fail because one of them lacks PIC workarounds (wrt ebx). Specifically, we have: common/linux-btrace.c: two copies of cpuid asm w/specific args, one has no workarounds while the other implicitly does to avoid memcpy go32-nat.c: two copies of cpuid asm w/specific args, one has workarounds to avoid memcpy gdb/testsuite/gdb.arch/i386-cpuid.h: one general cpuid asm w/many workarounds copied from older gcc Fortunately, that last header there is pretty damn good -- it handles lots of edge cases, the code is nice & tight (uses gcc asm operands rather than manual movs), and is already almost a general library type header. It's also the basis of what is now the public cpuid.h that is shipped with gcc-4.3+. So what I've done is pull that test header out and into gdb/common/ (not sure if there's a better place), synced to the version found in gcc-4.8.0, put a wrapper API around it, and then cut over all the existing call points to this new header. Since the func already has support for "is cpuid supported on this proc", it makes it trivial to push the i386/x86_64 ifdefs down into this wrapper API too. Now it can be safely used for all targets and gcc will elide the unused code for us. I've verified the gdb.arch testsuite still passes, and this code compiles for an armv7a host as well as x86_64. The go32-nat code has been left ifdef-ed out until someone can test & verify the new stuff works (and if it doesn't, figure out how to make the new code work). URL: https://bugs.gentoo.org/467806 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 2013-05-20 Andreas Tobler <andreas@fgznet.ch>andreast2013-05-201-2/+3
| | | | | * Makefile.in (ALL_TARGET_OBS): Add ppcfbsd-tdep.o. (ALLDEPFILES): Add ppcfbsd-nat.c and ppcfbsd-tdep.c.
* ppc-aix core file relocation.Joel Brobecker2013-05-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code attempts to provide relocation support when debugging core files via the rs6000_xfer_partial method of the rs6000-nat target_ops vector. However, this target_ops vector does not get pushed on the target stack at all when debugging core files, thus bypassing completely that part of the code. This patch fixes the problem by extending corelow's core_xfer_partial into handling the TARGET_OBJECT_LIBRARIES_AIX object. gdb/ChangeLog: * gdbarch.sh (core_xfer_shared_libraries_aix): New method. * gdbarch.h, gdbarch.c: Regenerate. * corelow.c (core_xfer_partial): Add TARGET_OBJECT_LIBRARIES_AIX handling. * rs6000-aix-tdep.h: New file. * Makefile.in (HFILES_NO_SRCDIR): Add rs6000-aix-tdep.h. * rs6000-aix-tdep.c: Include "rs6000-aix-tdep.h" and "xml-utils.h". (struct field_info, struct ld_info_desc): New types. (ld_info32_desc, ld_info64_desc): New static constants. (struct ld_info): New type. (rs6000_aix_extract_ld_info): New function. (rs6000_aix_shared_library_to_xml): Likewise. (rs6000_aix_ld_info_to_xml): Likewise. (rs6000_aix_core_xfer_shared_libraries_aix): Likewise. (rs6000_aix_init_osabi): Add call to set_gdbarch_core_xfer_shared_libraries_aix. * rs6000-nat.c: Add "rs6000-aix-tdep.h" include. Remove "xml-utils.h" include. (LdInfo): Delete typedef. (ARCH64_DECL, LDI_FIELD, LDI_NEXT, LDI_FD, LDI_FILENAME): Delete macros. (rs6000_ptrace_ldinfo): Change return type to gdb_byte *. Adjust code accordingly. (rs6000_core_ldinfo): Delete, folded into rs6000_aix_core_xfer_shared_libraries_aix. (rs6000_xfer_shared_library): Delete. (rs6000_xfer_shared_libraries): Reimplement.
* 2013-05-10 Phil Muldoon <pmuldoon@redhat.com>pmuldoon2013-05-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stack.c (backtrace_command_1): Add "no-filters", and Python frame filter logic. (backtrace_command): Add "no-filters" option parsing. (_initialize_stack): Alter help to reflect "no-filters" option. * Makefile.in (SUBDIR_PYTHON_OBS): Add py-framefilter.o (SUBDIR_PYTHON_SRCS): Add py-framefilter.c (py-frame.o): Add target * data-directory/Makefile.in (PYTHON_DIR): Add Python frame filter files. * python/python.h: Add new frame filter constants, and flag enum. (apply_frame_filter): Add definition. * python/python.c (apply_frame_filter): New non-Python enabled function. * python/py-utils.c (py_xdecref): New function. (make_cleanup_py_xdecref): Ditto. * python/py-objfile.c: Declare frame_filters dictionary. (objfpy_dealloc): Add frame_filters dealloc. (objfpy_new): Initialize frame_filters attribute. (objfile_to_objfile_object): Ditto. (objfpy_get_frame_filters): New function. (objfpy_set_frame_filters): New function. * python/py-progspace.c: Declare frame_filters dictionary. (pspy_dealloc): Add frame_filters dealloc. (pspy_new): Initialize frame_filters attribute. (pspacee_to_pspace_object): Ditto. (pspy_get_frame_filters): New function. (pspy_set_frame_filters): New function. * python/py-framefilter.c: New file. * python/lib/gdb/command/frame_filters.py: New file. * python/lib/gdb/frames.py: New file. * python/lib/gdb/__init__.py: Initialize global frame_filters dictionary * python/lib/gdb/FrameDecorator.py: New file. * python/lib/gdb/FrameIterator.py: New file. * mi/mi-cmds.c (mi_cmds): Add frame filters command. * mi/mi-cmds.h: Declare. * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames): Add --no-frame-filter logic, and Python frame filter logic. (stack_enable_frame_filters): New function. (parse_no_frame_option): Ditto. (mi_cmd_stack_list_frames): Add --no-frame-filter and Python frame filter logic. (mi_cmd_stack_list_locals): Ditto. (mi_cmd_stack_list_args): Ditto. (mi_cmd_stack_list_variables): Ditto. * NEWS: Add frame filter note. 2013-05-10 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-framefilter.py: New File. * gdb.python/py-framefilter-mi.exp: Ditto. * gdb.python/py-framefilter.c: Ditto. * gdb.python/py-framefilter-mi.exp: Ditto. * gdb.python/py-framefilter-mi.c: Ditto, * gdb.python/py-framefilter-gdb.py.in: Ditto. 2013-05-10 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Backtrace): Add "no-filter" argument. (Python API): Add Frame Filters API, Frame Wrapper API, Writing a Frame Filter/Wrapper, Managing Management of Frame Filters chapter entries. (Frame Filters API): New Node. (Frame Wrapper API): New Node. (Writing a Frame Filter): New Node. (Managing Frame Filters): New Node. (Progspaces In Python): Add note about frame_filters attribute. (Objfiles in Python): Ditto. (GDB/MI Stack Manipulation): Add -enable-frame-filters command, @anchors and --no-frame-filters option to -stack-list-variables, -stack-list-frames, -stack-list-locals and -stack-list-arguments commands.
* 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>Sandra Loosemore2013-05-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Andrew Jenner <andrew@codesourcery.com> Chung-Lin Tang <cltang@codesourcery.com> Julian Brown <julian@codesourcery.com> Based on the nios2-elf port from Altera Corporation. gdb/ * Makefile.in (ALL_TARGET_OBS): Add nios2-tdep.o and nios2-linux-tdep.o. (HFILES_NO_SRCDIR): Add nios2-tdep.h. (ALLDEPFILES): Add nios2-tdep.c and nios2-linux-tdep.c. * configure.tgt: Add nios2*-*-linux* and nios2*-*-* targets. * nios2-tdep.h: New. * nios2-tdep.c: New. * nios2-linux-tdep.c: New. * features/Makefile (WHICH): Add nios2-linux. (nios2-linux-expedite): Set. * features/nios2-cpu.xml: New. * features/nios2.xml: New. * features/nios2-linux.xml: New. * features/nios2.c: New (autogenerated). * features/nios2-linux.c: New (autogenerated). * regformats/nios2-linux.dat: New (autogenerated). * NEWS (Changes since GDB 7.6): Add new Nios II targets and commands. gdb/doc/ * gdb.texinfo (Nios II): New section. (Nios II Features): New section.
* Reimplement shared library support on ppc-aix...Joel Brobecker2013-05-061-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... using the target_so_ops framework. gdb/ChangeLog: * target.h (TARGET_OBJECT_AIX_LIBRARIES): New target_object enum. * features/library-list-aix.dtd: New file. * solib-aix.h, solib-aix.c: New file. * rs6000-aix-tdep.c: #include "solib.h" and "solib-aix.h". (rs6000_find_toc_address_hook): Delete. (rs6000_push_dummy_call): Rewrite code setting the TOC value. (rs6000_aix_init_osabi): Register solib_aix_so_ops. * rs6000-nat.c: Remove "xcoffsolib.h" include. Include "xml-utils.h". (map_vmap, vmap_exec, vmap_ldinfo, add_vmap, objfile_symbol_add) (vmap_symtab, fixup_breakpoints): Delete. (rs6000_xfer_shared_libraries): New function. (rs6000_xfer_partial): Add TARGET_OBJECT_AIX_LIBRARIES handling. (vmap_secs, bss_data_overlap, vmap_add_symbols): Delete. (xcoff_relocate_symtab, xcoff_relocate_core): Delete. (rs6000_ptrace_ldinfo, rs6000_core_ldinfo) (rs6000_xfer_shared_library): New function. (find_toc_address): Delete. (_initialize_rs6000_nat): Do not set rs6000_find_toc_address_hook. * rs6000-tdep.h (rs6000_find_toc_address_hook): Remove. * xcoffread.c (record_minimal_symbol): Reloate symbol address before creating minimal symbol. Adjust function description accordingly. (scan_xcoff_symtab): Replace call to prim_record_minimal_symbol_and_info by call to record_minimal_symbol. (xcoff_symfile_offsets): Reimplement mostly as a wrapper around default_symfile_offsets. * configure.tgt: Add solib-aix.o to gdb_target_obs for powerpc-aix targets. * config/rs6000/nm-rs6000.h: Delete. * config/powerpc/aix.mh (NAT_FILE): Delete. (NATDEPFILES): Remove xcoffsolib.o. * Makefile.in (XMLFILES): Add library-list-aix.dtd. (ALL_TARGET_OBS): Add solib-aix.o. (HFILES_NO_SRCDIR): Remove xcoffsolib.h and config/rs6000/nm-rs6000.h. Add solib-aix.h. (ALLDEPFILES): Add solib-aix.c. Remove xcoffsolib.c. * xcoffsolib.h, xcoffsolib.c: Delete. * solib.c (reload_shared_libraries): Remove reference to SOLIB_CREATE_INFERIOR_HOOK. * breakpoint.c (handle_solib_event): Remove reference to SOLIB_ADD. (disable_breakpoints_in_shlibs): Remove reference to PC_SOLIB. (momentary_bkpt_re_set): Replace SOLIB_ADD by solib_add in comment. * corelow.c (deprecated_core_resize_section_table): Delete. * exec.c: Remove include of xcoffsolib.h". (map_vmap, vmap): Delete. (exec_close_1): Remove references to vmap. (exec_file_attach): Remove vmap handling code, and reference to DEPRECATED_IBM6000_TARGET. (bfdsec_to_vmap): Delete. (exec_files_info): Remove block of code handling VMAP. * infcmd.c (post_create_inferior): Remove reference to SOLIB_CREATE_INFERIOR_HOOK and SOLIB_ADD. * infrun.c (follow_exec): Remove reference to SOLIB_CREATE_INFERIOR_HOOK. * stack.c (print_frame): Remove reference to PC_SOLIB. * solib-dsbt.c (dsbt_current_sos): Adjust comment. (dsbt_relocate_main_executable): Likewise. * solib-frv.c (frv_current_sos): Likewise. gdb/doc/ChangeLog: * gdbint.texinfo (Algorithms): Remove entries documenting DEPRECATED_IBM6000_TARGET, SOLIB_ADD, and SOLIB_CREATE_INFERIOR_HOOK.
* PR gdb/7912:Tom Tromey2013-04-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (SFILES): Add filestuff.c (COMMON_OBS): Add filestuff.o. (filestuff.o): New target. * auto-load.c (auto_load_objfile_script_1): Use gdb_fopen_cloexec. * auxv.c (procfs_xfer_auxv): Use gdb_open_cloexec. * cli/cli-cmds.c (shell_escape): Call close_most_fds. * cli/cli-dump.c (fopen_with_cleanup): Use gdb_fopen_cloexec. * common/agent.c (gdb_connect_sync_socket): Use gdb_socket_cloexec. * common/filestuff.c: New file. * common/filestuff.h: New file. * common/linux-osdata.c (linux_common_core_of_thread) (command_from_pid, commandline_from_pid, print_source_lines) (linux_xfer_osdata_shm, linux_xfer_osdata_sem) (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Use gdb_fopen_cloexec. * common/linux-procfs.c (linux_proc_get_int) (linux_proc_pid_has_state): Use gdb_fopen_cloexec. * config.in, configure: Rebuild. * configure.ac: Don't check for sys/socket.h. Check for fdwalk, pipe2. * corelow.c (core_open): Use gdb_open_cloexec. * dwarf2read.c (write_psymtabs_to_index): Use gdb_fopen_cloexec. * fork-child.c (fork_inferior): Call close_most_fds. * gdb_bfd.c (gdb_bfd_open): Use gdb_open_cloexec. * inf-child.c (inf_child_fileio_readlink): Use gdb_open_cloexec. * linux-nat.c (linux_nat_thread_name, linux_proc_pending_signals): Use gdb_fopen_cloexec. (linux_proc_xfer_partial, linux_proc_xfer_spu): Use gdb_open_cloexec. (linux_async_pipe): Use gdb_pipe_cloexec. * remote-fileio.c (remote_fileio_func_open): Use gdb_open_cloexec. * remote.c (remote_file_put, remote_file_get): Use gdb_fopen_cloexec. * ser-pipe.c (pipe_open): Use gdb_socketpair_cloexec, close_most_fds. * ser-tcp.c (net_open): Use gdb_socket_cloexec. * ser-unix.c (hardwire_open): Use gdb_open_cloexec. * solib.c (solib_find): Use gdb_open_cloexec. * source.c (openp, find_and_open_source): Use gdb_open_cloexec. * tracepoint.c (tfile_start): Use gdb_fopen_cloexec. (tfile_open): Use gdb_open_cloexec. * tui/tui-io.c (tui_initialize_io): Use gdb_pipe_cloexec. * ui-file.c (gdb_fopen): Use gdb_fopen_cloexec. * xml-support.c (xml_fetch_content_from_file): Use gdb_fopen_cloexec. * main.c (captured_main): Call notice_open_fds. gdbserver * Makefile.in (SFILES): Add filestuff.c. (OBS): Add filestuff.o. (filestuff.o): New target. * config.in, configure: Rebuild. * configure.ac: Check for fdwalk, pipe2.
* * Makefile.in (SFILES): Add break-catch-throw.cTom Tromey2013-04-151-2/+4
| | | | | | | | (COMMON_OBS): Add break-catch-throw.o. * break-catch-throw.c: New file. * breakpoint.c: Move exception-catching code to new file. (ep_parse_optional_if_clause): No longer static. * breakpoint.h (ep_parse_optional_if_clause): Declare.
* gdb/Jan Kratochvil2013-04-111-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (HAVE_NATIVE_GCORE_TARGET): New. (generated_files): Add gcore. (install-only, uninstall): Add gcore if HAVE_NATIVE_GCORE_TARGET or HAVE_NATIVE_GCORE_HOST. (gcore): New. * NEWS (Changes since GDB 7.6): Mention newly installed gcore. * config/alpha/alpha-osf3.mh, config/i386/fbsd.mh, config/i386/fbsd64.mh, config/i386/i386gnu.mh, config/i386/i386sol2.mh, config/i386/sol2-64.mh, config/mips/irix5.mh, config/mips/irix6.mh, config/powerpc/fbsd.mh, config/sparc/fbsd.mh, config/sparc/sol2.mh: Add HAVE_NATIVE_GCORE_HOST. * configure: Regenerate. * configure.ac (HAVE_NATIVE_GCORE_TARGET): New, set it, AC_SUBST it. New AC_SUBST fir GDB_TRANSFORM_NAME and GCORE_TRANSFORM_NAME. New AC_CONFIG_FILES for gcore. * configure.tgt: Add gdb_have_gcore to the initial comment. Set gdb_have_gcore. * gdb_gcore.sh: Rename to ... * gcore.in: ... here. Remove gcore.sh comment. Use GDB_TRANSFORM_NAME and GCORE_TRANSFORM_NAME substitutions. gdb/doc/ * Makefile.in (MAN1S): Add gcore.1. Remove "Host, target, and site specific Makefile fragments" comment. (@host_makefile_frag@, HAVE_NATIVE_GCORE_TARGET): New. (install-man1, uninstall-man1): Conditionalize gcore.1. (gcore.1): New. * gdb.texinfo (Man Pages): Add gcore man. (gcore man): New node.
* gdb/qiyao2013-04-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-04-10 Hui Zhu <hui@codesourcery.com> Yao Qi <yao@codesourcery.com> * configure.ac: Check libbabeltrace is installed. * config.in: Regenerate. * configure: Regenerate. * Makefile.in (LIBBABELTRACE): New. (CLIBS): Add LIBBABELTRACE. * ctf.c: Include "exec.h". (CTF_EVENT_ID_STATUS, CTF_EVENT_ID_TSV_DEF): New macros. (CTF_EVENT_ID_TP_DEF, ctf_save_write_int32): New macros. (ctf_save_metadata_header): Define new type aliases in metadata. (ctf_write_header): Define event type "tsv_def" and "tp_def" in metadata. Start a new faked packet for trace status. (ctf_write_status): Write trace status to CTF. (ctf_write_uploaded_tsv): Write TSV to CTF. (ctf_write_uploaded_tp): Write tracepoint definition to CTF. (ctf_write_definition_end): End the faked packet. (ctx, ctf_iter, trace_dirname): New. (start_pos): New variable. (ctf_destroy, ctf_open_dir, ctf_open): New. (SET_INT32_FIELD, SET_ARRAY_FIELD, SET_STRING_FIELD): New macros. (ctf_read_tsv, ctf_read_tp, ctf_close, ctf_files_info): New. (ctf_fetch_registers, ctf_xfer_partial): New. (ctf_get_trace_state_variable_value): New. (ctf_get_tpnum_from_frame_event): New. (ctf_get_traceframe_address): New. (ctf_trace_find, ctf_has_stack): New. (ctf_has_registers, ctf_traceframe_info, init_ctf_ops): New. (ctf_get_trace_status, ctf_read_status): New. (_initialize_ctf): New. * tracepoint.c (get_tracepoint_number): New (get_uploaded_tsv): Remove 'static'. (struct traceframe_info, trace_regblock_size): Move it to ... * tracepoint.h: ... here. (get_tracepoint_number): Declare it. (get_uploaded_tsv): Declare it. * NEWS: Mention new configure option. gdb/doc/ 2013-04-10 Yao Qi <yao@codesourcery.com> * gdb.texinfo (Trace Files): Add "target ctf". gdb/testsuite/ 2013-04-10 Yao Qi <yao@codesourcery.com> * gdb.trace/actions.exp: Save trace data to CTF. Change to ctf target if GDB supports, read CTF data in ctf target, and check the actions of tracepoints. * gdb.trace/while-stepping.exp: Likewise. * gdb.trace/report.exp: Test GDB saves trace data to CTF format and read CTF trace file if GDB supports. * gdb.trace/tstatus.exp: Save trace data to CTF. If ctf target is supported, change to ctf target, read trace data and check output of command "tstatus". * gdb.trace/tsv.exp: Save trace frame to CTF. If GDB supports, read CTF data by target ctf and call check_tsv.
* gdb/Jan Kratochvil2013-04-051-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert man pages to texinfo, new gdbinit.5 texinfo page. * Makefile.in (gdb.z): Remove. (install-only): Remove $(man1dir) and gdb.1 installation. * gdb.1: Remove. gdb/gdbserver/ Convert man pages to texinfo, new gdbinit.5 texinfo page. * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1 installation. * gdbserver.1: Remove. gdb/doc/ Convert man pages to texinfo, new gdbinit.5 texinfo page. * Makefile.in (mandir, man1dir, man5dir, SYSTEM_GDBINIT, MANCONF, (TEXI2POD, POD2MAN1, POD2MAN5, MAN1S, MAN5S, MANS, man): New. (diststuff): Add man. (install-man, install-man1, install-man5, uninstall-man, uninstall-man1) (uninstall-man5): New. (STAGESTUFF): Add *.1 and *.5. (GDBvn.texi): Add SYSTEM_GDBINIT. (gdb.1, gdbserver.1, gdbinit.5): New. (maintainer-clean realclean): Add $(MANS). (install): Add install-man. (uninstall): Add uninstall-man. * gdb.texinfo (@include gdb-cfg.texi): Wrap it by @c man begin INCLUDE. (@copying): Wrap it by @c man begin COPYRIGHT. (Top): Add Man Pages. (Man Pages, gdb man, gdbserver man, gdbinit man): New.
* Avoid warning in "make tags".Eli Zaretskii2013-04-051-1/+1
| | | | | | | * Makefile.in (TAGS): Avoid warning from etags when $GDB_NM_FILE is empty. See http://sourceware.org/ml/gdb-patches/2012-08/msg00504.html and http://sourceware.org/ml/gdb-patches/2013-04/msg00055.html for details of the problem.
* Fix list of files submitted to "make TAGS".Eli Zaretskii2013-04-021-3/+3
| | | | | * Makefile.in (HFILES_NO_SRCDIR): Remove call-cmds.h. gdb_string.h is now in common/.
* gdb/qiyao2013-03-141-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-03-14 Hui Zhu <hui@codesourcery.com> Yao Qi <yao@codesourcery.com> * Makefile.in (REMOTE_OBS): Add ctf.o. (SFILES): Add ctf.c. (HFILES_NO_SRCDIR): Add ctf.h. * ctf.c, ctf.h: New files. * tracepoint.c: Include 'ctf.h'. (collect_pseudocommand): Remove static. (trace_save_command): Parse option "-ctf". Produce different trace file writers per option. Adjust output message. (trace_save_tfile, trace_save_ctf): New. * tracepoint.h (trace_save_tfile, trace_save_ctf): Declare. * mi/mi-main.c: Include 'ctf.h'. (mi_cmd_trace_save): Handle option '-ctf'. Call either trace_save_tfile or trace_save_ctf. * NEWS: Mention these changes. gdb/doc/ 2013-03-14 Hui Zhu <hui@codesourcery.com> Yao Qi <yao@codesourcery.com> * gdb.texinfo (Trace Files): Add "tsave -ctf".
* Add a target for branch trace recording.mmetzger2013-03-111-2/+2
| | | | | | | | | | | | | | | | The target implements the new record sub-commands "record instruction-history" and "record function-call-history". The target does not support reverse execution or navigation in the recorded execution log. gdb/ * Makefile.in (SFILES): Add record-btrace.c (COMMON_OBS): Add record-btrace.o * record-btrace.c: New. * objfiles.c: Include btrace.h. (free_objfile): call btrace_free_objfile.
* Split record.h into record.h and record-full.h.mmetzger2013-03-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split record.c into record.c and record-full.c. The split leaves the command part in record.c and moves the target part into record-full.c. gdb/ * record.h: Split into this and ... * record-full.h: ... this. * record.c: Split into this and ... * record-full.c: ... this. * target.h (target_ops): Add new fields to_info_record, to_save_record, to_delete_record, to_record_is_replaying, to_goto_record_begin, to_goto_record_end, to_goto_record. (target_info_record): New. (target_save_record): New. (target_supports_delete_record): New. (target_delete_record): New. (target_record_is_replaying): New. (target_goto_record_begin): New. (target_goto_record_end): New. (target_goto_record): New. * target.c (target_info_record): New. (target_save_record): New. (target_supports_delete_record): New. (target_delete_record): New. (target_record_is_replaying): New. (target_goto_record_begin): New. (target_goto_record_end): New. (target_goto_record): New. * record.h: Declare struct cmd_list_element. (record_cmdlist): New declaration. (set_record_cmdlist): New declaration. (show_record_cmdlist): New declaration. (info_record_cmdlist): New declaration. (cmd_record_goto): New declaration. * record.c: Remove unnecessary includes. Include inferior.h. (cmd_record_goto): Remove declaration. (record_cmdlist): Now extern. Initialize. (set_record_cmdlist): Now extern. Initialize. (show_record_cmdlist): Now extern. Initialize. (info_record_cmdlist): Now extern. Initialize. (find_record_target): New. (require_record_target): New. (cmd_record_start): Update. (cmd_record_delete): Remove target-specific code. Call target_delete_record. (cmd_record_stop): Unpush any record target. (set_record_insn_max_num): Move to record-full.c (set_record_command): Add comment. (show_record_command): Add comment. (info_record_command): Update comment. Remove target-specific code. Call the record target's to_info_record. (cmd_record_start): New. (cmd_record_goto): Now extern. Remove target-specific code. Call target_goto_begin, target_goto_end, or target_goto. (_initialize_record): Move record target ops initialization to record-full.c. Change "record" command help text. Move "record restore", "record set", and "record show" commands to record-full.c. * Makefile.in (SFILES): Add record-full.c. (HFILES_NO_SRCDIR): Add record-full.h. (COMMON_OBS): Add record-full.o. * amd64-linux-tdep.c: Include record-full.h instead of record.h. * arm-tdep.c: Include record-full.h. * i386-linux-tdep.c: Include record-full.h instead of record.h. * i386-tdep.c: Include record-full.h. * infrun.c: Include record-full.h. * linux-record.c: Include record-full.h. * moxie-tdep.c: Include record-full.h. * record-full.c: Include record-full.h. Change module comment. (set_record_full_cmdlist): New. (show_record_full_cmdlist): New. (record_full_cmdlist): New. (record_goto_insn): New declaration. (record_save): New declaration. (record_check_insn_num): Change query string. (record_info): New. (record_delete): New. (record_is_replaying): New. (record_goto_entry): New. (record_goto_begin): New. (record_goto_end): New. (record_goto): New. (init_record_ops): Update. (init_record_core_ops): Update. (cmd_record_save): Rename to record_save. Remove target and arg checks. (cmd_record_start): New. (set_record_insn_max_num): Moved from record.c (set_record_full_command): New. (show_record_full_command): New. (_initialize_record_full): New.
* Define the xml document style for transferring branch trace data.mmetzger2013-03-111-1/+2
| | | | | | | | | | | | | | | | | Add a function to parse a btrace xml document into a vector of branch trace blocks. gdb/ * features/btrace.dtd: New file. * Makefile.in (XMLFILES): Add btrace.dtd. * btrace.h (parse_xml_btrace): New declaration. * btrace.c: Include xml-support.h. (parse_xml_btrace): New function. (parse_xml_btrace_block): New function. (block_attributes): New struct. (btrace_attributes): New struct. (btrace_children): New struct. (btrace_elements): New struct.
* Implement branch tracing on Linux based on perf_event such that it can be sharedmmetzger2013-03-111-1/+5
| | | | | | | | | | | | | | | | | between gdb and gdbserver. gdb/ * common/linux_btrace.h: New file. * common/linux_btrace.c: New file. * Makefile.in (SFILES): Add btrace.c. (HFILES_NO_SRCDIR): Add common/linux-btrace.h. (COMMON_OBS): Add btrace.o. (linux-btrace.o): New rule. gdbserver/ * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c. (linux_btrace_h): New variable. (linux-btrace.o): New rule.
* Add branch trace information to struct thread_info.mmetzger2013-03-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | Add functions to enable, disable, clear, and fetch a thread's branch trace. gdb/ * target.h: Include btrace.h. (struct target_ops) <to_supports_btrace, to_enable_btrace, to_disable_btrace, to_teardown_btrace, to_read_btrace>: New. * target.c (target_supports_btrace): New function. (target_enable_btrace): New function. (target_disable_btrace): New function. (target_teardown_btrace): New function. (target_read_btrace): New function. * btrace.h: New file. * btrace.c: New file. * Makefile.in: Add btrace.c. * gdbthread.h: Include btrace.h. (struct thread_info): Add btrace field. * thread.c: Include btrace.h. (clear_thread_inferior_resources): Call target_teardown_btrace. * common/btrace-common.h: New file.
* Adding aarch64-linux-nat support.mshawcroft2013-02-081-0/+1
| | | | | | | | | | | | 2013-02-08 Jim MacArthur <jim.macarthur@arm.com> Marcus Shawcroft <marcus.shawcroft@arm.com> Nigel Stephens <nigel.stephens@arm.com> Yufeng Zhang <yufeng.zhang@arm.com> * aarch64-linux-nat.c: New file. * config/aarch64/linux.mh: New file. * configure.host: Add AArch64. * Makefile.in (ALLDEPFILES): Add aarch64-linux-nat.c.
* 2013-02-04 Andreas Tobler <andreast@fgznet.ch>andreast2013-02-041-2/+2
| | | | | | | | * Makefile.in (ALL_TARGET_OBS): Add powerpc FreeBSD files. * configure.host: Add powerpc*-*-freebsd* target. * configure.tgt: Add target info for powerpc*-*-freebsd*. * ppcfbsd-nat.c, ppcfbsd-tdep.h, ppcfbsd-tdep.c: New files. * config/powerpc/fbsd.mh: New file.
* Adding aarch64-newlib-tdep support.mshawcroft2013-02-041-2/+2
| | | | | | | | | | * aarch64-newlib-tdep.c: New file. * configure.tgt: Add aarch64-newlib-tdep.o to gdb_target_obs of aarch64*-*-elf. * defs.h (enum gdb_osabi): Add GDB_OSABI_NEWLIB. * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-newlib-tdep.o. (ALLDEPFILES): Add aarch64-newlib-tdep.c. * osabi.c (gdb_osabi_names): Add "Newlib".
* Adding aarch64-linux-tdep support.mshawcroft2013-02-041-2/+2
| | | | | | | | | | | | | | 2013-02-04 Jim MacArthur <jim.macarthur@arm.com> Marcus Shawcroft <marcus.shawcroft@arm.com> Nigel Stephens <nigel.stephens@arm.com> Yufeng Zhang <yufeng.zhang@arm.com> * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-linux-tdep.o. (ALLDEPFILES): Add aarch64-linux-tdep.c. * aarch64-linux-tdep.c: New file. * aarch64-linux-tdep.h: New file. * aarch64-tdep.h (gdbarch_tdep): Define gregset and fpregset. * configure.tgt: Add aarch64-none-linux-gnu.
* Add basic support for AArch64.mshawcroft2013-02-041-1/+3
| | | | | | | | | | | | | | | | | | | * Makefile.in (ALL_64_TARGET_OBS): Add arch64-tdep.o. (HFILES_NO_SRCDIR): Add aarch64-tdep.h. (ALLDEPFILES): Add aarch64-tdep.c. * aarch64-tdep.c: New file. * aarch64-tdep.h: New file. * configure.tgt: Add AArch64. * features/Makefile (WHICH): Add aarch64 and aarch64-without-fpu. (aarch64-expedite): New definition. * features/aarch64-core.xml: New file. * features/aarch64-fpu.xml: New file. * features/aarch64-without-fpu.c: New file (generated). * features/aarch64-without-fpu.xml: New file. * features/aarch64.c: New file (generated). * features/aarch64.xml: New file. * regformats/aarch64-without-fpu.dat: New file (generated). * regformats/aarch64.dat: New file (generated).
* 2013-02-01 Andreas Tobler <andreast@fgznet.ch>andreast2013-02-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (ALL_TARGET_OBS): Add ppc64-tdep.o. (HFILES_NO_SRCDIR): Add ppc64-tdep.h. (ALLDEPFILES): Add ppc64-tdep.c. * configure.tgt (powerpc-*-linux* | powerpc64-*-linux*): Add ppc64-tdep.o to gdb_target_obs. * ppc64-tdep.h: New file. * ppc64-tdep.c: New file. (insn_d, insn_ds, insn_xfx, ppc64_desc_entry_point): Move from ppc-linux-tdep.c to here. (PPC64_STANDARD_LINKAGE1_LEN, PPC64_STANDARD_LINKAGE2_LEN) (PPC64_STANDARD_LINKAGE2_LEN): Likewise and use ARRAY_SIZE macro. (ppc64_standard_linkage1_target, ppc64_standard_linkage2_target) (ppc64_standard_linkage3_target, ppc64_skip_trampoline_code): Move from ppc-linux-tdep.c to here. (ppc64_convert_from_func_ptr_addr): Rename from ppc64_linux_convert_from_func_ptr_addr to ppc64_convert_from_func_ptr_addr and move from ppc-linux-tdep.c to here. * rs6000-tdep.c: (read_insn): Move from ppc-linux-tdep.c to here. (insns_match_pattern, insn_d_field, insn_ds_field): Move from ppc-linux-tdep.c to here and rename them with the ppc_ prefix. * ppc-linux-tdep.c: Include ppc64-tdep.h. Removed above functions. (ppc_linux_init_abi): Adjust.
* Add a new class gdb.Architecture which exposes GDB'ssivachandra2013-01-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | internal representation of architecture via GDB Python API. * Makefile.in: Add entries corresponding to the new file python/py-arch.c. * NEWS (Python Scripting): Add entries for the new class gdb.Architecture and the new method gdb.Frame.architecture. * python/py-arch.c: Implement gdb.Architecture class. * python/py-frame.c (frapy_arch): Implement the method gdb.Frame.architecture(). (frame_object_methods): Add 'architecture' to the method table. * python/python-internal.h: Add declarations of new utility functions. * python/python.c (_initialize_python): Initialize gdb.Architecture class. * doc/gdb.texinfo (Architectures In Python): New sub-sub-section describing the gdb.Architecture class. (Frames In Python): Add description about the new method gdb.Frame.architecture(). * testsuite/gdb.python/frame.exp: Add a test for gdb.Frame.architecture() method.
* * gdb_obstack.h (obconcat): Move declaration here, from...Tom Tromey2013-01-211-2/+4
| | | | | | | | | * symfile.h (obconcat): ... here. * gdb_obstack.c: New file. (obconcat): Move from... * symfile.c (obconcat): ... here. * Makefile.in (SFILES): Add gdb_obstack.c. (COMMON_OBS): Add gdb_obstack.o.
* 2013-01-17 Pedro Alves <palves@redhat.com>Pedro Alves2013-01-171-4/+7
| | | | | | | * acinclude.m4: Include ../config/plugins.m4, ../config/largefile.m4 and ../config/lead-dot.m4. Add comments. * Makefile.in (aclocal_m4_deps): Update. * aclocal.m4: Renegerate.
* 2013-01-03 Pedro Alves <palves@redhat.com>Tom Tromey2013-01-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tom Tromey <tromey@redhat.com> PR cli/7221: * NEWS: Add "catch signal". * breakpoint.c (base_breakpoint_ops): No longer static. (bpstat_explains_signal): New function. (init_catchpoint): No longer static. (base_breakpoint_explains_signal): New function. (base_breakpoint_ops): Initialize new field. * breakpoint.h (enum bpstat_signal_value): New. (struct breakpoint_ops) <explains_signal>: New field. (bpstat_explains_signal): Remove macro, declare as function. (base_breakpoint_ops, init_catchpoint): Declare. * break-catch-sig.c: New file. * inferior.h (signal_catch_update): Declare. * infrun.c (signal_catch): New global. (handle_syscall_event): Update for change to bpstat_explains_signal. (handle_inferior_event): Likewise. Always handle random signals via bpstats. (signal_cache_update): Check signal_catch. (signal_catch_update): New function. (_initialize_infrun): Initialize signal_catch. * Makefile.in (SFILES): Add break-catch-sig.c. (COMMON_OBS): Add break-catch-sig.o. gdb/doc * gdb.texinfo (Set Catchpoints): Document "catch signal". (Signals): Likewise. gdb/testsuite * gdb.base/catch-signal.c: New file. * gdb.base/catch-signal.exp: New file.
* Update years in copyright notice for the GDB files.Joel Brobecker2013-01-011-1/+1
| | | | | | | 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.
* * Makefile.in (init.c): Declare initialize_all_files;Tom Tromey2012-12-181-1/+1
| | | | | | | | don't include call-cmds.h. * call-cmds.h: Remove. * symtab.c: Don't include call-cmds.h. * top.c: Don't include call-cmds.h. Declare initialize_all_files.
* Port GDB to powerpc-lynx178.Joel Brobecker2012-12-181-0/+2
| | | | | | | | | | | | | | | | | gdb/ChangeLog: * defs.h (enum gdb_osabi): Add GDB_OSABI_LYNXOS178. * osabi.c (gdb_osabi_names): Add entry for GDB_OSABI_LYNXOS178. * xcoffread.c (xcoff_get_core_n_import_files): New function. (xcoff_get_n_import_files): New function. * xcoffread.h (xcoffread.h): Add declaration. * rs6000-aix-tdep.c: #include "xcoffread.h". (rs6000_aix_osabi_sniffer): Do not return GDB_OSABI_AIX for XCOFF executables that do not depend on any shared library. * rs6000-lynx178-tdep.c: New file. * configure.tgt: Add powerpc-*-lynx*178 handling. * Makefile.in (ALL_TARGET_OBS): Add rs6000-lynx178-tdep.o. (ALLDEPFILES): Add rs6000-lynx178-tdep.c.
* Makefile.in: Move ravenscar-thread.c from SFILES to ALLDEPFILES.Joel Brobecker2012-12-161-1/+1
| | | | | | | gdb/ChangeLog: * Makefile.in (SFILES): Move ravenscar-thread.c from here... (ALLDEPFILES): ... to there.