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