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