Fix compilation failure in remote.c
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
a7f25a84
SM
12018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2
3 * remote.c (remote_target::download_tracepoint): Fix format
4 string errors.
5
296956be
PFC
62018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
7
8 * tracefile.c: Include common/byte-vector.h.
9 (trace_save): Change type of buf to gdb::byte_vector. Initialize
10 with trace_regblock_size if needed. Update uses of buf.
11
a04b9d62
PFC
122018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
13
14 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
15 std::vector<unsigned char>.
16 * tracepoint.c (collection_list::collection_list): Remove
17 m_regs_mask initializer from initializer list. Resize
18 m_regs_mask using the largest remote register number.
19 (collection_list::add_remote_register): Remove size check on
20 m_regs_mask. Use at to access element.
21 (collection_list::stringify): Change type of temp_buf to
22 gdb::char_vector. Update uses of temp_buf. Resize if needed to
23 stringify the register mask. Use pack_hex_byte for the register
24 mask.
25
4277c4b8
PFC
262018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
27
28 * tracepoint.h (class collection_list) <add_register>: Remove.
29 <add_remote_register, add_ax_registers, add_local_register>:
30 Declare.
31 <add_memrange>: Add scope parameter.
32 * tracepoint.c (encode_actions_1): Likewise.
33 (collection_list::add_register): Rename to ...
34 (collection_list::add_remote_register): ... this. Update
35 comment.
36 (collection_list::add_ax_registers, add_local_register): New
37 methods.
38 (collection_list::add_memrange): Add scope parameter. Call
39 add_local_register instead of add_register.
40 (finalize_tracepoint_aexpr): New function.
41 (collection_list::collect_symbol): Update calls to add_memrange.
42 Call add_local_register instead of add_register. Call
43 add_ax_registers. Call finalize_tracepoint_aexpr.
44 (encode_actions_1): Get remote regnos for $reg action. Call
45 add_remote_register, add_ax_registers, and add_local_register.
46 Update call to add_memrange. Call finalize_tracepoint_aexpr.
47 (validate_actionline): Call finalize_tracepoint_aexpr.
48
3df3a985
PFC
492018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
50
51 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
52 Replace array buf with gdb::char_vector buf, of size
53 get_remote_packet_size (). Replace references to buf and
54 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
55 and xsnprintf with snprintf. Raise errors if the buffer is too
56 small.
57
aa6f3694
PFC
582018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
59
60 * remote.c (remote_target::download_tracepoint): Fix the has_more
61 predicate in the QTDP action list iteration.
62
05abfc39
PFC
632018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
64
65 * remote.c (remote_target::download_tracepoint): Fix indentation
66 in for block.
67
821a2682
RO
682018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
69
70 * proc-api.c (_initialize_proc_api): Remove c, unused.
71 * procfs.c (procfs_init_inferior): Remove signals, unused.
72 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
73 unused.
74
95347337
AB
752018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
76 Andrew Burgess <andrew.burgess@embecosm.com>
77
78 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
79 'W_STOPCODE (0)' as this could be ambiguous.
80
425699f5
SDJ
812018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
82
83 * ser-tcp.c (net_open): Fix thinko when deciding whether to
84 disable TCP's Nagle algorithm (use "ai_protocol" instead of
85 "ai_socktype").
86
3e1d3d8c
TT
872018-08-02 Tom Tromey <tom@tromey.com>
88
89 PR symtab/16842.
90 * dwarf2read.c (read_func_scope): Set symtab on template parameter
91 symbols.
92 (process_structure_scope): Likewise.
93
15843549
XR
942018-08-02 Xavier Roirand <roirand@adacore.com>
95
96 PR gdb/22629:
97 * darwin-nat.c (darwin_kill_inferior): Fix handling of
98 kill inferior.
99
b5bddbbb
TT
1002018-08-02 Tom Tromey <tom@tromey.com>
101
102 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
103 (darwin_suspend_inferior, darwin_resume_inferior)
104 (darwin_decode_notify_message, darwin_resume_inferior_threads)
105 (darwin_check_new_threads): Check result of get_darwin_inferior.
106
f61cfa07
JB
1072018-07-31 Joel Brobecker <brobecker@adacore.com>
108
109 GDB 8.1.1 released.
110
5abe0f0c
JV
1112018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
112
113 * varobj.c (varobj_get_path_expr_parent): Report an error if
114 parent is a dynamic varobj.
115
472fa5ee
SM
1162018-07-31 Simon Marchi <simon.marchi@ericsson.com>
117
118 * gnulib/aclocal.m4: Re-generate.
119 * gnulib/config.in: Re-generate.
120 * gnulib/configure: Re-generate.
121 * gnulib/import/Makefile.in: Re-generate.
122 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
123 * gnulib/import/m4/onceonly.m4: Re-generate.
124
1c28969e
SM
1252018-07-31 Simon Marchi <simon.marchi@ericsson.com>
126
127 * target-descriptions.c (struct xml_test_tdesc): New.
128 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
129 (record_xml_tdesc): Update.
130 (maintenance_check_xml_descriptions): Update.
131 * target-descriptions.h (record_xml_tdesc): Update comment.
132
c8f2dc0d
AB
1332018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
134
135 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
136 checking array bounds are defined.
137
463c08d1
TT
1382018-07-30 Tom Tromey <tom@tromey.com>
139
140 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
141 irreflexivity violation.
142
dba7455e
TT
1432018-07-30 Tom Tromey <tom@tromey.com>
144
145 * cli/cli-decode.c (lookup_cmd): Remove lint code.
146 * value.c (unpack_long): Remove lint code.
147 * valops.c (value_ind): Remove lint code.
148 * valarith.c (value_x_binop, value_x_unop, value_equal)
149 (value_pos): Remove lint code.
150
37cc0cae
TV
1512018-07-28 Tom de Vries <tdevries@suse.de>
152
153 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
154 with undefined upper bound as <optimized out>.
155
129eb0f1
SDJ
1562018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
157
158 * gcore.in: Rename variable "name" to "prefix". Expand
159 "usage" text.
160
6af79d7b
JT
1612018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
162
163 * windows-nat.c (windows_nat_target::create_inferior): Update to
164 call close() in global namespace.
165
79748972
TT
1662018-07-26 Tom Tromey <tom@tromey.com>
167
168 * dwarf-index-write.c (add_address_entry): Don't add objfile
169 offsets.
170 * dbxread.c (find_stab_function): Rename from
171 find_stab_function_addr. Return a bound_minimal_symbol.
172 (read_dbx_symtab): Use raw_text_low, raw_text_high.
173 Don't add objfile offsets.
174 (end_psymtab): Use raw_text_low, raw_text_high,
175 MSYMBOL_VALUE_RAW_ADDRESS.
176 (read_ofile_symtab): Update.
177 (process_one_symbol): Update.
178 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
179 offsets.
180 (dw2_relocate): Remove.
181 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
182 searching addrmap.
183 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
184 Update.
185 (process_psymtab_comp_unit_reader, add_partial_symbol)
186 (add_partial_subprogram, dwarf2_ranges_read): Update.
187 (load_partial_dies): Update.
188 (add_address_entry): Don't add objfile offsets.
189 (dwarf2_build_include_psymtabs): Update.
190 (create_addrmap_from_aranges): Don't add objfile offsets.
191 (dw2_find_pc_sect_compunit_symtab): Update.
192 * mdebugread.c (parse_symbol): Don't add objfile offsets.
193 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
194 Update.
195 (parse_partial_symbols): Don't add objfile offsets. Use
196 raw_text_low, raw_text_high. Update.
197 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
198 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
199 or call 'relocate' quick function. Clear psymbol_map.
200 * psympriv.h (struct partial_symbol) <address>: Add section
201 offset.
202 <set_unrelocated_address>: Rename from set_address.
203 <raw_text_low, raw_text_high>: New methods.
204 <text_low, text_high>: Add objfile parameter.
205 (add_psymbol_to_bcache): Add 'section' parameter. Call
206 set_unrelocated_address.
207 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
208 (find_pc_psymbol): Update.
209 (fixup_psymbol_section, relocate_psymtabs): Remove.
210 (dump_psymtab, psym_functions): Update.
211 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
212 parameter.
213 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
214 (start_psymtab_common): Update.
215 * symfile-debug.c (debug_qf_relocate): Remove.
216 (debug_sym_quick_functions): Update.
217 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
218 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
219 Update.
220
52948f01
TT
2212018-07-26 Tom Tromey <tromey@redhat.com>
222
223 * dbxread.c (end_psymtab): Use text_high_valid and
224 text_low_valid.
225 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
226 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
227 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
228 Update comment.
229 <text_low_valid, text_high_valid>: New fields.
230 <set_text_low, set_text_high>: Update.
231 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
232
4ae976d1
TT
2332018-07-26 Tom Tromey <tom@tromey.com>
234
235 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
236 Update.
237 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
238 textlow and texthigh fields.
239 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
240 Update.
241 * mdebugread.c (parse_lines, parse_partial_symbols)
242 (psymtab_to_symtab_1): Update.
243 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
244 Rename fields. Update comment. Now private.
245 <text_low, text_high, set_text_low, set_text_high>: New methods.
246 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
247 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
248 (start_psymtab_common, maintenance_info_psymtabs)
249 (maintenance_check_psymtabs): Update.
250 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
251 texthigh fields.
252 (scan_xcoff_symtab): Update.
253
02e9e7f7
TT
2542018-07-26 Tom Tromey <tromey@redhat.com>
255
256 * psympriv.h (struct partial_symbol) <unrelocated_address,
257 address, set_address>: New methods.
258 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
259 (fixup_psymbol_section, relocate_psymtabs): Update.
260 (print_partial_symbols): Add 'objfile' parameter. Update.
261 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
262 Update.
263
8a6d4234
TT
2642018-07-26 Tom Tromey <tom@tromey.com>
265
266 * dwarf-index-write.c (write_psymbols, debug_names::insert)
267 (debug_names::write_psymbols): Update.
268 * psympriv.h (struct partial_symbol): Derive from
269 general_symbol_info.
270 <obj_section>: New method.
271 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
272 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
273 (find_pc_sect_psymbol, fixup_psymbol_section)
274 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
275 (print_partial_symbols, recursively_search_psymtabs)
276 (compare_psymbols, psymbol_hash, psymbol_compare)
277 (add_psymbol_to_bcache, maintenance_check_psymtabs)
278 (psymbol_name_matches, psym_fill_psymbol_map): Update.
279
08994e1d
TT
2802018-07-26 Tom Tromey <tromey@redhat.com>
281
282 * dbxread.c (end_psymtab): Remove dead code.
283
3c3bb058
AB
2842018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
285
286 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
287 DWARF unwinders are disabled.
288 * dwarf2-frame.c: Add dwarf2read.h include.
289 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
290 disabled.
291 (dwarf2_frame_unwinders_enabled_p): Define.
292 (show_dwarf_unwinders_enabled_p): New function.
293 (_initialize_dwarf2_frame): Register switch to control DWARF
294 unwinder use.
295 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
296 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
297 (show_dwarf_cmdlist): Remove static keyword.
298 * dwarf2read.h (set_dwarf_cmdlist): Declare.
299 (show_dwarf_cmdlist): Declare.
300 * NEWS: Document new feature.
301
9e7f3bbb
TV
3022018-07-26 Tom de Vries <tdevries@suse.de>
303
304 PR breakpoints/23366
305 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
306
506f5c41
TV
3072018-07-26 Tom de Vries <tdevries@suse.de>
308
309 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
310 DW_AT_count can't be translated to a dynamic prop.
311
16f808ec
TV
3122018-07-25 Tom de Vries <tdevries@suse.de>
313
314 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
315 try/catch.
316
d7154a8d
JV
3172018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
318
319 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
320
a45389f6
JB
3212018-07-25 Joel Brobecker <brobecker@adacore.com>
322
323 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
324
380618d6
KS
3252018-07-24 Keith Seitz <keiths@redhat.comt
326
327 PR symtab/23010
328 * dwarf2read.c (dw2_add_symbol_to_list): New function.
329 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
330 instead of add_symbol_to_list.
331 (read_file_scope): Call prepare_one_comp_unit before reading
332 any other DIEs.
333
4b17aefe
SM
3342018-07-24 Simon Marchi <simon.marchi@ericsson.com>
335
336 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
337
29d17e47
TT
3382018-07-24 Tom Tromey <tom@tromey.com>
339
340 * utils.c (malloc, realloc, free): Don't declare.
341 * configure, config.in: Rebuild.
342 * configure.ac: Don't check for declarations of free, malloc, or
343 realloc.
344
cf4088a9
SM
3452018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
346
347 * aarch64-linux-nat.c
348 (aarch64_linux_nat_target::stopped_data_address): Remove unused
349 variable.
350 * arm-linux-nat.c (fetch_regs): Likewise.
351 (store_regs): Likewise.
352 (fetch_vfp_regs): Likewise.
353 (store_vfp_regs): Likewise.
354 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
355 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
356 (arm_linux_nat_target::insert_watchpoint): Likewise.
357 (arm_linux_nat_target::remove_watchpoint): Likewise.
358 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
359 Likewise.
360 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
361 Likewise.
362 * ppc-linux-nat.c (fetch_register): Likewise.
363 (fetch_all_gp_regs): Likewise.
364 (fetch_ppc_registers): Likewise.
365 (store_all_gp_regs): Likewise.
366 (store_ppc_registers): Likewise.
367 (hwdebug_insert_point): Likewise.
368 (can_use_watchpoint_cond_accel): Likewise.
369 * remote-sim.c (gdb_os_write_stdout): Likewise.
370
a0de763e
TT
3712018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
372 Tom Tromey <tom@tromey.com>
373
374 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
375 test for it.
376 * configure: Rebuild.
377
3b20124b
TT
3782018-07-22 Tom Tromey <tom@tromey.com>
379
380 * regformats/regdat.sh: Define xmltarget_${name} inside
381 #ifndef IN_PROCESS_AGENT.
382
8c8807f4
TT
3832018-07-22 Tom Tromey <tom@tromey.com>
384
385 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
386
c486b610
TT
3872018-07-22 Tom Tromey <tom@tromey.com>
388
389 * symfile.c (reread_symbols): Notify iter, not objfile.
390
494f80a9
TT
3912018-07-22 Tom Tromey <tom@tromey.com>
392
393 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
394 Use arch_ops.
395 (ravenscar_thread_target::prepare_to_store): Likewise.
396
c51f6a54
TT
3972018-07-22 Tom Tromey <tom@tromey.com>
398
399 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
400 unused variable. Call value_fetch_lazy when needed.
401 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
402 Remove unused variable. Call value_fetch_lazy when needed.
403
374fd1fd
TT
4042018-07-22 Tom Tromey <tom@tromey.com>
405
406 * m32c-tdep.c (mark_dma): Return void.
407 (make_regs): Remove unused declarations.
408
d5e9a511
TT
4092018-07-22 Tom Tromey <tom@tromey.com>
410
411 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
412 cmdscm_get_valid_command_smob_arg_unsafe for effect.
413 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
414 bkscm_get_valid_block_smob_arg_unsafe for effect.
415
996d693a
TT
4162018-07-22 Tom Tromey <tom@tromey.com>
417
418 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
419 value_type.
420
15766370
TT
4212018-07-22 Tom Tromey <tom@tromey.com>
422
423 * windows-nat.c (saved_context): Conditionally define.
424 * remote.c (remote_target::remote_btrace_maybe_reopen):
425 Conditionally declare "warned".
426 * inflow.c (sigquit_ours): Conditionally define.
427 (new_tty): Move "tty" declaration inside #if.
428 * guile/guile.c (guile_datadir): Conditionally define.
429 * charset.c (set_be_le_names): Move some declarations inside #if.
430 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
431 #if.
432 (parse_xml_btrace_conf): Likewise.
433
f4e80e13
TT
4342018-07-22 Tom Tromey <tom@tromey.com>
435
436 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
437
8d49165d
TT
4382018-07-22 Tom Tromey <tom@tromey.com>
439
440 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
441 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
442 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
443 * buildsym-legacy.c (get_macro_table): Remove unused variable.
444 * stack.c (frame_apply_level_command): Remove unused variable.
445 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
446 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
447 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
448 unused variable.
449 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
450 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
451 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
452 variable.
453 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
454 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
455 variable.
456 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
457 Remove unused variable.
458 * cli/cli-script.c (recurse_read_control_structure): Remove unused
459 variable.
460 * common/tdesc.c (print_xml_feature::visit): Remove unused
461 variable.
462 * compile/compile-object-load.c (store_regs): Remove unused
463 variables.
464 * complaints.c (clear_complaints): Remove unused variable.
465 * corelow.c (core_target_open): Remove unused variable.
466 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
467 variable.
468 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
469 variable.
470 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
471 variable.
472 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
473 variable.
474 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
475 variable.
476 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
477 variable.
478 * ia64-tdep.c (examine_prologue): Remove unused variable.
479 * infcall.c (run_inferior_call): Remove unused variable.
480 * inferior.c (exit_inferior): Remove unused variable.
481 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
482 * linespec.c (decode_line_2): Remove unused variable.
483 * linux-nat.c (super_close): Remove.
484 * linux-tdep.c (linux_info_proc): Remove unused variable.
485 * mi/mi-main.c (mi_execute_command): Remove unused variable.
486 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
487 Remove unused variable.
488 * parse.c (find_minsym_type_and_address): Remove unused variable.
489 * printcmd.c (info_symbol_command, printf_floating): Remove unused
490 variable.
491 * python/py-breakpoint.c (bppy_set_commands): Remove unused
492 variable.
493 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
494 variables.
495 * record-btrace.c (record_btrace_target::store_registers): Remove
496 unused variable.
497 (cmd_show_record_btrace_cpu): Remove unused variable.
498 * riscv-tdep.c (riscv_register_reggroup_p)
499 (riscv_push_dummy_call, riscv_return_value): Remove unused
500 variable.
501 * rust-exp.y (literal): Remove unused variable.
502 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
503 unused variable.
504 <STRUCTOP_ANONYMOUS>: Likewise.
505 * s390-linux-tdep.c (s390_linux_init_abi_31)
506 (s390_linux_init_abi_64): Remove unused variable.
507 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
508 (file_select_thread, net_windows_open, _initialize_ser_windows):
509 Remove unused variables.
510 * symtab.c (find_pc_sect_line): Remove unused variable.
511 * target-memory.c (compute_garbled_blocks): Remove unused
512 variable.
513 (target_write_memory_blocks): Remove unused variable.
514 * target.c (target_stack::unpush): Remove unused variables.
515 * tracepoint.c (start_tracing, all_tracepoint_actions)
516 (merge_uploaded_trace_state_variables)
517 (print_one_static_tracepoint_marker): Remove unused variable.
518 * unittests/basic_string_view/element_access/char/1.cc (test01):
519 Remove unused variable.
520 * windows-nat.c (windows_continue, windows_add_all_dlls)
521 (do_initial_windows_stuff, windows_nat_target::create_inferior):
522 Remove unused variables.
523
17cbafdb
SM
5242018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
525
526 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
527 attr_profile in HAVE_ELF.
528 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
529 HAVE_ELF.
530
0ee6c332
SM
5312018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
532
533 * frame.c (frame_register_unwind): Change parameter name.
534 (frame_unwind_register): Likewise.
535 (frame_unwind_register_value): Likewise.
536 (frame_unwind_register_signed): Likewise.
537 (frame_unwind_register_unsigned): Likewise.
538 * frame.h (frame_register_unwind): Likewise.
539 (frame_unwind_register): Likewise.
540 (frame_unwind_register_value): Likewise.
541 (frame_unwind_register_signed): Likewise.
542 (frame_unwind_register_unsigned): Likewise.
543 (frame_unwind_arch): Likewise.
544
e2e31f10
MR
5452018-07-20 Maciej W. Rozycki <macro@mips.com>
546
547 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
548 ISA maintenance.
549
2d389915
MR
5502018-07-20 Maciej W. Rozycki <macro@mips.com>
551
552 * mips-linux-nat.c (mips_linux_nat_target::read_description):
553 Call `get_ptrace_pid' rather than extracting the ptrace PID by
554 hand.
555
cbb09508
KS
5562018-07-20 Keith Seitz <keiths@redhat.com>
557
558 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
559 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
560 m_compunit_symtab, m_language>: Add "m_" prefix.
561 Update all uses.
562 * buildsym.c: Update all uses.
563
bfe2e011
TT
5642018-07-20 Tom Tromey <tom@tromey.com>
565
566 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
567 * buildsym.h (record_line_ftype): Remove typedef.
568
0e6f3061
TT
5692018-07-20 Tom Tromey <tom@tromey.com>
570
571 * buildsym-legacy.h (augment_type_symtab): Don't declare.
572 (end_expandable_symtab): Likewise.
573 (end_symtab_get_static_block): Likewise.
574 (end_symtab_from_static_block): Likewise.
575 * buildsym-legacy.c (augment_type_symtab): Remove.
576 (end_expandable_symtab): Remove.
577 (end_symtab_get_static_block): Remove.
578 (end_symtab_from_static_block): Remove.
579
804d2729
TT
5802018-07-20 Tom Tromey <tom@tromey.com>
581
582 * dwarf2read.c: Include buildsym.h.
583 (struct dwarf2_cu) <builder>: New method.
584 (fixup_go_packaging): Update.
585 (process_full_comp_unit, process_full_type_unit): Update. Don't
586 use scoped_free_pendings.
587 (using_directives): Add "cu" parameter, remove "language".
588 (read_import_statement, setup_type_unit_groups, )
589 (read_func_scope, read_lexical_block_scope)
590 (dwarf2_record_block_ranges, read_namespace): Update.
591 (lnp_state_machine::lnp_state_machine): Add cu parameter.
592 (lnp_state_machine::handle_end_sequence): Update.
593 (class lnp_state_machine) <m_cu>: New member.
594 <m_record_line_callback>: Remove.
595 <m_currently_recording_lines>: New member.
596 (lnp_state_machine::handle_set_file): Update.
597 (noop_record_line): Remove.
598 (dwarf_record_line_p): Add cu parameter.
599 (dwarf_record_line_1, dwarf_finish_line): Likewise.
600 (lnp_state_machine::record_line)
601 (lnp_state_machine::lnp_state_machine)
602 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
603 (dwarf_decode_lines): Update.
604 (dwarf2_start_subfile): Add cu parameter.
605 (dwarf2_start_symtab, new_symbol): Update.
606 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
607 Remove dwarf2_per_objfile parameter.
608 (dwarf_decode_macros): Update.
609
80e649fc
TT
6102018-07-20 Tom Tromey <tom@tromey.com>
611
612 * stabsread.c (define_symbol): Update.
613 * buildsym-legacy.h (get_buildsym_compunit): Declare.
614 * dwarf2read.c (new_symbol): Update.
615 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
616 * cp-namespace.c: Include buildsym.h.
617 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
618 * buildsym-legacy.c (get_buildsym_compunit): New function.
619
0baae8db
TT
6202018-07-20 Tom Tromey <tom@tromey.com>
621
622 * xcoffread.c: Include buildsym-legacy.h.
623 * windows-nat.c: Include buildsym-legacy.h.
624 * stabsread.c: Include buildsym-legacy.h.
625 * mdebugread.c: Include buildsym-legacy.h.
626 * buildsym-legacy.h: New file.
627 * buildsym-legacy.c: New file, from buildsym.c.
628 * go32-nat.c: Include buildsym-legacy.h.
629 * dwarf2read.c: Include buildsym-legacy.h.
630 * dbxread.c: Include buildsym-legacy.h.
631 * cp-namespace.c: Include buildsym-legacy.h.
632 * coffread.c: Include buildsym-legacy.h.
633 * buildsym.h: Move some contents to buildsym-legacy.h.
634 * buildsym.c: Include buildsym-legacy.h. Move many functions to
635 buildsym-legacy.c.
636 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
637
ab209f6f
TT
6382018-07-20 Tom Tromey <tom@tromey.com>
639
640 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
641 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
642 (buildsym_compunit::buildsym_compunit)
643 (buildsym_compunit::~buildsym_compunit)
644 (buildsym_compunit::get_macro_table): Define.
645
74c72eac
TT
6462018-07-20 Tom Tromey <tom@tromey.com>
647
648 * buildsym.c (reset_symtab_globals): Remove.
649 (buildsym_compunit::end_symtab_from_static_block): Update.
650 (buildsym_compunit::augment_type_symtab): Update.
651 (end_symtab_from_static_block): Call free_buildsym_compunit.
652 (augment_type_symtab, end_symtab, end_expandable_symtab):
653 Likewise.
654
da6580e5
TT
6552018-07-20 Tom Tromey <tom@tromey.com>
656
657 * arch-utils.c: Do not include buildsym.h.
658 * mipsread.c: Do not include buildsym.h.
659 * machoread.c: Do not include buildsym.h.
660 * elfread.c: Do not include buildsym.h.
661
4a2125f5
TT
6622018-07-20 Tom Tromey <tom@tromey.com>
663
664 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
665 initialization.
666 (buildsym_compunit): Add new constructor.
667 (struct buildsym_compunit) <get_last_source_file, finish_block,
668 record_block_range, start_subfile, patch_subfile_names,
669 push_subfile, pop_subfile, record_line, get_compunit_symtab,
670 set_last_source_start_addr, get_last_source_start_addr,
671 get_local_using_directives, set_local_using_directives,
672 get_global_using_directives, outermost_context_p,
673 get_current_context_stack, get_context_stack_depth,
674 get_current_subfile, get_local_symbols, get_file_symbols,
675 get_global_symbols, record_debugformat, record_producer,
676 push_context, pop_context, end_symtab_get_static_block,
677 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
678 New public methods.
679 <record_pending_block, finish_block_internal, make_blockvector,
680 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
681 private methods.
682 Update all users.
683
6842018-05-22 Tom Tromey <tom@tromey.com>
685
686 * buildsym.c (record_pending_block): Move earlier. Remove objfile
687 parameter.
688 (finish_block_internal): Update.
689
6b213a47
TT
6902018-07-20 Tom Tromey <tom@tromey.com>
691
692 * buildsym.c (record_pending_block): Move earlier. Remove objfile
693 parameter.
694 (finish_block_internal): Update.
695
b80a981d
TT
6962018-07-20 Tom Tromey <tom@tromey.com>
697
698 * buildsym.h (EXTERN): Don't define or undef.
699 * buildsym.c (EXTERN): Don't define.
700
ddb70602
TT
7012018-07-20 Tom Tromey <tom@tromey.com>
702
703 * buildsym.c: Remove TODO comment.
704
b37dd3bc
TT
7052018-07-20 Tom Tromey <tom@tromey.com>
706
707 * coffread.c (coff_symtab_read): Update.
708 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
709 (xcoff_new_init): Update.
710 * mipsread.c (mipscoff_new_init): Update.
711 * mdebugread.c (mdebug_build_psymtabs): Update.
712 * elfread.c (elf_new_init): Update.
713 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
714 Update.
715 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
716 (coffstab_build_psymtabs, elfstab_build_psymtabs)
717 (stabsect_build_psymtabs): Update.
718 * buildsym.h (buildsym_init): Don't declare.
719 * buildsym.c: Update comment.
720 (prepare_for_building): Remove.
721 (start_symtab, restart_symtab): Update.
722 (reset_symtab_globals): Update comment.
723 (buildsym_init): Remove.
724
e148f09d
TT
7252018-07-20 Tom Tromey <tom@tromey.com>
726
727 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
728 * stabsread.c (patch_block_stabs, define_symbol, read_type)
729 (read_enum_type, common_block_start, common_block_end)
730 (cleanup_undefined_types_1, finish_global_stabs): Update.
731 * mdebugread.c (psymtab_to_symtab_1): Update.
732 * dwarf2read.c (fixup_go_packaging, read_func_scope)
733 (read_lexical_block_scope, new_symbol): Update.
734 * dbxread.c (process_one_symbol): Update.
735 * coffread.c (coff_symtab_read, process_coff_symbol)
736 (coff_read_enum_type): Update.
737 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
738 declare.
739 (get_local_symbols, get_file_symbols, get_global_symbols): New
740 functions.
741 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
742 m_global_symbols.
743 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
744 (~scoped_free_pendings): Update.
745 (finish_block, prepare_for_building, reset_symtab_globals)
746 (end_symtab_get_static_block, end_symtab_with_blockvector)
747 (augment_type_symtab, push_context): Update.
748 (get_local_symbols, get_file_symbols, get_global_symbols): New
749 functions.
750 (buildsym_init): Update.
751
93b8bea4
TT
7522018-07-20 Tom Tromey <tom@tromey.com>
753
754 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
755 (process_full_type_unit): Likewise.
756 (dwarf2_start_symtab): Set list_in_scope.
757
f62f6af5
TT
7582018-07-20 Tom Tromey <tom@tromey.com>
759
760 * dwarf2read.c (process_psymtab_comp_unit_reader)
761 (build_type_psymtabs_reader): Do not set list_in_scope.
762
1d376700
TT
7632018-07-20 Tom Tromey <tom@tromey.com>
764
765 * buildsym.c (free_pendings): Remove.
766 (add_symbol_to_list, scoped_free_pendings)
767 (finish_block_internal, buildsym_init): Update.
768
c233e9c6
TT
7692018-07-20 Tom Tromey <tom@tromey.com>
770
771 * xcoffread.c (read_xcoff_symtab): Update.
772 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
773 Update.
774 * dbxread.c (process_one_symbol): Update.
775 * coffread.c (coff_symtab_read): Update.
776 * buildsym.h (finish_block): Update.
777 * buildsym.c (finish_block): Remove "listhead" argument.
778 (end_symtab_get_static_block): Update.
779
5ac04550
TT
7802018-07-20 Tom Tromey <tom@tromey.com>
781
782 * buildsym.h (class scoped_free_pendings): Remove constructor.
783 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
784 method.
785 <m_pending_block_obstack, m_pending_blocks>: New members.
786 (pending_block_obstack, pending_blocks): Remove.
787 (scoped_free_pendings::scoped_free_pendings): Default.
788 (~scoped_free_pendings): Update.
789 (free_pending_blocks): Remove.
790 (finish_block_internal, record_pending_block, make_blockvector)
791 (end_symtab_get_static_block, augment_type_symtab, push_context)
792 (buildsym_init): Update.
793
7ea05a7b
TT
7942018-07-20 Tom Tromey <tom@tromey.com>
795
796 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
797 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
798 members.
799 (pending_addrmap, pending_addrmap_obstack)
800 (pending_addrmap_interesting): Remove.
801 (scoped_free_pendings, record_block_range, make_blockvector)
802 (prepare_for_building, reset_symtab_globals, buildsym_init):
803 Update.
804
3c65e5b3
TT
8052018-07-20 Tom Tromey <tom@tromey.com>
806
807 * xcoffread.c (process_linenos): Update.
808 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
809 * mdebugread.c (psymtab_to_symtab_1): Update.
810 * dwarf2read.c (setup_type_unit_groups)
811 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
812 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
813 * dbxread.c (process_one_symbol): Update.
814 * coffread.c (coff_symtab_read, enter_linenos)
815 (process_coff_symbol): Update.
816 * buildsym.h (current_subfile): Don't declare.
817 (get_current_subfile): Declare.
818 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
819 member.
820 (start_subfile, free_buildsym_compunit, push_subfile)
821 (prepare_for_building, start_symtab): Update.
822 (get_current_subfile): New function.
823
a60f3166
TT
8242018-07-20 Tom Tromey <tom@tromey.com>
825
826 * coffread.c (coff_symtab_read): Update.
827 * xcoffread.c (read_xcoff_symtab): Update.
828 * dwarf2read.c (new_symbol): Update.
829 (read_func_scope, read_lexical_block_scope): Update.
830 * dbxread.c (process_one_symbol): Update.
831 * buildsym.h (context_stack, context_stack_depth): Don't declare.
832 (outermost_context_p): Remove macro.
833 (outermost_context_p, get_current_context_stack)
834 (get_context_stack_depth): Declare.
835 (pop_context): Return struct context_stack.
836 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
837 member.
838 (context_stack_size): Remove.
839 (INITIAL_CONTEXT_STACK_SIZE): Remove.
840 (prepare_for_building, end_symtab_get_static_block)
841 (augment_type_symtab, push_context): Update.
842 (pop_context): Return struct context_stack.
843 (outermost_context_p, get_current_context_stack)
844 (get_context_stack_depth): New functions.
845 (buildsym_init): Update.
846
56ba65a0
TT
8472018-07-20 Tom Tromey <tom@tromey.com>
848
849 * rust-exp.y: Now a pure parser. Update all rules.
850 (%union): Move earlier.
851 (current_parser, work_obstack): Remove globals.
852 (rust_parser, ~rust_parser): Update.
853 (class rust_parser) <copy_name, concat3, crate_name, super_name,
854 lex_character, lex_number, lex_string, lex_identifier,
855 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
856 convert_name, convert_params_to_expression,
857 convert_ast_to_expression, ast_basic_type, ast_operation,
858 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
859 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
860 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
861 ast_array_type, ast_slice_type, ast_reference_type,
862 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
863 (rust_parse): Update.
864 (rustyyerror, rustyylex): Add parser parameter.
865 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
866 (rust_lex_stringish_test, rust_lex_test_sequence)
867 (rust_lex_test_trailing_dot, rust_lex_test_completion)
868 (rust_lex_test_push_back, rust_lex_tests): Update.
869
4c693332
PA
8702018-07-19 Pedro Alves <palves@redhat.com>
871
872 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
873 gdb::unique_xmalloc_ptr.
874 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
875 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
876 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
877 copy-initialization.
878 * guile/scm-pretty-print.c (ppscm_print_children): Use
879 gdb::unique_xmalloc_ptr instead of cleanups.
880 (gdbscm_apply_val_pretty_printer): Remove cleanups.
881 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
882 gdb::unique_xmalloc_ptr.
883 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
884 Adjust to use gdb::unique_xmalloc_ptr.
885 * guile/scm-utils.c (extract_arg): Adjust.
886 * guile/scm-value.c (gdbscm_value_field): Adjust to use
887 gdb::unique_xmalloc_ptr instead of a cleanup.
888
4581dc82
TT
8892018-07-19 Tom Tromey <tom@tromey.com>
890
891 * utils.c (do_value_free_to_mark)
892 (make_cleanup_value_free_to_mark): Remove.
893 * utils.h (make_cleanup_value_free_to_mark): Remove.
894
43cc6c3a
PA
8952018-07-19 Pedro Alves <palves@redhat.com>
896
897 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
898 forwarding reference.
899
3a5f2a48
PA
9002018-07-18 Pedro Alves <palves@redhat.com>
901
902 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
903 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
904 cleanup.
905
557e56be
PA
9062018-07-18 Pedro Alves <palves@redhat.com>
907
908 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
909 exceptions.
910 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
911 (gdbscm_wrap): New.
912 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
913 directly instead of a cleanup.
914 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
915 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
916 (vlscm_binop_gdbthrow): New, factored out from ...
917 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
918 (vlscm_rich_compare): Use gdbscm_wrap.
919 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
920 instead of a cleanup.
921 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
922 cleanup.
923 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
924 Use xfree directly instead of a cleanup.
925 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
926 Adjust to use gdbscm_wrap and scoped_value_mark.
927 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
928 (gdbscm_value_address, gdbscm_value_dereference)
929 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
930 scoped_value_mark.
931 (gdbscm_value_dynamic_type): Use scoped_value_mark.
932 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
933 scoped_value_mark.
934 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
935 gdbscm_wrap and scoped_value_mark.
936 (gdbscm_value_to_string): Use xfree directly instead of a
937 cleanup. Move 'buffer' unique_ptr to TRY scope.
938 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
939 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
940 scoped_value_mark.
941 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
942 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
943 scoped_value_mark.
944 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
945 gdbscm_wrap.
946
42dc7699
TV
9472018-07-18 Tom de Vries <tdevries@suse.de>
948
949 * findvar.c (default_read_var_value): Also resolve dynamic type for
950 LOC_OPTIMIZED_OUT vars.
951
6592ceed
MR
9522018-07-18 Maciej W. Rozycki <macro@mips.com>
953
954 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
955 decoding.
956
c6c6149a
TT
9572018-07-17 Tom Tromey <tom@tromey.com>
958
959 * guile/scm-param.c (pascm_set_func, pascm_show_func)
960 (compute_enum_list, pascm_set_param_value_x)
961 (gdbscm_parameter_value): Update.
962 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
963 (gdbscm_scm_to_host_string): Update.
964 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
965 Update.
966 * guile/scm-cmd.c (cmdscm_add_completion): Update.
967 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
968 * guile/scm-string.c (gdbscm_scm_to_string): Return
969 unique_xmalloc_ptr.
970 (gdbscm_scm_to_host_string): Likewise.
971
a1a31cb8
TT
9722018-07-17 Tom Tromey <tom@tromey.com>
973
974 * guile/guile.c (gdbscm_eval_from_control_command): Update.
975 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
976 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
977 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
978 unique_xmalloc_ptr.
979
15bf3002
TT
9802018-07-17 Tom Tromey <tom@tromey.com>
981
982 * guile/scm-param.c (pascm_signal_setshow_error): Update.
983 * guile/guile-internal.h (gdbscm_exception_message_to_string):
984 Update.
985 * guile/scm-cmd.c (cmdscm_function): Update.
986 * guile/scm-pretty-print.c
987 (ppscm_print_exception_unless_memory_error): Update.
988 * guile/scm-exception.c (gdbscm_exception_message_to_string):
989 Return unique_xmalloc_ptr.
990
7eb1a66c
TT
9912018-07-17 Tom Tromey <tom@tromey.com>
992
993 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
994 Use string_printf.
995
ce73f310
JW
9962018-07-17 Jim Wilson <jimw@sifive.com>
997
27724bad
JW
998 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
999 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1000 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1001 unecessary braces after EF_RISCV_RVC test. Delete call to
1002 set_gdbarch_decr_pc_after_break.
1003
ce73f310
JW
1004 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1005 RISCV_LAST_FP_REGNUM + 1.
1006 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1007
056dec39
TT
10082018-07-17 Tom Tromey <tom@tromey.com>
1009
1010 * configure.ac: Remove --disable-gdbcli.
1011 * configure: Rebuild.
1012 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1013 (SUBDIR_CLI_CFLAGS): Remove.
1014 (SFILES): Use SUBDIR_CLI_SRCS.
1015 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1016
4735f0ed
TT
10172018-07-17 Tom Tromey <tom@tromey.com>
1018
1019 PR gdb/18624:
1020 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1021
117a0e99
JW
10222018-07-16 Jim Wilson <jimw@sifive.com>
1023
1024 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1025
8a67aaa8
SM
10262018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1027
1028 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1029 variable.
1030 (libunwind_frame_sniffer): Likewise.
1031 (libunwind_frame_prev_register): Likewise.
1032 (libunwind_sigtramp_frame_sniffer): Likewise.
1033 * ia64-tdep.c (ia64_access_reg): Likewise.
1034 (ia64_access_rse_reg): Likewise.
1035 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1036 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1037
ec74dcd8
SM
10382018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1039
1040 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1041
a700e753
SM
10422018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1043
1044 * remote-sim.c (gdbsim_target::close,
1045 gdbsim_target::mourn_inferior): Remove unused variables.
1046
8b411ff8
SM
10472018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1048
1049 * ia64-tdep.c (ktab_buf): New global.
1050 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1051 (get_kernel_table): Adjust.
1052
edb0470b
TT
10532018-07-16 Tom Tromey <tom@tromey.com>
1054
1055 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1056 * dwarf2read.c (using_directives, new_symbol): Use
1057 outermost_context_p.
1058 * dbxread.c (process_one_symbol): Use outermost_context_p.
1059 * coffread.c (coff_symtab_read): Use outermost_context_p.
1060
6cccc9a8
TT
10612018-07-16 Tom Tromey <tom@tromey.com>
1062
1063 * dwarf2read.c (using_directives, read_func_scope)
1064 (read_lexical_block_scope): Update.
1065 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1066 * buildsym.h (local_using_directives, global_using_directives):
1067 Don't declare.
1068 (get_local_using_directives, set_local_using_directives)
1069 (get_global_using_directives): Declare.
1070 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1071 m_global_using_directives>: New members.
1072 (finish_block_internal, prepare_for_building)
1073 (reset_symtab_globals, end_symtab_get_static_block)
1074 (push_context): Update.
1075 (get_local_using_directives, set_local_using_directives)
1076 (get_global_using_directives): New functions.
1077 (buildsym_init): Update.
1078
652788a7
TT
10792018-07-16 Tom Tromey <tom@tromey.com>
1080
1081 * xcoffread.c (xcoff_initial_scan): Don't call
1082 free_pending_blocks.
1083 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1084 * buildsym.h (class scoped_free_pendings): Add constructor.
1085 (free_pending_blocks): Don't declare.
1086 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1087 (free_pending_blocks): Now static.
1088
8419ee53
TT
10892018-07-16 Tom Tromey <tom@tromey.com>
1090
1091 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1092 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1093 member.
1094 (struct subfile_stack): Remove.
1095 (subfile_stack): Remove.
1096 (push_subfile, pop_subfile, buildsym_init): Update.
1097
ccdac490
TT
10982018-07-16 Tom Tromey <tom@tromey.com>
1099
1100 * buildsym.c (push_subfile): Use gdb_assert.
1101 (pop_subfile): Use gdb_assert.
1102
43130d6f
TT
11032018-07-16 Tom Tromey <tom@tromey.com>
1104
1105 * buildsym.h (merge_symbol_lists): Remove.
1106 * buildsym.c (merge_symbol_lists): Remove.
1107
77d6f1aa
TT
11082018-07-16 Tom Tromey <tom@tromey.com>
1109
1110 * stabsread.c (scan_file_globals): Update comment.
1111 * stabsread.h (scan_file_globals): Move from buildsym.h.
1112 * buildsym.h (scan_file_globals): Move to stabsread.h.
1113
2c722d18
TT
11142018-07-16 Tom Tromey <tom@tromey.com>
1115
1116 * xcoffread.c (xcoff_new_init): Update.
1117 * mipsread.c (mipscoff_new_init): Update.
1118 * mdebugread.c (mdebug_build_psymtabs): Update.
1119 * elfread.c (elf_new_init): Update.
1120 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1121 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1122 * buildsym.h (buildsym_new_init): Don't declare.
1123 * buildsym.c (buildsym_new_init): Remove.
1124
5985ac61
TT
11252018-07-16 Tom Tromey <tom@tromey.com>
1126
1127 * stabsread.h (within_function): Move from buildsym.h.
1128 * stabsread.c (start_stabs): Clear within_function.
1129 * coffread.c (coff_start_symtab): Clear within_function.
1130 * buildsym.h (within_function): Move to stabsread.h.
1131 * buildsym.c (prepare_for_building): Update.
1132
6b84eeb2
TT
11332018-07-16 Tom Tromey <tom@tromey.com>
1134
1135 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1136 * dwarf2read.c (dwarf2_start_symtab): Don't set
1137 processing_gcc_compilation.
1138 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1139
2150c3ef
TT
11402018-07-16 Tom Tromey <tom@tromey.com>
1141
1142 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1143 (next_symbol_text_func): Move from buildsym.h.
1144 * stabsread.c (hashname): Move from buildsym.c.
1145 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1146 (next_symbol_text_func, hashname): Move to stabsread.h.
1147 * buildsym.c: Don't include bcache.h
1148 (hashname): Move to stasbread.c.
1149
0ec44fc0
TT
11502018-07-16 Tom Tromey <tom@tromey.com>
1151
1152 * buildsym.h (context_stack_size): Don't declare.
1153 * buildsym.c (context_stack_size): New global.
1154
81cc346d
TT
11552018-07-16 Tom Tromey <tom@tromey.com>
1156
1157 * dbxread.c (processing_acc_compilation): New global.
1158 * buildsym.h (processing_acc_compilation): Don't declare.
1159
2c99ee5c
TT
11602018-07-16 Tom Tromey <tom@tromey.com>
1161
1162 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1163 * dbxread.c (read_ofile_symtab): Update.
1164 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1165 * buildsym.h (last_source_start_addr): Remove.
1166 (set_last_source_start_addr, get_last_source_start_addr):
1167 Declare.
1168 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1169 parameter.
1170 (struct buildsym_compunit) <m_last_source_start_addr>: New
1171 member.
1172 (prepare_for_building): Remove start_addr parameter.
1173 (start_symtab, restart_symtab, end_symtab_get_static_block)
1174 (end_symtab_with_blockvector): Update.
1175 (set_last_source_start_addr, get_last_source_start_addr): New
1176 functions.
1177
530fedbc
TT
11782018-07-16 Tom Tromey <tom@tromey.com>
1179
1180 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1181 member.
1182 (have_line_numbers): Remove.
1183 (record_line, prepare_for_building, end_symtab_get_static_block)
1184 (augment_type_symtab): Update.
1185
6a976300
TT
11862018-07-16 Tom Tromey <tom@tromey.com>
1187
1188 * buildsym.c (~buildsym_compunit): Free the macro table.
1189 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1190 methods.
1191 <m_pending_macros>: New member.
1192 (pending_macros): Remove.
1193 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1194 (reset_symtab_globals, end_symtab_get_static_block)
1195 (end_symtab_with_blockvector, augment_type_symtab)
1196 (buildsym_init): Update.
1197
c0015d44
TT
11982018-07-16 Tom Tromey <tom@tromey.com>
1199
1200 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1201 parameter.
1202 (buildsym_compunit::set_last_source_file): New method.
1203 <m_last_source_file>: New member.
1204 (prepare_for_building): Remove "name" parameter.
1205 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1206 (last_source_file): Remove.
1207 (set_last_source_file, get_last_source_file): Update.
1208
e62cca7c
TT
12092018-07-16 Tom Tromey <tom@tromey.com>
1210
1211 * buildsym.c (prepare_for_building): Add assert.
1212
905eb0e2
TT
12132018-07-16 Tom Tromey <tom@tromey.com>
1214
1215 * buildsym.c (~buildsym_compunit): Update.
1216 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1217 (start_subfile, patch_subfile_names)
1218 (end_symtab_with_blockvector): Update.
1219
b248663f
TT
12202018-07-16 Tom Tromey <tom@tromey.com>
1221
1222 * buildsym.c (struct buildsym_compunit): Add constructor,
1223 destructor, initializers.
1224 (start_buildsym_compunit): Remove.
1225 (free_buildsym_compunit): Use "delete".
1226 (start_symtab, restart_symtab): Use "new".
1227
ff27d073
SM
12282018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1229
1230 * symfile.c (set_objfile_default_section_offset): Remove struct
1231 keyword.
1232
6a15ecf5
SH
12332018-07-14 Stafford Horne <shorne@gmail.com>
1234
1235 * (Responsible Maintainers): Add myself as or1k maintainer.
1236
027a4c30
TT
12372018-07-13 Tom Tromey <tom@tromey.com>
1238
1239 * symfile.c (set_objfile_default_section_offset): Use extra braces
1240 around initializer.
1241
5c1eda30
AA
12422018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1243
1244 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1245 non-branching basr.
1246
bc7b042b
PW
12472018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1248
1249 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1250 unittests/cli-utils-selftests.c
1251 * unittests/cli-utils-selftests.c: New file.
1252
a14c4daa
PW
12532018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1254
1255 * NEWS: Mention new commands. Mention change to 'thread apply'.
1256
1fe75df7
PW
12572018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1258
1259 * thread.c (thr_try_catch_cmd): New function.
1260 (thread_apply_all_command): Handle qcs flags.
1261 (thread_apply_command): Handle qcs flags.
1262 (taas_command): New function.
1263 (tfaas_command): New function.
1264 (_initialize_thread): Update to setup the new commands 'taas
1265 and 'tfaas'. Change doc string for 'thread apply'.
1266
6a70eb7d
PW
12672018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1268
1269 * stack.c: (trailing_outermost_frame): New function, mostly
1270 extracted from backtrace_command_1.
1271 (leading_innermost_frame): New function.
1272 (backtrace_command_1): Update to call trailing_outermost_frame.
1273 (frame_apply_command_count): New function.
1274 (frame_apply_level_command): New function.
1275 (frame_apply_all_command): New function.
1276 (frame_apply_command): New function.
1277 (faas_command): New function.
1278 (frame_cmd_list): New variable.
1279 (_initialize_stack): Update to setup the new commands 'frame apply'
1280 and 'faas'.
1281
529c08b2
PW
12822018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1283
1284 * cli-utils.c (number_or_range_parser::get_number): Only handle
1285 numbers or convenience var as numbers.
1286 (parse_flags): New function.
1287 (parse_flags_qcs): New function.
1288 (number_or_range_parser::finished): Ensure parsing end is detected
1289 before end of string.
1290 * cli-utils.h (parse_flags): New function.
1291 (parse_flags_qcs): New function.
1292 (number_or_range_parser): Remove m_finished bool.
1293 (number_or_range_parser::skip_range): Set m_in_range to false.
1294
64b58472
SDJ
12952018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1296
1297 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1298 on Windows.
1299
c7ab0aef
SDJ
13002018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1301 Jan Kratochvil <jan.kratochvil@redhat.com>
1302 Paul Fertser <fercerpav@gmail.com>
1303 Tsutomu Seki <sekiriki@gmail.com>
1304 Pedro Alves <palves@redhat.com>
1305
1306 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1307 'unittests/parse-connection-spec-selftests.c'.
1308 (COMMON_SFILES): Add 'common/netstuff.c'.
1309 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1310 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1311 * common/netstuff.c: New file.
1312 * common/netstuff.h: New file.
1313 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1314 (wait_for_connect): Update comment. New parameter
1315 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1316 Use 'sock' directly instead of 'scb->fd'.
1317 (try_connect): New function, with code from 'net_open'.
1318 (net_open): Rewrite main loop to deal with multiple
1319 sockets/addresses. Handle IPv6-style hostnames; implement
1320 support for IPv6 connections.
1321 * unittests/parse-connection-spec-selftests.c: New file.
1322
4c7333b3
PA
13232018-07-11 Pedro Alves <palves@redhat.com>
1324
1325 PR gdb/23377
1326 * remote.c (remote_target::remote_detach_pid): Call
1327 set_current_process.
1328
a6f88f6e
PA
13292018-07-11 Pedro Alves <palves@redhat.com>
1330
1331 * h8300-tdep.c (h8300_gdbarch_init): Remove
1332 set_gdbarch_ecoff_reg_to_regnum calls.
1333
16ff70dd
SDJ
13342018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1335
1336 PR c++/23373
1337 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1338 offsets/sizes for static members of a class/struct.
1339
12863263
AH
13402018-07-11 Alan Hayward <alan.hayward@arm.com>
1341
1342 * target-descriptions.c (tdesc_register_bitsize): Rename.
1343 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1344 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1345 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1346
1123588c
TT
13472018-07-10 Tom Tromey <tom@tromey.com>
1348
1349 * breakpoint.c (moribund_locations): Now static and a
1350 std::vector.
1351 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1352 (build_bpstat_chain, update_global_location_list)
1353 (breakpoint_retire_moribund): Update.
1354 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1355 VEC.
1356
8c49aa89
AB
13572018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1358
1359 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1360 (riscv_register_reggroup_p): Use new function, remove unneeded
1361 parenthesis.
1362 (riscv_push_dummy_call): Extend assert to compare against xlen or
1363 flen based on register type.
1364
42ecac17
AB
13652018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1366
1367 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1368
055303e2
AB
13692018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1370
1371 * remote.c (show_hardware_watchpoint_limit): New function.
1372 (show_hardware_watchpoint_length_limit): New function.
1373 (show_hardware_breakpoint_limit): New function.
1374 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1375 where appropriate, update help text.
1376
8fd32c1c
TT
13772018-07-09 Tom Tromey <tom@tromey.com>
1378
1379 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1380 (CLIBS): Don't mention NAT_CLIBS.
1381
31278b51
TT
13822018-07-09 Tom Tromey <tom@tromey.com>
1383
1384 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1385 (LIBGDB_OBS, clean mostlyclean): Update.
1386 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1387
e5fd1493
TT
13882018-07-09 Tom Tromey <tom@tromey.com>
1389
1390 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1391 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1392 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1393
981e0c0c
TT
13942018-07-09 Tom Tromey <tom@tromey.com>
1395
1396 * Makefile.in (ALLDEPFILES): Remove exec.c.
1397 (COMMON_OBS): Remove exec.o.
1398 (COMMON_SFILES): Add exec.c.
1399
14ccceb2
TT
14002018-07-09 Tom Tromey <tom@tromey.com>
1401
1402 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1403
5d3c3a68
TT
14042018-07-09 Tom Tromey <tom@tromey.com>
1405
1406 * Makefile.in (clean mostlyclean): Remove stamp-version.
1407 (version.c): Depend on stamp-version.
1408 (stamp-version): New rule, from version.c rule.
1409
1998086d
TT
14102018-07-09 Tom Tromey <tom@tromey.com>
1411
1412 * Makefile.in (init.c): Depend on stamp-init.
1413 (stamp-init): New rule, from init.c rule.
1414 (clean mostlyclean): Remove stamp-init.
1415
4c754949
TT
14162018-07-09 Tom Tromey <tom@tromey.com>
1417
1418 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1419 SUBDIR_GCC_COMPILE_SRCS.
1420
6497f1dd
TT
14212018-07-09 Tom Tromey <tom@tromey.com>
1422
1423 * Makefile.in (init.c): Remove some unused sed rules.
1424
97a34db9
TT
14252018-07-09 Tom Tromey <tom@tromey.com>
1426
1427 * Makefile.in (TSOBS): Remove.
1428 (INIT_FILES): Update.
1429 (LIBGDB_OBS): Update.
1430 (COMMON_SFILES): Add inflow.c.
1431 (SFILES): Remove inflow.c.
1432
25289ac1
JK
14332018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1434
1435 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1436
e83f4d97
SM
14372018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1438
4869c585
SM
1439 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1440 get_saveloc_name, is_signal_frame_name, step_name,
1441 init_remote_name, create_addr_space_name,
1442 destroy_addr_space_name, search_unwind_table_name,
1443 find_dyn_list_name): Constify.
e83f4d97 1444
6821842f
SM
14452018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1446
1447 * darwin-nat.c (darwin_pthread_kill): New function.
1448 (darwin_resume_thread): Use darwin_pthread_kill.
1449
c530603c
TV
14502018-07-05 Tom de Vries <tdevries@suse.de>
1451
1452 * macroexp.c (macro_buffer) <operator=>: New member function.
1453
a7d0f0f0
TT
14542018-07-04 Tom Tromey <tom@tromey.com>
1455
1456 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1457
6242c6a6
SM
14582018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1459
1460 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1461 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1462 * maint.c: Likewise.
1463 * top.c: Likewise.
1464
4e5b2f89
JB
14652018-07-04 Joel Brobecker <brobecker@adacore.com>
1466
1467 * NEWS: Create a new section for the next release branch.
1468 Rename the section of the current branch, now that it has
1469 been cut.
1470
538ccc4a
JB
14712018-07-04 Joel Brobecker <brobecker@adacore.com>
1472
1473 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1474 * version.in: Bump version to 8.2.50.DATE-git.
1475
1b919490
VB
14762018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1477 Pedro Alves <palves@redhat.com>
1478
1479 * linux-nat.c (linux_init_ptrace): Rename to ...
1480 (linux_init_ptrace_procfs): ... this. Call
1481 linux_proc_init_warnings.
1482 (linux_nat_target::post_attach)
1483 (linux_nat_target::post_startup_inferior): Adjust.
1484 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1485 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1486
1ea5da02
TV
14872018-07-04 Tom de Vries <tdevries@suse.de>
1488
1489 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1490 check ...
1491 (read_comp_unit_head): ... here.
1492
f51e0e20
TT
14932018-07-03 Tom Tromey <tom@tromey.com>
1494
1495 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1496 (stop_tracing, tstatus_command)
1497 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1498 (print_one_static_tracepoint_marker): Update.
1499 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1500 std::vector.
1501 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1502 VEC.
1503 (all_tracepoints, static_tracepoints_here): Return std::vector.
1504
d7e15655
TT
15052018-07-03 Tom Tromey <tom@tromey.com>
1506
1507 * common/ptid.c (ptid_equal): Remove.
1508 * common/ptid.h (ptid_equal): Don't declare.
1509 * ada-tasks.c: Update.
1510 * breakpoint.c: Update.
1511 * common/agent.c: Update.
1512 * corelow.c: Update.
1513 * darwin-nat-info.c: Update.
1514 * darwin-nat.c: Update.
1515 * dcache.c: Update.
1516 * dtrace-probe.c: Update.
1517 * dummy-frame.c: Update.
1518 * fbsd-nat.c: Update.
1519 * frame.c: Update.
1520 * gdbthread.h: Update.
1521 * gnu-nat.c: Update.
1522 * go32-nat.c: Update.
1523 * inf-loop.c: Update.
1524 * inf-ptrace.c: Update.
1525 * infcall.c: Update.
1526 * infcmd.c: Update.
1527 * inflow.c: Update.
1528 * infrun.c: Update.
1529 * linux-fork.c: Update.
1530 * linux-nat.c: Update.
1531 * linux-thread-db.c: Update.
1532 * mi/mi-cmd-var.c: Update.
1533 * mi/mi-interp.c: Update.
1534 * mi/mi-main.c: Update.
1535 * nto-procfs.c: Update.
1536 * ppc-linux-tdep.c: Update.
1537 * procfs.c: Update.
1538 * python/py-inferior.c: Update.
1539 * python/py-record-btrace.c: Update.
1540 * python/py-record.c: Update.
1541 * ravenscar-thread.c: Update.
1542 * regcache.c: Update.
1543 * remote-sim.c: Update.
1544 * remote.c: Update.
1545 * sol-thread.c: Update.
1546 * solib.c: Update.
1547 * target.c: Update.
1548 * tui/tui-stack.c: Update.
1549 * varobj.c: Update.
1550 * windows-nat.c: Update.
1551 * windows-tdep.c: Update.
1552
26a57c92
TT
15532018-07-03 Tom Tromey <tom@tromey.com>
1554
1555 * common/ptid.c (ptid_match): Remove.
1556 * common/ptid.h (ptid_match): Don't declare.
1557 * fbsd-nat.c: Update.
1558 * infcmd.c: Update.
1559 * infrun.c: Update.
1560 * linux-nat.c: Update.
1561 * record-btrace.c: Update.
1562 * regcache.c: Update.
1563 * remote.c: Update.
1564
d2a107e3
TT
15652018-07-03 Tom Tromey <tom@tromey.com>
1566
1567 * common/ptid.c (ptid_tid_p): Remove.
1568 * common/ptid.h (ptid_tid_p): Don't declare.
1569 * sol-thread.c: Update.
1570
15a9e13e
TT
15712018-07-03 Tom Tromey <tom@tromey.com>
1572
1573 * common/ptid.c (ptid_lwp_p): Remove.
1574 * common/ptid.h (ptid_lwp_p): Don't declare.
1575 * fbsd-nat.c: Update.
1576 * linux-nat.c: Update.
1577 * nat/linux-procfs.c: Update.
1578 * nat/x86-linux-dregs.c: Update.
1579 * sol-thread.c: Update.
1580
0e998d96
TT
15812018-07-03 Tom Tromey <tom@tromey.com>
1582
1583 * common/ptid.c (ptid_is_pid): Remove.
1584 * common/ptid.h (ptid_is_pid): Don't declare.
1585 * infrun.c: Update.
1586 * linux-nat.c: Update.
1587 * mi/mi-interp.c: Update.
1588 * remote.c: Update.
1589 * thread.c: Update.
1590
cc6bcb54
TT
15912018-07-03 Tom Tromey <tom@tromey.com>
1592
1593 * common/ptid.c (ptid_get_tid): Remove.
1594 * common/ptid.h (ptid_get_tid): Don't declare.
1595 * ada-tasks.c: Update.
1596 * aix-thread.c: Update.
1597 * bsd-uthread.c: Update.
1598 * darwin-nat.c: Update.
1599 * fbsd-nat.c: Update.
1600 * i386-darwin-nat.c: Update.
1601 * infrun.c: Update.
1602 * linux-tdep.c: Update.
1603 * nto-procfs.c: Update.
1604 * ppc-ravenscar-thread.c: Update.
1605 * python/py-infthread.c: Update.
1606 * ravenscar-thread.c: Update.
1607 * sol-thread.c: Update.
1608 * sparc-ravenscar-thread.c: Update.
1609 * windows-nat.c: Update.
1610
e38504b3
TT
16112018-07-03 Tom Tromey <tom@tromey.com>
1612
1613 * common/ptid.c (ptid_get_lwp): Remove.
1614 * common/ptid.h (ptid_get_lwp): Don't declare.
1615 * aarch64-linux-nat.c: Update.
1616 * ada-tasks.c: Update.
1617 * aix-thread.c: Update.
1618 * amd64-linux-nat.c: Update.
1619 * arm-linux-nat.c: Update.
1620 * corelow.c: Update.
1621 * fbsd-nat.c: Update.
1622 * fbsd-tdep.c: Update.
1623 * gnu-nat.c: Update.
1624 * i386-cygwin-tdep.c: Update.
1625 * i386-gnu-nat.c: Update.
1626 * i386-linux-nat.c: Update.
1627 * ia64-linux-nat.c: Update.
1628 * inf-ptrace.c: Update.
1629 * infrun.c: Update.
1630 * linux-fork.c: Update.
1631 * linux-nat.c: Update.
1632 * linux-tdep.c: Update.
1633 * linux-thread-db.c: Update.
1634 * mips-linux-nat.c: Update.
1635 * nat/aarch64-linux-hw-point.c: Update.
1636 * nat/aarch64-linux.c: Update.
1637 * nat/linux-btrace.c: Update.
1638 * nat/linux-osdata.c: Update.
1639 * nat/linux-procfs.c: Update.
1640 * nat/x86-linux-dregs.c: Update.
1641 * obsd-nat.c: Update.
1642 * ppc-fbsd-nat.c: Update.
1643 * ppc-linux-nat.c: Update.
1644 * procfs.c: Update.
1645 * python/py-infthread.c: Update.
1646 * ravenscar-thread.c: Update.
1647 * remote.c: Update.
1648 * s390-linux-nat.c: Update.
1649 * sol-thread.c: Update.
1650 * sol2-tdep.c: Update.
1651 * spu-linux-nat.c: Update.
1652 * x86-linux-nat.c: Update.
1653 * xtensa-linux-nat.c: Update.
1654
e99b03dc
TT
16552018-07-03 Tom Tromey <tom@tromey.com>
1656
1657 * common/ptid.c (ptid_get_pid): Remove.
1658 * common/ptid.h (ptid_get_pid): Don't declare.
1659 * aarch64-linux-nat.c: Update.
1660 * ada-lang.c: Update.
1661 * aix-thread.c: Update.
1662 * alpha-bsd-nat.c: Update.
1663 * amd64-fbsd-nat.c: Update.
1664 * amd64-linux-nat.c: Update.
1665 * arm-linux-nat.c: Update.
1666 * arm-nbsd-nat.c: Update.
1667 * auxv.c: Update.
1668 * break-catch-syscall.c: Update.
1669 * breakpoint.c: Update.
1670 * bsd-uthread.c: Update.
1671 * corelow.c: Update.
1672 * ctf.c: Update.
1673 * darwin-nat.c: Update.
1674 * fbsd-nat.c: Update.
1675 * fbsd-tdep.c: Update.
1676 * gcore.c: Update.
1677 * gnu-nat.c: Update.
1678 * hppa-nbsd-nat.c: Update.
1679 * hppa-obsd-nat.c: Update.
1680 * i386-fbsd-nat.c: Update.
1681 * ia64-linux-nat.c: Update.
1682 * inf-ptrace.c: Update.
1683 * infcmd.c: Update.
1684 * inferior.c: Update.
1685 * inferior.h: Update.
1686 * inflow.c: Update.
1687 * infrun.c: Update.
1688 * linux-fork.c: Update.
1689 * linux-nat.c: Update.
1690 * linux-tdep.c: Update.
1691 * linux-thread-db.c: Update.
1692 * m68k-bsd-nat.c: Update.
1693 * mi/mi-interp.c: Update.
1694 * mi/mi-main.c: Update.
1695 * mips-linux-nat.c: Update.
1696 * mips-nbsd-nat.c: Update.
1697 * mips64-obsd-nat.c: Update.
1698 * nat/aarch64-linux-hw-point.c: Update.
1699 * nat/aarch64-linux.c: Update.
1700 * nat/linux-btrace.c: Update.
1701 * nat/linux-osdata.c: Update.
1702 * nat/linux-procfs.c: Update.
1703 * nat/x86-linux-dregs.c: Update.
1704 * nto-procfs.c: Update.
1705 * obsd-nat.c: Update.
1706 * ppc-linux-nat.c: Update.
1707 * ppc-nbsd-nat.c: Update.
1708 * ppc-obsd-nat.c: Update.
1709 * proc-service.c: Update.
1710 * procfs.c: Update.
1711 * python/py-inferior.c: Update.
1712 * python/py-infthread.c: Update.
1713 * ravenscar-thread.c: Update.
1714 * record.c: Update.
1715 * remote-sim.c: Update.
1716 * remote.c: Update.
1717 * rs6000-nat.c: Update.
1718 * s390-linux-nat.c: Update.
1719 * sh-nbsd-nat.c: Update.
1720 * sol-thread.c: Update.
1721 * sparc-nat.c: Update.
1722 * sparc64-tdep.c: Update.
1723 * spu-linux-nat.c: Update.
1724 * spu-tdep.c: Update.
1725 * target-debug.h: Update.
1726 * target.c: Update.
1727 * thread.c: Update.
1728 * tid-parse.c: Update.
1729 * tracefile-tfile.c: Update.
1730 * vax-bsd-nat.c: Update.
1731 * windows-nat.c: Update.
1732 * x86-linux-nat.c: Update.
1733 * x86-nat.c: Update.
1734
f2907e49
TT
17352018-07-03 Tom Tromey <tom@tromey.com>
1736
1737 * common/ptid.c (pid_to_ptid): Remove.
1738 * common/ptid.h (pid_to_ptid): Don't declare.
1739 * aix-thread.c: Update.
1740 * arm-linux-nat.c: Update.
1741 * common/ptid.c: Update.
1742 * common/ptid.h: Update.
1743 * corelow.c: Update.
1744 * ctf.c: Update.
1745 * darwin-nat.c: Update.
1746 * fbsd-nat.c: Update.
1747 * fork-child.c: Update.
1748 * gnu-nat.c: Update.
1749 * go32-nat.c: Update.
1750 * inf-ptrace.c: Update.
1751 * infcmd.c: Update.
1752 * inferior.c: Update.
1753 * infrun.c: Update.
1754 * linux-fork.c: Update.
1755 * linux-nat.c: Update.
1756 * nat/aarch64-linux-hw-point.c: Update.
1757 * nat/fork-inferior.c: Update.
1758 * nat/x86-linux-dregs.c: Update.
1759 * nto-procfs.c: Update.
1760 * obsd-nat.c: Update.
1761 * procfs.c: Update.
1762 * progspace.c: Update.
1763 * remote.c: Update.
1764 * rs6000-nat.c: Update.
1765 * s390-linux-nat.c: Update.
1766 * sol-thread.c: Update.
1767 * spu-linux-nat.c: Update.
1768 * target.c: Update.
1769 * top.c: Update.
1770 * tracefile-tfile.c: Update.
1771 * windows-nat.c: Update.
1772
fd79271b
TT
17732018-07-03 Tom Tromey <tom@tromey.com>
1774
1775 * common/ptid.h (ptid_build): Don't declare.
1776 * common/ptid.c (ptid_build): Remove.
1777 * aix-thread.c: Update.
1778 * bsd-kvm.c: Update.
1779 * bsd-uthread.c: Update.
1780 * common/agent.c: Update.
1781 * common/ptid.c: Update.
1782 * common/ptid.h: Update.
1783 * corelow.c: Update.
1784 * darwin-nat.c: Update.
1785 * fbsd-nat.c: Update.
1786 * gnu-nat.c: Update.
1787 * linux-fork.c: Update.
1788 * linux-nat.c: Update.
1789 * linux-thread-db.c: Update.
1790 * nat/linux-osdata.c: Update.
1791 * nat/linux-procfs.c: Update.
1792 * nto-procfs.c: Update.
1793 * obsd-nat.c: Update.
1794 * proc-service.c: Update.
1795 * procfs.c: Update.
1796 * ravenscar-thread.c: Update.
1797 * remote-sim.c: Update.
1798 * remote.c: Update.
1799 * sol-thread.c: Update.
1800 * target.c: Update.
1801 * windows-nat.c: Update.
1802
057302ce
TT
18032018-07-03 Tom Tromey <tom@tromey.com>
1804
1805 * infrun.c (follow_exec): Use exit_inferior_silent.
1806 * inferior.c (exit_inferior_num_silent): Remove.
1807 * inferior.h (exit_inferior_num_silent): Don't declare.
1808
a50c11c6
TT
18092018-07-03 Tom Tromey <tom@tromey.com>
1810
1811 PR cli/23340:
1812 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1813 inferior_ptid on error.
1814
471b9d15
MR
18152018-07-02 Maciej W. Rozycki <macro@mips.com>
1816 Simon Marchi <simon.marchi@polymtl.ca>
1817
1818 PR tdep/8282
1819 * disasm.h (gdb_disassembler): Add
1820 `m_disassembler_options_holder'. member
1821 * disasm.c (get_all_disassembler_options): New function.
1822 (gdb_disassembler::gdb_disassembler): Use it.
1823 (gdb_buffered_insn_length_init_dis): Likewise.
1824 (gdb_buffered_insn_length): Adjust accordingly.
1825 (set_disassembler_options): Handle options with arguments.
1826 (show_disassembler_options_sfunc): Likewise. Add a leading new
1827 line if showing options with descriptions.
1828 (disassembler_options_completer): Adapt to using the
1829 `disasm_options_and_args_t' structure.
1830 * mips-tdep.c (mips_disassembler_options): New variable.
1831 (mips_disassembler_options_o32): Likewise.
1832 (mips_disassembler_options_n32): Likewise.
1833 (mips_disassembler_options_n64): Likewise.
1834 (gdb_print_insn_mips): Don't set `disassembler_options'.
1835 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1836 functions.
1837 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1838 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1839 `gdbarch_disassembler_options_implicit' and
1840 `gdbarch_valid_disassembler_options'.
1841 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1842 `disasm_options_and_args_t' structure.
1843 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1844 method.
1845 (valid_disassembler_options): Switch from `disasm_options_t' to
1846 the `disasm_options_and_args_t' structure.
1847 * NEWS: Document `set disassembler-options' support for the MIPS
1848 target.
1849 * gdbarch.h: Regenerate.
1850 * gdbarch.c: Regenerate.
1851
41823f29
SH
18522018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1853
1854 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1855
41206e32
JB
18562018-06-29 Joel Brobecker <brobecker@adacore.com>
1857
1858 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1859 parameter in call to amd64_target_description.
1860 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1861 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1862 (amd64fbsd_init_abi): Likewise.
1863 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1864 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1865 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1866 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1867
de52b960
PA
18682018-06-29 Pedro Alves <palves@redhat.com>
1869
1870 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1871 "segments" parameter.
1872 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1873 (_initialize_amd64_tdep): Update call to
1874 amd64_create_target_description.
1875 (amd64_target_description): Add "segments" parameter. Adjust
1876 the implementation to use it.
1877 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1878 call to amd64_create_target_description.
1879 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1880 * gdb/arch/amd64.h (amd64_create_target_description): Add
1881 "segments" register.
1882 * gdb/arch/amd64.c (amd64_create_target_description): Add
1883 "segments" parameter. Call create_feature_i386_64bit_segments
1884 only if SEGMENTS is true.
1885 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1886 call to amd64_create_target_description.
1887
75acb486
PA
18882018-06-29 Pedro Alves <palves@redhat.com>
1889
1890 * thread.c (thread_target_id_str): New, factored out from ...
1891 (print_thread_info_1): ... here. Use it to compute the max
1892 "Target Id" column width.
1893
c76a8ea3
PA
18942018-06-29 Pedro Alves <palves@redhat.com>
1895
1896 * remote.c (remote_target::extra_thread_info): Delete
1897 'display_buf' and 'n' locals. from the cache, regardless of
1898 packet mechanims is in use. Use cache for qThreadExtra and qP
1899 methods too.
1900
cd2bb709
PA
19012018-06-29 Pedro Alves <palves@redhat.com>
1902
1903 * blockframe.c (find_pc_sect_containing_function): New function.
1904 * breakpoint.c (print_breakpoint_location): Don't call
1905 find_pc_sect_function.
1906 * linespec.c (create_sals_line_offset): Record the location's
1907 symbol in the sal.
1908 * linespec.c (convert_address_location_to_sals): Fill in sal's
1909 symbol with find_pc_sect_containing_function.
1910 * symtab.c (find_function_start_sal): Rename to ...
1911 (find_function_start_sal_1): ... this.
1912 (find_function_start_sal): Reimplement as wrapper around
1913 find_function_start_sal_1, and use
1914 find_pc_sect_containing_function to fill in the sal's symbol.
1915 (find_function_start_sal(symbol*, bool)): Adjust.
1916 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1917 comments.
1918 (find_pc_sect_containing_function): Declare.
1919
991ff292
PA
19202018-06-29 Pedro Alves <palves@redhat.com>
1921
1922 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1923 true if the the location has no symbol.
1924
44cee4fd
TT
19252018-06-28 Tom Tromey <tom@tromey.com>
1926
1927 * NEWS: Mention --enable-codesign.
1928 * silent-rules.mk (ECHO_SIGN): New variable.
1929 * configure.ac: Add --enable-codesign.
1930 * configure: Rebuild.
1931 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1932 (gdb$(EXEEXT)): Optionally invoke codesign.
1933
f2ffa92b
PA
19342018-06-28 Pedro Alves <palves@redhat.com>
1935
1936 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1937 comments.
1938 (switch_to_thread_no_regs): Adjust comment.
1939 * infcmd.c (stop_pc): Delete.
1940 (post_create_inferior, info_program_command): Replace references
1941 to stop_pc with references to thread_info->suspend.stop_pc.
1942 * inferior.h (stop_pc): Delete declaration.
1943 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1944 (handle_inferior_event_1, handle_signal_stop)
1945 (process_event_stop_test, keep_going_stepped_thread)
1946 (handle_step_into_function, handle_step_into_function_backward)
1947 (print_stop_location): Replace references to stop_pc with
1948 references to thread_info->suspend.stop_pc.
1949 (struct infcall_suspend_state) <stop_pc>: Delete field.
1950 (save_infcall_suspend_state, restore_infcall_suspend_state):
1951 Remove references to inf_stat->stop_pc.
1952 * linux-fork.c (fork_load_infrun_state): Likewise.
1953 * record-btrace.c (record_btrace_set_replay): Likewise.
1954 * record-full.c (record_full_goto_entry): Likewise.
1955 * remote.c (print_one_stopped_thread): Likewise.
1956 * target.c (target_resume): Extend comment.
1957 * thread.c (set_executing_thread): New.
1958 (set_executing): Use it.
1959 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1960 Remove references to stop_pc.
1961
ecdc3a72
PA
19622018-06-28 Pedro Alves <palves@redhat.com>
1963
1964 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1965 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1966
d95d3aef
TT
19672018-06-28 Tom Tromey <tom@tromey.com>
1968
1969 * coffread.c (coff_symfile_finish): Update.
1970 * xcoffread.c (xcoff_symfile_finish): Update.
1971 * elfread.c (elf_symfile_finish): Update.
1972 * symfile.h (dwarf2_free_objfile): Don't declare.
1973 * dwarf2read.c (_initialize_dwarf2_read): Use
1974 register_objfile_data_with_cleanup.
1975 (dwarf2_free_objfile): Now static. Change signature.
1976
291f9a96
PT
19772018-06-28 Petr Tesarik <ptesarik@suse.cz>
1978
1979 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1980 option "-o" to add-symbol-file-load to add an offset to each
1981 section's load address.
1982 * symfile.c (set_objfile_default_section_offset): New function.
1983
d81a3eaf
PT
19842018-06-28 Petr Tesarik <ptesarik@suse.cz>
1985
1986 * symfile.c (add_symbol_file_command): Make sure that sections
1987 with the same name are sorted in the same order.
1988
ed6dfe51
PT
19892018-06-28 Petr Tesarik <ptesarik@suse.cz>
1990
1991 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1992 require the second argument. If omitted, load sections at the
1993 addresses specified in the file.
1994
d4d429d5
PT
19952018-06-28 Petr Tesarik <ptesarik@suse.cz>
1996
1997 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1998 (_initialize_symfile): Add option "-o" to symbol-file to add an
1999 offset to each section of the symbol file.
2000
39b27ab6
PT
20012018-06-28 Petr Tesarik <ptesarik@suse.cz>
2002
2003 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2004
41827fc3
TT
20052018-06-27 Tom Tromey <tom@tromey.com>
2006
2007 * stack.c (_initialize_stack): Update "func" help text.
2008
0c6aef22
TT
20092018-06-27 Tom Tromey <tom@tromey.com>
2010
2011 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2012 std::vector.
2013 (unwind_infopy_str, pyuw_create_unwind_info)
2014 (unwind_infopy_add_saved_register, pyuw_sniffer)
2015 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2016 Update.
2017 (struct saved_reg): Add constructor.
2018 <value>: Now a gdbpy_ref<>.
2019
63177289
TT
20202018-06-27 Tom Tromey <tom@tromey.com>
2021
2022 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2023
e76f78a0
SM
20242018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2025
2026 * gdb-gdb.py.in: Format using autopep8.
2027
9a14af7b
SM
20282018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2029
2030 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2031 (type_lookup_function): Recognize CORE_ADDR values.
2032
189366cd
SM
20332018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2034
2035 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2036 print tag_name.
2037
68ad5fb9
SM
20382018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2039
2040 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2041 <__lt__>: Add.
2042
141ec9f6
SM
20432018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2044
2045 * gdb-gdb.py: Move to...
2046 * gdb-gdb.py.in: ... here.
2047 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2048 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2049 dependencies.
2050 (distclean): Remove gdb-gdb.py when cleaning.
2051 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2052 * configure: Re-generate.
2053
4c4e7ad4
PA
20542018-06-27 Pedro Alves <palves@redhat.com>
2055
2056 * proc-service.c (get_ps_regcache): New.
2057 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2058 (ps_lsetfpregs): Use it.
2059
7ab6656f
OJ
20602018-06-27 Omair Javaid <omair.javaid@linaro.org>
2061
2062 PR gdb/21695
2063 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2064 (dwarf_decode_lines_1): Adjust.
2065
bd583225
SM
20662018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2067
2068 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2069 override.
2070 <info_proc>: Likewise.
2071
9a325b7b
JB
20722018-06-26 Joel Brobecker <brobecker@adacore.com>
2073
2074 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2075 to windows_fetch_one_register, and only handle the case of
2076 fetching one register. Move the code that reloads the context
2077 and iterates over all registers if R is negative to...
2078 (windows_nat_target::fetch_registers): ... here.
2079 (do_windows_store_inferior_registers): Rename to
2080 windows_store_one_register, and only handle the case of storing
2081 one register. Move the code that handles the case where r is
2082 negative to...
2083 (windows_nat_target::store_registers) ... here.
2084
a33ccfc7
TT
20852018-06-26 Tom Tromey <tom@tromey.com>
2086
2087 PR rust/22574:
2088 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2089 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2090 Update.
2091 (rust_internal_print_type): Add podata parameter.
2092 (rust_print_type): Update.
2093
e0c547d1
TT
20942018-06-26 Tom Tromey <tom@tromey.com>
2095
2096 * typeprint.h (struct print_offset_data) <update, finish,
2097 maybe_print_hole>: New methods.
2098 <indentation>: New constant.
2099 * typeprint.c (print_offset_data::indentation): Define.
2100 (print_offset_data::maybe_print_hole, print_offset_data::update)
2101 (print_offset_data::finish): Move from c-typeprint.c and rename.
2102 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2103 (print_spaces_filtered_with_print_options): Update.
2104 (c_print_type_union_field_offset, maybe_print_hole)
2105 (c_print_type_struct_field_offset): Move to typeprint.c and
2106 rename.
2107 (c_type_print_base_struct_union): Update.
2108
75cbc781
PA
21092018-06-25 Pedro Alves <palves@redhat.com>
2110
2111 * gdbthread.h (thread_info_ref, delete_thread)
2112 (delete_thread_silent, first_thread_of_inferior)
2113 (any_thread_of_inferior, switch_to_thread)
2114 (enable_thread_stack_temporaries)
2115 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2116 (get_last_thread_stack_temporary)
2117 (value_in_thread_stack_temporaries, can_access_registers_thread):
2118 Spell out "struct thread_info" instead of just "thread_info".
2119 * inferior.h (notice_new_inferior): Likewise.
2120
b7a08269
PA
21212018-06-25 Pedro Alves <palves@redhat.com>
2122
2123 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2124 pass thread_info pointer to delete_thread.
2125 (windows_nat_target::detach): Pass inferior pointer to
2126 detach_inferior.
2127 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2128 delete_thread.
2129 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2130 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2131 and pass a thread_info pointer to delete_thread.
2132 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2133 pass thread_info pointer to delete_thread.
2134 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2135 delete_thread_silent call.
2136 * procfs.c (procfs_target::detach): Pass inferior pointer to
2137 detach_inferior.
2138 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2139 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2140 delete_thread_silent call.
2141 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2142 pass thread_info pointer to delete_thread.
2143 (windows_nat_target::detach): Pass inferior pointer to
2144 delete_inferior.
2145
8e7767e3
AH
21462018-06-22 Alan Hayward <alan.hayward@arm.com>
2147
2148 * regcache.c (readable_regcache::read_part): Fix asserts.
2149 (reg_buffer::raw_collect_part): New function.
2150 (regcache::write_part): Fix asserts.
2151 (reg_buffer::raw_supply_part): New function.
2152 (regcache::transfer_regset_register): New helper function.
2153 (regcache::transfer_regset): Call new functions.
2154 (regcache_supply_regset): Use gdb_byte*.
2155 (regcache::supply_regset): Likewise.
2156 (regcache_collect_regset): Likewise.
2157 (regcache::collect_regset): Likewise.
2158 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2159 (reg_buffer::raw_supply_part): Likewise.
2160 (regcache::transfer_regset_register): Likewise.
2161 (regcache::transfer_regset): Use gdb_byte*.
2162
bfd60e34
AH
21632018-06-22 Alan Hayward <alan.hayward@arm.com>
2164
2165 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2166
00431a78
PA
21672018-06-21 Pedro Alves <palves@redhat.com>
2168
2169 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2170 instead of a ptid_t. All callers adjusted.
2171 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2172 adjusted.
2173 (print_ada_task_info, display_current_task_id, task_command_1):
2174 Adjust.
2175 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2176 inferior_thread.
2177 (breakpoint_kind): Adjust.
2178 (remove_breakpoints_pid): Rename to ...
2179 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2180 pointer. All callers adjusted.
2181 (bpstat_clear_actions): Use inferior_thread.
2182 (get_bpstat_thread): New.
2183 (bpstat_do_actions): Use it.
2184 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2185 to take a thread_info pointer. All callers adjusted.
2186 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2187 (breakpoint_re_set_thread): Use inferior_thread.
2188 * breakpoint.h (struct inferior): Forward declare.
2189 (bpstat_stop_status): Update.
2190 (remove_breakpoints_pid): Delete.
2191 (remove_breakpoints_inf): New.
2192 * bsd-uthread.c (bsd_uthread_target::wait)
2193 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2194 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2195 (maint_btrace_packet_history_cmd)
2196 (maint_btrace_clear_packet_history_cmd): Adjust.
2197 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2198 inferior_thread.
2199 * cli/cli-interp.c: Include "inferior.h".
2200 * common/refcounted-object.h (struct
2201 refcounted_object_ref_policy): New.
2202 * compile/compile-object-load.c: Include gdbthread.h.
2203 (store_regs): Use inferior_thread.
2204 * corelow.c (core_target::close): Use current_inferior.
2205 (core_target_open): Adjust to use first_thread_of_inferior and use
2206 the current inferior.
2207 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2208 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2209 <thread>: ... this new field. All references adjusted.
2210 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2211 Take a thread_info pointer instead of a ptid_t.
2212 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2213 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2214 thread_info pointer instead of a ptid_t.
2215 * elfread.c: Include "inferior.h".
2216 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2217 Use inferior_thread.
2218 * eval.c (evaluate_subexp): Likewise.
2219 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2220 inferior_thread.
2221 * gdb_proc_service.h (struct thread_info): Forward declare.
2222 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2223 <thread>: ... this new field. All references adjusted.
2224 * gdbarch.h, gdbarch.c: Regenerate.
2225 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2226 'thread' parameter. All implementations and callers adjusted.
2227 * gdbthread.h (thread_info) <set_running>: New method.
2228 (delete_thread, delete_thread_silent): Take a thread_info pointer
2229 instead of a ptid.
2230 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2231 (first_thread_of_process): Delete, replaced by ...
2232 (first_thread_of_inferior): ... this new function. All callers
2233 adjusted.
2234 (any_live_thread_of_process): Delete, replaced by ...
2235 (any_live_thread_of_inferior): ... this new function. All callers
2236 adjusted.
2237 (switch_to_thread, switch_to_no_thread): Declare.
2238 (is_executing): Delete.
2239 (enable_thread_stack_temporaries): Update comment.
2240 <enable_thread_stack_temporaries>: Take a thread_info pointer
2241 instead of a ptid_t. Incref the thread.
2242 <~enable_thread_stack_temporaries>: Decref the thread.
2243 <m_ptid>: Delete
2244 <m_thr>: New.
2245 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2246 (get_last_thread_stack_temporary)
2247 (value_in_thread_stack_temporaries, can_access_registers_thread):
2248 Take a thread_info pointer instead of a ptid_t. All callers
2249 adjusted.
2250 * infcall.c (get_call_return_value): Use inferior_thread.
2251 (run_inferior_call): Work with thread pointers instead of ptid_t.
2252 (call_function_by_hand_dummy): Work with thread pointers instead
2253 of ptid_t. Use thread_info_ref.
2254 * infcmd.c (proceed_thread_callback): Access thread's state
2255 directly.
2256 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2257 access thread's state directly.
2258 (continue_command): Use inferior_thread.
2259 (info_program_command): Use find_thread_ptid and access thread
2260 state directly.
2261 (proceed_after_attach_callback): Use thread state directly.
2262 (notice_new_inferior): Take a thread_info pointer instead of a
2263 ptid_t. All callers adjusted.
2264 (exit_inferior): Take an inferior pointer instead of a pid. All
2265 callers adjusted.
2266 (exit_inferior_silent): New.
2267 (detach_inferior): Delete.
2268 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2269 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2270 (detach_inferior_command, kill_inferior_command): Use
2271 find_inferior_id instead of valid_gdb_inferior_id and
2272 gdb_inferior_id_to_pid.
2273 (inferior_command): Use inferior and thread pointers.
2274 * inferior.h (struct thread_info): Forward declare.
2275 (notice_new_inferior): Take a thread_info pointer instead of a
2276 ptid_t. All callers adjusted.
2277 (detach_inferior): Delete declaration.
2278 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2279 instead of a pid. All callers adjusted.
2280 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2281 (valid_gdb_inferior_id): Delete.
2282 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2283 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2284 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2285 ...
2286 <inf>: ... this new field.
2287 <step_ptid>: Delete, replaced by ...
2288 <step_thread>: ... this new field.
2289 (get_displaced_stepping_state): Take an inferior pointer instead
2290 of a pid. All callers adjusted.
2291 (displaced_step_in_progress_any_inferior): Adjust.
2292 (displaced_step_in_progress_thread): Take a thread pointer instead
2293 of a ptid_t. All callers adjusted.
2294 (displaced_step_in_progress, add_displaced_stepping_state): Take
2295 an inferior pointer instead of a pid. All callers adjusted.
2296 (get_displaced_step_closure_by_addr): Adjust.
2297 (remove_displaced_stepping_state): Take an inferior pointer
2298 instead of a pid. All callers adjusted.
2299 (displaced_step_prepare_throw, displaced_step_prepare)
2300 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2301 All callers adjusted.
2302 (start_step_over): Adjust.
2303 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2304 displaced step queue.
2305 (do_target_resume): Adjust.
2306 (fetch_inferior_event): Use inferior_thread.
2307 (context_switch, get_inferior_stop_soon): Take an
2308 execution_control_state pointer instead of a ptid_t. All callers
2309 adjusted.
2310 (switch_to_thread_cleanup): Delete.
2311 (stop_all_threads): Use scoped_restore_current_thread.
2312 * inline-frame.c: Include "gdbthread.h".
2313 (inline_state) <inline_state>: Take a thread pointer instead of a
2314 ptid_t. All callers adjusted.
2315 <ptid>: Delete, replaced by ...
2316 <thread>: ... this new field.
2317 (find_inline_frame_state): Take a thread pointer instead of a
2318 ptid_t. All callers adjusted.
2319 (skip_inline_frames, step_into_inline_frame)
2320 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2321 pointer instead of a ptid_t. All callers adjusted.
2322 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2323 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2324 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2325 pointers directly.
2326 * linux-nat.c (get_detach_signal): Likewise.
2327 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2328 (thread_db_notice_clone): Adjust.
2329 (thread_db_find_new_threads_silently)
2330 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2331 a thread pointer instead of a ptid_t. All callers adjusted.
2332 * mi/mi-cmd-var.c: Include "inferior.h".
2333 (mi_cmd_var_update_iter): Update to use thread pointers.
2334 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2335 inferior directly.
2336 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2337 out to ...
2338 (mi_output_running): ... this new function.
2339 (mi_on_resume_1): Adjust to use it.
2340 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2341 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2342 directly.
2343 (interrupt_thread_callback): : Adjust to use thread and inferior
2344 pointers.
2345 * proc-service.c: Include "gdbthread.h".
2346 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2347 * progspace-and-thread.c: Include "inferior.h".
2348 * progspace.c: Include "inferior.h".
2349 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2350 hold a reference to an inferior_object.
2351 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2352 inferior_thread.
2353 * python/py-inferior.c (struct inferior_object): Give the type a
2354 tag name instead of a typedef.
2355 (python_on_normal_stop): No need to check if the current thread is
2356 listed.
2357 (inferior_to_inferior_object): Change return type to
2358 inferior_object. All callers adjusted.
2359 (find_thread_object): Delete, bits factored out to ...
2360 (thread_to_thread_object): ... this new function.
2361 * python/py-infthread.c (create_thread_object): Use
2362 inferior_to_inferior_object.
2363 (thpy_is_stopped): Use thread pointer directly.
2364 (gdbpy_selected_thread): Use inferior_thread.
2365 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2366 field, replaced with ...
2367 <thread>: ... this new field. All users adjusted.
2368 (btpy_insn_or_gap_new): Drop const.
2369 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2370 callers adjusted.
2371 * python/py-record.c: Include "gdbthread.h".
2372 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2373 a ptid_t. All callers adjusted.
2374 (gdbpy_current_recording): Use inferior_thread.
2375 * python/py-record.h (recpy_record_object) <ptid>: Delete
2376 field, replaced with ...
2377 <thread>: ... this new field. All users adjusted.
2378 (recpy_element_object) <ptid>: Delete
2379 field, replaced with ...
2380 <thread>: ... this new field. All users adjusted.
2381 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2382 a ptid_t. All callers adjusted.
2383 * python/py-threadevent.c: Include "gdbthread.h".
2384 (get_event_thread): Use thread_to_thread_object.
2385 * python/python-internal.h (struct inferior_object): Forward
2386 declare.
2387 (find_thread_object, find_inferior_object): Delete declarations.
2388 (thread_to_thread_object, inferior_to_inferior_object): New
2389 declarations.
2390 * record-btrace.c: Include "inferior.h".
2391 (require_btrace_thread): Use inferior_thread.
2392 (record_btrace_frame_sniffer)
2393 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2394 (get_thread_current_frame): Use scoped_restore_current_thread and
2395 switch_to_thread.
2396 (get_thread_current_frame): Use thread pointer directly.
2397 (record_btrace_replay_at_breakpoint): Use thread's inferior
2398 pointer directly.
2399 * record-full.c: Include "inferior.h".
2400 * regcache.c: Include "gdbthread.h".
2401 (get_thread_arch_regcache): Use the inferior's address space
2402 directly.
2403 (get_thread_regcache, registers_changed_thread): New.
2404 * regcache.h (get_thread_regcache(thread_info *thread)): New
2405 overload.
2406 (registers_changed_thread): New.
2407 (remote_target) <remote_detach_1>: Swap order of parameters.
2408 (remote_add_thread): <remote_add_thread>: Return the new thread.
2409 (get_remote_thread_info(ptid_t)): New overload.
2410 (remote_target::remote_notice_new_inferior): Use thread pointers
2411 directly.
2412 (remote_target::process_initial_stop_replies): Use
2413 thread_info::set_running.
2414 (remote_target::remote_detach_1, remote_target::detach)
2415 (extended_remote_target::detach): Adjust.
2416 * stack.c (frame_show_address): Use inferior_thread.
2417 * target-debug.h (target_debug_print_thread_info_pp): New.
2418 * target-delegates.c: Regenerate.
2419 * target.c (default_thread_address_space): Delete.
2420 (memory_xfer_partial_1): Use current_inferior.
2421 (target_detach): Use current_inferior.
2422 (target_thread_address_space): Delete.
2423 (generic_mourn_inferior): Use current_inferior.
2424 * target.h (struct target_ops) <thread_address_space>: Delete.
2425 (target_thread_address_space): Delete.
2426 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2427 pointers directly.
2428 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2429 thread pointer instead of a ptid_t. Adjust all callers.
2430 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2431 (first_thread_of_process): Delete, replaced by ...
2432 (first_thread_of_inferior): ... this new function. All callers
2433 adjusted.
2434 (any_thread_of_process): Rename to ...
2435 (any_thread_of_inferior): ... this, and take an inferior pointer.
2436 (any_live_thread_of_process): Rename to ...
2437 (any_live_thread_of_inferior): ... this, and take an inferior
2438 pointer.
2439 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2440 (value_in_thread_stack_temporaries)
2441 (get_last_thread_stack_temporary): Take a thread pointer instead
2442 of a ptid_t. Adjust all callers.
2443 (thread_info::set_running): New.
2444 (validate_registers_access): Use inferior_thread.
2445 (can_access_registers_ptid): Rename to ...
2446 (can_access_registers_thread): ... this, and take a thread
2447 pointer.
2448 (print_thread_info_1): Adjust to compare thread pointers instead
2449 of ptids.
2450 (switch_to_no_thread, switch_to_thread): Make extern.
2451 (scoped_restore_current_thread::~scoped_restore_current_thread):
2452 Use m_thread pointer directly.
2453 (scoped_restore_current_thread::scoped_restore_current_thread):
2454 Use inferior_thread.
2455 (thread_command): Use thread pointer directly.
2456 (thread_num_make_value_helper): Use inferior_thread.
2457 * top.c (execute_command): Use inferior_thread.
2458 * tui/tui-interp.c: Include "inferior.h".
2459 * varobj.c (varobj_create): Use inferior_thread.
2460 (value_of_root_1): Use find_thread_global_id instead of
2461 global_thread_id_to_ptid.
2462
33bab475
AH
24632018-06-21 Alan Hayward <alan.hayward@arm.com>
2464
2465 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2466 possible.
2467 (regcache::write_part): Likewise.
2468 (readable_regcache::cooked_read_part): Update comment.
2469 (readable_regcache::cooked_write_part): Likewise.
2470 * regcache.h: (readable_regcache::read_part): Likewise.
2471 (regcache::write_part): Likewise.
2472
8363f9d5
RB
24732018-06-21 Richard Bunt <richard.bunt@arm.com>
2474 Dirk Schubert <dirk.schubert@arm.com>
2475
2476 * aarch64-linux-nat.c (post_attach): New.
2477 (aarch64_linux_nat_target::post_attach): Override post_attach to
2478 record the number of hardware debug registers.
2479
0d0b0ea2
TT
24802018-06-20 Tom Tromey <tom@tromey.com>
2481
2482 * python/py-param.c (add_setshow_generic): Make parameters const.
2483 (parmpy_init): Update.
2484
302abd6e
SM
24852018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2486
2487 * regcache.h (regcache_cooked_read_ftype): Rename to...
2488 (register_read_ftype): ...this, change type to function_view.
2489 (class reg_buffer) <save>: Remove src parameter.
2490 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2491 parameter non-const in first overload. Remove src parameter in
2492 second overload.
2493 * regcache.c (do_cooked_read): Remove.
2494 (readonly_detached_regcache::readonly_detached_regcache): Make
2495 parameter non-const, adjust call to other constructor.
2496 (reg_buffer::save): Remove src parameter.
2497 * frame.c (do_frame_register_read): Remove.
2498 (frame_save_as_regcache): Use lambda function.
2499 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2500 parameter to ppu2spu_data *.
2501 (ppu2spu_sniffer): Use lambda function.
2502
19f3f25f
SM
25032018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2504
2505 * record-full.c (record_full_target::insert_breakpoint): Remove
2506 "struct" keyword, add const.
2507
d0ac1c44
SM
25082018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2509
2510 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2511 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2512 * configure.ac: Remove AC_PREREQ, add missing quoting.
2513 * gnulib/configure.ac: Modernize usage of
2514 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2515 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2516 (AUTOMAKE_VERSION): Bump to 1.15.1.
2517 * configure: Re-generate.
2518 * config.in: Re-generate.
2519 * aclocal.m4: Re-generate.
2520 * gnulib/aclocal.m4: Re-generate.
2521 * gnulib/config.in: Re-generate.
2522 * gnulib/configure: Re-generate.
2523 * gnulib/import/Makefile.in: Re-generate.
2524
6ae50267
PA
25252018-06-19 Pedro Alves <palves@redhat.com>
2526
2527 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2528 (lookup_minimal_symbol_by_pc_section): ... here with
2529 gdb_assert_not_reached added.
2530
61b04dd0
PA
25312018-06-19 Pedro Alves <palves@redhat.com>
2532
2533 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2534 parameter with a block parameter. Compare location's block symbol
2535 with the frame's block instead of addresses.
2536 (skip_inline_frames): Pass the current block instead of the
2537 frame's address. Break out as soon as we determine the frame
2538 should not be skipped.
2539
f709fabb
TT
25402018-06-18 Tom Tromey <tom@tromey.com>
2541
2542 * solib-aix.c (solib_aix_get_section_offsets): Return
2543 unique_xmalloc_ptr.
2544 (solib_aix_solib_create_inferior_hook): Update.
2545
668eb2f0
TT
25462018-06-18 Tom Tromey <tom@tromey.com>
2547
2548 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2549
309822ca
TT
25502018-06-18 Tom Tromey <tom@tromey.com>
2551
2552 * solib-frv.c (frv_relocate_main_executable): Use
2553 unique_xmalloc_ptr.
2554 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2555 unique_xmalloc_ptr.
2556
06424eac
TT
25572018-06-18 Tom Tromey <tom@tromey.com>
2558
2559 * objfiles.h (inhibit_section_map_updates): Update.
2560 (resume_section_map_updates, resume_section_map_updates_cleanup):
2561 Remove.
2562 * solib-svr4.c (svr4_handle_solib_event): Update.
2563 * objfiles.c (inhibit_section_map_updates): Return
2564 scoped_restore_tmpl<int>.
2565 (resume_section_map_updates, resume_section_map_updates_cleanup):
2566 Remove.
2567
b4be9fad
TT
25682018-06-18 Tom Tromey <tom@tromey.com>
2569
2570 * valprint.h (read_string): Update.
2571 * valprint.c (read_string): Change type of "buffer".
2572 (val_print_string): Update.
2573 * python/py-value.c (valpy_string): Update.
2574 * language.h (struct language_defn) <la_get_string>: Change
2575 type of "buffer".
2576 (default_get_string, c_get_string): Update.
2577 * language.c (default_get_string): Change type of "buffer".
2578 * guile/scm-value.c (gdbscm_value_to_string): Update.
2579 * c-lang.c (c_get_string): Change type of "buffer".
2580
3f0dbd67
TT
25812018-06-18 Tom Tromey <tom@tromey.com>
2582
2583 * ser-mingw.c (struct pipe_state_destroyer): New.
2584 (pipe_state_up): New typedef.
2585 (cleanup_pipe_state): Remove.
2586 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2587
69d340c6
TT
25882018-06-18 Tom Tromey <tom@tromey.com>
2589
2590 * rust-lang.h (rust_yyerror): Don't declare.
2591 * rust-lang.c (rust_language_defn): Update.
2592 * rust-exp.y (yyerror): Now static.
2593 * parse.c (parse_exp_in_context_1): Update.
2594 * p-lang.h (p_yyerror): Don't declare.
2595 * p-lang.c (p_language_defn): Update.
2596 * p-exp.y (yyerror): Now static.
2597 * opencl-lang.c (opencl_language_defn): Update.
2598 * objc-lang.c (objc_language_defn): Update.
2599 * m2-lang.h (m2_yyerror): Don't declare.
2600 * m2-lang.c (m2_language_defn): Update.
2601 * m2-exp.y (yyerror): Now static.
2602 * language.h (struct language_defn) <la_error>: Remove.
2603 * language.c (unk_lang_error): Remove.
2604 (unknown_language_defn, auto_language_defn): Remove.
2605 * go-lang.h (go_yyerror): Don't declare.
2606 * go-lang.c (go_language_defn): Update.
2607 * go-exp.y (yyerror): Now static.
2608 * f-lang.h (f_yyerror): Don't declare.
2609 * f-lang.c (f_language_defn): Update.
2610 * f-exp.y (yyerror): Now static.
2611 * d-lang.h (d_yyerror): Don't declare.
2612 * d-lang.c (d_language_defn): Update.
2613 * d-exp.y (yyerror): Now static.
2614 * c-lang.h (c_yyerror): Don't declare.
2615 * c-lang.c (c_language_defn, cplus_language_defn)
2616 (asm_language_defn, minimal_language_defn): Update.
2617 * c-exp.y (yyerror): Now static.
2618 * ada-lang.h (ada_yyerror): Don't declare.
2619 * ada-lang.c (ada_language_defn): Update.
2620 * ada-exp.y (yyerror): Now static.
2621
e9902bfc
AH
26222018-06-18 Alan Hayward <alan.hayward@arm.com>
2623
2624 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2625 (store_sveregs_to_thread): Likewise.
2626 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2627 (aarch64_linux_store_inferior_registers): Likewise.
2628 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2629 function.
2630 (aarch64_sve_regs_copy_to_regcache): Likewise.
2631 (aarch64_sve_regs_copy_from_regcache): Likewise.
2632 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2633 declaration.
2634 (aarch64_sve_regs_copy_to_regcache): Likewise.
2635 (aarch64_sve_regs_copy_from_regcache): Likewise.
2636 (sve_context): Structure from Linux headers.
2637 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2638 (SVE_SIG_ZREG_SIZE): Likewise.
2639 (SVE_SIG_PREG_SIZE): Likewise.
2640 (SVE_SIG_FFR_SIZE): Likewise.
2641 (SVE_SIG_REGS_OFFSET): Likewise.
2642 (SVE_SIG_ZREGS_OFFSET): Likewise.
2643 (SVE_SIG_ZREG_OFFSET): Likewise.
2644 (SVE_SIG_ZREGS_SIZE): Likewise.
2645 (SVE_SIG_PREGS_OFFSET): Likewise.
2646 (SVE_SIG_PREG_OFFSET): Likewise.
2647 (SVE_SIG_PREGS_SIZE): Likewise.
2648 (SVE_SIG_FFR_OFFSET): Likewise.
2649 (SVE_SIG_REGS_SIZE): Likewise.
2650 (SVE_SIG_CONTEXT_SIZE): Likewise.
2651 (SVE_PT_REGS_MASK): Likewise.
2652 (SVE_PT_REGS_FPSIMD): Likewise.
2653 (SVE_PT_REGS_SVE): Likewise.
2654 (SVE_PT_VL_INHERIT): Likewise.
2655 (SVE_PT_VL_ONEXEC): Likewise.
2656 (SVE_PT_REGS_OFFSET): Likewise.
2657 (SVE_PT_FPSIMD_OFFSET): Likewise.
2658 (SVE_PT_FPSIMD_SIZE): Likewise.
2659 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2660 (SVE_PT_SVE_PREG_SIZE): Likewise.
2661 (SVE_PT_SVE_FFR_SIZE): Likewise.
2662 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2663 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2664 (__SVE_SIG_TO_PT): Likewise.
2665 (SVE_PT_SVE_OFFSET): Likewise.
2666 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2667 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2668 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2669 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2670 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2671 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2672 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2673 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2674 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2675 (SVE_PT_SVE_SIZE): Likewise.
2676 (SVE_PT_SIZE): Likewise.
2677 (HAS_SVE_STATE): New define.
2678
17a1cc89
AH
26792018-06-18 Alan Hayward <alan.hayward@arm.com>
2680
2681 * nat/aarch64-sve-linux-sigcontext.h: New file.
2682 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2683 new files.
2684 (SVE_VQ_MIN): Likewise.
2685 (SVE_VQ_MAX): Likewise.
2686 (SVE_VL_MIN): Likewise.
2687 (SVE_VL_MAX): Likewise.
2688 (SVE_NUM_ZREGS): Likewise.
2689 (SVE_NUM_PREGS): Likewise.
2690 (sve_vl_valid): Likewise.
2691 (struct user_sve_header): Likewise.
2692
7010835a
AB
26932018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2694 Richard Bunt <Richard.Bunt@arm.com>
2695
2696 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2697 was requested by GDB.
2698
479b3ef4
TV
26992018-06-15 Tom de Vries <tdevries@suse.de>
2700
2701 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2702
8199b8f4
SM
27032018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2704
2705 * gnulib/update-gnulib.sh: Print expected versions of
2706 autoconf/aclocal.
2707
55c748a1
SM
27082018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2709
2710 * arch-utils.c (default_type_align): Use type_length_units.
2711 * gdbtypes.c (type_align): Use type_length_units.
2712
87a8eca7
PW
27132018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2714
2715 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2716 of 'define' command.
2717
5d9a0608
TV
27182018-06-14 Tom de Vries <tdevries@suse.de>
2719
2720 PR cli/22573
2721 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2722 get_no_prettyformat_print_options.
2723
ab89b5a5
SM
27242018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2725
2726 * sparc-nat.h: Include target.h.
2727 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2728 <fetch_registers>: Remove this argument in function call.
2729 <store_registers>: Remove this argument in function call, remove
2730 extra semicolon.
2731 <low_forget_process>: Call sparc64_forget_process instead of
2732 sparc_forget_process.
2733
62c808ae
RO
27342018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2735
2736 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2737 (procfs_target::make_corefile_notes): Adjust to new
2738 target_read_alloc return type.
2739
1840d81a
AB
27402018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2741 Stephen Roberts <stephen.roberts@arm.com>
2742
2743 PR gdb/22882
2744 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2745 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2746 Move should_notify_stop local into more inner scope.
2747
9516f85a
AB
27482018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2749 Stephen Roberts <stephen.roberts@arm.com>
2750
2751 PR gdb/22882
2752 * infrun.c (resume_1): Add call to mark_async_event_handler.
2753
defd2172
AB
27542018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2755
2756 * infrun.c (do_target_wait): Change old version of $pc printed.
2757
7b23e087
SM
27582018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2759
2760 * dwarf2read.c (read_index_from_section): Rename to...
2761 (read_gdb_index_from_section): ... this, update all callers.
2762 (dwarf2_read_index): Rename to...
2763 (dwarf2_read_gdb_index): ... this, update all callers.
2764
69c67a0b
JDA
27652018-06-11 John David Anglin <danglin@gcc.gnu.org>
2766
2767 * gdb/hppa-linux-nat.c
2768 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2769 hppa_linux_nat_target::fetch_registers.
2770
65d4cada
AH
27712018-06-11 Alan Hayward <alan.hayward@arm.com>
2772
2773 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2774 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2775 (AARCH64_DWARF_SVE_FFR): Likewise.
2776 (AARCH64_DWARF_SVE_P0): Likewise.
2777 (AARCH64_DWARF_SVE_Z0): Likewise.
2778
f868386e
AH
27792018-06-11 Alan Hayward <alan.hayward@arm.com>
2780
2781 * common/common-regcache.h (raw_compare): New function.
2782 * regcache.c (regcache::raw_compare): Likewise.
2783 * regcache.h (regcache::raw_compare): New declaration.
2784
9c861883
AH
27852018-06-11 Alan Hayward <alan.hayward@arm.com>
2786
2787 * common/common-regcache.h (reg_buffer_common): New structure.
2788 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2789 (reg_buffer::raw_supply): Likewise.
2790 (reg_buffer::raw_supply_integer): Likewise.
2791 (reg_buffer::raw_supply_zeroed): Likewise.
2792 (reg_buffer::raw_collect): Likewise.
2793 (reg_buffer::raw_collect_integer): Likewise.
2794 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2795 (reg_buffer::raw_supply): Likewise.
2796 (reg_buffer::raw_supply_integer): Likewise.
2797 (reg_buffer::raw_supply_zeroed): Likewise.
2798 (reg_buffer::raw_collect): Likewise.
2799 (reg_buffer::raw_collect_integer): Likewise.
2800
953edf2b
TT
28012018-06-10 Tom Tromey <tom@tromey.com>
2802
2803 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2804 (class remote_state) <stop_reply_queue>: Now std::vector.
2805 (remote_state::~remote_state)
2806 (remote_target::stop_reply_queue_length): Update.
2807 (struct queue_iter_param, remove_child_of_pending_fork)
2808 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2809 (check_pending_event_prevents_wildcard_vcont_callback)
2810 (remove_stop_reply_for_inferior)
2811 (remove_stop_reply_of_remote_state)
2812 (remote_notif_remove_once_on_match)
2813 (stop_reply_match_ptid_and_ws)
2814 (remote_kill_child_of_pending_fork): Remove.
2815 (remote_target::remove_new_fork_children)
2816 (remote_target::check_pending_events_prevent_wildcard_vcont)
2817 (remote_target::discard_pending_stop_replies)
2818 (remote_target::discard_pending_stop_replies_in_queue)
2819 (remote_target::remote_notif_remove_queued_reply)
2820 (remote_target::queued_stop_reply)
2821 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2822 (remote_target::wait, remote_target::kill_new_fork_children)
2823 (remote_target::async): Update.
2824
1ddbba9d
TT
28252018-06-10 Tom Tromey <tom@tromey.com>
2826
2827 * record-full.c (record_full_arch_list_cleanups): Remove.
2828 (record_full_message): Use try/catch.
2829 (record_full_wait_cleanups): Remove.
2830 (record_full_wait_1): Use try/catch.
2831 (record_full_restore): Likewise.
2832
219605fd
TT
28332018-06-10 Tom Tromey <tom@tromey.com>
2834
2835 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2836 declare VEC. Add constructor.
2837 <in_target_beneath>: Now bool.
2838 (record_full_breakpoints): Now a std::vector, static.
2839 (record_full_sync_record_breakpoints)
2840 (record_full_init_record_breakpoints)
2841 (record_full_target::insert_breakpoint)
2842 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2843
71b73764
SM
28442018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2845
2846 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2847 * serial.c (serial_interface_lookup): Remove struct keyword.
2848
4360561f
TT
28492018-06-10 Tom Tromey <tom@tromey.com>
2850
2851 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2852 method.
2853 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2854 a method.
2855 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2856 method.
2857 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2858 "beneath" as a method.
2859 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2860 Use "beneath" as a method.
2861
d14b92bf
TT
28622018-06-10 Tom Tromey <tom@tromey.com>
2863
2864 * tracefile.c (struct trace_file_writer_deleter): New.
2865 <operator()>: Rename from trace_file_writer_xfree.
2866 (trace_file_writer_up): New typedef.
2867 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2868
835dcf92
SM
28692018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2870
2871 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2872 <m_registers, m_register_status>: Change type to
2873 std::unique_ptr.
2874 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2875 XCNEWVEC.
2876
aac0d564
SM
28772018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2878
2879 * common/common-regcache.h (enum register_status): Add
2880 underlying type "signed char".
2881 * regcache.h (reg_buffer) <m_register_status>: Change type to
2882 register_status *.
2883 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2884 register_status instead of signed char.
2885 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2886 (reg_buffer::get_register_status): Remove cast.
2887 (readable_regcache::raw_read): Remove cast.
2888 (readable_regcache::cooked_read): Remove cast.
2889
77ad7394
TT
28902018-06-09 Tom Tromey <tom@tromey.com>
2891
2892 * source.c (reverse_search_command, forward_search_command): Use
2893 scoped_fd.
2894
191cca63
TT
28952018-06-09 Tom Tromey <tom@tromey.com>
2896
2897 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2898 (serial_ops_list): Now static, std::vector.
2899 (serial_interface_lookup, serial_add_interface): Update.
2900
c5d0225d
TT
29012018-06-09 Tom Tromey <tom@tromey.com>
2902
2903 * dwarf2read.c (process_cu_includes): Update.
2904 (process_full_comp_unit): Update.
2905 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2906 std::vector.
2907
aeab5128
PK
29082018-06-08 Paul Koning <paul_koning@dell.com>
2909
2910 PR gdb/23252
2911
2912 * python/python.c (do_start_initialization):
2913 Avoid call to internal Python API.
2914 (init__gdb_module): New function.
2915
5045b3d7
GB
29162018-06-08 Gary Benson <gbenson@redhat.com>
2917
2918 * linux-thread-db.c (valprint.h): New include.
2919 (struct check_thread_db_info): New structure.
2920 (check_thread_db_on_load, tdb_testinfo): New static globals.
2921 (check_thread_db, check_thread_db_callback): New functions.
2922 (try_thread_db_load_1): Run integrity checks if requested.
2923 (maintenance_check_libthread_db): New function.
2924 (_initialize_thread_db): Register "maint check libthread-db"
2925 and "maint set/show check-libthread-db".
2926 * NEWS: Mention the above new commands.
2927
2f4f025f
TT
29282018-06-08 Tom Tromey <tom@tromey.com>
2929
2930 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2931 now a method.
2932
343b0027
TT
29332018-06-08 Tom Tromey <tom@tromey.com>
2934
2935 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2936
8dcc53b3
TT
29372018-06-08 Tom Tromey <tom@tromey.com>
2938
2939 * common/btrace-common.h (struct btrace_data): Add constructor,
2940 destructor, move assignment operator.
2941 <empty, clear, fini>: New methods.
2942 <format>: Initialize.
2943 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2944 (btrace_data_empty): Don't declare.
2945 * common/btrace-common.c (btrace_data_init): Remove.
2946 (btrace_data::fini): Rename from btrace_data_fini.
2947 (btrace_data::empty): Rename from btrace_data_empty.
2948 (btrace_data::clear): Rename from btrace_data_clear. Return
2949 bool.
2950 * btrace.h (make_cleanup_btrace_data): Don't declare.
2951 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2952 (parse_xml_btrace): Update.
2953 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2954 (maint_btrace_clear_packet_history_cmd): Update.
2955
a1740ee1
PA
29562018-06-07 Pedro Alves <palves@redhat.com>
2957
2958 * target.h (target_ops) <beneath>: Now a method. All references
2959 updated.
2960 (class target_stack): New.
2961 * target.c (g_target_stack): New.
2962 (g_current_top_target): Delete.
2963 (current_top_target): Get the top target out of g_target_stack.
2964 (target_stack::push, target_stack::unpush): New.
2965 (push_target, unpush_target): Reimplement.
2966 (target_is_pushed): Reimplement in terms of g_target_stack.
2967 (target_ops::beneath, target_stack::find_beneath): New.
2968
d6ca69cd
PA
29692018-06-07 Pedro Alves <palves@redhat.com>
2970
2971 * target.h (find_target_beneath): Delete declaration.
2972 * target.c (find_target_beneath): Delete definition.
2973 * aix-thread.c: All callers of find_target_beneath adjusted to
2974 call target_ops::beneath instead.
2975 * bsd-uthread.c: Likewise.
2976 * linux-thread-db.c: Likewise.
2977 * ravenscar-thread.c: Likewise.
2978 * sol-thread.c: Likewise.
2979 * spu-multiarch.c: Likewise.
2980
b6a8c27b
PA
29812018-06-07 Pedro Alves <palves@redhat.com>
2982
2983 * target.h (target_ops) <beneath>: Now a method. All references
2984 updated.
2985 (target_ops) <m_beneath>: New.
2986 * target.c (target_ops::beneath): New.
2987 * corelow.c: Adjust all references to target_ops::beneath.
2988 * linux-thread-db.c: Likewise.
2989 * make-target-delegates: Likewise.
2990 * record-btrace.c: Likewise.
2991 * record-full.c: Likewise.
2992 * remote.c: Likewise.
2993 * target.c: Likewise.
2994 * target-delegates.c: Regenerate.
2995
8b88a78e
PA
29962018-06-07 Pedro Alves <palves@redhat.com>
2997
2998 * target.h (target_stack): Delete.
2999 (current_top_target): Declare function.
3000 * target.c (target_stack): Delete.
3001 (g_current_top_target): New.
3002 (current_top_target): New function.
3003 * auxv.c: Use current_top_target instead of target_stack
3004 throughout.
3005 * avr-tdep.c: Likewise.
3006 * breakpoint.c: Likewise.
3007 * corefile.c: Likewise.
3008 * elfread.c: Likewise.
3009 * eval.c: Likewise.
3010 * exceptions.c: Likewise.
3011 * frame.c: Likewise.
3012 * gdbarch-selftests.c: Likewise.
3013 * gnu-v3-abi.c: Likewise.
3014 * ia64-tdep.c: Likewise.
3015 * ia64-vms-tdep.c: Likewise.
3016 * infcall.c: Likewise.
3017 * infcmd.c: Likewise.
3018 * infrun.c: Likewise.
3019 * linespec.c: Likewise.
3020 * linux-tdep.c: Likewise.
3021 * minsyms.c: Likewise.
3022 * ppc-linux-nat.c: Likewise.
3023 * ppc-linux-tdep.c: Likewise.
3024 * procfs.c: Likewise.
3025 * regcache.c: Likewise.
3026 * remote.c: Likewise.
3027 * rs6000-tdep.c: Likewise.
3028 * s390-linux-nat.c: Likewise.
3029 * s390-tdep.c: Likewise.
3030 * solib-aix.c: Likewise.
3031 * solib-darwin.c: Likewise.
3032 * solib-dsbt.c: Likewise.
3033 * solib-spu.c: Likewise.
3034 * solib-svr4.c: Likewise.
3035 * solib-target.c: Likewise.
3036 * sparc-tdep.c: Likewise.
3037 * sparc64-tdep.c: Likewise.
3038 * spu-tdep.c: Likewise.
3039 * symfile.c: Likewise.
3040 * symtab.c: Likewise.
3041 * target-descriptions.c: Likewise.
3042 * target-memory.c: Likewise.
3043 * target.c: Likewise.
3044 * target.h: Likewise.
3045 * tracefile-tfile.c: Likewise.
3046 * tracepoint.c: Likewise.
3047 * valops.c: Likewise.
3048 * valprint.c: Likewise.
3049 * value.c: Likewise.
3050 * windows-tdep.c: Likewise.
3051 * mi/mi-main.c: Likewise.
3052
c7110220
TT
30532018-06-07 Tom Tromey <tom@tromey.com>
3054
3055 * valprint.h (build_address_symbolic): Declare.
3056 * printcmd.c (print_address_symbolic): Update.
3057 (build_address_symbolic): Change "name" and "filename" to
3058 std::string.
3059 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3060 Update.
3061 * defs.h (build_address_symbolic): Remove declaration.
3062
63bad7b6
AH
30632018-06-07 Alan Hayward <alan.hayward@arm.com>
3064
3065 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3066 (aarch64_vnv_type): Add function.
3067 (aarch64_pseudo_register_name): Add V regs for SVE.
3068 (aarch64_pseudo_register_type): Likewise.
3069 (aarch64_pseudo_register_reggroup_p): Likewise.
3070 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3071 (aarch64_pseudo_read_value): Add V regs for SVE.
3072 (aarch64_pseudo_write_2): Use V0 offset for SVE
3073 (aarch64_pseudo_write): Add V regs for SVE.
3074 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3075
13e3c608
SDJ
30762018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3077
3078 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3079 (sve_vl_from_vq): Likewise.
3080
c61b06a1
TT
30812018-06-05 Tom Tromey <tom@tromey.com>
3082
3083 * cli/cli-cmds.c (show_version): Update.
3084 * top.c (print_gdb_version): Add "interactive" parameter.
3085 Update.
3086 * main.c (captured_main_1): Update.
3087 * top.h (print_gdb_version): Add "interactive" parameter and a
3088 comment.
3089
115f7325
DM
30902018-06-05 David Malcolm <dmalcolm@redhat.com>
3091
3092 * common/enum-flags.h: Add trailing semicolon to example in
3093 comment.
3094
eb6af809
TT
30952018-06-05 Tom Tromey <tom@tromey.com>
3096
3097 PR cli/12326:
3098 * NEWS: Add entry about pager.
3099 * utils.c (pagination_disabled_for_command): New global.
3100 (prompt_for_continue): Allow "c" response to prompt.
3101 (reinitialize_more_filter): Clear
3102 pagination_disabled_for_command.
3103 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3104
54d343a2
TT
31052018-06-04 Tom Tromey <tom@tromey.com>
3106
3107 * ada-lang.h (ada_lookup_symbol_list): Update.
3108 * ada-lang.c (resolve_subexp): Update.
3109 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3110 parameter.
3111 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3112 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3113 results parameter to std::vector.
3114 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3115 Update.
3116 * ada-exp.y (block_lookup): Update.
3117 (select_possible_type_sym): Change type of syms. Remove nsyms
3118 parameter.
3119 (write_var_or_type, write_name_assoc): Update.
3120
178d6a63
JB
31212018-06-04 Joel Brobecker <brobecker@adacore.com>
3122
3123 * windows-nat.c (windows_nat_target::xfer_partial): Return
3124 TARGET_XFER_E_IO if we need to delegate to the target beneath
3125 but BENEATH is NULL.
3126
baf00c2d
SM
31272018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3128
3129 * Makefile.in (config.status): Add configure.nat as a
3130 dependency.
3131
214b073c
TT
31322018-06-04 Tom Tromey <tom@tromey.com>
3133
3134 * cp-name-parser.y (cpname_state): Add method declarations.
3135 (HANDLE_QUAL): Update.
3136 (cpname_state::d_grab, cpname_state::fill_comp)
3137 (cpname_state::make_operator, cpname_state::make_dtor)
3138 (cpname_state::make_builtin_type, cpname_state::make_name)
3139 (cpname_state::d_qualify, cpname_state::d_int_type)
3140 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3141 (%union): Move earlier.
3142
62b74cb8
AH
31432018-06-04 Alan Hayward <alan.hayward@arm.com>
3144
3145 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3146
3c5cd5c3
AH
31472018-06-04 Alan Hayward <alan.hayward@arm.com>
3148
3149 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3150 (aarch64_pseudo_write_1): Likewise.
3151 (aarch64_pseudo_read_value): Use helper.
3152 (aarch64_pseudo_write): Likewise.
3153
59f413d5
PA
31542018-06-04 Pedro Alves <palves@redhat.com>
3155
3156 * darwin-nat.c (darwin_ops): Delete.
3157 (darwin_attach_pid): Use get_native_target.
3158
1332a140
AH
31592018-06-04 Alan Hayward <alan.hayward@arm.com>
3160
3161 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3162 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3163
ba2d2bb2
AH
31642018-06-04 Alan Hayward <alan.hayward@arm.com>
3165
3166 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3167 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3168 (aarch64_gdbarch_init): Check for SVE.
3169 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3170
31712018-06-04 Alan Hayward <alan.hayward@arm.com>
39bfb937
AH
3172
3173 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3174 * aarch64-tdep.h (aarch64_read_description): Likewise.
3175 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3176 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3177 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3178 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3179 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3180
41c60b4b
SM
31812018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3182
3183 * value.c (value_fetch_lazy_bitfield): New.
3184 (value_fetch_lazy_memory): New.
3185 (value_fetch_lazy_register): New.
3186 (value_fetch_lazy): Factor out to smaller functions.
3187
7b640f72
TT
31882018-06-01 Tom Tromey <tom@tromey.com>
3189
3190 * cp-name-parser.y (backslashable, represented): Now const.
3191
98e69eb3
TT
31922018-06-01 Tom Tromey <tom@tromey.com>
3193
3194 * cp-name-parser.y: Include parser-defs.h.
3195 (parser_fprintf): Remove declaration.
3196
49265499
TT
31972018-06-01 Tom Tromey <tom@tromey.com>
3198
3199 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3200 %parse-param.
3201 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3202 (global_result): Remove globals.
3203 (struct cpname_state): New.
3204 (yyparse): Don't declare.
3205 (yylex, yyerror): Move declarations after %union.
3206 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3207 (make_name): Add state parameter.
3208 Update all callers.
3209 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3210 parameter.
3211 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3212 Update.
3213 (yylex): Add lvalp, state parameters.
3214 (yyerror): Add state parameter.
3215 (cp_demangled_name_to_comp): Update.
3216
55b6c984
TT
32172018-06-01 Tom Tromey <tom@tromey.com>
3218
3219 * cp-name-parser.y (parser_fprintf): Declare.
3220 (GDB_YY_REMAP_PREFIX): Define.
3221 Include yy-remap.h. Don't redefine yy* identifiers.
3222
3513a6bb
TT
32232018-06-01 Tom Tromey <tom@tromey.com>
3224
3225 * python/py-type.c (typy_legacy_template_argument): Update.
3226 * cp-support.h (cp_demangled_name_to_comp): Update.
3227 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3228 parameter to be a "std::string *".
3229 (main): Update.
3230
e9cb46ab
L
32312018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3232
3233 * ada-lex.l: Include "diagnostics.h" instead of
3234 "common/diagnostics.h".
3235 * unittests/environ-selftests.c: Likewise.
3236 * common/diagnostics.h: Moved to ../include.
3237
8e817061
JB
32382018-06-01 Joel Brobecker <brobecker@adacore.com>
3239
3240 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3241 to language_mode_manual while calling breakpoint_re_set_one.
3242
a737d952
TT
32432018-06-01 Tom Tromey <tom@tromey.com>
3244
3245 * valops.c (value_cast_structs, destructor_name_p): Update.
3246 * symtab.c (gdb_mangle_name): Update.
3247 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3248 Update.
3249 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3250 (pascal_object_print_value_fields, pascal_object_print_value):
3251 Update.
3252 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3253 * linespec.c (find_methods): Update.
3254 * gdbtypes.h (type_name_no_tag): Remove.
3255 (type_name_or_error): Rename from type_name_no_tag_or_error.
3256 * gdbtypes.c (type_name_no_tag): Remove.
3257 (type_name_or_error): Rename from type_name_no_tag_or_error.
3258 (lookup_struct_elt_type, check_typedef): Update.
3259 * expprint.c (print_subexp_standard): Update.
3260 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3261 * d-namespace.c (d_lookup_nested_symbol): Update.
3262 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3263 (cp_print_class_member): Update.
3264 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3265 * completer.c (add_struct_fields): Update.
3266 * c-typeprint.c (cp_type_print_derivation_info)
3267 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3268 Update.
3269 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3270 (ada_prefer_type, ada_is_exception_sym): Update.
3271
e86ca25f
TT
32722018-06-01 Tom Tromey <tom@tromey.com>
3273
3274 * valops.c (enum_constant_from_type, value_namespace_elt)
3275 (value_maybe_namespace_elt): Update.
3276 * valarith.c (find_size_for_pointer_math): Update.
3277 * target-descriptions.c (make_gdb_type): Update.
3278 * symmisc.c (print_symbol): Update.
3279 * stabsread.c (define_symbol, read_type)
3280 (complain_about_struct_wipeout, add_undefined_type)
3281 (cleanup_undefined_types_1): Update.
3282 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3283 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3284 (rust_internal_print_type, rust_composite_type)
3285 (rust_evaluate_funcall, rust_evaluate_subexp)
3286 (rust_inclusive_range_type_p): Update.
3287 * python/py-type.c (typy_get_tag): Update.
3288 * p-typeprint.c (pascal_type_print_base): Update.
3289 * mdebugread.c (parse_symbol, parse_type): Update.
3290 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3291 Update.
3292 * guile/scm-type.c (gdbscm_type_tag): Update.
3293 * go-lang.c (sixg_string_p): Update.
3294 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3295 Update.
3296 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3297 (TYPE_TAG_NAME): Remove.
3298 * gdbtypes.c (type_name_no_tag): Simplify.
3299 (check_typedef, check_types_equal, recursive_dump_type)
3300 (copy_type_recursive, arch_composite_type): Update.
3301 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3302 in summary mode when needed.
3303 * eval.c (evaluate_funcall): Update.
3304 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3305 (process_structure_scope, read_enumeration_type)
3306 (read_namespace_type, read_module_type, determine_prefix): Update.
3307 * cp-support.c (inspect_type): Update.
3308 * coffread.c (process_coff_symbol, decode_base_type): Update.
3309 * c-varobj.c (c_is_path_expr_parent): Update.
3310 * c-typeprint.c (c_type_print_base_struct_union): Update.
3311 (c_type_print_base_1): Update. Print struct/class/union/enum in
3312 summary when using C language.
3313 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3314 (gen_maybe_namespace_elt): Update.
3315 * ada-lang.c (ada_type_name): Simplify.
3316 (empty_record, ada_template_to_fixed_record_type_1)
3317 (template_to_static_fixed_type)
3318 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3319
c1ec8cea
TT
33202018-06-01 Tom Tromey <tom@tromey.com>
3321
3322 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3323 c_print_type.
3324 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3325 (c_print_type): Update.
3326 (c_print_type): New overload.
3327 (c_type_print_varspec_prefix, c_type_print_args)
3328 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3329 (c_type_print_base_struct_union, c_type_print_base_1)
3330 (cp_type_print_method_args): Add "language" parameter.
3331 (c_type_print_base): Update.
3332 * c-lang.h (c_print_type): Add new overload.
3333
bc8453a7
TT
33342018-06-01 Tom Tromey <tom@tromey.com>
3335
3336 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3337 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3338
739e8682
AH
33392018-06-01 Alan Hayward <alan.hayward@arm.com>
3340
3341 * aarch64-tdep.c (aarch64_sve_register_names): New const
3342 var.
3343 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3344 (AARCH64_SVE_Z_REGS_NUM): New define.
3345 (AARCH64_SVE_P_REGS_NUM): Likewise.
3346 (AARCH64_SVE_NUM_REGS): Likewise.
3347
8a60efe7
UB
33482018-05-31 Uros Bizjak <ubizjak@gmail.com>
3349
3350 * nat/linux-ptrace.h [__alpha__]
3351 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3352 definitions.
3353
4b2dfa9d
MR
33542018-05-31 Maciej W. Rozycki <macro@mips.com>
3355
3356 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3357 the endianness selected.
3358 * NEWS: Document `set endian auto' mode operation update.
3359
122394f1
AH
33602018-05-31 Alan Hayward <alan.hayward@arm.com>
3361
3362 * Makefile.in: Add new header.
3363 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3364 (sve_vl_from_vg): Likewise.
3365 (sve_vq_from_vl): Likewise.
3366 (sve_vl_from_vq): Likewise.
3367 (sve_vq_from_vg): Likewise.
3368 (sve_vg_from_vq): Likewise.
3369 * configure.nat: Add new c file.
3370 * nat/aarch64-sve-linux-ptrace.c: New file.
3371 * nat/aarch64-sve-linux-ptrace.h: New file.
3372
95228a0d
AH
33732018-05-31 Alan Hayward <alan.hayward@arm.com>
3374
3375 * aarch64-linux-nat.c (aarch64_linux_read_description):
3376 Add parmeter zero.
3377 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3378 Likewise.
3379 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3380 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3381 (aarch64_gdbarch_init): Add parmeter zero.
3382 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3383 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3384 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3385 parmeter.
3386 * doc/gdb.texinfo: Describe SVE feature
3387 * features/aarch64-sve.c: New file.
3388
5969f0db
OJ
33892018-05-31 Omair Javaid <omair.javaid@linaro.org>
3390
3391 PR gdb/23210
3392 * gdbarch.sh (significant_addr_bit): Default to zero when
3393 not set by target architecture.
3394 * gdbarch.c: Re-generated.
3395 * utils.c (address_significant): Update.
3396
61367c61
JB
33972018-05-30 Joel Brobecker <brobecker@adacore.com>
3398
3399 * stack.c (func_command): Remove trailing newline in call to error.
3400
34a79281
SM
34012018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3402
3403 * regcache.h (regcache_raw_collect): Remove, update callers to
3404 use regcache::raw_collect.
3405 * regcache.c (regcache_raw_collect): Remove.
3406
73e1c03f
SM
34072018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3408
3409 * regcache.h (regcache_raw_supply): Remove, update callers to
3410 use detached_regcache::raw_supply.
3411 * regcache.c (regcache_raw_supply): Remove.
3412
e4c4a59b
SM
34132018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3414
3415 * regcache.h (regcache_cooked_write_part): Remove, update
3416 callers to use regcache::cooked_write_part.
3417 * regcache.c (regcache_cooked_write_part): Remove.
3418
73bb0000
SM
34192018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3420
3421 * regcache.h (regcache_cooked_read_part): Remove, update callers
3422 to use readable_regcache::cooked_read_part.
3423 * regcache.c (regcache_cooked_read_part): Remove.
3424
46a45e9d
SM
34252018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3426
3427 * regcache.h (regcache_cooked_read_value): Remove, update
3428 callers to use readable_regcache::cooked_read_value.
3429 * regcache.c (regcache_cooked_read_value): Remove.
3430
b66f5587
SM
34312018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3432
3433 * regcache.h (regcache_cooked_write): Remove, update callers to
3434 use regcache::cooked_write.
3435 * regcache.c (regcache_cooked_write): Remove.
3436
6aa7d724
SM
34372018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3438
3439 * regcache.h (regcache_invalidate): Remove, update callers to
3440 use detached_regcache::invalidate instead.
3441 * regcache.c (regcache_invalidate): Remove.
3442
4f0420fd
SM
34432018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3444
3445 * regcache.h (regcache_raw_write_part): Remove, update callers
3446 to use regcache::raw_write_part instead.
3447 * regcache.c (regcache_raw_write_part): Remove.
3448
502fe83e
SM
34492018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3450
3451 * regcache.h (regcache_raw_read_part): Remove, update callers to
3452 use readable_regcache::raw_read_part instead.
3453 * regcache.c (regcache_raw_read_part): Remove.
3454
dca08e1f
SM
34552018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3456
3457 * regcache.h (regcache_cooked_read): Remove, update callers to
3458 use readable_regcache::cooked_read instead.
3459 * regcache.c (regcache_cooked_read): Remove.
3460
10eaee5f
SM
34612018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3462
3463 * regcache.h (regcache_raw_write): Remove, update callers to use
3464 regcache::raw_write instead.
3465 * regcache.c (regcache_raw_write): Remove.
3466
0b883586
SM
34672018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3468
3469 * regcache.h (regcache_raw_read): Remove, update callers to use
3470 readable_regcache::raw_read instead.
3471 * regcache.c (regcache_raw_read): Remove.
3472
0b47d985
SM
34732018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3474
3475 * regcache.h (regcache_raw_update): Remove, update callers to
3476 use readable_regcache::raw_update instead.
3477 * regcache.c (regcache_raw_update): Remove.
3478
0ec9f114
SM
34792018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3480
3481 * regcache.h (regcache_register_status): Remove, update callers
3482 to use reg_buffer::get_register_status directly instead.
3483 * regcache.c (regcache_register_status): Remove.
3484
222312d3
SM
34852018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3486
3487 * regcache.h (regcache_get_ptid): Remove, update all callers to
3488 call regcache::ptid instead.
3489 * regcache.c (regcache_get_ptid): Remove.
3490
fdbe37e3
SM
34912018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3492
3493 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3494
f7c6f423
PA
34952018-05-30 Pedro Alves <palves@redhat.com>
3496
3497 * common/common-exceptions.h (exception_rethrow): Use
3498 ATTRIBUTE_NORETURN.
3499
52941706
SM
35002018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3501
3502 * breakpoint.c (print_solib_event, check_status_catch_solib):
3503 Remove struct keyword in range-based for loops.
3504 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3505 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3506 Likewise.
3507 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3508 Likewise.
3509 * symfile.c (addr_info_make_relative): Likewise.
3510 * thread.c (value_in_thread_stack_temporaries): Likewise.
3511
bf2977b5
WP
35122018-06-12 Weimin Pan <weimin.pan@oracle.com>
3513
3514 PR gdb/16841
3515 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3516 aggregate type to get its real type before accessing it.
3517
64cc34d8
WP
35182018-05-29 Weimin Pan <weimin.pan@oracle.com>
3519
3520 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3521 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3522 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3523 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3524 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3525 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3526 * printcmd.c (info_address_command): Likewise.
3527
e7ec8713
TT
35282018-05-29 Tom Tromey <tom@tromey.com>
3529
3530 * windows-nat.c (handle_exception): Update fall-through comment.
3531
bcb430e4
TT
35322018-05-29 Tom Tromey <tom@tromey.com>
3533
3534 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3535 (struct program_space) <added_solibs>: Now a std::vector.
3536 * breakpoint.c (print_solib_event): Update.
3537 (check_status_catch_solib): Update.
3538 * progspace.c (clear_program_space_solib_cache): Update.
3539 * solib.c (update_solib_list): Update.
3540
894882e3
TT
35412018-05-29 Tom Tromey <tom@tromey.com>
3542
3543 * python/py-type.c (typy_richcompare): Update.
3544 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3545 * gdbtypes.h (types_deeply_equal): Return bool.
3546 (types_equal): Likewise.
3547 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3548 declare VEC.
3549 (check_types_equal): Change worklist to std::vector. Return
3550 bool.
3551 (struct type_equality_entry): Add constructor.
3552 (compare_maybe_null_strings): Return bool.
3553 (check_types_worklist): Return bool. Change worklist to
3554 std::vector.
3555 (types_deeply_equal): Use std::vector.
3556 (types_equal): Return bool.
3557 (compare_maybe_null_strings): Simplify.
3558
10b2ded4
TT
35592018-05-29 Tom Tromey <tom@tromey.com>
3560
3561 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3562
4f7deebe
TT
35632018-05-29 Tom Tromey <tom@tromey.com>
3564
3565 * objc-lang.h: Don't include cp-support.h.
3566 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3567 declare VEC.
3568
b8283aea
TT
35692018-05-27 Tom Tromey <tom@tromey.com>
3570
3571 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3572
41a883c8
TT
35732018-05-25 Tom Tromey <tom@tromey.com>
3574
3575 * value.c (value::location): Initialize.
3576
bf259e25
TT
35772018-05-25 Tom Tromey <tom@tromey.com>
3578
3579 * dbxread.c (init_bincl_list): Remove.
3580 (bincl_list): Now a std::vector.
3581 (bincls_allocated, next_bincl): Remove.
3582 (free_bincl_list, do_free_bincl_list_cleanup)
3583 (make_cleanup_free_bincl_list): Remove.
3584 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3585 unique_xmalloc_ptr.
3586 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3587 (struct header_file_location): Add constructor.
3588 (add_bincl_to_list): Remove.
3589
d525a99b
TT
35902018-05-25 Tom Tromey <tom@tromey.com>
3591
3592 * tui/tui.c (tui_enable): Update.
3593 * mi/mi-interp.c (mi_interp::init): Update.
3594 * interps.h (class interp) <name>: New method.
3595 <m_name>: Rename from name.
3596 (~scoped_restore_interp): Update.
3597 * interps.c (interp::interp): Update.
3598 (interp_add, interp_set, interp_lookup_existing)
3599 (current_interp_named_p): Update.
3600
da505cff
TT
36012018-05-25 Tom Tromey <tom@tromey.com>
3602
3603 * interps.c (interp_name): Remove.
3604 * mi/mi-interp.c (mi_interp::init): Update.
3605 * interps.h (interp_name): Remove.
3606 (~scoped_restore_interp): Update.
3607 * tui/tui.c (tui_enable): Update.
3608
29f94340
TT
36092018-05-25 Tom Tromey <tom@tromey.com>
3610
3611 * utils.c (fputs_maybe_filtered): Update.
3612 * linespec.c (decode_line_full): Update.
3613 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3614 (mi_print_breakpoint_for_event, mi_solib_loaded)
3615 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3616 (mi_user_selected_context_changed): Update.
3617 * mi/mi-main.c (mi_execute_command): Update.
3618 * cli/cli-script.c (execute_control_command): Update.
3619 * python/python.c (execute_gdb_command): Update.
3620 * solib.c (info_sharedlibrary_command): Update.
3621 * interps.c (interp_ui_out): Remove.
3622 * interps.h (interp_ui_out): Remove.
3623
716b8bc5
TT
36242018-05-25 Tom Tromey <tom@tromey.com>
3625
3626 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3627 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3628 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3629
753ff9bd
TT
36302018-05-25 Tom Tromey <tom@tromey.com>
3631
3632 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3633 * interps.c (interp_exec): Use scoped_restore.
3634
5ca3b260
TT
36352018-05-25 Tom Tromey <tom@tromey.com>
3636
3637 * remote.c (remote_target::remote_file_get): Use
3638 gdb::byte_vector.
3639 (remote_target::remote_file_put): Likewise.
3640
3173aa2f
TT
36412018-05-25 Tom Tromey <tom@tromey.com>
3642
3643 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3644 a std::string.
3645 (get_pe_section_index, add_pe_exported_sym): Update.
3646 (read_pe_exported_syms): Use gdb::def_vector.
3647
09a5e1b5
TT
36482018-05-25 Tom Tromey <tom@tromey.com>
3649
3650 * frame.c (remove_prev_frame): Remove.
3651 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3652
d8dab6c3
MR
36532018-05-25 Maciej W. Rozycki <macro@mips.com>
3654
3655 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3656 Remove prototypes.
3657 * mips-linux-nat.c (supply_fpregset): Always call
3658 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3659 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3660 `mips_fill_fpregset'.
3661 * mips-linux-tdep.c (mips_supply_fpregset)
3662 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3663 (mips_fill_fpregset_wrapper): Remove functions.
3664 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3665 (mips_linux_fpregset): Remove variable.
3666 (mips_linux_iterate_over_regset_sections): Use
3667 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3668 (mips_linux_o32_sigframe_init): Remove comment.
3669
3c69da40
PA
36702018-05-25 Pedro Alves <palves@redhat.com>
3671
3672 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3673 (struct readahead_cache, struct packet_reg, struct
3674 remote_arch_state, class remote_state): Move higher up in the
3675 file.
3676 (remote_target::m_remote_state): Now an object instead of a pointer.
3677 (remote_target::get_remote_state): Adjust.
3678
39f0c204
AB
36792018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3680
3681 * stack.c (select_and_print_frame): Delete.
3682 (struct function_bounds): Move struct within function.
3683 (func_command): Most content moved into new function
3684 find_frame_for_function, use new function, print result, add
3685 function comment.
3686 (find_frame_for_function): New function, now returns a result.
3687
d392224a
PW
36882018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3689
3690 * stack.c (iterate_over_block_arg_vars): Fix comment.
3691 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3692
45f25d6c
AB
36932018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3694
3695 PR gdb/23203
3696 * frame.c
3697 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3698 Define.
3699 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3700 Define.
3701 * frame.h (class scoped_restore_selected_frame): New class.
3702 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3703 of any exception, use scoped_restore_selected_frame to restore the
3704 frame instead.
3705
da05d921
PA
37062018-05-24 Pedro Alves <palves@redhat.com>
3707
3708 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3709 override.
3710
a8be540e
TT
37112018-05-23 Tom Tromey <tom@tromey.com>
3712
3713 * complaints.c (struct complaints): Remove.
3714 (symfile_complaint_book): Remove.
3715 (series): New global.
3716 (complaint_internal): Update.
3717 (clear_complaints): Update.
3718
ff1cf532
TT
37192018-05-23 Tom Tromey <tom@tromey.com>
3720
3721 * complaints.c (counters): New global.
3722 (struct complain): Remove.
3723 (struct complaints) <root>: Remove.
3724 (complaint_sentinel): Remove.
3725 (symfile_complaint_book): Update.
3726 (find_complaint) Remove.
3727 (complaint_internal, clear_complaints): Update.
3728
7ff88174
TT
37292018-05-23 Tom Tromey <tom@tromey.com>
3730
3731 * complaints.c (struct complain) <file, line>: Remove.
3732 (find_complaint): Remove file, line parameters.
3733 (complaint_internal): Update.
3734
de54e1a5
TT
37352018-05-23 Tom Tromey <tom@tromey.com>
3736
3737 * complaints.c (vcomplaint): Remove.
3738 (complaint_internal) Merge in contents of vcomplaint.
3739
2ac237e5
TT
37402018-05-23 Tom Tromey <tom@tromey.com>
3741
3742 * complaints.c (struct complaints) <explanation>: Remove.
3743 (symfile_explanations): Remove.
3744 (symfile_complaint_book): Update.
3745 (vcomplaint): Update.
3746 (struct explanation): Remove.
3747
b98664d3
TT
37482018-05-23 Tom Tromey <tom@tromey.com>
3749
3750 * complaints.c (symfile_complaints): Remove.
3751 (complaint_internal): Remove "complaints" parameter.
3752 (clear_complaints, vcomplaint): Remove "c" parameter.
3753 (get_complaints): Remove.
3754 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3755 (dwarf2_debug_line_missing_file_complaint)
3756 (dwarf2_debug_line_missing_end_sequence_complaint)
3757 (dwarf2_complex_location_expr_complaint)
3758 (dwarf2_const_value_length_mismatch_complaint)
3759 (dwarf2_section_buffer_overflow_complaint)
3760 (dwarf2_macro_malformed_definition_complaint)
3761 (dwarf2_invalid_attrib_class_complaint)
3762 (create_addrmap_from_index, dw2_symtab_iter_next)
3763 (dw2_expand_marked_cus)
3764 (dw2_debug_names_iterator::find_vec_in_debug_names)
3765 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3766 (create_debug_type_hash_table, init_cutu_and_read_dies)
3767 (partial_die_parent_scope, add_partial_enumeration)
3768 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3769 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3770 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3771 (create_cus_hash_table, create_dwp_hash_table)
3772 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3773 (dwarf2_rnglists_process, dwarf2_ranges_process)
3774 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3775 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3776 (handle_struct_member_die, process_structure_scope)
3777 (read_array_type, read_common_block, read_module_type)
3778 (read_tag_pointer_type, read_typedef, read_base_type)
3779 (read_subrange_type, load_partial_dies, partial_die_info::read)
3780 (partial_die_info::read, partial_die_info::read)
3781 (partial_die_info::read, read_checked_initial_length_and_offset)
3782 (dwarf2_string_attr, read_formatted_entries)
3783 (dwarf_decode_line_header)
3784 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3785 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3786 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3787 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3788 (get_signatured_type, get_DW_AT_signature_type)
3789 (decode_locdesc, file_file_name, consume_improper_spaces)
3790 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3791 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3792 (dwarf2_symbol_mark_computed, set_die_type)
3793 (read_attribute_value): Update.
3794 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3795 Update.
3796 * dbxread.c (unknown_symtype_complaint)
3797 (lbrac_mismatch_complaint, repeated_header_complaint)
3798 (set_namestring, function_outside_compilation_unit_complaint)
3799 (read_dbx_symtab, process_one_symbol): Update.
3800 * gdbtypes.c (stub_noname_complaint): Update.
3801 * windows-nat.c (handle_unload_dll): Update.
3802 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3803 (decode_base_type): Update.
3804 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3805 (eb_complaint, record_include_begin, record_include_end)
3806 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3807 (process_xcoff_symbol, read_symbol)
3808 (function_outside_compilation_unit_complaint)
3809 (scan_xcoff_symtab): Update.
3810 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3811 * buildsym.c (finish_block_internal, make_blockvector)
3812 (end_symtab_get_static_block, augment_type_symtab): Update.
3813 * dtrace-probe.c (dtrace_process_dof)
3814 (dtrace_static_probe_ops::get_probes): Update.
3815 * complaints.h (struct complaint): Don't declare.
3816 (symfile_complaints): Remove.
3817 (complaint_internal): Remove "complaints" parameter.
3818 (complaint): Likewise.
3819 (clear_complaints): Likewise.
3820 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3821 (reread_symbols): Update.
3822 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3823 (dwarf2_frame_cache, decode_frame_entry): Update.
3824 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3825 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3826 (info_selectors_command): Update.
3827 * macrotab.c (macro_include, check_for_redefinition)
3828 (macro_undef): Update.
3829 * objfiles.c (filter_overlapping_sections): Update.
3830 * stabsread.c (invalid_cpp_abbrev_complaint)
3831 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3832 (define_symbol, error_type, read_type, rs6000_builtin_type)
3833 (stabs_method_name_from_physname, read_member_functions)
3834 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3835 (attach_fields_to_type, complain_about_struct_wipeout)
3836 (read_range_type, read_args, common_block_start)
3837 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3838 Update.
3839 * mdebugread.c (index_complaint, unknown_ext_complaint)
3840 (basic_type_complaint, bad_tag_guess_complaint)
3841 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3842 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3843 (parse_procedure, parse_lines)
3844 (function_outside_compilation_unit_complaint)
3845 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3846 (bad_tag_guess_complaint, reg_value_complaint): Update.
3847 * cp-support.c (demangled_name_complaint): Update.
3848 * macroscope.c (sal_macro_scope): Update.
3849 * dwarf-index-write.c (class debug_names): Update.
3850
4e9668d0
TT
38512018-05-23 Tom Tromey <tom@tromey.com>
3852
3853 * complaints.c (clear_complaints): Remove "noisy" parameter.
3854 * complaints.h (clear_complaints): Update.
3855 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3856 (reread_symbols): Update.
3857
43ba33c7
TT
38582018-05-23 Tom Tromey <tom@tromey.com>
3859
3860 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3861 SUBSEQUENT_MESSAGE.
3862 (vcomplaint, clear_complaints): Update.
3863 (symfile_explanations): Remove some messages.
3864
2b9496b2
TT
38652018-05-23 Tom Tromey <tom@tromey.com>
3866
3867 * complaints.c (internal_complaint): Remove.
3868 * complaints.h (internal_complaint): Remove.
3869
35f1fea3
MR
38702018-05-22 Maciej W. Rozycki <macro@mips.com>
3871
3872 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3873
6b8edb51
PA
38742018-05-22 Pedro Alves <palves@redhat.com>
3875
3876 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3877 (remote_fileio_badfd, remote_fileio_return_errno)
3878 (remote_fileio_return_success, remote_fileio_func_open)
3879 (remote_fileio_func_open, remote_fileio_func_close)
3880 (remote_fileio_func_read, remote_fileio_func_write)
3881 (remote_fileio_func_lseek, remote_fileio_func_rename)
3882 (remote_fileio_func_unlink, remote_fileio_func_stat)
3883 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3884 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3885 remote_target parameter.
3886 (remote_fio_func_map) <func>: Add remote_target parameter.
3887 (do_remote_fileio_request, remote_fileio_request):
3888 * remote-fileio.h (remote_fileio_request):
3889 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3890 remote_target parameter.
3891 (remote_notif_process, handle_notification): Adjust to pass down
3892 the remote.
3893 (remote_notif_state_allocate): Add remote_target parameter. Save
3894 it.
3895 * remote-notif.h (struct remote_target): Forward declare.
3896 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3897 remote_target parameter.
3898 (struct remote_notif_state) <remote>: New field.
3899 (remote_notif_ack, remote_notif_parse): Add remote_target
3900 parameter.
3901 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3902 remote_target parameter.
3903 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3904 (threads_listing_context, rmt_thread_action, protocol_feature)
3905 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3906 (packet_result, struct threads_listing_context, remote_state):
3907 Move definitions and declarations higher up.
3908 (remote_target) <~remote_target>: Declare.
3909 (remote_download_command_source, remote_file_put, remote_file_get)
3910 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3911 (remote_hostio_pread_vFile, remote_hostio_send_command)
3912 (remote_hostio_set_filesystem, remote_hostio_open)
3913 (remote_hostio_close, remote_hostio_unlink, remote_state)
3914 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3915 (get_memory_write_packet_size, get_memory_read_packet_size)
3916 (append_pending_thread_resumptions, remote_detach_1)
3917 (append_resumption, remote_resume_with_vcont)
3918 (add_current_inferior_and_thread, wait_ns, wait_as)
3919 (process_stop_reply, remote_notice_new_inferior)
3920 (process_initial_stop_replies, remote_add_thread)
3921 (btrace_sync_conf, remote_btrace_maybe_reopen)
3922 (remove_new_fork_children, kill_new_fork_children)
3923 (discard_pending_stop_replies, stop_reply_queue_length)
3924 (check_pending_events_prevent_wildcard_vcont)
3925 (discard_pending_stop_replies_in_queue, stop_reply)
3926 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3927 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3928 (remote_interrupt_as, remote_interrupt_ns)
3929 (remote_get_noisy_reply, remote_query_attached)
3930 (remote_add_inferior, remote_current_thread, get_current_thread)
3931 (set_thread, set_general_thread, set_continue_thread)
3932 (set_general_process, write_ptid)
3933 (remote_unpack_thread_info_response, remote_get_threadinfo)
3934 (parse_threadlist_response, remote_get_threadlist)
3935 (remote_threadlist_iterator, remote_get_threads_with_ql)
3936 (remote_get_threads_with_qxfer)
3937 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3938 (get_offsets, remote_check_symbols, remote_supported_packet)
3939 (remote_query_supported, remote_packet_size)
3940 (remote_serial_quit_handler, remote_detach_pid)
3941 (remote_vcont_probe, remote_resume_with_hc)
3942 (send_interrupt_sequence, interrupt_query)
3943 (remote_notif_get_pending_events, fetch_register_using_p)
3944 (send_g_packet, process_g_packet, fetch_registers_using_g)
3945 (store_register_using_P, store_registers_using_G)
3946 (set_remote_traceframe, check_binary_download)
3947 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3948 (remote_xfer_live_readonly_partial, remote_read_bytes)
3949 (remote_send_printf, remote_flash_write, readchar)
3950 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3951 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3952 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3953 (extended_remote_disable_randomization, extended_remote_run)
3954 (send_environment_packet, extended_remote_environment_support)
3955 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3956 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3957 (packet_command): Now methods of ...
3958 (remote_target): ... this class.
3959 (m_remote_state) <remote_target>: New field.
3960 (struct remote_state) <stop_reply_queue,
3961 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3962 fields.
3963 (remote_state::remote_state): Allocate stop_reply_queue.
3964 (remote_state): Delete global.
3965 (get_remote_state_raw): Delete.
3966 (remote_target::get_remote_state): Allocate m_remote_state on
3967 demand.
3968 (get_current_remote_target): New.
3969 (remote_ops, extended_remote_ops): Delete.
3970 (wait_forever_enabled_p, remote_async_inferior_event_token):
3971 Delete, moved to struct remote_state.
3972 (remote_target::close): Delete self. Destruction bits split to
3973 ...
3974 (remote_target::~remote_target): ... this.
3975 (show_memory_packet_size): Adjust to use
3976 get_current_remote_target.
3977 (struct protocol_feature) <func>: Add remote_target parameter.
3978 All callers adjusted.
3979 (curr_quit_handler_target): New.
3980 (remote_serial_quit_handler): Reimplement.
3981 (remote_target::open_1): Adjust to use get_current_remote_target.
3982 Heap-allocate remote_target/extended_remote_target instances.
3983 (vcont_builder::vcont_builder): Add remote_target parameter, and
3984 save it in m_remote. All callers adjusted.
3985 (vcont_builder::m_remote): New field.
3986 (vcont_builder::restart, vcont_builder::flush)
3987 (vcont_builder::push_action): Use it.
3988 (remote_target::commit_resume): Use it.
3989 (struct queue_iter_param) <remote>: New field.
3990 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3991 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3992 (check_pending_event_prevents_wildcard_vcont_callback)
3993 (remote_target::check_pending_events_prevent_wildcard_vcont)
3994 (remote_target::discard_pending_stop_replies)
3995 (remote_target::discard_pending_stop_replies_in_queue)
3996 (remote_target::remote_notif_remove_queued_reply): Fill in
3997 'remote' field.
3998 (remote_notif_get_pending_events): New.
3999 (remote_target::readchar, remote_target::remote_serial_write):
4000 Save/restore curr_quit_handler_target.
4001 (putpkt): New.
4002 (kill_new_fork_children): Fill in 'remote' field.
4003 (packet_command): Use get_current_remote_target, defer to
4004 remote_target method of same name.
4005 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4006 parameter, and save it in m_remote. All callers adjusted.
4007 (scoped_remote_fd::release): Use m_remote.
4008 (scoped_remote_fd::m_remote): New field.
4009 (remote_file_put, remote_file_get, remote_file_delete): Use
4010 get_current_remote_target, defer to remote_target method of same
4011 name.
4012 (remote_btrace_reset): Add remote_state paremeter. Update all
4013 callers.
4014 (remote_async_inferior_event_handler). Pass down 'data'.
4015 (remote_new_objfile): Use get_current_remote_target.
4016 (remote_target::vcont_r_supported): New.
4017 (set_range_stepping): Use get_current_remote_target and
4018 remote_target::vcont_r_supported.
4019 (_initialize_remote): Don't allocate 'remote_state' and
4020 'stop_reply_queue' globals.
4021 * remote.h (struct remote_target): Forward declare.
4022 (getpkt, putpkt, remote_notif_get_pending_events): Add
4023 'remote_target' parameter.
4024
f5db4863
PA
40252018-05-22 Pedro Alves <palves@redhat.com>
4026
4027 * remote.c (vcont_builder): Now a class. Make all data members
4028 private.
4029 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4030 Declare methods.
4031 (vcont_builder_restart): Rename to ...
4032 (vcont_builder::restart): ... this.
4033 (vcont_builder_flush): Rename to ...
4034 (vcont_builder::flush): ... this.
4035 (vcont_builder_push_action): Rename to ...
4036 (vcont_builder::push_action): ... this.
4037 (remote_target::commit_resume): Adjust.
4038
cc0be08f
PA
40392018-05-22 Pedro Alves <palves@redhat.com>
4040
4041 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4042 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4043 (get_fixed_memory_packet_size): New.
4044 (get_memory_packet_size): Use it.
4045 (set_memory_packet_size): Don't override the config size with
4046 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4047 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4048 Don't refer to get_memory_packet_size if not connected to a remote
4049 target. Show "(default)" if configured size is 0.
4050
9607784a
PA
40512018-05-22 Pedro Alves <palves@redhat.com>
4052
4053 * remote.c (remote_target::mourn_inferior): Move
4054 discard_pending_stop_replies call here from ...
4055 (_initialize_remote): ... here.
4056
0e9a6b2f
PA
40572018-05-22 Pedro Alves <palves@redhat.com>
4058
4059 * remote.c (compare_section_command): Remove set_general_process
4060 call.
4061
43c3a0e4
PA
40622018-05-22 Pedro Alves <palves@redhat.com>
4063
4064 * remote.c (struct packet_reg, struct remote_arch_state):
4065 Move higher up in the file.
4066 (remote_state) <m_arch_states>: Store remote_arch_state values
4067 instead of remote_arch_state pointers.
4068 (remote_state::get_remote_arch_state): Adjust.
4069
9d6eea31
PA
40702018-05-22 Pedro Alves <palves@redhat.com>
4071
4072 * remote.c: Include <unordered_map>.
4073 (remote_state): Now a class.
4074 (remote_state) <get_remote_arch_state>: Declare method.
4075 <get_remote_arch_state>: New field.
4076 (remote_arch_state) <remote_arch_state>: Declare ctor.
4077 <regs>: Now a unique_ptr.
4078 (remote_gdbarch_data_handle): Delete.
4079 (get_remote_arch_state): Delete.
4080 (remote_state::get_remote_arch_state): New.
4081 (get_remote_state): Adjust to call remote_state's
4082 get_remote_arch_state method.
4083 (init_remote_state): Delete, bits factored out to ...
4084 (remote_arch_state::remote_arch_state): ... this new method.
4085 (get_remote_packet_size, get_memory_packet_size)
4086 (process_g_packet, remote_target::fetch_registers)
4087 (remote_target::prepare_to_store, store_registers_using_G)
4088 (remote_target::store_registers, remote_target::get_trace_status):
4089 Adjust to call remote_state's method.
4090 (_initialize_remote): Remove reference to
4091 remote_gdbarch_data_handle.
4092
dd194f6b
PA
40932018-05-22 Pedro Alves <palves@redhat.com>
4094
4095 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4096 pread>: New method declarations.
4097 (remote_target::open_1): Adjust.
4098 (readahead_cache_invalidate): Rename to ...
4099 (readahead_cache::invalidate): ... this, and adjust to be a class
4100 method.
4101 (readahead_cache_invalidate_fd): Rename to ...
4102 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4103 class method.
4104 (remote_hostio_pwrite): Adjust.
4105 (remote_hostio_pread_from_cache): Rename to ...
4106 (readahead_cache::pread): ... this, and adjust to be a class
4107 method.
4108 (remote_hostio_close): Adjust.
4109
440b7aec
PA
41102018-05-22 Pedro Alves <palves@redhat.com>
4111
4112 * remote.c (remote_hostio_close_cleanup): Delete.
4113 (class scoped_remote_fd): New.
4114 (remote_file_put, remote_file_get): Use it.
4115
de44f5a7
PA
41162018-05-22 Pedro Alves <palves@redhat.com>
4117
4118 (struct vCont_action_support): Use bool and initialize all fields.
4119 (struct readahead_cache): Initialize all fields.
4120 (remote_state): Use bool and initialize all fields.
4121 (remote_state::remote_state, remote_state::~remote_state): New.
4122 (new_remote_state): Delete.
4123 (_initialize_remote): Use new to allocate remote_state.
4124
b1b60145
PA
41252018-05-22 Pedro Alves <palves@redhat.com>
4126 張俊芝 <zjz@zjz.name>
4127
4128 PR gdb/22973
4129 * c-exp.y: Include "c-support.h".
4130 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4131 of tolower. Use c_ident_is_alpha to scan names.
4132 * c-lang.c: Include "c-support.h".
4133 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4134 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4135 * c-support.h: New file, with bits factored out from ...
4136 * cp-name-parser.y: ... this file.
4137 Include "c-support.h".
4138 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4139 c-support.h and renamed.
4140 (symbol_end, yylex): Adjust.
4141
0ec848ad
PFC
41422018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4143
4144 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4145 parameter type to CORE_ADDR.
4146 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4147 parameter type in declaration to CORE_ADDR.
4148 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4149 target_auxv_search to get AT_HWCAP and use the result to get the
4150 target description.
4151 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4152 to CORE_ADDR. Remove the cast of the return value to unsigned
4153 long. Fix error predicate of target_auxv_search.
4154 (ppc_linux_nat_target::read_description): Change the type of the
4155 hwcap variable to CORE_ADDR.
4156
0fb2aaa1
PFC
41572018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4158
4159 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4160 if the size of fpscr is larger than 32 bits.
4161
2c3305f6
PFC
41622018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4163
4164 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4165 (ppc32_linux_vsxregmap): New global.
4166 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4167 regcache_supply_regset, and regcache_collect_regset.
4168 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4169 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4170 (fetch_vsx_register, store_vsx_register): Remove.
4171 (fetch_vsx_registers): Add regno parameter. Get regset using
4172 ppc_linux_vsxregset. Use regset to supply registers.
4173 (store_vsx_registers): Add regno parameter. Get regset using
4174 ppc_linux_vsxregset. Use regset to collect registers.
4175 (fetch_register): Call fetch_vsx_registers instead of
4176 fetch_vsx_register.
4177 (store_register): Call store_vsx_registers instead of
4178 store_vsx_register.
4179 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4180 new regno parameter.
4181 (store_ppc_registers): Call store_vsx_registers with -1 for the
4182 new regno parameter.
4183 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4184 (ppc_collect_vsxregset): Remove.
4185
1d75a658
PFC
41862018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4187
4188 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4189 offset fields.
4190 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4191 for vector register offset fields.
4192 (ppc64_fbsd_reg_offsets): Likewise.
4193 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4194 to vector register offset fields.
4195 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4196 to vector register offset fields.
4197 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4198 vector register offset fields.
4199 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4200 initializers for vector register offset fields.
4201 (rs6000_aix64_reg_offsets): Likewise.
4202 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4203 (ppc_supply_vrregset): Remove.
4204 (ppc_collect_vrregset): Remove.
4205 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4206 (ppc_linux_vrregset) : New function.
4207 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4208 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4209 (ppc32_linux_vrregset): Remove.
4210 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4211 and use result instead of ppc32_linux_vrregset.
4212 (ppc32_linux_reg_offsets): Remove initializers for vector register
4213 offset fields.
4214 (ppc64_linux_reg_offsets): Likewise.
4215 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4216 * ppc-linux-nat.c: Include regset.h.
4217 (gdb_vrregset_t): Adjust comment to account for little-endian
4218 mode.
4219 (supply_vrregset, fill_vrregset): Remove.
4220 (fetch_altivec_register, store_altivec_register): Remove.
4221 (fetch_altivec_registers): Add regno parameter. Get regset using
4222 ppc_linux_vrregset. Use regset to supply registers.
4223 (store_altivec_registers): Add regno parameter. Get regset using
4224 ppc_linux_vrregset. Use regset to collect registers.
4225 (fetch_register): Call fetch_altivec_registers instead of
4226 fetch_altivec_register.
4227 (store_register): Call store_altivec_registers instead of
4228 store_altivec_register.
4229 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4230 the new regno parameter.
4231 (store_ppc_registers): Call store_altivec_registers with -1 for
4232 the new regno parameter.
4233
d078308a
PFC
42342018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4235
4236 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4237 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4238 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4239 (gdb_vrregset_t): Change array type size to
4240 PPC_LINUX_SIZEOF_VRREGSET.
4241 (gdb_vsxregset_t): Change array type size to
4242 PPC_LINUX_SIZEOF_VSXREGSET.
4243 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4244 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4245 PPC_LINUX_SIZEOF_VSXREGSET.
4246
2e077f5e
PFC
42472018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4248
4249 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4250 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4251 nat/ppc-linux.c.
4252 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4253 ppc_linux_target_wordsize with tid.
4254 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4255 wordsize with tid.
4256 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4257 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4258 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4259 tid parameter. Remove static specifier.
4260 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4261 (ppc_linux_target_wordsize): New declaration.
4262
bd64614e
PFC
42632018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4264
4265 * arch/ppc-linux-common.c: New file.
4266 * arch/ppc-linux-common.h: New file.
4267 * arch/ppc-linux-tdesc.h: New file.
4268 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4269 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4270 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4271 arch/ppc-linux-tdesc.h.
4272 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4273 arch/ppc-linux-tdesc.h.
4274 (ppc_linux_nat_target::read_description): Remove target
4275 description matching code. Fill a ppc_linux_features struct and
4276 call ppc_linux_match_description with it. Move comment about ISA
4277 2.05 to ppc-linux-common.c.
4278 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4279 arch/ppc-linux-tdesc.h.
4280 (ppc_linux_core_read_description): Remove target description
4281 matching code. Fill a ppc_linux_features struct and call
4282 ppc_linux_match_description with it.
4283 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4284 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4285 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4286 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4287 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4288 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4289 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4290 (tdesc_powerpc_e500l): Remove.
4291
241db429
JB
42922018-05-22 Joel Brobecker <brobecker@adacore.com>
4293
4294 * ada-lang.c (catch_assert_command): Pass empty string instead
4295 of NULL for excep_string argument.
4296
75d74cca
MR
42972018-05-22 Maciej W. Rozycki <macro@mips.com>
4298
4299 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4300 the width of the requested register exceeds the width of the
4301 `ptrace' data type.
4302
122b53ea
TT
43032018-05-21 Tom Tromey <tom@tromey.com>
4304
4305 * printcmd.c (output_command): Remove.
4306 (output_command_const): Rename to output_command.
4307 * valprint.h (output_command): Rename from output_command_const.
4308 * tracepoint.c (trace_dump_actions): Call output_command.
4309
bc18fbb5
TT
43102018-05-21 Tom Tromey <tom@tromey.com>
4311
4312 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4313 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4314 * ada-lang.h (create_ada_exception_catchpoint): Update.
4315 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4316 std::string.
4317 (create_excep_cond_exprs, ~ada_catchpoint)
4318 (should_stop_exception, print_one_exception)
4319 (print_mention_exception, print_recreate_exception): Update.
4320 (ada_get_next_arg): Remove.
4321 (catch_ada_exception_command_split): Use std::string. Change type
4322 of "excep_string", "cond_string".
4323 (catch_ada_exception_command): Update.
4324 (create_ada_exception_catchpoint): Change type of excep_string.
4325 (ada_exception_sal): Remove excep_string parameter.
4326 (~ada_catchpoint): Remove.
4327
790217f6
TT
43282018-05-21 Tom Tromey <tom@tromey.com>
4329
4330 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4331 cleanup.
4332
6f46ac85
TT
43332018-05-21 Tom Tromey <tom@tromey.com>
4334
4335 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4336 Return unique_xmalloc_ptr.
4337 (print_it_exception): Update.
4338
15b6611c
TT
43392018-05-21 Tom Tromey <tom@tromey.com>
4340
4341 * tracepoint.c (trace_dump_actions): Use std::string.
4342
c0c9f665
TT
43432018-05-21 Tom Tromey <tom@tromey.com>
4344
4345 * symfile.c (reread_symbols): Use std::string for original_name.
4346
22ca247e
TT
43472018-05-21 Tom Tromey <tom@tromey.com>
4348
4349 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4350 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4351 constructor.
4352
184cde75
SM
43532018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4354
4355 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4356 instance to...
4357 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4358 * objfiles.c (get_objfile_bfd_data): Allocate
4359 objfile_per_bfd_storage with obstack_new when allocating on
4360 obstack.
4361
e39db4db
SM
43622018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4363
4364 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4365 OBSTACK_ZALLOC.
4366 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4367 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4368 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4369 (add_pending): Likewise.
4370 (parse_symbol): Likewise.
4371 (parse_partial_symbols): Likewise.
4372 (psymtab_to_symtab_1): Likewise.
4373 (new_psymtab): Likewise.
4374 (elfmdebug_build_psymtabs): Likewise.
4375 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4376 * objfiles.c (get_objfile_bfd_data): Likewise.
4377 (objfile_register_static_link): Likewise.
4378 * psymtab.c (allocate_psymtab): Likewise.
4379 * stabsread.c (read_member_functions): Likewise.
4380 * xcoffread.c (xcoff_end_psymtab): Likewise.
4381
284a0e3c
SM
43822018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4383
4384 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4385 compiler supports std::is_trivially_constructible.
4386 * common/poison.h: Include obstack.h.
4387 (IsMallocable): Define to is_trivially_constructible if the
4388 compiler supports it, define to true_type otherwise.
4389 (xobnew): New.
4390 (XOBNEW): Redefine.
4391 (xobnewvec): New.
4392 (XOBNEWVEC): Redefine.
4393 * gdb_obstack.h (obstack_zalloc): New.
4394 (OBSTACK_ZALLOC): Redefine.
4395 (obstack_calloc): New.
4396 (OBSTACK_CALLOC): Redefine.
4397 (obstack_new): New.
4398 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4399 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4400 gdbarch.c.
4401 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4402 obstack_calloc/obstack_zalloc.
4403 (gdbarch_obstack_zalloc): Remove.
4404 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4405
59f66be3
PW
44062018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4407
4408 * stack.c (backtrace_command_1): Remove useless variable int i.
4409
50c65c2d
PW
44102018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4411
4412 * stack.c (print_frame_info): Fix comment.
4413
7ff8cb8c
TT
44142018-05-18 Tom Tromey <tom@tromey.com>
4415
4416 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4417 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4418 (~dwarf2_per_objfile): Update
4419 (dwarf2_get_dwz_file): Use new.
4420 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4421 unique_ptr.
4422
400174b1
TT
44232018-05-18 Tom Tromey <tom@tromey.com>
4424
4425 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4426 unique_ptr.
4427 * dwarf2read.c (struct dwp_file): Add constructor and
4428 initializers.
4429 (open_and_init_dwp_file): Return a unique_ptr.
4430 (dwarf2_per_objfile, create_dwp_hash_table)
4431 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4432 (lookup_dwo_unit_in_dwp): Update.
4433 (open_and_init_dwp_file, get_dwp_file): Update.
4434
3063847f
TT
44352018-05-18 Tom Tromey <tom@tromey.com>
4436
4437 * dwarf2read.c (dwarf2_per_objfile): Update.
4438 (struct mapped_index): Add initializers.
4439 (dwarf2_read_index): Use new.
4440 (dw2_symtab_iter_init): Update.
4441 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4442 unique_ptr.
4443
d3d02dee
SM
44442018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4445
4446 * dwarf2read.c (mapped_index) <total_size>: Remove.
4447
1d143c36
SM
44482018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4449
4450 * unittests/format_pieces-selftests.c (test_format_specifier):
4451 Add ARI comments.
4452
ce1e8424
TT
44532018-05-18 Tom Tromey <tom@tromey.com>
4454
4455 * c-typeprint.c (maybe_print_hole): New function.
4456 (c_print_type_struct_field_offset): Update.
4457 (c_type_print_base_struct_union): Call maybe_print_hole.
4458
ddfe970e
KS
44592018-05-17 Keith Seitz <keiths@redhat.com>
4460
4461 * breakpoint.c (build_bpstat_chain): New function, moved from
4462 bpstat_stop_status.
4463 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4464 If no stop chain is passed, call build_bpstat_chain to build it.
4465 * breakpoint.h (build_bpstat_chain): Declare.
4466 (bpstat_stop_status): Move documentation here from breakpoint.c.
4467 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4468 build the stop chain and pass it to skip_inline_frames.
4469 Pass this stop chain to bpstat_stop_status.
4470 * inline-frame.c: Include breakpoint.h.
4471 (stopped_by_user_bp_inline_frame): New function.
4472 (skip_inline_frames): Add parameter `stop_chain'.
4473 Move documention to inline-frame.h.
4474 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4475 whether the frame should be elided.
4476 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4477 Add moved documentation and update for new parameter.
4478
b17992c1
SM
44792018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4480
4481 PR cli/14975
4482 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4483 unittests/format_pieces-selftests.c.
4484 * common/format.h (format_piece) <operator==>: New.
4485 (format_pieces) <operator[]>: Remove.
4486 * common/format.c (format_pieces::format_pieces): Handle \e.
4487 * unittests/format_pieces-selftests.c: New.
4488
58f0c718
TT
44892018-05-17 Tom Tromey <tom@tromey.com>
4490
4491 PR symtab/23010:
4492 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4493 (dw2_instantiate_symtab): Add skip_partial parameter.
4494 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4495 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4496 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4497 (dw2_expand_symtabs_matching_one)
4498 (dw2_find_pc_sect_compunit_symtab)
4499 (dw2_debug_names_lookup_symbol)
4500 (dw2_debug_names_expand_symtabs_for_function): Update.
4501 (init_cutu_and_read_dies): Add skip_partial parameter.
4502 (process_psymtab_comp_unit, build_type_psymtabs_1)
4503 (process_skeletonless_type_unit, load_partial_comp_unit)
4504 (psymtab_to_symtab_1): Update.
4505 (load_full_comp_unit): Add skip_partial parameter.
4506 (process_imported_unit_die, dwarf2_read_addr_index)
4507 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4508 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4509 (read_signatured_type): Update.
4510
3e618834
SM
45112018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4512
4513 * value.c (release_value): Remove unused variable.
4514 (record_latest_value): Likewise.
4515 (access_value_history): Likewise.
4516 (preserve_values): Likewise.
4517
fe10fe31
TT
45182018-05-17 Tom Tromey <tom@tromey.com>
4519
4520 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4521 Initialize.
4522
1d761124
MR
45232018-05-16 Maciej W. Rozycki <macro@mips.com>
4524
4525 PR gdb/22286
4526 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4527 Also handle registers whose width is not a multiple of
4528 PTRACE_TYPE_RET.
4529 (linux_nat_trad_target::store_register): Likewise.
4530
06333fea
TT
45312018-05-16 Tom Tromey <tom@tromey.com>
4532
4533 * gdbcore.h (core_bfd): Redefine.
4534 * corelow.c (core_target::close): Update.
4535 (core_target_open): Update.
4536 * progspace.h (struct program_space) <cbfd>: Now a
4537 gdb_bfd_ref_ptr.
4538
921222e2
TT
45392018-05-16 Tom Tromey <tom@tromey.com>
4540
4541 PR cli/19551:
4542 * symfile-add-flags.h (enum symfile_add_flags)
4543 <SYMFILE_NOT_FILENAME>: New constant.
4544 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4545 objfile name from BFD.
4546 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4547 * minidebug.c (find_separate_debug_file_in_section): Put
4548 ".gnu_debugdata" into BFD's file name.
4549
3acb7083
SM
45502018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4551
4552 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4553 Remove.
4554
561a72d4
TC
45552018-05-15 Tamar Christina <tamar.christina@arm.com>
4556
4557 PR binutils/21446
4558 * aarch64-tdep.c (aarch64_analyze_prologue,
4559 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4560 Indicate not interested in errors.
4561
4e6ff0e1
MR
45622018-05-15 Maciej W. Rozycki <macro@mips.com>
4563
4564 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4565 Supply the MIPS_ZERO_REGNUM register.
4566
ea33cd92
MR
45672018-05-15 Maciej W. Rozycki <macro@mips.com>
4568
4569 * mips-tdep.c (mask_address_var): Make variable static.
4570
2d79090e
TT
45712018-05-14 Tom Tromey <tom@tromey.com>
4572
4573 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4574
cf4912ae
AB
45752018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4576
4577 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4578 FXSAVE_ADDR for the mxcsr register.
4579
67e6f569
MF
45802018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4581
4582 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4583
15244507
PA
45842018-05-11 Pedro Alves <palves@redhat.com>
4585
4586 * corelow.c (core_target) <core_target>: No longer inline.
4587 Initialize m_core_gdbarch, m_core_vec and build the section table
4588 here.
4589 <~core_target>: New.
4590 <core_gdbarch, get_core_register_section>: New methods.
4591 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4592 factored out from ...
4593 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4594 (core_ops): Delete.
4595 (sniff_core_bfd): Add gdbarch parameter.
4596 (core_close): Delete, merged into ...
4597 (core_target::close): ... here. Delete self.
4598 (core_close_cleanup): Delete.
4599 (core_target_open): Allocate a core_target on the heap. Use a
4600 unique_ptr instead of a cleanup. Bits moved into the core_target
4601 ctor. Adjust to use core_target methods instead of globals.
4602 (get_core_register_section): Rename to ...
4603 (core_target::get_core_register_section): ... this and adjust.
4604 (struct get_core_registers_cb_data): New.
4605 (get_core_registers_cb): Use it. Use bool.
4606 (core_target::fetch_registers, core_target::files_info)
4607 (core_target::xfer_partial, core_target::read_description)
4608 (core_target::pid_to, core_target::thread_name): Adjust to
4609 reference class fields instead of globals.
4610 * target.h (struct target_ops_deleter, target_ops_up): New.
4611
451953fa
PA
46122018-05-11 Pedro Alves <palves@redhat.com>
4613
4614 * corefile.c (core_file_command): Move to corelow.c.
4615 * corelow.c (the_core_target): Delete.
4616 (core_file_command): Moved from corefile.c. Check exec_bfd
4617 instead of the_core_target. Use target_detach instead of calling
4618 into the_core_target directly.
4619 (maybe_say_no_core_file_now): New.
4620 (core_target::detach): Use it.
4621 (_initialize_corelow): Remove references to the_core_target.
4622 * gdbcore.h (the_core_target): Delete.
4623
e540a5a2 46242018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 4625 Pedro Alves <palves@redhat.com>
e540a5a2
TT
4626
4627 * corefile.c (core_bfd): Remove.
4628 * gdbcore.h (core_bfd): Now a macro.
4629 * progspace.h (struct program_space) <cbfd>: New field.
4630
633cf254
TT
46312018-05-11 Tom Tromey <tom@tromey.com>
4632
4633 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4634 gdb::def_vector.
4635
1a34f210
TT
46362018-05-10 Tom Tromey <tom@tromey.com>
4637
4638 * configure: Rebuild.
4639 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4640
190852c8
JB
46412018-05-10 Joel Brobecker <brobecker@adacore.com>
4642
4643 PR server/23158:
4644 * regformats/regdat.sh: Adjust script, following the addition
4645 of the new expedite_regs parameter to init_target_desc.
4646
8727de56
OJ
46472018-05-10 Omair Javaid <omair.javaid@linaro.org>
4648
4649 PR gdb/23127
4650 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4651 set_gdbarch_significant_addr_bit.
4652 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4653 set_gdbarch_significant_addr_bit.
4654 * utils.c (address_significant): Update to sign extend addr.
4655
37d9e062
MF
46562018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4657
4658 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4659 (xtensa_linux_init_abi): Limit tdep->num_regs by
4660 tdep->num_nopriv_regs.
4661 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4662 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4663 not initialized.
4664
7402fbca
SM
46652018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4666
4667 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4668
8ee22052
AB
46692018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4670
4671 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4672 (I387_MXCSR_INIT_VAL): New constant.
4673 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4674 buffer if it was supplied by the inferior.
4675 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4676 (i387_xsave_get_clear_bv): New function.
4677 (i387_supply_xsave): Only read x87 control registers from the
4678 xsave buffer if the feature is enabled, and the state will have
4679 been written, otherwise, provide a suitable default.
4680 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4681 including x87 control registers. Update control registers if they
4682 have changed from the default value, and mark features as enabled
4683 as required.
4684 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4685
968ae51b
UW
46862018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4687
4688 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4689
aff689d3
TT
46902018-05-07 Tom Tromey <tom@tromey.com>
4691
4692 * configure: Rebuild.
4693 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4694
ce887586
TT
46952018-05-07 Tom Tromey <tom@tromey.com>
4696
4697 PR tdep/20362:
4698 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4699 bit. Use correct value for VDIV.
4700
85e26832
TT
47012018-05-04 Tom Tromey <tom@tromey.com>
4702
4703 * configure: Rebuild.
4704 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4705
449b1ac7
TT
47062018-05-04 Tom Tromey <tom@tromey.com>
4707
4708 * linux-record.c (record_linux_system_call) <case
4709 RECORD_SYS_RECVFROM>: Add "break".
4710
15c9ffd6
TT
47112018-05-04 Tom Tromey <tom@tromey.com>
4712
4713 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4714 Add missing "break".
4715 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4716 Add missing "break".
4717
e3829d13
TT
47182018-05-04 Tom Tromey <tom@tromey.com>
4719
4720 * rs6000-tdep.c (ppc_process_record_op4)
4721 (ppc_process_record_op63): Add fall-through comment.
4722
da0e1563
TT
47232018-05-04 Tom Tromey <tom@tromey.com>
4724
4725 * i386-tdep.c (i386_process_record): Add fall-through comment.
4726
0019cd49
TT
47272018-05-04 Tom Tromey <tom@tromey.com>
4728
4729 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4730 comment.
4731
565e0eda
TT
47322018-05-04 Tom Tromey <tom@tromey.com>
4733
4734 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4735 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4736 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4737 comment.
4738 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4739 comment.
4740 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4741 comment.
4742
621846f4
TT
47432018-05-04 Tom Tromey <tom@tromey.com>
4744
4745 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4746
86a73007
TT
47472018-05-04 Tom Tromey <tom@tromey.com>
4748
4749 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4750 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4751 * symfile.c (section_is_mapped): Fix fall-through comment.
4752 * stabsread.c (define_symbol, read_member_functions): Fix
4753 fall-through comment.
4754 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4755 comment.
4756 * remote.c (remote_wait_as): Fix fall-through comment.
4757 * p-exp.y (yylex): Fix fall-through comment.
4758 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4759 comment.
4760 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4761 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4762 * jv-exp.y (yylex): Fix fall-through comment.
4763 * go-exp.y (lex_one_token): Fix fall-through comment.
4764 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4765 fall-through comment.
4766 * f-exp.y (yylex): Fix fall-through comment.
4767 * dwarf2read.c (process_die): Fix fall-through comments.
4768 * dbxread.c (process_one_symbol): Fix fall-through comment.
4769 * d-exp.y (lex_one_token): Fix fall-through comment.
4770 * cp-name-parser.y (yylex): Fix fall-through comment.
4771 * coffread.c (coff_symtab_read): Fix fall-through comment.
4772 * c-exp.y (lex_one_token): Fix fall-through comment.
4773 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4774 comment.
4775 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4776 comment.
4777
56bcdbea
TT
47782018-05-04 Tom Tromey <tom@tromey.com>
4779
4780 PR python/22730:
4781 * NEWS: Mention gdb.execute change.
4782 * gdbcmd.h (execute_control_command): Don't declare.
4783 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4784 execute_control_commands, execute_control_commands_to_string.
4785 * cli/cli-script.h (execute_control_commands)
4786 (execute_control_commands_to_string): Declare.
4787 (execute_control_command): Add from_tty parameter.
4788 * cli/cli-script.c (execute_control_commands)
4789 (execute_control_commands_to_string): New functions.
4790 (execute_user_command): Use execute_control_commands.
4791 (execute_control_command_1): Add "from_tty" parameter. Update.
4792 (execute_control_command): Likewise.
4793
a913fffb
TT
47942018-05-04 Tom Tromey <tom@tromey.com>
4795
4796 PR python/22731:
4797 * NEWS: Mention that breakpoint commands are writable.
4798 * python/py-breakpoint.c (bppy_set_commands): New function.
4799 (breakpoint_object_getset) <"commands">: Use it.
4800
60b3cef2
TT
48012018-05-04 Tom Tromey <tom@tromey.com>
4802
4803 * tracepoint.c (actions_command): Update.
4804 * mi/mi-cmd-break.c (mi_command_line_array)
4805 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4806 (mi_read_next_line): Remove.
4807 (mi_cmd_break_commands): Update.
4808 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4809 function_view.
4810 * cli/cli-script.c (get_command_line): Update.
4811 (process_next_line): Use function_view. Constify.
4812 (recurse_read_control_structure, read_command_lines)
4813 (read_command_lines_1): Change argument types to function_view.
4814 (do_define_command, document_command): Update.
4815 * breakpoint.h (check_tracepoint_command): Don't declare.
4816 * breakpoint.c (check_tracepoint_command): Remove.
4817 (commands_command_1, create_tracepoint_from_upload): Update.
4818
7a2c85f2
TT
48192018-05-04 Tom Tromey <tom@tromey.com>
4820
4821 PR gdb/11750:
4822 * cli/cli-script.h (enum command_control_type) <define_control>:
4823 New constant.
4824 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4825 (build_command_line, execute_control_command_1)
4826 (process_next_line): Likewise.
4827 (do_define_command): New function, extracted from define_command.
4828 (define_command): Use it.
4829
295dc222
TT
48302018-05-04 Tom Tromey <tom@tromey.com>
4831
4832 * tracepoint.c (actions_command): Update.
4833 * cli/cli-script.h (read_command_lines): Update.
4834 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4835 (MAX_TMPBUF): Remove define.
4836 (define_command): Use string_printf.
4837 (document_command): Likewise.
4838 * breakpoint.c (commands_command_1): Update.
4839
1263a9d5
TT
48402018-05-04 Tom Tromey <tom@tromey.com>
4841
4842 * top.c (execute_command): Update.
4843 * cli/cli-script.h (print_command_lines): Now varargs.
4844 * cli/cli-script.c (print_command_lines): Now varargs.
4845 (execute_control_command_1) <case while_control, case if_control>:
4846 Update.
4847
12973681
TT
48482018-05-04 Tom Tromey <tom@tromey.com>
4849
4850 * tracepoint.c (all_tracepoint_actions): Rename from
4851 all_tracepoint_actions_and_cleanup. Change return type.
4852 (actions_command, encode_actions_1, encode_actions)
4853 (trace_dump_actions, tdump_command): Update.
4854 * remote.c (remote_download_command_source): Update.
4855 * python/python.c (gdbpy_eval_from_control_command)
4856 (python_command, python_interactive_command): Update.
4857 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4858 * guile/guile.c (guile_command)
4859 (gdbscm_eval_from_control_command, guile_command): Update.
4860 * compile/compile.c (compile_code_command)
4861 (compile_print_command, compile_to_object): Update.
4862 * cli/cli-script.h (struct command_lines_deleter): New.
4863 (counted_command_line): New typedef.
4864 (struct command_line): Add constructor, destructor.
4865 <body_list>: Remove.
4866 <body_list_0, body_list_1>: New members.
4867 (command_line_up): Remove typedef.
4868 (read_command_lines, read_command_lines_1, get_command_line):
4869 Update.
4870 (copy_command_lines): Don't declare.
4871 * cli/cli-script.c (build_command_line): Use "new".
4872 (get_command_line): Return counted_command_line.
4873 (print_command_lines, execute_user_command)
4874 (execute_control_command_1, while_command, if_command): Update.
4875 (realloc_body_list): Remove.
4876 (process_next_line, recurse_read_control_structure): Update.
4877 (read_command_lines, read_command_lines_1): Return counted_command_line.
4878 (free_command_lines): Use "delete".
4879 (copy_command_lines): Remove.
4880 (define_command, document_command, show_user_1): Update.
4881 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4882 a counted_command_line.
4883 * breakpoint.h (counted_command_line): Remove typedef.
4884 (breakpoint_set_commands): Update.
4885 * breakpoint.c (check_no_tracepoint_commands)
4886 (validate_commands_for_breakpoint): Update.
4887 (breakpoint_set_commands): Change commands to be a
4888 counted_command_line.
4889 (commands_command_1, update_dprintf_command_list)
4890 (create_tracepoint_from_upload): Update.
4891
e2fc72e2
TT
48922018-05-04 Tom Tromey <tom@tromey.com>
4893
4894 * cli/cli-decode.h (cmd_list_element): New constructor.
4895 (~cmd_list_element): New destructor.
4896 (struct cmd_list_element): Add initializers.
4897 * cli/cli-decode.c (do_add_cmd): Use "new".
4898 (delete_cmd): Use "delete".
4899
a3b60e45
JK
49002018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4901 Pedro Alves <palves@redhat.com>
4902
4903 PR breakpoints/19806 and support for PR external/20207.
4904 * NEWS: Mention Aarch64 watchpoint improvements.
4905 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4906 watchpoints and PR external/20207 watchpoints.
4907 * nat/aarch64-linux-hw-point.c
4908 (kernel_supports_any_contiguous_range): New.
4909 (aarch64_watchpoint_offset): New.
4910 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4911 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4912 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4913 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4914 next_addr_orig_p. Support PR external/20207 watchpoints.
4915 (aarch64_downgrade_regs): New.
4916 (aarch64_dr_state_insert_one_point): New parameters offset and
4917 addr_orig.
4918 (aarch64_dr_state_remove_one_point): Likewise.
4919 (aarch64_handle_breakpoint): Update caller.
4920 (aarch64_handle_aligned_watchpoint): Likewise.
4921 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4922 aligned_offset.
4923 (aarch64_linux_set_debug_regs): Remove const from state. Call
4924 aarch64_downgrade_regs.
4925 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4926 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4927 (DR_CONTROL_MASK): ... this.
4928 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4929 (unsigned int aarch64_watchpoint_offset): New prototype.
4930 (aarch64_linux_set_debug_regs): Remove const from state.
4931 * utils.c (align_up, align_down): Move to ...
4932 * common/common-utils.c (align_up, align_down): ... here.
4933 * utils.h (align_up, align_down): Move to ...
4934 * common/common-utils.h (align_up, align_down): ... here.
4935
05bc7456
JB
49362018-05-04 Joel Brobecker <brobecker@adacore.com>
4937
4938 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4939 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4940 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4941 Re-implement to match the ABI as summarized in GCC's
4942 gcc/config/sparc/sparc.c. All callers updated.
4943 (sparc32_store_arguments): Remove assertion.
4944
2f433492
TT
49452018-05-04 Tom Tromey <tom@tromey.com>
4946
4947 * printcmd.c: Don't include tui.h.
4948 (decode_format): Use skip_spaces.
4949
9be2ae8f
TT
49502018-05-04 Tom Tromey <tom@tromey.com>
4951
4952 PR gdb/22619:
4953 * printcmd.c (last_count): New global.
4954 (x_command): Use saved count when repeating.
4955
f0b3976b
TT
49562018-05-04 Tom Tromey <tom@tromey.com>
4957
4958 * nto-procfs.c (do_closedir_cleanup): Remove.
4959 (procfs_pidlist): Use gdb_dir_up.
4960 * procfs.c (do_closedir_cleanup): Remove.
4961 (proc_update_threads): Use gdb_dir_up.
4962 * common/filestuff.h (struct gdb_dir_deleter): New.
4963 (gdb_dir_up): New typedef.
4964
862d101a
TT
49652018-05-04 Tom Tromey <tom@tromey.com>
4966
4967 * ada-lang.c (print_mention_exception): Use std::string.
4968
cb7de75e
TT
49692018-05-04 Tom Tromey <tom@tromey.com>
4970
4971 * ada-lang.c (create_excep_cond_exprs): Update.
4972 (ada_exception_catchpoint_cond_string): Use std::string.
4973
49d83361
TT
49742018-05-04 Tom Tromey <tom@tromey.com>
4975
4976 * ada-lang.c (xget_renaming_scope): Return std::string.
4977 (old_renaming_is_invisible): Update.
4978
ade72a34
TT
49792018-05-04 Tom Tromey <tom@tromey.com>
4980
4981 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4982 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4983
2be4d7f0
UW
49842018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4985
4986 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4987
69b6ecb0
TT
49882018-05-04 Tom Tromey <tom@tromey.com>
4989
4990 * remote.c (remote_query_supported_append): Change type.
4991 (remote_check_symbols): Update.
4992
bf27f0e2
PP
49932018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4994
4995 PR gdb/11420
4996 * configure.ac: Prepend libpython.
4997 * python/python-config.py: Likewise.
4998 * configure: Regenerate.
4999
4ea17de8
SM
50002018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5001
5002 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5003
bd732259
PA
50042018-05-03 Pedro Alves <palves@redhat.com>
5005
5006 * s390-linux-nat.c
5007 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5008 override. Write 'true' instead of '1'.
5009 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5010 declaration.
5011
d9f719f1
PA
50122018-05-02 Pedro Alves <palves@redhat.com>
5013
5014 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5015 add_inf_child_target.
5016 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5017 add_inf_child_target.
5018 * aix-thread.c (aix_thread_target_info): New.
5019 (aix_thread_target) <shortname, longname, doc>: Delete.
5020 <info>: New.
5021 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5022 add_inf_child_target.
5023 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5024 add_inf_child_target.
5025 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5026 add_inf_child_target.
5027 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5028 add_inf_child_target.
5029 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5030 add_inf_child_target.
5031 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5032 add_inf_child_target.
5033 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5034 add_inf_child_target.
5035 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5036 add_inf_child_target.
5037 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5038 add_inf_child_target.
5039 * bfd-target.c (target_bfd_target_info): New.
5040 (target_bfd) <shortname, longname, doc>: Delete.
5041 <info>: New.
5042 * bsd-kvm.c (bsd_kvm_target_info): New.
5043 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5044 <info>: New.
5045 (bsd_kvm_target::open): Rename to ...
5046 (bsd_kvm_target_open): ... this. Adjust.
5047 * bsd-uthread.c (bsd_uthread_target_info): New.
5048 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5049 <info>: New.
5050 * corefile.c (core_file_command): Adjust.
5051 * corelow.c (core_target_info): New.
5052 (core_target) <shortname, longname, doc>: Delete.
5053 <info>: New.
5054 (core_target::open): Rename to ...
5055 (core_target_open): ... this. Adjust.
5056 * ctf.c (ctf_target_info): New.
5057 (ctf_target) <shortname, longname, doc>: Delete.
5058 <info>: New.
5059 (ctf_target::open): Rename to ...
5060 (ctf_target_open): ... this.
5061 (_initialize_ctf): Adjust.
5062 * exec.c (exec_target_info): New.
5063 (exec_target) <shortname, longname, doc>: Delete.
5064 <info>: New.
5065 (exec_target::open): Rename to ...
5066 (exec_target_open): ... this.
5067 * gdbcore.h (core_target_open): Declare.
5068 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5069 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5070 add_inf_child_target.
5071 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5072 add_inf_child_target.
5073 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5074 add_inf_child_target.
5075 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5076 add_inf_child_target.
5077 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5078 add_inf_child_target.
5079 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5080 add_inf_child_target.
5081 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5082 add_inf_child_target.
5083 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5084 add_inf_child_target.
5085 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5086 add_inf_child_target.
5087 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5088 add_inf_child_target.
5089 * inf-child.c (inf_child_target_info): New.
5090 (inf_child_target::info): New.
5091 (inf_child_open_target): Remove 'target' parameter. Use
5092 get_native_target instead.
5093 (inf_child_target::open): Delete.
5094 (add_inf_child_target): New.
5095 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5096 Delete.
5097 <info>: New.
5098 (add_inf_child_target): Declare.
5099 (inf_child_open_target): Declare.
5100 * linux-thread-db.c (thread_db_target_info): New.
5101 (thread_db_target) <shortname, longname, doc>: Delete.
5102 <info>: New.
5103 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5104 add_inf_child_target.
5105 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5106 add_inf_child_target.
5107 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5108 add_inf_child_target.
5109 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5110 add_inf_child_target.
5111 * make-target-delegates (print_class): Adjust.
5112 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5113 add_inf_child_target.
5114 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5115 add_inf_child_target.
5116 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5117 add_inf_child_target.
5118 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5119 add_inf_child_target.
5120 * nto-procfs.c (nto_native_target_info): New.
5121 (nto_procfs_target_native) <shortname, longname, doc>:
5122 Delete.
5123 <info>: New.
5124 (nto_procfs_target_info): New.
5125 (nto_procfs_target_procfs) <shortname, longname, doc>:
5126 Delete.
5127 <info>: New.
5128 (init_procfs_targets): Adjust.
5129 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5130 add_inf_child_target.
5131 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5132 add_inf_child_target.
5133 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5134 add_inf_child_target.
5135 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5136 add_inf_child_target.
5137 * ravenscar-thread.c (ravenscar_target_info): New.
5138 (ravenscar_thread_target) <shortname, longname, doc>:
5139 Delete.
5140 <info>: New.
5141 * record-btrace.c (record_btrace_target_info):
5142 (record_btrace_target) <shortname, longname, doc>: Delete.
5143 <info>: New.
5144 (record_btrace_target::open): Rename to ...
5145 (record_btrace_target_open): ... this. Adjust.
5146 * record-full.c (record_longname, record_doc): New.
5147 (record_full_base_target) <shortname, longname, doc>: Delete.
5148 <info>: New.
5149 (record_full_target_info): New.
5150 (record_full_target): <shortname>: Delete.
5151 <info>: New.
5152 (record_full_core_open_1, record_full_open_1): Update comments.
5153 (record_full_base_target::open): Rename to ...
5154 (record_full_open): ... this.
5155 (cmd_record_full_restore): Update.
5156 (_initialize_record_full): Update.
5157 * remote-sim.c (remote_sim_target_info): New.
5158 (gdbsim_target) <shortname, longname, doc>: Delete.
5159 <info>: New.
5160 (gdbsim_target::open): Rename to ...
5161 (gdbsim_target_open): ... this.
5162 (_initialize_remote_sim): Adjust.
5163 * remote.c (remote_doc): New.
5164 (remote_target_info): New.
5165 (remote_target) <shortname, longname, doc>: Delete.
5166 <info>: New.
5167 (extended_remote_target_info): New.
5168 (extended_remote_target) <shortname, longname, doc>: Delete.
5169 <info>: New.
5170 (remote_target::open_1): Make static. Adjust.
5171 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5172 * s390-linux-nat.c (_initialize_s390_nat): Use
5173 add_inf_child_target.
5174 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5175 add_inf_child_target.
5176 * sol-thread.c (thread_db_target_info): New.
5177 (sol_thread_target) <shortname, longname, doc>: Delete.
5178 <info>: New.
5179 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5180 add_inf_child_target.
5181 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5182 add_inf_child_target.
5183 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5184 add_inf_child_target.
5185 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5186 add_inf_child_target.
5187 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5188 add_inf_child_target.
5189 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5190 add_inf_child_target.
5191 * spu-linux-nat.c (_initialize_spu_nat): Use
5192 add_inf_child_target.
5193 * spu-multiarch.c (spu_multiarch_target_info): New.
5194 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5195 <info>: New.
5196 * target-delegates.c: Regenerate.
5197 * target.c: Include <unordered_map>.
5198 (target_ops_p): Delete.
5199 (DEF_VEC_P(target_ops_p)): Delete.
5200 (target_factories): New.
5201 (test_target_info): New.
5202 (test_target_ops::info): New.
5203 (open_target): Adjust to use target_factories.
5204 (add_target_with_completer): Rename to ...
5205 (add_target): ... this. Change prototype. Register target_info
5206 and open callback in target_factories. Register target_info in
5207 command context instead of target_ops.
5208 (add_target): Delete old implementation.
5209 (add_deprecated_target_alias): Change prototype. Adjust.
5210 (the_native_target): New.
5211 (set_native_target, get_native_target): New.
5212 (find_default_run_target): Use the_native_target.
5213 (find_attach_target, find_run_target): Simplify.
5214 (target_ops::open): Delete.
5215 (dummy_target_info): New.
5216 (dummy_target::shortname, dummy_target::longname)
5217 (dummy_target::doc): Delete.
5218 (dummy_target::info): New.
5219 (debug_target::shortname, debug_target::longname)
5220 (debug_target::doc): Delete.
5221 (debug_target::info): New.
5222 * target.h (struct target_info): New.
5223 (target_ops::~target_ops): Add comment.
5224 (target_ops::info): New.
5225 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5226 longer virtual. Implement in terms of target_info.
5227 (set_native_target, get_native_target): Declare.
5228 (target_open_ftype): New.
5229 (add_target, add_target_with_completer)
5230 (add_deprecated_target_alias): Change prototype.
5231 (test_target) <shortname, longname, doc>: Delete.
5232 <info>: New.
5233 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5234 add_inf_child_target.
5235 * tracefile-tfile.c (tfile_target_info): New.
5236 (tfile_target) <shortname, longname, doc>: Delete.
5237 <info>: New.
5238 (tfile_target::open): Rename to ...
5239 (tfile_target_open): ... this.
5240 (_initialize_tracefile_tfile): Adjust.
5241 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5242 add_inf_child_target.
5243 * windows-nat.c (_initialize_windows_nat): Use
5244 add_inf_child_target.
5245 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5246 add_inf_child_target.
5247
135340af
PA
52482018-05-02 Pedro Alves <palves@redhat.com>
5249
5250 * linux-nat.h (linux_nat_target) <low_new_thread,
5251 low_delete_thread, low_new_fork, low_forget_process,
5252 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5253 New virtual methods.
5254 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5255 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5256 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5257 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5258 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5259 Delete.
5260 * linux-fork.c (delete_fork): Adjust to call low method.
5261 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5262 (linux_nat_new_fork, linux_nat_forget_process_hook)
5263 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5264 (linux_nat_status_is_event):
5265 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5266 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5267 to call low method.
5268 (sigtrap_is_event): Rename to ...
5269 (linux_nat_target::low_status_is_event): ... this.
5270 (linux_nat_set_status_is_event): Delete.
5271 (save_stop_reason, linux_nat_wait_1)
5272 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5273 low methods.
5274 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5275 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5276 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5277 (linux_nat_set_prepare_to_resume): Delete.
5278 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5279 low virtual methods.
5280 * amd64-linux-nat.c: Likewise.
5281 * arm-linux-nat.c: Likewise.
5282 * i386-linux-nat.c: Likewise.
5283 * ia64-linux-nat.c: Likewise.
5284 * mips-linux-nat.c: Likewise.
5285 * ppc-linux-nat.c: Likewise.
5286 * s390-linux-nat.c: Likewise.
5287 * sparc64-linux-nat.c: Likewise.
5288 * x86-linux-nat.c: Likewise.
5289 * x86-linux-nat.h: Include "nat/x86-linux.h".
5290 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5291 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5292 Override methods.
5293
57810aa7
PA
52942018-05-02 Pedro Alves <palves@redhat.com>
5295
5296 * target.h (target_ops)
5297 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5298 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5299 stopped_by_watchpoint, have_continuable_watchpoint,
5300 stopped_data_address, watchpoint_addr_within_range,
5301 can_accel_watchpoint_condition, can_run, thread_alive,
5302 has_all_memory, has_memory, has_stack, has_registers,
5303 has_execution, can_async_p, is_async_p, supports_non_stop,
5304 always_non_stop_p, can_execute_reverse, supports_multi_process,
5305 supports_enable_disable_tracepoint,
5306 supports_disable_randomization, supports_string_tracing,
5307 supports_evaluation_of_breakpoint_conditions,
5308 can_run_breakpoint_commands, filesystem_is_local,
5309 can_download_tracepoint, get_trace_state_variable_value,
5310 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5311 record_is_replaying, record_will_replay,
5312 augmented_libraries_svr4_read>: Adjust to return bool.
5313 * aarch64-linux-nat.c: All implementations adjusted.
5314 * aix-thread.c: All implementations adjusted.
5315 * arm-linux-nat.c: All implementations adjusted.
5316 * breakpoint.c: All implementations adjusted.
5317 * bsd-kvm.c: All implementations adjusted.
5318 * bsd-uthread.c: All implementations adjusted.
5319 * corelow.c: All implementations adjusted.
5320 * ctf.c: All implementations adjusted.
5321 * darwin-nat.c: All implementations adjusted.
5322 * darwin-nat.h: All implementations adjusted.
5323 * exec.c: All implementations adjusted.
5324 * fbsd-nat.c: All implementations adjusted.
5325 * fbsd-nat.h: All implementations adjusted.
5326 * gnu-nat.c: All implementations adjusted.
5327 * gnu-nat.h: All implementations adjusted.
5328 * go32-nat.c: All implementations adjusted.
5329 * ia64-linux-nat.c: All implementations adjusted.
5330 * inf-child.c: All implementations adjusted.
5331 * inf-child.h: All implementations adjusted.
5332 * inf-ptrace.c: All implementations adjusted.
5333 * inf-ptrace.h: All implementations adjusted.
5334 * linux-nat.c: All implementations adjusted.
5335 * linux-nat.h: All implementations adjusted.
5336 * mips-linux-nat.c: All implementations adjusted.
5337 * nto-procfs.c: All implementations adjusted.
5338 * ppc-linux-nat.c: All implementations adjusted.
5339 * procfs.c: All implementations adjusted.
5340 * ravenscar-thread.c: All implementations adjusted.
5341 * record-btrace.c: All implementations adjusted.
5342 * record-full.c: All implementations adjusted.
5343 * remote-sim.c: All implementations adjusted.
5344 * remote.c: All implementations adjusted.
5345 * s390-linux-nat.c: All implementations adjusted.
5346 * sol-thread.c: All implementations adjusted.
5347 * spu-multiarch.c: All implementations adjusted.
5348 * target-delegates.c: All implementations adjusted.
5349 * target.c: All implementations adjusted.
5350 * target.h: All implementations adjusted.
5351 * tracefile-tfile.c: All implementations adjusted.
5352 * tracefile.c: All implementations adjusted.
5353 * tracefile.h: All implementations adjusted.
5354 * windows-nat.c: All implementations adjusted.
5355 * x86-linux-nat.h: All implementations adjusted.
5356 * x86-nat.h: All implementations adjusted.
5357
ad6a4e2d
PA
53582018-05-02 Pedro Alves <palves@redhat.com>
5359
5360 * make-target-delegates (scan_target_h): Don't trim lines here.
5361 Replace sequences of tabs and/or whitespace with a single
5362 whitespace.
5363 (top level, parsing methods): Trim each line before processing it
5364 here.
5365
f6ac5f3d
PA
53662018-05-02 Pedro Alves <palves@redhat.com>
5367 John Baldwin <jhb@freebsd.org>
5368
5369 * target.h (enum strata) <debug_stratum>: New.
5370 (struct target_ops) <all delegation methods>: Replace by C++
5371 virtual methods, and drop "to_" prefix. All references updated
5372 throughout.
5373 <to_shortname, to_longname, to_doc, to_data,
5374 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5375 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5376 virtual methods. All references updated throughout.
5377 <can_attach, supports_terminal_ours, can_create_inferior,
5378 get_thread_control_capabilities, attach_no_wait>: New
5379 virtual methods.
5380 <insert_breakpoint, remove_breakpoint>: Now
5381 TARGET_DEFAULT_NORETURN methods.
5382 <info_proc>: Now returns bool.
5383 <to_magic>: Delete.
5384 (OPS_MAGIC): Delete.
5385 (current_target): Delete. All references replaced by references
5386 to ...
5387 (target_stack): ... this. New.
5388 (target_shortname, target_longname): Adjust.
5389 (target_can_run): Now a function declaration.
5390 (default_child_has_all_memory, default_child_has_memory)
5391 (default_child_has_stack, default_child_has_registers)
5392 (default_child_has_execution): Remove target_ops parameter.
5393 (complete_target_initialization): Delete.
5394 (memory_breakpoint_target): New template class.
5395 (test_target_ops): Refactor as a C++ class with virtual methods.
5396 * make-target-delegates (NAME_PART): Tighten.
5397 (POINTER_PART, CP_SYMBOL): New.
5398 (SIMPLE_RETURN_PART): Reimplement.
5399 (VEC_RETURN_PART): Expect less.
5400 (RETURN_PART, VIRTUAL_PART): New.
5401 (METHOD): Adjust to C++ virtual methods.
5402 (scan_target_h): Remove reference to C99.
5403 (dname): Output "target_ops::" prefix.
5404 (write_function_header): Adjust to output a C++ class method.
5405 (write_declaration): New.
5406 (write_delegator): Adjust to output a C++ class method.
5407 (tdname): Output "dummy_target::" prefix.
5408 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5409 method.
5410 (tdefault_names, debug_names): Delete.
5411 (return_types, tdefaults, styles, argtypes_array): New.
5412 (top level): All methods are delegators.
5413 (print_class): New.
5414 (top level): Print dummy_target and debug_target classes.
5415 * target-delegates.c: Regenerate.
5416 * target-debug.h (target_debug_print_enum_info_proc_what)
5417 (target_debug_print_thread_control_capabilities)
5418 (target_debug_print_thread_info_p): New.
5419 * target.c (dummy_target): Delete.
5420 (the_dummy_target, the_debug_target): New.
5421 (target_stack): Now extern.
5422 (set_targetdebug): Push/unpush debug target.
5423 (default_child_has_all_memory, default_child_has_memory)
5424 (default_child_has_stack, default_child_has_registers)
5425 (default_child_has_execution): Remove target_ops parameter.
5426 (complete_target_initialization): Delete.
5427 (add_target_with_completer): No longer call
5428 complete_target_initialization.
5429 (target_supports_terminal_ours): Use regular delegation.
5430 (update_current_target): Delete.
5431 (push_target): No longer check magic number. Don't call
5432 update_current_target.
5433 (unpush_target): Don't call update_current_target.
5434 (target_is_pushed): No longer check magic number.
5435 (target_require_runnable): Skip for all stratums over
5436 process_stratum.
5437 (target_ops::info_proc): New.
5438 (target_info_proc): Use find_target_at and
5439 find_default_run_target.
5440 (target_supports_disable_randomization): Use regular delegation.
5441 (target_get_osdata): Use find_target_at.
5442 (target_ops::open, target_ops::close, target_ops::can_attach)
5443 (target_ops::attach, target_ops::can_create_inferior)
5444 (target_ops::create_inferior, target_ops::can_run)
5445 (target_can_run): New.
5446 (default_fileio_target): Use regular delegation.
5447 (target_ops::fileio_open, target_ops::fileio_pwrite)
5448 (target_ops::fileio_pread, target_ops::fileio_fstat)
5449 (target_ops::fileio_close, target_ops::fileio_unlink)
5450 (target_ops::fileio_readlink): New.
5451 (target_fileio_open_1, target_fileio_unlink)
5452 (target_fileio_readlink): Always call the target method. Handle
5453 FILEIO_ENOSYS.
5454 (return_zero, return_zero_has_execution): Delete.
5455 (init_dummy_target): Delete.
5456 (dummy_target::dummy_target, dummy_target::shortname)
5457 (dummy_target::longname, dummy_target::doc)
5458 (debug_target::debug_target, debug_target::shortname)
5459 (debug_target::longname, debug_target::doc): New.
5460 (target_supports_delete_record): Use regular delegation.
5461 (setup_target_debug): Delete.
5462 (maintenance_print_target_stack): Skip debug_stratum.
5463 (initialize_targets): Instantiate the_dummy_target and
5464 the_debug_target.
5465 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5466 use target_stack.
5467 (target_auxv_search, fprint_target_auxv): Adjust.
5468 (info_auxv_command): Adjust to use target_stack.
5469 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5470 * exceptions.c (print_flush): Handle a NULL target_stack.
5471 * regcache.c (target_ops_no_register): Refactor as class with
5472 virtual methods.
5473
5474 * exec.c (exec_target): New class.
5475 (exec_ops): Now an exec_target.
5476 (exec_open, exec_close_1, exec_get_section_table)
5477 (exec_xfer_partial, exec_files_info, exec_has_memory)
5478 (exec_make_note_section): Refactor as exec_target methods.
5479 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5480 Delete.
5481 (exec_target::find_memory_regions): New.
5482 (_initialize_exec): Don't call init_exec_ops.
5483 * gdbcore.h (exec_file_clear): Delete.
5484
5485 * corefile.c (core_target): Delete.
5486 (core_file_command): Adjust.
5487 * corelow.c (core_target): New class.
5488 (the_core_target): New.
5489 (core_close): Remove target_ops parameter.
5490 (core_close_cleanup): Adjust.
5491 (core_target::close): New.
5492 (core_open, core_detach, get_core_registers, core_files_info)
5493 (core_xfer_partial, core_thread_alive, core_read_description)
5494 (core_pid_to_str, core_thread_name, core_has_memory)
5495 (core_has_stack, core_has_registers, core_info_proc): Rework as
5496 core_target methods.
5497 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5498 (_initialize_corelow): Initialize the_core_target.
5499 * gdbcore.h (core_target): Delete.
5500 (the_core_target): New.
5501
5502 * ctf.c: (ctf_target): New class.
5503 (ctf_ops): Now a ctf_target.
5504 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5505 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5506 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5507 methods.
5508 (init_ctf_ops): Delete.
5509 (_initialize_ctf): Don't call it.
5510 * tracefile-tfile.c (tfile_target): New class.
5511 (tfile_ops): Now a tfile_target.
5512 (tfile_open, tfile_close, tfile_files_info)
5513 (tfile_get_tracepoint_status, tfile_trace_find)
5514 (tfile_fetch_registers, tfile_xfer_partial)
5515 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5516 Refactor as tfile_target methods.
5517 (tfile_xfer_partial_features): Remove target_ops parameter.
5518 (init_tfile_ops): Delete.
5519 (_initialize_tracefile_tfile): Don't call it.
5520 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5521 (tracefile_has_stack, tracefile_has_registers)
5522 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5523 tracefile_target methods.
5524 (init_tracefile_ops): Delete.
5525 (tracefile_target::tracefile_target): New.
5526 * tracefile.h: Include "target.h".
5527 (tracefile_target): New class.
5528 (init_tracefile_ops): Delete.
5529
5530 * spu-multiarch.c (spu_multiarch_target): New class.
5531 (spu_ops): Now a spu_multiarch_target.
5532 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5533 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5534 (spu_search_memory, spu_mourn_inferior): Refactor as
5535 spu_multiarch_target methods.
5536 (init_spu_ops): Delete.
5537 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5538 complete_target_initialization.
5539
5540 * ravenscar-thread.c (ravenscar_thread_target): New class.
5541 (ravenscar_ops): Now a ravenscar_thread_target.
5542 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5543 (ravenscar_thread_alive, ravenscar_pid_to_str)
5544 (ravenscar_fetch_registers, ravenscar_store_registers)
5545 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5546 (ravenscar_stopped_by_hw_breakpoint)
5547 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5548 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5549 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5550 methods.
5551 (init_ravenscar_thread_ops): Delete.
5552 (_initialize_ravenscar): Remove references to
5553 init_ravenscar_thread_ops and complete_target_initialization.
5554
5555 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5556 (bsd_uthread_target): New class.
5557 (bsd_uthread_ops): Now a bsd_uthread_target.
5558 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5559 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5560 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5561 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5562 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5563 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5564 (bsd_uthread_target): Delete function.
5565 (_initialize_bsd_uthread): Remove reference to
5566 complete_target_initialization.
5567
5568 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5569 (target_bfd): ... this new class.
5570 (target_bfd_xfer_partial, target_bfd_get_section_table)
5571 (target_bfd_close): Refactor as target_bfd methods.
5572 (target_bfd::~target_bfd): New.
5573 (target_bfd_reopen): Adjust.
5574 (target_bfd::close): New.
5575
5576 * record-btrace.c (record_btrace_target): New class.
5577 (record_btrace_ops): Now a record_btrace_target.
5578 (record_btrace_open, record_btrace_stop_recording)
5579 (record_btrace_disconnect, record_btrace_close)
5580 (record_btrace_async, record_btrace_info)
5581 (record_btrace_insn_history, record_btrace_insn_history_range)
5582 (record_btrace_insn_history_from, record_btrace_call_history)
5583 (record_btrace_call_history_range)
5584 (record_btrace_call_history_from, record_btrace_record_method)
5585 (record_btrace_is_replaying, record_btrace_will_replay)
5586 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5587 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5588 (record_btrace_store_registers, record_btrace_prepare_to_store)
5589 (record_btrace_to_get_unwinder)
5590 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5591 (record_btrace_commit_resume, record_btrace_wait)
5592 (record_btrace_stop, record_btrace_can_execute_reverse)
5593 (record_btrace_stopped_by_sw_breakpoint)
5594 (record_btrace_supports_stopped_by_sw_breakpoint)
5595 (record_btrace_stopped_by_hw_breakpoint)
5596 (record_btrace_supports_stopped_by_hw_breakpoint)
5597 (record_btrace_update_thread_list, record_btrace_thread_alive)
5598 (record_btrace_goto_begin, record_btrace_goto_end)
5599 (record_btrace_goto, record_btrace_stop_replaying_all)
5600 (record_btrace_execution_direction)
5601 (record_btrace_prepare_to_generate_core)
5602 (record_btrace_done_generating_core): Refactor as
5603 record_btrace_target methods.
5604 (init_record_btrace_ops): Delete.
5605 (_initialize_record_btrace): Remove reference to
5606 init_record_btrace_ops.
5607 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5608 the execution_direction global.
5609 (record_full_base_target, record_full_target)
5610 (record_full_core_target): New classes.
5611 (record_full_ops): Now a record_full_target.
5612 (record_full_core_ops): Now a record_full_core_target.
5613 (record_full_target::detach, record_full_target::disconnect)
5614 (record_full_core_target::disconnect)
5615 (record_full_target::mourn_inferior, record_full_target::kill):
5616 New.
5617 (record_full_open, record_full_close, record_full_async): Refactor
5618 as methods of the record_full_base_target class.
5619 (record_full_resume, record_full_commit_resume): Refactor
5620 as methods of the record_full_target class.
5621 (record_full_wait, record_full_stopped_by_watchpoint)
5622 (record_full_stopped_data_address)
5623 (record_full_stopped_by_sw_breakpoint)
5624 (record_full_supports_stopped_by_sw_breakpoint)
5625 (record_full_stopped_by_hw_breakpoint)
5626 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5627 methods of the record_full_base_target class.
5628 (record_full_store_registers, record_full_xfer_partial)
5629 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5630 Refactor as methods of the record_full_target class.
5631 (record_full_can_execute_reverse, record_full_get_bookmark)
5632 (record_full_goto_bookmark, record_full_execution_direction)
5633 (record_full_record_method, record_full_info, record_full_delete)
5634 (record_full_is_replaying, record_full_will_replay)
5635 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5636 (record_full_stop_replaying): Refactor as methods of the
5637 record_full_base_target class.
5638 (record_full_core_resume, record_full_core_kill)
5639 (record_full_core_fetch_registers)
5640 (record_full_core_prepare_to_store)
5641 (record_full_core_store_registers, record_full_core_xfer_partial)
5642 (record_full_core_insert_breakpoint)
5643 (record_full_core_remove_breakpoint)
5644 (record_full_core_has_execution): Refactor
5645 as methods of the record_full_core_target class.
5646 (record_full_base_target::supports_delete_record): New.
5647 (init_record_full_ops): Delete.
5648 (init_record_full_core_ops): Delete.
5649 (record_full_save): Refactor as method of the
5650 record_full_base_target class.
5651 (_initialize_record_full): Remove references to
5652 init_record_full_ops and init_record_full_core_ops.
5653
5654 * remote.c (remote_target, extended_remote_target): New classes.
5655 (remote_ops): Now a remote_target.
5656 (extended_remote_ops): Now an extended_remote_target.
5657 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5658 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5659 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5660 (remote_pass_signals, remote_set_syscall_catchpoint)
5661 (remote_program_signals, )
5662 (remote_thread_always_alive): Remove target_ops parameter.
5663 (remote_thread_alive, remote_thread_name)
5664 (remote_update_thread_list, remote_threads_extra_info)
5665 (remote_static_tracepoint_marker_at)
5666 (remote_static_tracepoint_markers_by_strid)
5667 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5668 (remote_open): Refactor as methods of remote_target.
5669 (extended_remote_open, extended_remote_detach)
5670 (extended_remote_attach, extended_remote_post_attach):
5671 (extended_remote_supports_disable_randomization)
5672 (extended_remote_create_inferior): : Refactor as method of
5673 extended_remote_target.
5674 (remote_set_permissions, remote_open_1, remote_detach)
5675 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5676 (remote_resume, remote_commit_resume, remote_stop)
5677 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5678 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5679 (remote_prepare_to_store, remote_store_registers)
5680 (remote_flash_erase, remote_flash_done, remote_files_info)
5681 (remote_kill, remote_mourn, remote_insert_breakpoint)
5682 (remote_remove_breakpoint, remote_insert_watchpoint)
5683 (remote_watchpoint_addr_within_range)
5684 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5685 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5686 (remote_supports_stopped_by_sw_breakpoint)
5687 (remote_stopped_by_hw_breakpoint)
5688 (remote_supports_stopped_by_hw_breakpoint)
5689 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5690 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5691 (remote_verify_memory): Refactor as methods of remote_target.
5692 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5693 parameter.
5694 (remote_xfer_partial, remote_get_memory_xfer_limit)
5695 (remote_search_memory, remote_rcmd, remote_memory_map)
5696 (remote_pid_to_str, remote_get_thread_local_address)
5697 (remote_get_tib_address, remote_read_description): Refactor as
5698 methods of remote_target.
5699 (remote_target::fileio_open, remote_target::fileio_pwrite)
5700 (remote_target::fileio_pread, remote_target::fileio_close): New.
5701 (remote_hostio_readlink, remote_hostio_fstat)
5702 (remote_filesystem_is_local, remote_can_execute_reverse)
5703 (remote_supports_non_stop, remote_supports_disable_randomization)
5704 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5705 (remote_supports_enable_disable_tracepoint)
5706 (remote_supports_string_tracing)
5707 (remote_can_run_breakpoint_commands, remote_trace_init)
5708 (remote_download_tracepoint, remote_can_download_tracepoint)
5709 (remote_download_trace_state_variable, remote_enable_tracepoint)
5710 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5711 (remote_trace_start, remote_get_trace_status)
5712 (remote_get_tracepoint_status, remote_trace_stop)
5713 (remote_trace_find, remote_get_trace_state_variable_value)
5714 (remote_save_trace_data, remote_get_raw_trace_data)
5715 (remote_set_disconnected_tracing, remote_core_of_thread)
5716 (remote_set_circular_trace_buffer, remote_traceframe_info)
5717 (remote_get_min_fast_tracepoint_insn_len)
5718 (remote_set_trace_buffer_size, remote_set_trace_notes)
5719 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5720 (remote_disable_btrace, remote_teardown_btrace)
5721 (remote_read_btrace, remote_btrace_conf)
5722 (remote_augmented_libraries_svr4_read, remote_load)
5723 (remote_pid_to_exec_file, remote_can_do_single_step)
5724 (remote_execution_direction, remote_thread_handle_to_thread_info):
5725 Refactor as methods of remote_target.
5726 (init_remote_ops, init_extended_remote_ops): Delete.
5727 (remote_can_async_p, remote_is_async_p, remote_async)
5728 (remote_thread_events, remote_upload_tracepoints)
5729 (remote_upload_trace_state_variables): Refactor as methods of
5730 remote_target.
5731 (_initialize_remote): Remove references to init_remote_ops and
5732 init_extended_remote_ops.
5733
5734 * remote-sim.c (gdbsim_target): New class.
5735 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5736 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5737 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5738 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5739 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5740 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5741 Refactor as methods of gdbsim_target.
5742 (gdbsim_ops): Now a gdbsim_target.
5743 (init_gdbsim_ops): Delete.
5744 (gdbsim_cntrl_c): Adjust.
5745 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5746
5747 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5748 (the_amd64_linux_nat_target): New.
5749 (amd64_linux_fetch_inferior_registers)
5750 (amd64_linux_store_inferior_registers): Refactor as methods of
5751 amd64_linux_nat_target.
5752 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5753 * i386-linux-nat.c: Don't include "linux-nat.h".
5754 (i386_linux_nat_target): New class.
5755 (the_i386_linux_nat_target): New.
5756 (i386_linux_fetch_inferior_registers)
5757 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5758 as methods of i386_linux_nat_target.
5759 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5760 * inf-child.c (inf_child_ops): Delete.
5761 (inf_child_fetch_inferior_registers)
5762 (inf_child_store_inferior_registers): Delete.
5763 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5764 methods of inf_child_target.
5765 (inf_child_target::supports_terminal_ours)
5766 (inf_child_target::terminal_init)
5767 (inf_child_target::terminal_inferior)
5768 (inf_child_target::terminal_ours_for_output)
5769 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5770 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5771 New.
5772 (inf_child_open, inf_child_disconnect, inf_child_close)
5773 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5774 (inf_child_post_startup_inferior, inf_child_can_run)
5775 (inf_child_pid_to_exec_file): Refactor as methods of
5776 inf_child_target.
5777 (inf_child_follow_fork): Delete.
5778 (inf_child_target::can_create_inferior)
5779 (inf_child_target::can_attach): New.
5780 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5781 (inf_child_target::has_stack, inf_child_target::has_registers)
5782 (inf_child_target::has_execution): New.
5783 (inf_child_fileio_open, inf_child_fileio_pwrite)
5784 (inf_child_fileio_pread, inf_child_fileio_fstat)
5785 (inf_child_fileio_close, inf_child_fileio_unlink)
5786 (inf_child_fileio_readlink, inf_child_use_agent)
5787 (inf_child_can_use_agent): Refactor as methods of
5788 inf_child_target.
5789 (return_zero, inf_child_target): Delete.
5790 (inf_child_target::inf_child_target): New.
5791 * inf-child.h: Include "target.h".
5792 (inf_child_target): Delete function prototype.
5793 (inf_child_target): New class.
5794 (inf_child_open_target, inf_child_mourn_inferior)
5795 (inf_child_maybe_unpush_target): Delete.
5796 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5797 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5798 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5799 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5800 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5801 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5802 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5803 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5804 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5805 methods of inf_ptrace_target.
5806 (inf_ptrace_target): Delete function.
5807 * inf-ptrace.h: Include "inf-child.h".
5808 (inf_ptrace_target): Delete function declaration.
5809 (inf_ptrace_target): New class.
5810 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5811 * linux-nat.c (linux_target): New.
5812 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5813 (linux_nat_target::~linux_nat_target): New.
5814 (linux_child_post_attach, linux_child_post_startup_inferior)
5815 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5816 (linux_child_remove_fork_catchpoint)
5817 (linux_child_insert_vfork_catchpoint)
5818 (linux_child_remove_vfork_catchpoint)
5819 (linux_child_insert_exec_catchpoint)
5820 (linux_child_remove_exec_catchpoint)
5821 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5822 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5823 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5824 (linux_nat_stopped_data_address)
5825 (linux_nat_stopped_by_sw_breakpoint)
5826 (linux_nat_supports_stopped_by_sw_breakpoint)
5827 (linux_nat_stopped_by_hw_breakpoint)
5828 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5829 (linux_nat_kill, linux_nat_mourn_inferior)
5830 (linux_nat_xfer_partial, linux_nat_thread_alive)
5831 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5832 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5833 (linux_child_static_tracepoint_markers_by_strid)
5834 (linux_nat_is_async_p, linux_nat_can_async_p)
5835 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5836 (linux_nat_supports_multi_process)
5837 (linux_nat_supports_disable_randomization, linux_nat_async)
5838 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5839 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5840 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5841 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5842 methods of linux_nat_target.
5843 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5844 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5845 parameter.
5846 (check_stopped_by_watchpoint): Adjust.
5847 (linux_xfer_partial): Delete.
5848 (linux_target_install_ops, linux_target, linux_nat_add_target):
5849 Delete.
5850 (linux_nat_target::linux_nat_target): New.
5851 * linux-nat.h: Include "inf-ptrace.h".
5852 (linux_nat_target): New.
5853 (linux_target, linux_target_install_ops, linux_nat_add_target):
5854 Delete function declarations.
5855 (linux_target): Declare global.
5856 * linux-thread-db.c (thread_db_target): New.
5857 (thread_db_target::thread_db_target): New.
5858 (thread_db_ops): Delete.
5859 (the_thread_db_target): New.
5860 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5861 (thread_db_update_thread_list, thread_db_pid_to_str)
5862 (thread_db_extra_thread_info)
5863 (thread_db_thread_handle_to_thread_info)
5864 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5865 (thread_db_resume): Refactor as methods of thread_db_target.
5866 (init_thread_db_ops): Delete.
5867 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5868 * x86-linux-nat.c: Don't include "linux-nat.h".
5869 (super_post_startup_inferior): Delete.
5870 (x86_linux_nat_target::~x86_linux_nat_target): New.
5871 (x86_linux_child_post_startup_inferior)
5872 (x86_linux_read_description, x86_linux_enable_btrace)
5873 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5874 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5875 methods of x86_linux_nat_target.
5876 (x86_linux_create_target): Delete. Bits folded ...
5877 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5878 pointer.
5879 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5880 (x86_linux_nat_target): New class.
5881 (x86_linux_create_target): Delete.
5882 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5883 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5884 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5885 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5886 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5887 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5888 make extern.
5889 (x86_use_watchpoints): Delete.
5890 * x86-nat.h: Include "breakpoint.h" and "target.h".
5891 (x86_use_watchpoints): Delete.
5892 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5893 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5894 (x86_insert_watchpoint, x86_remove_watchpoint)
5895 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5896 (x86_stopped_by_hw_breakpoint): New declarations.
5897 (x86_nat_target): New template class.
5898
5899 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5900 (the_ppc_linux_nat_target): New.
5901 (ppc_linux_fetch_inferior_registers)
5902 (ppc_linux_can_use_hw_breakpoint)
5903 (ppc_linux_region_ok_for_hw_watchpoint)
5904 (ppc_linux_ranged_break_num_registers)
5905 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5906 (ppc_linux_insert_mask_watchpoint)
5907 (ppc_linux_remove_mask_watchpoint)
5908 (ppc_linux_can_accel_watchpoint_condition)
5909 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5910 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5911 (ppc_linux_watchpoint_addr_within_range)
5912 (ppc_linux_masked_watch_num_registers)
5913 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5914 (ppc_linux_read_description): Refactor as methods of
5915 ppc_linux_nat_target.
5916 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5917
5918 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5919 (procfs_target): New class.
5920 (the_procfs_target): New.
5921 (procfs_target): Delete function.
5922 (procfs_auxv_parse, procfs_attach, procfs_detach)
5923 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5924 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5925 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5926 (procfs_create_inferior, procfs_update_thread_list)
5927 (procfs_thread_alive, procfs_pid_to_str)
5928 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5929 (procfs_stopped_data_address, procfs_insert_watchpoint)
5930 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5931 (proc_find_memory_regions, procfs_info_proc)
5932 (procfs_make_note_section): Refactor as methods of procfs_target.
5933 (_initialize_procfs): Adjust.
5934 * sol-thread.c (sol_thread_target): New class.
5935 (sol_thread_ops): Now a sol_thread_target.
5936 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5937 (sol_thread_fetch_registers, sol_thread_store_registers)
5938 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5939 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5940 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5941 (init_sol_thread_ops): Delete.
5942 (_initialize_sol_thread): Adjust. Remove references to
5943 init_sol_thread_ops and complete_target_initialization.
5944
5945 * windows-nat.c (windows_nat_target): New class.
5946 (windows_fetch_inferior_registers)
5947 (windows_store_inferior_registers, windows_resume, windows_wait)
5948 (windows_attach, windows_detach, windows_pid_to_exec_file)
5949 (windows_files_info, windows_create_inferior)
5950 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5951 (windows_close, windows_pid_to_str, windows_xfer_partial)
5952 (windows_get_tib_address, windows_get_ada_task_ptid)
5953 (windows_thread_name, windows_thread_alive): Refactor as
5954 windows_nat_target methods.
5955 (do_initial_windows_stuff): Adjust.
5956 (windows_target): Delete function.
5957 (_initialize_windows_nat): Adjust.
5958
5959 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5960 (darwin_mourn_inferior, darwin_kill_inferior)
5961 (darwin_create_inferior, darwin_attach, darwin_detach)
5962 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5963 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5964 (darwin_supports_multi_process): Refactor as darwin_nat_target
5965 methods.
5966 (darwin_resume_to, darwin_files_info): Delete.
5967 (_initialize_darwin_inferior): Rename to ...
5968 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5969 * darwin-nat.h: Include "inf-child.h".
5970 (darwin_nat_target): New class.
5971 (darwin_complete_target): Delete.
5972 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5973 (darwin_target): New.
5974 (i386_darwin_fetch_inferior_registers)
5975 (i386_darwin_store_inferior_registers): Refactor as methods of
5976 darwin_nat_target.
5977 (darwin_complete_target): Delete, with ...
5978 (_initialize_i386_darwin_nat): ... bits factored out here.
5979
5980 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5981 (the_alpha_linux_nat_target): New.
5982 (alpha_linux_register_u_offset): Refactor as
5983 alpha_linux_nat_target method.
5984 (_initialize_alpha_linux_nat): Adjust.
5985 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5986 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5987 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5988 methods of linux_nat_trad_target.
5989 (linux_trad_target): Delete.
5990 * linux-nat-trad.h (linux_trad_target): Delete function.
5991 (linux_nat_trad_target): New class.
5992 * mips-linux-nat.c (mips_linux_nat_target): New class.
5993 (super_fetch_registers, super_store_registers, super_close):
5994 Delete.
5995 (the_mips_linux_nat_target): New.
5996 (mips64_linux_regsets_fetch_registers)
5997 (mips64_linux_regsets_store_registers)
5998 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5999 (mips_linux_register_u_offset, mips_linux_read_description)
6000 (mips_linux_can_use_hw_breakpoint)
6001 (mips_linux_stopped_by_watchpoint)
6002 (mips_linux_stopped_data_address)
6003 (mips_linux_region_ok_for_hw_watchpoint)
6004 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6005 (mips_linux_close): Refactor as methods of mips_linux_nat.
6006 (_initialize_mips_linux_nat): Adjust to C++ification.
6007
6008 * aix-thread.c (aix_thread_target): New class.
6009 (aix_thread_ops): Now an aix_thread_target.
6010 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6011 (aix_thread_fetch_registers, aix_thread_store_registers)
6012 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6013 (aix_thread_thread_alive, aix_thread_pid_to_str)
6014 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6015 Refactor as methods of aix_thread_target.
6016 (init_aix_thread_ops): Delete.
6017 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6018 and complete_target_initialization.
6019 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6020 (rs6000_nat_target): New class.
6021 (the_rs6000_nat_target): New.
6022 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6023 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6024 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6025 (super_create_inferior): Delete.
6026 (_initialize_rs6000_nat): Adjust to C++ification.
6027
6028 * arm-linux-nat.c (arm_linux_nat_target): New class.
6029 (the_arm_linux_nat_target): New.
6030 (arm_linux_fetch_inferior_registers)
6031 (arm_linux_store_inferior_registers, arm_linux_read_description)
6032 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6033 (arm_linux_remove_hw_breakpoint)
6034 (arm_linux_region_ok_for_hw_watchpoint)
6035 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6036 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6037 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6038 arm_linux_nat_target.
6039 (_initialize_arm_linux_nat): Adjust to C++ification.
6040
6041 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6042 (the_aarch64_linux_nat_target): New.
6043 (aarch64_linux_fetch_inferior_registers)
6044 (aarch64_linux_store_inferior_registers)
6045 (aarch64_linux_child_post_startup_inferior)
6046 (aarch64_linux_read_description)
6047 (aarch64_linux_can_use_hw_breakpoint)
6048 (aarch64_linux_insert_hw_breakpoint)
6049 (aarch64_linux_remove_hw_breakpoint)
6050 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6051 (aarch64_linux_region_ok_for_hw_watchpoint)
6052 (aarch64_linux_stopped_data_address)
6053 (aarch64_linux_stopped_by_watchpoint)
6054 (aarch64_linux_watchpoint_addr_within_range)
6055 (aarch64_linux_can_do_single_step): Refactor as methods of
6056 aarch64_linux_nat_target.
6057 (super_post_startup_inferior): Delete.
6058 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6059
6060 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6061 (the_hppa_linux_nat_target): New.
6062 (hppa_linux_fetch_inferior_registers)
6063 (hppa_linux_store_inferior_registers): Refactor as methods of
6064 hppa_linux_nat_target.
6065 (_initialize_hppa_linux_nat): Adjust to C++ification.
6066
6067 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6068 (the_ia64_linux_nat_target): New.
6069 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6070 (ia64_linux_stopped_data_address)
6071 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6072 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6073 ia64_linux_nat_target methods.
6074 (super_xfer_partial): Delete.
6075 (_initialize_ia64_linux_nat): Adjust to C++ification.
6076
6077 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6078 (the_m32r_linux_nat_target): New.
6079 (m32r_linux_fetch_inferior_registers)
6080 (m32r_linux_store_inferior_registers): Refactor as
6081 m32r_linux_nat_target methods.
6082 (_initialize_m32r_linux_nat): Adjust to C++ification.
6083
6084 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6085 (the_m68k_linux_nat_target): New.
6086 (m68k_linux_fetch_inferior_registers)
6087 (m68k_linux_store_inferior_registers): Refactor as
6088 m68k_linux_nat_target methods.
6089 (_initialize_m68k_linux_nat): Adjust to C++ification.
6090
6091 * s390-linux-nat.c (s390_linux_nat_target): New class.
6092 (the_s390_linux_nat_target): New.
6093 (s390_linux_fetch_inferior_registers)
6094 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6095 (s390_insert_watchpoint, s390_remove_watchpoint)
6096 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6097 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6098 (s390_auxv_parse, s390_read_description): Refactor as methods of
6099 s390_linux_nat_target.
6100 (_initialize_s390_nat): Adjust to C++ification.
6101
6102 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6103 (the_sparc_linux_nat_target): New.
6104 (_initialize_sparc_linux_nat): Adjust to C++ification.
6105 * sparc-nat.c (sparc_fetch_inferior_registers)
6106 (sparc_store_inferior_registers): Remove target_ops parameter.
6107 * sparc-nat.h (sparc_fetch_inferior_registers)
6108 (sparc_store_inferior_registers): Remove target_ops parameter.
6109 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6110 (the_sparc64_linux_nat_target): New.
6111 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6112
6113 * spu-linux-nat.c (spu_linux_nat_target): New class.
6114 (the_spu_linux_nat_target): New.
6115 (spu_child_post_startup_inferior, spu_child_post_attach)
6116 (spu_child_wait, spu_fetch_inferior_registers)
6117 (spu_store_inferior_registers, spu_xfer_partial)
6118 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6119 methods.
6120 (_initialize_spu_nat): Adjust to C++ification.
6121
6122 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6123 (the_tilegx_linux_nat_target): New.
6124 (fetch_inferior_registers, store_inferior_registers):
6125 Refactor as methods.
6126 (_initialize_tile_linux_nat): Adjust to C++ification.
6127
6128 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6129 (the_xtensa_linux_nat_target): New.
6130 (xtensa_linux_fetch_inferior_registers)
6131 (xtensa_linux_store_inferior_registers): Refactor as
6132 xtensa_linux_nat_target methods.
6133 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6134
6135 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6136 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6137 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6138 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6139 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6140 (fbsd_stopped_by_sw_breakpoint)
6141 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6142 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6143 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6144 (fbsd_post_startup_inferior, fbsd_post_attach)
6145 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6146 (fbsd_set_syscall_catchpoint)
6147 (super_xfer_partial, super_resume, super_wait)
6148 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6149 (fbsd_handle_debug_trap): Remove target_ops parameter.
6150 (fbsd_nat_add_target): Delete.
6151 * fbsd-nat.h: Include "inf-ptrace.h".
6152 (fbsd_nat_add_target): Delete.
6153 (USE_SIGTRAP_SIGINFO): Define.
6154 (fbsd_nat_target): New class.
6155
6156 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6157 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6158 (amd64bsd_target): Delete.
6159 * amd64-bsd-nat.h: New file.
6160 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6161 "x86-bsd-nat.h".
6162 (amd64_fbsd_nat_target): New class.
6163 (the_amd64_fbsd_nat_target): New.
6164 (amd64fbsd_read_description): Refactor as method of
6165 amd64_fbsd_nat_target.
6166 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6167 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6168 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6169 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6170 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6171 (i386bsd_target): Delete.
6172 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6173 (i386bsd_fetch_inferior_registers)
6174 (i386bsd_store_inferior_registers): Declare.
6175 (i386_bsd_nat_target): New class.
6176 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6177 (the_i386_fbsd_nat_target): New.
6178 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6179 i386_fbsd_nat_target methods.
6180 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6181 (_initialize_i386fbsd_nat): Adjust to C++ification.
6182 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6183 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6184 (_initialize_x86_bsd_nat): Adjust to C++ification.
6185 * x86-bsd-nat.h: Include "x86-nat.h".
6186 (x86bsd_target): Delete declaration.
6187 (x86bsd_nat_target): New class.
6188
6189 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6190 (the_aarch64_fbsd_nat_target): New.
6191 (aarch64_fbsd_fetch_inferior_registers)
6192 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6193 aarch64_fbsd_nat_target.
6194 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6195 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6196 (the_alpha_bsd_nat_target): New.
6197 (alphabsd_fetch_inferior_registers)
6198 (alphabsd_store_inferior_registers): Refactor as
6199 alpha_bsd_nat_target methods.
6200 (_initialize_alphabsd_nat): Refactor as methods of
6201 alpha_bsd_nat_target.
6202 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6203 (the_amd64_nbsd_nat_target): New.
6204 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6205 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6206 (the_amd64_obsd_nat_target): New.
6207 (_initialize_amd64obsd_nat): Adjust to C++ification.
6208 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6209 (the_arm_fbsd_nat_target): New.
6210 (arm_fbsd_fetch_inferior_registers)
6211 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6212 (_initialize_arm_fbsd_nat): Refactor as methods of
6213 arm_fbsd_nat_target.
6214 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6215 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6216 (the_arm_netbsd_nat_target): New.
6217 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6218 arm_netbsd_nat_target.
6219 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6220 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6221 (the_hppa_nbsd_nat_target): New.
6222 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6223 hppa_nbsd_nat_target methods.
6224 (_initialize_hppanbsd_nat): Adjust to C++ification.
6225 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6226 (the_hppa_obsd_nat_target): New.
6227 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6228 methods of hppa_obsd_nat_target.
6229 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6230 add_target.
6231 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6232 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6233 add_target.
6234 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6235 (_initialize_i386obsd_nat): Use add_target.
6236 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6237 (the_m68k_bsd_nat_target): New.
6238 (m68kbsd_fetch_inferior_registers)
6239 (m68kbsd_store_inferior_registers): Refactor as methods of
6240 m68k_bsd_nat_target.
6241 (_initialize_m68kbsd_nat): Adjust to C++ification.
6242 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6243 (the_mips_fbsd_nat_target): New.
6244 (mips_fbsd_fetch_inferior_registers)
6245 (mips_fbsd_store_inferior_registers): Refactor as methods of
6246 mips_fbsd_nat_target.
6247 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6248 add_target.
6249 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6250 (the_mips_nbsd_nat_target): New.
6251 (mipsnbsd_fetch_inferior_registers)
6252 (mipsnbsd_store_inferior_registers): Refactor as methods of
6253 mips_nbsd_nat_target.
6254 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6255 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6256 (the_mips64_obsd_nat_target): New.
6257 (mips64obsd_fetch_inferior_registers)
6258 (mips64obsd_store_inferior_registers): Refactor as methods of
6259 mips64_obsd_nat_target.
6260 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6261 add_target.
6262 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6263 nbsd_nat_target.
6264 * nbsd-nat.h: Include "inf-ptrace.h".
6265 (nbsd_nat_target): New class.
6266 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6267 (obsd_wait): Refactor as methods of obsd_nat_target.
6268 (obsd_add_target): Delete.
6269 * obsd-nat.h: Include "inf-ptrace.h".
6270 (obsd_nat_target): New class.
6271 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6272 (the_ppc_fbsd_nat_target): New.
6273 (ppcfbsd_fetch_inferior_registers)
6274 (ppcfbsd_store_inferior_registers): Refactor as methods of
6275 ppc_fbsd_nat_target.
6276 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6277 add_target.
6278 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6279 (the_ppc_nbsd_nat_target): New.
6280 (ppcnbsd_fetch_inferior_registers)
6281 (ppcnbsd_store_inferior_registers): Refactor as methods of
6282 ppc_nbsd_nat_target.
6283 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6284 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6285 (the_ppc_obsd_nat_target): New.
6286 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6287 methods of ppc_obsd_nat_target.
6288 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6289 add_target.
6290 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6291 (the_sh_nbsd_nat_target): New.
6292 (shnbsd_fetch_inferior_registers)
6293 (shnbsd_store_inferior_registers): Refactor as methods of
6294 sh_nbsd_nat_target.
6295 (_initialize_shnbsd_nat): Adjust to C++ification.
6296 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6297 (inf_ptrace_xfer_partial): Delete.
6298 (sparc_xfer_partial, sparc_target): Delete.
6299 * sparc-nat.h (sparc_fetch_inferior_registers)
6300 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6301 (sparc_target): Delete function declaration.
6302 (sparc_target): New template class.
6303 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6304 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6305 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6306 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6307 add_target.
6308 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6309 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6310 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6311 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6312 add_target.
6313 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6314 (the_vax_bsd_nat_target): New.
6315 (vaxbsd_fetch_inferior_registers)
6316 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6317 methods.
6318 (_initialize_vaxbsd_nat): Adjust to C++ification.
6319
6320 * bsd-kvm.c (bsd_kvm_target): New class.
6321 (bsd_kvm_ops): Now a bsd_kvm_target.
6322 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6323 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6324 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6325 bsd_kvm_target.
6326 (bsd_kvm_return_one): Delete.
6327 (bsd_kvm_add_target): Adjust to C++ification.
6328
6329 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6330 (nto_procfs_target_procfs): New classes.
6331 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6332 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6333 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6334 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6335 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6336 (procfs_remove_hw_breakpoint, procfs_resume)
6337 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6338 (procfs_kill_inferior, procfs_store_registers)
6339 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6340 as methods of nto_procfs_target.
6341 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6342 (nto_native_ops): Delete.
6343 (procfs_open, procfs_native_open): Delete.
6344 (nto_native_ops): Now an nto_procfs_target_native.
6345 (init_procfs_targets): Adjust to C++ification.
6346 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6347 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6348 Refactor as methods of nto_procfs_target.
6349
6350 * go32-nat.c (go32_nat_target): New class.
6351 (the_go32_nat_target): New.
6352 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6353 (go32_store_registers, go32_xfer_partial, go32_files_info)
6354 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6355 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6356 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6357 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6358 (go32_target): Delete.
6359 (_initialize_go32_nat): Adjust to C++ification.
6360
6361 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6362 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6363 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6364 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6365 gnu_nat_target.
6366 (gnu_target): Delete.
6367 * gnu-nat.h (gnu_target): Delete.
6368 (gnu_nat_target): New class.
6369 * i386-gnu-nat.c (gnu_base_target): New.
6370 (i386_gnu_nat_target): New class.
6371 (the_i386_gnu_nat_target): New.
6372 (_initialize_i386gnu_nat): Adjust to C++ification.
6373
3fffc070
PA
63742018-05-02 Pedro Alves <palves@redhat.com>
6375
6376 * bfd-target.c (target_bfd_xclose): Rename to ...
6377 (target_bfd_close): ... this.
6378 (target_bfd_reopen): Adjust.
6379 * target.c (target_close): Remove references to to_xclose.
6380 * target.h (target_ops::to_xclose): Delete.
6381 (target_ops::to_close): Update comments.
6382
6798487f
PA
63832018-05-02 Pedro Alves <palves@redhat.com>
6384
6385 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6386 "linux-nat.h".
6387 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6388 * inf-ptrace.c (inf_ptrace_register_u_offset)
6389 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6390 (inf_ptrace_store_register, inf_ptrace_store_registers)
6391 (inf_ptrace_trad_target): Move to ...
6392 * linux-nat-trad.c: ... this new file.
6393 * linux-nat-trad.h: New file.
6394 * linux-nat.c (linux_target_install_ops): Make extern.
6395 (linux_trad_target): Delete.
6396 * linux-nat.h (linux_trad_target): Delete declaration.
6397 (linux_target_install_ops): Declare.
6398 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6399 "linux-nat.h".
6400
c1955e17
PA
64012018-05-02 Pedro Alves <palves@redhat.com>
6402
6403 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6404 procfs_target/add_target here.
6405 * procfs.c (procfs_target): Make static.
6406 (_initialize_procfs): Call add_target here.
6407 * procfs.h (struct target_ops): Remove forward declaration.
6408 (procfs_target): Remove declaration.
6409 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6410
b5c8fcb1
PA
64112018-05-02 Pedro Alves <palves@redhat.com>
6412
6413 * procfs.c (procfs_stopped_by_watchpoint)
6414 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6415 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6416 Forward declare.
6417 (procfs_use_watchpoints): Delete, move contents...
6418 (procfs_target): ... here.
6419 * procfs.h (procfs_use_watchpoints): Delete declaration.
6420 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6421 procfs_use_watchpoints.
6422 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6423 procfs_use_watchpoints.
6424
0489430a
TT
64252018-05-02 Tom Tromey <tom@tromey.com>
6426
6427 PR python/20084:
6428 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6429 and var_zuinteger_unlimited.
6430 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6431 and PARAM_ZUINTEGER_UNLIMITED.
6432 (set_parameter_value): Handle var_zuinteger and
6433 var_zuinteger_unlimited.
6434 (add_setshow_generic): Likewise.
6435 (parmpy_init): Likewise.
6436
1632f8ba
DR
64372018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6438
6439 PR rust/23124
6440 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6441 pointer is not null before dereferencing it.
6442
76761936
TT
64432018-04-30 Tom Tromey <tom@tromey.com>
6444
6445 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6446 is_mi_like_p.
6447
2d33446d
TT
64482018-04-30 Tom Tromey <tom@tromey.com>
6449
6450 * breakpoint.c (mention): Remove use of is_mi_like_p.
6451 (print_mention_ranged_breakpoint): Likewise.
6452 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6453 of is_mi_like_p.
6454
f3c6abab
TT
64552018-04-30 Tom Tromey <tom@tromey.com>
6456
6457 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6458
40c03530
TT
64592018-04-30 Tom Tromey <tom@tromey.com>
6460
6461 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6462 (info_spu_event_command): Remove some uses of is_mi_like_p.
6463
2038b7fd
TT
64642018-04-30 Tom Tromey <tom@tromey.com>
6465
6466 * python/py-framefilter.c (py_print_single_arg)
6467 (enumerate_locals, py_print_args, py_print_frame): Remove some
6468 uses of is_mi_like_p.
6469
4904c3c6
TT
64702018-04-30 Tom Tromey <tom@tromey.com>
6471
6472 * ui-out.c: Update.
6473 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6474 * ui-out.h (ui_out::is_mi_like_p): Now const.
6475 (ui_out::do_is_mi_like_p): Now const.
6476 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6477
7c66fffc
TT
64782018-04-30 Tom Tromey <tom@tromey.com>
6479
6480 * varobj.c (varobj_set_visualizer): Use new_reference.
6481 * python/python.c (gdbpy_decode_line): Use new_reference.
6482 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6483 new_reference.
6484
bbfa6f00
TT
64852018-04-30 Tom Tromey <tom@tromey.com>
6486
6487 * varobj.c (install_new_value): Use new_reference.
6488 * value.h (value_incref): Return void. Swap intro comment with
6489 value_decref.
6490 * value.c (set_value_parent): Use new_reference.
6491 (value_incref): Return void. Update intro comment.
6492 (release_value): Use new_reference.
6493 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6494
1831a9f9
TT
64952018-04-30 Tom Tromey <tom@tromey.com>
6496
6497 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6498 * gdb_bfd.h (new_bfd_ref): Remove.
6499 (gdb_bfd_open): Update comment.
6500 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6501 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6502 (gdb_bfd_fdopenr): Use new_reference.
6503 * exec.c (exec_file_attach): Use new_reference.
6504
7c1b5f3d
TT
65052018-04-30 Tom Tromey <tom@tromey.com>
6506
6507 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6508 method.
6509
e11fb955
TT
65102018-04-30 Tom Tromey <tom@tromey.com>
6511
6512 * jit.c (jit_read_code_entry): Use type_align.
6513 * i386-tdep.c (i386_gdbarch_init): Don't call
6514 set_gdbarch_long_long_align_bit.
6515 * gdbarch.sh: Remove long_long_align_bit.
6516 * gdbarch.c, gdbarch.h: Rebuild.
6517 * arc-tdep.c (arc_type_align): New function.
6518 (arc_gdbarch_init): Use arc_type_align. Don't call
6519 set_gdbarch_long_long_align_bit.
6520
2fff16dd
TT
65212018-04-30 Tom Tromey <tom@tromey.com>
6522
6523 * rust-lang.c (rust_type_alignment): Remove.
6524 (rust_composite_type): Use type_align.
6525
6d7bb824
TT
65262018-04-30 Tom Tromey <tom@tromey.com>
6527
6528 * NEWS: Mention Type.align.
6529 * python/py-type.c (typy_get_alignof): New function.
6530 (type_object_getset): Add "alignof".
6531
007e1530
TT
65322018-04-30 Tom Tromey <tom@tromey.com>
6533
6534 PR exp/17095:
6535 * NEWS: Update.
6536 * std-operator.def (UNOP_ALIGNOF): New operator.
6537 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6538 New.
6539 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6540 * c-lang.c (c_op_print_tab): Add alignof.
6541 * c-exp.y (ALIGNOF): New token.
6542 (exp): Add "ALIGNOF" production.
6543 (ident_tokens): Add _Alignof and alignof.
6544
2b4424c3
TT
65452018-04-30 Tom Tromey <tom@tromey.com>
6546
6547 * i386-tdep.c (i386_type_align): New function.
6548 (i386_gdbarch_init): Update.
6549 * gdbarch.sh (type_align): New method.
6550 * gdbarch.c, gdbarch.h: Rebuild.
6551 * arch-utils.h (default_type_align): Declare.
6552 * arch-utils.c (default_type_align): New function.
6553 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6554 (struct type) <align_log2>: New field.
6555 <instance_flags>: Now a bitfield.
6556 (TYPE_RAW_ALIGN): New macro.
6557 (type_align, type_raw_align, set_type_align): Declare.
6558 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6559 functions.
6560 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6561 (get_alignment, maybe_set_alignment): New functions.
6562 (read_structure_type, read_enumeration_type, read_array_type)
6563 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6564 (read_subrange_type, read_base_type): Set type alignment.
6565
d33bc52e
SM
65662018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6567
6568 * dwarf2read.c (read_index_from_section): Use bool.
6569
e28b63a9
FG
65702018-04-29 Fabian Groffen <grobian@gentoo.org>
6571
6572 PR gdb/22950
6573 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6574 with #ifdef.
6575
cd8c76e4
JR
65762018-04-29 John Reiser <jreiser@BitWagon.com>
6577
6578 PR build/22873
6579 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6580 last step, and do it atomically.
6581
476d250e
AO
65822018-04-27 Alexandre Oliva <aoliva@redhat.com>
6583
6584 * compile/compile-c-types.c (convert_int, convert_float):
6585 Update for C FE v1.
6586
6873858b
TT
65872018-04-27 Tom Tromey <tom@tromey.com>
6588
6589 PR rust/22545:
6590 * rust-lang.c (rust_inclusive_range_type_p): New function.
6591 (rust_range): Handle inclusive ranges.
6592 (rust_compute_range): Likewise.
6593 * rust-exp.y (struct rust_op) <inclusive>: New field.
6594 (DOTDOTEQ): New constant.
6595 (range_expr): Add "..=" productions.
6596 (operator_tokens): Add "..=" token.
6597 (ast_range): Add "inclusive" parameter.
6598 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6599 ranges.
6600 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6601 bounds values.
6602 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6603 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6604 Update comments.
6605 * expprint.c (print_subexp_standard): Handle new bounds values.
6606 (dump_subexp_body_standard): Likewise.
6607
632e107b
TT
66082018-04-27 Tom Tromey <tom@tromey.com>
6609
6610 * configure: Rebuild.
6611 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6612 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6613 "OVERRIDE".
6614 (class symbol_needs_eval_context): Likewise.
6615 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6616 (mock_mapped_index::symbol_name_at): Use "override". Remove
6617 "virtual".
6618 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6619 "override".
6620 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6621 * aarch64-tdep.c (instruction_reader::read): Use "override".
6622 (instruction_reader_test::read): Likewise.
6623 * arm-tdep.c (instruction_reader::read): Use "override".
6624 (instruction_reader_thumb::read): Likewise.
6625
b75abf5b
AK
66262018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6627
6628 PR remote/9665
6629 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6630 instead of remote_send.
6631 (remote_send): Remove.
6632
79188d8d
PA
66332018-04-26 Pedro Alves <palves@redhat.com>
6634
6635 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6636 find_function_start_sal instead of find_pc_line.
6637
f50776aa
PA
66382018-04-26 Pedro Alves <palves@redhat.com>
6639
6640 * breakpoint.c (set_breakpoint_location_function): Handle
6641 mst_data_gnu_ifunc.
6642 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6643 * elfread.c (elf_symtab_read): Give data symbols with
6644 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6645 (elf_rel_plt_read): Update comment.
6646 * linespec.c (convert_linespec_to_sals): Handle
6647 mst_data_gnu_ifunc.
6648 (minsym_found): Handle mst_data_gnu_ifunc.
6649 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6650 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6651 * parse.c (find_minsym_type_and_address): Handle
6652 mst_data_gnu_ifunc.
6653 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6654 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6655 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6656 comment.
6657 <mst_data_gnu_ifunc>: New enumerator.
6658
20944a6e
PA
66592018-04-26 Pedro Alves <palves@redhat.com>
6660
6661 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6662 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6663 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6664 Handle it.
6665 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6666 (lookup_minimal_symbol_by_pc): Adjust.
6667 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6668 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6669 * minsyms.h (lookup_msym_prefer): New enum.
6670 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6671 parameter by a lookup_msym_prefer parameter.
6672
1adeb822
PA
66732018-04-26 Pedro Alves <palves@redhat.com>
6674
6675 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6676 ends in "@plt" instead of looking at the symbol's section.
6677
a0aca7b0
PA
66782018-04-26 Pedro Alves <palves@redhat.com>
6679
6680 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6681 all references.
6682 (find_pc_partial_function_gnu_ifunc): Rename to ...
6683 (find_pc_partial_function): ... this, and remove references to
6684 'is_gnu_ifunc_p'.
6685 (find_pc_partial_function): Delete old implementation.
6686 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6687
76af0f26
PA
66882018-04-26 Pedro Alves <palves@redhat.com>
6689
6690 * linespec.c (struct bound_minimal_symbol_search_key): New.
6691 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6692 skip first line if we found a GNU ifunc minimal symbol by name.
6693 (compare_msymbols): Change parameters to work with a destructured
6694 lhs minsym.
6695 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6696 functions.
6697
3467ec66
PA
66982018-04-26 Pedro Alves <palves@redhat.com>
6699
6700 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6701 ifunc targets here. Instead, if we have an ifunc minsym, use its
6702 address/name.
6703 (add_location_to_breakpoint): Store the minsym and the objfile in
6704 the breakpoint location.
6705 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6706 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6707 Record the minsym in the sal.
6708 * symtab.h (symtab_and_line) <msymbol>: New field.
6709
28f4fa4d
PA
67102018-04-26 Pedro Alves <palves@redhat.com>
6711
6712 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6713 unless we actually resolved the ifunc.
6714
ca31ab1d
PA
67152018-04-26 Pedro Alves <palves@redhat.com>
6716
6717 * c-exp.y (variable production): Prefer ifunc minsyms over
6718 regular function symbols.
6719 * symtab.c (find_gnu_ifunc): New function.
6720 * minsyms.h (lookup_msym_prefer): New enum.
6721 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6722 parameter by a lookup_msym_prefer parameter.
6723 * symtab.h (find_gnu_ifunc): New declaration.
6724
8388016d
PA
67252018-04-26 Pedro Alves <palves@redhat.com>
6726
6727 * blockframe.c (find_gnu_ifunc_target_type): New function.
6728 (find_function_type): New.
6729 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6730 return a value with a memory address.
6731 (eval_call): For calls to GNU ifunc functions, try to find the
6732 type of the target function from the type that the resolver
6733 returns.
6734 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6735 symbols.
6736 * infcall.c (find_function_return_type): Delete.
6737 (find_function_addr): Add 'function_type' parameter. For calls to
6738 GNU ifunc functions, try to find the type of the target function
6739 from the type that the resolver returns, and return it via
6740 FUNCTION_TYPE.
6741 (call_function_by_hand_dummy): Adjust to use the function type
6742 returned by find_function_addr.
6743 (find_function_addr): Add 'function_type' parameter and move
6744 description here.
6745 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6746 declarations.
6747
a376e11d
PA
67482018-04-26 Pedro Alves <palves@redhat.com>
6749
6750 * c-exp.y (variable production): Skip finding an alias for ifunc
6751 symbols.
6752
02e169e2
PA
67532018-04-26 Pedro Alves <palves@redhat.com>
6754
6755 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6756
249b5733
PA
67572018-04-25 Pedro Alves <palves@redhat.com>
6758
6759 * infcmd.c (kill_command): Print the pid as string, not the whole
6760 thread's ptid. Add comment. s/has been killed/killed/ in output
6761 message.
6762 * remote.c (remote_detach_1): Print the pid as string, not the
6763 whole thread's ptid.
6764
f67c0c91
SDJ
67652018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6766 Sergio Durigan Junior <sergiodj@redhat.com>
6767 Pedro Alves <palves@redhat.com>
6768
6769 * infcmd.c (kill_command): Print message when inferior has
6770 been killed.
6771 * inferior.c (print_inferior_events): Remove 'static'. Set as
6772 '1'.
6773 (add_inferior): Improve message printed when
6774 'print_inferior_events' is on.
6775 (exit_inferior): Remove message printed when
6776 'print_inferior_events' is on.
6777 (detach_inferior): Improve message printed when
6778 'print_inferior_events' is on.
6779 (initialize_inferiors): Use 'add_inferior_silent' to set
6780 'current_inferior_'.
6781 * inferior.h (print_inferior_events): Declare here as
6782 'extern'.
6783 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6784 '[Detaching...]' messages when 'print_inferior_events' is on.
6785 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6786 as prefix/suffix for messages. Remove periods. Fix erroneous
6787 'Detaching after fork from child...', replace it by '... from
6788 parent...'.
6789 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6790 prefix/suffix when printing 'Detaching...' messages. Print
6791 them when 'print_inferior_events' is on.
6792 * remote.c (remote_detach_1): Print message when detaching
6793 from inferior and '!is_fork_parent'.
6794
e427af18
TT
67952018-04-24 Tom Tromey <tom@tromey.com>
6796
6797 * cli-out.h: Reindent.
6798
05b1d8d6
TT
67992018-04-24 Tom Tromey <tom@tromey.com>
6800
6801 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6802 (cli_ui_out::do_field_string): Use fputs_filtered.
6803 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6804
a95c7dab
TT
68052018-04-23 Tom Tromey <tom@tromey.com>
6806
6807 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6808 gdb::unique_xmalloc_ptr.
6809
458412c3
TT
68102018-04-23 Tom Tromey <tom@tromey.com>
6811
6812 * configure: Rebuild.
6813
db86b02b
RS
68142018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6815
6816 PR gdb/23095
6817 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6818 prepare_for_testing. Set normal_bp to r_debug_state if target
6819 is bsd.
6820
00aecdcf
PA
68212018-04-21 Pedro Alves <palves@redhat.com>
6822 Rajendra SY <rajendra.sy@gmail.com>
6823
6824 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6825 * remote.c (extended_remote_attach): In all-stop mode, mark the
6826 thread as executing.
6827
224608c3
PW
68282018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6829
6830 * thread.c (thread_apply_all_command): Fix comment.
6831 (thread_command): Fix comment.
6832
3b74854b
AH
68332018-04-10 Alan Hayward <alan.hayward@arm.com>
6834
6835 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6836 parameter.
6837 * features/aarch64-core.c (create_feature_aarch64_core):
6838 Regenerate.
6839 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6840 Likewise.
6841 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6842 Likewise.
6843 * features/i386/32bit-avx512.c
6844 (create_feature_i386_32bit_avx512): Likewise.
6845 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6846 Likewise.
6847 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6848 Likewise.
6849 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6850 Likewise.
6851 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6852 Likewise.
6853 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6854 Likewise.
6855 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6856 Likewise.
6857 * features/i386/64bit-avx512.c
6858 (create_feature_i386_64bit_avx512): Likewise.
6859 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6860 Likewise.
6861 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6862 Likewise.
6863 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6864 Likewise.
6865 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6866 Likewise.
6867 * features/i386/64bit-segments.c
6868 (create_feature_i386_64bit_segments): Likewise.
6869 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6870 Likewise.
6871 * features/i386/x32-core.c
6872 (create_feature_i386_x32_core): Likewise.
6873 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6874 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6875 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6876 * target-descriptions.c: In generated code, don't pass xml
6877 filename.
6878
e98577a9
AH
68792018-04-18 Alan Hayward <alan.hayward@arm.com>
6880
6881 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6882 (print_xml_feature::visit_post): Likewise.
6883 (print_xml_feature::visit): Likewise.
6884 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6885 (print_xml_feature): Add new class.
6886 * regformats/regdat.sh: Null xmltarget on feature targets.
6887 * target-descriptions.c (struct target_desc): Add xmltarget.
6888 (maintenance_check_tdesc_xml_convert): Add unittest function.
6889 (tdesc_get_features_xml): Add function to get xml.
6890 (maintenance_check_xml_descriptions): Test xml generation.
6891 * xml-tdesc.c (string_read_description_xml): Add function.
6892 * xml-tdesc.h (string_read_description_xml): Add declaration.
6893
ad7fc756
AH
68942018-04-18 Alan Hayward <alan.hayward@arm.com>
6895
6896 * features/Makefile: Add feature marker to targets with new style
6897 target descriptions.
6898 * regformats/aarch64.dat: Regenerate.
6899 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6900 * regformats/i386/amd64-avx-linux.dat: Likewise.
6901 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6902 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6903 * regformats/i386/amd64-linux.dat: Likewise.
6904 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6905 * regformats/i386/amd64.dat: Likewise.
6906 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6907 * regformats/i386/i386-avx-linux.dat: Likewise.
6908 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6909 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6910 * regformats/i386/i386-linux.dat: Likewise.
6911 * regformats/i386/i386-mmx-linux.dat: Likewise.
6912 * regformats/i386/i386-mpx-linux.dat: Likewise.
6913 * regformats/i386/i386.dat: Likewise.
6914 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6915 * regformats/i386/x32-avx-linux.dat: Likewise.
6916 * regformats/i386/x32-linux.dat: Likewise.
6917 * regformats/tic6x-c62x-linux.dat: Likewise.
6918 * regformats/tic6x-c64x-linux.dat: Likewise.
6919 * regformats/tic6x-c64xp-linux.dat: Likewise.
6920 * regformats/regdat.sh: Parse feature marker.
6921
d278f585
AH
69222018-04-18 Alan Hayward <alan.hayward@arm.com>
6923
6924 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6925 (tdesc_osabi_name): Likewise.
6926 * target-descriptions.c (tdesc_architecture_name): Add new
6927 function.
6928 (tdesc_osabi_name): Likewise.
6929
eee8a18d
AH
69302018-04-18 Alan Hayward <alan.hayward@arm.com>
6931
6932 * common/tdesc.c (tdesc_predefined_type): Move to here.
6933 (tdesc_named_type): Likewise.
6934 (tdesc_create_vector): Likewise.
6935 (tdesc_create_struct): Likewise.
6936 (tdesc_set_struct_size): Likewise.
6937 (tdesc_create_union): Likewise.
6938 (tdesc_create_flags): Likewise.
6939 (tdesc_create_enum): Likewise.
6940 (tdesc_add_field): Likewise.
6941 (tdesc_add_typed_bitfield): Likewise.
6942 (tdesc_add_bitfield): Likewise.
6943 (tdesc_add_flag): Likewise.
6944 (tdesc_add_enum_value): Likewise.
6945 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6946 (struct tdesc_type_vector): Likewise.
6947 (struct tdesc_type_field): Likewise.
6948 (struct tdesc_type_with_fields): Likewise.
6949 (tdesc_create_enum): Add declaration.
6950 (tdesc_add_typed_bitfield): Likewise.
6951 (tdesc_add_enum_value): Likewise.
6952 * target-descriptions.c (tdesc_type_field): Move from here.
6953 (tdesc_type_builtin): Likewise.
6954 (tdesc_type_vector): Likewise.
6955 (tdesc_type_with_fields): Likewise.
6956 (tdesc_predefined_types): Likewise.
6957 (tdesc_named_type): Likewise.
6958 (tdesc_create_vector): Likewise.
6959 (tdesc_create_struct): Likewise.
6960 (tdesc_set_struct_size): Likewise.
6961 (tdesc_create_union): Likewise.
6962 (tdesc_create_flags): Likewise.
6963 (tdesc_create_enum): Likewise.
6964 (tdesc_add_field): Likewise.
6965 (tdesc_add_typed_bitfield): Likewise.
6966 (tdesc_add_bitfield): Likewise.
6967 (tdesc_add_flag): Likewise.
6968 (tdesc_add_enum_value): Likewise.
6969 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6970 (tdesc_add_typed_bitfield): Likewise.
6971 (tdesc_add_enum_value): Likewise.
6972
82ec9bc7
AH
69732018-04-18 Alan Hayward <alan.hayward@arm.com>
6974
6975 * common/tdesc.c (tdesc_feature::accept): Move to here.
6976 (tdesc_feature::operator==): Likewise.
6977 (tdesc_create_reg): Likewise.
6978 * common/tdesc.h (tdesc_type_kind): Likewise.
6979 (struct tdesc_type): Likewise.
6980 (struct tdesc_feature): Likewise.
6981 * regformats/regdat.sh: Create a feature.
6982 * target-descriptions.c (tdesc_type_kind): Move from here.
6983 (tdesc_type): Likewise.
6984 (tdesc_type_up): Likewise.
6985 (tdesc_feature): Likewise.
6986 (tdesc_create_reg): Likewise.
6987
ea3e7d71
AH
69882018-04-18 Alan Hayward <alan.hayward@arm.com>
6989
6990 * Makefile.in: Add arch/tdesc.c
6991 * common/tdesc.c: New file.
6992 * common/tdesc.h (tdesc_element_visitor): Move to here.
6993 (tdesc_element): Likewise.
6994 (tdesc_reg): Likewise.
6995 (tdesc_reg_up): Likewise.
6996 * regformats/regdef.h (reg): Add offset to constructors.
6997 * target-descriptions.c (tdesc_element_visitor): Move from here.
6998 (tdesc_element): Likewise.
6999 (tdesc_reg): Likewise.
7000 (tdesc_reg_up): Likewise.
7001
bedda9ac
TT
70022018-04-17 Tom Tromey <tom@tromey.com>
7003
7004 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7005 discriminant field.
7006
a037790e
TT
70072018-04-17 Tom Tromey <tom@tromey.com>
7008
7009 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7010
c7dcbf88
AA
70112018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7012
7013 * symtab.c (print_symbol_info): Skip printing filename and line
7014 number when `last' is NULL.
7015 (symtab_symbol_info): Use empty string instead of NULL for first
7016 invocation of print_symbol_info.
7017 (rbreak_command): Pass NULL to `last' parameter of
7018 print_symbol_info.
7019
07d28c77
SM
70202018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7021
7022 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7023 instead of nullptr.
7024
8a3de5e1
PA
70252018-04-16 Pedro Alves <palves@redhat.com>
7026
7027 * MAINTAINERS (sh): Remove.
7028 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7029 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7030 (ALLDEPFILES): Remove sh64-tdep.c.
7031 * NEWS: Mentions that support for SH-5/SH64 is removed.
7032 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7033 (sh*-*-openbsd*): Ditto.
7034 (sh64-*-elf*): Remove.
7035 (sh*): Remove.
7036 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7037 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7038 * sh-tdep.c: No longer include "sh64-tdep.h".
7039 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7040 * sh64-tdep.c, sh64-tdep.h: Remove files.
7041
a2a79012
PA
70422018-04-16 Pedro Alves <palves@redhat.com>
7043
7044 * MAINTAINERS: Remove m88k.
7045 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7046 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7047 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7048 * NEWS: Mention that support for m88k was removed.
7049 * configure.host (m88*-*-*): Remove support.
7050 * configure.nat (m88k-*-*): Remove support.
7051 * configure.tgt (m88*-*-openbsd*): Remove.
7052 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7053
eda4efb1
SM
70542018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7055
7056 * configure.tgt (x86_tobjs): New variable.
7057 (amd64_tobjs, i386_tobjs): Use it.
7058
b744723f
AA
70592018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7060
7061 * symtab.c (print_symbol_info): Precede the symbol definition by
7062 the line number when available.
7063 * NEWS: Advertise this enhancement.
7064
4a4495d6
MM
70652018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7066
7067 * NEWS (New options): announce set/show record btrace cpu.
7068 * btrace.c: Include record-btrace.h.
7069 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7070 the vendor is unknown.
7071 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7072 Maybe overwrite the btrace configuration's cpu.
7073 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7074 (btrace_fetch): Add cpu parameter. Update callers.
7075 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7076 Maybe overwrite the btrace configuration's cpu. Skip enabling
7077 errata workarounds if the vendor is unknown.
7078 * python/py-record-btrace.c: Include record-btrace.h.
7079 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7080 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7081 * record-btrace.c (record_btrace_cpu_state_kind): New.
7082 (record_btrace_cpu): New.
7083 (set_record_btrace_cpu_cmdlist): New.
7084 (record_btrace_get_cpu): New.
7085 (require_btrace_thread, record_btrace_info)
7086 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7087 (cmd_set_record_btrace_cpu_none): New.
7088 (cmd_set_record_btrace_cpu_auto): New.
7089 (cmd_set_record_btrace_cpu): New.
7090 (cmd_show_record_btrace_cpu): New.
7091 (_initialize_record_btrace): Initialize set/show record btrace cpu
7092 commands.
7093 * record-btrace.h (record_btrace_get_cpu): New.
7094
69f90c75
MM
70952018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7096
7097 * record.c (set_record_command): Fix typo in message.
7098
b85310e1
MM
70992018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7100
7101 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7102
1d509aa6
MM
71032018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7104
7105 * infrun.c (process_event_stop_test): Call
7106 gdbarch_in_indirect_branch_thunk.
7107 * gdbarch.sh (in_indirect_branch_thunk): New.
7108 * gdbarch.c: Regenerated.
7109 * gdbarch.h: Regenerated.
7110 * x86-tdep.h: New.
7111 * x86-tdep.c: New.
7112 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7113 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7114 (ALLDEPFILES): Add x86-tdep.c.
7115 * arch-utils.h (default_in_indirect_branch_thunk): New.
7116 * arch-utils.c (default_in_indirect_branch_thunk): New.
7117 * i386-tdep: Include x86-tdep.h.
7118 (i386_in_indirect_branch_thunk): New.
7119 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7120 function.
7121 * amd64-tdep: Include x86-tdep.h.
7122 (amd64_in_indirect_branch_thunk): New.
7123 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7124
b4be9bfd
JK
71252018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7126
7127 PR gdb/23053
7128 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7129 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7130 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7131 regression.
7132
53d7df28
TT
71332018-04-12 Tom Tromey <tom@tromey.com>
7134
7135 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7136 (rust_evaluate_subexp): Likewise.
7137
70b33f19
PA
71382018-04-12 Pedro Alves <palves@redhat.com>
7139
7140 * procfs.c (procfs_detach): Make forward declaration's prototype
7141 match definition's protototype.
7142 (proc_get_LDT_entry): Remove stale do_cleanups call.
7143
436411b1
PA
71442018-04-12 Pedro Alves <palves@redhat.com>
7145
7146 * target.h (target_ops::to_has_exited): Delete.
7147 (target_has_exited): Delete.
7148 * target-delegates.c: Regenerate.
7149
20db9c52
PA
71502018-04-11 Pedro Alves <palves@redhat.com>
7151
7152 * target.c (fileio_fh_t::t): Add comment.
7153 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7154 (target_fileio_close): Handle a NULL target.
7155 (invalidate_fileio_fh): New.
7156 (target_close): Call it.
7157 * remote.c (remote_hostio_send_command): No longer check whether
7158 remote_desc is open.
7159
5ff79300
PA
71602018-04-11 Pedro Alves <palves@redhat.com>
7161
7162 * target.c (fileio_fh_t): Make it a named struct instead of a
7163 typedef.
7164 (fileio_fh_t::is_closed): New method.
7165 (DEF_VEC_O (fileio_fh_t)): Remove.
7166 (fileio_fhandles): Now a std::vector.
7167 (is_closed_fileio_fh): Delete.
7168 (acquire_fileio_fd): Adjust. Rename parameters.
7169 (release_fileio_fd): Adjust.
7170 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7171 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7172 (target_fileio_close): Adjust.
7173
6e22e10d
SM
71742018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7175
7176 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7177 index.
7178
731f534f
PA
71792018-04-10 Pedro Alves <palves@redhat.com>
7180
7181 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7182 (scoped_finish_thread_state): New class.
7183 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7184 cleanup.
7185 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7186 (fetch_inferior_event, normal_stop): Likewise.
7187 * thread.c (finish_thread_state_cleanup): Delete.
7188
d5f4488f
SM
71892018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7190 Pedro Alves <palves@redhat.com>
7191
7192 * value.c: Include "selftest.h" and "common/array-view.h".
7193 (struct range) <operator ==>: New.
7194 (test_ranges_contain): New.
7195 (check_ranges_vector): New.
7196 (test_insert_into_bit_range_vector): New.
7197 (_initialize_values): Register selftests.
7198 * common/array-view.h (operator==, operator!=): New.
7199
b24531ed
SM
72002018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7201
7202 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7203 an iterator.
7204 * inline-frame.c: Include <algorithm>.
7205 (struct inline_state): Add constructor.
7206 (inline_state_s): Remove.
7207 (DEF_VEC_O(inline_state_s)): Remove.
7208 (inline_states): Change type to std::vector.
7209 (find_inline_frame_state): Adjust to std::vector.
7210 (allocate_inline_frame_state): Remove.
7211 (clear_inline_frame_state): Adjust to std::vector.
7212 (skip_inline_frames): Adjust to std::vector.
7213
c252925c
SM
72142018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7215
7216 * tracepoint.h (struct trace_state_variable): Add constructor.
7217 <name>: Change type to std::string.
7218 * tracepoint.c (tsv_s): Remove.
7219 (DEF_VEC_O(tsv_s)): Remove.
7220 (tvariables): Change to std::vector.
7221 (create_trace_state_variable): Adjust to std::vector.
7222 (find_trace_state_variable): Likewise.
7223 (find_trace_state_variable_by_number): Likewise.
7224 (delete_trace_state_variable): Likewise.
7225 (trace_variable_command): Adjust to std::string.
7226 (delete_trace_variable_command): Likewise.
7227 (tvariables_info_1): Adjust to std::vector.
7228 (save_trace_state_variables): Likewise.
7229 (start_tracing): Likewise.
7230 (merge_uploaded_trace_state_variables): Adjust to std::vector
7231 and std::string.
7232 * target.h (struct target_ops)
7233 <to_download_trace_state_variable>: Pass reference to
7234 trace_state_variable.
7235 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7236 * target-delegates.c: Re-generate.
7237 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7238 (mi_tsv_deleted): Likewise.
7239 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7240 * remote.c (remote_download_trace_state_variable): Change
7241 pointer to reference and adjust.
7242 * make-target-delegates (parse_argtypes): Handle references.
7243 (write_function_header): Likewise.
7244 (munge_type): Likewise.
7245
c9638d26
SM
72462018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7247
7248 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7249 string_view-selftests.c.
7250 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7251 testsuite.
7252 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7253 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7254 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7255 * unittests/basic_string_view/element_access/char/1.cc:
7256 Likewise.
7257 * unittests/basic_string_view/element_access/char/empty.cc:
7258 Likewise.
7259 * unittests/basic_string_view/element_access/char/front_back.cc:
7260 Likewise.
7261 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7262 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7263 Likewise.
7264 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7265 Likewise.
7266 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7267 Likewise.
7268 * unittests/basic_string_view/operations/compare/char/1.cc:
7269 Likewise.
7270 * unittests/basic_string_view/operations/compare/char/13650.cc:
7271 Likewise.
7272 * unittests/basic_string_view/operations/copy/char/1.cc:
7273 Likewise.
7274 * unittests/basic_string_view/operations/data/char/1.cc:
7275 Likewise.
7276 * unittests/basic_string_view/operations/find/char/1.cc:
7277 Likewise.
7278 * unittests/basic_string_view/operations/find/char/2.cc:
7279 Likewise.
7280 * unittests/basic_string_view/operations/find/char/3.cc:
7281 Likewise.
7282 * unittests/basic_string_view/operations/find/char/4.cc:
7283 Likewise.
7284 * unittests/basic_string_view/operations/rfind/char/1.cc:
7285 Likewise.
7286 * unittests/basic_string_view/operations/rfind/char/2.cc:
7287 Likewise.
7288 * unittests/basic_string_view/operations/rfind/char/3.cc:
7289 Likewise.
7290 * unittests/basic_string_view/operations/substr/char/1.cc:
7291 Likewise.
7292 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7293 * unittests/string_view-selftests.c: New file.
7294
fdc11678
SM
72952018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7296
7297 * unittests/basic_string_view/capacity/1.cc: New file.
7298 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7299 * unittests/basic_string_view/cons/char/1.cc: New file.
7300 * unittests/basic_string_view/cons/char/2.cc: New file.
7301 * unittests/basic_string_view/cons/char/3.cc: New file.
7302 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7303 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7304 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7305 * unittests/basic_string_view/element_access/char/1.cc: New file.
7306 * unittests/basic_string_view/element_access/char/2.cc: New file.
7307 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7308 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7309 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7310 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7311 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7312 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7313 * unittests/basic_string_view/include.cc: New file.
7314 * unittests/basic_string_view/inserters/char/1.cc: New file.
7315 * unittests/basic_string_view/inserters/char/2.cc: New file.
7316 * unittests/basic_string_view/inserters/char/3.cc: New file.
7317 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7318 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7319 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7320 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7321 * unittests/basic_string_view/literals/types.cc: New file.
7322 * unittests/basic_string_view/literals/values.cc: New file.
7323 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7324 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7325 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7326 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7327 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7328 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7329 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7330 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7331 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7332 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7333 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7334 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7335 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7336 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7337 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7338 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7339 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7340 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7341 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7342 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7343 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7344 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7345 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7346 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7347 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7348 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7349 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7350 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7351 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7352 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7353 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7354 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7355 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7356 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7357 * unittests/basic_string_view/operators/char/2.cc: New file.
7358 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7359 * unittests/basic_string_view/range_access/char/1.cc: New file.
7360 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7361 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7362 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7363 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7364 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7365 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7366 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7367 * unittests/basic_string_view/typedefs.cc: New file.
7368 * unittests/basic_string_view/types/1.cc: New file.
7369
8345c4a2
SM
73702018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7371
7372 * common/gdb_string_view.h: Remove libstdc++ implementation
7373 details, adjust to gdb reality.
7374 * common/gdb_string_view.tcc: Likewise.
7375 * cli/cli-script.c (struct string_view): Remove.
7376 (user_args) <m_args>: Change element type to gdb::string_view.
7377 (user_args::insert_args): Adjust.
7378
7adcdf08
SM
73792018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7380
7381 * common/gdb_string_view.h: New file.
7382 * common/gdb_string_view.tcc: New file.
7383
41260ac2
SM
73842018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7385
7386 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7387 * configure: Re-generate.
7388
0bee6dd4
PA
73892018-04-09 Pedro Alves <palves@redhat.com>
7390
7391 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7392 (set_target_gdbarch): Call
7393 gdb::observers::architecture_changed.notify instead of
7394 observer_notify_architecture_changed.
7395
6f14adc5
SM
73962018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7397
7398 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7399 (do_restore_current_traceframe_cleanup): Remove.
7400 (restore_current_traceframe_cleanup_dtor): Remove.
7401 (make_cleanup_restore_current_traceframe): Remove.
7402 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7403 New.
7404 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7405 * infrun.c (fetch_inferior_event): Use
7406 scoped_restore_current_traceframe.
7407
b2bdb8cf
SM
74082018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7409
7410 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7411 Remove.
7412 <n_allocated_type_units>: Remove.
7413 <all_type_units>: Change to std::vector.
7414 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7415 to std::vector change.
7416 (dwarf2_per_objfile::get_cutu): Likewise.
7417 (dwarf2_per_objfile::get_tu): Likewise.
7418 (create_signatured_type_table_from_index): Likewise.
7419 (create_signatured_type_table_from_debug_names): Likewise.
7420 (dw2_symtab_iter_next): Likewise.
7421 (dw2_print_stats): Likewise.
7422 (dw2_expand_all_symtabs): Likewise.
7423 (dw2_expand_marked_cus): Likewise.
7424 (dw2_debug_names_iterator::next): Likewise.
7425 (dwarf2_initialize_objfile): Likewise.
7426 (add_signatured_type_cu_to_table): Likewise.
7427 (create_all_type_units): Likewise.
7428 (add_type_unit): Likewise.
7429 (struct tu_abbrev_offset): Add constructor.
7430 (build_type_psymtabs_1): Adjust to std::vector change.
7431 (print_tu_stats): Likewise.
7432 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7433 (write_debug_names): Likewise.
7434
b76e467d
SM
74352018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7436
7437 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7438 Make an std::vector.
7439 <n_comp_units>: Remove.
7440 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7441 to std::vector change.
7442 (dwarf2_per_objfile::get_cutu): Likewise.
7443 (dwarf2_per_objfile::get_cu): Likewise.
7444 (create_cus_from_index): Likewise.
7445 (create_addrmap_from_index): Likewise.
7446 (create_addrmap_from_aranges): Likewise.
7447 (dwarf2_read_index): Likewise.
7448 (dw2_find_last_source_symtab): Likewise.
7449 (dw2_map_symtabs_matching_filename): Likewise.
7450 (dw2_symtab_iter_next): Likewise.
7451 (dw2_print_stats): Likewise.
7452 (dw2_expand_all_symtabs): Likewise.
7453 (dw2_expand_symtabs_with_fullname): Likewise.
7454 (dw2_expand_marked_cus): Likewise.
7455 (dw2_map_symbol_filenames): Likewise.
7456 (create_cus_from_debug_names): Likewise.
7457 (dwarf2_read_debug_names): Likewise.
7458 (dw2_debug_names_iterator::next): Likewise.
7459 (dwarf2_initialize_objfile): Likewise.
7460 (set_partial_user): Likewise.
7461 (dwarf2_build_psymtabs_hard): Likewise.
7462 (read_comp_units_from_section): Remove arguments, adjust to
7463 std::vector change.
7464 (create_all_comp_units): Adjust to std::vector and
7465 read_comp_units_from_section changes.
7466 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7467 change.
7468 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7469 (psyms_seen_size): Likewise.
7470 (write_gdbindex): Likewise.
7471 (write_debug_names): Likewise.
7472
12359b5e
SM
74732018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7474
7475 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7476 with dwarf2_per_objfile.
7477 (create_cus_from_index): Likewise.
7478 (create_signatured_type_table_from_index): Likewise.
7479 (dwarf2_read_index): Likewise.
7480 (dwarf2_initialize_objfile): Likewise.
7481 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7482 per_cu rather than get_dwarf2_per_objfile.
7483
ff4c9fec
SM
74842018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7485
7486 * dwarf2read.h (struct signatured_type): Forward declare.
7487 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7488 New methods.
7489 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7490 (dw2_get_cutu): ...this.
7491 (dwarf2_per_objfile::get_cu): Rename from...
7492 (dw2_get_cu): ...this.
7493 (dwarf2_per_objfile::get_tu): New.
7494 (create_addrmap_from_index): Adjust.
7495 (create_addrmap_from_aranges): Adjust.
7496 (dw2_find_last_source_symtab): Adjust.
7497 (dw2_map_symtabs_matching_filename): Adjust.
7498 (dw2_symtab_iter_next): Adjust.
7499 (dw2_print_stats): Adjust.
7500 (dw2_expand_all_symtabs): Adjust.
7501 (dw2_expand_symtabs_with_fullname): Adjust.
7502 (dw2_expand_marked_cus): Adjust.
7503 (dw_expand_symtabs_matching_file_matcher): Adjust.
7504 (dw2_map_symbol_filenames): Adjust.
7505 (dw2_debug_names_iterator::next): Adjust.
7506 (dwarf2_initialize_objfile): Adjust.
7507 (set_partial_user): Adjust.
7508 (dwarf2_build_psymtabs_hard): Adjust.
7509
5ca3fcb6
SM
75102018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7511
7512 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7513 Remove unused variables.
7514 (dw2_map_symtabs_matching_filename): Likewise.
7515 (dwarf2_record_block_ranges): Likewise.
7516 (dwarf2_read_addr_index): Likewise.
7517 (follow_die_offset): Likewise.
7518
b2e586e8
SM
75192018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7520
7521 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7522 to symbol_file_add_main.
7523
7c4e78cf
SM
75242018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7525
7526 PR mi/22299
7527 * mi/mi-console.c (do_fputc_async_safe): New.
7528 (mi_console_file::write_async_safe): New.
7529 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7530 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7531 New.
7532 * ui-file.c (ui_file::putstrn): Adjust call to
7533 fputstrn_unfiltered.
7534 * utils.c (printchar): Replace do_fputs and do_fprintf
7535 parameters by do_fputc.
7536 (fputstr_filtered): Adjust call to printchar.
7537 (fputstr_unfiltered): Likewise.
7538 (fputstrn_filtered): Likewise.
7539 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7540 printchar.
7541 * utils.h (do_fputc_ftype): New typedef.
7542 (fputstrn_unfiltered): Add do_fputc parameter.
7543
5dc026d3
SM
75442018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7545
7546 * regformats/i386/i386-avx.dat: Remove.
7547
c912f608
SM
75482018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7549
7550 PR gdb/22979
7551 * amd64-tdep.c (amd64_none_init_abi): New function.
7552 (amd64_x32_none_init_abi): New function.
7553 (_initialize_amd64_tdep): Register handlers for x86-64 and
7554 x64_32 with GDB_OSABI_NONE.
7555 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7556 GDB_OSABI_NONE osabi.
7557
26540402
SM
75582018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7559
7560 PR gdb/22980
7561 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7562 GDB_OSABI_NONE.
7563 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7564 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7565
9018be22
SM
75662018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7567
7568 * common/byte-vector.h (char_vector): New type.
7569 * target.h (target_read_alloc): Return
7570 gdb::optional<byte_vector>.
7571 (target_read_stralloc): Return gdb::optional<char_vector>.
7572 (target_get_osdata): Return gdb::optional<char_vector>.
7573 * target.c (target_read_alloc_1): Templatize. Replacement
7574 manual memory management with vector.
7575 (target_read_alloc): Change return type, adjust.
7576 (target_read_stralloc): Change return type, adjust.
7577 (target_get_osdata): Change return type, adjust.
7578 * auxv.c (struct auxv_info) <length>: Remove.
7579 <data>: Change type to gdb::optional<byte_vector>.
7580 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7581 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7582 (target_auxv_search): Adjust.
7583 (fprint_target_auxv): Adjust.
7584 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7585 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7586 (linux_make_corefile_notes): Adjust.
7587 * osdata.c (get_osdata): Adjust.
7588 * remote.c (remote_get_threads_with_qxfer): Adjust.
7589 (remote_memory_map): Adjust.
7590 (remote_traceframe_info): Adjust.
7591 (btrace_read_config): Adjust.
7592 (remote_read_btrace): Adjust.
7593 (remote_pid_to_exec_file): Adjust.
7594 * solib-aix.c (solib_aix_get_library_list): Adjust.
7595 * solib-dsbt.c (decode_loadmap): Don't free buf.
7596 (dsbt_get_initial_loadmaps): Adjust.
7597 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7598 * solib-target.c (solib_target_current_sos): Adjust.
7599 * tracepoint.c (sdata_make_value): Adjust.
7600 * xml-support.c (xinclude_start_include): Adjust.
7601 (xml_fetch_content_from_file): Adjust.
7602 * xml-support.h (xml_fetch_another): Change return type.
7603 (xml_fetch_content_from_file): Change return type.
7604 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7605 * xml-tdesc.c (file_read_description_xml): Adjust.
7606 (fetch_available_features_from_target): Change return type.
7607 (target_fetch_description_xml): Adjust.
7608 (target_read_description_xml): Adjust.
7609
14c88955
TT
76102018-04-06 Tom Tromey <tom@tromey.com>
7611
7612 * value.c (~value): Update.
7613 (struct value) <contents>: Now unique_xmalloc_ptr.
7614 (value_contents_bits_eq, allocate_value_contents)
7615 (value_contents_raw, value_contents_all_raw)
7616 (value_contents_for_printing, value_contents_for_printing_const)
7617 (set_value_enclosing_type): Update.
7618
0c7e6dd8
TT
76192018-04-06 Tom Tromey <tom@tromey.com>
7620
7621 * value.c (range_s): Remove typedef, VEC.
7622 (struct range): Add operator<.
7623 (range_lessthan): Remove.
7624 (ranges_contain): Change type.
7625 (~value): Update.
7626 (struct value) <unavailable, optimized_out>: Now std::vector.
7627 (value_entirely_available)
7628 (value_entirely_covered_by_range_vector)
7629 (value_entirely_unavailable, value_entirely_optimized_out):
7630 Update.
7631 (insert_into_bit_range_vector): Change argument type.
7632 (find_first_range_overlap): Likewise.
7633 (struct ranges_and_idx, value_contents_bits_eq)
7634 (require_not_optimized_out, require_available): Update.
7635 (ranges_copy_adjusted): Change argument types.
7636 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7637
2c8331b9
TT
76382018-04-06 Tom Tromey <tom@tromey.com>
7639
7640 * value.c (~value): Update.
7641 (struct value) <parent>: Now a value_ref_ptr.
7642 (value_parent, set_value_parent, value_address, value_copy):
7643 Update.
7644
466ce3ae
TT
76452018-04-06 Tom Tromey <tom@tromey.com>
7646
7647 * value.c (struct value): Add constructor, destructor, and member
7648 initializers.
7649 (allocate_value_lazy, value_decref): Update.
7650
062d818d
TT
76512018-04-06 Tom Tromey <tom@tromey.com>
7652
7653 * value.c (struct value) <released, next>: Remove.
7654 (all_values): Now a std::vector.
7655 (allocate_value_lazy): Update.
7656 (value_next): Remove.
7657 (value_mark, value_free_to_mark, release_value)
7658 (value_release_to_mark): Update.
7659
a6535de1
TT
76602018-04-06 Tom Tromey <tom@tromey.com>
7661
7662 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7663 (free_value_chain): Remove.
7664 * value.c (free_value_chain): Remove.
7665 (value_release_to_mark): Return a std::vector.
7666 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7667 std::vector.
7668 (check_condition): Update.
7669 * eval.c (fetch_subexp_value): Change "val_chain" to a
7670 std::vector.
7671 * breakpoint.c (update_watchpoint): Update.
7672 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7673
b5621201
TT
76742018-04-06 Tom Tromey <tom@tromey.com>
7675
7676 * value.h (free_all_values): Remove.
7677 * value.c (free_all_values): Remove.
7678
4d0266a0
TT
76792018-04-06 Tom Tromey <tom@tromey.com>
7680
7681 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7682 (value_history_chain, value_history_count): Remove.
7683 (value_history): New global.
7684 (record_latest_value, access_value_history, show_values)
7685 (preserve_values): Update.
7686
b4d61099
TT
76872018-04-06 Tom Tromey <tom@tromey.com>
7688
7689 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7690 * varobj.c (varobj_set_display_format, varobj_set_value)
7691 (install_default_visualizer, construct_visualizer)
7692 (install_new_value, ~varobj, varobj_get_value_type)
7693 (my_value_of_variable, varobj_editable_p): Update.
7694 * c-varobj.c (c_describe_child, c_value_of_variable)
7695 (cplus_number_of_children, cplus_describe_child): Update.
7696 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7697 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7698 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7699
9b558729
TT
77002018-04-06 Tom Tromey <tom@tromey.com>
7701
7702 * printcmd.c (last_examine_address): Change type to
7703 value_ref_ptr.
7704 (do_examine, x_command): Update.
7705
850645cf
TT
77062018-04-06 Tom Tromey <tom@tromey.com>
7707
7708 * value.c (release_value): Update.
7709 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7710 (struct bpstats) <val>: Now a value_ref_ptr.
7711 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7712 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7713 (~watchpoint, print_it_watchpoint, watch_command_1)
7714 (invalidate_bp_value_on_memory_change): Update.
7715
22bc8444
TT
77162018-04-06 Tom Tromey <tom@tromey.com>
7717
7718 * varobj.c (varobj_clear_saved_item)
7719 (update_dynamic_varobj_children, install_new_value, ~varobj):
7720 Update.
7721 * value.h (value_incref): Move declaration earlier.
7722 (value_decref): Rename from value_free.
7723 (struct value_ref_policy): New.
7724 (value_ref_ptr): New typedef.
7725 (struct value_deleter): Remove.
7726 (gdb_value_up): Remove typedef.
7727 (release_value): Change return type.
7728 (release_value_or_incref): Remove.
7729 * value.c (set_value_parent): Update.
7730 (value_incref): Change return type.
7731 (value_decref): Rename from value_free.
7732 (value_free_to_mark, free_all_values, free_value_chain): Update.
7733 (release_value): Return value_ref_ptr.
7734 (release_value_or_incref): Remove.
7735 (record_latest_value, set_internalvar, clear_internalvar):
7736 Update.
7737 * stack.c (info_frame_command): Don't call value_free.
7738 * python/py-value.c (valpy_dealloc, valpy_new)
7739 (value_to_value_object): Update.
7740 * printcmd.c (do_examine): Update.
7741 * opencl-lang.c (lval_func_free_closure): Update.
7742 * mi/mi-main.c (register_changed_p): Don't call value_free.
7743 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7744 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7745 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7746 value_free.
7747 * guile/scm-value.c (vlscm_free_value_smob)
7748 (vlscm_scm_from_value): Update.
7749 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7750 (frame_unwind_register_unsigned, get_frame_register_bytes)
7751 (put_frame_register_bytes): Don't call value_free.
7752 * findvar.c (address_from_register): Don't call value_free.
7753 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7754 * dwarf2loc.c (entry_data_value_free_closure)
7755 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7756 (dwarf2_evaluate_loc_desc_full): Update.
7757 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7758 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7759 (~watchpoint, watch_command_1)
7760 (invalidate_bp_value_on_memory_change): Update.
7761 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7762
7f8a5d38
SM
77632018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7764
7765 PR gdb/23022
7766 * warning.m4: Add -Wno-error=deprecated-register.
7767 * configure: Re-generate.
7768
8a76bd3b
TT
77692018-04-05 Tom Tromey <tom@tromey.com>
7770
7771 * linespec.h: Remove include of "vec.h".
7772
8e8d776e
TT
77732018-04-05 Tom Tromey <tom@tromey.com>
7774
7775 * linespec.c (typep): Remove typedef.
7776 (find_methods, find_superclass_methods): Take a std::vector.
7777 (find_method): Use std::vector.
7778
9b2f8581
TT
77792018-04-05 Tom Tromey <tom@tromey.com>
7780
7781 * utils.c (compare_strings): Remove.
7782 * utils.h (compare_strings): Remove.
7783 * objc-lang.h (find_imps): Update.
7784 * objc-lang.c (find_methods): Take a std::vector.
7785 (uniquify_strings, find_imps): Likewise.
7786 * linespec.c (find_methods): Take a std::vector.
7787 (decode_objc): Use std::vector.
7788 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7789 a std::vector.
7790 (find_method, find_function_symbols): Use std::vector.
7791
459a2e4c
TT
77922018-04-05 Tom Tromey <tom@tromey.com>
7793
7794 * completer.c (completion_tracker::completion_tracker): Remove
7795 cast.
7796 (completion_tracker::discard_completions): Likewise.
7797 * breakpoint.c (ambiguous_names_p): Remove cast.
7798 * ada-lang.c (_initialize_ada_language): Remove cast.
7799 * utils.h (streq): Update.
7800 (streq_hash): Add new declaration.
7801 * utils.c (streq): Return bool.
7802 (streq_hash): New function.
7803
9be2c17a
TT
78042018-04-05 Tom Tromey <tom@tromey.com>
7805
7806 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7807 Remove a string copy.
7808
f73c6ece
TT
78092018-04-05 Tom Tromey <tom@tromey.com>
7810
7811 * linespec.c (filter_results): Use std::vector.
7812 (decode_line_2, decode_line_full): Update.
7813
53a0f8a2
TT
78142018-04-05 Tom Tromey <tom@tromey.com>
7815
7816 * linespec.c (canonical_to_fullform): Return std::string.
7817 (filter_results): Update.
7818 (struct decode_line_2_item): Add constructor.
7819 <fullform, displayform>: Now std::string.
7820 (decode_line_2_compare_items): Now a std::sort comparator.
7821 (decode_line_2): Update.
7822
a5b5adf5
TT
78232018-04-05 Tom Tromey <tom@tromey.com>
7824
7825 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7826 (unexpected_linespec_error): Update.
7827 (linespec_parse_basic, parse_linespec): Update.
7828
6a307fc5
TT
78292018-04-05 Tom Tromey <tom@tromey.com>
7830
7831 * linespec.c (linespec_parse_basic): Reindent.
7832
41c1efc6
TT
78332018-04-05 Tom Tromey <tom@tromey.com>
7834
7835 * minsyms.h (iterate_over_minimal_symbols): Update.
7836 * minsyms.c (iterate_over_minimal_symbols): Take a
7837 gdb::function_view.
7838 * linespec.c (struct collect_minsyms): Remove.
7839 (compare_msyms): Now a std::sort comparator.
7840 (add_minsym): Add parameters.
7841 (search_minsyms_for_name): Update. Use std::vector.
7842
c5edbf3d
TT
78432018-04-03 Tom Tromey <tom@tromey.com>
7844
7845 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7846 gdb::byte_vector.
7847
b39efc48
WP
78482018-04-02 Weimin Pan <weimin.pan@oracle.com>
7849
7850 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7851
121ad66c 78522018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
7853
7854 PR gdb/16959
7855 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7856 printing static type.
7857
09473be8
TT
78582018-04-01 Tom Tromey <tom@tromey.com>
7859
7860 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7861 (rs6000_xfer_shared_libraries): Update.
7862
ec1f2d91
SM
78632018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7864
7865 * common/gdb_vecs.h (char_ptr): Remove.
7866 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7867
d8611974
SM
78682018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7869
7870 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7871 with std::vector.
7872 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7873
a18ba4e4
SM
78742018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7875
7876 * tracepoint.h (struct uploaded_tp): Initialize fields.
7877 <actions, step_actions, cmd_strings>: Change type to
7878 std::vector<char *>.
7879 * tracepoint.c (get_uploaded_tp): Allocate with new.
7880 (free_uploaded_tps): Free with delete.
7881 (parse_tracepoint_definition): Adjust to std::vector change.
7882 * breakpoint.c (read_uploaded_action): Likewise.
7883 (create_tracepoint_from_upload): Likewise.
7884 * ctf.c (ctf_write_uploaded_tp): Likewise.
7885 (SET_ARRAY_FIELD): Likewise.
7886 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7887
a7961323
TT
78882018-03-30 Tom Tromey <tom@tromey.com>
7889
7890 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7891 std::unique_ptr.
7892 (svr4_keep_data_in_core): Update.
7893 (svr4_read_so_list): Update.
7894
e83e4e24
TT
78952018-03-30 Tom Tromey <tom@tromey.com>
7896
7897 * windows-nat.c (handle_output_debug_string, handle_exception):
7898 Update.
7899 * target.h (target_read_string): Update.
7900 * target.c (target_read_string): Change "string" to
7901 unique_xmalloc_ptr.
7902 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7903 Update.
7904 * solib-frv.c (frv_current_sos): Update.
7905 * solib-dsbt.c (dsbt_current_sos): Update.
7906 * solib-darwin.c (darwin_current_sos): Update.
7907 * linux-thread-db.c (inferior_has_bug): Update.
7908 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7909 Update. Remove alloca.
7910 * ada-lang.c (ada_main_name): Update.
7911
263db9a1
TT
79122018-03-30 Tom Tromey <tom@tromey.com>
7913
7914 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7915 (struct dwo_file_deleter): New.
7916 (dwo_file_up): New typedef.
7917 (open_and_init_dwo_file): Use dwo_file_up.
7918 (free_dwo_file_cleanup): Remove.
7919
5dafb3d1
TT
79202018-03-30 Tom Tromey <tom@tromey.com>
7921
7922 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7923 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7924
11ed8cad
TT
79252018-03-30 Tom Tromey <tom@tromey.com>
7926
7927 * dwarf2read.c (class free_cached_comp_units): New class.
7928 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7929 (free_cached_comp_units): Remove function.
7930
9ae79dac
TT
79312018-03-30 Tom Tromey <tom@tromey.com>
7932
7933 * utils.h (make_cleanup_unpush_target): Remove.
7934 * inf-ptrace.c (struct target_unpusher): New.
7935 (target_unpush_up) New typedef.
7936 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7937 target_unpush_up.
7938 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7939
5aa89276
TT
79402018-03-27 Tom Tromey <tom@tromey.com>
7941
7942 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7943
1dbeed45
TT
79442018-03-27 Pedro Alves <palves@redhat.com>
7945 Tom Tromey <tom@tromey.com>
7946
7947 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7948 destructor. Now a class.
7949 (gdb_readline_wrapper_cleanup): Remove function.
7950 (gdb_readline_wrapper): Remove cleanups.
7951
c819b2c0
TT
79522018-03-27 Tom Tromey <tom@tromey.com>
7953
7954 * typeprint.h (struct type_print_options) <local_typedefs,
7955 global_typedefs>: Remove "struct" keyword.
7956 (class typedef_hash_table): New class.
7957 (recursively_update_typedef_hash, add_template_parameters)
7958 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7959 (find_typedef_in_hash): Don't declare.
7960 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7961 (typedef_hash_table::recursively_update): Rename from
7962 recursively_update_typedef_hash. Now a member.
7963 (typedef_hash_table::add_template_parameters): Rename from
7964 add_template_parameters. Now a member.
7965 (typedef_hash_table::typedef_hash_table): Now a constructor;
7966 rename from create_typedef_hash.
7967 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7968 rename from free_typedef_hash.
7969 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7970 (do_free_global_table): Remove.
7971 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7972 from copy_type_recursive.
7973 (create_global_typedef_table): Remove.
7974 (typedef_hash_table::find_global_typedef): Now a member of
7975 typedef_hash_table.
7976 (typedef_hash_table::find_typedef): Rename from
7977 find_typedef_in_hash; now a member.
7978 (whatis_exp): Update.
7979 * extension.h (struct ext_lang_type_printers): Add constructor and
7980 destructor.
7981 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7982 declare.
7983 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7984 Now a constructor; rename from start_ext_lang_type_printers.
7985 (ext_lang_type_printers): Now a destructor; rename from
7986 free_ext_lang_type_printers.
7987 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7988 Update.
7989 (c_type_print_base_struct_union): Update. Remove cleanups.
7990
608219fb
TT
79912018-03-27 Tom Tromey <tom@tromey.com>
7992
7993 * dwarf-index-write.c: Include <cmath>.
7994
3fcded8f
JB
79952018-03-27 Joel Brobecker <brobecker@adacore.com>
7996
7997 * NEWS: Add entry describing new "set|show varsize-limit" command.
7998 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7999 command.
8000 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8001 "set variable".
8002
cd4fb1b2
SM
80032018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8004
8005 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8006 dwarf-index-write.c
8007 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8008 * dwarf-index-common.c: New file.
8009 * dwarf-index-common.h: New file.
8010 * dwarf-index-write.c: New file.
8011 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8012 (struct dwarf2_section_info): Move from here.
8013 (dwarf2_section_info_def): Likewise.
8014 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8015 (offset_type): Likewise.
8016 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8017 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8018 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8019 (byte_swap): Likewise.
8020 (MAYBE_SWAP): Likewise.
8021 (dwarf2_per_cu_ptr): Likewise.
8022 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8023 (struct tu_stats): Likewise.
8024 (struct dwarf2_per_objfile): Likewise.
8025 (struct dwarf2_per_cu_data): Likewise.
8026 (struct signatured_type): Likewise.
8027 (sig_type_ptr): Likewise.
8028 (DEF_VEC_P (sig_type_ptr)): Likewise.
8029 (INDEX4_SUFFIX): Likewise.
8030 (INDEX5_SUFFIX): Likewise.
8031 (DEBUG_STR_SUFFIX): Likewise.
8032 (dwarf2_read_section): Make non-static.
8033 (mapped_index_string_hash): Move from here.
8034 (dwarf5_djb_hash): Likewise.
8035 (file_write): Likewise.
8036 (class data_buf): Likewise.
8037 (struct symtab_index_entry): Likewise.
8038 (struct mapped_symtab): Likewise.
8039 (find_slot): Likewise.
8040 (hash_expand): Likewise.
8041 (add_index_entry): Likewise.
8042 (uniquify_cu_indices): Likewise.
8043 (class c_str_view): Likewise.
8044 (class c_str_view_hasher): Likewise.
8045 (class vector_hasher): Likewise.
8046 (write_hash_table): Likewise.
8047 (psym_index_map): Likewise.
8048 (struct addrmap_index_data): Likewise.
8049 (add_address_entry): Likewise.
8050 (add_address_entry_worker): Likewise.
8051 (write_address_map): Likewise.
8052 (symbol_kind): Likewise.
8053 (write_psymbols): Likewise.
8054 (struct signatured_type_index_data): Likewise.
8055 (write_one_signatured_type): Likewise.
8056 (recursively_count_psymbols): Likewise.
8057 (recursively_write_psymbols): Likewise.
8058 (class debug_names): Likewise.
8059 (check_dwarf64_offsets): Likewise.
8060 (psyms_seen_size): Likewise.
8061 (write_gdbindex): Likewise.
8062 (write_debug_names): Likewise.
8063 (assert_file_size): Likewise.
8064 (write_psymtabs_to_index): Likewise.
8065 (save_gdb_index_command): Likewise.
8066 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8067 command.
8068 * dwarf2read.h: New file.
8069
59cc4834
JB
80702018-03-27 Joel Brobecker <brobecker@adacore.com>
8071
8072 PR gdb/22670
8073 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8074 symbol name if the CU's language stores symbol names in linkage
8075 format.
8076 * language.h (struct language_defn)
8077 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8078 all instances of this struct.
8079
67501539
TT
80802018-03-26 Tom Tromey <tom@tromey.com>
8081
8082 * stack.c (backtrace_command_1): Remove verbose code.
8083
76c939ac
TT
80842018-03-26 Tom Tromey <tom@tromey.com>
8085
8086 * python/py-framefilter.c (py_print_type): Don't catch
8087 exceptions. Return void.
8088 (py_print_value): Likewise.
8089 (py_print_single_arg): Likewise.
8090 (enumerate_args): Don't catch exceptions.
8091 (py_print_args): Likewise.
8092 (py_print_frame): Likewise.
8093 (gdbpy_apply_frame_filter): Catch exceptions here.
8094
9507b29c
TT
80952018-03-26 Tom Tromey <tom@tromey.com>
8096
8097 * stack.c (_initialize_stack): Remove trailing newlines from help
8098 text. Add "Usage" line to "backtrace" help.
8099
eb68e487
TT
81002018-03-26 Tom Tromey <tom@tromey.com>
8101
8102 PR python/16486:
8103 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8104
1f111921
TT
81052018-03-26 Tom Tromey <tom@tromey.com>
8106
8107 * python/py-framefilter.c (py_print_single_arg): Return
8108 EXT_LANG_BT_ERROR from catch.
8109
fb7eb8b5
TT
81102018-03-26 Tom Tromey <tom@tromey.com>
8111
8112 PR backtrace/15584:
8113 * stack.c (backtrace_command_1): Move some code into no-filters
8114 "if".
8115
4ca59a9f
TT
81162018-03-26 Tom Tromey <tom@tromey.com>
8117
8118 * python/py-framefilter.c (throw_quit_or_print_exception): New
8119 function.
8120 (gdbpy_apply_frame_filter): Use it.
8121
92256134
TT
81222018-03-26 Tom Tromey <tom@tromey.com>
8123
8124 PR cli/17716:
8125 * python/py-framefilter.c (py_print_type, py_print_value)
8126 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8127 RETURN_MASK_ERROR.
8128
7a630bc2
TT
81292018-03-26 Tom Tromey <tom@tromey.com>
8130
8131 * python/py-framefilter.c (enumerate_args): Use
8132 gdb::unique_xmalloc_ptr.
8133
63283d4a
TT
81342018-03-26 Tom Tromey <tom@tromey.com>
8135
8136 * python/py-framefilter.c (py_print_frame): Return
8137 EXT_LANG_BT_OK.
8138 (gdbpy_apply_frame_filter): Update comment.
8139 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8140 Remove.
8141 <EXT_LANG_BT_NO_FILTERS>: Change value.
8142
978d6c75
TT
81432018-03-26 Tom Tromey <tom@tromey.com>
8144
8145 PR backtrace/15582:
8146 * stack.c (backtrace_command): Parse "hide" argument.
8147 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8148 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8149 constant.
8150
1cf7e640
TT
81512018-03-26 Tom Tromey <tom@tromey.com>
8152
8153 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8154 add "flags".
8155 (backtrace_command): Remove "fulltrace", add "flags".
8156
ea3b0687
TT
81572018-03-26 Tom Tromey <tom@tromey.com>
8158
8159 * stack.c (backtrace_command): Rewrite command line parsing.
8160
9f034d75
SM
81612018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8162
8163 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8164
ce1459e5
SM
81652018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8166
8167 * filename-seen-cache.h: Add include guard.
8168
4f7ae6f5
KS
81692018-03-26 Keith Seitz <keiths@redhat.com>
8170
8171 * symfile.c (place_section): Remove "struct" from section_addr_info
8172 in comment.
8173 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8174 "struct" keyword from section_addr_info.
8175
5cd3e386
AH
81762018-03-26 Alan Hayward <alan.hayward@arm.com>
8177
8178 * regformats/regdef.h (reg): Add constructors.
8179
3e5ef9a4
PA
81802018-03-25 Pedro Alves <palves@redhat.com>
8181
8182 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8183 if then/else bodies in var_func_name extraction.
8184
c88d2fcc 81852018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
8186
8187 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8188 lookup_minimal_symbol() to find symbol entry.
8189 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8190
b7fee5a3
KS
81912018-03-23 Keith Seitz <keiths@redhat.com>
8192
8193 PR c++/22968
8194 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8195 nested type definitions for C++, too.
8196
2cc9b304
TT
81972018-03-23 Tom Tromey <tom@tromey.com>
8198
8199 * machoread.c (struct oso_el): Add a constructor. Don't define as
8200 a typedef.
8201 (macho_register_oso): Remove.
8202 (macho_symtab_read): Take a std::vector.
8203 (oso_el_compare_name): Now a std::sort comparator.
8204 (macho_symfile_read_all_oso): Take a std::vector.
8205 (macho_symfile_read): Use std::vector. Remove cleanups.
8206
a2b2bc12
TT
82072018-03-22 Tom Tromey <tom@tromey.com>
8208
8209 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8210 (record_full_goto_bookmark): Use std::string.
8211
7a8f494c
PFC
82122018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8213
8214 PR tdep/18295
8215 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8216 a single mask.
8217
dd6d677f
PFC
82182018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8219
8220 * rs6000-tdep.c (store_insn_p): New function.
8221 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8222 and cr_reg to their unshifted values. Use store_insn_p to
8223 match LR saves using either R1 or fdata->alloca_reg. Use
8224 store_insn_p to match CR saves. Set alloca_reg_offset
8225 when alloca_reg and framep are set. Remove lr_reg shift
8226 when assigning to fdata->lr_register.
8227
26d6cec4
AA
82282018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8229
8230 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8231 command line args instead of emitting a warning.
8232
5d9310c4
SM
82332018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8234
8235 * tracepoint.h (struct static_tracepoint_marker): Initialize
8236 fields, define default constructor, move constructor and move
8237 assignment, disable the rest.
8238 <str_id, extra>: Make std::string.
8239 (release_static_tracepoint_marker): Remove.
8240 (free_current_marker): Remove.
8241 * tracepoint.c (free_current_marker): Remove.
8242 (parse_static_tracepoint_marker_definition): Adjust to
8243 std::string, use new hex2str overload.
8244 (release_static_tracepoint_marker): Remove.
8245 (print_one_static_tracepoint_marker): Get marker by reference
8246 and adjust to std::string.
8247 (info_static_tracepoint_markers_command): Adjust to std::vector
8248 changes
8249 * target.h (static_tracepoint_marker_p): Remove typedef.
8250 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8251 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8252 bool.
8253 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8254 * target-debug.h
8255 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8256 (target_debug_print_std_vector_static_tracepoint_marker): New.
8257 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8258 to...
8259 (target_debug_print_static_tracepoint_marker_p): ... this.
8260 * target-delegates.c: Re-generate.
8261 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8262 Make std::string.
8263 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8264 (decode_static_tracepoint_spec): Adjust to std::vector.
8265 (tracepoint_print_one_detail): Adjust to std::string.
8266 (strace_marker_decode_location): Adjust to std::string.
8267 (update_static_tracepoint): Adjust to std::string, remove call
8268 to release_static_tracepoint_marker.
8269 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8270 Adjust to std::vector.
8271 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8272 (remote_static_tracepoint_markers_by_strid): Adjust to
8273 std::vector.
8274 * common/rsp-low.h (hex2str): New overload with explicit count
8275 of bytes.
8276 * common/rsp-low.c (hex2str): New overload with explicit count
8277 of bytes.
8278 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8279 (_initialize_rsp_low_selftests): Add test_hex2str test.
8280 * unittests/tracepoint-selftests.c
8281 (test_parse_static_tracepoint_marker_definition): Adjust to
8282 std::string.
8283
62c222b6
SM
82842018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8285
8286 * tracepoint.c (parse_static_tracepoint_marker_definition):
8287 Consider case where the definition is followed by more
8288 definitions.
8289 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8290 tracepoint-selftests.c.
8291 * unittests/tracepoint-selftests.c: New.
8292
7eb2418f
PFC
82932018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8294
8295 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8296 Carvalho.
8297
7cbe16e9
SR
82982018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8299
3d6b3b82 8300 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 8301
4ee89e90
SR
83022018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8303
3d6b3b82 8304 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 8305
92630041
TT
83062018-03-19 Tom Tromey <tom@tromey.com>
8307
8308 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8309 "IDENT" production.
8310
76727919
TT
83112018-03-19 Pedro Alves <palves@redhat.com>
8312 Tom Tromey <tom@tromey.com>
8313
8314 * unittests/observable-selftests.c: New file.
8315 * common/observable.h: New file.
8316 * observable.h: New file.
8317 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8318 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8319 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8320 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8321 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8322 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8323 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8324 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8325 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8326 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8327 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8328 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8329 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8330 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8331 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8332 tui/tui-interp.c, valops.c: Update all users.
8333 * tui/tui-hooks.c (tui_bp_created_observer)
8334 (tui_bp_deleted_observer, tui_bp_modified_observer)
8335 (tui_inferior_exit_observer, tui_before_prompt_observer)
8336 (tui_normal_stop_observer, tui_register_changed_observer):
8337 Remove.
8338 (tui_observers_token): New global.
8339 (attach_or_detach, tui_attach_detach_observers): New functions.
8340 (tui_install_hooks, tui_remove_hooks): Use
8341 tui_attach_detach_observers.
8342 * record-btrace.c (record_btrace_thread_observer): Remove.
8343 (record_btrace_thread_observer_token): New global.
8344 * observer.sh: Remove.
8345 * observer.c: Rename to observable.c.
8346 * observable.c (namespace gdb_observers): Define new objects.
8347 (observer_debug): Move into gdb_observers namespace.
8348 (struct observer, struct observer_list, xalloc_observer_list_node)
8349 (xfree_observer_list_node, generic_observer_attach)
8350 (generic_observer_detach, generic_observer_notify): Remove.
8351 (_initialize_observer): Update.
8352 Don't include observer.inc.
8353 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8354 (clean mostlyclean): Likewise.
8355 (observer.h, observer.inc): Remove targets.
8356 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8357 (COMMON_SFILES): Use observable.c, not observer.c.
8358 * .gitignore: Remove observer.h.
8359
1cb1f3da
TT
83602018-03-18 Tom Tromey <tom@tromey.com>
8361
8362 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8363 gdb::def_vector.
8364 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8365
a06ab151
TT
83662018-03-17 Tom Tromey <tom@tromey.com>
8367
8368 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8369
770623f7
TT
83702018-03-17 Tom Tromey <tom@tromey.com>
8371
8372 * target.c (class scoped_target_fd): New.
8373 (target_fileio_close_cleanup): Remove.
8374 (target_fileio_read_alloc_1): Use scoped_target_fd.
8375
39be3c7e
SM
83762018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8377
8378 * silent-rules.mk: New.
8379 * Makefile.in: Include silent-rules.mk
8380 (srcdir, VPATH, top_srcdir): Move up.
8381 (COMPILE): Add ECHO_CXX.
8382 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8383 (init.c): Add ECHO_INIT_C.
8384 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8385 (version.c): Add ECHO_GEN.
8386 (printcmd.o): Add ECHO_CXX.
8387 (target-float.o): Add ECHO_CXX.
8388 (ada-exp.o): Add ECHO_CXX.
8389 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8390 (insight$(EXEEXT)): Add ECHO_CXXLD.
8391 * gnulib/configure.ac: Add AM_SILENT_RULES.
8392 * gnulib/aclocal.m4: Re-generate.
8393 * gnulib/configure: Re-generate.
8394 * gnulib/import/Makefile.in: Re-generate.
8395
37e136b1
TT
83962018-03-16 Tom Tromey <tom@tromey.com>
8397
8398 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8399 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8400 * utils.c (do_free_section_addr_info)
8401 (make_cleanup_free_section_addr_info): Remove.
8402 * symfile.h (struct other_sections): Add constructor.
8403 (struct section_addr_info): Remove.
8404 (section_addr_info): New typedef.
8405 (struct sym_fns) <sym_offsets>: Change type of parameter.
8406 (build_section_addr_info_from_objfile)
8407 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8408 (default_symfile_offsets, symbol_file_add)
8409 (symbol_file_add_from_bfd)
8410 (build_section_addr_info_from_section_table): Update.
8411 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8412 * symfile.c (alloc_section_addr_info): Remove.
8413 (build_section_addr_info_from_section_table): Change return type.
8414 Update.
8415 (build_section_addr_info_from_bfd)
8416 (build_section_addr_info_from_objfile): Likewise.
8417 (free_section_addr_info): Remove.
8418 (relative_addr_info_to_section_offsets): Change type of "addrs".
8419 (addrs_section_compar): Now a std::sort comparator.
8420 (addrs_section_sort): Change return type.
8421 (addr_info_make_relative): Change type of "addrs". Update.
8422 (default_symfile_offsets, syms_from_objfile_1)
8423 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8424 (symbol_file_add_separate): Update.
8425 (symbol_file_add): Change type of "addrs". Update.
8426 (add_symbol_file_command): Update. Remove cleanups.
8427 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8428 cleanups.
8429 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8430 * solib.c (solib_read_symbols): Update.
8431 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8432 * machoread.c (macho_symfile_offsets): Update.
8433 * jit.c (jit_bfd_try_read_symtab): Update.
8434
03afa6ef
SM
84352018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8436
8437 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8438 unittests/utils-selftests.c.
8439 * unittests/utils-selftests.c: New file.
8440
3ae9ce5d
TT
84412018-03-14 Tom Tromey <tom@tromey.com>
8442
8443 PR cli/14977:
8444 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8445 for NULL.
8446
b8c2339b
TT
84472018-03-14 Tom Tromey <tom@tromey.com>
8448
8449 PR cli/19918:
8450 * printcmd.c (printf_pointer): Allow "-" in format.
8451
80ae639d
TT
84522018-03-14 Tom Tromey <tom@tromey.com>
8453
8454 * printcmd.c (_initialize_printcmd): Add usage to printf.
8455
0d671d99
YQ
84562018-03-14 Yao Qi <qiyao@sourceware.org>
8457
8458 * MAINTAINERS: Update my email address.
8459
b577b6af
TT
84602018-03-13 Tom Tromey <tom@tromey.com>
8461
8462 * machoread.c (macho_check_dsym): Change filenamep to a
8463 std::string*.
8464 (macho_symfile_read): Update.
8465 * symfile.c (load_command): Use std::string.
8466
89a3b63e
AB
84672018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8468
8469 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8470 to error message string.
8471 (riscv_register_name): Use xsnprintf instead of sprintf.
8472 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8473 internal_error.
8474 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8475 error.
8476 (riscv_push_dummy_call): Likewise.
8477
984c7238
TT
84782018-03-12 Tom Tromey <tom@tromey.com>
8479
8480 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8481 Use gdb::byte_vector.
8482 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8483
933522d1
YQ
84842018-03-12 Yao Qi <yao.qi@linaro.org>
8485
8486 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8487 parameter type to readable_regcache.
8488 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8489 the declaration.
8490
be2daae6
TT
84912018-03-11 Tom Tromey <tom@tromey.com>
8492
8493 * dwarf2read.c (struct nextfield): Add initializers.
8494 (struct nextfnfield): Remove.
8495 (struct fnfieldlist): Add initializers. Remove "length" and
8496 "head", use std::vector.
8497 (struct decl_field_list): Remove.
8498 (struct field_info): Add initializers.
8499 <fields, baseclasses>: Now std::vector.
8500 <nbaseclasses, nfnfields, typedef_field_list_count,
8501 nested_types_list_count>: Remove.
8502 (dwarf2_add_field, dwarf2_add_type_defn)
8503 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8504 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8505 (process_structure_scope): Update.
8506
484cf504
TT
85072018-03-11 Tom Tromey <tom@tromey.com>
8508
8509 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8510 for use by std::sort.
8511 (build_type_psymtabs_1): Use std::vector.
8512
9bd8e0b0
EZ
85132018-03-09 Eli Zaretskii <eliz@gnu.org>
8514
8515 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8516 and LIBMPFR in the printed configuration.
8517
5dc1a704
TT
85182018-03-08 Tom Tromey <tom@tromey.com>
8519
8520 * source.c (get_filename_and_charpos): Use scoped_fd.
8521 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8522 (procfs_pidlist): Likewise.
8523 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8524 (iterate_over_mappings): Likewise.
8525
fdf07f3a
TT
85262018-03-08 Tom Tromey <tom@tromey.com>
8527
8528 * infcall.c (struct call_return_meta_info)
8529 <stack_temporaries_enabled>: Remove.
8530 (get_call_return_value, call_function_by_hand_dummy): Update.
8531 * thread.c (disable_thread_stack_temporaries): Remove.
8532 (enable_thread_stack_temporaries): Remove.
8533 (thread_stack_temporaries_enabled_p): Return bool.
8534 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8535 (get_last_thread_stack_temporary): Update.
8536 * eval.c (evaluate_subexp): Update.
8537 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8538 class, not a function.
8539 (value_ptr, value_vec): Remove typedefs.
8540 (class thread_info) <stack_temporaries_enabled>: Now bool.
8541 <stack_temporaries>: Now a std::vector.
8542 (thread_stack_temporaries_enabled_p)
8543 (value_in_thread_stack_temporaries): Return bool.
8544
567a3e54
SM
85452018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8546
8547 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8548 (getpkt_or_notif_sane_1): Likewise.
8549
00b40057
SM
85502018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8551
8552 * build-id.c (build_id_to_debug_bfd): Use std::string.
8553
a8dbfd58
SM
85542018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8555
8556 * build-id.c (find_separate_debug_file_by_buildid): Return
8557 std::string.
8558 * build-id.h (find_separate_debug_file_by_buildid): Return
8559 std::string.
8560 * coffread.c (coff_symfile_read): Adjust to std::string.
8561 * elfread.c (elf_symfile_read): Adjust to std::string.
8562 * symfile.c (separate_debug_file_exists): Change parameter to
8563 std::string.
8564 (find_separate_debug_file): Return std::string.
8565 (find_separate_debug_file_by_debuglink): Return std::string.
8566 * symfile.h (find_separate_debug_file_by_debuglink): Return
8567 std::string.
8568
e6a58aa8
SM
85692018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8570
8571 * common/xml-utils.c (xml_escape_text): Move code to...
8572 (xml_escape_text_append): ... this new function.
8573 * common/xml-utils.h (xml_escape_text_append): New declaration.
8574 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8575 New function.
8576 (_initialize_xml_utils): register test_xml_escape_text_append as
8577 a selftest.
8578
4ef0bef6
AH
85792018-03-07 Alan Hayward <alan.hayward@arm.com>
8580
8581 * defs.h: Remove MAX_REGISTER_SIZE.
8582 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8583 asserts.
8584 * python/py-unwind.c (pyuw_sniffer): Likewise.
8585
e0d3522b
TT
85862018-03-07 Tom Tromey <tom@tromey.com>
8587
8588 * linux-tdep.c (linux_info_proc): Update.
8589 * target.h (struct target_ops) <to_fileio_readlink>: Return
8590 optional<string>.
8591 (target_fileio_readlink): Return optional<string>.
8592 * remote.c (remote_hostio_readlink): Return optional<string>.
8593 * inf-child.c (inf_child_fileio_readlink): Return
8594 optional<string>.
8595 * target.c (target_fileio_readlink): Return optional<string>.
8596
ea005f31
AB
85972018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8598
8599 * regcache.c (cooked_read_test): Add riscv to the list of
8600 architectures that have a save_reggroup.
8601
e95a97d4
AA
86022018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8603
8604 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8605 value is not a dynamic class object.
8606
d8344f3d
TT
86072018-03-06 Tom Tromey <tom@tromey.com>
8608
8609 * rust-exp.y: Formatting fixes.
8610
9add17f2
AB
86112018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8612
8613 * riscv-tdep.c (riscv_register_name): Remove target description
8614 support.
8615 (riscv_gdbarch_init): Remove target description check.
8616
c9486dfe
AB
86172018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8618
8619 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8620 comment.
8621 * riscv-tdep.h: Likewise.
8622
d74aff3d
AB
86232018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8624
8625 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8626 (riscv_pseudo_register_write): Delete.
8627 (riscv_gdbarch_init): Remove all use of pseudo registers.
8628
7ea78b59
SM
86292018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8630
8631 * record-btrace.c (btrace_print_lines): Replace cleanup
8632 parameter with RAII equivalents.
8633 (btrace_insn_history): Replace cleanup with RAII equivalents.
8634 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8635 make_cleanup_ui_out_tuple_begin_end): Remove.
8636 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8637 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8638 make_cleanup_ui_out_list_begin_end): Remove.
8639
53127008
SM
86402018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8641
8642 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8643 parameter types to std::vector. Use bool.
8644 (record_btrace_wait): Replace VEC(tp_t) with
8645 std::vector<thread_info *>.
8646 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8647
228f1508
SM
86482018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8649
8650 * record-btrace.c (record_btrace_disable_callback): Remove.
8651 (struct scoped_btrace_disable): New.
8652 (record_btrace_open): Use scoped_btrace_disable.
8653
b2970c23
AB
86542018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8655
8656 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8657 reading values from registers.
8658
fb294655
AB
86592018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8660
8661 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8662 where appropriate.
8663
cab5bb9d
AB
86642018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8665
8666 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8667 change parameter type. Use GDB's print functions, and use
8668 core_addr_to_string where appropriate.
8669 (riscv_push_dummy_call): Use core_addr_to_string where
8670 appropriate, update call to riscv_print_arg_location, and reindent
8671 a few lines.
8672 (riscv_return_value): Update call to riscv_print_arg_location.
8673
dbbb1059
AB
86742018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8675 Tim Newsome <tim@sifive.com>
8676 Albert Ou <a0u@eecs.berkeley.edu>
8677 Darius Rad <darius@bluespec.com>
8678
8679 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8680 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8681 (ALLDEPFILES): Add riscv-tdep.c
8682 * configure.tgt: Add riscv support.
8683 * riscv-tdep.c: New file.
8684 * riscv-tdep.h: New file.
8685 * NEWS: Mention new target.
8686 * MAINTAINERS: Add entry for riscv.
8687
5dc43913
AB
86882018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8689
8690 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8691 fields within aggregates.
8692
3dea1ef7
SM
86932018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8694
8695 * record-btrace.c (btrace_print_lines): Change type of flags to
8696 gdb_disassembly_flags.
8697
7efba073
JB
86982018-03-04 John Baldwin <jhb@FreeBSD.org>
8699
8700 * fbsd-nat.c: Include "inf-ptrace.h".
8701 (USE_SIGTRAP_SIGINFO): Conditionally define.
8702 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8703 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8704 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8705 function.
8706 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8707 Likewise.
8708 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8709 Likewise.
8710 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8711 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8712 "supports_stopped_by_hw_breakpoint" target methods.
8713
386a8676
JB
87142018-03-04 John Baldwin <jhb@FreeBSD.org>
8715
8716 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8717 * fbsd-nat.c (debug_fbsd_nat): New variable.
8718 (show_fbsd_nat_debug): New function.
8719 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8720 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8721
12279366
JB
87222018-03-04 John Baldwin <jhb@FreeBSD.org>
8723
8724 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8725 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8726 prototype.
8727 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8728 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8729 method.
8730
54693cf5
SM
87312018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8732
8733 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8734 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8735
ccb2231c
SM
87362018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8737
8738 * charset.c (struct charset_vector): New.
8739 (charsets): Change type to charset_vector.
8740 (find_charset_names): Adjust.
8741 (add_one): Adjust.
8742 (_initialize_charset): Adjust.
8743
6fb16ce6
SM
87442018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8745
8746 * progspace.h (struct program_space) <deleted_solibs>: Change
8747 type to std::vector<std::string>.
8748 * progspace.c (clear_program_space_solib_cache): Adjust.
8749 * breakpoint.c (print_solib_event): Adjust.
8750 (check_status_catch_solib): Adjust.
8751 * solib.c (update_solib_list): Adjust.
8752 * ui-out.h (class ui_out) <field_string>: New overload.
8753 * ui-out.c (ui_out::field_string): New overload.
8754
564b1e3f
SM
87552018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8756
8757 * progspace.h (struct program_space): Add constructor and
8758 destructor, initialize fields.
8759 (add_program_space): Remove.
8760 * progspace.c (add_program_space): Rename to...
8761 (program_space::program_space): ... this.
8762 (release_program_space): Rename to...
8763 (program_space::~program_space): ... this.
8764 (delete_program_space): Use delete to delete program_space.
8765 (initialize_progspace): Use new to allocate program_space.
8766 * inferior.c (add_inferior_with_spaces): Likewise.
8767 (clone_inferior_command): Likewise.
8768 * infrun.c (follow_fork_inferior): Likewise.
8769 (handle_vfork_child_exec_or_exit): Likewise.
8770
e80aaf61
SM
87712018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8772
8773 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8774 (delim_string_to_char_ptr_vec): Return std::vector of
8775 gdb::unique_xmalloc_ptr.
8776 (dirnames_to_char_ptr_vec_append): Take std::vector of
8777 gdb::unique_xmalloc_ptr.
8778 (dirnames_to_char_ptr_vec): Return std::vector of
8779 gdb::unique_xmalloc_ptr.
8780 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8781 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8782 (delim_string_to_char_ptr_vec): Return an std::vector of
8783 gdb::unique_xmalloc_ptr, adjust the code.
8784 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8785 gdb::unique_xmalloc_ptr, adjust the code.
8786 (dirnames_to_char_ptr_vec): Return an std::vector of
8787 gdb::unique_xmalloc_ptr, adjust the code.
8788 * auto-load.c (auto_load_safe_path_vec): Change type to
8789 std::vector of gdb::unique_xmalloc_ptr.
8790 (auto_load_expand_dir_vars): Return an std::vector of
8791 gdb::unique_xmalloc_ptr, adjust the code.
8792 (auto_load_safe_path_vec_update): Adjust.
8793 (filename_is_in_auto_load_safe_path_vec): Adjust.
8794 (auto_load_objfile_script_1): Adjust.
8795 * build-id.c (build_id_to_debug_bfd): Adjust.
8796 * linux-thread-db.c (thread_db_load_search): Adjust.
8797 * source.c (add_path): Adjust.
8798 (openp): Adjust.
8799 * symfile.c (find_separate_debug_file): Adjust.
8800 * utils.c (do_free_char_ptr_vec): Remove.
8801 (make_cleanup_free_char_ptr_vec): Remove.
8802
ab818ade
SDJ
88032018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8804
8805 PR gdb/22907
8806 * common/pathstuff.c: Conditionally include "<windows.h>".
8807
e1e6f073
GS
88082018-03-01 Georg Sauthoff <mail@georg.so>
8809
8810 PR gdb/22888
8811 * gcore.in: Quote variables and switch interpreter to bash.
8812
c7b15a66
TT
88132018-03-01 Tom Tromey <tom@tromey.com>
8814
8815 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8816 assertion. Add assertion for discriminant_index.
8817 (quirk_rust_enum): Use correct base type name in univariant case.
8818
0cb7c7b0
SM
88192018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8820
8821 * record.c (get_call_history_modifiers): Return a
8822 record_print_flags.
8823 (cmd_record_call_history): Adjust.
8824 * record-btrace.c (record_btrace_call_history): Adjust.
8825 (record_btrace_call_history_range): Adjust.
8826 (record_btrace_call_history_from): Adjust.
8827 * target-debug.h (target_debug_print_record_print_flags): New.
8828 * target-delegates.c: Re-generate.
8829 * target.c (target_call_history): Change flags type.
8830 (target_call_history_from): Likewise.
8831 (target_call_history_range): Likewise.
8832 * target.h (struct target_ops) <target_call_history>: Likewise.
8833 (target_call_history_from): Likewise.
8834 (target_call_history_range): Likewise.
8835
25e3c82c
SDJ
88362018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8837 Simon Marchi <simon.marchi@polymtl.ca>
8838
8839 * common/common-utils.c: Include "sys/stat.h".
8840 (is_regular_file): Move here from "source.c"; change return
8841 type to "bool".
8842 * common/common-utils.h (is_regular_file): New prototype.
8843 * common/pathstuff.c (contains_dir_separator): New function.
8844 * common/pathstuff.h (contains_dir_separator): New prototype.
8845 * source.c: Don't include "sys/stat.h".
8846 (is_regular_file): Move to "common/common-utils.c".
8847
b4987c95
SDJ
88482018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8849
8850 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8851 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8852 * auto-load.c: Include "common/pathstuff.h".
8853 * common/common-def.h (current_directory): Move here.
8854 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8855 function.
8856 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8857 prototype.
8858 * common/pathstuff.c: New file.
8859 * common/pathstuff.h: New file.
8860 * compile/compile.c: Include "common/pathstuff.h".
8861 * defs.h (current_directory): Move to "common/common-defs.h".
8862 * dwarf2read.c: Include "common/pathstuff.h".
8863 * exec.c: Likewise.
8864 * guile/scm-safe-call.c: Likewise.
8865 * linux-thread-db.c: Likewise.
8866 * main.c: Likewise.
8867 * nto-tdep.c: Likewise.
8868 * objfiles.c: Likewise.
8869 * source.c: Likewise.
8870 * symtab.c: Likewise.
8871 * utils.c: Include "common/pathstuff.h".
8872 (gdb_realpath): Move to "common/pathstuff.c".
8873 (gdb_realpath_keepfile): Likewise.
8874 (gdb_abspath): Likewise.
8875 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8876 (gdb_realpath_keepfile): Likewise.
8877 (gdb_abspath): Likewise.
8878
f169cfdc
JB
88792018-02-28 John Baldwin <jhb@FreeBSD.org>
8880
8881 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8882 wildcard process pid for super_resume for kernels with a
8883 specific bug.
8884
e05cac70
PM
88852018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8886
8887 * compile/compile.c (get_args): Add additional comments
8888 explaining function.
8889
55089490
TT
88902018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8891 Tom Tromey <tom@tromey.com>
8892
8893 * target.h (memory_write_request_s): Remove typedef. Don't define
8894 VEC.
8895 (target_write_memory_blocks): Change argument to std::vector.
8896 (struct memory_write_request): Add constructor.
8897 * target-memory.c (compare_block_starting_address): Return bool.
8898 Change argument types.
8899 (claim_memory): Change arguments to use std::vector.
8900 (split_regular_and_flash_blocks, blocks_to_erase)
8901 (compute_garbled_blocks): Likewise.
8902 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8903 (target_write_memory_blocks): Change argument to std::vector.
8904 * symfile.c (struct load_section_data): Add constructor and
8905 destructor. Use std::vector for "requests".
8906 (struct load_progress_data): Add initializers.
8907 (load_section_callback): Update. Use "new".
8908 (clear_memory_write_data): Remove.
8909 (generic_load): Update.
8910
0c305b61
AH
89112018-02-27 Alan Hayward <alan.hayward@arm.com>
8912
8913 * arch/aarch64.h: Use common/tdesc.h.
8914
c5196c92
MR
89152018-02-26 Maciej W. Rozycki <macro@mips.com>
8916
8917 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8918 architecture with a 64-bit ABI.
8919
37c33887
MR
89202018-02-26 Maciej W. Rozycki <macro@mips.com>
8921
8922 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8923 ahead of target description loading.
8924
d4dd3282
TT
89252018-02-26 Tom Tromey <tom@tromey.com>
8926
8927 * stack.c (backtrace_command_1): Update.
8928 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8929 of "flags".
8930 * python/py-framefilter.c (py_print_frame)
8931 (gdbpy_apply_frame_filter): Change type of "flags".
8932 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8933 of "flags".
8934 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8935 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8936 * extension.h (enum frame_filter_flag): Rename from
8937 frame_filter_flags.
8938 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8939 (apply_ext_lang_frame_filter): Change type of "flags".
8940 * extension.c (apply_ext_lang_frame_filter): Change type of
8941 "flags".
8942 * extension-priv.h (struct extension_language_ops)
8943 <apply_frame_filter>: Change type of "flags".
8944
6893c19a
TT
89452018-02-26 Tom Tromey <tom@tromey.com>
8946
8947 PR python/16497:
8948 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8949 off-by-one in py_end computation.
8950 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8951 PRINT_MORE_FRAMES.
8952 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8953 constant.
8954
2ddeaf8a
TT
89552018-02-26 Tom Tromey <tom@tromey.com>
8956
8957 * dwarf2read.c (struct variant_field): New.
8958 (struct nextfield) <variant>: New field.
8959 (dwarf2_add_field): Handle DW_TAG_variant_part.
8960 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8961 discriminated union.
8962 (read_structure_type): Handle DW_TAG_variant_part.
8963 (handle_struct_member_die): New function, extracted from
8964 process_structure_scope. Handle DW_TAG_variant.
8965 (process_structure_scope): Handle discriminated unions. Call
8966 handle_struct_member_die.
8967
c9317f21
TT
89682018-02-26 Tom Tromey <tom@tromey.com>
8969
8970 * rust-lang.h (rust_last_path_segment): Declare.
8971 * rust-lang.c (rust_last_path_segment): Now public. Change
8972 contract.
8973 (struct disr_info): Remove.
8974 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8975 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8976 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8977 (rust_enum_p, rust_enum_variant): New function.
8978 (rust_underscore_fields): Remove "offset" parameter.
8979 (rust_print_enum): New function.
8980 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8981 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8982 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8983 enums.
8984 (rust_internal_print_type): New function, from rust_print_type.
8985 Remove enum code.
8986 (rust_print_type): Call rust_internal_print_type.
8987 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8988 Update enum handling.
8989 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8990 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8991 (rust_union_quirks): New functions.
8992 (process_full_comp_unit, process_full_type_unit): Call
8993 rust_union_quirks.
8994 (process_structure_scope): Update rust_unions if necessary.
8995
7c22600a
TT
89962018-02-26 Tom Tromey <tom@tromey.com>
8997
8998 * value.h (value_union_variant): Declare.
8999 * valops.c (value_union_variant): New function.
9000 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9001 (struct discriminant_info): New.
9002 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9003 enumerator.
9004 (struct main_type) <flag_discriminated_union>: New field.
9005
15ce8941
TT
90062018-02-26 Tom Tromey <tom@tromey.com>
9007
9008 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9009 unittests/unpack-selftests.c.
9010 * unittests/unpack-selftests.c: New file.
9011 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9012
48fbe735
YQ
90132018-02-26 Yao Qi <yao.qi@linaro.org>
9014
9015 * dwarf2read.c (struct partial_die_info) <read>: New method.
9016 (read_partial_die): Remove the declaration.
9017 (load_partial_dies): Update.
9018 (partial_die_info::partial_die_info):
9019 (read_partial_die): Change it to partial_die_info::read.
9020
52356b79
YQ
90212018-02-26 Yao Qi <yao.qi@linaro.org>
9022
9023 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9024 (fixup_partial_die): Remove declaration.
9025 (scan_partial_symbols): Update.
9026 (partial_die_parent_scope): Likewise.
9027 (partial_die_full_name): Likewise.
9028 (fixup_partial_die): Change it to partial_die_info::fixup.
9029
35cc7ed7
YQ
90302018-02-26 Yao Qi <yao.qi@linaro.org>
9031
9032 * dwarf2read.c (read_partial_die): Update the declaration.
9033 (load_partial_dies): Caller update.
9034 (read_partial_die): Remove one argument abbrev_len.
9035
6f06d47b
YQ
90362018-02-26 Yao Qi <yao.qi@linaro.org>
9037
9038 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9039 assignment operator.
9040 (load_partial_dies): Use ctor and copy ctor.
9041 (read_partial_die): Update.
9042 (dwarf2_cu::find_partial_die): Use ctor.
9043
d590ff25
YQ
90442018-02-26 Yao Qi <yao.qi@linaro.org>
9045
9046 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9047 (find_partial_die_in_comp_unit): Change it to
9048 dwarf2_cu::find_partial_die.
9049 (find_partial_die): Update.
9050
fd0a254f
YQ
90512018-02-26 Yao Qi <yao.qi@linaro.org>
9052
9053 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9054 is NULL.
9055
cd9983dd
YQ
90562018-02-26 Yao Qi <yao.qi@linaro.org>
9057
9058 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9059
f46cd62a
AH
90602018-02-26 Alan Hayward <alan.hayward@arm.com>
9061
9062 * arch/amd64.h: Use common/tdesc.h.
9063 * arch/i386.c: Likewise.
9064 * arch/i386.h: Likewise.
9065 * arch/tic6x.c: Likewise.
9066 * arch/tdesc.h: Move file from here...
9067 * common/tdesc.h: ...to here.
9068 * features/aarch64-core.c: Regenerate.
9069 * features/aarch64-fpu.c: Regenerate.
9070 * features/i386/32bit-avx.c: Regenerate.
9071 * features/i386/32bit-avx512.c: Regenerate.
9072 * features/i386/32bit-core.c: Regenerate.
9073 * features/i386/32bit-linux.c: Regenerate.
9074 * features/i386/32bit-mpx.c: Regenerate.
9075 * features/i386/32bit-pkeys.c: Regenerate.
9076 * features/i386/32bit-sse.c: Regenerate.
9077 * features/i386/64bit-avx.c: Regenerate.
9078 * features/i386/64bit-avx512.c: Regenerate.
9079 * features/i386/64bit-core.c: Regenerate.
9080 * features/i386/64bit-linux.c: Regenerate.
9081 * features/i386/64bit-mpx.c: Regenerate.
9082 * features/i386/64bit-pkeys.c: Regenerate.
9083 * features/i386/64bit-segments.c: Regenerate.
9084 * features/i386/64bit-sse.c: Regenerate.
9085 * features/i386/x32-core.c: Regenerate.
9086 * features/tic6x-c6xp.c: Regenerate.
9087 * features/tic6x-core.c: Regenerate.
9088 * features/tic6x-gp.c: Regenerate.
9089 * target-descriptions.c: Use common/tdesc.h.
9090 * target-descriptions.h: Likewise.
9091
9b292f68
TT
90922018-02-24 Tom Tromey <tom@tromey.com>
9093
9094 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9095 (try_thread_db_load_from_dir, thread_db_load_search): Use
9096 std::string.
9097 (info_auto_load_libthread_db_compare): Return bool. Change
9098 argument types.
9099 (info_auto_load_libthread_db): Use std::vector, std::string.
9100 Remove cleanups.
9101
281d762b
TT
91022018-02-24 Tom Tromey <tom@tromey.com>
9103
9104 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9105 std::string.
9106 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9107 std::string*.
9108 * gdbarch.c: Rebuild.
9109 * gdbarch.h: Rebuild.
9110 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9111 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9112 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9113 std::string*.
9114
9d8780f0
SM
91152018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9116
9117 * gdbtypes.h (sect_offset): Change type to uint64_t.
9118 (sect_offset_str): New function.
9119 * dwarf2read.c (create_addrmap_from_aranges): Use
9120 sect_offset_str.
9121 (error_check_comp_unit_head): Likewise.
9122 (create_debug_type_hash_table): Likewise.
9123 (read_cutu_die_from_dwo): Likewise.
9124 (init_cutu_and_read_dies): Likewise.
9125 (init_cutu_and_read_dies_no_follow): Likewise.
9126 (process_psymtab_comp_unit_reader): Likewise.
9127 (partial_die_parent_scope): Likewise.
9128 (peek_die_abbrev): Likewise.
9129 (process_queue): Likewise.
9130 (dwarf2_physname): Likewise.
9131 (read_namespace_alias): Likewise.
9132 (read_import_statement): Likewise.
9133 (create_dwo_cu_reader): Likewise.
9134 (create_cus_hash_table): Likewise.
9135 (lookup_dwo_cutu): Likewise.
9136 (inherit_abstract_dies): Likewise.
9137 (read_func_scope): Likewise.
9138 (read_call_site_scope): Likewise.
9139 (dwarf2_add_member_fn): Likewise.
9140 (read_common_block): Likewise.
9141 (read_module_type): Likewise.
9142 (read_typedef): Likewise.
9143 (read_subrange_type): Likewise.
9144 (load_partial_dies): Likewise.
9145 (read_partial_die): Likewise.
9146 (find_partial_die): Likewise.
9147 (read_str_index): Likewise.
9148 (dwarf2_string_attr): Likewise.
9149 (build_error_marker_type): Likewise.
9150 (lookup_die_type): Likewise.
9151 (dump_die_shallow): Likewise.
9152 (follow_die_ref): Likewise.
9153 (dwarf2_fetch_die_loc_sect_off): Likewise.
9154 (dwarf2_fetch_constant_bytes): Likewise.
9155 (follow_die_sig): Likewise.
9156 (get_signatured_type): Likewise.
9157 (get_DW_AT_signature_type): Likewise.
9158 (dwarf2_find_containing_comp_unit): Likewise.
9159 (set_die_type): Likewise.
9160
8ec57239
JB
91612018-02-21 John Baldwin <jhb@FreeBSD.org>
9162
9163 * arch/aarch64.c: Include "common-defs.h".
9164 * arch/amd64.c: Likewise.
9165 * arch/i386.c: Likewise.
9166
3eac2b65
TT
91672018-02-21 Tom Tromey <tom@tromey.com>
9168
9169 * value.h: (extract_field_op): Update.
9170 * eval.c (extract_field_op): Return a const char *.
9171 * expression.h (parse_expression_for_completion): Update.
9172 * completer.c (complete_expression): Update.
9173 (add_struct_fields): Make fieldname const.
9174 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9175 (mark_completion_tag, parse_exp_in_context_1): Update.
9176 (parse_expression_for_completion): Change "name" to
9177 unique_xmalloc_ptr*.
9178
6ccb583f
TT
91792018-02-21 Tom Tromey <tom@tromey.com>
9180
9181 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9182
c113ed0c
YQ
91832018-02-21 Yao Qi <yao.qi@linaro.org>
9184
9185 * avr-tdep.c (avr_read_pc): Change parameter type to
9186 readable_regcache.
9187 * gdbarch.sh (read_pc): Likewise.
9188 * gdbarch.c: Re-generated.
9189 * gdbarch.h: Re-generated.
9190 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9191 readable_regcache.
9192 * ia64-tdep.c (ia64_read_pc): Likewise.
9193 * mips-tdep.c (mips_read_pc): Likewise.
9194 * spu-tdep.c (spu_read_pc): Likewise.
9195
4c74fe6b
YQ
91962018-02-21 Yao Qi <yao.qi@linaro.org>
9197
9198 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9199 * regcache-dump.c: New file.
9200 * regcache.c: Move register_dump to regcache-dump.c.
9201 (maintenance_print_registers): Likewise.
9202 (maintenance_print_raw_registers): Likewise.
9203 (maintenance_print_cooked_registers): Likewise.
9204 (maintenance_print_register_groups): Likewise.
9205 (maintenance_print_remote_registers): Likewise.
9206 (_initialize_regcache): Likewise.
9207 * regcache.h (register_dump): Moved from regcache.c.
9208
796bb026
YQ
92092018-02-21 Yao Qi <yao.qi@linaro.org>
9210
9211 * regcache.c (regcache::regcache): Update.
9212 (regcache::invalidate): Move it to detached_regcache::invalidate.
9213 (get_thread_arch_aspace_regcache): Update.
9214 (regcache::raw_update): Update.
9215 (regcache::cooked_read): Remove some code.
9216 (regcache::cooked_read_value): Likewise.
9217 (regcache::raw_write): Remove assert on m_readonly_p.
9218 (regcache::raw_supply_integer): Move it to
9219 detached_regcache::raw_supply_integer.
9220 (regcache::raw_supply_zeroed): Likewise.
9221 * regcache.h (detached_regcache) <raw_supply_integer>: New
9222 declaration.
9223 <raw_supply_zeroed, invalidate>: Likewise.
9224 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9225 <invalidate>: Likewise.
9226 <m_readonly_p>: Removed.
9227
215c69dc
YQ
92282018-02-21 Yao Qi <yao.qi@linaro.org>
9229
9230 * infcmd.c (get_return_value): Let stop_regs point to
9231 get_current_regcache.
9232 * regcache.c (regcache::regcache): Remove.
9233 (register_dump_reg_buffer): New class.
9234 (regcache_print): Adjust.
9235 * regcache.h (regcache): Remove constructors.
9236
f3384e66
YQ
92372018-02-21 Yao Qi <yao.qi@linaro.org>
9238
9239 * regcache.c (class register_dump): New class.
9240 (register_dump_regcache, register_dump_none): New class.
9241 (register_dump_remote, register_dump_groups): New class.
9242 (regcache_print): Update.
9243 * regcache.h (regcache_dump_what): Move it to regcache.c.
9244 (regcache) <dump>: Remove.
9245
c8ec2f33
YQ
92462018-02-21 Yao Qi <yao.qi@linaro.org>
9247
9248 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9249 reg_buffer_rw *.
9250 (jit_unwind_reg_set_impl): Call raw_supply.
9251 (jit_frame_sniffer): Use reg_buffer_rw.
9252 * record-full.c (record_full_core_regbuf): Change its type.
9253 (record_full_core_open_1): Use reg_buffer_rw.
9254 (record_full_close): Likewise.
9255 (record_full_core_fetch_registers): Use regcache->raw_supply.
9256 (record_full_core_store_registers): Likewise.
9257 * regcache.c (regcache::get_register_status): Move it to
9258 reg_buffer.
9259 (regcache_raw_set_cached_value): Remove.
9260 (regcache::raw_set_cached_value): Remove.
9261 (regcache::raw_write): Call raw_supply.
9262 (regcache::raw_supply): Move it to reg_buffer_rw.
9263 * regcache.h (regcache_raw_set_cached_value): Remove.
9264 (reg_buffer_rw): New class.
9265
daf6667d
YQ
92662018-02-21 Yao Qi <yao.qi@linaro.org>
9267
9268 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9269 readonly_detached_regcache.
9270 (dummy_frame_prev_register): Use regcache->cooked_read.
9271 * frame.c (frame_save_as_regcache): Change return type.
9272 (frame_pop): Update.
9273 * frame.h (frame_save_as_regcache): Update declaration.
9274 * inferior.h (get_infcall_suspend_state_regcache): Update
9275 declaration.
9276 * infrun.c (infcall_suspend_state) <registers>: use
9277 readonly_detached_regcache.
9278 (save_infcall_suspend_state): Don't use regcache_dup.
9279 (get_infcall_suspend_state_regcache): Change return type.
9280 * linux-fork.c (struct fork_info) <savedregs>: Change to
9281 readonly_detached_regcache.
9282 <pc>: New field.
9283 (fork_save_infrun_state): Don't use regcache_dup.
9284 (info_checkpoints_command): Adjust.
9285 * mi/mi-main.c (register_changed_p): Update declaration.
9286 (mi_cmd_data_list_changed_registers): Use
9287 readonly_detached_regcache.
9288 (register_changed_p): Change parameter type to
9289 readonly_detached_regcache.
9290 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9291 readonly_detached_regcache.
9292 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9293 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9294 New.
9295 (regcache::save): Move it to reg_buffer.
9296 (regcache::restore): Change parameter type.
9297 (regcache_dup): Remove.
9298 * regcache.h (reg_buffer) <save>: New method.
9299 (readonly_detached_regcache): New class.
9300 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9301 readonly_detached_regcache.
9302 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9303
fc5b8736
YQ
93042018-02-21 Yao Qi <yao.qi@linaro.org>
9305
9306 * frame.c (frame_save_as_regcache): Use regcache method save.
9307 (frame_pop): Use regcache method restore.
9308 * infrun.c (restore_infcall_suspend_state): Likewise.
9309 * linux-fork.c (fork_load_infrun_state): Likewise.
9310 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9311 save.
9312 * regcache.c (regcache_save): Remove.
9313 (regcache::restore): More asserts.
9314 (regcache_cpy): Remove.
9315 * regcache.h (regcache_save): Remove the declaration.
9316 (regcache::restore): Move from private to public.
9317 Remove the friend declaration of regcache_cpy.
9318 (regcache_cpy): Remove declaration.
9319
849d0ba8
YQ
93202018-02-21 Yao Qi <yao.qi@linaro.org>
9321
9322 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9323 parameter type to 'readable_regcache *'.
9324 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9325 * arm-tdep.c (arm_neon_quad_read): Likewise.
9326 (arm_pseudo_read): Likewise.
9327 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9328 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9329 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9330 * gdbarch.c: Re-generated.
9331 * gdbarch.h: Re-generated.
9332 * gdbarch.sh (pseudo_register_read): Change parameter type to
9333 'readable_regcache *'.
9334 (pseudo_register_read_value): Likewise.
9335 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9336 (h8300_pseudo_register_read): Likewise.
9337 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9338 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9339 (i386_pseudo_register_read_into_value): Likewise.
9340 (i386_pseudo_register_read_value): Likewise.
9341 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9342 declaration.
9343 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9344 * m32c-tdep.c (m32c_raw_read): Likewise.
9345 (m32c_read_flg): Likewise.
9346 (m32c_banked_register): Likewise.
9347 (m32c_banked_read): Likewise.
9348 (m32c_sb_read): Likewise.
9349 (m32c_part_read): Likewise.
9350 (m32c_cat_read): Likewise.
9351 (m32c_r3r2r1r0_read): Likewise.
9352 (m32c_pseudo_register_read): Likewise.
9353 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9354 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9355 (mep_pseudo_cr64_read): Likewise.
9356 (mep_pseudo_register_read): Likewise.
9357 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9358 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9359 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9360 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9361 (regcache::cooked_read): Likewise.
9362 (regcache::cooked_read_value): Likewise.
9363 (regcache_cooked_read_signed):
9364 (regcache::cooked_read): Likewise.
9365 * regcache.h (readable_regcache): New class.
9366 (regcache): Inherit readable_regcache. Move some methods to
9367 readable_regcache.
9368 * rl78-tdep.c (rl78_pseudo_register_read): Change
9369 parameter type to 'readable_regcache *'.
9370 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9371 (e500_pseudo_register_read): Change parameter type to
9372 'readable_regcache *'.
9373 (dfp_pseudo_register_read): Likewise.
9374 (vsx_pseudo_register_read): Likewise.
9375 (efpr_pseudo_register_read): Likewise.
9376 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9377 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9378 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9379 (sh64_pseudo_register_read): Likewise.
9380 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9381 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9382 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9383 (spu_pseudo_register_read): Likewise.
9384 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9385 (xtensa_pseudo_register_read): Likewise.
9386
31716595
YQ
93872018-02-21 Yao Qi <yao.qi@linaro.org>
9388
9389 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9390 (regcache::arch): Move it to reg_buffer::arch.
9391 (regcache::register_buffer): Likewise.
9392 (regcache::assert_regnum): Likewise.
9393 (regcache::num_raw_registers): Likewise.
9394 * regcache.h (reg_buffer): New class.
9395 (regcache): Inherit reg_buffer.
9396
7104e59b
SM
93972018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9398
9399 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9400 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9401
2d8adcbd
MM
94022018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9403
9404 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9405
b5884fa7
AH
94062018-02-19 Alan Hayward <alan.hayward@arm.com>
9407
9408 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9409 (SFILES): Remove common/*.c files.
9410 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9411 * common/common.host: Add common reference.
9412 * configure.ac: Likewise.
9413 * configure: Regenerate.
9414
fd90ace4
YQ
94152018-02-16 Yao Qi <yao.qi@linaro.org>
9416
9417 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9418 (block_initialize_namespace): Use new.
9419 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9420 (dwarf2_free_objfile): Use delete.
9421 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9422 (copy_type_recursive): Use new.
9423 * gdb_obstack.h (allocate_on_obstack): New.
9424
85046ae2
YQ
94252018-02-15 Yao Qi <yao.qi@linaro.org>
9426
9427 PR gdb/22849
9428 * inferior.c (exit_inferior_1): Reset inf->control.
9429
355c559b
JB
94302018-02-15 Joel Brobecker <brobecker@adacore.com>
9431
9432 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9433 declaration.
9434
980548fd
PA
94352018-02-14 Pedro Alves <palves@redhat.com>
9436
9437 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9438 frame_cleanup_after_sniffer on exception.
9439
692d6f97
TT
94402018-02-14 Tom Tromey <tom@tromey.com>
9441
9442 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9443 const.
9444 (solib_bfd_open): Make pathname const.
9445 * solib.c (solib_bfd_open): Make pathname const.
9446 * solib-spu.c (spu_bfd_fopen): Make name const.
9447 (spu_bfd_open): Make pathname const.
9448 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9449 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9450
e0cc99a6
TT
94512018-02-14 Tom Tromey <tom@tromey.com>
9452
9453 * symfile.c (symfile_bfd_open): Update.
9454 * source.h (openp, source_full_path_of, find_and_open_source):
9455 Change argument type to unique_xmalloc_ptr.
9456 * source.c (openp): Take a unique_xmalloc_ptr.
9457 (source_full_path_of, find_and_open_source): Likewise.
9458 (open_source_file, symtab_to_fullname): Update.
9459 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9460 unique_xmalloc_ptr.
9461 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9462 (exec_file_find): Update.
9463 * psymtab.c (psymtab_to_fullname): Update.
9464 * nto-tdep.h (nto_find_and_open_solib): Update.
9465 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9466 unique_xmalloc_ptr.
9467 * exec.c (exec_file_attach): Update.
9468 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9469 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9470
b46a8d7c
TT
94712018-02-14 Tom Tromey <tom@tromey.com>
9472
9473 * solib.c: Include source.h.
9474 * nto-tdep.c: Include source.h.
9475 * mi/mi-cmd-env.c: Include source.h.
9476 * infcmd.c: Include source.h.
9477 * exec.c: Include source.h.
9478 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9479 (add_path, directory_switch, source_path, init_source_path): Move
9480 declarations...
9481 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9482 (add_path, directory_switch, source_path, init_source_path):
9483 ...here.
9484
797bc1cb
TT
94852018-02-14 Tom Tromey <tom@tromey.com>
9486
9487 * solist.h (exec_file_find, solib_find): Return
9488 unique_xmalloc_ptr.
9489 (solib_bfd_fopen): Take a const char *.
9490 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9491 (exec_file_find, solib_find): Likewise.
9492 (solib_bfd_fopen): Do not take ownership of "pathname".
9493 (solib_bfd_open): Use unique_xmalloc_ptr.
9494 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9495 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9496 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9497 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9498
f98b2e33
JB
94992018-02-14 Joel Brobecker <brobecker@adacore.com>
9500
9501 * ada-lang.c (name_match_type_from_name): Remove reference to
9502 ada_name_for_lookup in function's documentation.
9503 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9504
24b9144d
SM
95052018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9506
9507 * defs.h (enum openp_flags): New enum.
9508 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9509 Move to enum openp_flags.
9510 (openp_flags): New enum flags.
9511 (openp): Change parameter type to openp_flags.
9512 * source.c (openp): Change parameter type to openp_flags.
9513 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9514 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9515
387cd15b
SM
95162018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9517
9518 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9519 per-command.
9520
b303c6f6
AB
95212018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9522
9523 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9524 into...
9525 (class dwarf2_queue_guard): ...the destructor of this new class.
9526 (dw2_do_instantiate_symtab): Create instance of the new class
9527 dwarf2_queue_guard, remove cleanup.
9528
9c3630e9
TT
95292018-02-09 Tom Tromey <tom@tromey.com>
9530
9531 * source.c (find_source_lines): Don't reference past the end of
9532 the vector.
9533
c4e12631
MM
95342018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9535
9536 * remote.c (remote_btrace_maybe_reopen): Change error message.
9537 * btrace.c (btrace_enable): Likewise.
9538 (parse_xml_btrace): Likewise.
9539 (parse_xml_btrace_conf): Likewise.
9540
88711fbf
MM
95412018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9542
9543 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9544 (linux_enable_pt, linux_enable_bts): Call
9545 diagnose_perf_event_open_fail.
9546
17ad2a4f
MM
95472018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9548
9549 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9550 Remove parameter and change return type. Update callers. Move it.
9551 (linux_enable_bts, linux_enable_pt): Improve error message.
9552 (linux_enable_pt): Remove zero buffer size check.
9553 (linux_enable_btrace): Improve error messages. Remove NULL return
9554 check.
9555
de6242d3
MM
95562018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9557
9558 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9559 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9560 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9561 (linux_supports_pt, linux_supports_btrace): Remove.
9562 (linux_enable_bts): Call cpu_supports_bts.
9563 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9564 * remote.c (remote_supports_btrace): Remove.
9565 (init_remote_ops): Remove remote_supports_btrace.
9566 * target-delegates.c: Regenerated.
9567 * target.c (target_supports_btrace): Remove.
9568 * target.h (target_ops) <to_supports_btrace>: Remove
9569 (target_supports_btrace): Remove.
9570 * x86-linux-nat.c (x86_linux_create_target): Remove
9571 linux_supports_btrace.
9572
9ee23a85
MM
95732018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9574
9575 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9576 btrace failed.
9577 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9578 exception and use message in own exception.
9579
5c3284c1
MM
95802018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9581
9582 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9583 (perf_event_pt_event_type): Use gdb_file_up.
9584 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9585 scoped_fd, and scoped_mmap.
9586
84696f37
MM
95872018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9588
9589 * common/scoped_mmap.h: New.
9590 * unittests/scoped_mmap-selftest.c: New.
9591 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9592 unittests/scoped_mmap-selftest.c.
9593
ea4a0888
MM
95942018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9595
9596 * common/scoped_fd.h: New.
9597 * unittests/scoped_fd-selftest.c: New.
9598 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9599 unittests/scoped_fd-selftest.c.
9600
869e8290
TT
96012018-02-09 Tom Tromey <tom@tromey.com>
9602
9603 * auto-load.c (auto_load_section_scripts): Use
9604 gdb::unique_xmalloc_ptr.
9605
a37a2ae7
TT
96062018-02-09 Tom Tromey <tom@tromey.com>
9607
9608 * auto-load.c (execute_script_contents): Use std::string.
9609
4e725347
JB
96102018-02-09 Joel Brobecker <brobecker@adacore.com>
9611
9612 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9613 Python function, rather than a new command.
9614
9a897d43
TT
96152018-02-08 Tom Tromey <tom@tromey.com>
9616
9617 * solib.c (solib_find_1): Use std::string.
9618 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9619
58ef3771
TT
96202018-02-08 Tom Tromey <tom@tromey.com>
9621
9622 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9623
a9abc434
TT
96242018-02-08 Tom Tromey <tom@tromey.com>
9625
9626 * source.c (find_source_lines): Use gdb::def_vector.
9627
84f27c6f
TT
96282018-02-08 Tom Tromey <tom@tromey.com>
9629
9630 * macrocmd.c (struct temporary_macro_definition): New.
9631 (macro_define_command): Use temporary_macro_definition. Remove
9632 cleanups.
9633 (free_macro_definition_ptr): Remove.
9634
0354904b
TT
96352018-02-08 Tom Tromey <tom@tromey.com>
9636
9637 * macroexp.c (maybe_expand): Use std::string.
9638
1739cf24
TT
96392018-02-08 Tom Tromey <tom@tromey.com>
9640
9641 * macroexp.c (struct macro_buffer): Add initializers for some
9642 members.
9643 (init_buffer, init_shared_buffer, free_buffer)
9644 (free_buffer_return_text): Remove.
9645 (macro_buffer): New constructors.
9646 (~macro_buffer): New destructor.
9647 (macro_buffer::set_shared): New method.
9648 (macro_buffer::resize_buffer, macro_buffer::appendc)
9649 (macro_buffer::appendmem): Now methods, not free functions.
9650 (set_token, append_tokens_without_splicing, stringify)
9651 (macro_stringify): Update.
9652 (gather_arguments): Change return type. Remove argc_p argument,
9653 add args_ptr argument. Use std::vector.
9654 (substitute_args): Remove argc argument. Accept std::vector.
9655 (expand): Update. Use std::vector.
9656 (scan, macro_expand, macro_expand_next): Update.
9657
f6c2623e
TT
96582018-02-08 Tom Tromey <tom@tromey.com>
9659
9660 * symtab.c (default_collect_symbol_completion_matches_break_on):
9661 Use unique_xmalloc_ptr.
9662 * macroscope.h: (sal_macro_scope, user_macro_scope)
9663 (default_macro_scope): Return unique_xmalloc_ptr.
9664 * macroscope.c (sal_macro_scope, user_macro_scope)
9665 (default_macro_scope): Return unique_xmalloc_ptr.
9666 * macroexp.h (macro_expand, macro_expand_once): Return
9667 unique_xmalloc_ptr.
9668 * macroexp.c (macro_expand, macro_expand_once): Return
9669 unique_xmalloc_ptr.
9670 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9671 (info_macro_command, info_macros_command): Use
9672 unique_xmalloc_ptr.
9673 * compile/compile-c-support.c (write_macro_definitions): Use
9674 unique_xmalloc_ptr.
9675 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9676
c2e0e465
SM
96772018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9678
9679 * value.c (value_static_field): Assign field type instead of
9680 containing type when returning an optimized out value.
9681
3f8c94b4
YQ
96822018-02-06 Yao Qi <yao.qi@linaro.org>
9683
9684 * ft32-tdep.c (ft32_read_pc): Remove.
9685 (ft32_write_pc): Remove.
9686 (ft32_gdbarch_init): Update.
9687 * m32r-tdep.c (m32r_read_pc): Remove.
9688 (m32r_gdbarch_init): Update.
9689 * mep-tdep.c (mep_read_pc): Remove.
9690 (mep_gdbarch_init): Update.
9691 * microblaze-tdep.c (microblaze_write_pc): Remove.
9692 (microblaze_gdbarch_init): Update.
9693 * mn10300-tdep.c (mn10300_read_pc): Remove.
9694 (mn10300_write_pc): Remove.
9695 (mn10300_gdbarch_init): Update.
9696 * moxie-tdep.c (moxie_read_pc): Remove.
9697 (moxie_write_pc): Remove.
9698 (moxie_gdbarch_init): Update.
9699
bca65a23
YQ
97002018-02-06 Yao Qi <yao.qi@linaro.org>
9701
9702 * expprint.c (print_subexp_standard): Handle
9703 OP_F77_UNDETERMINED_ARGLIST.
9704 (dump_subexp_body_standard): Likewise.
9705
583e3f90 97062018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 9707
583e3f90
YQ
9708 * target-descriptions.c (tdesc_element_visitor) Add empty
9709 implementations.
b8df6ca7
AH
9710 (tdesc_type): Move make_gdb_type from here.
9711 (tdesc_type_builtin): Likewise.
9712 (tdesc_type_vector): Likewise.
9713 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9714 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9715 (make_gdb_type_union): Likewise.
9716 (make_gdb_type_flags): Likewise.
9717 (make_gdb_type_enum): Likewise.
9718 (make_gdb_type): New function.
9719 (tdesc_register_type): Use static make_gdb_type.
9720
e813d34a
RK
97212018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9722
9723 * infcmd.c (default_print_one_register_info): Align natural-format
9724 column values consistently one under another.
9725 (pad_to_column): New function.
9726
0eb876f5
JB
97272018-02-05 Joel Brobecker <brobecker@adacore.com>
9728
9729 * dwarf2read.c (dwarf2_physname): Move commment.
9730
0625771b
LS
97312018-02-01 Leszek Swirski <leszeks@google.com>
9732
9733 * varobj.c (varobj_formatted_print_options): Allow recursive
9734 pretty printing if pretty printing is enabled.
9735
59498c30
LS
97362018-02-01 Leszek Swirski <leszeks@google.com>
9737
9738 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9739 names after a structop as a filename.
9740
2d9e6acb
YQ
97412018-02-01 Yao Qi <yao.qi@linaro.org>
9742
9743 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9744 (arm_record_coproc_data_proc): Likewise.
9745
df95a9cf
YQ
97462018-02-01 Yao Qi <yao.qi@linaro.org>
9747
9748 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9749
07e5f5cf
NP
97502018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9751
9752 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9753 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9754
3045b475
PA
97552018-01-31 Pedro Alves <palves@redhat.com>
9756
9757 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9758 * inflow.c (child_terminal_save_inferior): Wrap reference to
9759 tcgetpgrp in HAVE_TERMIOS_H.
9760 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9761 _WIN32.
9762 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9763 always iterate over all inferiors.
9764 (gdbsim_cntrl_c): Adjust.
9765 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9766
929b5ad4
JB
97672018-01-31 Joel Brobecker <brobecker@adacore.com>
9768
9769 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9770 index type is objfile-owned if the element type is as well.
9771
29236ca2
JB
97722018-01-31 Joel Brobecker <brobecker@adacore.com>
9773
9774 GDB 8.1 released.
9775
c81e8879
PR
97762018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9777
9778 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9779 "features/s390x-linux64.c".
9780 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9781 s390_linux32 and s390x_linux64.
9782 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9783 default tdesc.
9784 * s390-tdep.c: Include "features/s390-linux32.c" and
9785 "features/s390x-linux64.c".
9786 (s390_tdesc_valid): Add check for tdesc_has_registers.
9787 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9788 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9789 tdesc_s390x_linux64.
9790 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9791 tdesc_s390x_linux64 to...
9792 * s390-tdep.h: ...here.
9793
e671cd59
PA
97942018-01-30 Pedro Alves <palves@redhat.com>
9795
9796 PR gdb/13211
9797 * config.in, configure: Regenerate.
9798 * configure.ac: Check for getpgid.
9799 * go32-nat.c (go32_pass_ctrlc): New.
9800 (go32_target): Install it.
9801 * inf-child.c (inf_child_target): Install
9802 child_terminal_save_inferior, child_pass_ctrlc and
9803 child_interrupt.
9804 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9805 (inf_ptrace_target): No longer install it.
9806 * infcmd.c (interrupt_target_1): Adjust.
9807 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9808 (child_interrupt): Declare.
9809 (inferior::terminal_state): New.
9810 * inflow.c (struct terminal_info): Update comments.
9811 (inferior_process_group): Delete.
9812 (terminal_is_ours): Delete.
9813 (gdb_tty_state): New.
9814 (child_terminal_init): Adjust.
9815 (is_gdb_terminal, sharing_input_terminal_1)
9816 (sharing_input_terminal): New functions.
9817 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9818 Set the process's actual process group in the foreground if
9819 possible. Handle is_ours_for_output/is_ours distinction. Don't
9820 mark terminal as the inferior's if not sharing GDB's terminal.
9821 Don't check attach_flag.
9822 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9823 pass down a target_terminal_state.
9824 (child_terminal_save_inferior): New, factored out from ...
9825 (child_terminal_ours_1): ... this. Handle
9826 target_terminal_state::is_ours_for_output.
9827 (child_interrupt, child_pass_ctrlc): New.
9828 (inflow_inferior_exit): Clear the inferior's terminal_state.
9829 (copy_terminal_info): Copy the inferior's terminal state.
9830 (_initialize_inflow): Remove reference to terminal_is_ours.
9831 * inflow.h (inferior_process_group): Delete.
9832 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9833 * procfs.c (procfs_target): Don't install procfs_interrupt.
9834 (procfs_interrupt): Delete.
9835 * remote.c (remote_serial_quit_handler): Adjust.
9836 (remote_interrupt): Remove ptid parameter. Adjust.
9837 * target-delegates.c: Regenerate.
9838 * target.c: Include "terminal.h".
9839 (target_terminal::terminal_state): Rename to ...
9840 (target_terminal::m_terminal_state): ... this.
9841 (target_terminal::init): Adjust.
9842 (target_terminal::inferior): Adjust to per-inferior
9843 terminal_state.
9844 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9845 (target_terminal::ours, target_terminal::ours_for_output): Use
9846 target_terminal_is_ours_kind.
9847 (target_interrupt): Remove ptid parameter. Adjust.
9848 (default_target_pass_ctrlc): Adjust.
9849 * target.h (target_ops::to_terminal_save_inferior): New field.
9850 (target_ops::to_interrupt): Remove ptid_t parameter.
9851 (target_interrupt): Remove ptid_t parameter. Update comment.
9852 (target_pass_ctrlc): Update comment.
9853 * target/target.h (target_terminal_state): New scoped enum,
9854 factored out of ...
9855 (target_terminal::terminal_state): ... here.
9856 (target_terminal::inferior): Update comments.
9857 (target_terminal::restore_inferior): New.
9858 (target_terminal::is_inferior, target_terminal::is_ours)
9859 (target_terminal::is_ours_for_output): Adjust.
9860 (target_terminal::scoped_restore_terminal_state): Adjust to
9861 rename, and call restore_inferior() instead of inferior().
9862 (target_terminal::scoped_restore_terminal_state::m_state): Change
9863 type.
9864 (target_terminal::terminal_state): Rename to ...
9865 (target_terminal::m_terminal_state): ... this and change type.
9866
9c3a5d93
PA
98672018-01-30 Pedro Alves <palves@redhat.com>
9868
9869 * linux-nat.c (wait_for_signal): New function.
9870 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9871 directly.
9872 (async_terminal_is_ours)
9873 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9874 (linux_nat_add_target): Don't override
9875 to_terminal_inferior/to_terminal_ours.
9876
69ab5edb
SDJ
98772018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9878
9879 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9880
fc8e7e75
SM
98812018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9882
9883 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9884 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9885 dwarf2_per_objfile_free here.
9886 (dwarf2_per_objfile_free): Remove.
9887 (_initialize_dwarf2_read): Don't register
9888 dwarf2_per_objfile_free as a registry cleanup.
9889
b2a426e2
EZ
98902018-01-27 Eli Zaretskii <eliz@gnu.org>
9891
9892 Avoid compilation errors in MinGW native builds
9893
9894 The error is triggered by including python-internal.h, and the
9895 error message is:
9896
9897 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9898 from build-gnulib/import/math.h:27,
9899 from d:/usr/Python26/include/pyport.h:235,
9900 from d:/usr/Python26/include/Python.h:58,
9901 from python/python-internal.h:94,
9902 from python/py-arch.c:24:
9903 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9904 using ::hypot;
9905 ^~~~~
9906
9907 This happens because Python headers define 'hypot' to expand t
9908 '_hypot' in the Windows builds.
9909 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9910 'hypoth'. This avoids a compilation error.
9911
0bdd8eac
AH
99122018-01-26 Alan Hayward <alan.hayward@arm.com>
9913
9914 * MAINTAINERS (Write After Approval): Fix ordering.
9915
56ae9dc3
AH
99162018-01-26 Alan Hayward <alan.hayward@arm.com>
9917
9918 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9919
7433498b
AM
99202018-01-26 Alan Modra <amodra@gmail.com>
9921
9922 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9923 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9924 Remove nop. Make const. Comment.
9925 (powerpc32_plt_stub_so_2): New.
9926 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9927 Correct count. Update uses.
9928 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9929 Move common code reading PLT entry word. Correct
9930 powerpc32_plt_stub PLT address calculation.
9931 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9932 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9933 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9934 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9935 (ppc64_standard_linkage8): Likewise.
9936 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9937 Correct insns description.
9938 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9939
0f59d5fc
PA
99402018-01-24 Pedro Alves <palves@redhat.com>
9941
9942 GCC PR libstdc++/83906
9943 * gdbtypes.c (operator==(const dynamic_prop &,
9944 const dynamic_prop &)): New.
9945 (operator==(const range_bounds &, const range_bounds &)): New.
9946 (check_types_equal): Use them instead of memcmp.
9947 * gdbtypes.h (operator==(const dynamic_prop &,
9948 const dynamic_prop &)): Declare.
9949 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9950 (operator==(const range_bounds &, const range_bounds &)): Declare.
9951 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9952
ef8914a4
PR
99532018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9954
9955 * s390-linux-tdep.c (s390_record_address_mask)
9956 (s390_record_calc_disp_common, s390_record_calc_disp)
9957 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9958 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9959 (s390_process_record): Move to s390-tdep.c.
9960 (s390_linux_init_abi_any): Adjust.
9961 * s390-tdep.c (s390_record_address_mask)
9962 (s390_record_calc_disp_common, s390_record_calc_disp)
9963 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9964 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9965 (s390_process_record): Moved from s390-linux-tdep.c
9966 (s390_gdbarch_init): Adjust.
9967
d6e58945
PR
99682018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9969
9970 * s390-linux-nat.c (s390-tdep.h): New include.
9971 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9972 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9973 (ALLDEPFILES): Add s390-tdep.c.
9974 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9975 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9976 * s390-tdep.h: ...this. New file.
9977 * s390-linux-tdep.c (s390-tdep.h): New include.
9978 (_initialize_s390_tdep): Rename to...
9979 (_initialize_s390_linux_tdep): ...this and adjust.
9980 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9981 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9982 s390-tdep.h.
9983 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9984 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9985 (s390_is_partial_instruction, s390_software_single_step)
9986 (is_non_branch_ril, s390_displaced_step_copy_insn)
9987 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9988 (s390_prologue_data, s390_addr, s390_store, s390_load)
9989 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9990 (s390_register_call_saved, s390_guess_tracepoint_registers)
9991 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9992 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9993 (s390_pseudo_register_name, s390_pseudo_register_type)
9994 (s390_pseudo_register_read, s390_pseudo_register_write)
9995 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9996 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9997 (s390_addr_bits_remove, s390_address_class_type_flags)
9998 (s390_address_class_type_flags_to_name)
9999 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10000 (s390_function_arg_float, s390_function_arg_vector)
10001 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10002 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10003 (s390_frame_align, s390_register_return_value, s390_return_value)
10004 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10005 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10006 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10007 (s390_trad_frame_prev_register, s390_unwind_cache)
10008 (s390_prologue_frame_unwind_cache)
10009 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10010 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10011 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10012 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10013 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10014 (s390_frame_base_address, s390_local_base_address)
10015 (s390_frame_base, s390_gcc_target_options)
10016 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10017 (s390_validate_reg_range, s390_tdesc_valid)
10018 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10019 * s390-tdep.c: ...this. New file.
10020
9c0b896e
PR
100212018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10022
10023 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10024 (s390_process_record, s390_gdbarch_tdep_alloc)
10025 (s390_linux_init_abi_any): Use/set new hook.
10026
7042632b
PR
100272018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10028
10029 * s390-linux-tdep.c (osabi.h): New include.
10030 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10031 (s390_linux_init_abi_any): New functions.
10032 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10033
650f5e13
PR
100342018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10035
10036 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10037 tdesc_has_registers check
10038
47c9317e
PR
100392018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10040
10041 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10042 (s390_validate_reg_range): New macro.
10043 (s390_gdbarch_init): Adjust.
10044
095085d8
PR
100452018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10046
10047 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10048 (s390_gdbarch_tdep_alloc): Adjust.
10049 (s390_gdbarch_init): Adjust.
10050
ab9bcc67
PR
100512018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10052
10053 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10054 <have_tdb>: Change type to bool.
10055 (s390_gdbarch_tdep_alloc): Adjust.
10056 (s390_gdbarch_init): Adjust.
10057
21f6f5ff
PR
100582018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10059
10060 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10061 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10062 (s390_gdbarch_tdep_alloc): New function.
10063 (s390_gdbarch_init): Allocate tdep at start and use its fields
10064 instead of separate variables.
10065
0eb97953
PR
100662018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10067
10068 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10069 when looking for cached gdbarch and add comment for remaining.
10070
5c319bb2
PA
100712018-01-22 Pedro Alves <palves@redhat.com>
10072 Sergio Durigan Junior <sergiodj@redhat.com>
10073
10074 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10075 case.
10076
d65ce302
MR
100772018-01-22 Maciej W. Rozycki <macro@mips.com>
10078
10079 * MAINTAINERS: Update my company e-mail address.
10080
ec7a5fcb
YQ
100812018-01-22 Yao Qi <yao.qi@linaro.org>
10082
10083 * regcache.c (cooked_write_test): New function.
10084 (_initialize_regcache): Register the test.
10085
11f57cb6
YQ
100862018-01-22 Yao Qi <yao.qi@linaro.org>
10087
10088 * ia64-tdep.c (ia64_pseudo_register_read): Call
10089 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10090 * m32c-tdep.c (m32c_cat_read): Likewise.
10091 (m32c_r3r2r1r0_read): Likewise.
10092 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10093 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10094
03f50fc8
YQ
100952018-01-22 Yao Qi <yao.qi@linaro.org>
10096
10097 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10098 method raw_read instead of regcache_raw_read.
10099 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10100 * arm-tdep.c (arm_neon_quad_read): Likewise.
10101 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10102 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10103 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10104 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10105 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10106 (i386_pseudo_register_read_into_value): Likewise.
10107 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10108 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10109 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10110 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10111 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10112 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10113 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10114 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10115 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10116
dc711524
YQ
101172018-01-22 Yao Qi <yao.qi@linaro.org>
10118
10119 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10120 * configure.tgt: Remove target mt.
10121 * mt-tdep.c: Remove.
10122 * regcache.c (cooked_read_test): Remove the check for mt.
10123
3f5a868b
YQ
101242018-01-22 Yao Qi <yao.qi@linaro.org>
10125
10126 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10127 instead of gdbarch_pseudo_register_read_value.
10128
de4cb04a
JB
101292018-01-22 Joel Brobecker <brobecker@adacore.com>
10130
10131 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10132 language is Ada.
10133
a9e40818
JB
101342018-01-22 Joel Brobecker <brobecker@adacore.com>
10135
10136 * linespec.c (create_sals_line_offset): Remove code that preserved
10137 the symtab_and_line's line number.
10138
e707fc44
AB
101392018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10140
10141 * varobj.c (varobj_create): Don't set valid_block when creating a
10142 floating varobj.
10143
03d0bf7b
AB
101442018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10145
10146 * varobj.c (varobj_create): Remove out of date comment.
10147
ae451627
AB
101482018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10149
10150 PR mi/20395
10151 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10152 updating innermost block.
10153 * parse.c (innermost_block_tracker::update): Take extra type
10154 parameter, and check types match before updating innermost block.
10155 (write_dollar_variable): Update innermost block for registers.
10156 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10157 (innermost_block_tracker::innermost_block_tracker): Initialise
10158 m_types member.
10159 (innermost_block_tracker::reset): Take type parameter.
10160 (innermost_block_tracker::update): Take type parameter, and pass
10161 type through as needed.
10162 (innermost_block_tracker::m_types): New member.
10163 * varobj.c (varobj_create): Pass type when reseting innermost
10164 block.
10165
aee1fcdf
AB
101662018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10167
10168 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10169 * ada-lang.c (resolve_subexp): Likewise.
10170 * breakpoint.c (set_breakpoint_condition) Likewise.
10171 (watch_command_1) Likewise.
10172 * c-exp.y (variable): Likewise.
10173 * d-exp.y (PrimaryExpression): Likewise.
10174 * f-exp.y (variable): Likewise.
10175 * go-exp.y (variable): Likewise.
10176 * m2-exp.y (variable): Likewise.
10177 * objfiles.c (objfile::~objfile): Likewise.
10178 * p-exp.y (variable): Likewise.
10179 * parse.c (innermost_block): Change type.
10180 * parser-defs.h (class innermost_block_tracker): New.
10181 (innermost_block): Change to innermost_block_tracker.
10182 * printcmd.c (display_command): Switch to innermost_block API.
10183 (do_one_display): Likewise.
10184 * rust-exp.y (do_one_display): Likewise.
10185 * symfile.c (clear_symtab_users): Likewise.
10186 * varobj.c (varobj_create): Switch to innermost_block API, replace
10187 use of innermost_block with block stored on varobj object.
10188
396af9a1
AB
101892018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10190
10191 * expression.h (innermost_block): Remove declaration.
10192 * varobj.c: Add 'parser-defs.h' include.
10193
fcfcc376
TT
101942018-01-19 Tom Tromey <tom@tromey.com>
10195
10196 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10197 symbols in the static and global blocks.
10198
5a6c3296
JC
101992018-01-19 James Clarke <jrtc27@jrtc27.com>
10200
10201 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10202 gdb_ptrace.h, and move including gdb_wait.h ...
10203 * nat/linux-ptrace.h: ... to here.
10204
bc09b0c1
SM
102052018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10206
10207 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10208 inf_ptrace_detach_success.
10209 (inf_ptrace_detach_success): Add inferior parameter, use it
10210 instead of inferior_ptid, pass it to detach_inferior.
10211 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10212 parameter.
10213 * inferior.c (detach_inferior): Add overload that takes an
10214 inferior object.
10215 * inferior.h (detach_inferior): Likewise.
10216 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10217 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10218 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10219
6e1e1966
SM
102202018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10221
10222 * target.h (struct target_ops) <to_detach>: Add inferior
10223 parameter.
10224 (target_detach): Likewise.
10225 * target.c (dispose_inferior): Pass inferior down.
10226 (target_detach): Pass inferior down. Assert that it is equal to
10227 the current inferior.
10228 * aix-thread.c (aix_thread_detach): Pass inferior down.
10229 * corefile.c (core_file_command): Pass current_inferior() down.
10230 * corelow.c (core_detach): Add inferior parameter.
10231 * darwin-nat.c (darwin_detach): Likewise.
10232 * gnu-nat.c (gnu_detach): Likewise.
10233 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10234 * infcmd.c (detach_command): Pass current_inferior() down to
10235 target_detach.
10236 * infrun.c (follow_fork_inferior): Pass parent_inf to
10237 target_detach.
10238 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10239 target_detach.
10240 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10241 * linux-thread-db.c (thread_db_detach): Likewise.
10242 * nto-procfs.c (procfs_detach): Likewise.
10243 * procfs.c (procfs_detach): Likewise.
10244 * record.c (record_detach): Likewise.
10245 * record.h (struct inferior): Forward-declare.
10246 (record_detach): Add inferior parameter.
10247 * remote-sim.c (gdbsim_detach): Likewise.
10248 * remote.c (remote_detach_1): Likewise.
10249 (remote_detach): Likewise.
10250 (extended_remote_detach): Likewise.
10251 * sol-thread.c (sol_thread_detach): Likewise.
10252 * target-debug.h (target_debug_print_inferior_p): New macro.
10253 * target-delegates.c: Re-generate.
10254 * top.c (kill_or_detach): Pass inferior down to target_detach.
10255 * windows-nat.c (windows_detach): Add inferior parameter.
10256
6bd6f3b6
SM
102572018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10258
10259 * target.h (struct target_ops) <to_detach>: Remove args
10260 parameter.
10261 (target_detach): Likewise.
10262 * target.c (dispose_inferior): Adjust.
10263 (target_detach): Remove args parameter, adjust.
10264 * aix-thread.c (aix_thread_detach): Adjust.
10265 * corefile.c (core_file_command): Adjust.
10266 * corelow.c (core_detach): Adjust.
10267 * darwin-nat.c (darwin_detach): Adjust.
10268 * gnu-nat.c (gnu_detach): Adjust.
10269 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10270 * infcmd.c (detach_command): Adjust
10271 * infrun.c (follow_fork_inferior): Adjust.
10272 (handle_vfork_child_exec_or_exit): Adjust.
10273 * linux-fork.c (linux_fork_detach): Remove args parameter.
10274 * linux-fork.h (linux_fork_detach): Likewise.
10275 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10276 * linux-thread-db.c (thread_db_detach): Likewise.
10277 * nto-procfs.c (procfs_detach): Likewise.
10278 * procfs.c (procfs_detach): Likewise.
10279 (do_detach): Remove signo parameter.
10280 * record.c (record_detach): Remove args parameter.
10281 * record.h (record_detach): Likewise.
10282 * remote-sim.c (gdbsim_detach): Likewise.
10283 * remote.c (remote_detach_1): Likewise.
10284 (remote_detach): Likewise.
10285 (extended_remote_detach): Likewise.
10286 * sol-thread.c (sol_thread_detach): Likewise.
10287 * target-delegates.c: Re-generate.
10288 * top.c (struct qt_args) <args>: Remove field.
10289 (kill_or_detach): Don't pass args.
10290 (quit_force): Don't set args.
10291 * windows-nat.c (windows_detach): Remove args parameter.
10292
88af8ea8
YQ
102932018-01-19 Yao Qi <yao.qi@linaro.org>
10294
10295 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10296 (arm_linux_init_abi): Install it.
10297
dea445b9
YQ
102982018-01-19 Yao Qi <yao.qi@linaro.org>
10299
10300 * osabi.c (gdb_osabi_names): Extend the regexp for
10301 arm-linux-gnueabihf.
10302
4a17f768
YQ
103032018-01-18 Yao Qi <yao.qi@linaro.org>
10304
10305 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10306 m_abbrevs.
10307 (abbrev_table::add_abbrev): Update.
10308 (abbrev_table::lookup_abbrev): Update.
10309
d679c21a
YQ
103102018-01-18 Yao Qi <yao.qi@linaro.org>
10311
10312 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10313
7d937cad
SDJ
103142018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10315
10316 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10317 to "std::string".
10318
9e14690d
TT
103192018-01-17 Tom Tromey <tom@tromey.com>
10320
10321 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10322
50a82047
TT
103232018-01-17 Tom Tromey <tom@tromey.com>
10324
10325 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10326 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10327 (create_array_type_with_stride): Update.
10328 * dwarf2read.c (set_die_type): Update.
10329
c89b44cd
TT
103302018-01-17 Tom Tromey <tom@tromey.com>
10331
10332 * dwarf2read.c (delayed_method_info): Remove typedef.
10333 (dwarf2_cu::method_info): Now a std::vector.
10334 (add_to_method_list): Update.
10335 (free_delayed_list): Remove.
10336 (compute_delayed_physnames): Update.
10337 (process_full_comp_unit, process_full_type_unit): Clear the method
10338 list. Remove cleanups.
10339 (psymtab_include_file_name): Add name_holder parameter. Use
10340 unique_xmalloc_ptr.
10341 (dwarf_decode_lines): Update.
10342
fcd3b13d
SM
103432018-01-17 Tom Tromey <tom@tromey.com>
10344 Simon Marchi <simon.marchi@ericsson.com>
10345
10346 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10347 (dwarf2_per_objfile::free_cached_comp_units)
10348 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10349 (init_cutu_and_read_dies_no_follow): Update.
10350 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10351 (dwarf2_cu::~dwarf2_cu): New.
10352 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10353 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10354
685af9cd
TT
103552018-01-17 Tom Tromey <tom@tromey.com>
10356 Simon Marchi <simon.marchi@ericsson.com>
10357
10358 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10359 (struct die_reader_specs) <abbrev_table>: New member.
10360 (struct abbrev_table): Add constructor.
10361 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10362 <abbrev_obstack>: Now an auto_obstack.
10363 (abbrev_table_up): New typedef.
10364 (init_cu_die_reader): Add abbrev_table parameter.
10365 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10366 Add result_dwo_abbrev_table.
10367 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10368 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10369 Update.
10370 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10371 parameter.
10372 (skip_children): Update.
10373 (abbrev_table::alloc_abbrev): Rename from
10374 abbrev_table_alloc_abbrev.
10375 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10376 (abbrev_table::lookup_abbrev): Rename from
10377 abbrev_table_lookup_abbrev.
10378 (abbrev_table_read_table): Return abbrev_table_up.
10379 (abbrev_table_free, abbrev_table_free_cleanup)
10380 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10381 (load_partial_dies): Update.
10382
5e2db402
TT
103832018-01-17 Tom Tromey <tom@tromey.com>
10384
10385 * dwarf2read.c (dwarf2_compute_name): Update comment.
10386 (read_func_scope, read_variable): Update.
10387 (new_symbol): Remove.
10388 (new_symbol_full): Rename to new_symbol.
10389
ee7f689e 103902018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
10391
10392 PR gdb/16577
10393 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10394 a warning instead of throwing an error, set section size to 0 and return
10395 NULL.
10396 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10397
4d9b86e1
SM
103982018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10399
10400 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10401 std::string.
10402 (linux_ptrace_attach_fail_reason_string): Likewise.
10403 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10404 Likewise.
10405 (linux_ptrace_attach_fail_reason_string): Likewise.
10406 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10407
a7b2d0fb
SM
104082018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10409
10410 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10411
f517c180
EA
104122018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10413
10414 PR gdb/21559
10415 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10416 checking for fs_base/gs_base fields in struct user_regs_struct.
10417 * configure: Regenerate.
10418
7045b1ca
YQ
104192018-01-17 Yao Qi <yao.qi@linaro.org>
10420
10421 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10422 function.
10423 (aarch64_linux_init_abi): Install it to gdbarch hook
10424 gcc_target_options.
10425
db422fb2
PA
104262018-01-15 Pedro Alves <palves@redhat.com>
10427
10428 * common/signals-state-save-restore.c
10429 (save_original_signals_state): Fix typos.
10430
ba643918
SDJ
104312017-01-12 Tom Tromey <tom@tromey.com>
10432 Sergio Durigan Junior <sergiodj@redhat.com>
10433
10434 * Makefile.in (install-only): Install gdb-add-index.
10435
906b4aac
JB
104362018-01-12 John Baldwin <jhb@FreeBSD.org>
10437
10438 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10439
bdf2a94a
AA
104402018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10441
10442 * infrun.c (keep_going_pass_signal): Clear step-over info when
10443 insert_breakpoints fails.
10444
71d378ae
PA
104452018-01-11 Pedro Alves <palves@redhat.com>
10446
10447 PR gdb/22583
10448 * infrun.c (resume): Rename to ...
10449 (resume_1): ... this.
10450 (resume): Reimplement as wrapper around resume_1.
10451
3cada740
PA
104522018-01-11 Pedro Alves <palves@redhat.com>
10453
10454 PR remote/22597
10455 * remote.c (remote_parse_stop_reply): Default to the last-set
10456 general thread instead of to 'magic_null_ptid'.
10457
618daa93
PA
104582018-01-10 Pedro Alves <palves@redhat.com>
10459
10460 * language.h (language_get_symbol_name_matcher): Rename ...
10461 (get_symbol_name_matcher): ... this.
10462 * language.c (language_get_symbol_name_matcher): Ditto.
10463 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10464 callers adjusted.
10465
c63d3e8d
PA
104662018-01-10 Pedro Alves <palves@redhat.com>
10467
10468 PR gdb/22670
10469 * dwarf2read.c
10470 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10471 Adjust to use language_get_symbol_name_matcher instead of
10472 language_defn::la_get_symbol_name_matcher.
10473 * language.c (language_get_symbol_name_matcher): If in Ada mode
10474 and the lookup name is a verbatim match, return Ada's matcher.
10475 * language.h (language_get_symbol_name_matcher): Adjust comment.
10476 (ada_lookup_name_info::verbatim_p):: New method.
10477
d4c2a405
PA
104782018-01-10 Pedro Alves <palves@redhat.com>
10479
10480 PR gdb/22670
10481 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10482 minsym's language is language_auto or language_cplus, pass down
10483 language_ada instead.
10484 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10485
8825213e
PA
104862018-01-10 Pedro Alves <palves@redhat.com>
10487
10488 PR gdb/22670
10489 * minsyms.c (linkage_name_str): New function.
10490 (iterate_over_minimal_symbols): Use it.
10491
2d97a5d9
JB
104922018-01-09 John Baldwin <jhb@FreeBSD.org>
10493
10494 * NEWS: Document that 'info proc' now works on FreeBSD.
10495
92fce24d
JB
104962018-01-09 John Baldwin <jhb@FreeBSD.org>
10497
10498 * configure.ac: Check for kinfo_getfile in libutil.
10499 * configure: Regenerate.
10500 * config.in: Regenerate.
10501 * fbsd-nat.c: Include "fbsd-tdep.h".
10502 (fbsd_fetch_cmdline): New.
10503 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10504 rather than calling error.
10505 (fbsd_info_proc): New.
10506 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10507 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10508 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10509
262f62f5
JB
105102018-01-09 John Baldwin <jhb@FreeBSD.org>
10511
10512 * fbsd-nat.c (struct free_deleter): Remove.
10513 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10514
b999e203
JB
105152018-01-09 John Baldwin <jhb@FreeBSD.org>
10516
10517 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10518 NULL for an empty pathname.
10519
d2176225
JB
105202018-01-09 John Baldwin <jhb@FreeBSD.org>
10521
10522 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10523 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10524 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10525 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10526 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10527 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10528 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10529 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10530 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10531 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10532 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10533 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10534 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10535 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10536 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10537
9c4ac400
ST
105382018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10539
10540 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10541 (gnu_xfer_auxv): New function.
10542 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10543 TARGET_OBJECT_AUXV.
10544
1e5ded6c
YQ
105452018-01-08 Yao Qi <yao.qi@linaro.org>
10546 Simon Marchi <simon.marchi@ericsson.com>
10547
10548 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10549 common/selftest.c.
10550 (COMMON_OBS): Remove selftest.o.
10551 * configure.ac: Append selftest-arch.c and common/selftest.c to
10552 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10553 * configure: Re-generated.
10554 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10555 GDB_SELF_TEST.
10556 (maintenance_info_selftests): Likewise.
10557
04bafb1e
XR
105582018-01-08 Xavier Roirand <roirand@adacore.com>
10559
10560 * ada-valprint.c (val_print_packed_array_elements): Use
10561 proper number of elements when printing an array indexed
10562 by an enumeration type.
10563
518817b3
SM
105642018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10565
10566 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10567 (dw2_get_file_names_reader): Adjust.
10568 (lookup_dwo_signatured_type): Adjust.
10569 (lookup_dwp_signatured_type): Adjust.
10570 (lookup_signatured_type): Adjust.
10571 (create_type_unit_group): Adjust.
10572 (get_type_unit_group): Adjust.
10573 (process_psymtab_comp_unit_reader): Adjust.
10574 (build_type_psymtabs_reader): Adjust.
10575 (scan_partial_symbols): Adjust.
10576 (add_partial_symbol): Adjust.
10577 (add_partial_subprogram): Adjust.
10578 (peek_die_abbrev): Adjust.
10579 (fixup_go_packaging): Adjust.
10580 (process_imported_unit_die): Adjust.
10581 (dwarf2_compute_name): Adjust.
10582 (dwarf2_physname): Adjust.
10583 (read_import_statement): Adjust.
10584 (handle_DW_AT_stmt_list): Adjust.
10585 (read_file_scope): Adjust.
10586 (read_func_scope): Adjust.
10587 (read_lexical_block_scope): Adjust.
10588 (read_call_site_scope): Adjust.
10589 (read_variable): Adjust.
10590 (dwarf2_rnglists_process): Adjust.
10591 (dwarf2_ranges_process): Adjust.
10592 (dwarf2_ranges_read): Adjust.
10593 (dwarf2_get_pc_bounds): Adjust.
10594 (dwarf2_record_block_ranges): Adjust.
10595 (dwarf2_add_field): Adjust.
10596 (dwarf2_add_member_fn): Adjust.
10597 (read_structure_type): Adjust.
10598 (process_structure_scope): Adjust.
10599 (read_enumeration_type): Adjust.
10600 (read_array_type): Adjust.
10601 (mark_common_block_symbol_computed): Adjust.
10602 (read_common_block): Adjust.
10603 (read_namespace_type): Adjust.
10604 (read_namespace): Adjust.
10605 (read_module_type): Adjust.
10606 (read_tag_pointer_type): Adjust.
10607 (read_tag_ptr_to_member_type): Adjust.
10608 (read_tag_string_type): Adjust.
10609 (read_subroutine_type): Adjust.
10610 (read_typedef): Adjust.
10611 (read_base_type): Adjust.
10612 (attr_to_dynamic_prop): Adjust.
10613 (read_subrange_type): Adjust.
10614 (read_unspecified_type): Adjust.
10615 (dwarf2_read_abbrevs): Adjust.
10616 (load_partial_dies): Adjust.
10617 (read_partial_die): Adjust.
10618 (find_partial_die): Adjust.
10619 (guess_partial_die_structure_name): Adjust.
10620 (fixup_partial_die): Adjust.
10621 (read_attribute_value): Adjust.
10622 (read_addr_index): Adjust.
10623 (read_addr_index_from_leb128): Adjust.
10624 (read_str_index): Adjust.
10625 (dwarf2_string_attr): Adjust.
10626 (get_debug_line_section): Adjust.
10627 (dwarf_decode_line_header): Adjust.
10628 (lnp_state_machine::check_line_address): Adjust.
10629 (dwarf_decode_lines_1): Adjust.
10630 (dwarf_decode_lines): Adjust.
10631 (dwarf2_start_symtab): Adjust.
10632 (var_decode_location): Adjust.
10633 (new_symbol_full): Adjust.
10634 (dwarf2_const_value_data): Adjust.
10635 (dwarf2_const_value_attr): Adjust.
10636 (dwarf2_const_value): Adjust.
10637 (die_type): Adjust.
10638 (die_containing_type): Adjust.
10639 (build_error_marker_type): Adjust.
10640 (lookup_die_type): Adjust.
10641 (guess_full_die_structure_name): Adjust.
10642 (anonymous_struct_prefix): Adjust.
10643 (determine_prefix): Adjust.
10644 (dwarf2_name): Adjust.
10645 (follow_die_ref_or_sig): Adjust.
10646 (follow_die_offset): Adjust.
10647 (follow_die_ref): Adjust.
10648 (follow_die_sig_1): Adjust.
10649 (follow_die_sig): Adjust.
10650 (get_signatured_type): Adjust.
10651 (get_DW_AT_signature_type): Adjust.
10652 (decode_locdesc): Adjust.
10653 (dwarf_decode_macros): Adjust.
10654 (cu_debug_loc_section): Adjust.
10655 (fill_in_loclist_baton): Adjust.
10656 (dwarf2_symbol_mark_computed): Adjust.
10657 (init_one_comp_unit): Don't assign
10658 dwarf2_cu::dwarf2_per_objfile.
10659 (set_die_type): Adjust.
10660
ed2dc618
SM
106612018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10662
10663 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10664 <dwarf2_per_objfile>: New field.
10665 (dwarf2_per_objfile): Remove global.
10666 (get_dwarf2_per_objfile): New function.
10667 (set_dwarf2_per_objfile): New function.
10668 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10669 dwarf2_per_objfile.
10670 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10671 (read_abbrev_offset): Likewise.
10672 (read_indirect_string): Likewise.
10673 (read_indirect_line_string): Likewise.
10674 (read_indirect_string_at_offset): Likewise.
10675 (read_indirect_string_from_dwz): Likewise.
10676 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10677 dwarf2_per_objfile.
10678 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10679 (create_all_comp_units): Change objfile parameter to
10680 dwarf2_per_objfile.
10681 (create_all_type_units): Likewise.
10682 (process_queue): Add dwarf2_per_objfile parameter.
10683 (read_and_check_comp_unit_head): Likewise.
10684 (lookup_dwo_unit_in_dwp): Likewise.
10685 (get_dwp_file): Likewise.
10686 (process_cu_includes): Likewise.
10687 (struct free_dwo_file_cleanup_data): New struct.
10688 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10689 set_dwarf2_per_objfile.
10690 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10691 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10692 context, adjust calls.
10693 (dw2_instantiate_symtab): Likewise.
10694 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10695 (dw2_get_cu): Likewise.
10696 (create_cu_from_index_list): Change objfile parameter to
10697 dwarf2_per_objfile.
10698 (create_cus_from_index_list): Get dwarf2_per_objfile from
10699 context, adjust calls.
10700 (create_cus_from_index): Likewise.
10701 (create_signatured_type_table_from_index): Change objfile
10702 parameter to dwarf2_per_objfile.
10703 (create_signatured_type_table_from_debug_names): Change objfile
10704 parameter to dwarf2_per_objfile.
10705 (create_addrmap_from_index): Likewise.
10706 (create_addrmap_from_aranges): Likewise.
10707 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10708 (dw2_setup): Remove.
10709 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10710 context.
10711 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10712 get_dwarf2_per_objfile.
10713 (dw2_forget_cached_source_info): Likewise.
10714 (dw2_map_symtabs_matching_filename): Likewise.
10715 (struct dw2_symtab_iterator) <index>: Remove.
10716 <dwarf2_per_objfile>: New field.
10717 (dw2_symtab_iter_init): Replace index parameter with
10718 dwarf2_per_objfile.
10719 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10720 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10721 (dw2_print_stats): Likewise.
10722 (dw2_dump): Likewise.
10723 (dw2_expand_symtabs_for_function): Likewise.
10724 (dw2_expand_all_symtabs): Likewise.
10725 (dw2_expand_symtabs_with_fullname): Likewise.
10726 (dw2_expand_marked_cus): Replace index and objfile parameters
10727 with dwarf2_per_objfile.
10728 (dw_expand_symtabs_matching_file_matcher): Add
10729 dwarf2_per_objfile parameter and adjust calls.
10730 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10731 adjust calls.
10732 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10733 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10734 adjust calls.
10735 (create_cus_from_debug_names_list): Replace objfile parameter
10736 with dwarf2_per_objfile and adjust calls.
10737 (create_cus_from_debug_names): Likewise.
10738 (dwarf2_read_debug_names): Likewise.
10739 (mapped_debug_names::namei_to_name): Adjust call.
10740 (dw2_debug_names_iterator::next): Likewise.
10741 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10742 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10743 (dw2_debug_names_dump): Likewise.
10744 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10745 (dw2_debug_names_expand_symtabs_matching): Likewise.
10746 (dwarf2_initialize_objfile): Likewise.
10747 (dwarf2_build_psymtabs): Likewise.
10748 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10749 this_cu.
10750 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10751 (read_and_check_comp_unit_head): Likewise.
10752 (read_abbrev_offset): Likewise.
10753 (create_debug_type_hash_table): Likewise.
10754 (create_debug_types_hash_table): Likewise.
10755 (create_all_type_units): Replace objfile parameter with
10756 dwarf2_per_objfile.
10757 (add_type_unit): Add dwarf2_per_objfile parameter.
10758 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10759 with dwarf2_per_objfile.
10760 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10761 (lookup_dwp_signatured_type): Likewise.
10762 (lookup_signatured_type): Likewise.
10763 (read_cutu_die_from_dwo): Likewise.
10764 (init_tu_and_read_dwo_dies): Likewise.
10765 (init_cutu_and_read_dies): Likewise.
10766 (init_cutu_and_read_dies_no_follow): Likewise.
10767 (allocate_type_unit_groups_table): Add objfile parameter.
10768 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10769 (get_type_unit_group): Likewise.
10770 (process_psymtab_comp_unit): Update call.
10771 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10772 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10773 (print_tu_stats): Likewise.
10774 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10775 in void* parameter.
10776 (build_type_psymtabs): Change objfile parameter to
10777 dwarf2_per_objfile.
10778 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10779 passed in void* parameter.
10780 (process_skeletonless_type_units): Change objfile parameter to
10781 dwarf2_per_objfile.
10782 (set_partial_user): Likewise.
10783 (dwarf2_build_psymtabs_hard): Likewise.
10784 (read_comp_units_from_section): Likewise.
10785 (create_all_comp_units): Likewise.
10786 (scan_partial_symbols): Update calls.
10787 (add_partial_symbol): Likewise.
10788 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10789 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10790 (process_queue): Add dwarf2_per_objfile parameter.
10791 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10792 (compute_compunit_symtab_includes): Likewise.
10793 (process_cu_includes): Add dwarf2_per_objfile parameter.
10794 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10795 (process_full_type_unit): Likewise.
10796 (process_imported_unit_die): Update call.
10797 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10798 (read_file_scope): Likewise.
10799 (allocate_dwo_file_hash_table): Add objfile parameter.
10800 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10801 (create_cus_hash_table): Likewise.
10802 (create_dwp_hash_table): Likewise.
10803 (create_dwo_unit_in_dwp_v1): Likewise.
10804 (create_dwp_v2_section): Likewise.
10805 (create_dwo_unit_in_dwp_v2): Likewise.
10806 (lookup_dwo_unit_in_dwp): Likewise.
10807 (try_open_dwop_file): Likewise.
10808 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10809 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10810 cleanup to include a reference to dwarf2_per_objfile.
10811 (open_dwp_file): Add dwarf2_per_objfile parameter.
10812 (open_and_init_dwp_file): Likewise.
10813 (get_dwp_file): Likewise.
10814 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10815 (queue_and_load_all_dwo_tus): Update call.
10816 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10817 data.
10818 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10819 (dwarf2_ranges_process): Likewise.
10820 (dwarf2_get_pc_bounds): Likewise.
10821 (mark_common_block_symbol_computed): Likewise.
10822 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10823 (dwarf2_read_abbrevs): Update call.
10824 (read_partial_die): Use dwarf2_per_objfile from cu.
10825 (find_partial_die): Likewise.
10826 (fixup_partial_die): Likewise.
10827 (read_attribute_value): Likewise.
10828 (read_indirect_string_at_offset_from): Add objfile parameter.
10829 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10830 parameter.
10831 (read_indirect_string_from_dwz): Add objfile parameter.
10832 (read_indirect_string): Add objfile parameter.
10833 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10834 (read_addr_index): Use dwarf2_per_objfile from cu.
10835 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10836 call dw2_setup.
10837 (read_str_index): Use dwarf2_per_objfile from cu.
10838 (get_debug_line_section): Likewise.
10839 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10840 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10841 (new_symbol_full): Use dwarf2_per_objfile from cu.
10842 (build_error_marker_type): Likewise.
10843 (lookup_die_type): Likewise.
10844 (determine_prefix): Likewise.
10845 (follow_die_offset): Likewise.
10846 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10847 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10848 (dwarf2_fetch_die_type_sect_off): Likewise.
10849 (dwarf2_get_die_type): Likewise.
10850 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10851 (get_signatured_type): Likewise.
10852 (get_DW_AT_signature_type): Likewise.
10853 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10854 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10855 (cu_debug_loc_section): Likewise.
10856 (fill_in_loclist_baton): Likewise.
10857 (dwarf2_symbol_mark_computed): Likewise.
10858 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10859 dwarf2_per_objfile.
10860 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10861 parameter.
10862 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10863 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10864 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10865 (set_die_type): Use dwarf2_free_objfile from cu.
10866 (get_die_type_at_offset): Likewise.
10867 (dwarf2_per_objfile_free): Don't assign global variable.
10868 (debug_names) <constructor>: Add dwarf2_per_objfile
10869 parameter, update m_debugstrlookup construction.
10870 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10871 parameter.
10872 <m_dwarf2_per_objfile>: New field.
10873 <lookup>: Use m_dwarf2_per_objfile.
10874 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10875 (psyms_seen_size): Likewise.
10876 (write_gdbindex): Replace objfile parameter with
10877 dwarf2_per_objfile.
10878 (write_debug_names): Likewise.
10879 (write_psymtabs_to_index): Likewise.
10880 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10881 calls.
10882
e3b94546
SM
108832018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10884
10885 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10886 <dwarf2_per_objfile>: New field.
10887 (struct dwarf2_per_cu_data) <objfile>: Remove.
10888 <dwarf2_per_objfile>: New field.
10889 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10890 of objfile.
10891 (create_signatured_type_table_from_index): Likewise.
10892 (create_debug_type_hash_table): Likewise.
10893 (fill_in_sig_entry_from_dwo_entry): Likewise.
10894 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10895 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10896 objfile.
10897 (create_partial_symtab): Access objfile through
10898 dwarf2_per_objfile.
10899 (process_psymtab_comp_unit_reader): Likewise.
10900 (read_comp_units_from_section): Likewise.
10901 (scan_partial_symbols): Likewise.
10902 (add_partial_symbol): Likewise.
10903 (add_partial_subprogram): Likewise.
10904 (peek_die_abbrev): Likewise.
10905 (fixup_go_packaging): Likewise.
10906 (process_full_comp_unit): Likewise.
10907 (process_full_type_unit): Likewise.
10908 (process_imported_unit_die): Likewise.
10909 (dwarf2_compute_name): Likewise.
10910 (dwarf2_physname): Likewise.
10911 (read_import_statement): Likewise.
10912 (create_cus_hash_table): Assign dwarf2_physname instead of
10913 objfile.
10914 (read_func_scope): Access objfile through dwarf2_per_objfile.
10915 (read_lexical_block_scope): Likewise.
10916 (read_call_site_scope): Likewise.
10917 (read_variable): Likewise.
10918 (dwarf2_rnglists_process): Likewise.
10919 (dwarf2_ranges_process): Likewise.
10920 (dwarf2_ranges_read): Likewise.
10921 (dwarf2_record_block_ranges): Likewise.
10922 (dwarf2_add_field): Likewise.
10923 (dwarf2_add_member_fn): Likewise.
10924 (read_structure_type): Likewise.
10925 (process_structure_scope): Likewise.
10926 (read_enumeration_type): Likewise.
10927 (read_array_type): Likewise.
10928 (read_common_block): Likewise.
10929 (read_namespace_type): Likewise.
10930 (read_namespace): Likewise.
10931 (read_module_type): Likewise.
10932 (read_tag_pointer_type): Likewise.
10933 (read_tag_ptr_to_member_type): Likewise.
10934 (read_tag_string_type): Likewise.
10935 (read_subroutine_type): Likewise.
10936 (read_typedef): Likewise.
10937 (read_base_type): Likewise.
10938 (attr_to_dynamic_prop): Likewise.
10939 (read_subrange_type): Likewise.
10940 (read_unspecified_type): Likewise.
10941 (load_partial_dies): Likewise.
10942 (read_partial_die): Likewise.
10943 (find_partial_die): Likewise.
10944 (guess_partial_die_structure_name): Likewise.
10945 (fixup_partial_die): Likewise.
10946 (read_attribute_value): Likewise.
10947 (read_addr_index_from_leb128): Likewise.
10948 (dwarf2_read_addr_index): Likewise.
10949 (dwarf2_string_attr): Likewise.
10950 (lnp_state_machine::check_line_address): Likewise.
10951 (dwarf_decode_lines_1): Likewise.
10952 (dwarf_decode_lines): Likewise.
10953 (dwarf2_start_symtab): Likewise.
10954 (var_decode_location): Likewise.
10955 (new_symbol_full): Likewise.
10956 (dwarf2_const_value_data): Likewise.
10957 (dwarf2_const_value_attr): Likewise.
10958 (dwarf2_const_value): Likewise.
10959 (die_type): Likewise.
10960 (die_containing_type): Likewise.
10961 (lookup_die_type): Likewise.
10962 (guess_full_die_structure_name): Likewise.
10963 (anonymous_struct_prefix): Likewise.
10964 (dwarf2_name): Likewise.
10965 (follow_die_ref_or_sig): Likewise.
10966 (follow_die_offset): Likewise.
10967 (follow_die_ref): Likewise.
10968 (dwarf2_fetch_die_loc_sect_off): Likewise.
10969 (dwarf2_fetch_constant_bytes): Likewise.
10970 (dwarf2_fetch_die_type_sect_off): Likewise.
10971 (dwarf2_get_die_type): Likewise.
10972 (follow_die_sig): Likewise.
10973 (decode_locdesc): Likewise.
10974 (dwarf2_per_cu_objfile): Likewise.
10975 (dwarf2_per_cu_text_offset): Likewise.
10976 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10977 objfile.
10978 (set_die_type): Access objfile through
10979 dwarf2_per_objfile.
10980
b01ba14d
SM
109812018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10982
10983 * valprint.c (converted_character_d): Remove typedef.
10984 (DEF_VEC_O (converted_character_d)): Remove.
10985 (count_next_character): Use std::vector.
10986 (print_converted_chars_to_obstack): Likewise.
10987 (generic_printstr): Likewise.
10988
4d0fdd9b
SM
109892018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10990
10991 * xml-support.h (struct gdb_xml_value): Add constructor.
10992 <value>: Change type to unique_xmalloc_ptr.
10993 (gdb_xml_value_s): Remove typedef.
10994 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10995 (gdb_xml_element_start_handler): Change parameter type to
10996 std::vector.
10997 (xml_find_attribute): Likewise.
10998 * xml-support.c (xml_find_attribute): Change parameter type to
10999 std::vector and adjust.
11000 (gdb_xml_values_cleanup): Remove.
11001 (gdb_xml_parser::start_element): Adjust to std::vector.
11002 (xinclude_start_include): Change paraeter type to std::vector
11003 and adjust.
11004 * btrace.c (check_xml_btrace_version): Likewise.
11005 (parse_xml_btrace_block): Likewise.
11006 (parse_xml_btrace_pt_config_cpu): Likewise.
11007 (parse_xml_btrace_pt): Likewise.
11008 (parse_xml_btrace_conf_bts): Likewise.
11009 (parse_xml_btrace_conf_pt): Likewise.
11010 * memory-map.c (memory_map_start_memory): Likewise.
11011 (memory_map_start_property): Likewise.
11012 * osdata.c (osdata_start_osdata): Likewise.
11013 (osdata_start_item): Likewise.
11014 (osdata_start_column): Likewise.
11015 * remote.c (start_thread): Likewise.
11016 * solib-aix.c (library_list_start_library): Likewise.
11017 (library_list_start_list): Likewise.
11018 * solib-svr4.c (library_list_start_library): Likewise.
11019 (svr4_library_list_start_list): Likewise.
11020 * solib-target.c (library_list_start_segment): Likewise.
11021 (library_list_start_section): Likewise.
11022 (library_list_start_library): Likewise.
11023 (library_list_start_list): Likewise.
11024 * tracepoint.c (traceframe_info_start_memory): Likewise.
11025 (traceframe_info_start_tvar): Likewise.
11026 * xml-syscall.c (syscall_start_syscall): Likewise.
11027 * xml-tdesc.c (tdesc_start_target): Likewise.
11028 (tdesc_start_feature): Likewise.
11029 (tdesc_start_reg): Likewise.
11030 (tdesc_start_union): Likewise.
11031 (tdesc_start_struct): Likewise.
11032 (tdesc_start_flags): Likewise.
11033 (tdesc_start_enum): Likewise.
11034 (tdesc_start_field): Likewise.
11035 (tdesc_start_enum_value): Likewise.
11036 (tdesc_start_vector): Likewise.
11037
f979c73f
SM
110382018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11039
11040 * extension.h (struct xmethod_worker) <clone>: Remove.
11041 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11042 Remove.
11043 (python_xmethod_worker::clone): Remove.
11044 * valops.c (find_overload_match): Use std::move instead of
11045 clone.
11046
ba18742c
SM
110472018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11048
11049 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11050 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11051 <free_xmethod_worker_data>: Remove.
11052 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11053 <get_xmethod_arg_types>: Remove.
11054 <get_xmethod_result_type>: Remove.
11055 <invoke_xmethod>: Remove.
11056 * extension.c (new_xmethod_worker): Remove.
11057 (clone_xmethod_worker): Remove.
11058 (get_matching_xmethod_workers): Return void, pass std::vector by
11059 pointer.
11060 (get_xmethod_arg_types): Rename to...
11061 (xmethod_worker::get_arg_types): ... this, and adjust.
11062 (get_xmethod_result_type): Rename to...
11063 (xmethod_worker::get_result_type): ... this, and adjust.
11064 (invoke_xmethod): Remove.
11065 (free_xmethod_worker): Remove.
11066 (free_xmethod_worker_vec): Remove.
11067 * extension.h (enum ext_lang_rc): Move here from
11068 extension-priv.h.
11069 (struct xmethod_worker): Add constructor and destructor.
11070 <data>: Remove.
11071 <value>: Remove.
11072 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11073 virtual pure methods.
11074 <get_arg_types, get_result_type>: New methods.
11075 (xmethod_worker_ptr): Remove typedef.
11076 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11077 (xmethod_worker_vec): Remove typedef.
11078 (xmethod_worker_up): New typedef.
11079 (invoke_xmethod): Remove.
11080 (clone_xmethod_worker): Remove.
11081 (free_xmethod_worker): Remove.
11082 (free_xmethod_worker_vec): Remove.
11083 (get_xmethod_arg_types): Remove.
11084 (get_xmethod_result_type): Remove.
11085 * valops.c (find_method_list): Use std::vector, don't use
11086 intermediate vector.
11087 (value_find_oload_method_list): Use std::vector.
11088 (find_overload_match): Use std::vector.
11089 (find_oload_champ): Use std::vector.
11090 * value.c (value_free): Use operator delete.
11091 (value_of_xmethod): Rename to...
11092 (value_from_xmethod): ... this. Don't assign
11093 xmethod_worker::value, take rvalue-reference.
11094 (result_type_of_xmethod): Adjust.
11095 (call_xmethod): Adjust.
11096 * value.h: Include extension.h.
11097 (struct xmethod_worker): Don't forward-declare.
11098 (value_of_xmethod): Rename to...
11099 (value_from_xmethod): ... this, take rvalue-reference.
11100 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11101 (struct python_xmethod_worker): ... this, add constructor and
11102 destructor.
11103 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11104 (gdbpy_free_xmethod_worker_data): Rename to...
11105 (python_xmethod_worker::~python_xmethod_worker): ... this and
11106 adjust.
11107 (gdbpy_clone_xmethod_worker_data): Rename to...
11108 (python_xmethod_worker::clone): ... this and adjust.
11109 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11110 temporary vector.
11111 (gdbpy_get_xmethod_arg_types): Rename to...
11112 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11113 (gdbpy_get_xmethod_result_type): Rename to...
11114 (python_xmethod_worker::do_get_result_type): ... this and
11115 adjust.
11116 (gdbpy_invoke_xmethod): Rename to...
11117 (python_xmethod_worker::invoke): ... this and adjust.
11118 (new_python_xmethod_worker): Rename to...
11119 (python_xmethod_worker::python_xmethod_worker): ... this and
11120 adjust.
11121 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11122 Remove.
11123 (gdbpy_free_xmethod_worker_data): Remove.
11124 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11125 (gdbpy_get_xmethod_arg_types): Remove.
11126 (gdbpy_get_xmethod_result_type): Remove.
11127 (gdbpy_invoke_xmethod): Remove.
11128 * python/python.c (python_extension_ops): Remove obsolete
11129 callbacks.
11130
e379cee6
PA
111312018-01-05 Pedro Alves <palves@redhat.com>
11132
11133 PR gdb/18653
11134 * common/signals-state-save-restore.c
11135 (save_original_signals_state): New parameter 'quiet'. Warn if we
11136 find a custom handler preinstalled, instead of internal erroring.
11137 But only warn if !quiet.
11138 * common/signals-state-save-restore.h
11139 (save_original_signals_state): New parameter 'quiet'.
11140 * main.c (captured_main_1): Move save_original_signals_state call
11141 after option handling, and pass QUIET.
11142
a655456c
PA
111432018-01-05 Pedro Alves <palves@redhat.com>
11144
11145 * spu-tdep.c (spu_catch_start): Pass
11146 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11147
de63c46b
PA
111482018-01-05 Pedro Alves <palves@redhat.com>
11149
11150 PR gdb/22670
11151 * ada-lang.c (literal_symbol_name_matcher): New function.
11152 (ada_get_symbol_name_matcher): Use it for
11153 symbol_name_match_type::SEARCH_NAME.
11154 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11155 it down instead of assuming symbol_name_match_type::FULL.
11156 * block.h (block_lookup_symbol): New parameter 'match_type'.
11157 * c-valprint.c (print_unpacked_pointer): Use
11158 lookup_symbol_search_name instead of lookup_symbol.
11159 * compile/compile-object-load.c (get_out_value_type): Pass down
11160 symbol_name_match_type::SEARCH_NAME.
11161 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11162 symbol_name_match_type::FULL.
11163 * cp-support.c (cp_get_symbol_name_matcher): Handle
11164 symbol_name_match_type::SEARCH_NAME.
11165 * infrun.c (insert_exception_resume_breakpoint): Use
11166 lookup_symbol_search_name.
11167 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11168 * psymtab.c (maintenance_check_psymtabs): Use
11169 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11170 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11171 SYMBOL_SEARCH_NAME.
11172 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11173 if symbol_name_match_type::SEARCH_NAME.
11174 (lookup_symbol_in_language): Pass down
11175 symbol_name_match_type::FULL.
11176 (lookup_symbol_search_name): New.
11177 (lookup_language_this): Pass down
11178 symbol_name_match_type::SEARCH_NAME.
11179 (lookup_symbol_aux, lookup_local_symbol): New parameter
11180 'match_type'. Pass it down.
11181 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11182 (lookup_symbol_search_name): New declaration.
11183 (lookup_symbol_in_block): New 'match_type' parameter.
11184
f98fc17b
PA
111852018-01-05 Pedro Alves <palves@redhat.com>
11186
11187 PR gdb/22670
11188 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11189 ada_lookup_symbol.
11190 (ada_lookup_symbol): Reimplement in terms of
11191 ada_lookup_symbol_list, bits factored out from
11192 ada_lookup_encoded_symbol.
11193
342f8240
JB
111942018-01-05 Joel Brobecker <brobecker@adacore.com>
11195
11196 * ada-exp.y (write_object_renaming): When subscripting an array
11197 using a symbol as the index, pass the block in call to
11198 ada_lookup_encoded_symbol when looking that symbol up.
11199
7150d33c
JG
112002018-01-05 Jerome Guitton <guitton@adacore.com>
11201
11202 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11203 TYPE_INDEX_TYPE.
11204
cc0e770c
JB
112052018-01-05 Joel Brobecker <brobecker@adacore.com>
11206
11207 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11208 the case where VALUE_LVAL (val0) is not lval_memory.
11209
f79da888 112102018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
11211
11212 * ada-valprint.c (print_optional_low_bound): Handle
11213 character-indexed array printing like boolean-indexed array
11214 printing.
11215
cd385f94
JB
112162018-01-05 Joel Brobecker <brobecker@adacore.com>
11217
11218 * NEWS: Create a new section for the next release branch.
11219 Rename the section of the current branch, now that it has
11220 been cut.
11221
09aca949
JB
112222018-01-05 Joel Brobecker <brobecker@adacore.com>
11223
11224 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11225 * version.in: Bump version to 8.1.50.DATE-git.
11226
9f757bf7
XR
112272018-01-03 Xavier Roirand <roirand@adacore.com>
11228
11229 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11230 Add field.
11231 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11232 Add field.
11233 (default_exception_support_info) <catch_handlers_sym>: Add field.
11234 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11235 (ada_exception_name_addr_1): Add "catch handlers" handling.
11236 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11237 Update all callers.
11238 (create_excep_cond_exprs) <ex>: Add parameter.
11239 (re_set_exception): Update create_excep_cond_exprs call.
11240 (print_it_exception, print_one_exception, print_mention_exception)
11241 (print_recreate_exception): Add "catch handler" handling.
11242 (allocate_location_catch_handlers, re_set_catch_handlers)
11243 (check_status_catch_handlers, print_it_catch_handlers)
11244 (print_one_catch_handlers, print_mention_catch_handlers)
11245 (print_recreate_catch_handlers): New function.
11246 (catch_handlers_breakpoint_ops): New variable.
11247 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11248 Add parameter. Add "catch handler" handling.
11249 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11250 Add "catch handler" handling.
11251 (ada_exception_catchpoint_cond_string): Add "catch handler"
11252 handling.
11253 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11254 call.
11255 (catch_ada_handlers_command): New function.
11256 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11257 operations structure.
11258 (_initialize_ada_language): Add "catch handlers" command entry.
11259 * NEWS: Document "catch handlers" feature.
11260
9fe561ab
JB
112612018-01-02 Joel Brobecker <brobecker@adacore.com>
11262
11263 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11264 account when creating the array type of the slice.
11265 (ada_value_slice): Likewise.
11266
a405673c
JB
112672018-01-02 Joel Brobecker <brobecker@adacore.com>
11268
11269 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11270 New enum value.
11271 (create_array_type_with_stride): Add byte_stride_prop parameter.
11272 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11273 New parameter. Update all callers in this file.
11274 (array_type_has_dynamic_stride): New function.
11275 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11276 of arrays with dynamic byte strides.
11277 * dwarf2read.c (read_array_type): Add support for dynamic
11278 DW_AT_byte_stride attributes.
11279
74a2f8ff
JB
112802018-01-02 Joel Brobecker <brobecker@adacore.com>
11281
11282 * dwarf2read.c (read_unspecified_type): Treat
11283 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11284
e2882c85
JB
112852018-01-01 Joel Brobecker <brobecker@adacore.com>
11286
11287 Update copyright year range in all GDB files.
11288
1690bb24
JB
112892018-01-01 Joel Brobecker <brobecker@adacore.com>
11290
11291 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11292 and gdb/testsuite/gdb.base/step-line.c.
11293
0f0c98a8
JB
112942018-01-01 Joel Brobecker <brobecker@adacore.com>
11295
11296 * copyright.py (main): Dump the contents of
11297 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11298 even if BY_HAND is empty.
11299
82e1e79a
JB
113002018-01-01 Joel Brobecker <brobecker@adacore.com>
11301
11302 * top.c (print_gdb_version): Update Copyright year in version
11303 message.
11304
053f54e5 113052018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 11306
053f54e5 11307 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 11308
053f54e5 11309For older changes see ChangeLog-2017.
c906108c
SS
11310\f
11311Local Variables:
11312mode: change-log
11313left-margin: 8
11314fill-column: 74
11315version-control: never
57da7796 11316coding: utf-8
c906108c 11317End:
This page took 3.032181 seconds and 4 git commands to generate.