Special case NULL when using printf's %s format
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-03-14 Tom Tromey <tom@tromey.com>
2
3 PR cli/14977:
4 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
5 for NULL.
6
7 2018-03-14 Tom Tromey <tom@tromey.com>
8
9 PR cli/19918:
10 * printcmd.c (printf_pointer): Allow "-" in format.
11
12 2018-03-14 Tom Tromey <tom@tromey.com>
13
14 * printcmd.c (_initialize_printcmd): Add usage to printf.
15
16 2018-03-14 Yao Qi <qiyao@sourceware.org>
17
18 * MAINTAINERS: Update my email address.
19
20 2018-03-13 Tom Tromey <tom@tromey.com>
21
22 * machoread.c (macho_check_dsym): Change filenamep to a
23 std::string*.
24 (macho_symfile_read): Update.
25 * symfile.c (load_command): Use std::string.
26
27 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
28
29 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
30 to error message string.
31 (riscv_register_name): Use xsnprintf instead of sprintf.
32 (riscv_insn::fetch_instruction): Use gdb_assert instead of
33 internal_error.
34 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
35 error.
36 (riscv_push_dummy_call): Likewise.
37
38 2018-03-12 Tom Tromey <tom@tromey.com>
39
40 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
41 Use gdb::byte_vector.
42 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
43
44 2018-03-12 Yao Qi <yao.qi@linaro.org>
45
46 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
47 parameter type to readable_regcache.
48 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
49 the declaration.
50
51 2018-03-11 Tom Tromey <tom@tromey.com>
52
53 * dwarf2read.c (struct nextfield): Add initializers.
54 (struct nextfnfield): Remove.
55 (struct fnfieldlist): Add initializers. Remove "length" and
56 "head", use std::vector.
57 (struct decl_field_list): Remove.
58 (struct field_info): Add initializers.
59 <fields, baseclasses>: Now std::vector.
60 <nbaseclasses, nfnfields, typedef_field_list_count,
61 nested_types_list_count>: Remove.
62 (dwarf2_add_field, dwarf2_add_type_defn)
63 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
64 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
65 (process_structure_scope): Update.
66
67 2018-03-11 Tom Tromey <tom@tromey.com>
68
69 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
70 for use by std::sort.
71 (build_type_psymtabs_1): Use std::vector.
72
73 2018-03-09 Eli Zaretskii <eliz@gnu.org>
74
75 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
76 and LIBMPFR in the printed configuration.
77
78 2018-03-08 Tom Tromey <tom@tromey.com>
79
80 * source.c (get_filename_and_charpos): Use scoped_fd.
81 * nto-procfs.c (procfs_open_1): Use scoped_fd.
82 (procfs_pidlist): Likewise.
83 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
84 (iterate_over_mappings): Likewise.
85
86 2018-03-08 Tom Tromey <tom@tromey.com>
87
88 * infcall.c (struct call_return_meta_info)
89 <stack_temporaries_enabled>: Remove.
90 (get_call_return_value, call_function_by_hand_dummy): Update.
91 * thread.c (disable_thread_stack_temporaries): Remove.
92 (enable_thread_stack_temporaries): Remove.
93 (thread_stack_temporaries_enabled_p): Return bool.
94 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
95 (get_last_thread_stack_temporary): Update.
96 * eval.c (evaluate_subexp): Update.
97 * gdbthread.h (class enable_thread_stack_temporaries): Now a
98 class, not a function.
99 (value_ptr, value_vec): Remove typedefs.
100 (class thread_info) <stack_temporaries_enabled>: Now bool.
101 <stack_temporaries>: Now a std::vector.
102 (thread_stack_temporaries_enabled_p)
103 (value_in_thread_stack_temporaries): Return bool.
104
105 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
106
107 * remote.c (putpkt_binary): Fix omitted bytes reporting.
108 (getpkt_or_notif_sane_1): Likewise.
109
110 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
111
112 * build-id.c (build_id_to_debug_bfd): Use std::string.
113
114 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
115
116 * build-id.c (find_separate_debug_file_by_buildid): Return
117 std::string.
118 * build-id.h (find_separate_debug_file_by_buildid): Return
119 std::string.
120 * coffread.c (coff_symfile_read): Adjust to std::string.
121 * elfread.c (elf_symfile_read): Adjust to std::string.
122 * symfile.c (separate_debug_file_exists): Change parameter to
123 std::string.
124 (find_separate_debug_file): Return std::string.
125 (find_separate_debug_file_by_debuglink): Return std::string.
126 * symfile.h (find_separate_debug_file_by_debuglink): Return
127 std::string.
128
129 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
130
131 * common/xml-utils.c (xml_escape_text): Move code to...
132 (xml_escape_text_append): ... this new function.
133 * common/xml-utils.h (xml_escape_text_append): New declaration.
134 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
135 New function.
136 (_initialize_xml_utils): register test_xml_escape_text_append as
137 a selftest.
138
139 2018-03-07 Alan Hayward <alan.hayward@arm.com>
140
141 * defs.h: Remove MAX_REGISTER_SIZE.
142 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
143 asserts.
144 * python/py-unwind.c (pyuw_sniffer): Likewise.
145
146 2018-03-07 Tom Tromey <tom@tromey.com>
147
148 * linux-tdep.c (linux_info_proc): Update.
149 * target.h (struct target_ops) <to_fileio_readlink>: Return
150 optional<string>.
151 (target_fileio_readlink): Return optional<string>.
152 * remote.c (remote_hostio_readlink): Return optional<string>.
153 * inf-child.c (inf_child_fileio_readlink): Return
154 optional<string>.
155 * target.c (target_fileio_readlink): Return optional<string>.
156
157 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
158
159 * regcache.c (cooked_read_test): Add riscv to the list of
160 architectures that have a save_reggroup.
161
162 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
163
164 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
165 value is not a dynamic class object.
166
167 2018-03-06 Tom Tromey <tom@tromey.com>
168
169 * rust-exp.y: Formatting fixes.
170
171 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
172
173 * riscv-tdep.c (riscv_register_name): Remove target description
174 support.
175 (riscv_gdbarch_init): Remove target description check.
176
177 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
178
179 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
180 comment.
181 * riscv-tdep.h: Likewise.
182
183 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
184
185 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
186 (riscv_pseudo_register_write): Delete.
187 (riscv_gdbarch_init): Remove all use of pseudo registers.
188
189 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
190
191 * record-btrace.c (btrace_print_lines): Replace cleanup
192 parameter with RAII equivalents.
193 (btrace_insn_history): Replace cleanup with RAII equivalents.
194 * ui-out.h (make_cleanup_ui_out_list_begin_end,
195 make_cleanup_ui_out_tuple_begin_end): Remove.
196 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
197 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
198 make_cleanup_ui_out_list_begin_end): Remove.
199
200 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
201
202 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
203 parameter types to std::vector. Use bool.
204 (record_btrace_wait): Replace VEC(tp_t) with
205 std::vector<thread_info *>.
206 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
207
208 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
209
210 * record-btrace.c (record_btrace_disable_callback): Remove.
211 (struct scoped_btrace_disable): New.
212 (record_btrace_open): Use scoped_btrace_disable.
213
214 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
215
216 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
217 reading values from registers.
218
219 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
220
221 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
222 where appropriate.
223
224 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
225
226 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
227 change parameter type. Use GDB's print functions, and use
228 core_addr_to_string where appropriate.
229 (riscv_push_dummy_call): Use core_addr_to_string where
230 appropriate, update call to riscv_print_arg_location, and reindent
231 a few lines.
232 (riscv_return_value): Update call to riscv_print_arg_location.
233
234 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
235 Tim Newsome <tim@sifive.com>
236 Albert Ou <a0u@eecs.berkeley.edu>
237 Darius Rad <darius@bluespec.com>
238
239 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
240 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
241 (ALLDEPFILES): Add riscv-tdep.c
242 * configure.tgt: Add riscv support.
243 * riscv-tdep.c: New file.
244 * riscv-tdep.h: New file.
245 * NEWS: Mention new target.
246 * MAINTAINERS: Add entry for riscv.
247
248 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
249
250 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
251 fields within aggregates.
252
253 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
254
255 * record-btrace.c (btrace_print_lines): Change type of flags to
256 gdb_disassembly_flags.
257
258 2018-03-04 John Baldwin <jhb@FreeBSD.org>
259
260 * fbsd-nat.c: Include "inf-ptrace.h".
261 (USE_SIGTRAP_SIGINFO): Conditionally define.
262 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
263 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
264 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
265 function.
266 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
267 Likewise.
268 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
269 Likewise.
270 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
271 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
272 "supports_stopped_by_hw_breakpoint" target methods.
273
274 2018-03-04 John Baldwin <jhb@FreeBSD.org>
275
276 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
277 * fbsd-nat.c (debug_fbsd_nat): New variable.
278 (show_fbsd_nat_debug): New function.
279 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
280 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
281
282 2018-03-04 John Baldwin <jhb@FreeBSD.org>
283
284 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
285 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
286 prototype.
287 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
288 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
289 method.
290
291 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
292
293 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
294 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
295
296 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
297
298 * charset.c (struct charset_vector): New.
299 (charsets): Change type to charset_vector.
300 (find_charset_names): Adjust.
301 (add_one): Adjust.
302 (_initialize_charset): Adjust.
303
304 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
305
306 * progspace.h (struct program_space) <deleted_solibs>: Change
307 type to std::vector<std::string>.
308 * progspace.c (clear_program_space_solib_cache): Adjust.
309 * breakpoint.c (print_solib_event): Adjust.
310 (check_status_catch_solib): Adjust.
311 * solib.c (update_solib_list): Adjust.
312 * ui-out.h (class ui_out) <field_string>: New overload.
313 * ui-out.c (ui_out::field_string): New overload.
314
315 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
316
317 * progspace.h (struct program_space): Add constructor and
318 destructor, initialize fields.
319 (add_program_space): Remove.
320 * progspace.c (add_program_space): Rename to...
321 (program_space::program_space): ... this.
322 (release_program_space): Rename to...
323 (program_space::~program_space): ... this.
324 (delete_program_space): Use delete to delete program_space.
325 (initialize_progspace): Use new to allocate program_space.
326 * inferior.c (add_inferior_with_spaces): Likewise.
327 (clone_inferior_command): Likewise.
328 * infrun.c (follow_fork_inferior): Likewise.
329 (handle_vfork_child_exec_or_exit): Likewise.
330
331 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
332
333 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
334 (delim_string_to_char_ptr_vec): Return std::vector of
335 gdb::unique_xmalloc_ptr.
336 (dirnames_to_char_ptr_vec_append): Take std::vector of
337 gdb::unique_xmalloc_ptr.
338 (dirnames_to_char_ptr_vec): Return std::vector of
339 gdb::unique_xmalloc_ptr.
340 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
341 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
342 (delim_string_to_char_ptr_vec): Return an std::vector of
343 gdb::unique_xmalloc_ptr, adjust the code.
344 (dirnames_to_char_ptr_vec_append): Take an std::vector of
345 gdb::unique_xmalloc_ptr, adjust the code.
346 (dirnames_to_char_ptr_vec): Return an std::vector of
347 gdb::unique_xmalloc_ptr, adjust the code.
348 * auto-load.c (auto_load_safe_path_vec): Change type to
349 std::vector of gdb::unique_xmalloc_ptr.
350 (auto_load_expand_dir_vars): Return an std::vector of
351 gdb::unique_xmalloc_ptr, adjust the code.
352 (auto_load_safe_path_vec_update): Adjust.
353 (filename_is_in_auto_load_safe_path_vec): Adjust.
354 (auto_load_objfile_script_1): Adjust.
355 * build-id.c (build_id_to_debug_bfd): Adjust.
356 * linux-thread-db.c (thread_db_load_search): Adjust.
357 * source.c (add_path): Adjust.
358 (openp): Adjust.
359 * symfile.c (find_separate_debug_file): Adjust.
360 * utils.c (do_free_char_ptr_vec): Remove.
361 (make_cleanup_free_char_ptr_vec): Remove.
362
363 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
364
365 PR gdb/22907
366 * common/pathstuff.c: Conditionally include "<windows.h>".
367
368 2018-03-01 Georg Sauthoff <mail@georg.so>
369
370 PR gdb/22888
371 * gcore.in: Quote variables and switch interpreter to bash.
372
373 2018-03-01 Tom Tromey <tom@tromey.com>
374
375 * dwarf2read.c (alloc_discriminant_info): Fix default_index
376 assertion. Add assertion for discriminant_index.
377 (quirk_rust_enum): Use correct base type name in univariant case.
378
379 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
380
381 * record.c (get_call_history_modifiers): Return a
382 record_print_flags.
383 (cmd_record_call_history): Adjust.
384 * record-btrace.c (record_btrace_call_history): Adjust.
385 (record_btrace_call_history_range): Adjust.
386 (record_btrace_call_history_from): Adjust.
387 * target-debug.h (target_debug_print_record_print_flags): New.
388 * target-delegates.c: Re-generate.
389 * target.c (target_call_history): Change flags type.
390 (target_call_history_from): Likewise.
391 (target_call_history_range): Likewise.
392 * target.h (struct target_ops) <target_call_history>: Likewise.
393 (target_call_history_from): Likewise.
394 (target_call_history_range): Likewise.
395
396 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
397 Simon Marchi <simon.marchi@polymtl.ca>
398
399 * common/common-utils.c: Include "sys/stat.h".
400 (is_regular_file): Move here from "source.c"; change return
401 type to "bool".
402 * common/common-utils.h (is_regular_file): New prototype.
403 * common/pathstuff.c (contains_dir_separator): New function.
404 * common/pathstuff.h (contains_dir_separator): New prototype.
405 * source.c: Don't include "sys/stat.h".
406 (is_regular_file): Move to "common/common-utils.c".
407
408 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
409
410 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
411 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
412 * auto-load.c: Include "common/pathstuff.h".
413 * common/common-def.h (current_directory): Move here.
414 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
415 function.
416 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
417 prototype.
418 * common/pathstuff.c: New file.
419 * common/pathstuff.h: New file.
420 * compile/compile.c: Include "common/pathstuff.h".
421 * defs.h (current_directory): Move to "common/common-defs.h".
422 * dwarf2read.c: Include "common/pathstuff.h".
423 * exec.c: Likewise.
424 * guile/scm-safe-call.c: Likewise.
425 * linux-thread-db.c: Likewise.
426 * main.c: Likewise.
427 * nto-tdep.c: Likewise.
428 * objfiles.c: Likewise.
429 * source.c: Likewise.
430 * symtab.c: Likewise.
431 * utils.c: Include "common/pathstuff.h".
432 (gdb_realpath): Move to "common/pathstuff.c".
433 (gdb_realpath_keepfile): Likewise.
434 (gdb_abspath): Likewise.
435 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
436 (gdb_realpath_keepfile): Likewise.
437 (gdb_abspath): Likewise.
438
439 2018-02-28 John Baldwin <jhb@FreeBSD.org>
440
441 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
442 wildcard process pid for super_resume for kernels with a
443 specific bug.
444
445 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
446
447 * compile/compile.c (get_args): Add additional comments
448 explaining function.
449
450 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
451 Tom Tromey <tom@tromey.com>
452
453 * target.h (memory_write_request_s): Remove typedef. Don't define
454 VEC.
455 (target_write_memory_blocks): Change argument to std::vector.
456 (struct memory_write_request): Add constructor.
457 * target-memory.c (compare_block_starting_address): Return bool.
458 Change argument types.
459 (claim_memory): Change arguments to use std::vector.
460 (split_regular_and_flash_blocks, blocks_to_erase)
461 (compute_garbled_blocks): Likewise.
462 (cleanup_request_data, cleanup_write_requests_vector): Remove.
463 (target_write_memory_blocks): Change argument to std::vector.
464 * symfile.c (struct load_section_data): Add constructor and
465 destructor. Use std::vector for "requests".
466 (struct load_progress_data): Add initializers.
467 (load_section_callback): Update. Use "new".
468 (clear_memory_write_data): Remove.
469 (generic_load): Update.
470
471 2018-02-27 Alan Hayward <alan.hayward@arm.com>
472
473 * arch/aarch64.h: Use common/tdesc.h.
474
475 2018-02-26 Maciej W. Rozycki <macro@mips.com>
476
477 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
478 architecture with a 64-bit ABI.
479
480 2018-02-26 Maciej W. Rozycki <macro@mips.com>
481
482 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
483 ahead of target description loading.
484
485 2018-02-26 Tom Tromey <tom@tromey.com>
486
487 * stack.c (backtrace_command_1): Update.
488 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
489 of "flags".
490 * python/py-framefilter.c (py_print_frame)
491 (gdbpy_apply_frame_filter): Change type of "flags".
492 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
493 of "flags".
494 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
495 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
496 * extension.h (enum frame_filter_flag): Rename from
497 frame_filter_flags.
498 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
499 (apply_ext_lang_frame_filter): Change type of "flags".
500 * extension.c (apply_ext_lang_frame_filter): Change type of
501 "flags".
502 * extension-priv.h (struct extension_language_ops)
503 <apply_frame_filter>: Change type of "flags".
504
505 2018-02-26 Tom Tromey <tom@tromey.com>
506
507 PR python/16497:
508 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
509 off-by-one in py_end computation.
510 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
511 PRINT_MORE_FRAMES.
512 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
513 constant.
514
515 2018-02-26 Tom Tromey <tom@tromey.com>
516
517 * dwarf2read.c (struct variant_field): New.
518 (struct nextfield) <variant>: New field.
519 (dwarf2_add_field): Handle DW_TAG_variant_part.
520 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
521 discriminated union.
522 (read_structure_type): Handle DW_TAG_variant_part.
523 (handle_struct_member_die): New function, extracted from
524 process_structure_scope. Handle DW_TAG_variant.
525 (process_structure_scope): Handle discriminated unions. Call
526 handle_struct_member_die.
527
528 2018-02-26 Tom Tromey <tom@tromey.com>
529
530 * rust-lang.h (rust_last_path_segment): Declare.
531 * rust-lang.c (rust_last_path_segment): Now public. Change
532 contract.
533 (struct disr_info): Remove.
534 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
535 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
536 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
537 (rust_enum_p, rust_enum_variant): New function.
538 (rust_underscore_fields): Remove "offset" parameter.
539 (rust_print_enum): New function.
540 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
541 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
542 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
543 enums.
544 (rust_internal_print_type): New function, from rust_print_type.
545 Remove enum code.
546 (rust_print_type): Call rust_internal_print_type.
547 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
548 Update enum handling.
549 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
550 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
551 (rust_union_quirks): New functions.
552 (process_full_comp_unit, process_full_type_unit): Call
553 rust_union_quirks.
554 (process_structure_scope): Update rust_unions if necessary.
555
556 2018-02-26 Tom Tromey <tom@tromey.com>
557
558 * value.h (value_union_variant): Declare.
559 * valops.c (value_union_variant): New function.
560 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
561 (struct discriminant_info): New.
562 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
563 enumerator.
564 (struct main_type) <flag_discriminated_union>: New field.
565
566 2018-02-26 Tom Tromey <tom@tromey.com>
567
568 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
569 unittests/unpack-selftests.c.
570 * unittests/unpack-selftests.c: New file.
571 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
572
573 2018-02-26 Yao Qi <yao.qi@linaro.org>
574
575 * dwarf2read.c (struct partial_die_info) <read>: New method.
576 (read_partial_die): Remove the declaration.
577 (load_partial_dies): Update.
578 (partial_die_info::partial_die_info):
579 (read_partial_die): Change it to partial_die_info::read.
580
581 2018-02-26 Yao Qi <yao.qi@linaro.org>
582
583 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
584 (fixup_partial_die): Remove declaration.
585 (scan_partial_symbols): Update.
586 (partial_die_parent_scope): Likewise.
587 (partial_die_full_name): Likewise.
588 (fixup_partial_die): Change it to partial_die_info::fixup.
589
590 2018-02-26 Yao Qi <yao.qi@linaro.org>
591
592 * dwarf2read.c (read_partial_die): Update the declaration.
593 (load_partial_dies): Caller update.
594 (read_partial_die): Remove one argument abbrev_len.
595
596 2018-02-26 Yao Qi <yao.qi@linaro.org>
597
598 * dwarf2read.c (struct partial_die_info): Add ctor, delete
599 assignment operator.
600 (load_partial_dies): Use ctor and copy ctor.
601 (read_partial_die): Update.
602 (dwarf2_cu::find_partial_die): Use ctor.
603
604 2018-02-26 Yao Qi <yao.qi@linaro.org>
605
606 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
607 (find_partial_die_in_comp_unit): Change it to
608 dwarf2_cu::find_partial_die.
609 (find_partial_die): Update.
610
611 2018-02-26 Yao Qi <yao.qi@linaro.org>
612
613 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
614 is NULL.
615
616 2018-02-26 Yao Qi <yao.qi@linaro.org>
617
618 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
619
620 2018-02-26 Alan Hayward <alan.hayward@arm.com>
621
622 * arch/amd64.h: Use common/tdesc.h.
623 * arch/i386.c: Likewise.
624 * arch/i386.h: Likewise.
625 * arch/tic6x.c: Likewise.
626 * arch/tdesc.h: Move file from here...
627 * common/tdesc.h: ...to here.
628 * features/aarch64-core.c: Regenerate.
629 * features/aarch64-fpu.c: Regenerate.
630 * features/i386/32bit-avx.c: Regenerate.
631 * features/i386/32bit-avx512.c: Regenerate.
632 * features/i386/32bit-core.c: Regenerate.
633 * features/i386/32bit-linux.c: Regenerate.
634 * features/i386/32bit-mpx.c: Regenerate.
635 * features/i386/32bit-pkeys.c: Regenerate.
636 * features/i386/32bit-sse.c: Regenerate.
637 * features/i386/64bit-avx.c: Regenerate.
638 * features/i386/64bit-avx512.c: Regenerate.
639 * features/i386/64bit-core.c: Regenerate.
640 * features/i386/64bit-linux.c: Regenerate.
641 * features/i386/64bit-mpx.c: Regenerate.
642 * features/i386/64bit-pkeys.c: Regenerate.
643 * features/i386/64bit-segments.c: Regenerate.
644 * features/i386/64bit-sse.c: Regenerate.
645 * features/i386/x32-core.c: Regenerate.
646 * features/tic6x-c6xp.c: Regenerate.
647 * features/tic6x-core.c: Regenerate.
648 * features/tic6x-gp.c: Regenerate.
649 * target-descriptions.c: Use common/tdesc.h.
650 * target-descriptions.h: Likewise.
651
652 2018-02-24 Tom Tromey <tom@tromey.com>
653
654 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
655 (try_thread_db_load_from_dir, thread_db_load_search): Use
656 std::string.
657 (info_auto_load_libthread_db_compare): Return bool. Change
658 argument types.
659 (info_auto_load_libthread_db): Use std::vector, std::string.
660 Remove cleanups.
661
662 2018-02-24 Tom Tromey <tom@tromey.com>
663
664 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
665 std::string.
666 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
667 std::string*.
668 * gdbarch.c: Rebuild.
669 * gdbarch.h: Rebuild.
670 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
671 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
672 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
673 std::string*.
674
675 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
676
677 * gdbtypes.h (sect_offset): Change type to uint64_t.
678 (sect_offset_str): New function.
679 * dwarf2read.c (create_addrmap_from_aranges): Use
680 sect_offset_str.
681 (error_check_comp_unit_head): Likewise.
682 (create_debug_type_hash_table): Likewise.
683 (read_cutu_die_from_dwo): Likewise.
684 (init_cutu_and_read_dies): Likewise.
685 (init_cutu_and_read_dies_no_follow): Likewise.
686 (process_psymtab_comp_unit_reader): Likewise.
687 (partial_die_parent_scope): Likewise.
688 (peek_die_abbrev): Likewise.
689 (process_queue): Likewise.
690 (dwarf2_physname): Likewise.
691 (read_namespace_alias): Likewise.
692 (read_import_statement): Likewise.
693 (create_dwo_cu_reader): Likewise.
694 (create_cus_hash_table): Likewise.
695 (lookup_dwo_cutu): Likewise.
696 (inherit_abstract_dies): Likewise.
697 (read_func_scope): Likewise.
698 (read_call_site_scope): Likewise.
699 (dwarf2_add_member_fn): Likewise.
700 (read_common_block): Likewise.
701 (read_module_type): Likewise.
702 (read_typedef): Likewise.
703 (read_subrange_type): Likewise.
704 (load_partial_dies): Likewise.
705 (read_partial_die): Likewise.
706 (find_partial_die): Likewise.
707 (read_str_index): Likewise.
708 (dwarf2_string_attr): Likewise.
709 (build_error_marker_type): Likewise.
710 (lookup_die_type): Likewise.
711 (dump_die_shallow): Likewise.
712 (follow_die_ref): Likewise.
713 (dwarf2_fetch_die_loc_sect_off): Likewise.
714 (dwarf2_fetch_constant_bytes): Likewise.
715 (follow_die_sig): Likewise.
716 (get_signatured_type): Likewise.
717 (get_DW_AT_signature_type): Likewise.
718 (dwarf2_find_containing_comp_unit): Likewise.
719 (set_die_type): Likewise.
720
721 2018-02-21 John Baldwin <jhb@FreeBSD.org>
722
723 * arch/aarch64.c: Include "common-defs.h".
724 * arch/amd64.c: Likewise.
725 * arch/i386.c: Likewise.
726
727 2018-02-21 Tom Tromey <tom@tromey.com>
728
729 * value.h: (extract_field_op): Update.
730 * eval.c (extract_field_op): Return a const char *.
731 * expression.h (parse_expression_for_completion): Update.
732 * completer.c (complete_expression): Update.
733 (add_struct_fields): Make fieldname const.
734 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
735 (mark_completion_tag, parse_exp_in_context_1): Update.
736 (parse_expression_for_completion): Change "name" to
737 unique_xmalloc_ptr*.
738
739 2018-02-21 Tom Tromey <tom@tromey.com>
740
741 * infcall.c (call_function_by_hand_dummy): Use std::vector.
742
743 2018-02-21 Yao Qi <yao.qi@linaro.org>
744
745 * avr-tdep.c (avr_read_pc): Change parameter type to
746 readable_regcache.
747 * gdbarch.sh (read_pc): Likewise.
748 * gdbarch.c: Re-generated.
749 * gdbarch.h: Re-generated.
750 * hppa-tdep.c (hppa_read_pc): Change parameter type to
751 readable_regcache.
752 * ia64-tdep.c (ia64_read_pc): Likewise.
753 * mips-tdep.c (mips_read_pc): Likewise.
754 * spu-tdep.c (spu_read_pc): Likewise.
755
756 2018-02-21 Yao Qi <yao.qi@linaro.org>
757
758 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
759 * regcache-dump.c: New file.
760 * regcache.c: Move register_dump to regcache-dump.c.
761 (maintenance_print_registers): Likewise.
762 (maintenance_print_raw_registers): Likewise.
763 (maintenance_print_cooked_registers): Likewise.
764 (maintenance_print_register_groups): Likewise.
765 (maintenance_print_remote_registers): Likewise.
766 (_initialize_regcache): Likewise.
767 * regcache.h (register_dump): Moved from regcache.c.
768
769 2018-02-21 Yao Qi <yao.qi@linaro.org>
770
771 * regcache.c (regcache::regcache): Update.
772 (regcache::invalidate): Move it to detached_regcache::invalidate.
773 (get_thread_arch_aspace_regcache): Update.
774 (regcache::raw_update): Update.
775 (regcache::cooked_read): Remove some code.
776 (regcache::cooked_read_value): Likewise.
777 (regcache::raw_write): Remove assert on m_readonly_p.
778 (regcache::raw_supply_integer): Move it to
779 detached_regcache::raw_supply_integer.
780 (regcache::raw_supply_zeroed): Likewise.
781 * regcache.h (detached_regcache) <raw_supply_integer>: New
782 declaration.
783 <raw_supply_zeroed, invalidate>: Likewise.
784 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
785 <invalidate>: Likewise.
786 <m_readonly_p>: Removed.
787
788 2018-02-21 Yao Qi <yao.qi@linaro.org>
789
790 * infcmd.c (get_return_value): Let stop_regs point to
791 get_current_regcache.
792 * regcache.c (regcache::regcache): Remove.
793 (register_dump_reg_buffer): New class.
794 (regcache_print): Adjust.
795 * regcache.h (regcache): Remove constructors.
796
797 2018-02-21 Yao Qi <yao.qi@linaro.org>
798
799 * regcache.c (class register_dump): New class.
800 (register_dump_regcache, register_dump_none): New class.
801 (register_dump_remote, register_dump_groups): New class.
802 (regcache_print): Update.
803 * regcache.h (regcache_dump_what): Move it to regcache.c.
804 (regcache) <dump>: Remove.
805
806 2018-02-21 Yao Qi <yao.qi@linaro.org>
807
808 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
809 reg_buffer_rw *.
810 (jit_unwind_reg_set_impl): Call raw_supply.
811 (jit_frame_sniffer): Use reg_buffer_rw.
812 * record-full.c (record_full_core_regbuf): Change its type.
813 (record_full_core_open_1): Use reg_buffer_rw.
814 (record_full_close): Likewise.
815 (record_full_core_fetch_registers): Use regcache->raw_supply.
816 (record_full_core_store_registers): Likewise.
817 * regcache.c (regcache::get_register_status): Move it to
818 reg_buffer.
819 (regcache_raw_set_cached_value): Remove.
820 (regcache::raw_set_cached_value): Remove.
821 (regcache::raw_write): Call raw_supply.
822 (regcache::raw_supply): Move it to reg_buffer_rw.
823 * regcache.h (regcache_raw_set_cached_value): Remove.
824 (reg_buffer_rw): New class.
825
826 2018-02-21 Yao Qi <yao.qi@linaro.org>
827
828 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
829 readonly_detached_regcache.
830 (dummy_frame_prev_register): Use regcache->cooked_read.
831 * frame.c (frame_save_as_regcache): Change return type.
832 (frame_pop): Update.
833 * frame.h (frame_save_as_regcache): Update declaration.
834 * inferior.h (get_infcall_suspend_state_regcache): Update
835 declaration.
836 * infrun.c (infcall_suspend_state) <registers>: use
837 readonly_detached_regcache.
838 (save_infcall_suspend_state): Don't use regcache_dup.
839 (get_infcall_suspend_state_regcache): Change return type.
840 * linux-fork.c (struct fork_info) <savedregs>: Change to
841 readonly_detached_regcache.
842 <pc>: New field.
843 (fork_save_infrun_state): Don't use regcache_dup.
844 (info_checkpoints_command): Adjust.
845 * mi/mi-main.c (register_changed_p): Update declaration.
846 (mi_cmd_data_list_changed_registers): Use
847 readonly_detached_regcache.
848 (register_changed_p): Change parameter type to
849 readonly_detached_regcache.
850 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
851 readonly_detached_regcache.
852 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
853 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
854 New.
855 (regcache::save): Move it to reg_buffer.
856 (regcache::restore): Change parameter type.
857 (regcache_dup): Remove.
858 * regcache.h (reg_buffer) <save>: New method.
859 (readonly_detached_regcache): New class.
860 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
861 readonly_detached_regcache.
862 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
863
864 2018-02-21 Yao Qi <yao.qi@linaro.org>
865
866 * frame.c (frame_save_as_regcache): Use regcache method save.
867 (frame_pop): Use regcache method restore.
868 * infrun.c (restore_infcall_suspend_state): Likewise.
869 * linux-fork.c (fork_load_infrun_state): Likewise.
870 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
871 save.
872 * regcache.c (regcache_save): Remove.
873 (regcache::restore): More asserts.
874 (regcache_cpy): Remove.
875 * regcache.h (regcache_save): Remove the declaration.
876 (regcache::restore): Move from private to public.
877 Remove the friend declaration of regcache_cpy.
878 (regcache_cpy): Remove declaration.
879
880 2018-02-21 Yao Qi <yao.qi@linaro.org>
881
882 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
883 parameter type to 'readable_regcache *'.
884 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
885 * arm-tdep.c (arm_neon_quad_read): Likewise.
886 (arm_pseudo_read): Likewise.
887 * avr-tdep.c (avr_pseudo_register_read): Likewise.
888 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
889 * frv-tdep.c (frv_pseudo_register_read): Likewise.
890 * gdbarch.c: Re-generated.
891 * gdbarch.h: Re-generated.
892 * gdbarch.sh (pseudo_register_read): Change parameter type to
893 'readable_regcache *'.
894 (pseudo_register_read_value): Likewise.
895 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
896 (h8300_pseudo_register_read): Likewise.
897 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
898 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
899 (i386_pseudo_register_read_into_value): Likewise.
900 (i386_pseudo_register_read_value): Likewise.
901 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
902 declaration.
903 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
904 * m32c-tdep.c (m32c_raw_read): Likewise.
905 (m32c_read_flg): Likewise.
906 (m32c_banked_register): Likewise.
907 (m32c_banked_read): Likewise.
908 (m32c_sb_read): Likewise.
909 (m32c_part_read): Likewise.
910 (m32c_cat_read): Likewise.
911 (m32c_r3r2r1r0_read): Likewise.
912 (m32c_pseudo_register_read): Likewise.
913 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
914 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
915 (mep_pseudo_cr64_read): Likewise.
916 (mep_pseudo_register_read): Likewise.
917 * mips-tdep.c (mips_pseudo_register_read): Likewise.
918 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
919 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
920 * regcache.c (regcache::raw_read): Move it to readable_regcache.
921 (regcache::cooked_read): Likewise.
922 (regcache::cooked_read_value): Likewise.
923 (regcache_cooked_read_signed):
924 (regcache::cooked_read): Likewise.
925 * regcache.h (readable_regcache): New class.
926 (regcache): Inherit readable_regcache. Move some methods to
927 readable_regcache.
928 * rl78-tdep.c (rl78_pseudo_register_read): Change
929 parameter type to 'readable_regcache *'.
930 * rs6000-tdep.c (do_regcache_raw_read): Remove.
931 (e500_pseudo_register_read): Change parameter type to
932 'readable_regcache *'.
933 (dfp_pseudo_register_read): Likewise.
934 (vsx_pseudo_register_read): Likewise.
935 (efpr_pseudo_register_read): Likewise.
936 * s390-tdep.c (s390_pseudo_register_read): Likewise.
937 * sh-tdep.c (sh_pseudo_register_read): Likewise.
938 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
939 (sh64_pseudo_register_read): Likewise.
940 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
941 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
942 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
943 (spu_pseudo_register_read): Likewise.
944 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
945 (xtensa_pseudo_register_read): Likewise.
946
947 2018-02-21 Yao Qi <yao.qi@linaro.org>
948
949 * regcache.c (regcache::regcache): Call reg_buffer ctor.
950 (regcache::arch): Move it to reg_buffer::arch.
951 (regcache::register_buffer): Likewise.
952 (regcache::assert_regnum): Likewise.
953 (regcache::num_raw_registers): Likewise.
954 * regcache.h (reg_buffer): New class.
955 (regcache): Inherit reg_buffer.
956
957 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
958
959 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
960 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
961
962 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
963
964 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
965
966 2018-02-19 Alan Hayward <alan.hayward@arm.com>
967
968 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
969 (SFILES): Remove common/*.c files.
970 (COMMON_OBS): Remove some *.o files built from common/*.c files.
971 * common/common.host: Add common reference.
972 * configure.ac: Likewise.
973 * configure: Regenerate.
974
975 2018-02-16 Yao Qi <yao.qi@linaro.org>
976
977 * block.c (block_namespace_info): Inherit allocate_on_obstack.
978 (block_initialize_namespace): Use new.
979 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
980 (dwarf2_free_objfile): Use delete.
981 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
982 (copy_type_recursive): Use new.
983 * gdb_obstack.h (allocate_on_obstack): New.
984
985 2018-02-15 Yao Qi <yao.qi@linaro.org>
986
987 PR gdb/22849
988 * inferior.c (exit_inferior_1): Reset inf->control.
989
990 2018-02-15 Joel Brobecker <brobecker@adacore.com>
991
992 * ada-lang.c (ada_to_fixed_value_create): Delete advance
993 declaration.
994
995 2018-02-14 Pedro Alves <palves@redhat.com>
996
997 * frame-unwind.c (frame_unwind_try_unwinder): Always call
998 frame_cleanup_after_sniffer on exception.
999
1000 2018-02-14 Tom Tromey <tom@tromey.com>
1001
1002 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
1003 const.
1004 (solib_bfd_open): Make pathname const.
1005 * solib.c (solib_bfd_open): Make pathname const.
1006 * solib-spu.c (spu_bfd_fopen): Make name const.
1007 (spu_bfd_open): Make pathname const.
1008 * solib-darwin.c (darwin_bfd_open): Make pathname const.
1009 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
1010
1011 2018-02-14 Tom Tromey <tom@tromey.com>
1012
1013 * symfile.c (symfile_bfd_open): Update.
1014 * source.h (openp, source_full_path_of, find_and_open_source):
1015 Change argument type to unique_xmalloc_ptr.
1016 * source.c (openp): Take a unique_xmalloc_ptr.
1017 (source_full_path_of, find_and_open_source): Likewise.
1018 (open_source_file, symtab_to_fullname): Update.
1019 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
1020 unique_xmalloc_ptr.
1021 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
1022 (exec_file_find): Update.
1023 * psymtab.c (psymtab_to_fullname): Update.
1024 * nto-tdep.h (nto_find_and_open_solib): Update.
1025 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
1026 unique_xmalloc_ptr.
1027 * exec.c (exec_file_attach): Update.
1028 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
1029 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
1030
1031 2018-02-14 Tom Tromey <tom@tromey.com>
1032
1033 * solib.c: Include source.h.
1034 * nto-tdep.c: Include source.h.
1035 * mi/mi-cmd-env.c: Include source.h.
1036 * infcmd.c: Include source.h.
1037 * exec.c: Include source.h.
1038 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
1039 (add_path, directory_switch, source_path, init_source_path): Move
1040 declarations...
1041 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
1042 (add_path, directory_switch, source_path, init_source_path):
1043 ...here.
1044
1045 2018-02-14 Tom Tromey <tom@tromey.com>
1046
1047 * solist.h (exec_file_find, solib_find): Return
1048 unique_xmalloc_ptr.
1049 (solib_bfd_fopen): Take a const char *.
1050 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
1051 (exec_file_find, solib_find): Likewise.
1052 (solib_bfd_fopen): Do not take ownership of "pathname".
1053 (solib_bfd_open): Use unique_xmalloc_ptr.
1054 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
1055 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
1056 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
1057 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
1058
1059 2018-02-14 Joel Brobecker <brobecker@adacore.com>
1060
1061 * ada-lang.c (name_match_type_from_name): Remove reference to
1062 ada_name_for_lookup in function's documentation.
1063 * ada-lang.h (ada_name_for_lookup): Delete declaration.
1064
1065 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
1066
1067 * defs.h (enum openp_flags): New enum.
1068 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
1069 Move to enum openp_flags.
1070 (openp_flags): New enum flags.
1071 (openp): Change parameter type to openp_flags.
1072 * source.c (openp): Change parameter type to openp_flags.
1073 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
1074 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
1075
1076 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
1077
1078 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
1079 per-command.
1080
1081 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
1082
1083 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
1084 into...
1085 (class dwarf2_queue_guard): ...the destructor of this new class.
1086 (dw2_do_instantiate_symtab): Create instance of the new class
1087 dwarf2_queue_guard, remove cleanup.
1088
1089 2018-02-09 Tom Tromey <tom@tromey.com>
1090
1091 * source.c (find_source_lines): Don't reference past the end of
1092 the vector.
1093
1094 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1095
1096 * remote.c (remote_btrace_maybe_reopen): Change error message.
1097 * btrace.c (btrace_enable): Likewise.
1098 (parse_xml_btrace): Likewise.
1099 (parse_xml_btrace_conf): Likewise.
1100
1101 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1102
1103 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
1104 (linux_enable_pt, linux_enable_bts): Call
1105 diagnose_perf_event_open_fail.
1106
1107 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1108
1109 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
1110 Remove parameter and change return type. Update callers. Move it.
1111 (linux_enable_bts, linux_enable_pt): Improve error message.
1112 (linux_enable_pt): Remove zero buffer size check.
1113 (linux_enable_btrace): Improve error messages. Remove NULL return
1114 check.
1115
1116 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1117
1118 * btrace.c (btrace_enable): Remove target_supports_btrace call.
1119 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
1120 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
1121 (linux_supports_pt, linux_supports_btrace): Remove.
1122 (linux_enable_bts): Call cpu_supports_bts.
1123 * nat/linux-btrace.h (linux_supports_btrace): Remove.
1124 * remote.c (remote_supports_btrace): Remove.
1125 (init_remote_ops): Remove remote_supports_btrace.
1126 * target-delegates.c: Regenerated.
1127 * target.c (target_supports_btrace): Remove.
1128 * target.h (target_ops) <to_supports_btrace>: Remove
1129 (target_supports_btrace): Remove.
1130 * x86-linux-nat.c (x86_linux_create_target): Remove
1131 linux_supports_btrace.
1132
1133 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1134
1135 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
1136 btrace failed.
1137 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
1138 exception and use message in own exception.
1139
1140 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1141
1142 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
1143 (perf_event_pt_event_type): Use gdb_file_up.
1144 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
1145 scoped_fd, and scoped_mmap.
1146
1147 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1148
1149 * common/scoped_mmap.h: New.
1150 * unittests/scoped_mmap-selftest.c: New.
1151 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1152 unittests/scoped_mmap-selftest.c.
1153
1154 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1155
1156 * common/scoped_fd.h: New.
1157 * unittests/scoped_fd-selftest.c: New.
1158 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1159 unittests/scoped_fd-selftest.c.
1160
1161 2018-02-09 Tom Tromey <tom@tromey.com>
1162
1163 * auto-load.c (auto_load_section_scripts): Use
1164 gdb::unique_xmalloc_ptr.
1165
1166 2018-02-09 Tom Tromey <tom@tromey.com>
1167
1168 * auto-load.c (execute_script_contents): Use std::string.
1169
1170 2018-02-09 Joel Brobecker <brobecker@adacore.com>
1171
1172 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
1173 Python function, rather than a new command.
1174
1175 2018-02-08 Tom Tromey <tom@tromey.com>
1176
1177 * solib.c (solib_find_1): Use std::string.
1178 (solib_bfd_fopen): Use unique_xmalloc_ptr.
1179
1180 2018-02-08 Tom Tromey <tom@tromey.com>
1181
1182 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
1183
1184 2018-02-08 Tom Tromey <tom@tromey.com>
1185
1186 * source.c (find_source_lines): Use gdb::def_vector.
1187
1188 2018-02-08 Tom Tromey <tom@tromey.com>
1189
1190 * macrocmd.c (struct temporary_macro_definition): New.
1191 (macro_define_command): Use temporary_macro_definition. Remove
1192 cleanups.
1193 (free_macro_definition_ptr): Remove.
1194
1195 2018-02-08 Tom Tromey <tom@tromey.com>
1196
1197 * macroexp.c (maybe_expand): Use std::string.
1198
1199 2018-02-08 Tom Tromey <tom@tromey.com>
1200
1201 * macroexp.c (struct macro_buffer): Add initializers for some
1202 members.
1203 (init_buffer, init_shared_buffer, free_buffer)
1204 (free_buffer_return_text): Remove.
1205 (macro_buffer): New constructors.
1206 (~macro_buffer): New destructor.
1207 (macro_buffer::set_shared): New method.
1208 (macro_buffer::resize_buffer, macro_buffer::appendc)
1209 (macro_buffer::appendmem): Now methods, not free functions.
1210 (set_token, append_tokens_without_splicing, stringify)
1211 (macro_stringify): Update.
1212 (gather_arguments): Change return type. Remove argc_p argument,
1213 add args_ptr argument. Use std::vector.
1214 (substitute_args): Remove argc argument. Accept std::vector.
1215 (expand): Update. Use std::vector.
1216 (scan, macro_expand, macro_expand_next): Update.
1217
1218 2018-02-08 Tom Tromey <tom@tromey.com>
1219
1220 * symtab.c (default_collect_symbol_completion_matches_break_on):
1221 Use unique_xmalloc_ptr.
1222 * macroscope.h: (sal_macro_scope, user_macro_scope)
1223 (default_macro_scope): Return unique_xmalloc_ptr.
1224 * macroscope.c (sal_macro_scope, user_macro_scope)
1225 (default_macro_scope): Return unique_xmalloc_ptr.
1226 * macroexp.h (macro_expand, macro_expand_once): Return
1227 unique_xmalloc_ptr.
1228 * macroexp.c (macro_expand, macro_expand_once): Return
1229 unique_xmalloc_ptr.
1230 * macrocmd.c (macro_expand_command, macro_expand_once_command)
1231 (info_macro_command, info_macros_command): Use
1232 unique_xmalloc_ptr.
1233 * compile/compile-c-support.c (write_macro_definitions): Use
1234 unique_xmalloc_ptr.
1235 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
1236
1237 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
1238
1239 * value.c (value_static_field): Assign field type instead of
1240 containing type when returning an optimized out value.
1241
1242 2018-02-06 Yao Qi <yao.qi@linaro.org>
1243
1244 * ft32-tdep.c (ft32_read_pc): Remove.
1245 (ft32_write_pc): Remove.
1246 (ft32_gdbarch_init): Update.
1247 * m32r-tdep.c (m32r_read_pc): Remove.
1248 (m32r_gdbarch_init): Update.
1249 * mep-tdep.c (mep_read_pc): Remove.
1250 (mep_gdbarch_init): Update.
1251 * microblaze-tdep.c (microblaze_write_pc): Remove.
1252 (microblaze_gdbarch_init): Update.
1253 * mn10300-tdep.c (mn10300_read_pc): Remove.
1254 (mn10300_write_pc): Remove.
1255 (mn10300_gdbarch_init): Update.
1256 * moxie-tdep.c (moxie_read_pc): Remove.
1257 (moxie_write_pc): Remove.
1258 (moxie_gdbarch_init): Update.
1259
1260 2018-02-06 Yao Qi <yao.qi@linaro.org>
1261
1262 * expprint.c (print_subexp_standard): Handle
1263 OP_F77_UNDETERMINED_ARGLIST.
1264 (dump_subexp_body_standard): Likewise.
1265
1266 2018-02-05 Alan Hayward <alan.hayward@arm.com>
1267
1268 * target-descriptions.c (tdesc_element_visitor) Add empty
1269 implementations.
1270 (tdesc_type): Move make_gdb_type from here.
1271 (tdesc_type_builtin): Likewise.
1272 (tdesc_type_vector): Likewise.
1273 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
1274 (make_gdb_type_struct): Move from tdesc_type_with_fields.
1275 (make_gdb_type_union): Likewise.
1276 (make_gdb_type_flags): Likewise.
1277 (make_gdb_type_enum): Likewise.
1278 (make_gdb_type): New function.
1279 (tdesc_register_type): Use static make_gdb_type.
1280
1281 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
1282
1283 * infcmd.c (default_print_one_register_info): Align natural-format
1284 column values consistently one under another.
1285 (pad_to_column): New function.
1286
1287 2018-02-05 Joel Brobecker <brobecker@adacore.com>
1288
1289 * dwarf2read.c (dwarf2_physname): Move commment.
1290
1291 2018-02-01 Leszek Swirski <leszeks@google.com>
1292
1293 * varobj.c (varobj_formatted_print_options): Allow recursive
1294 pretty printing if pretty printing is enabled.
1295
1296 2018-02-01 Leszek Swirski <leszeks@google.com>
1297
1298 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
1299 names after a structop as a filename.
1300
1301 2018-02-01 Yao Qi <yao.qi@linaro.org>
1302
1303 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
1304 (arm_record_coproc_data_proc): Likewise.
1305
1306 2018-02-01 Yao Qi <yao.qi@linaro.org>
1307
1308 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
1309
1310 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
1311
1312 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
1313 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
1314
1315 2018-01-31 Pedro Alves <palves@redhat.com>
1316
1317 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
1318 * inflow.c (child_terminal_save_inferior): Wrap reference to
1319 tcgetpgrp in HAVE_TERMIOS_H.
1320 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
1321 _WIN32.
1322 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
1323 always iterate over all inferiors.
1324 (gdbsim_cntrl_c): Adjust.
1325 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
1326
1327 2018-01-31 Joel Brobecker <brobecker@adacore.com>
1328
1329 * gdbtypes.c (lookup_array_range_type): Make sure the array's
1330 index type is objfile-owned if the element type is as well.
1331
1332 2018-01-31 Joel Brobecker <brobecker@adacore.com>
1333
1334 GDB 8.1 released.
1335
1336 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
1337
1338 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
1339 "features/s390x-linux64.c".
1340 (_initialize_s390_linux_tdep): Remove initialization of tdescs
1341 s390_linux32 and s390x_linux64.
1342 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
1343 default tdesc.
1344 * s390-tdep.c: Include "features/s390-linux32.c" and
1345 "features/s390x-linux64.c".
1346 (s390_tdesc_valid): Add check for tdesc_has_registers.
1347 (s390_gdbarch_init): Make sure there is always a valid tdesc.
1348 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
1349 tdesc_s390x_linux64.
1350 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
1351 tdesc_s390x_linux64 to...
1352 * s390-tdep.h: ...here.
1353
1354 2018-01-30 Pedro Alves <palves@redhat.com>
1355
1356 PR gdb/13211
1357 * config.in, configure: Regenerate.
1358 * configure.ac: Check for getpgid.
1359 * go32-nat.c (go32_pass_ctrlc): New.
1360 (go32_target): Install it.
1361 * inf-child.c (inf_child_target): Install
1362 child_terminal_save_inferior, child_pass_ctrlc and
1363 child_interrupt.
1364 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
1365 (inf_ptrace_target): No longer install it.
1366 * infcmd.c (interrupt_target_1): Adjust.
1367 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
1368 (child_interrupt): Declare.
1369 (inferior::terminal_state): New.
1370 * inflow.c (struct terminal_info): Update comments.
1371 (inferior_process_group): Delete.
1372 (terminal_is_ours): Delete.
1373 (gdb_tty_state): New.
1374 (child_terminal_init): Adjust.
1375 (is_gdb_terminal, sharing_input_terminal_1)
1376 (sharing_input_terminal): New functions.
1377 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
1378 Set the process's actual process group in the foreground if
1379 possible. Handle is_ours_for_output/is_ours distinction. Don't
1380 mark terminal as the inferior's if not sharing GDB's terminal.
1381 Don't check attach_flag.
1382 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
1383 pass down a target_terminal_state.
1384 (child_terminal_save_inferior): New, factored out from ...
1385 (child_terminal_ours_1): ... this. Handle
1386 target_terminal_state::is_ours_for_output.
1387 (child_interrupt, child_pass_ctrlc): New.
1388 (inflow_inferior_exit): Clear the inferior's terminal_state.
1389 (copy_terminal_info): Copy the inferior's terminal state.
1390 (_initialize_inflow): Remove reference to terminal_is_ours.
1391 * inflow.h (inferior_process_group): Delete.
1392 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
1393 * procfs.c (procfs_target): Don't install procfs_interrupt.
1394 (procfs_interrupt): Delete.
1395 * remote.c (remote_serial_quit_handler): Adjust.
1396 (remote_interrupt): Remove ptid parameter. Adjust.
1397 * target-delegates.c: Regenerate.
1398 * target.c: Include "terminal.h".
1399 (target_terminal::terminal_state): Rename to ...
1400 (target_terminal::m_terminal_state): ... this.
1401 (target_terminal::init): Adjust.
1402 (target_terminal::inferior): Adjust to per-inferior
1403 terminal_state.
1404 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
1405 (target_terminal::ours, target_terminal::ours_for_output): Use
1406 target_terminal_is_ours_kind.
1407 (target_interrupt): Remove ptid parameter. Adjust.
1408 (default_target_pass_ctrlc): Adjust.
1409 * target.h (target_ops::to_terminal_save_inferior): New field.
1410 (target_ops::to_interrupt): Remove ptid_t parameter.
1411 (target_interrupt): Remove ptid_t parameter. Update comment.
1412 (target_pass_ctrlc): Update comment.
1413 * target/target.h (target_terminal_state): New scoped enum,
1414 factored out of ...
1415 (target_terminal::terminal_state): ... here.
1416 (target_terminal::inferior): Update comments.
1417 (target_terminal::restore_inferior): New.
1418 (target_terminal::is_inferior, target_terminal::is_ours)
1419 (target_terminal::is_ours_for_output): Adjust.
1420 (target_terminal::scoped_restore_terminal_state): Adjust to
1421 rename, and call restore_inferior() instead of inferior().
1422 (target_terminal::scoped_restore_terminal_state::m_state): Change
1423 type.
1424 (target_terminal::terminal_state): Rename to ...
1425 (target_terminal::m_terminal_state): ... this and change type.
1426
1427 2018-01-30 Pedro Alves <palves@redhat.com>
1428
1429 * linux-nat.c (wait_for_signal): New function.
1430 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
1431 directly.
1432 (async_terminal_is_ours)
1433 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
1434 (linux_nat_add_target): Don't override
1435 to_terminal_inferior/to_terminal_ours.
1436
1437 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
1438
1439 * remote.c (remote_follow_fork): Don't call "detach_inferior".
1440
1441 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
1442
1443 * dwarf2read.c (free_dwo_files): Add forward-declaration.
1444 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
1445 dwarf2_per_objfile_free here.
1446 (dwarf2_per_objfile_free): Remove.
1447 (_initialize_dwarf2_read): Don't register
1448 dwarf2_per_objfile_free as a registry cleanup.
1449
1450 2018-01-27 Eli Zaretskii <eliz@gnu.org>
1451
1452 Avoid compilation errors in MinGW native builds
1453
1454 The error is triggered by including python-internal.h, and the
1455 error message is:
1456
1457 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
1458 from build-gnulib/import/math.h:27,
1459 from d:/usr/Python26/include/pyport.h:235,
1460 from d:/usr/Python26/include/Python.h:58,
1461 from python/python-internal.h:94,
1462 from python/py-arch.c:24:
1463 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
1464 using ::hypot;
1465 ^~~~~
1466
1467 This happens because Python headers define 'hypot' to expand t
1468 '_hypot' in the Windows builds.
1469 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
1470 'hypoth'. This avoids a compilation error.
1471
1472 2018-01-26 Alan Hayward <alan.hayward@arm.com>
1473
1474 * MAINTAINERS (Write After Approval): Fix ordering.
1475
1476 2018-01-26 Alan Hayward <alan.hayward@arm.com>
1477
1478 * MAINTAINERS (Write After Approval): Add Alan Hayward.
1479
1480 2018-01-26 Alan Modra <amodra@gmail.com>
1481
1482 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
1483 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
1484 Remove nop. Make const. Comment.
1485 (powerpc32_plt_stub_so_2): New.
1486 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
1487 Correct count. Update uses.
1488 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
1489 Move common code reading PLT entry word. Correct
1490 powerpc32_plt_stub PLT address calculation.
1491 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
1492 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
1493 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
1494 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
1495 (ppc64_standard_linkage8): Likewise.
1496 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
1497 Correct insns description.
1498 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
1499
1500 2018-01-24 Pedro Alves <palves@redhat.com>
1501
1502 GCC PR libstdc++/83906
1503 * gdbtypes.c (operator==(const dynamic_prop &,
1504 const dynamic_prop &)): New.
1505 (operator==(const range_bounds &, const range_bounds &)): New.
1506 (check_types_equal): Use them instead of memcmp.
1507 * gdbtypes.h (operator==(const dynamic_prop &,
1508 const dynamic_prop &)): Declare.
1509 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
1510 (operator==(const range_bounds &, const range_bounds &)): Declare.
1511 (operator!=(const range_bounds &, const range_bounds &)): Declare.
1512
1513 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1514
1515 * s390-linux-tdep.c (s390_record_address_mask)
1516 (s390_record_calc_disp_common, s390_record_calc_disp)
1517 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1518 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1519 (s390_process_record): Move to s390-tdep.c.
1520 (s390_linux_init_abi_any): Adjust.
1521 * s390-tdep.c (s390_record_address_mask)
1522 (s390_record_calc_disp_common, s390_record_calc_disp)
1523 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1524 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1525 (s390_process_record): Moved from s390-linux-tdep.c
1526 (s390_gdbarch_init): Adjust.
1527
1528 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1529
1530 * s390-linux-nat.c (s390-tdep.h): New include.
1531 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
1532 (HFILES_NO_SRCDIR): Add s390-tdep.h.
1533 (ALLDEPFILES): Add s390-tdep.c.
1534 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
1535 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
1536 * s390-tdep.h: ...this. New file.
1537 * s390-linux-tdep.c (s390-tdep.h): New include.
1538 (_initialize_s390_tdep): Rename to...
1539 (_initialize_s390_linux_tdep): ...this and adjust.
1540 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
1541 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
1542 s390-tdep.h.
1543 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
1544 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
1545 (s390_is_partial_instruction, s390_software_single_step)
1546 (is_non_branch_ril, s390_displaced_step_copy_insn)
1547 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
1548 (s390_prologue_data, s390_addr, s390_store, s390_load)
1549 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
1550 (s390_register_call_saved, s390_guess_tracepoint_registers)
1551 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
1552 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
1553 (s390_pseudo_register_name, s390_pseudo_register_type)
1554 (s390_pseudo_register_read, s390_pseudo_register_write)
1555 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
1556 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
1557 (s390_addr_bits_remove, s390_address_class_type_flags)
1558 (s390_address_class_type_flags_to_name)
1559 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
1560 (s390_function_arg_float, s390_function_arg_vector)
1561 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
1562 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
1563 (s390_frame_align, s390_register_return_value, s390_return_value)
1564 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
1565 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
1566 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
1567 (s390_trad_frame_prev_register, s390_unwind_cache)
1568 (s390_prologue_frame_unwind_cache)
1569 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
1570 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
1571 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
1572 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
1573 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
1574 (s390_frame_base_address, s390_local_base_address)
1575 (s390_frame_base, s390_gcc_target_options)
1576 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
1577 (s390_validate_reg_range, s390_tdesc_valid)
1578 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
1579 * s390-tdep.c: ...this. New file.
1580
1581 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1582
1583 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
1584 (s390_process_record, s390_gdbarch_tdep_alloc)
1585 (s390_linux_init_abi_any): Use/set new hook.
1586
1587 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1588
1589 * s390-linux-tdep.c (osabi.h): New include.
1590 (s390_linux_init_abi_31, s390_linux_init_abi_64)
1591 (s390_linux_init_abi_any): New functions.
1592 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
1593
1594 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1595
1596 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
1597 tdesc_has_registers check
1598
1599 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1600
1601 * s390-linux-tdep.c (s390_tdesc_valid): New function.
1602 (s390_validate_reg_range): New macro.
1603 (s390_gdbarch_init): Adjust.
1604
1605 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1606
1607 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
1608 (s390_gdbarch_tdep_alloc): Adjust.
1609 (s390_gdbarch_init): Adjust.
1610
1611 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1612
1613 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
1614 <have_tdb>: Change type to bool.
1615 (s390_gdbarch_tdep_alloc): Adjust.
1616 (s390_gdbarch_init): Adjust.
1617
1618 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1619
1620 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
1621 (gdbarch_tdep) <have_upper, have_vx>: New fields.
1622 (s390_gdbarch_tdep_alloc): New function.
1623 (s390_gdbarch_init): Allocate tdep at start and use its fields
1624 instead of separate variables.
1625
1626 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1627
1628 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
1629 when looking for cached gdbarch and add comment for remaining.
1630
1631 2018-01-22 Pedro Alves <palves@redhat.com>
1632 Sergio Durigan Junior <sergiodj@redhat.com>
1633
1634 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
1635 case.
1636
1637 2018-01-22 Maciej W. Rozycki <macro@mips.com>
1638
1639 * MAINTAINERS: Update my company e-mail address.
1640
1641 2018-01-22 Yao Qi <yao.qi@linaro.org>
1642
1643 * regcache.c (cooked_write_test): New function.
1644 (_initialize_regcache): Register the test.
1645
1646 2018-01-22 Yao Qi <yao.qi@linaro.org>
1647
1648 * ia64-tdep.c (ia64_pseudo_register_read): Call
1649 regcache->cooked_read instead of regcache_cooked_read_unsigned.
1650 * m32c-tdep.c (m32c_cat_read): Likewise.
1651 (m32c_r3r2r1r0_read): Likewise.
1652 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
1653 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
1654
1655 2018-01-22 Yao Qi <yao.qi@linaro.org>
1656
1657 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
1658 method raw_read instead of regcache_raw_read.
1659 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
1660 * arm-tdep.c (arm_neon_quad_read): Likewise.
1661 * avr-tdep.c (avr_pseudo_register_read): Likewise.
1662 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
1663 * frv-tdep.c (frv_pseudo_register_read): Likewise.
1664 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
1665 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1666 (i386_pseudo_register_read_into_value): Likewise.
1667 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
1668 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
1669 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
1670 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
1671 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
1672 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
1673 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
1674 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
1675 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
1676
1677 2018-01-22 Yao Qi <yao.qi@linaro.org>
1678
1679 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
1680 * configure.tgt: Remove target mt.
1681 * mt-tdep.c: Remove.
1682 * regcache.c (cooked_read_test): Remove the check for mt.
1683
1684 2018-01-22 Yao Qi <yao.qi@linaro.org>
1685
1686 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
1687 instead of gdbarch_pseudo_register_read_value.
1688
1689 2018-01-22 Joel Brobecker <brobecker@adacore.com>
1690
1691 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
1692 language is Ada.
1693
1694 2018-01-22 Joel Brobecker <brobecker@adacore.com>
1695
1696 * linespec.c (create_sals_line_offset): Remove code that preserved
1697 the symtab_and_line's line number.
1698
1699 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1700
1701 * varobj.c (varobj_create): Don't set valid_block when creating a
1702 floating varobj.
1703
1704 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1705
1706 * varobj.c (varobj_create): Remove out of date comment.
1707
1708 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1709
1710 PR mi/20395
1711 * ada-exp.y (write_var_from_sym): Pass extra parameter when
1712 updating innermost block.
1713 * parse.c (innermost_block_tracker::update): Take extra type
1714 parameter, and check types match before updating innermost block.
1715 (write_dollar_variable): Update innermost block for registers.
1716 * parser-defs.h (enum innermost_block_tracker_type): New enum.
1717 (innermost_block_tracker::innermost_block_tracker): Initialise
1718 m_types member.
1719 (innermost_block_tracker::reset): Take type parameter.
1720 (innermost_block_tracker::update): Take type parameter, and pass
1721 type through as needed.
1722 (innermost_block_tracker::m_types): New member.
1723 * varobj.c (varobj_create): Pass type when reseting innermost
1724 block.
1725
1726 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1727
1728 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
1729 * ada-lang.c (resolve_subexp): Likewise.
1730 * breakpoint.c (set_breakpoint_condition) Likewise.
1731 (watch_command_1) Likewise.
1732 * c-exp.y (variable): Likewise.
1733 * d-exp.y (PrimaryExpression): Likewise.
1734 * f-exp.y (variable): Likewise.
1735 * go-exp.y (variable): Likewise.
1736 * m2-exp.y (variable): Likewise.
1737 * objfiles.c (objfile::~objfile): Likewise.
1738 * p-exp.y (variable): Likewise.
1739 * parse.c (innermost_block): Change type.
1740 * parser-defs.h (class innermost_block_tracker): New.
1741 (innermost_block): Change to innermost_block_tracker.
1742 * printcmd.c (display_command): Switch to innermost_block API.
1743 (do_one_display): Likewise.
1744 * rust-exp.y (do_one_display): Likewise.
1745 * symfile.c (clear_symtab_users): Likewise.
1746 * varobj.c (varobj_create): Switch to innermost_block API, replace
1747 use of innermost_block with block stored on varobj object.
1748
1749 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1750
1751 * expression.h (innermost_block): Remove declaration.
1752 * varobj.c: Add 'parser-defs.h' include.
1753
1754 2018-01-19 Tom Tromey <tom@tromey.com>
1755
1756 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
1757 symbols in the static and global blocks.
1758
1759 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1760
1761 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
1762 gdb_ptrace.h, and move including gdb_wait.h ...
1763 * nat/linux-ptrace.h: ... to here.
1764
1765 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
1766
1767 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
1768 inf_ptrace_detach_success.
1769 (inf_ptrace_detach_success): Add inferior parameter, use it
1770 instead of inferior_ptid, pass it to detach_inferior.
1771 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
1772 parameter.
1773 * inferior.c (detach_inferior): Add overload that takes an
1774 inferior object.
1775 * inferior.h (detach_inferior): Likewise.
1776 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
1777 use inferior_ptid, adjust call to inf_ptrace_detach_success.
1778 * linux-thread-db.c (thread_db_detach): Use inf parameter.
1779
1780 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
1781
1782 * target.h (struct target_ops) <to_detach>: Add inferior
1783 parameter.
1784 (target_detach): Likewise.
1785 * target.c (dispose_inferior): Pass inferior down.
1786 (target_detach): Pass inferior down. Assert that it is equal to
1787 the current inferior.
1788 * aix-thread.c (aix_thread_detach): Pass inferior down.
1789 * corefile.c (core_file_command): Pass current_inferior() down.
1790 * corelow.c (core_detach): Add inferior parameter.
1791 * darwin-nat.c (darwin_detach): Likewise.
1792 * gnu-nat.c (gnu_detach): Likewise.
1793 * inf-ptrace.c (inf_ptrace_detach): Likewise.
1794 * infcmd.c (detach_command): Pass current_inferior() down to
1795 target_detach.
1796 * infrun.c (follow_fork_inferior): Pass parent_inf to
1797 target_detach.
1798 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
1799 target_detach.
1800 * linux-nat.c (linux_nat_detach): Add inferior parameter.
1801 * linux-thread-db.c (thread_db_detach): Likewise.
1802 * nto-procfs.c (procfs_detach): Likewise.
1803 * procfs.c (procfs_detach): Likewise.
1804 * record.c (record_detach): Likewise.
1805 * record.h (struct inferior): Forward-declare.
1806 (record_detach): Add inferior parameter.
1807 * remote-sim.c (gdbsim_detach): Likewise.
1808 * remote.c (remote_detach_1): Likewise.
1809 (remote_detach): Likewise.
1810 (extended_remote_detach): Likewise.
1811 * sol-thread.c (sol_thread_detach): Likewise.
1812 * target-debug.h (target_debug_print_inferior_p): New macro.
1813 * target-delegates.c: Re-generate.
1814 * top.c (kill_or_detach): Pass inferior down to target_detach.
1815 * windows-nat.c (windows_detach): Add inferior parameter.
1816
1817 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
1818
1819 * target.h (struct target_ops) <to_detach>: Remove args
1820 parameter.
1821 (target_detach): Likewise.
1822 * target.c (dispose_inferior): Adjust.
1823 (target_detach): Remove args parameter, adjust.
1824 * aix-thread.c (aix_thread_detach): Adjust.
1825 * corefile.c (core_file_command): Adjust.
1826 * corelow.c (core_detach): Adjust.
1827 * darwin-nat.c (darwin_detach): Adjust.
1828 * gnu-nat.c (gnu_detach): Adjust.
1829 * inf-ptrace.c (inf_ptrace_detach): Adjust.
1830 * infcmd.c (detach_command): Adjust
1831 * infrun.c (follow_fork_inferior): Adjust.
1832 (handle_vfork_child_exec_or_exit): Adjust.
1833 * linux-fork.c (linux_fork_detach): Remove args parameter.
1834 * linux-fork.h (linux_fork_detach): Likewise.
1835 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
1836 * linux-thread-db.c (thread_db_detach): Likewise.
1837 * nto-procfs.c (procfs_detach): Likewise.
1838 * procfs.c (procfs_detach): Likewise.
1839 (do_detach): Remove signo parameter.
1840 * record.c (record_detach): Remove args parameter.
1841 * record.h (record_detach): Likewise.
1842 * remote-sim.c (gdbsim_detach): Likewise.
1843 * remote.c (remote_detach_1): Likewise.
1844 (remote_detach): Likewise.
1845 (extended_remote_detach): Likewise.
1846 * sol-thread.c (sol_thread_detach): Likewise.
1847 * target-delegates.c: Re-generate.
1848 * top.c (struct qt_args) <args>: Remove field.
1849 (kill_or_detach): Don't pass args.
1850 (quit_force): Don't set args.
1851 * windows-nat.c (windows_detach): Remove args parameter.
1852
1853 2018-01-19 Yao Qi <yao.qi@linaro.org>
1854
1855 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
1856 (arm_linux_init_abi): Install it.
1857
1858 2018-01-19 Yao Qi <yao.qi@linaro.org>
1859
1860 * osabi.c (gdb_osabi_names): Extend the regexp for
1861 arm-linux-gnueabihf.
1862
1863 2018-01-18 Yao Qi <yao.qi@linaro.org>
1864
1865 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
1866 m_abbrevs.
1867 (abbrev_table::add_abbrev): Update.
1868 (abbrev_table::lookup_abbrev): Update.
1869
1870 2018-01-18 Yao Qi <yao.qi@linaro.org>
1871
1872 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
1873
1874 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
1875
1876 * compile/compile.c (compile_to_object): Convert "triplet_rx"
1877 to "std::string".
1878
1879 2018-01-17 Tom Tromey <tom@tromey.com>
1880
1881 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
1882
1883 2018-01-17 Tom Tromey <tom@tromey.com>
1884
1885 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
1886 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
1887 (create_array_type_with_stride): Update.
1888 * dwarf2read.c (set_die_type): Update.
1889
1890 2018-01-17 Tom Tromey <tom@tromey.com>
1891
1892 * dwarf2read.c (delayed_method_info): Remove typedef.
1893 (dwarf2_cu::method_info): Now a std::vector.
1894 (add_to_method_list): Update.
1895 (free_delayed_list): Remove.
1896 (compute_delayed_physnames): Update.
1897 (process_full_comp_unit, process_full_type_unit): Clear the method
1898 list. Remove cleanups.
1899 (psymtab_include_file_name): Add name_holder parameter. Use
1900 unique_xmalloc_ptr.
1901 (dwarf_decode_lines): Update.
1902
1903 2018-01-17 Tom Tromey <tom@tromey.com>
1904 Simon Marchi <simon.marchi@ericsson.com>
1905
1906 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
1907 (dwarf2_per_objfile::free_cached_comp_units)
1908 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
1909 (init_cutu_and_read_dies_no_follow): Update.
1910 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
1911 (dwarf2_cu::~dwarf2_cu): New.
1912 (free_heap_comp_unit, free_stack_comp_unit): Remove.
1913 (age_cached_comp_units, free_one_cached_comp_unit): Update.
1914
1915 2018-01-17 Tom Tromey <tom@tromey.com>
1916 Simon Marchi <simon.marchi@ericsson.com>
1917
1918 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
1919 (struct die_reader_specs) <abbrev_table>: New member.
1920 (struct abbrev_table): Add constructor.
1921 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
1922 <abbrev_obstack>: Now an auto_obstack.
1923 (abbrev_table_up): New typedef.
1924 (init_cu_die_reader): Add abbrev_table parameter.
1925 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
1926 Add result_dwo_abbrev_table.
1927 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
1928 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
1929 Update.
1930 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
1931 parameter.
1932 (skip_children): Update.
1933 (abbrev_table::alloc_abbrev): Rename from
1934 abbrev_table_alloc_abbrev.
1935 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
1936 (abbrev_table::lookup_abbrev): Rename from
1937 abbrev_table_lookup_abbrev.
1938 (abbrev_table_read_table): Return abbrev_table_up.
1939 (abbrev_table_free, abbrev_table_free_cleanup)
1940 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
1941 (load_partial_dies): Update.
1942
1943 2018-01-17 Tom Tromey <tom@tromey.com>
1944
1945 * dwarf2read.c (dwarf2_compute_name): Update comment.
1946 (read_func_scope, read_variable): Update.
1947 (new_symbol): Remove.
1948 (new_symbol_full): Rename to new_symbol.
1949
1950 2018-01-17 Mike Gulick <mgulick@mathworks.com>
1951
1952 PR gdb/16577
1953 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
1954 a warning instead of throwing an error, set section size to 0 and return
1955 NULL.
1956 * gdb_bfd.h (gdb_bfd_map_section): Update description.
1957
1958 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1959
1960 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
1961 std::string.
1962 (linux_ptrace_attach_fail_reason_string): Likewise.
1963 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
1964 Likewise.
1965 (linux_ptrace_attach_fail_reason_string): Likewise.
1966 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
1967
1968 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1969
1970 * linux-nat.c (linux_nat_attach): Remove xstrdup.
1971
1972 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1973
1974 PR gdb/21559
1975 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1976 checking for fs_base/gs_base fields in struct user_regs_struct.
1977 * configure: Regenerate.
1978
1979 2018-01-17 Yao Qi <yao.qi@linaro.org>
1980
1981 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
1982 function.
1983 (aarch64_linux_init_abi): Install it to gdbarch hook
1984 gcc_target_options.
1985
1986 2018-01-15 Pedro Alves <palves@redhat.com>
1987
1988 * common/signals-state-save-restore.c
1989 (save_original_signals_state): Fix typos.
1990
1991 2017-01-12 Tom Tromey <tom@tromey.com>
1992 Sergio Durigan Junior <sergiodj@redhat.com>
1993
1994 * Makefile.in (install-only): Install gdb-add-index.
1995
1996 2018-01-12 John Baldwin <jhb@FreeBSD.org>
1997
1998 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
1999
2000 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2001
2002 * infrun.c (keep_going_pass_signal): Clear step-over info when
2003 insert_breakpoints fails.
2004
2005 2018-01-11 Pedro Alves <palves@redhat.com>
2006
2007 PR gdb/22583
2008 * infrun.c (resume): Rename to ...
2009 (resume_1): ... this.
2010 (resume): Reimplement as wrapper around resume_1.
2011
2012 2018-01-11 Pedro Alves <palves@redhat.com>
2013
2014 PR remote/22597
2015 * remote.c (remote_parse_stop_reply): Default to the last-set
2016 general thread instead of to 'magic_null_ptid'.
2017
2018 2018-01-10 Pedro Alves <palves@redhat.com>
2019
2020 * language.h (language_get_symbol_name_matcher): Rename ...
2021 (get_symbol_name_matcher): ... this.
2022 * language.c (language_get_symbol_name_matcher): Ditto.
2023 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
2024 callers adjusted.
2025
2026 2018-01-10 Pedro Alves <palves@redhat.com>
2027
2028 PR gdb/22670
2029 * dwarf2read.c
2030 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
2031 Adjust to use language_get_symbol_name_matcher instead of
2032 language_defn::la_get_symbol_name_matcher.
2033 * language.c (language_get_symbol_name_matcher): If in Ada mode
2034 and the lookup name is a verbatim match, return Ada's matcher.
2035 * language.h (language_get_symbol_name_matcher): Adjust comment.
2036 (ada_lookup_name_info::verbatim_p):: New method.
2037
2038 2018-01-10 Pedro Alves <palves@redhat.com>
2039
2040 PR gdb/22670
2041 * ada-lang.c (ada_collect_symbol_completion_matches): If the
2042 minsym's language is language_auto or language_cplus, pass down
2043 language_ada instead.
2044 * symtab.c (compare_symbol_name): Don't frob symbol language here.
2045
2046 2018-01-10 Pedro Alves <palves@redhat.com>
2047
2048 PR gdb/22670
2049 * minsyms.c (linkage_name_str): New function.
2050 (iterate_over_minimal_symbols): Use it.
2051
2052 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2053
2054 * NEWS: Document that 'info proc' now works on FreeBSD.
2055
2056 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2057
2058 * configure.ac: Check for kinfo_getfile in libutil.
2059 * configure: Regenerate.
2060 * config.in: Regenerate.
2061 * fbsd-nat.c: Include "fbsd-tdep.h".
2062 (fbsd_fetch_cmdline): New.
2063 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
2064 rather than calling error.
2065 (fbsd_info_proc): New.
2066 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
2067 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
2068 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
2069
2070 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2071
2072 * fbsd-nat.c (struct free_deleter): Remove.
2073 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
2074
2075 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2076
2077 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
2078 NULL for an empty pathname.
2079
2080 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2081
2082 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
2083 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
2084 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
2085 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
2086 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
2087 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
2088 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
2089 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
2090 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
2091 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
2092 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
2093 (fbsd_core_fetch_timeval, fbsd_print_sigset)
2094 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
2095 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
2096 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
2097
2098 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
2099
2100 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
2101 (gnu_xfer_auxv): New function.
2102 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
2103 TARGET_OBJECT_AUXV.
2104
2105 2018-01-08 Yao Qi <yao.qi@linaro.org>
2106 Simon Marchi <simon.marchi@ericsson.com>
2107
2108 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
2109 common/selftest.c.
2110 (COMMON_OBS): Remove selftest.o.
2111 * configure.ac: Append selftest-arch.c and common/selftest.c to
2112 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
2113 * configure: Re-generated.
2114 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
2115 GDB_SELF_TEST.
2116 (maintenance_info_selftests): Likewise.
2117
2118 2018-01-08 Xavier Roirand <roirand@adacore.com>
2119
2120 * ada-valprint.c (val_print_packed_array_elements): Use
2121 proper number of elements when printing an array indexed
2122 by an enumeration type.
2123
2124 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2125
2126 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
2127 (dw2_get_file_names_reader): Adjust.
2128 (lookup_dwo_signatured_type): Adjust.
2129 (lookup_dwp_signatured_type): Adjust.
2130 (lookup_signatured_type): Adjust.
2131 (create_type_unit_group): Adjust.
2132 (get_type_unit_group): Adjust.
2133 (process_psymtab_comp_unit_reader): Adjust.
2134 (build_type_psymtabs_reader): Adjust.
2135 (scan_partial_symbols): Adjust.
2136 (add_partial_symbol): Adjust.
2137 (add_partial_subprogram): Adjust.
2138 (peek_die_abbrev): Adjust.
2139 (fixup_go_packaging): Adjust.
2140 (process_imported_unit_die): Adjust.
2141 (dwarf2_compute_name): Adjust.
2142 (dwarf2_physname): Adjust.
2143 (read_import_statement): Adjust.
2144 (handle_DW_AT_stmt_list): Adjust.
2145 (read_file_scope): Adjust.
2146 (read_func_scope): Adjust.
2147 (read_lexical_block_scope): Adjust.
2148 (read_call_site_scope): Adjust.
2149 (read_variable): Adjust.
2150 (dwarf2_rnglists_process): Adjust.
2151 (dwarf2_ranges_process): Adjust.
2152 (dwarf2_ranges_read): Adjust.
2153 (dwarf2_get_pc_bounds): Adjust.
2154 (dwarf2_record_block_ranges): Adjust.
2155 (dwarf2_add_field): Adjust.
2156 (dwarf2_add_member_fn): Adjust.
2157 (read_structure_type): Adjust.
2158 (process_structure_scope): Adjust.
2159 (read_enumeration_type): Adjust.
2160 (read_array_type): Adjust.
2161 (mark_common_block_symbol_computed): Adjust.
2162 (read_common_block): Adjust.
2163 (read_namespace_type): Adjust.
2164 (read_namespace): Adjust.
2165 (read_module_type): Adjust.
2166 (read_tag_pointer_type): Adjust.
2167 (read_tag_ptr_to_member_type): Adjust.
2168 (read_tag_string_type): Adjust.
2169 (read_subroutine_type): Adjust.
2170 (read_typedef): Adjust.
2171 (read_base_type): Adjust.
2172 (attr_to_dynamic_prop): Adjust.
2173 (read_subrange_type): Adjust.
2174 (read_unspecified_type): Adjust.
2175 (dwarf2_read_abbrevs): Adjust.
2176 (load_partial_dies): Adjust.
2177 (read_partial_die): Adjust.
2178 (find_partial_die): Adjust.
2179 (guess_partial_die_structure_name): Adjust.
2180 (fixup_partial_die): Adjust.
2181 (read_attribute_value): Adjust.
2182 (read_addr_index): Adjust.
2183 (read_addr_index_from_leb128): Adjust.
2184 (read_str_index): Adjust.
2185 (dwarf2_string_attr): Adjust.
2186 (get_debug_line_section): Adjust.
2187 (dwarf_decode_line_header): Adjust.
2188 (lnp_state_machine::check_line_address): Adjust.
2189 (dwarf_decode_lines_1): Adjust.
2190 (dwarf_decode_lines): Adjust.
2191 (dwarf2_start_symtab): Adjust.
2192 (var_decode_location): Adjust.
2193 (new_symbol_full): Adjust.
2194 (dwarf2_const_value_data): Adjust.
2195 (dwarf2_const_value_attr): Adjust.
2196 (dwarf2_const_value): Adjust.
2197 (die_type): Adjust.
2198 (die_containing_type): Adjust.
2199 (build_error_marker_type): Adjust.
2200 (lookup_die_type): Adjust.
2201 (guess_full_die_structure_name): Adjust.
2202 (anonymous_struct_prefix): Adjust.
2203 (determine_prefix): Adjust.
2204 (dwarf2_name): Adjust.
2205 (follow_die_ref_or_sig): Adjust.
2206 (follow_die_offset): Adjust.
2207 (follow_die_ref): Adjust.
2208 (follow_die_sig_1): Adjust.
2209 (follow_die_sig): Adjust.
2210 (get_signatured_type): Adjust.
2211 (get_DW_AT_signature_type): Adjust.
2212 (decode_locdesc): Adjust.
2213 (dwarf_decode_macros): Adjust.
2214 (cu_debug_loc_section): Adjust.
2215 (fill_in_loclist_baton): Adjust.
2216 (dwarf2_symbol_mark_computed): Adjust.
2217 (init_one_comp_unit): Don't assign
2218 dwarf2_cu::dwarf2_per_objfile.
2219 (set_die_type): Adjust.
2220
2221 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2222
2223 * dwarf2read.c (struct mapped_debug_names): Add constructor.
2224 <dwarf2_per_objfile>: New field.
2225 (dwarf2_per_objfile): Remove global.
2226 (get_dwarf2_per_objfile): New function.
2227 (set_dwarf2_per_objfile): New function.
2228 (dwarf2_build_psymtabs_hard): Change objfile parameter to
2229 dwarf2_per_objfile.
2230 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2231 (read_abbrev_offset): Likewise.
2232 (read_indirect_string): Likewise.
2233 (read_indirect_line_string): Likewise.
2234 (read_indirect_string_at_offset): Likewise.
2235 (read_indirect_string_from_dwz): Likewise.
2236 (dwarf2_find_containing_comp_unit): Change objfile parameter to
2237 dwarf2_per_objfile.
2238 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2239 (create_all_comp_units): Change objfile parameter to
2240 dwarf2_per_objfile.
2241 (create_all_type_units): Likewise.
2242 (process_queue): Add dwarf2_per_objfile parameter.
2243 (read_and_check_comp_unit_head): Likewise.
2244 (lookup_dwo_unit_in_dwp): Likewise.
2245 (get_dwp_file): Likewise.
2246 (process_cu_includes): Likewise.
2247 (struct free_dwo_file_cleanup_data): New struct.
2248 (dwarf2_has_info): Use get_dwarf2_per_objfile and
2249 set_dwarf2_per_objfile.
2250 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
2251 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
2252 context, adjust calls.
2253 (dw2_instantiate_symtab): Likewise.
2254 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
2255 (dw2_get_cu): Likewise.
2256 (create_cu_from_index_list): Change objfile parameter to
2257 dwarf2_per_objfile.
2258 (create_cus_from_index_list): Get dwarf2_per_objfile from
2259 context, adjust calls.
2260 (create_cus_from_index): Likewise.
2261 (create_signatured_type_table_from_index): Change objfile
2262 parameter to dwarf2_per_objfile.
2263 (create_signatured_type_table_from_debug_names): Change objfile
2264 parameter to dwarf2_per_objfile.
2265 (create_addrmap_from_index): Likewise.
2266 (create_addrmap_from_aranges): Likewise.
2267 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
2268 (dw2_setup): Remove.
2269 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
2270 context.
2271 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
2272 get_dwarf2_per_objfile.
2273 (dw2_forget_cached_source_info): Likewise.
2274 (dw2_map_symtabs_matching_filename): Likewise.
2275 (struct dw2_symtab_iterator) <index>: Remove.
2276 <dwarf2_per_objfile>: New field.
2277 (dw2_symtab_iter_init): Replace index parameter with
2278 dwarf2_per_objfile.
2279 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
2280 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
2281 (dw2_print_stats): Likewise.
2282 (dw2_dump): Likewise.
2283 (dw2_expand_symtabs_for_function): Likewise.
2284 (dw2_expand_all_symtabs): Likewise.
2285 (dw2_expand_symtabs_with_fullname): Likewise.
2286 (dw2_expand_marked_cus): Replace index and objfile parameters
2287 with dwarf2_per_objfile.
2288 (dw_expand_symtabs_matching_file_matcher): Add
2289 dwarf2_per_objfile parameter and adjust calls.
2290 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
2291 adjust calls.
2292 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
2293 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
2294 adjust calls.
2295 (create_cus_from_debug_names_list): Replace objfile parameter
2296 with dwarf2_per_objfile and adjust calls.
2297 (create_cus_from_debug_names): Likewise.
2298 (dwarf2_read_debug_names): Likewise.
2299 (mapped_debug_names::namei_to_name): Adjust call.
2300 (dw2_debug_names_iterator::next): Likewise.
2301 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
2302 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
2303 (dw2_debug_names_dump): Likewise.
2304 (dw2_debug_names_expand_symtabs_for_function): Likewise.
2305 (dw2_debug_names_expand_symtabs_matching): Likewise.
2306 (dwarf2_initialize_objfile): Likewise.
2307 (dwarf2_build_psymtabs): Likewise.
2308 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
2309 this_cu.
2310 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
2311 (read_and_check_comp_unit_head): Likewise.
2312 (read_abbrev_offset): Likewise.
2313 (create_debug_type_hash_table): Likewise.
2314 (create_debug_types_hash_table): Likewise.
2315 (create_all_type_units): Replace objfile parameter with
2316 dwarf2_per_objfile.
2317 (add_type_unit): Add dwarf2_per_objfile parameter.
2318 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
2319 with dwarf2_per_objfile.
2320 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
2321 (lookup_dwp_signatured_type): Likewise.
2322 (lookup_signatured_type): Likewise.
2323 (read_cutu_die_from_dwo): Likewise.
2324 (init_tu_and_read_dwo_dies): Likewise.
2325 (init_cutu_and_read_dies): Likewise.
2326 (init_cutu_and_read_dies_no_follow): Likewise.
2327 (allocate_type_unit_groups_table): Add objfile parameter.
2328 (create_type_unit_group): Use dwarf2_per_objfile from cu.
2329 (get_type_unit_group): Likewise.
2330 (process_psymtab_comp_unit): Update call.
2331 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
2332 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
2333 (print_tu_stats): Likewise.
2334 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
2335 in void* parameter.
2336 (build_type_psymtabs): Change objfile parameter to
2337 dwarf2_per_objfile.
2338 (process_skeletonless_type_unit): Use dwarf2_per_objfile
2339 passed in void* parameter.
2340 (process_skeletonless_type_units): Change objfile parameter to
2341 dwarf2_per_objfile.
2342 (set_partial_user): Likewise.
2343 (dwarf2_build_psymtabs_hard): Likewise.
2344 (read_comp_units_from_section): Likewise.
2345 (create_all_comp_units): Likewise.
2346 (scan_partial_symbols): Update calls.
2347 (add_partial_symbol): Likewise.
2348 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
2349 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
2350 (process_queue): Add dwarf2_per_objfile parameter.
2351 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
2352 (compute_compunit_symtab_includes): Likewise.
2353 (process_cu_includes): Add dwarf2_per_objfile parameter.
2354 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
2355 (process_full_type_unit): Likewise.
2356 (process_imported_unit_die): Update call.
2357 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
2358 (read_file_scope): Likewise.
2359 (allocate_dwo_file_hash_table): Add objfile parameter.
2360 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
2361 (create_cus_hash_table): Likewise.
2362 (create_dwp_hash_table): Likewise.
2363 (create_dwo_unit_in_dwp_v1): Likewise.
2364 (create_dwp_v2_section): Likewise.
2365 (create_dwo_unit_in_dwp_v2): Likewise.
2366 (lookup_dwo_unit_in_dwp): Likewise.
2367 (try_open_dwop_file): Likewise.
2368 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
2369 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
2370 cleanup to include a reference to dwarf2_per_objfile.
2371 (open_dwp_file): Add dwarf2_per_objfile parameter.
2372 (open_and_init_dwp_file): Likewise.
2373 (get_dwp_file): Likewise.
2374 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
2375 (queue_and_load_all_dwo_tus): Update call.
2376 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
2377 data.
2378 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
2379 (dwarf2_ranges_process): Likewise.
2380 (dwarf2_get_pc_bounds): Likewise.
2381 (mark_common_block_symbol_computed): Likewise.
2382 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2383 (dwarf2_read_abbrevs): Update call.
2384 (read_partial_die): Use dwarf2_per_objfile from cu.
2385 (find_partial_die): Likewise.
2386 (fixup_partial_die): Likewise.
2387 (read_attribute_value): Likewise.
2388 (read_indirect_string_at_offset_from): Add objfile parameter.
2389 (read_indirect_string_at_offset): Add dwarf2_per_objfile
2390 parameter.
2391 (read_indirect_string_from_dwz): Add objfile parameter.
2392 (read_indirect_string): Add objfile parameter.
2393 (read_addr_index_1): Add dwarf2_per_objfile parameter.
2394 (read_addr_index): Use dwarf2_per_objfile from cu.
2395 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
2396 call dw2_setup.
2397 (read_str_index): Use dwarf2_per_objfile from cu.
2398 (get_debug_line_section): Likewise.
2399 (read_formatted_entries): Add dwarf2_per_objfile parameter.
2400 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
2401 (new_symbol_full): Use dwarf2_per_objfile from cu.
2402 (build_error_marker_type): Likewise.
2403 (lookup_die_type): Likewise.
2404 (determine_prefix): Likewise.
2405 (follow_die_offset): Likewise.
2406 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
2407 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
2408 (dwarf2_fetch_die_type_sect_off): Likewise.
2409 (dwarf2_get_die_type): Likewise.
2410 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
2411 (get_signatured_type): Likewise.
2412 (get_DW_AT_signature_type): Likewise.
2413 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
2414 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
2415 (cu_debug_loc_section): Likewise.
2416 (fill_in_loclist_baton): Likewise.
2417 (dwarf2_symbol_mark_computed): Likewise.
2418 (dwarf2_find_containing_comp_unit): Change objfile parameter to
2419 dwarf2_per_objfile.
2420 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
2421 parameter.
2422 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2423 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
2424 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
2425 (set_die_type): Use dwarf2_free_objfile from cu.
2426 (get_die_type_at_offset): Likewise.
2427 (dwarf2_per_objfile_free): Don't assign global variable.
2428 (debug_names) <constructor>: Add dwarf2_per_objfile
2429 parameter, update m_debugstrlookup construction.
2430 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
2431 parameter.
2432 <m_dwarf2_per_objfile>: New field.
2433 <lookup>: Use m_dwarf2_per_objfile.
2434 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
2435 (psyms_seen_size): Likewise.
2436 (write_gdbindex): Replace objfile parameter with
2437 dwarf2_per_objfile.
2438 (write_debug_names): Likewise.
2439 (write_psymtabs_to_index): Likewise.
2440 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
2441 calls.
2442
2443 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2444
2445 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
2446 <dwarf2_per_objfile>: New field.
2447 (struct dwarf2_per_cu_data) <objfile>: Remove.
2448 <dwarf2_per_objfile>: New field.
2449 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
2450 of objfile.
2451 (create_signatured_type_table_from_index): Likewise.
2452 (create_debug_type_hash_table): Likewise.
2453 (fill_in_sig_entry_from_dwo_entry): Likewise.
2454 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
2455 (create_type_unit_group): Assign dwarf2_per_objfile instead of
2456 objfile.
2457 (create_partial_symtab): Access objfile through
2458 dwarf2_per_objfile.
2459 (process_psymtab_comp_unit_reader): Likewise.
2460 (read_comp_units_from_section): Likewise.
2461 (scan_partial_symbols): Likewise.
2462 (add_partial_symbol): Likewise.
2463 (add_partial_subprogram): Likewise.
2464 (peek_die_abbrev): Likewise.
2465 (fixup_go_packaging): Likewise.
2466 (process_full_comp_unit): Likewise.
2467 (process_full_type_unit): Likewise.
2468 (process_imported_unit_die): Likewise.
2469 (dwarf2_compute_name): Likewise.
2470 (dwarf2_physname): Likewise.
2471 (read_import_statement): Likewise.
2472 (create_cus_hash_table): Assign dwarf2_physname instead of
2473 objfile.
2474 (read_func_scope): Access objfile through dwarf2_per_objfile.
2475 (read_lexical_block_scope): Likewise.
2476 (read_call_site_scope): Likewise.
2477 (read_variable): Likewise.
2478 (dwarf2_rnglists_process): Likewise.
2479 (dwarf2_ranges_process): Likewise.
2480 (dwarf2_ranges_read): Likewise.
2481 (dwarf2_record_block_ranges): Likewise.
2482 (dwarf2_add_field): Likewise.
2483 (dwarf2_add_member_fn): Likewise.
2484 (read_structure_type): Likewise.
2485 (process_structure_scope): Likewise.
2486 (read_enumeration_type): Likewise.
2487 (read_array_type): Likewise.
2488 (read_common_block): Likewise.
2489 (read_namespace_type): Likewise.
2490 (read_namespace): Likewise.
2491 (read_module_type): Likewise.
2492 (read_tag_pointer_type): Likewise.
2493 (read_tag_ptr_to_member_type): Likewise.
2494 (read_tag_string_type): Likewise.
2495 (read_subroutine_type): Likewise.
2496 (read_typedef): Likewise.
2497 (read_base_type): Likewise.
2498 (attr_to_dynamic_prop): Likewise.
2499 (read_subrange_type): Likewise.
2500 (read_unspecified_type): Likewise.
2501 (load_partial_dies): Likewise.
2502 (read_partial_die): Likewise.
2503 (find_partial_die): Likewise.
2504 (guess_partial_die_structure_name): Likewise.
2505 (fixup_partial_die): Likewise.
2506 (read_attribute_value): Likewise.
2507 (read_addr_index_from_leb128): Likewise.
2508 (dwarf2_read_addr_index): Likewise.
2509 (dwarf2_string_attr): Likewise.
2510 (lnp_state_machine::check_line_address): Likewise.
2511 (dwarf_decode_lines_1): Likewise.
2512 (dwarf_decode_lines): Likewise.
2513 (dwarf2_start_symtab): Likewise.
2514 (var_decode_location): Likewise.
2515 (new_symbol_full): Likewise.
2516 (dwarf2_const_value_data): Likewise.
2517 (dwarf2_const_value_attr): Likewise.
2518 (dwarf2_const_value): Likewise.
2519 (die_type): Likewise.
2520 (die_containing_type): Likewise.
2521 (lookup_die_type): Likewise.
2522 (guess_full_die_structure_name): Likewise.
2523 (anonymous_struct_prefix): Likewise.
2524 (dwarf2_name): Likewise.
2525 (follow_die_ref_or_sig): Likewise.
2526 (follow_die_offset): Likewise.
2527 (follow_die_ref): Likewise.
2528 (dwarf2_fetch_die_loc_sect_off): Likewise.
2529 (dwarf2_fetch_constant_bytes): Likewise.
2530 (dwarf2_fetch_die_type_sect_off): Likewise.
2531 (dwarf2_get_die_type): Likewise.
2532 (follow_die_sig): Likewise.
2533 (decode_locdesc): Likewise.
2534 (dwarf2_per_cu_objfile): Likewise.
2535 (dwarf2_per_cu_text_offset): Likewise.
2536 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
2537 objfile.
2538 (set_die_type): Access objfile through
2539 dwarf2_per_objfile.
2540
2541 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2542
2543 * valprint.c (converted_character_d): Remove typedef.
2544 (DEF_VEC_O (converted_character_d)): Remove.
2545 (count_next_character): Use std::vector.
2546 (print_converted_chars_to_obstack): Likewise.
2547 (generic_printstr): Likewise.
2548
2549 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2550
2551 * xml-support.h (struct gdb_xml_value): Add constructor.
2552 <value>: Change type to unique_xmalloc_ptr.
2553 (gdb_xml_value_s): Remove typedef.
2554 (DEF_VEC_O (gdb_xml_value_s)): Remove.
2555 (gdb_xml_element_start_handler): Change parameter type to
2556 std::vector.
2557 (xml_find_attribute): Likewise.
2558 * xml-support.c (xml_find_attribute): Change parameter type to
2559 std::vector and adjust.
2560 (gdb_xml_values_cleanup): Remove.
2561 (gdb_xml_parser::start_element): Adjust to std::vector.
2562 (xinclude_start_include): Change paraeter type to std::vector
2563 and adjust.
2564 * btrace.c (check_xml_btrace_version): Likewise.
2565 (parse_xml_btrace_block): Likewise.
2566 (parse_xml_btrace_pt_config_cpu): Likewise.
2567 (parse_xml_btrace_pt): Likewise.
2568 (parse_xml_btrace_conf_bts): Likewise.
2569 (parse_xml_btrace_conf_pt): Likewise.
2570 * memory-map.c (memory_map_start_memory): Likewise.
2571 (memory_map_start_property): Likewise.
2572 * osdata.c (osdata_start_osdata): Likewise.
2573 (osdata_start_item): Likewise.
2574 (osdata_start_column): Likewise.
2575 * remote.c (start_thread): Likewise.
2576 * solib-aix.c (library_list_start_library): Likewise.
2577 (library_list_start_list): Likewise.
2578 * solib-svr4.c (library_list_start_library): Likewise.
2579 (svr4_library_list_start_list): Likewise.
2580 * solib-target.c (library_list_start_segment): Likewise.
2581 (library_list_start_section): Likewise.
2582 (library_list_start_library): Likewise.
2583 (library_list_start_list): Likewise.
2584 * tracepoint.c (traceframe_info_start_memory): Likewise.
2585 (traceframe_info_start_tvar): Likewise.
2586 * xml-syscall.c (syscall_start_syscall): Likewise.
2587 * xml-tdesc.c (tdesc_start_target): Likewise.
2588 (tdesc_start_feature): Likewise.
2589 (tdesc_start_reg): Likewise.
2590 (tdesc_start_union): Likewise.
2591 (tdesc_start_struct): Likewise.
2592 (tdesc_start_flags): Likewise.
2593 (tdesc_start_enum): Likewise.
2594 (tdesc_start_field): Likewise.
2595 (tdesc_start_enum_value): Likewise.
2596 (tdesc_start_vector): Likewise.
2597
2598 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2599
2600 * extension.h (struct xmethod_worker) <clone>: Remove.
2601 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
2602 Remove.
2603 (python_xmethod_worker::clone): Remove.
2604 * valops.c (find_overload_match): Use std::move instead of
2605 clone.
2606
2607 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2608
2609 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
2610 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
2611 <free_xmethod_worker_data>: Remove.
2612 <get_matching_xmethod_workers>: Chance VEC to std::vector.
2613 <get_xmethod_arg_types>: Remove.
2614 <get_xmethod_result_type>: Remove.
2615 <invoke_xmethod>: Remove.
2616 * extension.c (new_xmethod_worker): Remove.
2617 (clone_xmethod_worker): Remove.
2618 (get_matching_xmethod_workers): Return void, pass std::vector by
2619 pointer.
2620 (get_xmethod_arg_types): Rename to...
2621 (xmethod_worker::get_arg_types): ... this, and adjust.
2622 (get_xmethod_result_type): Rename to...
2623 (xmethod_worker::get_result_type): ... this, and adjust.
2624 (invoke_xmethod): Remove.
2625 (free_xmethod_worker): Remove.
2626 (free_xmethod_worker_vec): Remove.
2627 * extension.h (enum ext_lang_rc): Move here from
2628 extension-priv.h.
2629 (struct xmethod_worker): Add constructor and destructor.
2630 <data>: Remove.
2631 <value>: Remove.
2632 <invoke, clone, do_get_result_type, do_get_arg_types>: New
2633 virtual pure methods.
2634 <get_arg_types, get_result_type>: New methods.
2635 (xmethod_worker_ptr): Remove typedef.
2636 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
2637 (xmethod_worker_vec): Remove typedef.
2638 (xmethod_worker_up): New typedef.
2639 (invoke_xmethod): Remove.
2640 (clone_xmethod_worker): Remove.
2641 (free_xmethod_worker): Remove.
2642 (free_xmethod_worker_vec): Remove.
2643 (get_xmethod_arg_types): Remove.
2644 (get_xmethod_result_type): Remove.
2645 * valops.c (find_method_list): Use std::vector, don't use
2646 intermediate vector.
2647 (value_find_oload_method_list): Use std::vector.
2648 (find_overload_match): Use std::vector.
2649 (find_oload_champ): Use std::vector.
2650 * value.c (value_free): Use operator delete.
2651 (value_of_xmethod): Rename to...
2652 (value_from_xmethod): ... this. Don't assign
2653 xmethod_worker::value, take rvalue-reference.
2654 (result_type_of_xmethod): Adjust.
2655 (call_xmethod): Adjust.
2656 * value.h: Include extension.h.
2657 (struct xmethod_worker): Don't forward-declare.
2658 (value_of_xmethod): Rename to...
2659 (value_from_xmethod): ... this, take rvalue-reference.
2660 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
2661 (struct python_xmethod_worker): ... this, add constructor and
2662 destructor.
2663 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
2664 (gdbpy_free_xmethod_worker_data): Rename to...
2665 (python_xmethod_worker::~python_xmethod_worker): ... this and
2666 adjust.
2667 (gdbpy_clone_xmethod_worker_data): Rename to...
2668 (python_xmethod_worker::clone): ... this and adjust.
2669 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
2670 temporary vector.
2671 (gdbpy_get_xmethod_arg_types): Rename to...
2672 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
2673 (gdbpy_get_xmethod_result_type): Rename to...
2674 (python_xmethod_worker::do_get_result_type): ... this and
2675 adjust.
2676 (gdbpy_invoke_xmethod): Rename to...
2677 (python_xmethod_worker::invoke): ... this and adjust.
2678 (new_python_xmethod_worker): Rename to...
2679 (python_xmethod_worker::python_xmethod_worker): ... this and
2680 adjust.
2681 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
2682 Remove.
2683 (gdbpy_free_xmethod_worker_data): Remove.
2684 (gdbpy_get_matching_xmethod_workers): Use std::vector.
2685 (gdbpy_get_xmethod_arg_types): Remove.
2686 (gdbpy_get_xmethod_result_type): Remove.
2687 (gdbpy_invoke_xmethod): Remove.
2688 * python/python.c (python_extension_ops): Remove obsolete
2689 callbacks.
2690
2691 2018-01-05 Pedro Alves <palves@redhat.com>
2692
2693 PR gdb/18653
2694 * common/signals-state-save-restore.c
2695 (save_original_signals_state): New parameter 'quiet'. Warn if we
2696 find a custom handler preinstalled, instead of internal erroring.
2697 But only warn if !quiet.
2698 * common/signals-state-save-restore.h
2699 (save_original_signals_state): New parameter 'quiet'.
2700 * main.c (captured_main_1): Move save_original_signals_state call
2701 after option handling, and pass QUIET.
2702
2703 2018-01-05 Pedro Alves <palves@redhat.com>
2704
2705 * spu-tdep.c (spu_catch_start): Pass
2706 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
2707
2708 2018-01-05 Pedro Alves <palves@redhat.com>
2709
2710 PR gdb/22670
2711 * ada-lang.c (literal_symbol_name_matcher): New function.
2712 (ada_get_symbol_name_matcher): Use it for
2713 symbol_name_match_type::SEARCH_NAME.
2714 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
2715 it down instead of assuming symbol_name_match_type::FULL.
2716 * block.h (block_lookup_symbol): New parameter 'match_type'.
2717 * c-valprint.c (print_unpacked_pointer): Use
2718 lookup_symbol_search_name instead of lookup_symbol.
2719 * compile/compile-object-load.c (get_out_value_type): Pass down
2720 symbol_name_match_type::SEARCH_NAME.
2721 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
2722 symbol_name_match_type::FULL.
2723 * cp-support.c (cp_get_symbol_name_matcher): Handle
2724 symbol_name_match_type::SEARCH_NAME.
2725 * infrun.c (insert_exception_resume_breakpoint): Use
2726 lookup_symbol_search_name.
2727 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
2728 * psymtab.c (maintenance_check_psymtabs): Use
2729 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
2730 * stack.c (print_frame_args): Use lookup_symbol_search_name and
2731 SYMBOL_SEARCH_NAME.
2732 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
2733 if symbol_name_match_type::SEARCH_NAME.
2734 (lookup_symbol_in_language): Pass down
2735 symbol_name_match_type::FULL.
2736 (lookup_symbol_search_name): New.
2737 (lookup_language_this): Pass down
2738 symbol_name_match_type::SEARCH_NAME.
2739 (lookup_symbol_aux, lookup_local_symbol): New parameter
2740 'match_type'. Pass it down.
2741 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
2742 (lookup_symbol_search_name): New declaration.
2743 (lookup_symbol_in_block): New 'match_type' parameter.
2744
2745 2018-01-05 Pedro Alves <palves@redhat.com>
2746
2747 PR gdb/22670
2748 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
2749 ada_lookup_symbol.
2750 (ada_lookup_symbol): Reimplement in terms of
2751 ada_lookup_symbol_list, bits factored out from
2752 ada_lookup_encoded_symbol.
2753
2754 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2755
2756 * ada-exp.y (write_object_renaming): When subscripting an array
2757 using a symbol as the index, pass the block in call to
2758 ada_lookup_encoded_symbol when looking that symbol up.
2759
2760 2018-01-05 Jerome Guitton <guitton@adacore.com>
2761
2762 * ada-lang.c (ada_array_length): Use ada_index_type instead of
2763 TYPE_INDEX_TYPE.
2764
2765 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2766
2767 * ada-lang.c (ada_to_fixed_value_create): Add handling of
2768 the case where VALUE_LVAL (val0) is not lval_memory.
2769
2770 2018-01-05 Xavier Roirand <roirand@adacore.com>
2771
2772 * ada-valprint.c (print_optional_low_bound): Handle
2773 character-indexed array printing like boolean-indexed array
2774 printing.
2775
2776 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2777
2778 * NEWS: Create a new section for the next release branch.
2779 Rename the section of the current branch, now that it has
2780 been cut.
2781
2782 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2783
2784 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
2785 * version.in: Bump version to 8.1.50.DATE-git.
2786
2787 2018-01-03 Xavier Roirand <roirand@adacore.com>
2788
2789 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
2790 Add field.
2791 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
2792 Add field.
2793 (default_exception_support_info) <catch_handlers_sym>: Add field.
2794 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
2795 (ada_exception_name_addr_1): Add "catch handlers" handling.
2796 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
2797 Update all callers.
2798 (create_excep_cond_exprs) <ex>: Add parameter.
2799 (re_set_exception): Update create_excep_cond_exprs call.
2800 (print_it_exception, print_one_exception, print_mention_exception)
2801 (print_recreate_exception): Add "catch handler" handling.
2802 (allocate_location_catch_handlers, re_set_catch_handlers)
2803 (check_status_catch_handlers, print_it_catch_handlers)
2804 (print_one_catch_handlers, print_mention_catch_handlers)
2805 (print_recreate_catch_handlers): New function.
2806 (catch_handlers_breakpoint_ops): New variable.
2807 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
2808 Add parameter. Add "catch handler" handling.
2809 (ada_exception_sym_name, ada_exception_breakpoint_ops):
2810 Add "catch handler" handling.
2811 (ada_exception_catchpoint_cond_string): Add "catch handler"
2812 handling.
2813 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
2814 call.
2815 (catch_ada_handlers_command): New function.
2816 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
2817 operations structure.
2818 (_initialize_ada_language): Add "catch handlers" command entry.
2819 * NEWS: Document "catch handlers" feature.
2820
2821 2018-01-02 Joel Brobecker <brobecker@adacore.com>
2822
2823 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
2824 account when creating the array type of the slice.
2825 (ada_value_slice): Likewise.
2826
2827 2018-01-02 Joel Brobecker <brobecker@adacore.com>
2828
2829 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
2830 New enum value.
2831 (create_array_type_with_stride): Add byte_stride_prop parameter.
2832 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
2833 New parameter. Update all callers in this file.
2834 (array_type_has_dynamic_stride): New function.
2835 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
2836 of arrays with dynamic byte strides.
2837 * dwarf2read.c (read_array_type): Add support for dynamic
2838 DW_AT_byte_stride attributes.
2839
2840 2018-01-02 Joel Brobecker <brobecker@adacore.com>
2841
2842 * dwarf2read.c (read_unspecified_type): Treat
2843 DW_TAG_enumeration_type DIEs from Ada units as stubs.
2844
2845 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2846
2847 Update copyright year range in all GDB files.
2848
2849 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2850
2851 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
2852 and gdb/testsuite/gdb.base/step-line.c.
2853
2854 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2855
2856 * copyright.py (main): Dump the contents of
2857 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
2858 even if BY_HAND is empty.
2859
2860 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2861
2862 * top.c (print_gdb_version): Update Copyright year in version
2863 message.
2864
2865 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2866
2867 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
2868
2869 For older changes see ChangeLog-2017.
2870 \f
2871 Local Variables:
2872 mode: change-log
2873 left-margin: 8
2874 fill-column: 74
2875 version-control: never
2876 coding: utf-8
2877 End:
This page took 0.189348 seconds and 5 git commands to generate.