summaryrefslogtreecommitdiff
path: root/gdb/contrib
Commit message (Collapse)AuthorAgeFilesLines
* Remove the exception and cleanup checkersTom Tromey2019-01-054-874/+0
| | | | | | | | | | | | | | Now that gdb is transitioning away from cleanups, there is no reason to keep the cleanup and exception checker scripts around. This patch removes them. gdb/ChangeLog 2019-01-05 Tom Tromey <tom@tromey.com> * contrib/cleanup_check.py: Remove. * contrib/gcc-with-excheck: Remove. * contrib/exsummary.py: Remove. * contrib/excheck.py: Remove.
* Update copyright year range in all GDB files.Joel Brobecker2019-01-0113-13/+13
| | | | | | | | | | | | | | | | This commit applies all changes made after running the gdb/copyright.py script. Note that one file was flagged by the script, due to an invalid copyright header (gdb/unittests/basic_string_view/element_access/char/empty.cc). As the file was copied from GCC's libstdc++-v3 testsuite, this commit leaves this file untouched for the time being; a patch to fix the header was sent to gcc-patches first. gdb/ChangeLog: Update copyright year range in all GDB files.
* contrib/gdb-add-index.sh -dwarf-5Jan Kratochvil2018-07-071-2/+8
| | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------------ (gdb) help save gdb-index Save a gdb-index file. Usage: save gdb-index [-dwarf-5] DIRECTORY No options create one file with .gdb-index extension for pre-DWARF-5 compatible .gdb_index section. With -dwarf-5 creates two files with extension .debug_names and .debug_str for DWARF-5 .debug_names section. ------------------------------------------------------------------------------ But gdb-add-index command provided no way how to pass the -dwarf-5 option. gdb/ChangeLog 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com> * contrib/gdb-add-index.sh ($dwarf5): New, use it.
* Update copyright year range in all GDB filesJoel Brobecker2018-01-0213-13/+13
| | | | | | gdb/ChangeLog: Update copyright year range in all GDB files
* Fix typo in gdb_ari.shSimon Marchi2017-12-131-1/+1
| | | | | | gdb/ChangeLog: * contrib/ari/gdb_ari.sh: Fix typo in help.
* DWARF-5: .debug_names index producerJan Kratochvil2017-12-081-6/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new "-dwarf-5" switch to "save gdb-index" that makes it generate index files with DWARF-5 .debug_names/.debug_str sections instead of GDB's own .gdb_index. We should probably add a command line option to contrib/gdb-add-index.sh (incl. cc-with-tweaks.sh) for the new -dwarf-5 GDB option, and a new target board to make it more convenient to exercise this. To be done later. gdb/ChangeLog 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com> Pedro Alves <palves@redhat.com> * contrib/gdb-add-index.sh (index): Rename to ... (index4): ... here. (index5, debugstr, debugstrmerge, debugstrerr): New variables. Support also .debug_names and .debug_str. * dwarf2read.c: Include cmath, set, list. (INDEX_SUFFIX): Rename to ... (INDEX4_SUFFIX): ... here. (INDEX5_SUFFIX, DEBUG_STR_SUFFIX): New. (file_write(FILE *, const void *, size_t)): New. (file_write(FILE *, const std::vector<Elem, Alloc> &)): New. (data_buf::append_unsigned_leb128, data_buf::empty): New. (data_buf::file_write): Use ::file_write. (data_buf::c_str, dwarf5_djb_hash, debug_names) (check_dwarf64_offsets): New. (psyms_seen_size, write_gdbindex): New from write_psymtabs_to_index code. (dwarf5_gdb_augmentation, write_debug_names, assert_file_size) (enum dw_index_kind): New. (write_psymtabs_to_index): New parameter index_kind. Support filename_str and out_file_str. Move code to write_gdbindex, possibly call write_debug_names. (save_gdb_index_command): New parameter -dwarf-5. (_initialize_dwarf2_read): Document the new parameter -dwarf-5. gdb/doc/ChangeLog 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.texinfo (Index Files): Document .debug_names and -dwarf-5. -- gdb/contrib/gdb-add-index.sh | 53 ++ gdb/doc/gdb.texinfo | 24 + gdb/dwarf2read.c | 919 ++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 935 insertions(+), 61 deletions(-)
* cc-with-tweaks.sh: Use gdb-add-index.shJan Kratochvil2017-12-081-17/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With DWARF-5 .debug_names, the commands to add the index to the symbol file are more complicated, as now also .debug_str needs to be modified. Currently, contrib/cc-with-tweaks.sh calls objcopy to handle the '-i' option instead of using contrib/gdb-add-index.sh which basically does the same. To help with .debug_names, this commit makes contrib/cc-with-tweaks.sh reuse contrib/gdb-add-index.sh instead. A problem this ran into is whether contrib/cc-with-tweaks.sh should fail or not when no index is produced. Currently, contrib/cc-with-tweaks.sh is more quiet (=successful) than contrib/gdb-add-index.sh and so with no further changes testsuite runs with an index would "regress". This commit tries to keep the behavior unchanged. Some cases still error with: Ada is not currently supported by the index But some cases (such as some trivial gdb.dwarf2/ testcases with no DWARF data to index) produce no index while the testcases still PASS now instead of: -PASS: gdb.arch/i386-bp_permanent.exp: stack pointer value matches +gdb compile failed, gdb-add-index.sh: No index was created for gdb/testsuite.unix.-m64/outputs/gdb.arch/i386-bp_permanent/i386-bp_permanent +gdb-add-index.sh: [Was there no debuginfo? Was there already an index?] +UNTESTED: gdb.arch/i386-bp_permanent.exp: failed to compile gdb/ChangeLog 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com> Pedro Alves <palves@redhat.com> * contrib/cc-with-tweaks.sh: Change interpreter to bash, incl. initial comment. (GDB_ADD_INDEX): New variable. <$want_index>: Call $GDB_ADD_INDEX.
* update copyright year range in GDB filesJoel Brobecker2017-01-0113-13/+13
| | | | | | | | | 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.
* Remove check requiring void argument to functions with no parameters.John Baldwin2016-11-251-10/+0
| | | | | | | | C++ treats an empty parameter list as no parameters unlike C. gdb/ChangeLog: * contrib/ari/gdb_ari.sh (no parameter function): Remove check.
* Fix spelling mistakes in comments in shell scriptsAmbrogino Modigliani2016-11-221-1/+1
| | | | | | | | | gdb/ChangeLog: 2016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com> * contrib/expect-read1.sh: Fix spelling in comments. * gdb_buildall.sh: Fix spelling in comments. * gdb_mbuild.sh: Fix spelling in comments.
* ARI: Add detection of printf_vma and sprintf_vmaJoel Brobecker2016-11-191-0/+16
| | | | | | | | | | | We shouldn't be using these, since their output goes straight to stdout, which doesn't allow redirection. So this patch updates the ARI to detect any such use. gdb/ChangeLog: * contrib/ari/gdb_ari.sh: Add detection of printf_vma and sprintf_vma.
* ARI: Remove true/false checksPedro Alves2016-10-131-21/+1
| | | | | | | | | These don't make sense with C++. gdb/ChangeLog: 2016-10-13 Pedro Alves <palves@redhat.com> * contrib/ari/gdb_ari.sh (boolean): Suggest bool instead. (false, true): Remove checks.
* GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker2016-01-0113-13/+13
| | | | | | gdb/ChangeLog: Update year range in copyright notice of all files.
* Revert "Remove true and false ARI checks now that we use stdbool.h."Joel Brobecker2015-03-021-0/+20
| | | | | | | | | As we cannot use type bool until conversion to C++ is official, this patch re-instates the ARI checks for "true/false". gdb/ChangeLog: * contrib/ari/gdb_ari.sh: Reinstate checks for "true" and "false".
* Remove true and false ARI checks now that we use stdbool.h.Mark Wielaard2015-02-161-20/+0
| | | | | | gdb/ChangeLog: * contrib/ari/gdb_ari.sh: Remove checks for "true" and "false".
* Move safe_strerror to common/Sergio Durigan Junior2015-01-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves safe_strerror from the gdb/{posix,mingw}-hdep.c files to the respective common/{posix,mingw}-strerror.c files. This is a preparation for the next patch, which shares a common code (to disable address space randomization when creating a new inferior). The patch has been regtested on Fedora 20 x86_64, and no regressions were found. gdb/ChangeLog 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com> * Makefile.in (ALLDEPFILES): Including common/mingw-strerror.c and common/posix-strerror.c. (posix-strerror.o): New rule. (mingw-strerror.o): Likewise. * common/common-utils.h (safe_strerror): Move prototype to here, from utils.h. * common/common.host: New file. * common/mingw-strerror.c: Likewise. * common/posix-strerror.c: Likewise. * configure: Regenerated. * configure.ac: Source common/common.host. Add variable common_host_obs to gdb_host_obs. * contrib/ari/gdb_ari.sh: Mention gdb/common/mingw-strerror.c and gdb/common/posix-strerror.c when warning about the use of strerror. * mingw-hdep.c (safe_strerror): Remove definition; move it to common/mingw-strerror.c. * posix-hdep.c (safe_strerror): Remove definition; move it to common/posix-hdep.c. * utils.h (safe_strerror): Remove prototype; move to common/common-utils.h. gdb/gdbserver/ChangeLog 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com> * Makefile.in (posix-strerror.o): New rule. (mingw-strerror.o): Likewise. * configure: Regenerated. * configure.ac: Source file ../common/common.host. Initialize new variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
* Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker2015-01-0113-13/+13
| | | | | | gdb/ChangeLog: Update year range in copyright notice of all files.
* Update Copyright year range in all files maintained by GDB.Joel Brobecker2014-01-0113-13/+13
|
* Resurrect gdb-add-index as a contrib scriptSamuel Bronson2013-12-031-0/+69
| | | | | | | | | | | | | | | | | | | | | | This includes changes made in Fedora's gdb packaging[1], Doug's robustness patch[2] from before gdb-add-index was dropped, some corrections, and some more changes Doug accumulated in the meantime[3]. [1]: http://pkgs.fedoraproject.org/cgit/gdb.git/log/gdb-gdb-add-index-script.patch?id=fe74423b0812bae6d7bb027584e401a2ac37d24d [2]: https://sourceware.org/ml/gdb-patches/2010-09/msg00130.html [3]: https://sourceware.org/ml/gdb-patches/2013-11/msg00297.html It would be a good idea to mention the existance of this script in (info "(gdb) Index Files"), but I'm boycotting invariant sections/cover texts because non-free docs are a PITA, so somebody else would need to do that. Summary of previous activity: 97924a9 Actual removal c29c521 Attempted removal (accidentally left gdb-add-index.sh in place) c2bbed2 Addition
* gdb_ari.sh: Remove entries for dirent.h and stat.h.Joel Brobecker2013-11-191-18/+0
| | | | | | | | | | The corresponding gdb_dirent.h and gdb_stat.h no longer exist. We rely on gnulib for those, now. gdb/ChangeLog: * contrib/ari/gdb_ari.sh: Remove checks for "dirent.h" and "stat.h".
* fix ARI for git migrationTom Tromey2013-10-251-0/+5
| | | | | | This fixes the ARI script for the git migration. * contrib/ari/create-web-ari-in-src.sh: Update for git.
* * contrib/ari/update-web-ari.sh: Update for version.in change.Tom Tromey2013-07-021-1/+2
|
* add the cleanup checkerTom Tromey2013-05-302-1/+366
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the cleanup checker. This is a Python plugin for GCC that checks some rules for cleanup handling. In particular it tries to notice when cleanups are left dangling at the end of a function. It does this by applying a few simple rules. First, it understands that a function whose return type is "struct cleanup *" is a "cleanup constructor". Such functions are expected to return the first cleanup that they make. Then, it has the notion of a "master cleanup". The checker keeps a stack of all cleanups made in a basic block. The first element is pushed on the stack is the master cleanup -- the one that must later be passed to either do_cleanups or discard_cleanups. It is not perfect -- some constructs confuse it. So, part of this series rewrites some code in gdb so that it is analyzable. I'll note these spots and you can decide whether or not this is a good idea. This patch also changes gcc-with-excheck to give it options. Now you must use either -Xc (for the cleanup checker) or -Xx (for the exception checker). * contrib/cleanup_check.py: New file. * contrib/gcc-with-excheck: Add option parsing.
* * contrib/cc-with-tweaks.sh (-p): Handle no dwo files.Doug Evans2013-05-241-4/+7
|
* * contrib/ari/gdb_ari.sh (SOLIB_ADD, SOLIB_CREATE_INFERIOR_HOOK)Pierre Muller2013-05-071-3/+3
| | | | (PC_SOLIB): Change type from ari_deprecate to ari_regression.
* * ./contrib/ari/gdb_ari.sh (editCase rule): Fix spelling error.Pierre Muller2013-04-291-1/+1
|
* * contrib/ari/gdb_ari.sh (write_pc rule): Do not considerPierre Muller2013-04-151-1/+0
| | | | set_gdbarch_write_pc as deprecated anymore.
* * contrib/cc-with-tweaks.sh: Check exit code of dwp.Doug Evans2013-03-251-0/+2
|
* * contrib/ari/gdb_ari.sh (OP eol rule): Also checkPierre Muller2013-03-201-1/+5
| | | | addtion, subtraction, multiplication and division binary operator.
* * contrib/excheck.py: New file.Tom Tromey2013-02-283-0/+509
| | | | | * contrib/exsummary.py: New file. * contrib/gcc-with-excheck: New file.
* gdb/Jan Kratochvil2013-02-151-1/+1
| | | | * contrib/cc-with-tweaks.sh: Extend the comment for -p option.
* * contrib/ari/gdb_ari.sh (GNU/Linux rule): Remove.Pierre Muller2013-02-141-15/+0
|
* gdb/Jan Kratochvil2013-02-032-0/+82
| | | | | * contrib/expect-read1.c: New file. * contrib/expect-read1.sh: New file.
* * contrib/cc-with-tweaks.sh: Add references to Fission docs.Doug Evans2013-01-161-0/+4
|
* Update years in copyright notice for the GDB files.Joel Brobecker2013-01-016-6/+6
| | | | | | | 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.
* Delete the gdb/osf-share directory.Joel Brobecker2012-12-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are old files that GDB does not use anymore, and probably has not used for a long time. gdb/ChangeLog: * osf-share/AT386/cma_thread_io.h: Delete. * osf-share/HP800/cma_thread_io.h: Delete. * osf-share/README: Delete. * osf-share/RIOS/cma_thread_io.h: Delete. * osf-share/cma_attr.h: Delete. * osf-share/cma_deb_core.h: Delete. * osf-share/cma_debug_client.h: Delete. * osf-share/cma_errors.h: Delete. * osf-share/cma_handle.h: Delete. * osf-share/cma_init.h: Delete. * osf-share/cma_list.h: Delete. * osf-share/cma_mutex.h: Delete. * osf-share/cma_sched.h: Delete. * osf-share/cma_semaphore_defs.h: Delete. * osf-share/cma_sequence.h: Delete. * osf-share/cma_stack.h: Delete. * osf-share/cma_stack_int.h: Delete. * osf-share/cma_tcb_defs.h: Delete. * osf-share/cma_util.h: Delete. * Makefile.in (HFILES_NO_SRCDIR): Remove entries for the files in osf-share. * config/djgpp/fnchange.lst: Remove osf-share/cma_stack_int.h entry. * contrib/ari/gdb_find.sh: Remove handling of osf-share. * copyright.sh (NOT_FSF_LIST): Remove "gdb/osf-share" entry.
* * contrib/ari/gdb_ari.sh: Remove rules for xasprintf andTom Tromey2012-11-291-20/+0
| | | | | | xvasprintf. * common/common-utils.c (xasprintf, xvasprintf): Remove. * common/common-utils.h (xasprintf, xvasprintf): Remove.
* 2012-11-15 Pierre Muller <muller@sourceware.org>Pierre Muller2012-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARI fixes: move gdb_wait and gdb_stat headers to common subdirectory. * gdb_stat.h: Delete. Moved to common directory. * common/gdb_stat.h: New file. * gdb_wait.h: Delete. Moved to common directory. * common/gdb_wait.h: New file. * Makefile.in (H_FILES_NO_SRC): Adapt to new header location. * contrib/ari/gdb_ari.sh (wait.h rule): Adapt to new gdb_wait.h location. (stat.h rule): Adapt to new gdb_stat.h location. * common/linux-osdata.c: Include "gdb_stat.h" header instead of <sys/stat.h> header. * common/linux-ptrace.c: Include "gdb_wait.h" header instead of <sys/wait.h> header. gdbserver ChangeLog entry: 2012-11-15 Pierre Muller <muller@sourceware.org> * configure.ac (AC_CHECK_HEADERS): Add wait.h header. * config.in: Regenerate. * configure: Regenerate. * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header. Use "gdb_wait.h" header instead of <sys/wait.h> header. * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header. * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h> header. * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header instead of <sys/wait.h> header. * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
* PR gdb/14704:Tom Tromey2012-11-081-0/+9
| | | | | | | | | | | | | | | | | | * gdb_bfd.c (gdb_bfd_ref): Set BFD_DECOMPRESS. (zlib_decompress_section): Remove. (gdb_bfd_map_section): Only check for compressed section in mmap case. Use bfd_get_full_section_contents. * osabi.c (check_note): Add 'sectsize' argument. Read section data. (generic_elf_osabi_sniff_abi_tag_sections): Don't read section data. Update for check_note change. * xcoffread.c (xcoff_initial_scan): Use bfd_get_full_section_contents. * py-auto-load.c (auto_load_section_scripts): Use bfd_get_full_section_contents. * contrib/cc-with-tweaks.sh: Add -Z option. testsuite * gdb.base/comprdebug.exp: New file.
* * update-web-ari.sh (print_heading): Add number of filesPierre Muller2012-11-081-11/+29
| | | | | | | | checked. (nb_files): New variable counting the number of sources files found by gdb_find.sh script. (debug_awk): New variable to allow extra debug output. (indexes): Add more information if DEBUG_AWK is set.
* * contrib/ari/gdb_ari.sh (LANG, LC_ALL): Use 'C' instead of 'c'Pierre Muller2012-11-082-11/+13
| | | | | | | | | | | | | as default language. (AWK): Use = instead of == for sh test to avoid warning. (Linux rule): Correct [:digit] into [[:digit:]]. (__func__ rule): Adapt to "gdb_assert.h" move to common subdirectory. (vasprintf rule): Adapt to common subdirectory moves. (xasprintf rule): Idem. (xvasprintf rule): Idem. (var_boolean rule): Accept occurence in == or != test. * contrib/ari/gdb_find.sh: Also prune gdbtk directory.
* * contrib/ari/create-web-ari-in-src.sh: Avoid problem if scriptPierre Muller2012-11-061-1/+1
| | | | is not executable.
* Add support for DWP files. http://gcc.gnu.org/wiki/DebugFissionDWPDoug Evans2012-11-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * contrib/cc-with-tweaks.sh: Add -p parameter to invoke dwp. * dwarf2read.c: #include "elf-bfd.h". (struct dwarf2_per_objfile): New members dwp_checked, dwp_file. (dwop_section_names): Renamed from dwo_section names. All uses updated. Add entries for .debug_cu_index, .debug_tu_index. (struct dwo_file): Rename dwo_name to name, dwo_bfd to dbfd. All uses updated. (struct dwp_sections): New type. (struct virtual_dwo_sections): New type. (struct dwp_hash_table): New type. (struct dwp_file): New type. (init_cutu_and_read_dies): Ensure DWO info/types section has been read in. Handle DWOs coming from DWP files. (lookup_dwo_file_slot): New function. (dwarf2_locate_dwo_sections): Move definition closer to use. (create_dwo_debug_info_hash_table_reader): Renamed from create_debug_info_hash_table_reader. All callers updated. (create_dwo_debug_info_hash_table): Renamed from create_debug_info_hash_table. All callers updated. (create_dwp_hash_table): New function. (locate_virtual_dwo_sections, create_dwo_in_dwp): New functions. (lookup_dwo_in_dwp): New function. (try_open_dwop_file): Renamed from try_open_dwo_file. New parameter is_dwp. All callers updated. (open_dwop_file): Renamed from open_dwo_file. All callers updated. (open_and_init_dwo_file): Renamed from init_dwo_file. All callers updated. (lookup_dwo_file): Delete. (dwarf2_locate_dwp_sections): New function. (hash_dwp_loaded_cutus, eq_dwp_loaded_cutus): New functions. (allocate_dwp_loaded_cutus_table): New function. (open_and_init_dwp_file): New function. (lookup_dwo_cutu): New function. (lookup_dwo_comp_unit, lookup_dwo_type_unit): Call it.
* Re-added with correct permissionsPierre Muller2012-11-024-0/+2390
|
* Removed to be re-added with correct permissionsPierre Muller2012-11-024-2390/+0
|
* Incorporate ARI web page generator into GDB sources.Pierre Muller2012-11-014-0/+2390
| | | | | | | * contrib/ari/create-web-ari-in-src.sh: New file. * contrib/ari/gdb_ari.sh: New file. * contrib/ari/gdb_find.sh: New file. * contrib/ari/update-web-ari.sh: New file.
* Point contrib/cc-with-tweaks.sh to the build-local data-directory.Yit Phang Khoo2012-09-141-4/+5
| | | | | | | gdb/ * contrib/cc-with-tweaks.sh (GDB): Add -data-directory data-directory as appropriate.
* gdb/Jan Kratochvil2012-07-251-2/+2
| | | | * contrib/cc-with-tweaks.sh: Put into comment path gdb/contrib/.
* * cc-with-index.sh, cc-with-dwz.sh: Remove.Tom Tromey2012-07-181-0/+162
| | | | * contrib/cc-with-tweaks.sh: New file.
* 2012-04-26 Sterling Augustine <saugustine@google.com>Sterling Augustine2012-04-301-0/+207
* contrib: New directory. * contrib/test_pubnames_and_indexes.py: New file.