blob: d2e60cdc6727da8d58715e73a300289566b4d1fe [file] [log] [blame]
Remember standard operating procedure: Patches go into the FSF tree
*first*, when possible. At the very least non-Google specific patches
should be submitted to the FSF first. If you need to timeout on waiting
for FSF approval that's fine. When the patch goes in upstream, then
delete its entry here and copy over the entry from the appropriate
ChangeLog(s). The goal here is to minimize unnecessary local patches,
they are an ongoing maintenance burden.
2015-09-05 Doug Evans <dje@google.com>
N.B. No further README.google entries are required for google.[ch].
You can still add them if they make sense of course.
This one exists because of the change to Makefile.in.
* Makefile.in: Add google.c.
* google.c: New file.
* google.h: New file.
2015-09-05 Doug Evans <dje@google.com>
Implement 1155829.
* exec.c (elf_64_p): New function.
(exec_file_attach): If the file format is not recognized, check if
it's 64-bit elf and if so recommend using 64-bit gdb. Improve error
message if binary is accidently a core file.
* main.c (captured_main): Call warn_troublesome_environment if !quiet.
* google.c (warn_troublesome_environment): New function.
* symfile.c (print_no_debugging_symbols_found): New function.
(symbol_file_add_with_addrs_or_offsets): Call it if no debugging
symbols found.
(reread_symbols): Ditto.
* testsuite/lib/gdb.exp (gdb_file_cmd): Update to match
output of print_no_debugging_symbols_found.
Properly update gdb_file_cmd_debug_info for nodebug when
loading new symbol table.
* testsuite/gdb.base/sepdebug.exp: Update expected output to match
"no debugging symbols found" warning change for 1155829.
--- README.google 2015-09-05 14:53:18.000000000 -0700
+++ README.google 2015-09-05 15:01:01.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ Fix for http://b/2630476
+ * remote.c (readchar): Use minimum timeout of 10 minutes in noack mode.
+ (putpkt_binary): Don't resend QStartNoAckMode command packets.
+
+ * remote.c (readchar): Don't lengthen timeout value of 0,
+ return immediately means return immediately.
--- README.google 2015-09-05 15:13:05.000000000 -0700
+++ README.google 2015-09-05 15:16:13.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ Temporary hack to make these tests pass with Fission.
+ To be replaced with something that can be checked in upstream
+ when support for .dwp files is completed.
+ * gdb.python/py-prettyprint.exp: Do all C testing before any C++
+ testing.
+
+ * testsuite/gdb.mi/mi-var-invalidate.exp: Reorder compilations so
+ that var-cmd.dwo isn't clobbered.
+
+ * testsuite/boards/fission.exp: Add blaze support.
--- README.google 2015-09-05 15:16:13.000000000 -0700
+++ README.google 2015-09-05 15:19:05.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (use_index_sections): New static global.
+ (read_index_from_section): Check it.
+ (_initialize_dwarf2_read): New option "use-index-sections".
--- README.google 2015-09-05 15:21:34.000000000 -0700
+++ README.google 2015-09-05 15:24:02.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ Temp fix for http://sourceware.org/bugzilla/show_bug.cgi?id=14704
+ * bfd/elf.c (bfd_section_from_shdr, case SHT_REL,SHT_RELA): Don't mark
+ the target section as having relocs if the reloc section is empty.
--- README.google 2015-09-05 15:24:02.000000000 -0700
+++ README.google 2015-09-05 16:13:49.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ Quick hack to workaround bfd memory wastage, bug 8033013.
+ Upstream: http://sourceware.org/bugzilla/show_bug.cgi?id=14108
+ * bfd/bfd-in.h (bfd_init_14108, bfd_release_14108): Declare.
+ * bfd/bfd-in2.h: Regenerate.
+ * bfd/bfd.c (struct bfd): New members use_14108, memory_14108.
+ * bfd/elfcode.h (elf_slurp_symbol_table): If user requested, allocate
+ space for symbols in memory_14108.
+ * bfd/opncls.c (_bfd_delete_bfd): Free memory_14108.
+ (_bfd_free_cached_info): Ditto.
+ (bfd_init_14108, bfd_release_14108): New functions.
+ (bfd_alloc_aux, bfd_release_all_aux): New functions.
+ * gdb/elfread.c (elf_symfile_read): Free memory for normal symtab.
+ * gdb/solib.c (gdb_bfd_lookup_symbol_from_symtab): Ditto.
--- README.google 2015-09-05 16:13:49.000000000 -0700
+++ README.google 2015-09-05 16:18:05.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ Workaround http://sourceware.org/bugzilla/show_bug.cgi?id=15412
+ * typeprint.c (restore_default_ptype_raw): New function.
+ (symbol_info_type_print, symbol_info_typedef_print): New functions.
+ * typeprint.h (symbol_info_type_print): Declare.
+ (symbol_info_typedef_print): Declare.
+ * symtab.c: #include "typeprint.h".
+ (print_symbol_info): Call them.
--- README.google 2015-09-05 16:18:05.000000000 -0700
+++ README.google 2015-09-05 16:20:56.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ * defs.h (begin_uninterruptible_section): Declare.
+ (defer_quit): Declare.
+ * utils.c (defer_quit): New global.
+ (end_uninterruptible_cleanup): New function.
+ (begin_uninterruptible_cleanup): New function.
+ * extension.c (check_quit_flag): Check it. [revised from original]
+ * dwarf2read.c (dw2_instantiate_symtab): Mark symtab expansion as
+ uninterruptible.
+ * psymtab.c (psymtab_to_symtab): Ditto.
+ * python/python.c (check_quit_flag): Ditto.
--- README.google 2015-09-05 16:20:56.000000000 -0700
+++ README.google 2015-09-05 16:22:58.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ Ref# 2180247
+ * infcmd.c (attach_command_post_wait): Pass zero to
+ post_create_inferior, same as run_command_1.
--- README.google 2015-09-05 16:24:43.000000000 -0700
+++ README.google 2015-09-05 16:33:32.000000000 -0700
+
+2015-09-05 Doug Evans <google.com>
+
+ Ref# 13734692, submitted upstream
+ PR gdb/14236
+ * NEWS: Mention change in default behaviour of "interrupt" command.
+ * infcmd.c (struct interrupt_command_continuation_args): New struct.
+ (interrupt_command_continuation_free_args): New function.
+ (wait_thread_stopped): New function.
+ (interrupt_command_post_wait): New function.
+ (interrupt_command_continuation): New function.
+ (add_interrupt_continuation): New function.
+ (interrupt_command): Rewrite.
+
+ doc/
+ * gdb.texinfo (Background Execution): Document new option "&" for
+ "interrupt" command.
+
+ testsuite/
+ * gdb.base/async-shell.exp: Add "&" to "interrupt" command.
+ * gdb.base/dprintf-non-stop.exp: Ditto.
+ * gdb.base/interrupt-noterm.exp: Ditto.
+ * gdb.threads/interrupt-command.c: New file.
+ * gdb.threads/interrupt-command.exp: New file.
+
+ * gdbthread.h (any_running): Declare.
+ * thread.c (any_running): New function.
--- README.google 2015-09-05 16:33:32.000000000 -0700
+++ README.google 2015-09-05 17:01:28.000000000 -0700
+
+2015-09-05 Doug Evans <google.com>
+
+ Ref# 12994080
+ Add support for DW_AT_str_offsets_base.
+ This patch is GOOGLE LOCAL for now.
+ Not sure when to submit it upstream.
+
+ * dwarf2read.c (struct dwarf2_per_objfile): New member str_offsets.
+ (dwarf2_elf_names): Add .debug_str_offsets.
+ (struct dwarf2_cu): New members str_offsets_base,
+ have_str_offsets_base.
+ (struct attribute): Reduce member form to 14 bits. New member
+ string_is_str_index.
+ (DW_STRING_IS_STR_INDEX): New macro.
+ (dwarf2_locate_sections): Handle .debug_str_offsets.
+ (read_cutu_die_from_dwo): Initialize DW_STRING_IS_STR_INDEX for
+ comp_dir attribute. Call get_comp_dir_attr.
+ (lookup_dwo_unit): Replace arg this_cu with reader. All callers
+ updated.
+ (init_cutu_and_read_dies): Fetch value of DW_AT_str_offsets_base.
+ (init_cutu_and_read_dies_no_follow): Ditto.
+ (process_psymtab_comp_unit_reader): Call get_comp_dir_attr.
+ (find_file_and_directory): Ditto.
+ (read_attribute_value): Initialize DW_STRING_IS_STR_INDEX for all
+ string forms.
+ (read_attribute_value) <DW_FORM_GNU_str_index>: Handle appearance in
+ Fission stubs.
+ (read_str_index): Replace arg reader with cu, str_section,
+ str_offsets_section, str_offsets_base. All callers updated.
+ (read_dwo_str_index, read_stub_str_index): New functions.
+ (get_stub_string_attr, get_comp_dir_attr): New functions.
+ * symfile.h (struct dwarf2_debug_sections): New member str_offsets.
+ * xcoffread.c (dwarf2_xcoff_names): Add entry for str_offsets.
+
+ include/
+ * dwarf2.def (DW_AT_str_offsets_base): New attribute.
--- README.google 2015-09-05 17:04:41.000000000 -0700
+++ README.google 2015-09-05 18:02:29.000000000 -0700
+
+2015-09-05 Doug Evans <google.com>
+
+ Upstream PR libc/13097, local ref# 17474967
+ * solib-svr4.c (svr4_read_so_list): Ignore linux-vdso.so.1
+ and linux-gate.so.1.
+
+ Upstream PR libc/13097, local ref# 17474967
+ * solib-svr4.c (svr4_read_so_list): Ignore linux-vdso64.so.1, for ppc.
--- README.google 2015-09-05 18:02:29.000000000 -0700
+++ README.google 2015-09-05 18:13:45.000000000 -0700
+
+2015-09-05 Doug Evans <google.com>
+
+ * NEWS: Mention gdb.Objfile.have_debug_info.
+ * python/py-objfile.c (objfpy_get_have_debug_info): New function.
+ (objfile_getset): Add "have_debug_info".
+
+ doc/
+ * python.texi (Objfiles In Python): Document Objfile.have_debug_info.
+
+ testsuite/
+ * gdb.python/py-objfile.exp: Add tests for objfile.have_debug_info.
--- README.google 2015-09-05 18:13:45.000000000 -0700
+++ README.google 2015-09-05 18:20:10.000000000 -0700
+
+2015-09-05 Doug Evans <google.com>
+
+ Ref: 15188412
+ * breakpoint.c (create_solib_event_breakpoint): Apply
+ gdbarch_skip_entrypoint if it's defined.
--- README.google 2015-09-05 18:23:16.000000000 -0700
+++ README.google 2015-09-05 18:26:36.000000000 -0700
+
+2015-09-05 Doug Evans <google.com>
+
+ PR python/17936
+ * symfile.c (symbol_file_add_with_addrs): Call
+ observer_notify_new_objfile (NULL) early, before loading symbols.
+ (symbol_file_add_separate): Turn off SYMFILE_MAINLINE when loading
+ separate debug files.
+ (clear_symtab_users): Don't call observer_notify_new_objfile (NULL)
+ here if SYMFILE_MAINLINE.
--- README.google 2015-09-05 18:26:36.000000000 -0700
+++ README.google 2015-09-05 18:44:15.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ PR python/17936
+ * symfile.c (symbol_file_add_with_addrs): Don't query whether to load
+ a new symbol table for separate debug files. Don't call
+ observer_notify_new_objfile (NULL) for separate debug files. Turn off
+ SYMFILE_MAINLINE when calling finish_new_objfile for separate debug
+ files.
+ (symbol_file_add_separate): Don't turn off SYMFILE_MAINLINE. Add a
+ comment explaining why.
+
+ testsuite/
+ * gdb.base/sepdebug.exp: Add test to verify two "Reading symbols ..."
+ messages are printed.
--- README.google 2015-09-05 18:44:15.000000000 -0700
+++ README.google 2015-09-05 18:49:14.000000000 -0700
- * solib-svr4.c (svr4_read_so_list): Ignore linux-vdso64.so.1, for ppc.
+ * solib-svr4.c (svr4_read_so_list): Ignore linux-vdso64.so.1, for ppc,
+ and update for -Wc++-compat changes.
--- README.google 2015-09-05 18:49:14.000000000 -0700
+++ README.google 2015-09-05 18:55:44.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ testsuite/
+ * gdb.base/dprintf-detach.exp: Cope with local patch. Ref# 2180247
--- README.google 2015-09-05 18:55:44.000000000 -0700
+++ README.google 2015-09-05 18:59:16.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ * python/python.c (gdbpy_top_interpreter_is_mi): New function.
+ (GdbMethods): New member top_interpreter_is_mi.
+
+ testsuite/
+ * gdb.python/py-mi.exp: Add tests for gdb.top_interpreter_is_mi.
--- README.google 2015-09-05 18:59:16.000000000 -0700
+++ README.google 2015-09-05 20:17:18.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ Two Level Line Tables support.
+ Submitted upstream, but not committed there yet.
+
+ * NEWS: Mention DWARF 5 line tables.
+ * dwarf2read.c (DW_VERSION_EXPERIMENTAL_TLL): New macro.
+ (dwarf2_per_objfile): New member line_str.
+ (dwarf2_elf_names): Update.
+ (struct file_entry): Add comment. New member offset_size.
+ Rename member header_length to prologue_length, all uses updated.
+ New members address_size, segment_size.
+ (line_header) <actuals_program_start, actuals_program_end>: New
+ members.
+ (dwarf2_statement_list_fits_in_line_number_section_complaint): Delete.
+ (dwarf2_invalid_form_complaint): New function.
+ (dwarf2_locate_sections): Handle .debug_line_str.
+ (read_indirect_line_string): New function.
+ (read_unsigned_integer): New function.
+ (read_dwarf2_line_header_paths): New function.
+ (dwarf5_line_header_format): New struct.
+ (dwarf5_line_header_entry): New struct.
+ (read_dwarf5_line_header_entry): New function.
+ (read_dwarf5_line_header_subtable): New function.
+ (read_dwarf5_line_header_paths): New function.
+ (read_dwarf6_subprograms): New function.
+ (read_experimental_tll_header_and_tables): New function.
+ (dwarf_decode_line_header): Update to handle DWARF5 line tables.
+ Handle DW_VERSION_EXPERIMENTAL_TLL.
+ (logical_line): New typedef.
+ (DEF_VEC_O logical_line): Define vector.
+ (record_line_ftype): New typedef.
+ (lnp_state_machine) <context, subprogram>: New members.
+ (lnp_reader_state) <two_level_p, build_logicals_p>: New members.
+ (lnp_reader_state) <logical_line_table>: New member.
+ (dwarf_append_logical_line): New function.
+ (dwarf_record_line): Handle Two Level Line Tables.
+ (init_lnp_state_machine): Initialize context, subprogram.
+ (dwarf_decode_lines_1): New result type to int. All callers updated.
+ Add Two Level Line Tables support.
+ (dwarf_decode_lines): Add Two Level Line Tables support.
+ (dwarf_line_number_content_type_name): New function.
+ (skip_form_bytes): Mention DW_FORM_data16. Call
+ dwarf2_invalid_form_complaint.
+ * symfile.h (struct dwarf2_debug_sections): New member line_str.
+ * xcoffread.c (dwarf2_xcoff_names): Add entry for .debug_line_str.
+
+ testsuite/
+ * boards/fission-tll.exp: New file.
+
+ include/
+ * dwarf2.def (DW_FORM_line_strp): New form.
+ * dwarf2.h (dwarf_line_number_ops): New enum values
+ DW_LNS_set_address_from_logical, DW_LNS_set_subprogram,
+ DW_LNS_inlined_call, DW_LNS_pop_context.
+ (dwarf_line_number_content_type): New enum.
--- README.google 2015-09-05 20:17:18.000000000 -0700
+++ README.google 2015-09-05 23:58:27.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ Ref# 20215162
+ * common/common-exceptions.c (exceptions_state_mc_init): Initialize
+ suberror.
+ (throw_it): New arg suberror. All callers updated.
+ (throw_error_with_suberror): New function.
+ * common/common-exceptions.h (enum errors): New enum value
+ SYSCALL_FAILED_ERROR.
+ (struct gdb_exception): New member suberror.
+ (throw_error_with_suberror): Declare.
+ * inf-ptrace.c (inf_ptrace_attach): Call throw_perror_with_name
+ passing SYSCALL_FAILED_ERROR.
+ * linux-nat.c (linux_nat_attach): Rewrite attach fail error processing.
+ * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason): Make static.
+ Prepend ", " to messages.
+ (linux_ptrace_attach_fail_reason_string): Rewrite message construction.
+ Add kernel.yama.ptrace_scope suggestion.
+ * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Delete.
+ * utils.c (perror_string): New arg errno_value. All callers updated.
+ (throw_perror_with_name): Call throw_error_with_suberror.
--- README.google 2015-09-06 00:17:17.000000000 -0700
+++ README.google 2015-09-06 00:28:23.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ * completer.c (location_completer): Protect file_to_match with cleanup.
+ * dwarf2read.c (dw2_map_symtabs_matching_filename): Add QUIT calls.
+ * psymtab.c (psym_map_symtabs_matching_filename): Add QUIT call.
+ * symtab.c (iterate_over_symtabs): Add QUIT calls.
--- README.google 2015-09-06 00:28:23.000000000 -0700
+++ README.google 2015-09-06 00:32:11.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ * objfiles.c (default_iterate_over_objfiles_in_search_order): Add
+ QUIT call.
+ * symtab.c (lookup_static_symbol): Ditto.
+ (basic_lookup_transparent_type): Ditto.
+ * windows-tdep.c (windows_iterate_over_objfiles_in_search_order):
+ Ditto.
--- README.google 2015-09-06 00:39:08.000000000 -0700
+++ README.google 2015-09-06 00:43:48.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ * NEWS: Document new post-initializer support for Python.
+ * extension-priv.h (extension_language_ops) <post_initialization>:
+ New member.
+ * extension.c (post_ext_lang_initialization): New function.
+ * extension.h (post_ext_lang_initialization): Declare.
+ * main.c: #include "extension.h".
+ (captured_main): Call post_ext_lang_initialization.
+ * python/lib/gdb/__init__.py (post_initializers): Define.
+ * python/python.c (python_extension_ops): Update.
+ (gdbpy_post_initialization): New function.
+ * guile/guile.c (guile_extension_ops): Update.
+
+ doc/
+ * python.texi (Python API): Add entry for Startup Post-Initialization.
+ (Startup Post-Initialization): New node.
+
+ testsuite/
+ * gdb.python/py-post-init.c: New file.
+ * gdb.python/py-post-init.exp: New file.
+ * gdb.python/py-post-init.py: New file.
--- README.google 2015-09-06 00:43:48.000000000 -0700
+++ README.google 2015-09-06 00:49:09.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ * completer.c (gdb_path_isdir): Move to ...
+ * utils.c (gdb_path_isdir): ... here.
+ (gdb_path_isfile): New function.
+ * utils.h (gdb_path_isdir): Declare.
+ (gdb_path_isfile): Declare.
+ * main.c (relocate_gdb_file): Renamed from relocate_path.
+ Try both make_relative_prefix and make_relative_prefix_ignore_symlinks.
+ All callers updated.
+ (maybe_lrealpath): New function.
+ (relocate_gdb_directory: Try both make_relative_prefix and
+ make_relative_prefix_ignore_symlinks.
+ * top.c (print_gdb_configuration): Print BINDIR.
+
+ testsuite/
+ * gdb.base/relocatable.exp: New file.
--- README.google 2015-09-06 00:49:09.000000000 -0700
+++ README.google 2015-09-06 00:53:20.000000000 -0700
+
+2015-09-05 Doug Evans <dje@google.com>
+
+ testsuite/
+ * gdb.arch/amd64-entry-value-paramref.S: Re-fixup DIE offsets, they're
+ relative to the start of the CU.
--- README.google 2015-09-06 01:25:12.000000000 -0700
+++ README.google 2015-09-08 13:41:18.000000000 -0700
+
+2015-09-08 Doug Evans <dje@google.com>
+
+ Submitted upstream, but not committed there yet.
+ PR go/18926
+ * gdb.go/methods.exp: Mark gdb_breakpoint calls as known failures.
--- README.google 2015-09-08 13:41:18.000000000 -0700
+++ README.google 2015-09-11 16:22:06.000000000 -0700
+
+2015-09-11 Doug Evans <dje@google.com>
+
+ * NEWS: Mention pie-displacement-verification.
+ * solib-svr4.c: #include complaints.h, gdbcmd.h.
+ (pie_displacement_verification): New static global.
+ (build_id): New struct.
+ (find_build_id_in_note_buffer, get_build_id): New functions.
+ (build_ids_match_p): New function.
+ (svr4_exec_displacement): Don't verify phdrs if
+ !pie_exec_displacement. If build-ids match, return success.
+ Print complaint if there's a phdr mismatch. Print warning on
+ failure.
+ (_initialize_svr4_solib): New parameter pie-displacement-verification.
+
+ doc/
+ * gdb.texinfo (Files): Document pie-displacement-verification.
+
+ testsuite/
+ * gdb.base/gcore-build-id-pie.c: New file.
+ * gdb.base/gcore-build-id-pie.exp: New file.
--- README.google 2015-09-11 16:22:06.000000000 -0700
+++ README.google 2015-09-15 16:23:33.000000000 -0700
+
+2015-09-15 Doug Evans <dje@google.com>
+
+ Submitted upstream, not committed there yet.
+ PR python/18938
+ * cli/cli-cmds (source_script_fron_sctream): New arg file_to_open.
+ All callers updated.
+
+ testsuite/
+ * gdb.python/python.exp: Add test for symlink from .py file to .notpy
+ file.
--- README.google 2015-09-15 16:23:33.000000000 -0700
+++ README.google 2015-09-15 16:26:22.000000000 -0700
+
+2015-09-15 Doug Evans <dje@google.com>
+
+ Ref# 23817600
+ * dwarf2read.c (dw2_get_real_path): Call canonicalize_source_path
+ instead of gdb_realpath.
+ * symtab.c (iterate_over_symtabs): Ditto.
+ * source.c (canonicalize_source_paths): New static global.
+ (source_full_path_of): Only pass OPF_RETURN_REALPATH to openp if
+ canonicalize_source_paths.
+ (find_and_open_source): Ditto. Call canonicalize_source_path.
+ (canonicalize_source_path): New function.
+ (_initialize_source): New parameter "canonicalize-source-paths".
+ * source.h (canonicalize_source_path): Declare.
--- README.google 2015-09-15 16:46:29.000000000 -0700
+++ README.google 2015-09-16 14:07:50.000000000 -0700
+
+2015-09-15 Doug Evans <dje@google.com>
+
+ testsuite/
+ * gdb.base/gcore.c (array_func): Add reference to static_array.