gdb/python: Use copy-initialization more when possible
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
d98fc15b
PA
12018-08-24 Pedro Alves <palves@redhat.com>
2
3 * python/py-bpevent.c (create_breakpoint_event_object): Use
4 copy-initialization.
5 * python/py-continueevent.c (emit_continue_event): Use
6 copy-initialization.
7 * python/py-exitedevent.c (create_exited_event_object): Return a
8 gdbpy_ref<>.
9 (emit_exited_event): Use copy-initialization.
10 * python/py-inferior.c (python_new_inferior)
11 (python_inferior_deleted, add_thread_object): Use
12 copy-initialization.
13 * python/py-infevents.c (create_inferior_call_event_object)
14 (create_register_changed_event_object)
15 (create_memory_changed_event_object): Return a gdbpy_ref<>.
16 (emit_inferior_call_event, emit_memory_changed_event)
17 (emit_register_changed_event): Use copy-initialization.
18 * python/py-newobjfileevent.c (create_new_objfile_event_object):
19 Return a gdbpy_ref<>.
20 (emit_new_objfile_event): Use copy-initialization.
21 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
22 (emit_clear_objfiles_event): Use copy-initialization.
23 * python/py-signalevent.c (create_signal_event_object): Use
24 copy-initialization.
25 * python/py-threadevent.c (create_thread_event_object): Use
26 copy-initialization.
27
da3c8738
PA
282018-08-24 Pedro Alves <palves@redhat.com>
29 Simon Marchi <simon.marchi@ericsson.com>
30
31 PR gdb/23379
32 * python/py-continueevent.c: Include "gdbthread.h".
33 (create_continue_event_object): Add intro comment. Add 'ptid'
34 parameter. Use it to find thread to pass to
35 create_thread_event_object.
36 (emit_continue_event): Pass PTID down to
37 create_continue_event_object.
38 * python/py-event.h (py_get_event_thread): Declare.
39 (create_thread_event_object): Remove default from 'thread'
40 parameter.
41 * python/py-stopevent.c (create_stop_event_object): Use
42 py_get_event_thread.
43 * python/py-threadevent.c (get_event_thread): Rename to ...
44 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
45 and use it to find the thread.
46 (create_thread_event_object): Assert that THREAD isn't null.
47 Don't find the event thread here.
48
26457a9c
KB
492018-08-23 Kevin Buettner <kevinb@redhat.com>
50
51 * block.h (blockrange, blockranges): New struct declarations.
52 (struct block): Add new field named `ranges'.
53 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
54 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
55 macros for accessing ranges in struct block.
56 (make_blockranges): New declaration.
57 block.c (make_blockranges): New function.
2d5f09ec
KB
58 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
59 for block.
fc811edd
KB
60 * symtab.h (find_pc_partial_function): Add new parameter `block'.
61 * blockframe.c (cache_pc_function_block): New static global.
62 (clear_pc_function_cache): Clear cache_pc_function_block.
63 (find_pc_partial_function): Move comment to symtab.h. Add
64 support for non-contiguous blocks.
e9480230
KB
65 * cli/cli-cmds.c (block.h): Include.
66 (print_disassembly): Handle printing of non-contiguous blocks.
67 (disassemble_current_function): Likewise.
68 (disassemble_command): Likewise.
26457a9c 69
2b1ffcfd
KB
70 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
71 BLOCK_START.
72 * blockframe.c (get_pc_function_start): Likewise.
73 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
74 (gcc_symbol_address): Likewise.
75 * compile/compile-object-run.c (compile_object_run): Likewise.
76 * compile/compile.c (get_expr_block_and_pc): Likewise.
77 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
78 (func_addr_to_tail_call_list): Likewise.
79 * findvar.c (default_read_var_value): Likewise.
80 * inline-frame.c (inline_frame_this_id): Likewise.
81 (skip-inline_frames): Likewise.
82 * infcmd.c (until_next_command): Likewise.
83 * linespec.c (convert_linespec_to_sals): Likewise.
84 * parse.c (parse_exp_in_context_1): Likewise.
85 * printcmd.c (build_address_symbolic): likewise.
86 (info_address_command): Likewise.
87 symtab.c (find_function_start_sal): Likewise.
88 (skip_prologue_sal): Likewise.
89 (find_function_alias_target): Likewise.
90 (find_gnu_ifunc): Likewise.
91 * stack.c (find_frame_funname): Likewise.
92 * symtab.c (fixup_symbol_section): Likewise.
93 (find_function_start_sal): Likewise.
94 (skip_prologue_sal): Likewsie.
95 (find_function_alias_target): Likewise.
96 (find_gnu_ifunc): Likewise.
97 * tracepoint.c (info_scope_command): Likewise.
98 * value.c (value_fn_field): Likewise.
99
9644dc3a
KB
100 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
101 in place of find_pc_partial_function.
102 * blockframe.c (find_function_entry_range_from_pc): New function.
103 * symtab.h (find_function_entry_range_from_pc): Declare and document.
104 * objfiles.c (objfile_relocate1): Relocate start and end addresses
105 for each range in a block.
106
107
12a0d0f6
XR
1082018-08-23 Xavier Roirand <roirand@adacore.com>
109
110 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
111 incrementation.
112
d1012b8e
SM
1132018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
114
115 * solib-svr4.c (read_program_headers_from_bfd): Return
116 gdb::optional<gdb::byte_vector>.
117 (svr4_exec_displacement): Adjust.
118
17658d46
SM
1192018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
120
121 * solib-svr4.c (read_program_header): Return
122 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
123 (find_program_interpreter): Return
124 gdb::optional<gdb::byte_vector>.
125 (scan_dyntag_auxv): Adjust.
126 (enable_break): Adjust.
127 (svr4_exec_displacement): Adjust.
128
ae739fe7
SM
1292018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
130
131 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
132 * inf-child.c (inf_child_target::terminal_save_inferior): New.
133
467dc1e2
SM
1342018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
135
136 * guile/scm-string.c (gdbscm_scm_from_printf): Use
137 string_vprintf.
138 * guile/scm-utils.c (gdbscm_printf): Likewise.
139 * serial.c (serial_printf): Likewise.
140 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
141
6d52907e
JV
1422018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
143
144 * stack.c (print_frame): Print frame architecture when printing on
145 an MI output.
146 * NEWS: Mention new "arch" attribute in frame output.
147
9758a8f8
AH
1482018-08-21 Alan Hayward <alan.hayward@arm.com>
149
150 * arch/aarch64.h (aarch64_regnum): Update comment.
151
1461bdac
AH
1522018-08-21 Alan Hayward <alan.hayward@arm.com>
153
154 * NEWS: Add SVE to 8.2 section.
155
4895f384
PA
1562018-08-21 Pedro Alves <palves@redhat.com>
157
158 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
159 out from gdbscm_parse_function_args.
160 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
161 gdbscm_parse_function_args_1.
162
a4497d2f
SM
1632018-08-21 Simon Marchi <simon.marchi@ericsson.com>
164
165 PR gdb/17816
166 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
167 operator.
168
c44deb73
SM
1692018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
170
171 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
172
be2d111a
MS
1732018-08-19 Michael Spang <spang@google.com>
174
175 PR gdb/11786
176 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
177 for PT_TLS segments.
178
a6b786da
KB
1792018-08-18 Kevin Buettner <kevinb@redhat.com>
180
181 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
182 dwarf_variable_value.
183 * dwarf2-frame.c (class dwarf_expr_executor):
184 Add override for dwarf_variable_value.
185 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
186 (class symbol_needs_eval_context): Likewise.
187 (indirect_synthetic_pointer): Add forward declaration.
188 (sect_variable_value): New function.
189 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
190 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
191 for DW_OP_GNU_variable_value.
192
89fbedf3
TT
1932018-08-16 Tom Tromey <tom@tromey.com>
194
195 * top.c (read_command_file): Update.
196 (command_line_input): Remove "repeat" argument.
197 * ada-lang.c (get_selections): Update.
198 * linespec.c (decode_line_2): Update.
199 * defs.h (command_line_input): Remove argument.
200 * cli/cli-script.c (read_next_line): Update.
201 * python/py-gdb-readline.c: Update.
202
12582533
TT
2032018-08-17 Tom Tromey <tom@tromey.com>
204
205 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
206 command_line_input.
207
49514353
TT
2082018-08-15 Tom Tromey <tom@tromey.com>
209
210 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
211
26fb3983
JV
2122018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
213
214 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
215 If used, use find_pc_partial_function to find address range
216 to disassemble.
217 * mi/mi-main.c (mi_cmd_list_features): Report
218 "data-disassemble-a-option" feature.
219 * NEWS: Mention new -data-disassemble option -a.
220
a97b53dd
TT
2212018-08-13 Tom Tromey <tom@tromey.com>
222
223 * common/common-defs.h (_FORTIFY_SOURCE): Define.
224
0c76e06d
AH
2252018-08-13 Alan Hayward <alan.hayward@arm.com>
226
227 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
228 (aarch64_linux_collect_sve_regset): Likewise.
229 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
230 * regcache.h (regcache_map_entry_size): New function.
231
b7fd65b9
AH
2322018-08-13 Alan Hayward <alan.hayward@arm.com>
233
234 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
235 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
236 (SVE_HEADER_VL_LENGTH): Likewise.
237 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
238 (SVE_HEADER_FLAGS_LENGTH): Likewise.
239 (SVE_HEADER_RESERVED_LENGTH): Likewise.
240 (SVE_HEADER_SIZE_OFFSET): Likewise.
241 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
242 (SVE_HEADER_VL_OFFSET): Likewise.
243 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
244 (SVE_HEADER_FLAGS_OFFSET): Likewise.
245 (SVE_HEADER_RESERVED_OFFSET): Likewise.
246 (SVE_HEADER_SIZE): Likewise.
247 (aarch64_linux_core_read_vq): Add function.
248 (aarch64_linux_core_read_description): Check for SVE section.
249
a616bb94
AH
2502018-08-13 Alan Hayward <alan.hayward@arm.com>
251
252 * aarch64-fbsd-tdep.c
253 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
254 collect_size.
255 * aarch64-linux-tdep.c
256 (aarch64_linux_iterate_over_regset_sections): Likewise.
257 * alpha-linux-tdep.c
258 (alpha_linux_iterate_over_regset_sections):
259 * alpha-nbsd-tdep.c
260 (alphanbsd_iterate_over_regset_sections): Likewise.
261 * amd64-fbsd-tdep.c
262 (amd64fbsd_iterate_over_regset_sections): Likewise.
263 * amd64-linux-tdep.c
264 (amd64_linux_iterate_over_regset_sections): Likewise.
265 * arm-bsd-tdep.c
266 (armbsd_iterate_over_regset_sections): Likewise.
267 * arm-fbsd-tdep.c
268 (arm_fbsd_iterate_over_regset_sections): Likewise.
269 * arm-linux-tdep.c
270 (arm_linux_iterate_over_regset_sections): Likewise.
271 * corelow.c (get_core_registers_cb): Likewise.
272 (core_target::fetch_registers): Likewise.
273 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
274 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
275 * gdbarch.h (void): Regenerate.
276 * gdbarch.sh: Add supply_size and collect_size.
277 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
278 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
279 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
280 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
281 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
282 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
283 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
284 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
285 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
286 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
287 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
288 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
289 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
290 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
291 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
292 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
293 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
294 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
295 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
296 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
297 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
298 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
299 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
300 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
301 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
302 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
303 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
304 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
305 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
306 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
307
a9925d4f
SM
3082018-08-10 Simon Marchi <simon.marchi@ericsson.com>
309
310 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
311 with string_printf.
312
ad3a68e9
KS
3132018-08-10 Keith Seitz <keiths@redhat.com>
314
315 * compile/compile-c-support.c (add_code_header, add_code_footer):
316 Move into policy class.
317 (c_push_user_expression, pop_user_expression_nop)
318 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
319 (compile_program): New host class.
320 (c_compile_program): New typedef.
321 (c_compute_porgram): Use c_compile_program.
322
0cfbf430
KS
3232018-08-10 Keith Seitz <keiths@redhat.com>
324
325 * compile/compile-internal.h (compile_instance::~compile_instance):
326 Remove calls to htab_delete.
327 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
328 * compile.c (compile_instance::compile_instance): Initialize
329 htab unique pointers.
330 (compile_instance::get_cached_type, compile_instance::insert_type)
331 (compile_instance::error_symbol_once): Update for unique_ptr.
332
946d3d10
KS
3332018-08-10 Keith Seitz <keiths@redhat.com>
334
335 * compile/compile-c-symbols.c (struct symbol_error)
336 (hash_symbol_error, eq_symbol_error, del_symbol_error)
337 (compile_instance::insert_symbol_error)
338 (compile_instance::error_symbol_once): Move to ...
339 * compile/compile.c: ... here.
340
9cdfd9a2
KS
3412018-08-10 Keith Seitz <keiths@redhat.com>
342
343 * compile/compile-c-support.c (c_get_compile_context): Use `new'
344 instead of `new_compile_instance'.
345 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
346 Update description.
347 If the symbol error map is not initialized, create it.
348 (generate_c_for_for_one_symbol): Do not check/initialize
349 the symbol error map.
350 * compile/compile-c-types.c (compile_c_instance): Make a class.
351 Update all callers.
352 (compile_instance::compile_instance): Initialize the type cache.
353 (get_cached_type): New function.
354 (insert_type): Update description.
355 (compile_c_instance::m_default_cflags): Define.
356 (convert_type): Update description. Use get_cached_type.
357 (delete_instance): Moved to destructor.
358 (new_compile_instance): Moved to constructor.
359 * compile/compile-c.h (compile_c_instance): Make class inheriting
360 from compile_instance.
361 <base>: Remove field.
362 <type_map, symbol_err_map>: Move to base class.
363 <c_plugin>: Rename to `m_plugin' and remove pointer type.
364 * compile/compile-internal.h (compile_instance): Make class.
365 <type_map_t, symbol_err_map_t>: Define.
366 <fe>: Rename to `m_gcc_fe'.
367 <scope, block, gcc_target_options>: Add `m_' prefix.
368 <m_type_map, m_symbol_err_map>: New fields, moved from
369 compile_c_instance.
370 <destroy>: Remove.
371 (convert_type, new_compile_instance): Remove.
372 * compile/compile.c (cleanup_compile_instance): Remove.
373 (compile_to_object): Use unique_ptr to eliminate cleanups.
374 (compile_instance::set_print_callback, compile_instance::version)
375 (compile_instance::set_verbose)
376 (compile_instance::set_driver_filename)
377 (compile_instance::set_triplet_regexp)
378 (compile_instance::set_arguments)
379 (compile_instance::set_source_file)
380 (compile_instance::compile): Define.
381
18cdc6d8
KS
3822018-08-10 Keith Seitz <keiths@redhat.com>
383
384 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
385 * compile/compile-c-types.c: Define GCC_METHODN macros and include
386 gcc-c-fe.def to define C plugin.
387 (delete_instance): Delete `c_plugin'.
388 (new_compile_instance): Initialize `c_plugin'.
389 * compile/compile-c.h: Include gcc_c_plugin.h.
390 (struct compile_c_instance) <c_plugin>: New member.
391 * gcc-c-plugin.h: New file.
392 Update all callers with API change.
393
b7dc48b4
KS
3942018-08-10 Keith Seitz <keiths@redhat.com>
395
396 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
397 (HFILES_NO_SRCDIR): ... to here.
398 Add compile-internal.h and compile-c.h.
399 * compile/compile-c-support.c: Include compile-c.h.
400 * compile/compile-c-symbols.c: Include compile-c.h.
401 (generate_c_for_variable_locations): Update comment.
402 * compile/compile-c-types.c: Include compile-c.h.
403 * compile/compile-c.h: New file -- moved C language declarations
404 from other files here.
405 * compile/compile-internal.h: Do not include hashtab.h or
406 common/enum-flags.h.
407 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
408 (gcc_convert_symbol, gcc_symbol_address)
409 (generate_c_for_variable_locations, c_get_mode_for_size)
410 (c_get_range_decl_name): Definitions moved to compile-c.h.
411 * compile/compile-loc2c.c: Include compile-c.h.
412
6f36b6d2
KS
4132018-08-10 Keith Seitz <keiths@redhat.com>
414
415 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
416 (c_symbol_substitution_name): ... this.
417 Update all callers.
418
bd923e51
KS
4192018-08-10 Keith Seitz <keiths@redhat.com>
420
421 * compile/compile-c-support.c (c_compute_program): Use
422 unique_xmalloc_ptr to eliminate cleanup.
423 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
424 Return a unique_xmalloc_ptr and eliminate cleanup.
425 * compile/compile-internal.h (generate_c_for_variable_locations):
426 Return unique_xmalloc_ptr and update description.
427
dbd534fe
AH
4282018-08-10 Alan Hayward <alan.hayward@arm.com>
429
430 * corelow.c (core_target::get_core_register_section): Rename
431 min_size to section_min_size.
432
90ad3654
JW
4332018-08-09 Jim Wilson <jimw@sifive.com>
434
52a187f8
JW
435 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
436 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
437 * NEWS: Mention new GNU/Linux RISC-V target.
438 * configure.host: Add riscv*-*-linux*.
439 * configure.nat: Add riscv*.
440 * configure.tgt: Add riscv*-*-linux*.
3c77f97e 441 * riscv-linux-nat.c: New file.
90ad3654
JW
442 * riscv-linux-tdep.c: New file.
443
aff4e175
AB
4442018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
445
446 * infrun.c (resume): Make static, add forward declaration.
447 (proceed): Update header comment.
448 * infrun.h (resume): Delete declaration.
449
06ab9219
TT
4502018-08-09 Tom Tromey <tom@tromey.com>
451
452 * riscv-tdep.h: Minor formatting fixes.
453
83c8d318
SM
4542018-08-09 Simon Marchi <simon.marchi@ericsson.com>
455
456 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
457 * dwarf-index-cache.c (create_dir_and_check): Likewise.
458 (test_mkdir_recursive): Likewise.
459 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
460
5ff2bbae
AB
4612018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
462
463 * valarith.c (value_subscripted_rvalue): If an array is not in
464 memory, and we don't know the upper bound, then we can't know that
465 the requested element exists or not.
466
fdbac7d8
SM
4672018-08-08 Simon Marchi <simon.marchi@ericsson.com>
468
469 * target.c (str_comma_list_concat_elem): Fix typo in comment.
470 (target_options_to_string): Add comment.
471
83202f7a
TT
4722018-08-08 Tom Tromey <tom@tromey.com>
473
474 * unittests/scoped_mmap-selftests.c: Check result of "write".
475
411baa47
JW
4762018-08-08 Jim Wilson <jimw@sifive.com>
477
5c720ed8
JW
478 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
479 (decode_register_index_short): New.
480 (decode_j_type_insn, decode_cj_type_insn): New.
481 (decode_b_type_insn, decode_cb_type_insn): New.
482 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
483 local xlen. Check xlen when decoding ambiguous compressed insns. In
484 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
485 is_c_sw_insn instead of is_sw_insn.
486 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
487 (riscv_software_single_step): New.
488 * riscv-tdep.h (riscv_software_single_step): Declare.
489
411baa47
JW
490 * riscv-tdep.c (riscv_isa_xlen): Drop static.
491 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
492
9d4a934c
AB
4932018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
494
495 PR gdb/18050:
496 * target.c (dispose_inferior): Don't dispose of inferiors that are
497 already killed.
498
ff36536c
SN
4992018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
500
501 * remote.c (remote_target::download_tracepoint): Change char* to
502 const char*.
503
09ce46f2
SM
5042018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
505
506 * target.h (target_options_to_string): Return an std::string.
507 * target.c (str_comma_list_concat_elem): Return void, use
508 std::string.
509 (do_option): Likewise.
510 (target_options_to_string): Return an std::string.
511 * linux-nat.c (linux_nat_target::wait): Adjust.
512 * target-debug.h (target_debug_print_options): Adjust.
513
9c612964
TT
5142018-08-07 Tom Tromey <tom@tromey.com>
515
516 * Makefile.in (CPPFLAGS): New variable.
517 (INTERNAL_CPPFLAGS): Use it.
518
7d11235d
SM
5192018-08-07 Simon Marchi <simon.marchi@ericsson.com>
520
521 * NEWS: Mention the index cache.
522
87d6a7aa
SM
5232018-08-07 Simon Marchi <simon.marchi@ericsson.com>
524
525 * common/pathstuff.h (get_standard_cache_dir): New.
526 * common/pathstuff.c (get_standard_cache_dir): New.
527 * build-id.h (build_id_to_string): New.
528 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
529 DEBUG_STR_SUFFIX): Move to here.
530 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
531 DEBUG_STR_SUFFIX): Move from there.
532 (write_psymtabs_to_index): Make non-static, add basename
533 parameter. Write to temporary files, rename when done.
534 (save_gdb_index_command): Adjust call to
535 write_psymtabs_to_index.
536 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
537 field.
538 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
539 (get_gdb_index_contents_from_cache): New.
540 (get_gdb_index_contents_from_cache_dwz): New.
541 (dwarf2_initialize_objfile): Read index from cache.
542 (dwarf2_build_psymtabs): Save to index.
543 * dwarf-index-cache.h: New file.
544 * dwarf-index-cache.c: New file.
545 * dwarf-index-write.h: New file.
546
8a99096f
SM
5472018-08-07 Simon Marchi <simon.marchi@ericsson.com>
548
549 * gnulib/aclocal.m4: Re-generate.
550 * gnulib/config.in: Re-generate.
551 * gnulib/configure: Re-generate.
552 * gnulib/import/Makefile.am: Re-generate.
553 * gnulib/import/Makefile.in: Re-generate.
554 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
555 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
556 * gnulib/import/m4/mkdir.m4: New file.
557 * gnulib/import/mkdir.c: New file.
558 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
559 module.
560
5c831bb1
SM
5612018-08-07 Simon Marchi <simon.marchi@ericsson.com>
562
563 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
564 * common/scoped_mmap.c: New file.
565 * common/scoped_mmap.h (destroy): New method.
566 (~scoped_mmap, reset): Use destroy.
567 (scoped_mmap): New move constructor.
568 (mmap_file): New declaration.
569 * unittests/scoped_mmap-selftests.c (test_normal,
570 test_invalid_filename, run_tests): New functions.
571 (_initialize_scoped_mmap_selftests): Register selftest.
572
4485a1c1
SM
5732018-08-07 Simon Marchi <simon.marchi@ericsson.com>
574
575 * dwarf2read.c (read_gdb_index_from_section): Rename to...
576 (read_gdb_index_from_buffer): ... this. Remove section
577 parameter, add buffer parameter.
578 (get_gdb_index_contents_ftype,
579 get_gdb_index_contents_dwz_ftype): New typedefs.
580 (dwarf2_read_gdb_index): Add callback parameters to get the
581 index contents.
582 (get_gdb_index_contents_from_section): New.
583 (dwarf2_initialize_objfile): Update call to
584 dwarf2_read_gdb_index.
585
528e1572
SM
5862018-08-07 Simon Marchi <simon.marchi@ericsson.com>
587
588 * common/filestuff.h (gdb_fopen_cloexec): New overload.
589 (gdb_open_cloexec): Likewise.
590 * nat/linux-osdata.c (command_from_pid): Use string_printf.
591 (commandline_from_pid): Likewise.
592 (linux_xfer_osdata_threads): Likewise.
593 (linux_xfer_osdata_fds): Likewise.
594 * ada-lang.c (is_package_name): Likewise.
595 * auxv.c (procfs_xfer_auxv): Likewise.
596 * breakpoint.c (print_one_breakpoint_location): Use
597 uiout::field_fmt.
598 (print_one_catch_solib): Use string_printf.
599 * coff-pe-read.c (add_pe_exported_sym): Likewise.
600 (add_pe_forwarded_sym): Likewise.
601 * dwarf2read.c (create_type_unit_group): Likewise.
602 (build_error_marker_type): Likewise.
603 * infcall.c (get_function_name): Likewise.
604 * valprint.c (print_converted_chars_to_obstack): Likewise.
605 * xtensa-tdep.c (xtensa_register_type): Likewise.
606
a7f25a84
SM
6072018-08-06 Simon Marchi <simon.marchi@ericsson.com>
608
609 * remote.c (remote_target::download_tracepoint): Fix format
610 string errors.
611
296956be
PFC
6122018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
613
614 * tracefile.c: Include common/byte-vector.h.
615 (trace_save): Change type of buf to gdb::byte_vector. Initialize
616 with trace_regblock_size if needed. Update uses of buf.
617
a04b9d62
PFC
6182018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
619
620 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
621 std::vector<unsigned char>.
622 * tracepoint.c (collection_list::collection_list): Remove
623 m_regs_mask initializer from initializer list. Resize
624 m_regs_mask using the largest remote register number.
625 (collection_list::add_remote_register): Remove size check on
626 m_regs_mask. Use at to access element.
627 (collection_list::stringify): Change type of temp_buf to
628 gdb::char_vector. Update uses of temp_buf. Resize if needed to
629 stringify the register mask. Use pack_hex_byte for the register
630 mask.
631
4277c4b8
PFC
6322018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
633
634 * tracepoint.h (class collection_list) <add_register>: Remove.
635 <add_remote_register, add_ax_registers, add_local_register>:
636 Declare.
637 <add_memrange>: Add scope parameter.
638 * tracepoint.c (encode_actions_1): Likewise.
639 (collection_list::add_register): Rename to ...
640 (collection_list::add_remote_register): ... this. Update
641 comment.
642 (collection_list::add_ax_registers, add_local_register): New
643 methods.
644 (collection_list::add_memrange): Add scope parameter. Call
645 add_local_register instead of add_register.
646 (finalize_tracepoint_aexpr): New function.
647 (collection_list::collect_symbol): Update calls to add_memrange.
648 Call add_local_register instead of add_register. Call
649 add_ax_registers. Call finalize_tracepoint_aexpr.
650 (encode_actions_1): Get remote regnos for $reg action. Call
651 add_remote_register, add_ax_registers, and add_local_register.
652 Update call to add_memrange. Call finalize_tracepoint_aexpr.
653 (validate_actionline): Call finalize_tracepoint_aexpr.
654
3df3a985
PFC
6552018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
656
657 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
658 Replace array buf with gdb::char_vector buf, of size
659 get_remote_packet_size (). Replace references to buf and
660 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
661 and xsnprintf with snprintf. Raise errors if the buffer is too
662 small.
663
aa6f3694
PFC
6642018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
665
666 * remote.c (remote_target::download_tracepoint): Fix the has_more
667 predicate in the QTDP action list iteration.
668
05abfc39
PFC
6692018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
670
671 * remote.c (remote_target::download_tracepoint): Fix indentation
672 in for block.
673
821a2682
RO
6742018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
675
676 * proc-api.c (_initialize_proc_api): Remove c, unused.
677 * procfs.c (procfs_init_inferior): Remove signals, unused.
678 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
679 unused.
680
95347337
AB
6812018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
682 Andrew Burgess <andrew.burgess@embecosm.com>
683
684 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
685 'W_STOPCODE (0)' as this could be ambiguous.
686
425699f5
SDJ
6872018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
688
689 * ser-tcp.c (net_open): Fix thinko when deciding whether to
690 disable TCP's Nagle algorithm (use "ai_protocol" instead of
691 "ai_socktype").
692
3e1d3d8c
TT
6932018-08-02 Tom Tromey <tom@tromey.com>
694
695 PR symtab/16842.
696 * dwarf2read.c (read_func_scope): Set symtab on template parameter
697 symbols.
698 (process_structure_scope): Likewise.
699
15843549
XR
7002018-08-02 Xavier Roirand <roirand@adacore.com>
701
702 PR gdb/22629:
703 * darwin-nat.c (darwin_kill_inferior): Fix handling of
704 kill inferior.
705
b5bddbbb
TT
7062018-08-02 Tom Tromey <tom@tromey.com>
707
708 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
709 (darwin_suspend_inferior, darwin_resume_inferior)
710 (darwin_decode_notify_message, darwin_resume_inferior_threads)
711 (darwin_check_new_threads): Check result of get_darwin_inferior.
712
f61cfa07
JB
7132018-07-31 Joel Brobecker <brobecker@adacore.com>
714
715 GDB 8.1.1 released.
716
5abe0f0c
JV
7172018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
718
719 * varobj.c (varobj_get_path_expr_parent): Report an error if
720 parent is a dynamic varobj.
721
472fa5ee
SM
7222018-07-31 Simon Marchi <simon.marchi@ericsson.com>
723
724 * gnulib/aclocal.m4: Re-generate.
725 * gnulib/config.in: Re-generate.
726 * gnulib/configure: Re-generate.
727 * gnulib/import/Makefile.in: Re-generate.
728 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
729 * gnulib/import/m4/onceonly.m4: Re-generate.
730
1c28969e
SM
7312018-07-31 Simon Marchi <simon.marchi@ericsson.com>
732
733 * target-descriptions.c (struct xml_test_tdesc): New.
734 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
735 (record_xml_tdesc): Update.
736 (maintenance_check_xml_descriptions): Update.
737 * target-descriptions.h (record_xml_tdesc): Update comment.
738
c8f2dc0d
AB
7392018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
740
741 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
742 checking array bounds are defined.
743
463c08d1
TT
7442018-07-30 Tom Tromey <tom@tromey.com>
745
746 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
747 irreflexivity violation.
748
dba7455e
TT
7492018-07-30 Tom Tromey <tom@tromey.com>
750
751 * cli/cli-decode.c (lookup_cmd): Remove lint code.
752 * value.c (unpack_long): Remove lint code.
753 * valops.c (value_ind): Remove lint code.
754 * valarith.c (value_x_binop, value_x_unop, value_equal)
755 (value_pos): Remove lint code.
756
37cc0cae
TV
7572018-07-28 Tom de Vries <tdevries@suse.de>
758
759 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
760 with undefined upper bound as <optimized out>.
761
129eb0f1
SDJ
7622018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
763
764 * gcore.in: Rename variable "name" to "prefix". Expand
765 "usage" text.
766
6af79d7b
JT
7672018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
768
769 * windows-nat.c (windows_nat_target::create_inferior): Update to
770 call close() in global namespace.
771
79748972
TT
7722018-07-26 Tom Tromey <tom@tromey.com>
773
774 * dwarf-index-write.c (add_address_entry): Don't add objfile
775 offsets.
776 * dbxread.c (find_stab_function): Rename from
777 find_stab_function_addr. Return a bound_minimal_symbol.
778 (read_dbx_symtab): Use raw_text_low, raw_text_high.
779 Don't add objfile offsets.
780 (end_psymtab): Use raw_text_low, raw_text_high,
781 MSYMBOL_VALUE_RAW_ADDRESS.
782 (read_ofile_symtab): Update.
783 (process_one_symbol): Update.
784 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
785 offsets.
786 (dw2_relocate): Remove.
787 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
788 searching addrmap.
789 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
790 Update.
791 (process_psymtab_comp_unit_reader, add_partial_symbol)
792 (add_partial_subprogram, dwarf2_ranges_read): Update.
793 (load_partial_dies): Update.
794 (add_address_entry): Don't add objfile offsets.
795 (dwarf2_build_include_psymtabs): Update.
796 (create_addrmap_from_aranges): Don't add objfile offsets.
797 (dw2_find_pc_sect_compunit_symtab): Update.
798 * mdebugread.c (parse_symbol): Don't add objfile offsets.
799 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
800 Update.
801 (parse_partial_symbols): Don't add objfile offsets. Use
802 raw_text_low, raw_text_high. Update.
803 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
804 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
805 or call 'relocate' quick function. Clear psymbol_map.
806 * psympriv.h (struct partial_symbol) <address>: Add section
807 offset.
808 <set_unrelocated_address>: Rename from set_address.
809 <raw_text_low, raw_text_high>: New methods.
810 <text_low, text_high>: Add objfile parameter.
811 (add_psymbol_to_bcache): Add 'section' parameter. Call
812 set_unrelocated_address.
813 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
814 (find_pc_psymbol): Update.
815 (fixup_psymbol_section, relocate_psymtabs): Remove.
816 (dump_psymtab, psym_functions): Update.
817 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
818 parameter.
819 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
820 (start_psymtab_common): Update.
821 * symfile-debug.c (debug_qf_relocate): Remove.
822 (debug_sym_quick_functions): Update.
823 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
824 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
825 Update.
826
52948f01
TT
8272018-07-26 Tom Tromey <tromey@redhat.com>
828
829 * dbxread.c (end_psymtab): Use text_high_valid and
830 text_low_valid.
831 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
832 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
833 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
834 Update comment.
835 <text_low_valid, text_high_valid>: New fields.
836 <set_text_low, set_text_high>: Update.
837 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
838
4ae976d1
TT
8392018-07-26 Tom Tromey <tom@tromey.com>
840
841 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
842 Update.
843 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
844 textlow and texthigh fields.
845 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
846 Update.
847 * mdebugread.c (parse_lines, parse_partial_symbols)
848 (psymtab_to_symtab_1): Update.
849 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
850 Rename fields. Update comment. Now private.
851 <text_low, text_high, set_text_low, set_text_high>: New methods.
852 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
853 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
854 (start_psymtab_common, maintenance_info_psymtabs)
855 (maintenance_check_psymtabs): Update.
856 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
857 texthigh fields.
858 (scan_xcoff_symtab): Update.
859
02e9e7f7
TT
8602018-07-26 Tom Tromey <tromey@redhat.com>
861
862 * psympriv.h (struct partial_symbol) <unrelocated_address,
863 address, set_address>: New methods.
864 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
865 (fixup_psymbol_section, relocate_psymtabs): Update.
866 (print_partial_symbols): Add 'objfile' parameter. Update.
867 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
868 Update.
869
8a6d4234
TT
8702018-07-26 Tom Tromey <tom@tromey.com>
871
872 * dwarf-index-write.c (write_psymbols, debug_names::insert)
873 (debug_names::write_psymbols): Update.
874 * psympriv.h (struct partial_symbol): Derive from
875 general_symbol_info.
876 <obj_section>: New method.
877 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
878 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
879 (find_pc_sect_psymbol, fixup_psymbol_section)
880 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
881 (print_partial_symbols, recursively_search_psymtabs)
882 (compare_psymbols, psymbol_hash, psymbol_compare)
883 (add_psymbol_to_bcache, maintenance_check_psymtabs)
884 (psymbol_name_matches, psym_fill_psymbol_map): Update.
885
08994e1d
TT
8862018-07-26 Tom Tromey <tromey@redhat.com>
887
888 * dbxread.c (end_psymtab): Remove dead code.
889
3c3bb058
AB
8902018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
891
892 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
893 DWARF unwinders are disabled.
894 * dwarf2-frame.c: Add dwarf2read.h include.
895 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
896 disabled.
897 (dwarf2_frame_unwinders_enabled_p): Define.
898 (show_dwarf_unwinders_enabled_p): New function.
899 (_initialize_dwarf2_frame): Register switch to control DWARF
900 unwinder use.
901 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
902 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
903 (show_dwarf_cmdlist): Remove static keyword.
904 * dwarf2read.h (set_dwarf_cmdlist): Declare.
905 (show_dwarf_cmdlist): Declare.
906 * NEWS: Document new feature.
907
9e7f3bbb
TV
9082018-07-26 Tom de Vries <tdevries@suse.de>
909
910 PR breakpoints/23366
911 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
912
506f5c41
TV
9132018-07-26 Tom de Vries <tdevries@suse.de>
914
915 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
916 DW_AT_count can't be translated to a dynamic prop.
917
16f808ec
TV
9182018-07-25 Tom de Vries <tdevries@suse.de>
919
920 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
921 try/catch.
922
d7154a8d
JV
9232018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
924
925 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
926
a45389f6
JB
9272018-07-25 Joel Brobecker <brobecker@adacore.com>
928
929 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
930
380618d6
KS
9312018-07-24 Keith Seitz <keiths@redhat.comt
932
933 PR symtab/23010
934 * dwarf2read.c (dw2_add_symbol_to_list): New function.
935 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
936 instead of add_symbol_to_list.
937 (read_file_scope): Call prepare_one_comp_unit before reading
938 any other DIEs.
939
4b17aefe
SM
9402018-07-24 Simon Marchi <simon.marchi@ericsson.com>
941
942 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
943
29d17e47
TT
9442018-07-24 Tom Tromey <tom@tromey.com>
945
946 * utils.c (malloc, realloc, free): Don't declare.
947 * configure, config.in: Rebuild.
948 * configure.ac: Don't check for declarations of free, malloc, or
949 realloc.
950
cf4088a9
SM
9512018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
952
953 * aarch64-linux-nat.c
954 (aarch64_linux_nat_target::stopped_data_address): Remove unused
955 variable.
956 * arm-linux-nat.c (fetch_regs): Likewise.
957 (store_regs): Likewise.
958 (fetch_vfp_regs): Likewise.
959 (store_vfp_regs): Likewise.
960 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
961 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
962 (arm_linux_nat_target::insert_watchpoint): Likewise.
963 (arm_linux_nat_target::remove_watchpoint): Likewise.
964 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
965 Likewise.
966 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
967 Likewise.
968 * ppc-linux-nat.c (fetch_register): Likewise.
969 (fetch_all_gp_regs): Likewise.
970 (fetch_ppc_registers): Likewise.
971 (store_all_gp_regs): Likewise.
972 (store_ppc_registers): Likewise.
973 (hwdebug_insert_point): Likewise.
974 (can_use_watchpoint_cond_accel): Likewise.
975 * remote-sim.c (gdb_os_write_stdout): Likewise.
976
a0de763e
TT
9772018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
978 Tom Tromey <tom@tromey.com>
979
980 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
981 test for it.
982 * configure: Rebuild.
983
3b20124b
TT
9842018-07-22 Tom Tromey <tom@tromey.com>
985
986 * regformats/regdat.sh: Define xmltarget_${name} inside
987 #ifndef IN_PROCESS_AGENT.
988
8c8807f4
TT
9892018-07-22 Tom Tromey <tom@tromey.com>
990
991 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
992
c486b610
TT
9932018-07-22 Tom Tromey <tom@tromey.com>
994
995 * symfile.c (reread_symbols): Notify iter, not objfile.
996
494f80a9
TT
9972018-07-22 Tom Tromey <tom@tromey.com>
998
999 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1000 Use arch_ops.
1001 (ravenscar_thread_target::prepare_to_store): Likewise.
1002
c51f6a54
TT
10032018-07-22 Tom Tromey <tom@tromey.com>
1004
1005 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1006 unused variable. Call value_fetch_lazy when needed.
1007 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1008 Remove unused variable. Call value_fetch_lazy when needed.
1009
374fd1fd
TT
10102018-07-22 Tom Tromey <tom@tromey.com>
1011
1012 * m32c-tdep.c (mark_dma): Return void.
1013 (make_regs): Remove unused declarations.
1014
d5e9a511
TT
10152018-07-22 Tom Tromey <tom@tromey.com>
1016
1017 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1018 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1019 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1020 bkscm_get_valid_block_smob_arg_unsafe for effect.
1021
996d693a
TT
10222018-07-22 Tom Tromey <tom@tromey.com>
1023
1024 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1025 value_type.
1026
15766370
TT
10272018-07-22 Tom Tromey <tom@tromey.com>
1028
1029 * windows-nat.c (saved_context): Conditionally define.
1030 * remote.c (remote_target::remote_btrace_maybe_reopen):
1031 Conditionally declare "warned".
1032 * inflow.c (sigquit_ours): Conditionally define.
1033 (new_tty): Move "tty" declaration inside #if.
1034 * guile/guile.c (guile_datadir): Conditionally define.
1035 * charset.c (set_be_le_names): Move some declarations inside #if.
1036 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1037 #if.
1038 (parse_xml_btrace_conf): Likewise.
1039
f4e80e13
TT
10402018-07-22 Tom Tromey <tom@tromey.com>
1041
1042 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1043
8d49165d
TT
10442018-07-22 Tom Tromey <tom@tromey.com>
1045
1046 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1047 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1048 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1049 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1050 * stack.c (frame_apply_level_command): Remove unused variable.
1051 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1052 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1053 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1054 unused variable.
1055 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1056 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1057 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1058 variable.
1059 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1060 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1061 variable.
1062 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1063 Remove unused variable.
1064 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1065 variable.
1066 * common/tdesc.c (print_xml_feature::visit): Remove unused
1067 variable.
1068 * compile/compile-object-load.c (store_regs): Remove unused
1069 variables.
1070 * complaints.c (clear_complaints): Remove unused variable.
1071 * corelow.c (core_target_open): Remove unused variable.
1072 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1073 variable.
1074 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1075 variable.
1076 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1077 variable.
1078 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1079 variable.
1080 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1081 variable.
1082 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1083 variable.
1084 * ia64-tdep.c (examine_prologue): Remove unused variable.
1085 * infcall.c (run_inferior_call): Remove unused variable.
1086 * inferior.c (exit_inferior): Remove unused variable.
1087 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1088 * linespec.c (decode_line_2): Remove unused variable.
1089 * linux-nat.c (super_close): Remove.
1090 * linux-tdep.c (linux_info_proc): Remove unused variable.
1091 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1092 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1093 Remove unused variable.
1094 * parse.c (find_minsym_type_and_address): Remove unused variable.
1095 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1096 variable.
1097 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1098 variable.
1099 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1100 variables.
1101 * record-btrace.c (record_btrace_target::store_registers): Remove
1102 unused variable.
1103 (cmd_show_record_btrace_cpu): Remove unused variable.
1104 * riscv-tdep.c (riscv_register_reggroup_p)
1105 (riscv_push_dummy_call, riscv_return_value): Remove unused
1106 variable.
1107 * rust-exp.y (literal): Remove unused variable.
1108 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1109 unused variable.
1110 <STRUCTOP_ANONYMOUS>: Likewise.
1111 * s390-linux-tdep.c (s390_linux_init_abi_31)
1112 (s390_linux_init_abi_64): Remove unused variable.
1113 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1114 (file_select_thread, net_windows_open, _initialize_ser_windows):
1115 Remove unused variables.
1116 * symtab.c (find_pc_sect_line): Remove unused variable.
1117 * target-memory.c (compute_garbled_blocks): Remove unused
1118 variable.
1119 (target_write_memory_blocks): Remove unused variable.
1120 * target.c (target_stack::unpush): Remove unused variables.
1121 * tracepoint.c (start_tracing, all_tracepoint_actions)
1122 (merge_uploaded_trace_state_variables)
1123 (print_one_static_tracepoint_marker): Remove unused variable.
1124 * unittests/basic_string_view/element_access/char/1.cc (test01):
1125 Remove unused variable.
1126 * windows-nat.c (windows_continue, windows_add_all_dlls)
1127 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1128 Remove unused variables.
1129
17cbafdb
SM
11302018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1131
1132 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1133 attr_profile in HAVE_ELF.
1134 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1135 HAVE_ELF.
1136
0ee6c332
SM
11372018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1138
1139 * frame.c (frame_register_unwind): Change parameter name.
1140 (frame_unwind_register): Likewise.
1141 (frame_unwind_register_value): Likewise.
1142 (frame_unwind_register_signed): Likewise.
1143 (frame_unwind_register_unsigned): Likewise.
1144 * frame.h (frame_register_unwind): Likewise.
1145 (frame_unwind_register): Likewise.
1146 (frame_unwind_register_value): Likewise.
1147 (frame_unwind_register_signed): Likewise.
1148 (frame_unwind_register_unsigned): Likewise.
1149 (frame_unwind_arch): Likewise.
1150
e2e31f10
MR
11512018-07-20 Maciej W. Rozycki <macro@mips.com>
1152
1153 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1154 ISA maintenance.
1155
2d389915
MR
11562018-07-20 Maciej W. Rozycki <macro@mips.com>
1157
1158 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1159 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1160 hand.
1161
cbb09508
KS
11622018-07-20 Keith Seitz <keiths@redhat.com>
1163
1164 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1165 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1166 m_compunit_symtab, m_language>: Add "m_" prefix.
1167 Update all uses.
1168 * buildsym.c: Update all uses.
1169
bfe2e011
TT
11702018-07-20 Tom Tromey <tom@tromey.com>
1171
1172 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1173 * buildsym.h (record_line_ftype): Remove typedef.
1174
0e6f3061
TT
11752018-07-20 Tom Tromey <tom@tromey.com>
1176
1177 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1178 (end_expandable_symtab): Likewise.
1179 (end_symtab_get_static_block): Likewise.
1180 (end_symtab_from_static_block): Likewise.
1181 * buildsym-legacy.c (augment_type_symtab): Remove.
1182 (end_expandable_symtab): Remove.
1183 (end_symtab_get_static_block): Remove.
1184 (end_symtab_from_static_block): Remove.
1185
804d2729
TT
11862018-07-20 Tom Tromey <tom@tromey.com>
1187
1188 * dwarf2read.c: Include buildsym.h.
1189 (struct dwarf2_cu) <builder>: New method.
1190 (fixup_go_packaging): Update.
1191 (process_full_comp_unit, process_full_type_unit): Update. Don't
1192 use scoped_free_pendings.
1193 (using_directives): Add "cu" parameter, remove "language".
1194 (read_import_statement, setup_type_unit_groups, )
1195 (read_func_scope, read_lexical_block_scope)
1196 (dwarf2_record_block_ranges, read_namespace): Update.
1197 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1198 (lnp_state_machine::handle_end_sequence): Update.
1199 (class lnp_state_machine) <m_cu>: New member.
1200 <m_record_line_callback>: Remove.
1201 <m_currently_recording_lines>: New member.
1202 (lnp_state_machine::handle_set_file): Update.
1203 (noop_record_line): Remove.
1204 (dwarf_record_line_p): Add cu parameter.
1205 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1206 (lnp_state_machine::record_line)
1207 (lnp_state_machine::lnp_state_machine)
1208 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1209 (dwarf_decode_lines): Update.
1210 (dwarf2_start_subfile): Add cu parameter.
1211 (dwarf2_start_symtab, new_symbol): Update.
1212 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1213 Remove dwarf2_per_objfile parameter.
1214 (dwarf_decode_macros): Update.
1215
80e649fc
TT
12162018-07-20 Tom Tromey <tom@tromey.com>
1217
1218 * stabsread.c (define_symbol): Update.
1219 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1220 * dwarf2read.c (new_symbol): Update.
1221 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1222 * cp-namespace.c: Include buildsym.h.
1223 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1224 * buildsym-legacy.c (get_buildsym_compunit): New function.
1225
0baae8db
TT
12262018-07-20 Tom Tromey <tom@tromey.com>
1227
1228 * xcoffread.c: Include buildsym-legacy.h.
1229 * windows-nat.c: Include buildsym-legacy.h.
1230 * stabsread.c: Include buildsym-legacy.h.
1231 * mdebugread.c: Include buildsym-legacy.h.
1232 * buildsym-legacy.h: New file.
1233 * buildsym-legacy.c: New file, from buildsym.c.
1234 * go32-nat.c: Include buildsym-legacy.h.
1235 * dwarf2read.c: Include buildsym-legacy.h.
1236 * dbxread.c: Include buildsym-legacy.h.
1237 * cp-namespace.c: Include buildsym-legacy.h.
1238 * coffread.c: Include buildsym-legacy.h.
1239 * buildsym.h: Move some contents to buildsym-legacy.h.
1240 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1241 buildsym-legacy.c.
1242 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1243
ab209f6f
TT
12442018-07-20 Tom Tromey <tom@tromey.com>
1245
1246 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1247 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1248 (buildsym_compunit::buildsym_compunit)
1249 (buildsym_compunit::~buildsym_compunit)
1250 (buildsym_compunit::get_macro_table): Define.
1251
74c72eac
TT
12522018-07-20 Tom Tromey <tom@tromey.com>
1253
1254 * buildsym.c (reset_symtab_globals): Remove.
1255 (buildsym_compunit::end_symtab_from_static_block): Update.
1256 (buildsym_compunit::augment_type_symtab): Update.
1257 (end_symtab_from_static_block): Call free_buildsym_compunit.
1258 (augment_type_symtab, end_symtab, end_expandable_symtab):
1259 Likewise.
1260
da6580e5
TT
12612018-07-20 Tom Tromey <tom@tromey.com>
1262
1263 * arch-utils.c: Do not include buildsym.h.
1264 * mipsread.c: Do not include buildsym.h.
1265 * machoread.c: Do not include buildsym.h.
1266 * elfread.c: Do not include buildsym.h.
1267
4a2125f5
TT
12682018-07-20 Tom Tromey <tom@tromey.com>
1269
1270 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1271 initialization.
1272 (buildsym_compunit): Add new constructor.
1273 (struct buildsym_compunit) <get_last_source_file, finish_block,
1274 record_block_range, start_subfile, patch_subfile_names,
1275 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1276 set_last_source_start_addr, get_last_source_start_addr,
1277 get_local_using_directives, set_local_using_directives,
1278 get_global_using_directives, outermost_context_p,
1279 get_current_context_stack, get_context_stack_depth,
1280 get_current_subfile, get_local_symbols, get_file_symbols,
1281 get_global_symbols, record_debugformat, record_producer,
1282 push_context, pop_context, end_symtab_get_static_block,
1283 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1284 New public methods.
1285 <record_pending_block, finish_block_internal, make_blockvector,
1286 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1287 private methods.
1288 Update all users.
1289
12902018-05-22 Tom Tromey <tom@tromey.com>
1291
1292 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1293 parameter.
1294 (finish_block_internal): Update.
1295
6b213a47
TT
12962018-07-20 Tom Tromey <tom@tromey.com>
1297
1298 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1299 parameter.
1300 (finish_block_internal): Update.
1301
b80a981d
TT
13022018-07-20 Tom Tromey <tom@tromey.com>
1303
1304 * buildsym.h (EXTERN): Don't define or undef.
1305 * buildsym.c (EXTERN): Don't define.
1306
ddb70602
TT
13072018-07-20 Tom Tromey <tom@tromey.com>
1308
1309 * buildsym.c: Remove TODO comment.
1310
b37dd3bc
TT
13112018-07-20 Tom Tromey <tom@tromey.com>
1312
1313 * coffread.c (coff_symtab_read): Update.
1314 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1315 (xcoff_new_init): Update.
1316 * mipsread.c (mipscoff_new_init): Update.
1317 * mdebugread.c (mdebug_build_psymtabs): Update.
1318 * elfread.c (elf_new_init): Update.
1319 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1320 Update.
1321 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1322 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1323 (stabsect_build_psymtabs): Update.
1324 * buildsym.h (buildsym_init): Don't declare.
1325 * buildsym.c: Update comment.
1326 (prepare_for_building): Remove.
1327 (start_symtab, restart_symtab): Update.
1328 (reset_symtab_globals): Update comment.
1329 (buildsym_init): Remove.
1330
e148f09d
TT
13312018-07-20 Tom Tromey <tom@tromey.com>
1332
1333 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1334 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1335 (read_enum_type, common_block_start, common_block_end)
1336 (cleanup_undefined_types_1, finish_global_stabs): Update.
1337 * mdebugread.c (psymtab_to_symtab_1): Update.
1338 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1339 (read_lexical_block_scope, new_symbol): Update.
1340 * dbxread.c (process_one_symbol): Update.
1341 * coffread.c (coff_symtab_read, process_coff_symbol)
1342 (coff_read_enum_type): Update.
1343 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1344 declare.
1345 (get_local_symbols, get_file_symbols, get_global_symbols): New
1346 functions.
1347 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1348 m_global_symbols.
1349 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1350 (~scoped_free_pendings): Update.
1351 (finish_block, prepare_for_building, reset_symtab_globals)
1352 (end_symtab_get_static_block, end_symtab_with_blockvector)
1353 (augment_type_symtab, push_context): Update.
1354 (get_local_symbols, get_file_symbols, get_global_symbols): New
1355 functions.
1356 (buildsym_init): Update.
1357
93b8bea4
TT
13582018-07-20 Tom Tromey <tom@tromey.com>
1359
1360 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1361 (process_full_type_unit): Likewise.
1362 (dwarf2_start_symtab): Set list_in_scope.
1363
f62f6af5
TT
13642018-07-20 Tom Tromey <tom@tromey.com>
1365
1366 * dwarf2read.c (process_psymtab_comp_unit_reader)
1367 (build_type_psymtabs_reader): Do not set list_in_scope.
1368
1d376700
TT
13692018-07-20 Tom Tromey <tom@tromey.com>
1370
1371 * buildsym.c (free_pendings): Remove.
1372 (add_symbol_to_list, scoped_free_pendings)
1373 (finish_block_internal, buildsym_init): Update.
1374
c233e9c6
TT
13752018-07-20 Tom Tromey <tom@tromey.com>
1376
1377 * xcoffread.c (read_xcoff_symtab): Update.
1378 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1379 Update.
1380 * dbxread.c (process_one_symbol): Update.
1381 * coffread.c (coff_symtab_read): Update.
1382 * buildsym.h (finish_block): Update.
1383 * buildsym.c (finish_block): Remove "listhead" argument.
1384 (end_symtab_get_static_block): Update.
1385
5ac04550
TT
13862018-07-20 Tom Tromey <tom@tromey.com>
1387
1388 * buildsym.h (class scoped_free_pendings): Remove constructor.
1389 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1390 method.
1391 <m_pending_block_obstack, m_pending_blocks>: New members.
1392 (pending_block_obstack, pending_blocks): Remove.
1393 (scoped_free_pendings::scoped_free_pendings): Default.
1394 (~scoped_free_pendings): Update.
1395 (free_pending_blocks): Remove.
1396 (finish_block_internal, record_pending_block, make_blockvector)
1397 (end_symtab_get_static_block, augment_type_symtab, push_context)
1398 (buildsym_init): Update.
1399
7ea05a7b
TT
14002018-07-20 Tom Tromey <tom@tromey.com>
1401
1402 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1403 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1404 members.
1405 (pending_addrmap, pending_addrmap_obstack)
1406 (pending_addrmap_interesting): Remove.
1407 (scoped_free_pendings, record_block_range, make_blockvector)
1408 (prepare_for_building, reset_symtab_globals, buildsym_init):
1409 Update.
1410
3c65e5b3
TT
14112018-07-20 Tom Tromey <tom@tromey.com>
1412
1413 * xcoffread.c (process_linenos): Update.
1414 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1415 * mdebugread.c (psymtab_to_symtab_1): Update.
1416 * dwarf2read.c (setup_type_unit_groups)
1417 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1418 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1419 * dbxread.c (process_one_symbol): Update.
1420 * coffread.c (coff_symtab_read, enter_linenos)
1421 (process_coff_symbol): Update.
1422 * buildsym.h (current_subfile): Don't declare.
1423 (get_current_subfile): Declare.
1424 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1425 member.
1426 (start_subfile, free_buildsym_compunit, push_subfile)
1427 (prepare_for_building, start_symtab): Update.
1428 (get_current_subfile): New function.
1429
a60f3166
TT
14302018-07-20 Tom Tromey <tom@tromey.com>
1431
1432 * coffread.c (coff_symtab_read): Update.
1433 * xcoffread.c (read_xcoff_symtab): Update.
1434 * dwarf2read.c (new_symbol): Update.
1435 (read_func_scope, read_lexical_block_scope): Update.
1436 * dbxread.c (process_one_symbol): Update.
1437 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1438 (outermost_context_p): Remove macro.
1439 (outermost_context_p, get_current_context_stack)
1440 (get_context_stack_depth): Declare.
1441 (pop_context): Return struct context_stack.
1442 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1443 member.
1444 (context_stack_size): Remove.
1445 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1446 (prepare_for_building, end_symtab_get_static_block)
1447 (augment_type_symtab, push_context): Update.
1448 (pop_context): Return struct context_stack.
1449 (outermost_context_p, get_current_context_stack)
1450 (get_context_stack_depth): New functions.
1451 (buildsym_init): Update.
1452
56ba65a0
TT
14532018-07-20 Tom Tromey <tom@tromey.com>
1454
1455 * rust-exp.y: Now a pure parser. Update all rules.
1456 (%union): Move earlier.
1457 (current_parser, work_obstack): Remove globals.
1458 (rust_parser, ~rust_parser): Update.
1459 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1460 lex_character, lex_number, lex_string, lex_identifier,
1461 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1462 convert_name, convert_params_to_expression,
1463 convert_ast_to_expression, ast_basic_type, ast_operation,
1464 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1465 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1466 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1467 ast_array_type, ast_slice_type, ast_reference_type,
1468 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1469 (rust_parse): Update.
1470 (rustyyerror, rustyylex): Add parser parameter.
1471 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1472 (rust_lex_stringish_test, rust_lex_test_sequence)
1473 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1474 (rust_lex_test_push_back, rust_lex_tests): Update.
1475
4c693332
PA
14762018-07-19 Pedro Alves <palves@redhat.com>
1477
1478 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1479 gdb::unique_xmalloc_ptr.
1480 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1481 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1482 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1483 copy-initialization.
1484 * guile/scm-pretty-print.c (ppscm_print_children): Use
1485 gdb::unique_xmalloc_ptr instead of cleanups.
1486 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1487 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1488 gdb::unique_xmalloc_ptr.
1489 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1490 Adjust to use gdb::unique_xmalloc_ptr.
1491 * guile/scm-utils.c (extract_arg): Adjust.
1492 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1493 gdb::unique_xmalloc_ptr instead of a cleanup.
1494
4581dc82
TT
14952018-07-19 Tom Tromey <tom@tromey.com>
1496
1497 * utils.c (do_value_free_to_mark)
1498 (make_cleanup_value_free_to_mark): Remove.
1499 * utils.h (make_cleanup_value_free_to_mark): Remove.
1500
43cc6c3a
PA
15012018-07-19 Pedro Alves <palves@redhat.com>
1502
1503 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1504 forwarding reference.
1505
3a5f2a48
PA
15062018-07-18 Pedro Alves <palves@redhat.com>
1507
1508 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1509 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1510 cleanup.
1511
557e56be
PA
15122018-07-18 Pedro Alves <palves@redhat.com>
1513
1514 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1515 exceptions.
1516 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1517 (gdbscm_wrap): New.
1518 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1519 directly instead of a cleanup.
1520 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1521 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1522 (vlscm_binop_gdbthrow): New, factored out from ...
1523 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1524 (vlscm_rich_compare): Use gdbscm_wrap.
1525 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1526 instead of a cleanup.
1527 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1528 cleanup.
1529 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1530 Use xfree directly instead of a cleanup.
1531 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1532 Adjust to use gdbscm_wrap and scoped_value_mark.
1533 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1534 (gdbscm_value_address, gdbscm_value_dereference)
1535 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1536 scoped_value_mark.
1537 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1538 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1539 scoped_value_mark.
1540 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1541 gdbscm_wrap and scoped_value_mark.
1542 (gdbscm_value_to_string): Use xfree directly instead of a
1543 cleanup. Move 'buffer' unique_ptr to TRY scope.
1544 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1545 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1546 scoped_value_mark.
1547 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1548 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1549 scoped_value_mark.
1550 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1551 gdbscm_wrap.
1552
42dc7699
TV
15532018-07-18 Tom de Vries <tdevries@suse.de>
1554
1555 * findvar.c (default_read_var_value): Also resolve dynamic type for
1556 LOC_OPTIMIZED_OUT vars.
1557
6592ceed
MR
15582018-07-18 Maciej W. Rozycki <macro@mips.com>
1559
1560 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1561 decoding.
1562
c6c6149a
TT
15632018-07-17 Tom Tromey <tom@tromey.com>
1564
1565 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1566 (compute_enum_list, pascm_set_param_value_x)
1567 (gdbscm_parameter_value): Update.
1568 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1569 (gdbscm_scm_to_host_string): Update.
1570 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1571 Update.
1572 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1573 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1574 * guile/scm-string.c (gdbscm_scm_to_string): Return
1575 unique_xmalloc_ptr.
1576 (gdbscm_scm_to_host_string): Likewise.
1577
a1a31cb8
TT
15782018-07-17 Tom Tromey <tom@tromey.com>
1579
1580 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1581 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1582 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1583 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1584 unique_xmalloc_ptr.
1585
15bf3002
TT
15862018-07-17 Tom Tromey <tom@tromey.com>
1587
1588 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1589 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1590 Update.
1591 * guile/scm-cmd.c (cmdscm_function): Update.
1592 * guile/scm-pretty-print.c
1593 (ppscm_print_exception_unless_memory_error): Update.
1594 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1595 Return unique_xmalloc_ptr.
1596
7eb1a66c
TT
15972018-07-17 Tom Tromey <tom@tromey.com>
1598
1599 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1600 Use string_printf.
1601
ce73f310
JW
16022018-07-17 Jim Wilson <jimw@sifive.com>
1603
27724bad
JW
1604 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1605 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1606 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1607 unecessary braces after EF_RISCV_RVC test. Delete call to
1608 set_gdbarch_decr_pc_after_break.
1609
ce73f310
JW
1610 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1611 RISCV_LAST_FP_REGNUM + 1.
1612 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1613
056dec39
TT
16142018-07-17 Tom Tromey <tom@tromey.com>
1615
1616 * configure.ac: Remove --disable-gdbcli.
1617 * configure: Rebuild.
1618 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1619 (SUBDIR_CLI_CFLAGS): Remove.
1620 (SFILES): Use SUBDIR_CLI_SRCS.
1621 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1622
4735f0ed
TT
16232018-07-17 Tom Tromey <tom@tromey.com>
1624
1625 PR gdb/18624:
1626 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1627
117a0e99
JW
16282018-07-16 Jim Wilson <jimw@sifive.com>
1629
1630 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1631
8a67aaa8
SM
16322018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1633
1634 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1635 variable.
1636 (libunwind_frame_sniffer): Likewise.
1637 (libunwind_frame_prev_register): Likewise.
1638 (libunwind_sigtramp_frame_sniffer): Likewise.
1639 * ia64-tdep.c (ia64_access_reg): Likewise.
1640 (ia64_access_rse_reg): Likewise.
1641 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1642 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1643
ec74dcd8
SM
16442018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1645
1646 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1647
a700e753
SM
16482018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1649
1650 * remote-sim.c (gdbsim_target::close,
1651 gdbsim_target::mourn_inferior): Remove unused variables.
1652
8b411ff8
SM
16532018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1654
1655 * ia64-tdep.c (ktab_buf): New global.
1656 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1657 (get_kernel_table): Adjust.
1658
edb0470b
TT
16592018-07-16 Tom Tromey <tom@tromey.com>
1660
1661 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1662 * dwarf2read.c (using_directives, new_symbol): Use
1663 outermost_context_p.
1664 * dbxread.c (process_one_symbol): Use outermost_context_p.
1665 * coffread.c (coff_symtab_read): Use outermost_context_p.
1666
6cccc9a8
TT
16672018-07-16 Tom Tromey <tom@tromey.com>
1668
1669 * dwarf2read.c (using_directives, read_func_scope)
1670 (read_lexical_block_scope): Update.
1671 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1672 * buildsym.h (local_using_directives, global_using_directives):
1673 Don't declare.
1674 (get_local_using_directives, set_local_using_directives)
1675 (get_global_using_directives): Declare.
1676 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1677 m_global_using_directives>: New members.
1678 (finish_block_internal, prepare_for_building)
1679 (reset_symtab_globals, end_symtab_get_static_block)
1680 (push_context): Update.
1681 (get_local_using_directives, set_local_using_directives)
1682 (get_global_using_directives): New functions.
1683 (buildsym_init): Update.
1684
652788a7
TT
16852018-07-16 Tom Tromey <tom@tromey.com>
1686
1687 * xcoffread.c (xcoff_initial_scan): Don't call
1688 free_pending_blocks.
1689 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1690 * buildsym.h (class scoped_free_pendings): Add constructor.
1691 (free_pending_blocks): Don't declare.
1692 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1693 (free_pending_blocks): Now static.
1694
8419ee53
TT
16952018-07-16 Tom Tromey <tom@tromey.com>
1696
1697 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1698 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1699 member.
1700 (struct subfile_stack): Remove.
1701 (subfile_stack): Remove.
1702 (push_subfile, pop_subfile, buildsym_init): Update.
1703
ccdac490
TT
17042018-07-16 Tom Tromey <tom@tromey.com>
1705
1706 * buildsym.c (push_subfile): Use gdb_assert.
1707 (pop_subfile): Use gdb_assert.
1708
43130d6f
TT
17092018-07-16 Tom Tromey <tom@tromey.com>
1710
1711 * buildsym.h (merge_symbol_lists): Remove.
1712 * buildsym.c (merge_symbol_lists): Remove.
1713
77d6f1aa
TT
17142018-07-16 Tom Tromey <tom@tromey.com>
1715
1716 * stabsread.c (scan_file_globals): Update comment.
1717 * stabsread.h (scan_file_globals): Move from buildsym.h.
1718 * buildsym.h (scan_file_globals): Move to stabsread.h.
1719
2c722d18
TT
17202018-07-16 Tom Tromey <tom@tromey.com>
1721
1722 * xcoffread.c (xcoff_new_init): Update.
1723 * mipsread.c (mipscoff_new_init): Update.
1724 * mdebugread.c (mdebug_build_psymtabs): Update.
1725 * elfread.c (elf_new_init): Update.
1726 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1727 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1728 * buildsym.h (buildsym_new_init): Don't declare.
1729 * buildsym.c (buildsym_new_init): Remove.
1730
5985ac61
TT
17312018-07-16 Tom Tromey <tom@tromey.com>
1732
1733 * stabsread.h (within_function): Move from buildsym.h.
1734 * stabsread.c (start_stabs): Clear within_function.
1735 * coffread.c (coff_start_symtab): Clear within_function.
1736 * buildsym.h (within_function): Move to stabsread.h.
1737 * buildsym.c (prepare_for_building): Update.
1738
6b84eeb2
TT
17392018-07-16 Tom Tromey <tom@tromey.com>
1740
1741 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1742 * dwarf2read.c (dwarf2_start_symtab): Don't set
1743 processing_gcc_compilation.
1744 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1745
2150c3ef
TT
17462018-07-16 Tom Tromey <tom@tromey.com>
1747
1748 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1749 (next_symbol_text_func): Move from buildsym.h.
1750 * stabsread.c (hashname): Move from buildsym.c.
1751 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1752 (next_symbol_text_func, hashname): Move to stabsread.h.
1753 * buildsym.c: Don't include bcache.h
1754 (hashname): Move to stasbread.c.
1755
0ec44fc0
TT
17562018-07-16 Tom Tromey <tom@tromey.com>
1757
1758 * buildsym.h (context_stack_size): Don't declare.
1759 * buildsym.c (context_stack_size): New global.
1760
81cc346d
TT
17612018-07-16 Tom Tromey <tom@tromey.com>
1762
1763 * dbxread.c (processing_acc_compilation): New global.
1764 * buildsym.h (processing_acc_compilation): Don't declare.
1765
2c99ee5c
TT
17662018-07-16 Tom Tromey <tom@tromey.com>
1767
1768 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1769 * dbxread.c (read_ofile_symtab): Update.
1770 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1771 * buildsym.h (last_source_start_addr): Remove.
1772 (set_last_source_start_addr, get_last_source_start_addr):
1773 Declare.
1774 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1775 parameter.
1776 (struct buildsym_compunit) <m_last_source_start_addr>: New
1777 member.
1778 (prepare_for_building): Remove start_addr parameter.
1779 (start_symtab, restart_symtab, end_symtab_get_static_block)
1780 (end_symtab_with_blockvector): Update.
1781 (set_last_source_start_addr, get_last_source_start_addr): New
1782 functions.
1783
530fedbc
TT
17842018-07-16 Tom Tromey <tom@tromey.com>
1785
1786 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1787 member.
1788 (have_line_numbers): Remove.
1789 (record_line, prepare_for_building, end_symtab_get_static_block)
1790 (augment_type_symtab): Update.
1791
6a976300
TT
17922018-07-16 Tom Tromey <tom@tromey.com>
1793
1794 * buildsym.c (~buildsym_compunit): Free the macro table.
1795 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1796 methods.
1797 <m_pending_macros>: New member.
1798 (pending_macros): Remove.
1799 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1800 (reset_symtab_globals, end_symtab_get_static_block)
1801 (end_symtab_with_blockvector, augment_type_symtab)
1802 (buildsym_init): Update.
1803
c0015d44
TT
18042018-07-16 Tom Tromey <tom@tromey.com>
1805
1806 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1807 parameter.
1808 (buildsym_compunit::set_last_source_file): New method.
1809 <m_last_source_file>: New member.
1810 (prepare_for_building): Remove "name" parameter.
1811 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1812 (last_source_file): Remove.
1813 (set_last_source_file, get_last_source_file): Update.
1814
e62cca7c
TT
18152018-07-16 Tom Tromey <tom@tromey.com>
1816
1817 * buildsym.c (prepare_for_building): Add assert.
1818
905eb0e2
TT
18192018-07-16 Tom Tromey <tom@tromey.com>
1820
1821 * buildsym.c (~buildsym_compunit): Update.
1822 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1823 (start_subfile, patch_subfile_names)
1824 (end_symtab_with_blockvector): Update.
1825
b248663f
TT
18262018-07-16 Tom Tromey <tom@tromey.com>
1827
1828 * buildsym.c (struct buildsym_compunit): Add constructor,
1829 destructor, initializers.
1830 (start_buildsym_compunit): Remove.
1831 (free_buildsym_compunit): Use "delete".
1832 (start_symtab, restart_symtab): Use "new".
1833
ff27d073
SM
18342018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1835
1836 * symfile.c (set_objfile_default_section_offset): Remove struct
1837 keyword.
1838
6a15ecf5
SH
18392018-07-14 Stafford Horne <shorne@gmail.com>
1840
1841 * (Responsible Maintainers): Add myself as or1k maintainer.
1842
027a4c30
TT
18432018-07-13 Tom Tromey <tom@tromey.com>
1844
1845 * symfile.c (set_objfile_default_section_offset): Use extra braces
1846 around initializer.
1847
5c1eda30
AA
18482018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1849
1850 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1851 non-branching basr.
1852
bc7b042b
PW
18532018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1854
1855 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1856 unittests/cli-utils-selftests.c
1857 * unittests/cli-utils-selftests.c: New file.
1858
a14c4daa
PW
18592018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1860
1861 * NEWS: Mention new commands. Mention change to 'thread apply'.
1862
1fe75df7
PW
18632018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1864
1865 * thread.c (thr_try_catch_cmd): New function.
1866 (thread_apply_all_command): Handle qcs flags.
1867 (thread_apply_command): Handle qcs flags.
1868 (taas_command): New function.
1869 (tfaas_command): New function.
1870 (_initialize_thread): Update to setup the new commands 'taas
1871 and 'tfaas'. Change doc string for 'thread apply'.
1872
6a70eb7d
PW
18732018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1874
1875 * stack.c: (trailing_outermost_frame): New function, mostly
1876 extracted from backtrace_command_1.
1877 (leading_innermost_frame): New function.
1878 (backtrace_command_1): Update to call trailing_outermost_frame.
1879 (frame_apply_command_count): New function.
1880 (frame_apply_level_command): New function.
1881 (frame_apply_all_command): New function.
1882 (frame_apply_command): New function.
1883 (faas_command): New function.
1884 (frame_cmd_list): New variable.
1885 (_initialize_stack): Update to setup the new commands 'frame apply'
1886 and 'faas'.
1887
529c08b2
PW
18882018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1889
1890 * cli-utils.c (number_or_range_parser::get_number): Only handle
1891 numbers or convenience var as numbers.
1892 (parse_flags): New function.
1893 (parse_flags_qcs): New function.
1894 (number_or_range_parser::finished): Ensure parsing end is detected
1895 before end of string.
1896 * cli-utils.h (parse_flags): New function.
1897 (parse_flags_qcs): New function.
1898 (number_or_range_parser): Remove m_finished bool.
1899 (number_or_range_parser::skip_range): Set m_in_range to false.
1900
64b58472
SDJ
19012018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1902
1903 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1904 on Windows.
1905
c7ab0aef
SDJ
19062018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1907 Jan Kratochvil <jan.kratochvil@redhat.com>
1908 Paul Fertser <fercerpav@gmail.com>
1909 Tsutomu Seki <sekiriki@gmail.com>
1910 Pedro Alves <palves@redhat.com>
1911
1912 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1913 'unittests/parse-connection-spec-selftests.c'.
1914 (COMMON_SFILES): Add 'common/netstuff.c'.
1915 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1916 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1917 * common/netstuff.c: New file.
1918 * common/netstuff.h: New file.
1919 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1920 (wait_for_connect): Update comment. New parameter
1921 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1922 Use 'sock' directly instead of 'scb->fd'.
1923 (try_connect): New function, with code from 'net_open'.
1924 (net_open): Rewrite main loop to deal with multiple
1925 sockets/addresses. Handle IPv6-style hostnames; implement
1926 support for IPv6 connections.
1927 * unittests/parse-connection-spec-selftests.c: New file.
1928
4c7333b3
PA
19292018-07-11 Pedro Alves <palves@redhat.com>
1930
1931 PR gdb/23377
1932 * remote.c (remote_target::remote_detach_pid): Call
1933 set_current_process.
1934
a6f88f6e
PA
19352018-07-11 Pedro Alves <palves@redhat.com>
1936
1937 * h8300-tdep.c (h8300_gdbarch_init): Remove
1938 set_gdbarch_ecoff_reg_to_regnum calls.
1939
16ff70dd
SDJ
19402018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1941
1942 PR c++/23373
1943 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1944 offsets/sizes for static members of a class/struct.
1945
12863263
AH
19462018-07-11 Alan Hayward <alan.hayward@arm.com>
1947
1948 * target-descriptions.c (tdesc_register_bitsize): Rename.
1949 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1950 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1951 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1952
1123588c
TT
19532018-07-10 Tom Tromey <tom@tromey.com>
1954
1955 * breakpoint.c (moribund_locations): Now static and a
1956 std::vector.
1957 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1958 (build_bpstat_chain, update_global_location_list)
1959 (breakpoint_retire_moribund): Update.
1960 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1961 VEC.
1962
8c49aa89
AB
19632018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1964
1965 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1966 (riscv_register_reggroup_p): Use new function, remove unneeded
1967 parenthesis.
1968 (riscv_push_dummy_call): Extend assert to compare against xlen or
1969 flen based on register type.
1970
42ecac17
AB
19712018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1972
1973 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1974
055303e2
AB
19752018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1976
1977 * remote.c (show_hardware_watchpoint_limit): New function.
1978 (show_hardware_watchpoint_length_limit): New function.
1979 (show_hardware_breakpoint_limit): New function.
1980 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1981 where appropriate, update help text.
1982
8fd32c1c
TT
19832018-07-09 Tom Tromey <tom@tromey.com>
1984
1985 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1986 (CLIBS): Don't mention NAT_CLIBS.
1987
31278b51
TT
19882018-07-09 Tom Tromey <tom@tromey.com>
1989
1990 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1991 (LIBGDB_OBS, clean mostlyclean): Update.
1992 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1993
e5fd1493
TT
19942018-07-09 Tom Tromey <tom@tromey.com>
1995
1996 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1997 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1998 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1999
981e0c0c
TT
20002018-07-09 Tom Tromey <tom@tromey.com>
2001
2002 * Makefile.in (ALLDEPFILES): Remove exec.c.
2003 (COMMON_OBS): Remove exec.o.
2004 (COMMON_SFILES): Add exec.c.
2005
14ccceb2
TT
20062018-07-09 Tom Tromey <tom@tromey.com>
2007
2008 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2009
5d3c3a68
TT
20102018-07-09 Tom Tromey <tom@tromey.com>
2011
2012 * Makefile.in (clean mostlyclean): Remove stamp-version.
2013 (version.c): Depend on stamp-version.
2014 (stamp-version): New rule, from version.c rule.
2015
1998086d
TT
20162018-07-09 Tom Tromey <tom@tromey.com>
2017
2018 * Makefile.in (init.c): Depend on stamp-init.
2019 (stamp-init): New rule, from init.c rule.
2020 (clean mostlyclean): Remove stamp-init.
2021
4c754949
TT
20222018-07-09 Tom Tromey <tom@tromey.com>
2023
2024 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2025 SUBDIR_GCC_COMPILE_SRCS.
2026
6497f1dd
TT
20272018-07-09 Tom Tromey <tom@tromey.com>
2028
2029 * Makefile.in (init.c): Remove some unused sed rules.
2030
97a34db9
TT
20312018-07-09 Tom Tromey <tom@tromey.com>
2032
2033 * Makefile.in (TSOBS): Remove.
2034 (INIT_FILES): Update.
2035 (LIBGDB_OBS): Update.
2036 (COMMON_SFILES): Add inflow.c.
2037 (SFILES): Remove inflow.c.
2038
25289ac1
JK
20392018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2040
2041 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2042
e83f4d97
SM
20432018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2044
4869c585
SM
2045 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2046 get_saveloc_name, is_signal_frame_name, step_name,
2047 init_remote_name, create_addr_space_name,
2048 destroy_addr_space_name, search_unwind_table_name,
2049 find_dyn_list_name): Constify.
e83f4d97 2050
6821842f
SM
20512018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2052
2053 * darwin-nat.c (darwin_pthread_kill): New function.
2054 (darwin_resume_thread): Use darwin_pthread_kill.
2055
c530603c
TV
20562018-07-05 Tom de Vries <tdevries@suse.de>
2057
2058 * macroexp.c (macro_buffer) <operator=>: New member function.
2059
a7d0f0f0
TT
20602018-07-04 Tom Tromey <tom@tromey.com>
2061
2062 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2063
6242c6a6
SM
20642018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2065
2066 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2067 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2068 * maint.c: Likewise.
2069 * top.c: Likewise.
2070
4e5b2f89
JB
20712018-07-04 Joel Brobecker <brobecker@adacore.com>
2072
2073 * NEWS: Create a new section for the next release branch.
2074 Rename the section of the current branch, now that it has
2075 been cut.
2076
538ccc4a
JB
20772018-07-04 Joel Brobecker <brobecker@adacore.com>
2078
2079 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2080 * version.in: Bump version to 8.2.50.DATE-git.
2081
1b919490
VB
20822018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2083 Pedro Alves <palves@redhat.com>
2084
2085 * linux-nat.c (linux_init_ptrace): Rename to ...
2086 (linux_init_ptrace_procfs): ... this. Call
2087 linux_proc_init_warnings.
2088 (linux_nat_target::post_attach)
2089 (linux_nat_target::post_startup_inferior): Adjust.
2090 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2091 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2092
1ea5da02
TV
20932018-07-04 Tom de Vries <tdevries@suse.de>
2094
2095 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2096 check ...
2097 (read_comp_unit_head): ... here.
2098
f51e0e20
TT
20992018-07-03 Tom Tromey <tom@tromey.com>
2100
2101 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2102 (stop_tracing, tstatus_command)
2103 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2104 (print_one_static_tracepoint_marker): Update.
2105 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2106 std::vector.
2107 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2108 VEC.
2109 (all_tracepoints, static_tracepoints_here): Return std::vector.
2110
d7e15655
TT
21112018-07-03 Tom Tromey <tom@tromey.com>
2112
2113 * common/ptid.c (ptid_equal): Remove.
2114 * common/ptid.h (ptid_equal): Don't declare.
2115 * ada-tasks.c: Update.
2116 * breakpoint.c: Update.
2117 * common/agent.c: Update.
2118 * corelow.c: Update.
2119 * darwin-nat-info.c: Update.
2120 * darwin-nat.c: Update.
2121 * dcache.c: Update.
2122 * dtrace-probe.c: Update.
2123 * dummy-frame.c: Update.
2124 * fbsd-nat.c: Update.
2125 * frame.c: Update.
2126 * gdbthread.h: Update.
2127 * gnu-nat.c: Update.
2128 * go32-nat.c: Update.
2129 * inf-loop.c: Update.
2130 * inf-ptrace.c: Update.
2131 * infcall.c: Update.
2132 * infcmd.c: Update.
2133 * inflow.c: Update.
2134 * infrun.c: Update.
2135 * linux-fork.c: Update.
2136 * linux-nat.c: Update.
2137 * linux-thread-db.c: Update.
2138 * mi/mi-cmd-var.c: Update.
2139 * mi/mi-interp.c: Update.
2140 * mi/mi-main.c: Update.
2141 * nto-procfs.c: Update.
2142 * ppc-linux-tdep.c: Update.
2143 * procfs.c: Update.
2144 * python/py-inferior.c: Update.
2145 * python/py-record-btrace.c: Update.
2146 * python/py-record.c: Update.
2147 * ravenscar-thread.c: Update.
2148 * regcache.c: Update.
2149 * remote-sim.c: Update.
2150 * remote.c: Update.
2151 * sol-thread.c: Update.
2152 * solib.c: Update.
2153 * target.c: Update.
2154 * tui/tui-stack.c: Update.
2155 * varobj.c: Update.
2156 * windows-nat.c: Update.
2157 * windows-tdep.c: Update.
2158
26a57c92
TT
21592018-07-03 Tom Tromey <tom@tromey.com>
2160
2161 * common/ptid.c (ptid_match): Remove.
2162 * common/ptid.h (ptid_match): Don't declare.
2163 * fbsd-nat.c: Update.
2164 * infcmd.c: Update.
2165 * infrun.c: Update.
2166 * linux-nat.c: Update.
2167 * record-btrace.c: Update.
2168 * regcache.c: Update.
2169 * remote.c: Update.
2170
d2a107e3
TT
21712018-07-03 Tom Tromey <tom@tromey.com>
2172
2173 * common/ptid.c (ptid_tid_p): Remove.
2174 * common/ptid.h (ptid_tid_p): Don't declare.
2175 * sol-thread.c: Update.
2176
15a9e13e
TT
21772018-07-03 Tom Tromey <tom@tromey.com>
2178
2179 * common/ptid.c (ptid_lwp_p): Remove.
2180 * common/ptid.h (ptid_lwp_p): Don't declare.
2181 * fbsd-nat.c: Update.
2182 * linux-nat.c: Update.
2183 * nat/linux-procfs.c: Update.
2184 * nat/x86-linux-dregs.c: Update.
2185 * sol-thread.c: Update.
2186
0e998d96
TT
21872018-07-03 Tom Tromey <tom@tromey.com>
2188
2189 * common/ptid.c (ptid_is_pid): Remove.
2190 * common/ptid.h (ptid_is_pid): Don't declare.
2191 * infrun.c: Update.
2192 * linux-nat.c: Update.
2193 * mi/mi-interp.c: Update.
2194 * remote.c: Update.
2195 * thread.c: Update.
2196
cc6bcb54
TT
21972018-07-03 Tom Tromey <tom@tromey.com>
2198
2199 * common/ptid.c (ptid_get_tid): Remove.
2200 * common/ptid.h (ptid_get_tid): Don't declare.
2201 * ada-tasks.c: Update.
2202 * aix-thread.c: Update.
2203 * bsd-uthread.c: Update.
2204 * darwin-nat.c: Update.
2205 * fbsd-nat.c: Update.
2206 * i386-darwin-nat.c: Update.
2207 * infrun.c: Update.
2208 * linux-tdep.c: Update.
2209 * nto-procfs.c: Update.
2210 * ppc-ravenscar-thread.c: Update.
2211 * python/py-infthread.c: Update.
2212 * ravenscar-thread.c: Update.
2213 * sol-thread.c: Update.
2214 * sparc-ravenscar-thread.c: Update.
2215 * windows-nat.c: Update.
2216
e38504b3
TT
22172018-07-03 Tom Tromey <tom@tromey.com>
2218
2219 * common/ptid.c (ptid_get_lwp): Remove.
2220 * common/ptid.h (ptid_get_lwp): Don't declare.
2221 * aarch64-linux-nat.c: Update.
2222 * ada-tasks.c: Update.
2223 * aix-thread.c: Update.
2224 * amd64-linux-nat.c: Update.
2225 * arm-linux-nat.c: Update.
2226 * corelow.c: Update.
2227 * fbsd-nat.c: Update.
2228 * fbsd-tdep.c: Update.
2229 * gnu-nat.c: Update.
2230 * i386-cygwin-tdep.c: Update.
2231 * i386-gnu-nat.c: Update.
2232 * i386-linux-nat.c: Update.
2233 * ia64-linux-nat.c: Update.
2234 * inf-ptrace.c: Update.
2235 * infrun.c: Update.
2236 * linux-fork.c: Update.
2237 * linux-nat.c: Update.
2238 * linux-tdep.c: Update.
2239 * linux-thread-db.c: Update.
2240 * mips-linux-nat.c: Update.
2241 * nat/aarch64-linux-hw-point.c: Update.
2242 * nat/aarch64-linux.c: Update.
2243 * nat/linux-btrace.c: Update.
2244 * nat/linux-osdata.c: Update.
2245 * nat/linux-procfs.c: Update.
2246 * nat/x86-linux-dregs.c: Update.
2247 * obsd-nat.c: Update.
2248 * ppc-fbsd-nat.c: Update.
2249 * ppc-linux-nat.c: Update.
2250 * procfs.c: Update.
2251 * python/py-infthread.c: Update.
2252 * ravenscar-thread.c: Update.
2253 * remote.c: Update.
2254 * s390-linux-nat.c: Update.
2255 * sol-thread.c: Update.
2256 * sol2-tdep.c: Update.
2257 * spu-linux-nat.c: Update.
2258 * x86-linux-nat.c: Update.
2259 * xtensa-linux-nat.c: Update.
2260
e99b03dc
TT
22612018-07-03 Tom Tromey <tom@tromey.com>
2262
2263 * common/ptid.c (ptid_get_pid): Remove.
2264 * common/ptid.h (ptid_get_pid): Don't declare.
2265 * aarch64-linux-nat.c: Update.
2266 * ada-lang.c: Update.
2267 * aix-thread.c: Update.
2268 * alpha-bsd-nat.c: Update.
2269 * amd64-fbsd-nat.c: Update.
2270 * amd64-linux-nat.c: Update.
2271 * arm-linux-nat.c: Update.
2272 * arm-nbsd-nat.c: Update.
2273 * auxv.c: Update.
2274 * break-catch-syscall.c: Update.
2275 * breakpoint.c: Update.
2276 * bsd-uthread.c: Update.
2277 * corelow.c: Update.
2278 * ctf.c: Update.
2279 * darwin-nat.c: Update.
2280 * fbsd-nat.c: Update.
2281 * fbsd-tdep.c: Update.
2282 * gcore.c: Update.
2283 * gnu-nat.c: Update.
2284 * hppa-nbsd-nat.c: Update.
2285 * hppa-obsd-nat.c: Update.
2286 * i386-fbsd-nat.c: Update.
2287 * ia64-linux-nat.c: Update.
2288 * inf-ptrace.c: Update.
2289 * infcmd.c: Update.
2290 * inferior.c: Update.
2291 * inferior.h: Update.
2292 * inflow.c: Update.
2293 * infrun.c: Update.
2294 * linux-fork.c: Update.
2295 * linux-nat.c: Update.
2296 * linux-tdep.c: Update.
2297 * linux-thread-db.c: Update.
2298 * m68k-bsd-nat.c: Update.
2299 * mi/mi-interp.c: Update.
2300 * mi/mi-main.c: Update.
2301 * mips-linux-nat.c: Update.
2302 * mips-nbsd-nat.c: Update.
2303 * mips64-obsd-nat.c: Update.
2304 * nat/aarch64-linux-hw-point.c: Update.
2305 * nat/aarch64-linux.c: Update.
2306 * nat/linux-btrace.c: Update.
2307 * nat/linux-osdata.c: Update.
2308 * nat/linux-procfs.c: Update.
2309 * nat/x86-linux-dregs.c: Update.
2310 * nto-procfs.c: Update.
2311 * obsd-nat.c: Update.
2312 * ppc-linux-nat.c: Update.
2313 * ppc-nbsd-nat.c: Update.
2314 * ppc-obsd-nat.c: Update.
2315 * proc-service.c: Update.
2316 * procfs.c: Update.
2317 * python/py-inferior.c: Update.
2318 * python/py-infthread.c: Update.
2319 * ravenscar-thread.c: Update.
2320 * record.c: Update.
2321 * remote-sim.c: Update.
2322 * remote.c: Update.
2323 * rs6000-nat.c: Update.
2324 * s390-linux-nat.c: Update.
2325 * sh-nbsd-nat.c: Update.
2326 * sol-thread.c: Update.
2327 * sparc-nat.c: Update.
2328 * sparc64-tdep.c: Update.
2329 * spu-linux-nat.c: Update.
2330 * spu-tdep.c: Update.
2331 * target-debug.h: Update.
2332 * target.c: Update.
2333 * thread.c: Update.
2334 * tid-parse.c: Update.
2335 * tracefile-tfile.c: Update.
2336 * vax-bsd-nat.c: Update.
2337 * windows-nat.c: Update.
2338 * x86-linux-nat.c: Update.
2339 * x86-nat.c: Update.
2340
f2907e49
TT
23412018-07-03 Tom Tromey <tom@tromey.com>
2342
2343 * common/ptid.c (pid_to_ptid): Remove.
2344 * common/ptid.h (pid_to_ptid): Don't declare.
2345 * aix-thread.c: Update.
2346 * arm-linux-nat.c: Update.
2347 * common/ptid.c: Update.
2348 * common/ptid.h: Update.
2349 * corelow.c: Update.
2350 * ctf.c: Update.
2351 * darwin-nat.c: Update.
2352 * fbsd-nat.c: Update.
2353 * fork-child.c: Update.
2354 * gnu-nat.c: Update.
2355 * go32-nat.c: Update.
2356 * inf-ptrace.c: Update.
2357 * infcmd.c: Update.
2358 * inferior.c: Update.
2359 * infrun.c: Update.
2360 * linux-fork.c: Update.
2361 * linux-nat.c: Update.
2362 * nat/aarch64-linux-hw-point.c: Update.
2363 * nat/fork-inferior.c: Update.
2364 * nat/x86-linux-dregs.c: Update.
2365 * nto-procfs.c: Update.
2366 * obsd-nat.c: Update.
2367 * procfs.c: Update.
2368 * progspace.c: Update.
2369 * remote.c: Update.
2370 * rs6000-nat.c: Update.
2371 * s390-linux-nat.c: Update.
2372 * sol-thread.c: Update.
2373 * spu-linux-nat.c: Update.
2374 * target.c: Update.
2375 * top.c: Update.
2376 * tracefile-tfile.c: Update.
2377 * windows-nat.c: Update.
2378
fd79271b
TT
23792018-07-03 Tom Tromey <tom@tromey.com>
2380
2381 * common/ptid.h (ptid_build): Don't declare.
2382 * common/ptid.c (ptid_build): Remove.
2383 * aix-thread.c: Update.
2384 * bsd-kvm.c: Update.
2385 * bsd-uthread.c: Update.
2386 * common/agent.c: Update.
2387 * common/ptid.c: Update.
2388 * common/ptid.h: Update.
2389 * corelow.c: Update.
2390 * darwin-nat.c: Update.
2391 * fbsd-nat.c: Update.
2392 * gnu-nat.c: Update.
2393 * linux-fork.c: Update.
2394 * linux-nat.c: Update.
2395 * linux-thread-db.c: Update.
2396 * nat/linux-osdata.c: Update.
2397 * nat/linux-procfs.c: Update.
2398 * nto-procfs.c: Update.
2399 * obsd-nat.c: Update.
2400 * proc-service.c: Update.
2401 * procfs.c: Update.
2402 * ravenscar-thread.c: Update.
2403 * remote-sim.c: Update.
2404 * remote.c: Update.
2405 * sol-thread.c: Update.
2406 * target.c: Update.
2407 * windows-nat.c: Update.
2408
057302ce
TT
24092018-07-03 Tom Tromey <tom@tromey.com>
2410
2411 * infrun.c (follow_exec): Use exit_inferior_silent.
2412 * inferior.c (exit_inferior_num_silent): Remove.
2413 * inferior.h (exit_inferior_num_silent): Don't declare.
2414
a50c11c6
TT
24152018-07-03 Tom Tromey <tom@tromey.com>
2416
2417 PR cli/23340:
2418 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2419 inferior_ptid on error.
2420
471b9d15
MR
24212018-07-02 Maciej W. Rozycki <macro@mips.com>
2422 Simon Marchi <simon.marchi@polymtl.ca>
2423
2424 PR tdep/8282
2425 * disasm.h (gdb_disassembler): Add
2426 `m_disassembler_options_holder'. member
2427 * disasm.c (get_all_disassembler_options): New function.
2428 (gdb_disassembler::gdb_disassembler): Use it.
2429 (gdb_buffered_insn_length_init_dis): Likewise.
2430 (gdb_buffered_insn_length): Adjust accordingly.
2431 (set_disassembler_options): Handle options with arguments.
2432 (show_disassembler_options_sfunc): Likewise. Add a leading new
2433 line if showing options with descriptions.
2434 (disassembler_options_completer): Adapt to using the
2435 `disasm_options_and_args_t' structure.
2436 * mips-tdep.c (mips_disassembler_options): New variable.
2437 (mips_disassembler_options_o32): Likewise.
2438 (mips_disassembler_options_n32): Likewise.
2439 (mips_disassembler_options_n64): Likewise.
2440 (gdb_print_insn_mips): Don't set `disassembler_options'.
2441 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2442 functions.
2443 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2444 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2445 `gdbarch_disassembler_options_implicit' and
2446 `gdbarch_valid_disassembler_options'.
2447 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2448 `disasm_options_and_args_t' structure.
2449 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2450 method.
2451 (valid_disassembler_options): Switch from `disasm_options_t' to
2452 the `disasm_options_and_args_t' structure.
2453 * NEWS: Document `set disassembler-options' support for the MIPS
2454 target.
2455 * gdbarch.h: Regenerate.
2456 * gdbarch.c: Regenerate.
2457
41823f29
SH
24582018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2459
2460 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2461
41206e32
JB
24622018-06-29 Joel Brobecker <brobecker@adacore.com>
2463
2464 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2465 parameter in call to amd64_target_description.
2466 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2467 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2468 (amd64fbsd_init_abi): Likewise.
2469 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2470 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2471 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2472 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2473
de52b960
PA
24742018-06-29 Pedro Alves <palves@redhat.com>
2475
2476 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2477 "segments" parameter.
2478 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2479 (_initialize_amd64_tdep): Update call to
2480 amd64_create_target_description.
2481 (amd64_target_description): Add "segments" parameter. Adjust
2482 the implementation to use it.
2483 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2484 call to amd64_create_target_description.
2485 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2486 * gdb/arch/amd64.h (amd64_create_target_description): Add
2487 "segments" register.
2488 * gdb/arch/amd64.c (amd64_create_target_description): Add
2489 "segments" parameter. Call create_feature_i386_64bit_segments
2490 only if SEGMENTS is true.
2491 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2492 call to amd64_create_target_description.
2493
75acb486
PA
24942018-06-29 Pedro Alves <palves@redhat.com>
2495
2496 * thread.c (thread_target_id_str): New, factored out from ...
2497 (print_thread_info_1): ... here. Use it to compute the max
2498 "Target Id" column width.
2499
c76a8ea3
PA
25002018-06-29 Pedro Alves <palves@redhat.com>
2501
2502 * remote.c (remote_target::extra_thread_info): Delete
2503 'display_buf' and 'n' locals. from the cache, regardless of
2504 packet mechanims is in use. Use cache for qThreadExtra and qP
2505 methods too.
2506
cd2bb709
PA
25072018-06-29 Pedro Alves <palves@redhat.com>
2508
2509 * blockframe.c (find_pc_sect_containing_function): New function.
2510 * breakpoint.c (print_breakpoint_location): Don't call
2511 find_pc_sect_function.
2512 * linespec.c (create_sals_line_offset): Record the location's
2513 symbol in the sal.
2514 * linespec.c (convert_address_location_to_sals): Fill in sal's
2515 symbol with find_pc_sect_containing_function.
2516 * symtab.c (find_function_start_sal): Rename to ...
2517 (find_function_start_sal_1): ... this.
2518 (find_function_start_sal): Reimplement as wrapper around
2519 find_function_start_sal_1, and use
2520 find_pc_sect_containing_function to fill in the sal's symbol.
2521 (find_function_start_sal(symbol*, bool)): Adjust.
2522 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2523 comments.
2524 (find_pc_sect_containing_function): Declare.
2525
991ff292
PA
25262018-06-29 Pedro Alves <palves@redhat.com>
2527
2528 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2529 true if the the location has no symbol.
2530
44cee4fd
TT
25312018-06-28 Tom Tromey <tom@tromey.com>
2532
2533 * NEWS: Mention --enable-codesign.
2534 * silent-rules.mk (ECHO_SIGN): New variable.
2535 * configure.ac: Add --enable-codesign.
2536 * configure: Rebuild.
2537 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2538 (gdb$(EXEEXT)): Optionally invoke codesign.
2539
f2ffa92b
PA
25402018-06-28 Pedro Alves <palves@redhat.com>
2541
2542 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2543 comments.
2544 (switch_to_thread_no_regs): Adjust comment.
2545 * infcmd.c (stop_pc): Delete.
2546 (post_create_inferior, info_program_command): Replace references
2547 to stop_pc with references to thread_info->suspend.stop_pc.
2548 * inferior.h (stop_pc): Delete declaration.
2549 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2550 (handle_inferior_event_1, handle_signal_stop)
2551 (process_event_stop_test, keep_going_stepped_thread)
2552 (handle_step_into_function, handle_step_into_function_backward)
2553 (print_stop_location): Replace references to stop_pc with
2554 references to thread_info->suspend.stop_pc.
2555 (struct infcall_suspend_state) <stop_pc>: Delete field.
2556 (save_infcall_suspend_state, restore_infcall_suspend_state):
2557 Remove references to inf_stat->stop_pc.
2558 * linux-fork.c (fork_load_infrun_state): Likewise.
2559 * record-btrace.c (record_btrace_set_replay): Likewise.
2560 * record-full.c (record_full_goto_entry): Likewise.
2561 * remote.c (print_one_stopped_thread): Likewise.
2562 * target.c (target_resume): Extend comment.
2563 * thread.c (set_executing_thread): New.
2564 (set_executing): Use it.
2565 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2566 Remove references to stop_pc.
2567
ecdc3a72
PA
25682018-06-28 Pedro Alves <palves@redhat.com>
2569
2570 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2571 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2572
d95d3aef
TT
25732018-06-28 Tom Tromey <tom@tromey.com>
2574
2575 * coffread.c (coff_symfile_finish): Update.
2576 * xcoffread.c (xcoff_symfile_finish): Update.
2577 * elfread.c (elf_symfile_finish): Update.
2578 * symfile.h (dwarf2_free_objfile): Don't declare.
2579 * dwarf2read.c (_initialize_dwarf2_read): Use
2580 register_objfile_data_with_cleanup.
2581 (dwarf2_free_objfile): Now static. Change signature.
2582
291f9a96
PT
25832018-06-28 Petr Tesarik <ptesarik@suse.cz>
2584
2585 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2586 option "-o" to add-symbol-file-load to add an offset to each
2587 section's load address.
2588 * symfile.c (set_objfile_default_section_offset): New function.
2589
d81a3eaf
PT
25902018-06-28 Petr Tesarik <ptesarik@suse.cz>
2591
2592 * symfile.c (add_symbol_file_command): Make sure that sections
2593 with the same name are sorted in the same order.
2594
ed6dfe51
PT
25952018-06-28 Petr Tesarik <ptesarik@suse.cz>
2596
2597 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2598 require the second argument. If omitted, load sections at the
2599 addresses specified in the file.
2600
d4d429d5
PT
26012018-06-28 Petr Tesarik <ptesarik@suse.cz>
2602
2603 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2604 (_initialize_symfile): Add option "-o" to symbol-file to add an
2605 offset to each section of the symbol file.
2606
39b27ab6
PT
26072018-06-28 Petr Tesarik <ptesarik@suse.cz>
2608
2609 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2610
41827fc3
TT
26112018-06-27 Tom Tromey <tom@tromey.com>
2612
2613 * stack.c (_initialize_stack): Update "func" help text.
2614
0c6aef22
TT
26152018-06-27 Tom Tromey <tom@tromey.com>
2616
2617 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2618 std::vector.
2619 (unwind_infopy_str, pyuw_create_unwind_info)
2620 (unwind_infopy_add_saved_register, pyuw_sniffer)
2621 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2622 Update.
2623 (struct saved_reg): Add constructor.
2624 <value>: Now a gdbpy_ref<>.
2625
63177289
TT
26262018-06-27 Tom Tromey <tom@tromey.com>
2627
2628 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2629
e76f78a0
SM
26302018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2631
2632 * gdb-gdb.py.in: Format using autopep8.
2633
9a14af7b
SM
26342018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2635
2636 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2637 (type_lookup_function): Recognize CORE_ADDR values.
2638
189366cd
SM
26392018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2640
2641 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2642 print tag_name.
2643
68ad5fb9
SM
26442018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2645
2646 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2647 <__lt__>: Add.
2648
141ec9f6
SM
26492018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2650
2651 * gdb-gdb.py: Move to...
2652 * gdb-gdb.py.in: ... here.
2653 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2654 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2655 dependencies.
2656 (distclean): Remove gdb-gdb.py when cleaning.
2657 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2658 * configure: Re-generate.
2659
4c4e7ad4
PA
26602018-06-27 Pedro Alves <palves@redhat.com>
2661
2662 * proc-service.c (get_ps_regcache): New.
2663 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2664 (ps_lsetfpregs): Use it.
2665
7ab6656f
OJ
26662018-06-27 Omair Javaid <omair.javaid@linaro.org>
2667
2668 PR gdb/21695
2669 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2670 (dwarf_decode_lines_1): Adjust.
2671
bd583225
SM
26722018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2673
2674 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2675 override.
2676 <info_proc>: Likewise.
2677
9a325b7b
JB
26782018-06-26 Joel Brobecker <brobecker@adacore.com>
2679
2680 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2681 to windows_fetch_one_register, and only handle the case of
2682 fetching one register. Move the code that reloads the context
2683 and iterates over all registers if R is negative to...
2684 (windows_nat_target::fetch_registers): ... here.
2685 (do_windows_store_inferior_registers): Rename to
2686 windows_store_one_register, and only handle the case of storing
2687 one register. Move the code that handles the case where r is
2688 negative to...
2689 (windows_nat_target::store_registers) ... here.
2690
a33ccfc7
TT
26912018-06-26 Tom Tromey <tom@tromey.com>
2692
2693 PR rust/22574:
2694 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2695 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2696 Update.
2697 (rust_internal_print_type): Add podata parameter.
2698 (rust_print_type): Update.
2699
e0c547d1
TT
27002018-06-26 Tom Tromey <tom@tromey.com>
2701
2702 * typeprint.h (struct print_offset_data) <update, finish,
2703 maybe_print_hole>: New methods.
2704 <indentation>: New constant.
2705 * typeprint.c (print_offset_data::indentation): Define.
2706 (print_offset_data::maybe_print_hole, print_offset_data::update)
2707 (print_offset_data::finish): Move from c-typeprint.c and rename.
2708 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2709 (print_spaces_filtered_with_print_options): Update.
2710 (c_print_type_union_field_offset, maybe_print_hole)
2711 (c_print_type_struct_field_offset): Move to typeprint.c and
2712 rename.
2713 (c_type_print_base_struct_union): Update.
2714
75cbc781
PA
27152018-06-25 Pedro Alves <palves@redhat.com>
2716
2717 * gdbthread.h (thread_info_ref, delete_thread)
2718 (delete_thread_silent, first_thread_of_inferior)
2719 (any_thread_of_inferior, switch_to_thread)
2720 (enable_thread_stack_temporaries)
2721 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2722 (get_last_thread_stack_temporary)
2723 (value_in_thread_stack_temporaries, can_access_registers_thread):
2724 Spell out "struct thread_info" instead of just "thread_info".
2725 * inferior.h (notice_new_inferior): Likewise.
2726
b7a08269
PA
27272018-06-25 Pedro Alves <palves@redhat.com>
2728
2729 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2730 pass thread_info pointer to delete_thread.
2731 (windows_nat_target::detach): Pass inferior pointer to
2732 detach_inferior.
2733 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2734 delete_thread.
2735 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2736 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2737 and pass a thread_info pointer to delete_thread.
2738 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2739 pass thread_info pointer to delete_thread.
2740 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2741 delete_thread_silent call.
2742 * procfs.c (procfs_target::detach): Pass inferior pointer to
2743 detach_inferior.
2744 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2745 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2746 delete_thread_silent call.
2747 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2748 pass thread_info pointer to delete_thread.
2749 (windows_nat_target::detach): Pass inferior pointer to
2750 delete_inferior.
2751
8e7767e3
AH
27522018-06-22 Alan Hayward <alan.hayward@arm.com>
2753
2754 * regcache.c (readable_regcache::read_part): Fix asserts.
2755 (reg_buffer::raw_collect_part): New function.
2756 (regcache::write_part): Fix asserts.
2757 (reg_buffer::raw_supply_part): New function.
2758 (regcache::transfer_regset_register): New helper function.
2759 (regcache::transfer_regset): Call new functions.
2760 (regcache_supply_regset): Use gdb_byte*.
2761 (regcache::supply_regset): Likewise.
2762 (regcache_collect_regset): Likewise.
2763 (regcache::collect_regset): Likewise.
2764 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2765 (reg_buffer::raw_supply_part): Likewise.
2766 (regcache::transfer_regset_register): Likewise.
2767 (regcache::transfer_regset): Use gdb_byte*.
2768
bfd60e34
AH
27692018-06-22 Alan Hayward <alan.hayward@arm.com>
2770
2771 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2772
00431a78
PA
27732018-06-21 Pedro Alves <palves@redhat.com>
2774
2775 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2776 instead of a ptid_t. All callers adjusted.
2777 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2778 adjusted.
2779 (print_ada_task_info, display_current_task_id, task_command_1):
2780 Adjust.
2781 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2782 inferior_thread.
2783 (breakpoint_kind): Adjust.
2784 (remove_breakpoints_pid): Rename to ...
2785 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2786 pointer. All callers adjusted.
2787 (bpstat_clear_actions): Use inferior_thread.
2788 (get_bpstat_thread): New.
2789 (bpstat_do_actions): Use it.
2790 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2791 to take a thread_info pointer. All callers adjusted.
2792 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2793 (breakpoint_re_set_thread): Use inferior_thread.
2794 * breakpoint.h (struct inferior): Forward declare.
2795 (bpstat_stop_status): Update.
2796 (remove_breakpoints_pid): Delete.
2797 (remove_breakpoints_inf): New.
2798 * bsd-uthread.c (bsd_uthread_target::wait)
2799 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2800 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2801 (maint_btrace_packet_history_cmd)
2802 (maint_btrace_clear_packet_history_cmd): Adjust.
2803 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2804 inferior_thread.
2805 * cli/cli-interp.c: Include "inferior.h".
2806 * common/refcounted-object.h (struct
2807 refcounted_object_ref_policy): New.
2808 * compile/compile-object-load.c: Include gdbthread.h.
2809 (store_regs): Use inferior_thread.
2810 * corelow.c (core_target::close): Use current_inferior.
2811 (core_target_open): Adjust to use first_thread_of_inferior and use
2812 the current inferior.
2813 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2814 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2815 <thread>: ... this new field. All references adjusted.
2816 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2817 Take a thread_info pointer instead of a ptid_t.
2818 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2819 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2820 thread_info pointer instead of a ptid_t.
2821 * elfread.c: Include "inferior.h".
2822 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2823 Use inferior_thread.
2824 * eval.c (evaluate_subexp): Likewise.
2825 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2826 inferior_thread.
2827 * gdb_proc_service.h (struct thread_info): Forward declare.
2828 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2829 <thread>: ... this new field. All references adjusted.
2830 * gdbarch.h, gdbarch.c: Regenerate.
2831 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2832 'thread' parameter. All implementations and callers adjusted.
2833 * gdbthread.h (thread_info) <set_running>: New method.
2834 (delete_thread, delete_thread_silent): Take a thread_info pointer
2835 instead of a ptid.
2836 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2837 (first_thread_of_process): Delete, replaced by ...
2838 (first_thread_of_inferior): ... this new function. All callers
2839 adjusted.
2840 (any_live_thread_of_process): Delete, replaced by ...
2841 (any_live_thread_of_inferior): ... this new function. All callers
2842 adjusted.
2843 (switch_to_thread, switch_to_no_thread): Declare.
2844 (is_executing): Delete.
2845 (enable_thread_stack_temporaries): Update comment.
2846 <enable_thread_stack_temporaries>: Take a thread_info pointer
2847 instead of a ptid_t. Incref the thread.
2848 <~enable_thread_stack_temporaries>: Decref the thread.
2849 <m_ptid>: Delete
2850 <m_thr>: New.
2851 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2852 (get_last_thread_stack_temporary)
2853 (value_in_thread_stack_temporaries, can_access_registers_thread):
2854 Take a thread_info pointer instead of a ptid_t. All callers
2855 adjusted.
2856 * infcall.c (get_call_return_value): Use inferior_thread.
2857 (run_inferior_call): Work with thread pointers instead of ptid_t.
2858 (call_function_by_hand_dummy): Work with thread pointers instead
2859 of ptid_t. Use thread_info_ref.
2860 * infcmd.c (proceed_thread_callback): Access thread's state
2861 directly.
2862 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2863 access thread's state directly.
2864 (continue_command): Use inferior_thread.
2865 (info_program_command): Use find_thread_ptid and access thread
2866 state directly.
2867 (proceed_after_attach_callback): Use thread state directly.
2868 (notice_new_inferior): Take a thread_info pointer instead of a
2869 ptid_t. All callers adjusted.
2870 (exit_inferior): Take an inferior pointer instead of a pid. All
2871 callers adjusted.
2872 (exit_inferior_silent): New.
2873 (detach_inferior): Delete.
2874 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2875 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2876 (detach_inferior_command, kill_inferior_command): Use
2877 find_inferior_id instead of valid_gdb_inferior_id and
2878 gdb_inferior_id_to_pid.
2879 (inferior_command): Use inferior and thread pointers.
2880 * inferior.h (struct thread_info): Forward declare.
2881 (notice_new_inferior): Take a thread_info pointer instead of a
2882 ptid_t. All callers adjusted.
2883 (detach_inferior): Delete declaration.
2884 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2885 instead of a pid. All callers adjusted.
2886 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2887 (valid_gdb_inferior_id): Delete.
2888 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2889 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2890 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2891 ...
2892 <inf>: ... this new field.
2893 <step_ptid>: Delete, replaced by ...
2894 <step_thread>: ... this new field.
2895 (get_displaced_stepping_state): Take an inferior pointer instead
2896 of a pid. All callers adjusted.
2897 (displaced_step_in_progress_any_inferior): Adjust.
2898 (displaced_step_in_progress_thread): Take a thread pointer instead
2899 of a ptid_t. All callers adjusted.
2900 (displaced_step_in_progress, add_displaced_stepping_state): Take
2901 an inferior pointer instead of a pid. All callers adjusted.
2902 (get_displaced_step_closure_by_addr): Adjust.
2903 (remove_displaced_stepping_state): Take an inferior pointer
2904 instead of a pid. All callers adjusted.
2905 (displaced_step_prepare_throw, displaced_step_prepare)
2906 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2907 All callers adjusted.
2908 (start_step_over): Adjust.
2909 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2910 displaced step queue.
2911 (do_target_resume): Adjust.
2912 (fetch_inferior_event): Use inferior_thread.
2913 (context_switch, get_inferior_stop_soon): Take an
2914 execution_control_state pointer instead of a ptid_t. All callers
2915 adjusted.
2916 (switch_to_thread_cleanup): Delete.
2917 (stop_all_threads): Use scoped_restore_current_thread.
2918 * inline-frame.c: Include "gdbthread.h".
2919 (inline_state) <inline_state>: Take a thread pointer instead of a
2920 ptid_t. All callers adjusted.
2921 <ptid>: Delete, replaced by ...
2922 <thread>: ... this new field.
2923 (find_inline_frame_state): Take a thread pointer instead of a
2924 ptid_t. All callers adjusted.
2925 (skip_inline_frames, step_into_inline_frame)
2926 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2927 pointer instead of a ptid_t. All callers adjusted.
2928 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2929 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2930 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2931 pointers directly.
2932 * linux-nat.c (get_detach_signal): Likewise.
2933 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2934 (thread_db_notice_clone): Adjust.
2935 (thread_db_find_new_threads_silently)
2936 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2937 a thread pointer instead of a ptid_t. All callers adjusted.
2938 * mi/mi-cmd-var.c: Include "inferior.h".
2939 (mi_cmd_var_update_iter): Update to use thread pointers.
2940 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2941 inferior directly.
2942 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2943 out to ...
2944 (mi_output_running): ... this new function.
2945 (mi_on_resume_1): Adjust to use it.
2946 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2947 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2948 directly.
2949 (interrupt_thread_callback): : Adjust to use thread and inferior
2950 pointers.
2951 * proc-service.c: Include "gdbthread.h".
2952 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2953 * progspace-and-thread.c: Include "inferior.h".
2954 * progspace.c: Include "inferior.h".
2955 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2956 hold a reference to an inferior_object.
2957 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2958 inferior_thread.
2959 * python/py-inferior.c (struct inferior_object): Give the type a
2960 tag name instead of a typedef.
2961 (python_on_normal_stop): No need to check if the current thread is
2962 listed.
2963 (inferior_to_inferior_object): Change return type to
2964 inferior_object. All callers adjusted.
2965 (find_thread_object): Delete, bits factored out to ...
2966 (thread_to_thread_object): ... this new function.
2967 * python/py-infthread.c (create_thread_object): Use
2968 inferior_to_inferior_object.
2969 (thpy_is_stopped): Use thread pointer directly.
2970 (gdbpy_selected_thread): Use inferior_thread.
2971 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2972 field, replaced with ...
2973 <thread>: ... this new field. All users adjusted.
2974 (btpy_insn_or_gap_new): Drop const.
2975 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2976 callers adjusted.
2977 * python/py-record.c: Include "gdbthread.h".
2978 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2979 a ptid_t. All callers adjusted.
2980 (gdbpy_current_recording): Use inferior_thread.
2981 * python/py-record.h (recpy_record_object) <ptid>: Delete
2982 field, replaced with ...
2983 <thread>: ... this new field. All users adjusted.
2984 (recpy_element_object) <ptid>: Delete
2985 field, replaced with ...
2986 <thread>: ... this new field. All users adjusted.
2987 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2988 a ptid_t. All callers adjusted.
2989 * python/py-threadevent.c: Include "gdbthread.h".
2990 (get_event_thread): Use thread_to_thread_object.
2991 * python/python-internal.h (struct inferior_object): Forward
2992 declare.
2993 (find_thread_object, find_inferior_object): Delete declarations.
2994 (thread_to_thread_object, inferior_to_inferior_object): New
2995 declarations.
2996 * record-btrace.c: Include "inferior.h".
2997 (require_btrace_thread): Use inferior_thread.
2998 (record_btrace_frame_sniffer)
2999 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3000 (get_thread_current_frame): Use scoped_restore_current_thread and
3001 switch_to_thread.
3002 (get_thread_current_frame): Use thread pointer directly.
3003 (record_btrace_replay_at_breakpoint): Use thread's inferior
3004 pointer directly.
3005 * record-full.c: Include "inferior.h".
3006 * regcache.c: Include "gdbthread.h".
3007 (get_thread_arch_regcache): Use the inferior's address space
3008 directly.
3009 (get_thread_regcache, registers_changed_thread): New.
3010 * regcache.h (get_thread_regcache(thread_info *thread)): New
3011 overload.
3012 (registers_changed_thread): New.
3013 (remote_target) <remote_detach_1>: Swap order of parameters.
3014 (remote_add_thread): <remote_add_thread>: Return the new thread.
3015 (get_remote_thread_info(ptid_t)): New overload.
3016 (remote_target::remote_notice_new_inferior): Use thread pointers
3017 directly.
3018 (remote_target::process_initial_stop_replies): Use
3019 thread_info::set_running.
3020 (remote_target::remote_detach_1, remote_target::detach)
3021 (extended_remote_target::detach): Adjust.
3022 * stack.c (frame_show_address): Use inferior_thread.
3023 * target-debug.h (target_debug_print_thread_info_pp): New.
3024 * target-delegates.c: Regenerate.
3025 * target.c (default_thread_address_space): Delete.
3026 (memory_xfer_partial_1): Use current_inferior.
3027 (target_detach): Use current_inferior.
3028 (target_thread_address_space): Delete.
3029 (generic_mourn_inferior): Use current_inferior.
3030 * target.h (struct target_ops) <thread_address_space>: Delete.
3031 (target_thread_address_space): Delete.
3032 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3033 pointers directly.
3034 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3035 thread pointer instead of a ptid_t. Adjust all callers.
3036 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3037 (first_thread_of_process): Delete, replaced by ...
3038 (first_thread_of_inferior): ... this new function. All callers
3039 adjusted.
3040 (any_thread_of_process): Rename to ...
3041 (any_thread_of_inferior): ... this, and take an inferior pointer.
3042 (any_live_thread_of_process): Rename to ...
3043 (any_live_thread_of_inferior): ... this, and take an inferior
3044 pointer.
3045 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3046 (value_in_thread_stack_temporaries)
3047 (get_last_thread_stack_temporary): Take a thread pointer instead
3048 of a ptid_t. Adjust all callers.
3049 (thread_info::set_running): New.
3050 (validate_registers_access): Use inferior_thread.
3051 (can_access_registers_ptid): Rename to ...
3052 (can_access_registers_thread): ... this, and take a thread
3053 pointer.
3054 (print_thread_info_1): Adjust to compare thread pointers instead
3055 of ptids.
3056 (switch_to_no_thread, switch_to_thread): Make extern.
3057 (scoped_restore_current_thread::~scoped_restore_current_thread):
3058 Use m_thread pointer directly.
3059 (scoped_restore_current_thread::scoped_restore_current_thread):
3060 Use inferior_thread.
3061 (thread_command): Use thread pointer directly.
3062 (thread_num_make_value_helper): Use inferior_thread.
3063 * top.c (execute_command): Use inferior_thread.
3064 * tui/tui-interp.c: Include "inferior.h".
3065 * varobj.c (varobj_create): Use inferior_thread.
3066 (value_of_root_1): Use find_thread_global_id instead of
3067 global_thread_id_to_ptid.
3068
33bab475
AH
30692018-06-21 Alan Hayward <alan.hayward@arm.com>
3070
3071 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3072 possible.
3073 (regcache::write_part): Likewise.
3074 (readable_regcache::cooked_read_part): Update comment.
3075 (readable_regcache::cooked_write_part): Likewise.
3076 * regcache.h: (readable_regcache::read_part): Likewise.
3077 (regcache::write_part): Likewise.
3078
8363f9d5
RB
30792018-06-21 Richard Bunt <richard.bunt@arm.com>
3080 Dirk Schubert <dirk.schubert@arm.com>
3081
3082 * aarch64-linux-nat.c (post_attach): New.
3083 (aarch64_linux_nat_target::post_attach): Override post_attach to
3084 record the number of hardware debug registers.
3085
0d0b0ea2
TT
30862018-06-20 Tom Tromey <tom@tromey.com>
3087
3088 * python/py-param.c (add_setshow_generic): Make parameters const.
3089 (parmpy_init): Update.
3090
302abd6e
SM
30912018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3092
3093 * regcache.h (regcache_cooked_read_ftype): Rename to...
3094 (register_read_ftype): ...this, change type to function_view.
3095 (class reg_buffer) <save>: Remove src parameter.
3096 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3097 parameter non-const in first overload. Remove src parameter in
3098 second overload.
3099 * regcache.c (do_cooked_read): Remove.
3100 (readonly_detached_regcache::readonly_detached_regcache): Make
3101 parameter non-const, adjust call to other constructor.
3102 (reg_buffer::save): Remove src parameter.
3103 * frame.c (do_frame_register_read): Remove.
3104 (frame_save_as_regcache): Use lambda function.
3105 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3106 parameter to ppu2spu_data *.
3107 (ppu2spu_sniffer): Use lambda function.
3108
19f3f25f
SM
31092018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3110
3111 * record-full.c (record_full_target::insert_breakpoint): Remove
3112 "struct" keyword, add const.
3113
d0ac1c44
SM
31142018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3115
3116 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3117 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3118 * configure.ac: Remove AC_PREREQ, add missing quoting.
3119 * gnulib/configure.ac: Modernize usage of
3120 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3121 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3122 (AUTOMAKE_VERSION): Bump to 1.15.1.
3123 * configure: Re-generate.
3124 * config.in: Re-generate.
3125 * aclocal.m4: Re-generate.
3126 * gnulib/aclocal.m4: Re-generate.
3127 * gnulib/config.in: Re-generate.
3128 * gnulib/configure: Re-generate.
3129 * gnulib/import/Makefile.in: Re-generate.
3130
6ae50267
PA
31312018-06-19 Pedro Alves <palves@redhat.com>
3132
3133 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3134 (lookup_minimal_symbol_by_pc_section): ... here with
3135 gdb_assert_not_reached added.
3136
61b04dd0
PA
31372018-06-19 Pedro Alves <palves@redhat.com>
3138
3139 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3140 parameter with a block parameter. Compare location's block symbol
3141 with the frame's block instead of addresses.
3142 (skip_inline_frames): Pass the current block instead of the
3143 frame's address. Break out as soon as we determine the frame
3144 should not be skipped.
3145
f709fabb
TT
31462018-06-18 Tom Tromey <tom@tromey.com>
3147
3148 * solib-aix.c (solib_aix_get_section_offsets): Return
3149 unique_xmalloc_ptr.
3150 (solib_aix_solib_create_inferior_hook): Update.
3151
668eb2f0
TT
31522018-06-18 Tom Tromey <tom@tromey.com>
3153
3154 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3155
309822ca
TT
31562018-06-18 Tom Tromey <tom@tromey.com>
3157
3158 * solib-frv.c (frv_relocate_main_executable): Use
3159 unique_xmalloc_ptr.
3160 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3161 unique_xmalloc_ptr.
3162
06424eac
TT
31632018-06-18 Tom Tromey <tom@tromey.com>
3164
3165 * objfiles.h (inhibit_section_map_updates): Update.
3166 (resume_section_map_updates, resume_section_map_updates_cleanup):
3167 Remove.
3168 * solib-svr4.c (svr4_handle_solib_event): Update.
3169 * objfiles.c (inhibit_section_map_updates): Return
3170 scoped_restore_tmpl<int>.
3171 (resume_section_map_updates, resume_section_map_updates_cleanup):
3172 Remove.
3173
b4be9fad
TT
31742018-06-18 Tom Tromey <tom@tromey.com>
3175
3176 * valprint.h (read_string): Update.
3177 * valprint.c (read_string): Change type of "buffer".
3178 (val_print_string): Update.
3179 * python/py-value.c (valpy_string): Update.
3180 * language.h (struct language_defn) <la_get_string>: Change
3181 type of "buffer".
3182 (default_get_string, c_get_string): Update.
3183 * language.c (default_get_string): Change type of "buffer".
3184 * guile/scm-value.c (gdbscm_value_to_string): Update.
3185 * c-lang.c (c_get_string): Change type of "buffer".
3186
3f0dbd67
TT
31872018-06-18 Tom Tromey <tom@tromey.com>
3188
3189 * ser-mingw.c (struct pipe_state_destroyer): New.
3190 (pipe_state_up): New typedef.
3191 (cleanup_pipe_state): Remove.
3192 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3193
69d340c6
TT
31942018-06-18 Tom Tromey <tom@tromey.com>
3195
3196 * rust-lang.h (rust_yyerror): Don't declare.
3197 * rust-lang.c (rust_language_defn): Update.
3198 * rust-exp.y (yyerror): Now static.
3199 * parse.c (parse_exp_in_context_1): Update.
3200 * p-lang.h (p_yyerror): Don't declare.
3201 * p-lang.c (p_language_defn): Update.
3202 * p-exp.y (yyerror): Now static.
3203 * opencl-lang.c (opencl_language_defn): Update.
3204 * objc-lang.c (objc_language_defn): Update.
3205 * m2-lang.h (m2_yyerror): Don't declare.
3206 * m2-lang.c (m2_language_defn): Update.
3207 * m2-exp.y (yyerror): Now static.
3208 * language.h (struct language_defn) <la_error>: Remove.
3209 * language.c (unk_lang_error): Remove.
3210 (unknown_language_defn, auto_language_defn): Remove.
3211 * go-lang.h (go_yyerror): Don't declare.
3212 * go-lang.c (go_language_defn): Update.
3213 * go-exp.y (yyerror): Now static.
3214 * f-lang.h (f_yyerror): Don't declare.
3215 * f-lang.c (f_language_defn): Update.
3216 * f-exp.y (yyerror): Now static.
3217 * d-lang.h (d_yyerror): Don't declare.
3218 * d-lang.c (d_language_defn): Update.
3219 * d-exp.y (yyerror): Now static.
3220 * c-lang.h (c_yyerror): Don't declare.
3221 * c-lang.c (c_language_defn, cplus_language_defn)
3222 (asm_language_defn, minimal_language_defn): Update.
3223 * c-exp.y (yyerror): Now static.
3224 * ada-lang.h (ada_yyerror): Don't declare.
3225 * ada-lang.c (ada_language_defn): Update.
3226 * ada-exp.y (yyerror): Now static.
3227
e9902bfc
AH
32282018-06-18 Alan Hayward <alan.hayward@arm.com>
3229
3230 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3231 (store_sveregs_to_thread): Likewise.
3232 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3233 (aarch64_linux_store_inferior_registers): Likewise.
3234 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3235 function.
3236 (aarch64_sve_regs_copy_to_regcache): Likewise.
3237 (aarch64_sve_regs_copy_from_regcache): Likewise.
3238 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3239 declaration.
3240 (aarch64_sve_regs_copy_to_regcache): Likewise.
3241 (aarch64_sve_regs_copy_from_regcache): Likewise.
3242 (sve_context): Structure from Linux headers.
3243 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3244 (SVE_SIG_ZREG_SIZE): Likewise.
3245 (SVE_SIG_PREG_SIZE): Likewise.
3246 (SVE_SIG_FFR_SIZE): Likewise.
3247 (SVE_SIG_REGS_OFFSET): Likewise.
3248 (SVE_SIG_ZREGS_OFFSET): Likewise.
3249 (SVE_SIG_ZREG_OFFSET): Likewise.
3250 (SVE_SIG_ZREGS_SIZE): Likewise.
3251 (SVE_SIG_PREGS_OFFSET): Likewise.
3252 (SVE_SIG_PREG_OFFSET): Likewise.
3253 (SVE_SIG_PREGS_SIZE): Likewise.
3254 (SVE_SIG_FFR_OFFSET): Likewise.
3255 (SVE_SIG_REGS_SIZE): Likewise.
3256 (SVE_SIG_CONTEXT_SIZE): Likewise.
3257 (SVE_PT_REGS_MASK): Likewise.
3258 (SVE_PT_REGS_FPSIMD): Likewise.
3259 (SVE_PT_REGS_SVE): Likewise.
3260 (SVE_PT_VL_INHERIT): Likewise.
3261 (SVE_PT_VL_ONEXEC): Likewise.
3262 (SVE_PT_REGS_OFFSET): Likewise.
3263 (SVE_PT_FPSIMD_OFFSET): Likewise.
3264 (SVE_PT_FPSIMD_SIZE): Likewise.
3265 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3266 (SVE_PT_SVE_PREG_SIZE): Likewise.
3267 (SVE_PT_SVE_FFR_SIZE): Likewise.
3268 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3269 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3270 (__SVE_SIG_TO_PT): Likewise.
3271 (SVE_PT_SVE_OFFSET): Likewise.
3272 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3273 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3274 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3275 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3276 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3277 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3278 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3279 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3280 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3281 (SVE_PT_SVE_SIZE): Likewise.
3282 (SVE_PT_SIZE): Likewise.
3283 (HAS_SVE_STATE): New define.
3284
17a1cc89
AH
32852018-06-18 Alan Hayward <alan.hayward@arm.com>
3286
3287 * nat/aarch64-sve-linux-sigcontext.h: New file.
3288 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3289 new files.
3290 (SVE_VQ_MIN): Likewise.
3291 (SVE_VQ_MAX): Likewise.
3292 (SVE_VL_MIN): Likewise.
3293 (SVE_VL_MAX): Likewise.
3294 (SVE_NUM_ZREGS): Likewise.
3295 (SVE_NUM_PREGS): Likewise.
3296 (sve_vl_valid): Likewise.
3297 (struct user_sve_header): Likewise.
3298
7010835a
AB
32992018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3300 Richard Bunt <Richard.Bunt@arm.com>
3301
3302 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3303 was requested by GDB.
3304
479b3ef4
TV
33052018-06-15 Tom de Vries <tdevries@suse.de>
3306
3307 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3308
8199b8f4
SM
33092018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3310
3311 * gnulib/update-gnulib.sh: Print expected versions of
3312 autoconf/aclocal.
3313
55c748a1
SM
33142018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3315
3316 * arch-utils.c (default_type_align): Use type_length_units.
3317 * gdbtypes.c (type_align): Use type_length_units.
3318
87a8eca7
PW
33192018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3320
3321 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3322 of 'define' command.
3323
5d9a0608
TV
33242018-06-14 Tom de Vries <tdevries@suse.de>
3325
3326 PR cli/22573
3327 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3328 get_no_prettyformat_print_options.
3329
ab89b5a5
SM
33302018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3331
3332 * sparc-nat.h: Include target.h.
3333 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3334 <fetch_registers>: Remove this argument in function call.
3335 <store_registers>: Remove this argument in function call, remove
3336 extra semicolon.
3337 <low_forget_process>: Call sparc64_forget_process instead of
3338 sparc_forget_process.
3339
62c808ae
RO
33402018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3341
3342 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3343 (procfs_target::make_corefile_notes): Adjust to new
3344 target_read_alloc return type.
3345
1840d81a
AB
33462018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3347 Stephen Roberts <stephen.roberts@arm.com>
3348
3349 PR gdb/22882
3350 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3351 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3352 Move should_notify_stop local into more inner scope.
3353
9516f85a
AB
33542018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3355 Stephen Roberts <stephen.roberts@arm.com>
3356
3357 PR gdb/22882
3358 * infrun.c (resume_1): Add call to mark_async_event_handler.
3359
defd2172
AB
33602018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3361
3362 * infrun.c (do_target_wait): Change old version of $pc printed.
3363
7b23e087
SM
33642018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3365
3366 * dwarf2read.c (read_index_from_section): Rename to...
3367 (read_gdb_index_from_section): ... this, update all callers.
3368 (dwarf2_read_index): Rename to...
3369 (dwarf2_read_gdb_index): ... this, update all callers.
3370
69c67a0b
JDA
33712018-06-11 John David Anglin <danglin@gcc.gnu.org>
3372
3373 * gdb/hppa-linux-nat.c
3374 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3375 hppa_linux_nat_target::fetch_registers.
3376
65d4cada
AH
33772018-06-11 Alan Hayward <alan.hayward@arm.com>
3378
3379 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3380 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3381 (AARCH64_DWARF_SVE_FFR): Likewise.
3382 (AARCH64_DWARF_SVE_P0): Likewise.
3383 (AARCH64_DWARF_SVE_Z0): Likewise.
3384
f868386e
AH
33852018-06-11 Alan Hayward <alan.hayward@arm.com>
3386
3387 * common/common-regcache.h (raw_compare): New function.
3388 * regcache.c (regcache::raw_compare): Likewise.
3389 * regcache.h (regcache::raw_compare): New declaration.
3390
9c861883
AH
33912018-06-11 Alan Hayward <alan.hayward@arm.com>
3392
3393 * common/common-regcache.h (reg_buffer_common): New structure.
3394 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3395 (reg_buffer::raw_supply): Likewise.
3396 (reg_buffer::raw_supply_integer): Likewise.
3397 (reg_buffer::raw_supply_zeroed): Likewise.
3398 (reg_buffer::raw_collect): Likewise.
3399 (reg_buffer::raw_collect_integer): Likewise.
3400 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3401 (reg_buffer::raw_supply): Likewise.
3402 (reg_buffer::raw_supply_integer): Likewise.
3403 (reg_buffer::raw_supply_zeroed): Likewise.
3404 (reg_buffer::raw_collect): Likewise.
3405 (reg_buffer::raw_collect_integer): Likewise.
3406
953edf2b
TT
34072018-06-10 Tom Tromey <tom@tromey.com>
3408
3409 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3410 (class remote_state) <stop_reply_queue>: Now std::vector.
3411 (remote_state::~remote_state)
3412 (remote_target::stop_reply_queue_length): Update.
3413 (struct queue_iter_param, remove_child_of_pending_fork)
3414 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3415 (check_pending_event_prevents_wildcard_vcont_callback)
3416 (remove_stop_reply_for_inferior)
3417 (remove_stop_reply_of_remote_state)
3418 (remote_notif_remove_once_on_match)
3419 (stop_reply_match_ptid_and_ws)
3420 (remote_kill_child_of_pending_fork): Remove.
3421 (remote_target::remove_new_fork_children)
3422 (remote_target::check_pending_events_prevent_wildcard_vcont)
3423 (remote_target::discard_pending_stop_replies)
3424 (remote_target::discard_pending_stop_replies_in_queue)
3425 (remote_target::remote_notif_remove_queued_reply)
3426 (remote_target::queued_stop_reply)
3427 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3428 (remote_target::wait, remote_target::kill_new_fork_children)
3429 (remote_target::async): Update.
3430
1ddbba9d
TT
34312018-06-10 Tom Tromey <tom@tromey.com>
3432
3433 * record-full.c (record_full_arch_list_cleanups): Remove.
3434 (record_full_message): Use try/catch.
3435 (record_full_wait_cleanups): Remove.
3436 (record_full_wait_1): Use try/catch.
3437 (record_full_restore): Likewise.
3438
219605fd
TT
34392018-06-10 Tom Tromey <tom@tromey.com>
3440
3441 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3442 declare VEC. Add constructor.
3443 <in_target_beneath>: Now bool.
3444 (record_full_breakpoints): Now a std::vector, static.
3445 (record_full_sync_record_breakpoints)
3446 (record_full_init_record_breakpoints)
3447 (record_full_target::insert_breakpoint)
3448 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3449
71b73764
SM
34502018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3451
3452 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3453 * serial.c (serial_interface_lookup): Remove struct keyword.
3454
4360561f
TT
34552018-06-10 Tom Tromey <tom@tromey.com>
3456
3457 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3458 method.
3459 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3460 a method.
3461 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3462 method.
3463 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3464 "beneath" as a method.
3465 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3466 Use "beneath" as a method.
3467
d14b92bf
TT
34682018-06-10 Tom Tromey <tom@tromey.com>
3469
3470 * tracefile.c (struct trace_file_writer_deleter): New.
3471 <operator()>: Rename from trace_file_writer_xfree.
3472 (trace_file_writer_up): New typedef.
3473 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3474
835dcf92
SM
34752018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3476
3477 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3478 <m_registers, m_register_status>: Change type to
3479 std::unique_ptr.
3480 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3481 XCNEWVEC.
3482
aac0d564
SM
34832018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3484
3485 * common/common-regcache.h (enum register_status): Add
3486 underlying type "signed char".
3487 * regcache.h (reg_buffer) <m_register_status>: Change type to
3488 register_status *.
3489 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3490 register_status instead of signed char.
3491 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3492 (reg_buffer::get_register_status): Remove cast.
3493 (readable_regcache::raw_read): Remove cast.
3494 (readable_regcache::cooked_read): Remove cast.
3495
77ad7394
TT
34962018-06-09 Tom Tromey <tom@tromey.com>
3497
3498 * source.c (reverse_search_command, forward_search_command): Use
3499 scoped_fd.
3500
191cca63
TT
35012018-06-09 Tom Tromey <tom@tromey.com>
3502
3503 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3504 (serial_ops_list): Now static, std::vector.
3505 (serial_interface_lookup, serial_add_interface): Update.
3506
c5d0225d
TT
35072018-06-09 Tom Tromey <tom@tromey.com>
3508
3509 * dwarf2read.c (process_cu_includes): Update.
3510 (process_full_comp_unit): Update.
3511 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3512 std::vector.
3513
aeab5128
PK
35142018-06-08 Paul Koning <paul_koning@dell.com>
3515
3516 PR gdb/23252
3517
3518 * python/python.c (do_start_initialization):
3519 Avoid call to internal Python API.
3520 (init__gdb_module): New function.
3521
5045b3d7
GB
35222018-06-08 Gary Benson <gbenson@redhat.com>
3523
3524 * linux-thread-db.c (valprint.h): New include.
3525 (struct check_thread_db_info): New structure.
3526 (check_thread_db_on_load, tdb_testinfo): New static globals.
3527 (check_thread_db, check_thread_db_callback): New functions.
3528 (try_thread_db_load_1): Run integrity checks if requested.
3529 (maintenance_check_libthread_db): New function.
3530 (_initialize_thread_db): Register "maint check libthread-db"
3531 and "maint set/show check-libthread-db".
3532 * NEWS: Mention the above new commands.
3533
2f4f025f
TT
35342018-06-08 Tom Tromey <tom@tromey.com>
3535
3536 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3537 now a method.
3538
343b0027
TT
35392018-06-08 Tom Tromey <tom@tromey.com>
3540
3541 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3542
8dcc53b3
TT
35432018-06-08 Tom Tromey <tom@tromey.com>
3544
3545 * common/btrace-common.h (struct btrace_data): Add constructor,
3546 destructor, move assignment operator.
3547 <empty, clear, fini>: New methods.
3548 <format>: Initialize.
3549 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3550 (btrace_data_empty): Don't declare.
3551 * common/btrace-common.c (btrace_data_init): Remove.
3552 (btrace_data::fini): Rename from btrace_data_fini.
3553 (btrace_data::empty): Rename from btrace_data_empty.
3554 (btrace_data::clear): Rename from btrace_data_clear. Return
3555 bool.
3556 * btrace.h (make_cleanup_btrace_data): Don't declare.
3557 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3558 (parse_xml_btrace): Update.
3559 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3560 (maint_btrace_clear_packet_history_cmd): Update.
3561
a1740ee1
PA
35622018-06-07 Pedro Alves <palves@redhat.com>
3563
3564 * target.h (target_ops) <beneath>: Now a method. All references
3565 updated.
3566 (class target_stack): New.
3567 * target.c (g_target_stack): New.
3568 (g_current_top_target): Delete.
3569 (current_top_target): Get the top target out of g_target_stack.
3570 (target_stack::push, target_stack::unpush): New.
3571 (push_target, unpush_target): Reimplement.
3572 (target_is_pushed): Reimplement in terms of g_target_stack.
3573 (target_ops::beneath, target_stack::find_beneath): New.
3574
d6ca69cd
PA
35752018-06-07 Pedro Alves <palves@redhat.com>
3576
3577 * target.h (find_target_beneath): Delete declaration.
3578 * target.c (find_target_beneath): Delete definition.
3579 * aix-thread.c: All callers of find_target_beneath adjusted to
3580 call target_ops::beneath instead.
3581 * bsd-uthread.c: Likewise.
3582 * linux-thread-db.c: Likewise.
3583 * ravenscar-thread.c: Likewise.
3584 * sol-thread.c: Likewise.
3585 * spu-multiarch.c: Likewise.
3586
b6a8c27b
PA
35872018-06-07 Pedro Alves <palves@redhat.com>
3588
3589 * target.h (target_ops) <beneath>: Now a method. All references
3590 updated.
3591 (target_ops) <m_beneath>: New.
3592 * target.c (target_ops::beneath): New.
3593 * corelow.c: Adjust all references to target_ops::beneath.
3594 * linux-thread-db.c: Likewise.
3595 * make-target-delegates: Likewise.
3596 * record-btrace.c: Likewise.
3597 * record-full.c: Likewise.
3598 * remote.c: Likewise.
3599 * target.c: Likewise.
3600 * target-delegates.c: Regenerate.
3601
8b88a78e
PA
36022018-06-07 Pedro Alves <palves@redhat.com>
3603
3604 * target.h (target_stack): Delete.
3605 (current_top_target): Declare function.
3606 * target.c (target_stack): Delete.
3607 (g_current_top_target): New.
3608 (current_top_target): New function.
3609 * auxv.c: Use current_top_target instead of target_stack
3610 throughout.
3611 * avr-tdep.c: Likewise.
3612 * breakpoint.c: Likewise.
3613 * corefile.c: Likewise.
3614 * elfread.c: Likewise.
3615 * eval.c: Likewise.
3616 * exceptions.c: Likewise.
3617 * frame.c: Likewise.
3618 * gdbarch-selftests.c: Likewise.
3619 * gnu-v3-abi.c: Likewise.
3620 * ia64-tdep.c: Likewise.
3621 * ia64-vms-tdep.c: Likewise.
3622 * infcall.c: Likewise.
3623 * infcmd.c: Likewise.
3624 * infrun.c: Likewise.
3625 * linespec.c: Likewise.
3626 * linux-tdep.c: Likewise.
3627 * minsyms.c: Likewise.
3628 * ppc-linux-nat.c: Likewise.
3629 * ppc-linux-tdep.c: Likewise.
3630 * procfs.c: Likewise.
3631 * regcache.c: Likewise.
3632 * remote.c: Likewise.
3633 * rs6000-tdep.c: Likewise.
3634 * s390-linux-nat.c: Likewise.
3635 * s390-tdep.c: Likewise.
3636 * solib-aix.c: Likewise.
3637 * solib-darwin.c: Likewise.
3638 * solib-dsbt.c: Likewise.
3639 * solib-spu.c: Likewise.
3640 * solib-svr4.c: Likewise.
3641 * solib-target.c: Likewise.
3642 * sparc-tdep.c: Likewise.
3643 * sparc64-tdep.c: Likewise.
3644 * spu-tdep.c: Likewise.
3645 * symfile.c: Likewise.
3646 * symtab.c: Likewise.
3647 * target-descriptions.c: Likewise.
3648 * target-memory.c: Likewise.
3649 * target.c: Likewise.
3650 * target.h: Likewise.
3651 * tracefile-tfile.c: Likewise.
3652 * tracepoint.c: Likewise.
3653 * valops.c: Likewise.
3654 * valprint.c: Likewise.
3655 * value.c: Likewise.
3656 * windows-tdep.c: Likewise.
3657 * mi/mi-main.c: Likewise.
3658
c7110220
TT
36592018-06-07 Tom Tromey <tom@tromey.com>
3660
3661 * valprint.h (build_address_symbolic): Declare.
3662 * printcmd.c (print_address_symbolic): Update.
3663 (build_address_symbolic): Change "name" and "filename" to
3664 std::string.
3665 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3666 Update.
3667 * defs.h (build_address_symbolic): Remove declaration.
3668
63bad7b6
AH
36692018-06-07 Alan Hayward <alan.hayward@arm.com>
3670
3671 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3672 (aarch64_vnv_type): Add function.
3673 (aarch64_pseudo_register_name): Add V regs for SVE.
3674 (aarch64_pseudo_register_type): Likewise.
3675 (aarch64_pseudo_register_reggroup_p): Likewise.
3676 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3677 (aarch64_pseudo_read_value): Add V regs for SVE.
3678 (aarch64_pseudo_write_2): Use V0 offset for SVE
3679 (aarch64_pseudo_write): Add V regs for SVE.
3680 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3681
13e3c608
SDJ
36822018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3683
3684 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3685 (sve_vl_from_vq): Likewise.
3686
c61b06a1
TT
36872018-06-05 Tom Tromey <tom@tromey.com>
3688
3689 * cli/cli-cmds.c (show_version): Update.
3690 * top.c (print_gdb_version): Add "interactive" parameter.
3691 Update.
3692 * main.c (captured_main_1): Update.
3693 * top.h (print_gdb_version): Add "interactive" parameter and a
3694 comment.
3695
115f7325
DM
36962018-06-05 David Malcolm <dmalcolm@redhat.com>
3697
3698 * common/enum-flags.h: Add trailing semicolon to example in
3699 comment.
3700
eb6af809
TT
37012018-06-05 Tom Tromey <tom@tromey.com>
3702
3703 PR cli/12326:
3704 * NEWS: Add entry about pager.
3705 * utils.c (pagination_disabled_for_command): New global.
3706 (prompt_for_continue): Allow "c" response to prompt.
3707 (reinitialize_more_filter): Clear
3708 pagination_disabled_for_command.
3709 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3710
54d343a2
TT
37112018-06-04 Tom Tromey <tom@tromey.com>
3712
3713 * ada-lang.h (ada_lookup_symbol_list): Update.
3714 * ada-lang.c (resolve_subexp): Update.
3715 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3716 parameter.
3717 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3718 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3719 results parameter to std::vector.
3720 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3721 Update.
3722 * ada-exp.y (block_lookup): Update.
3723 (select_possible_type_sym): Change type of syms. Remove nsyms
3724 parameter.
3725 (write_var_or_type, write_name_assoc): Update.
3726
178d6a63
JB
37272018-06-04 Joel Brobecker <brobecker@adacore.com>
3728
3729 * windows-nat.c (windows_nat_target::xfer_partial): Return
3730 TARGET_XFER_E_IO if we need to delegate to the target beneath
3731 but BENEATH is NULL.
3732
baf00c2d
SM
37332018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3734
3735 * Makefile.in (config.status): Add configure.nat as a
3736 dependency.
3737
214b073c
TT
37382018-06-04 Tom Tromey <tom@tromey.com>
3739
3740 * cp-name-parser.y (cpname_state): Add method declarations.
3741 (HANDLE_QUAL): Update.
3742 (cpname_state::d_grab, cpname_state::fill_comp)
3743 (cpname_state::make_operator, cpname_state::make_dtor)
3744 (cpname_state::make_builtin_type, cpname_state::make_name)
3745 (cpname_state::d_qualify, cpname_state::d_int_type)
3746 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3747 (%union): Move earlier.
3748
62b74cb8
AH
37492018-06-04 Alan Hayward <alan.hayward@arm.com>
3750
3751 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3752
3c5cd5c3
AH
37532018-06-04 Alan Hayward <alan.hayward@arm.com>
3754
3755 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3756 (aarch64_pseudo_write_1): Likewise.
3757 (aarch64_pseudo_read_value): Use helper.
3758 (aarch64_pseudo_write): Likewise.
3759
59f413d5
PA
37602018-06-04 Pedro Alves <palves@redhat.com>
3761
3762 * darwin-nat.c (darwin_ops): Delete.
3763 (darwin_attach_pid): Use get_native_target.
3764
1332a140
AH
37652018-06-04 Alan Hayward <alan.hayward@arm.com>
3766
3767 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3768 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3769
ba2d2bb2
AH
37702018-06-04 Alan Hayward <alan.hayward@arm.com>
3771
3772 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3773 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3774 (aarch64_gdbarch_init): Check for SVE.
3775 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3776
37772018-06-04 Alan Hayward <alan.hayward@arm.com>
39bfb937
AH
3778
3779 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3780 * aarch64-tdep.h (aarch64_read_description): Likewise.
3781 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3782 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3783 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3784 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3785 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3786
41c60b4b
SM
37872018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3788
3789 * value.c (value_fetch_lazy_bitfield): New.
3790 (value_fetch_lazy_memory): New.
3791 (value_fetch_lazy_register): New.
3792 (value_fetch_lazy): Factor out to smaller functions.
3793
7b640f72
TT
37942018-06-01 Tom Tromey <tom@tromey.com>
3795
3796 * cp-name-parser.y (backslashable, represented): Now const.
3797
98e69eb3
TT
37982018-06-01 Tom Tromey <tom@tromey.com>
3799
3800 * cp-name-parser.y: Include parser-defs.h.
3801 (parser_fprintf): Remove declaration.
3802
49265499
TT
38032018-06-01 Tom Tromey <tom@tromey.com>
3804
3805 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3806 %parse-param.
3807 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3808 (global_result): Remove globals.
3809 (struct cpname_state): New.
3810 (yyparse): Don't declare.
3811 (yylex, yyerror): Move declarations after %union.
3812 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3813 (make_name): Add state parameter.
3814 Update all callers.
3815 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3816 parameter.
3817 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3818 Update.
3819 (yylex): Add lvalp, state parameters.
3820 (yyerror): Add state parameter.
3821 (cp_demangled_name_to_comp): Update.
3822
55b6c984
TT
38232018-06-01 Tom Tromey <tom@tromey.com>
3824
3825 * cp-name-parser.y (parser_fprintf): Declare.
3826 (GDB_YY_REMAP_PREFIX): Define.
3827 Include yy-remap.h. Don't redefine yy* identifiers.
3828
3513a6bb
TT
38292018-06-01 Tom Tromey <tom@tromey.com>
3830
3831 * python/py-type.c (typy_legacy_template_argument): Update.
3832 * cp-support.h (cp_demangled_name_to_comp): Update.
3833 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3834 parameter to be a "std::string *".
3835 (main): Update.
3836
e9cb46ab
L
38372018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3838
3839 * ada-lex.l: Include "diagnostics.h" instead of
3840 "common/diagnostics.h".
3841 * unittests/environ-selftests.c: Likewise.
3842 * common/diagnostics.h: Moved to ../include.
3843
8e817061
JB
38442018-06-01 Joel Brobecker <brobecker@adacore.com>
3845
3846 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3847 to language_mode_manual while calling breakpoint_re_set_one.
3848
a737d952
TT
38492018-06-01 Tom Tromey <tom@tromey.com>
3850
3851 * valops.c (value_cast_structs, destructor_name_p): Update.
3852 * symtab.c (gdb_mangle_name): Update.
3853 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3854 Update.
3855 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3856 (pascal_object_print_value_fields, pascal_object_print_value):
3857 Update.
3858 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3859 * linespec.c (find_methods): Update.
3860 * gdbtypes.h (type_name_no_tag): Remove.
3861 (type_name_or_error): Rename from type_name_no_tag_or_error.
3862 * gdbtypes.c (type_name_no_tag): Remove.
3863 (type_name_or_error): Rename from type_name_no_tag_or_error.
3864 (lookup_struct_elt_type, check_typedef): Update.
3865 * expprint.c (print_subexp_standard): Update.
3866 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3867 * d-namespace.c (d_lookup_nested_symbol): Update.
3868 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3869 (cp_print_class_member): Update.
3870 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3871 * completer.c (add_struct_fields): Update.
3872 * c-typeprint.c (cp_type_print_derivation_info)
3873 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3874 Update.
3875 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3876 (ada_prefer_type, ada_is_exception_sym): Update.
3877
e86ca25f
TT
38782018-06-01 Tom Tromey <tom@tromey.com>
3879
3880 * valops.c (enum_constant_from_type, value_namespace_elt)
3881 (value_maybe_namespace_elt): Update.
3882 * valarith.c (find_size_for_pointer_math): Update.
3883 * target-descriptions.c (make_gdb_type): Update.
3884 * symmisc.c (print_symbol): Update.
3885 * stabsread.c (define_symbol, read_type)
3886 (complain_about_struct_wipeout, add_undefined_type)
3887 (cleanup_undefined_types_1): Update.
3888 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3889 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3890 (rust_internal_print_type, rust_composite_type)
3891 (rust_evaluate_funcall, rust_evaluate_subexp)
3892 (rust_inclusive_range_type_p): Update.
3893 * python/py-type.c (typy_get_tag): Update.
3894 * p-typeprint.c (pascal_type_print_base): Update.
3895 * mdebugread.c (parse_symbol, parse_type): Update.
3896 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3897 Update.
3898 * guile/scm-type.c (gdbscm_type_tag): Update.
3899 * go-lang.c (sixg_string_p): Update.
3900 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3901 Update.
3902 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3903 (TYPE_TAG_NAME): Remove.
3904 * gdbtypes.c (type_name_no_tag): Simplify.
3905 (check_typedef, check_types_equal, recursive_dump_type)
3906 (copy_type_recursive, arch_composite_type): Update.
3907 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3908 in summary mode when needed.
3909 * eval.c (evaluate_funcall): Update.
3910 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3911 (process_structure_scope, read_enumeration_type)
3912 (read_namespace_type, read_module_type, determine_prefix): Update.
3913 * cp-support.c (inspect_type): Update.
3914 * coffread.c (process_coff_symbol, decode_base_type): Update.
3915 * c-varobj.c (c_is_path_expr_parent): Update.
3916 * c-typeprint.c (c_type_print_base_struct_union): Update.
3917 (c_type_print_base_1): Update. Print struct/class/union/enum in
3918 summary when using C language.
3919 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3920 (gen_maybe_namespace_elt): Update.
3921 * ada-lang.c (ada_type_name): Simplify.
3922 (empty_record, ada_template_to_fixed_record_type_1)
3923 (template_to_static_fixed_type)
3924 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3925
c1ec8cea
TT
39262018-06-01 Tom Tromey <tom@tromey.com>
3927
3928 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3929 c_print_type.
3930 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3931 (c_print_type): Update.
3932 (c_print_type): New overload.
3933 (c_type_print_varspec_prefix, c_type_print_args)
3934 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3935 (c_type_print_base_struct_union, c_type_print_base_1)
3936 (cp_type_print_method_args): Add "language" parameter.
3937 (c_type_print_base): Update.
3938 * c-lang.h (c_print_type): Add new overload.
3939
bc8453a7
TT
39402018-06-01 Tom Tromey <tom@tromey.com>
3941
3942 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3943 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3944
739e8682
AH
39452018-06-01 Alan Hayward <alan.hayward@arm.com>
3946
3947 * aarch64-tdep.c (aarch64_sve_register_names): New const
3948 var.
3949 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3950 (AARCH64_SVE_Z_REGS_NUM): New define.
3951 (AARCH64_SVE_P_REGS_NUM): Likewise.
3952 (AARCH64_SVE_NUM_REGS): Likewise.
3953
8a60efe7
UB
39542018-05-31 Uros Bizjak <ubizjak@gmail.com>
3955
3956 * nat/linux-ptrace.h [__alpha__]
3957 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3958 definitions.
3959
4b2dfa9d
MR
39602018-05-31 Maciej W. Rozycki <macro@mips.com>
3961
3962 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3963 the endianness selected.
3964 * NEWS: Document `set endian auto' mode operation update.
3965
122394f1
AH
39662018-05-31 Alan Hayward <alan.hayward@arm.com>
3967
3968 * Makefile.in: Add new header.
3969 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3970 (sve_vl_from_vg): Likewise.
3971 (sve_vq_from_vl): Likewise.
3972 (sve_vl_from_vq): Likewise.
3973 (sve_vq_from_vg): Likewise.
3974 (sve_vg_from_vq): Likewise.
3975 * configure.nat: Add new c file.
3976 * nat/aarch64-sve-linux-ptrace.c: New file.
3977 * nat/aarch64-sve-linux-ptrace.h: New file.
3978
95228a0d
AH
39792018-05-31 Alan Hayward <alan.hayward@arm.com>
3980
3981 * aarch64-linux-nat.c (aarch64_linux_read_description):
3982 Add parmeter zero.
3983 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3984 Likewise.
3985 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3986 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3987 (aarch64_gdbarch_init): Add parmeter zero.
3988 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3989 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3990 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3991 parmeter.
3992 * doc/gdb.texinfo: Describe SVE feature
3993 * features/aarch64-sve.c: New file.
3994
5969f0db
OJ
39952018-05-31 Omair Javaid <omair.javaid@linaro.org>
3996
3997 PR gdb/23210
3998 * gdbarch.sh (significant_addr_bit): Default to zero when
3999 not set by target architecture.
4000 * gdbarch.c: Re-generated.
4001 * utils.c (address_significant): Update.
4002
61367c61
JB
40032018-05-30 Joel Brobecker <brobecker@adacore.com>
4004
4005 * stack.c (func_command): Remove trailing newline in call to error.
4006
34a79281
SM
40072018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4008
4009 * regcache.h (regcache_raw_collect): Remove, update callers to
4010 use regcache::raw_collect.
4011 * regcache.c (regcache_raw_collect): Remove.
4012
73e1c03f
SM
40132018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4014
4015 * regcache.h (regcache_raw_supply): Remove, update callers to
4016 use detached_regcache::raw_supply.
4017 * regcache.c (regcache_raw_supply): Remove.
4018
e4c4a59b
SM
40192018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4020
4021 * regcache.h (regcache_cooked_write_part): Remove, update
4022 callers to use regcache::cooked_write_part.
4023 * regcache.c (regcache_cooked_write_part): Remove.
4024
73bb0000
SM
40252018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4026
4027 * regcache.h (regcache_cooked_read_part): Remove, update callers
4028 to use readable_regcache::cooked_read_part.
4029 * regcache.c (regcache_cooked_read_part): Remove.
4030
46a45e9d
SM
40312018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4032
4033 * regcache.h (regcache_cooked_read_value): Remove, update
4034 callers to use readable_regcache::cooked_read_value.
4035 * regcache.c (regcache_cooked_read_value): Remove.
4036
b66f5587
SM
40372018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4038
4039 * regcache.h (regcache_cooked_write): Remove, update callers to
4040 use regcache::cooked_write.
4041 * regcache.c (regcache_cooked_write): Remove.
4042
6aa7d724
SM
40432018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4044
4045 * regcache.h (regcache_invalidate): Remove, update callers to
4046 use detached_regcache::invalidate instead.
4047 * regcache.c (regcache_invalidate): Remove.
4048
4f0420fd
SM
40492018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4050
4051 * regcache.h (regcache_raw_write_part): Remove, update callers
4052 to use regcache::raw_write_part instead.
4053 * regcache.c (regcache_raw_write_part): Remove.
4054
502fe83e
SM
40552018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4056
4057 * regcache.h (regcache_raw_read_part): Remove, update callers to
4058 use readable_regcache::raw_read_part instead.
4059 * regcache.c (regcache_raw_read_part): Remove.
4060
dca08e1f
SM
40612018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4062
4063 * regcache.h (regcache_cooked_read): Remove, update callers to
4064 use readable_regcache::cooked_read instead.
4065 * regcache.c (regcache_cooked_read): Remove.
4066
10eaee5f
SM
40672018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4068
4069 * regcache.h (regcache_raw_write): Remove, update callers to use
4070 regcache::raw_write instead.
4071 * regcache.c (regcache_raw_write): Remove.
4072
0b883586
SM
40732018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4074
4075 * regcache.h (regcache_raw_read): Remove, update callers to use
4076 readable_regcache::raw_read instead.
4077 * regcache.c (regcache_raw_read): Remove.
4078
0b47d985
SM
40792018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4080
4081 * regcache.h (regcache_raw_update): Remove, update callers to
4082 use readable_regcache::raw_update instead.
4083 * regcache.c (regcache_raw_update): Remove.
4084
0ec9f114
SM
40852018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4086
4087 * regcache.h (regcache_register_status): Remove, update callers
4088 to use reg_buffer::get_register_status directly instead.
4089 * regcache.c (regcache_register_status): Remove.
4090
222312d3
SM
40912018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4092
4093 * regcache.h (regcache_get_ptid): Remove, update all callers to
4094 call regcache::ptid instead.
4095 * regcache.c (regcache_get_ptid): Remove.
4096
fdbe37e3
SM
40972018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4098
4099 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4100
f7c6f423
PA
41012018-05-30 Pedro Alves <palves@redhat.com>
4102
4103 * common/common-exceptions.h (exception_rethrow): Use
4104 ATTRIBUTE_NORETURN.
4105
52941706
SM
41062018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4107
4108 * breakpoint.c (print_solib_event, check_status_catch_solib):
4109 Remove struct keyword in range-based for loops.
4110 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4111 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4112 Likewise.
4113 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4114 Likewise.
4115 * symfile.c (addr_info_make_relative): Likewise.
4116 * thread.c (value_in_thread_stack_temporaries): Likewise.
4117
bf2977b5
WP
41182018-06-12 Weimin Pan <weimin.pan@oracle.com>
4119
4120 PR gdb/16841
4121 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4122 aggregate type to get its real type before accessing it.
4123
64cc34d8
WP
41242018-05-29 Weimin Pan <weimin.pan@oracle.com>
4125
4126 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4127 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4128 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4129 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4130 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4131 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4132 * printcmd.c (info_address_command): Likewise.
4133
e7ec8713
TT
41342018-05-29 Tom Tromey <tom@tromey.com>
4135
4136 * windows-nat.c (handle_exception): Update fall-through comment.
4137
bcb430e4
TT
41382018-05-29 Tom Tromey <tom@tromey.com>
4139
4140 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4141 (struct program_space) <added_solibs>: Now a std::vector.
4142 * breakpoint.c (print_solib_event): Update.
4143 (check_status_catch_solib): Update.
4144 * progspace.c (clear_program_space_solib_cache): Update.
4145 * solib.c (update_solib_list): Update.
4146
894882e3
TT
41472018-05-29 Tom Tromey <tom@tromey.com>
4148
4149 * python/py-type.c (typy_richcompare): Update.
4150 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4151 * gdbtypes.h (types_deeply_equal): Return bool.
4152 (types_equal): Likewise.
4153 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4154 declare VEC.
4155 (check_types_equal): Change worklist to std::vector. Return
4156 bool.
4157 (struct type_equality_entry): Add constructor.
4158 (compare_maybe_null_strings): Return bool.
4159 (check_types_worklist): Return bool. Change worklist to
4160 std::vector.
4161 (types_deeply_equal): Use std::vector.
4162 (types_equal): Return bool.
4163 (compare_maybe_null_strings): Simplify.
4164
10b2ded4
TT
41652018-05-29 Tom Tromey <tom@tromey.com>
4166
4167 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4168
4f7deebe
TT
41692018-05-29 Tom Tromey <tom@tromey.com>
4170
4171 * objc-lang.h: Don't include cp-support.h.
4172 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4173 declare VEC.
4174
b8283aea
TT
41752018-05-27 Tom Tromey <tom@tromey.com>
4176
4177 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4178
41a883c8
TT
41792018-05-25 Tom Tromey <tom@tromey.com>
4180
4181 * value.c (value::location): Initialize.
4182
bf259e25
TT
41832018-05-25 Tom Tromey <tom@tromey.com>
4184
4185 * dbxread.c (init_bincl_list): Remove.
4186 (bincl_list): Now a std::vector.
4187 (bincls_allocated, next_bincl): Remove.
4188 (free_bincl_list, do_free_bincl_list_cleanup)
4189 (make_cleanup_free_bincl_list): Remove.
4190 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4191 unique_xmalloc_ptr.
4192 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4193 (struct header_file_location): Add constructor.
4194 (add_bincl_to_list): Remove.
4195
d525a99b
TT
41962018-05-25 Tom Tromey <tom@tromey.com>
4197
4198 * tui/tui.c (tui_enable): Update.
4199 * mi/mi-interp.c (mi_interp::init): Update.
4200 * interps.h (class interp) <name>: New method.
4201 <m_name>: Rename from name.
4202 (~scoped_restore_interp): Update.
4203 * interps.c (interp::interp): Update.
4204 (interp_add, interp_set, interp_lookup_existing)
4205 (current_interp_named_p): Update.
4206
da505cff
TT
42072018-05-25 Tom Tromey <tom@tromey.com>
4208
4209 * interps.c (interp_name): Remove.
4210 * mi/mi-interp.c (mi_interp::init): Update.
4211 * interps.h (interp_name): Remove.
4212 (~scoped_restore_interp): Update.
4213 * tui/tui.c (tui_enable): Update.
4214
29f94340
TT
42152018-05-25 Tom Tromey <tom@tromey.com>
4216
4217 * utils.c (fputs_maybe_filtered): Update.
4218 * linespec.c (decode_line_full): Update.
4219 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4220 (mi_print_breakpoint_for_event, mi_solib_loaded)
4221 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4222 (mi_user_selected_context_changed): Update.
4223 * mi/mi-main.c (mi_execute_command): Update.
4224 * cli/cli-script.c (execute_control_command): Update.
4225 * python/python.c (execute_gdb_command): Update.
4226 * solib.c (info_sharedlibrary_command): Update.
4227 * interps.c (interp_ui_out): Remove.
4228 * interps.h (interp_ui_out): Remove.
4229
716b8bc5
TT
42302018-05-25 Tom Tromey <tom@tromey.com>
4231
4232 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4233 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4234 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4235
753ff9bd
TT
42362018-05-25 Tom Tromey <tom@tromey.com>
4237
4238 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4239 * interps.c (interp_exec): Use scoped_restore.
4240
5ca3b260
TT
42412018-05-25 Tom Tromey <tom@tromey.com>
4242
4243 * remote.c (remote_target::remote_file_get): Use
4244 gdb::byte_vector.
4245 (remote_target::remote_file_put): Likewise.
4246
3173aa2f
TT
42472018-05-25 Tom Tromey <tom@tromey.com>
4248
4249 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4250 a std::string.
4251 (get_pe_section_index, add_pe_exported_sym): Update.
4252 (read_pe_exported_syms): Use gdb::def_vector.
4253
09a5e1b5
TT
42542018-05-25 Tom Tromey <tom@tromey.com>
4255
4256 * frame.c (remove_prev_frame): Remove.
4257 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4258
d8dab6c3
MR
42592018-05-25 Maciej W. Rozycki <macro@mips.com>
4260
4261 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4262 Remove prototypes.
4263 * mips-linux-nat.c (supply_fpregset): Always call
4264 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4265 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4266 `mips_fill_fpregset'.
4267 * mips-linux-tdep.c (mips_supply_fpregset)
4268 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4269 (mips_fill_fpregset_wrapper): Remove functions.
4270 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4271 (mips_linux_fpregset): Remove variable.
4272 (mips_linux_iterate_over_regset_sections): Use
4273 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4274 (mips_linux_o32_sigframe_init): Remove comment.
4275
3c69da40
PA
42762018-05-25 Pedro Alves <palves@redhat.com>
4277
4278 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4279 (struct readahead_cache, struct packet_reg, struct
4280 remote_arch_state, class remote_state): Move higher up in the
4281 file.
4282 (remote_target::m_remote_state): Now an object instead of a pointer.
4283 (remote_target::get_remote_state): Adjust.
4284
39f0c204
AB
42852018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4286
4287 * stack.c (select_and_print_frame): Delete.
4288 (struct function_bounds): Move struct within function.
4289 (func_command): Most content moved into new function
4290 find_frame_for_function, use new function, print result, add
4291 function comment.
4292 (find_frame_for_function): New function, now returns a result.
4293
d392224a
PW
42942018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4295
4296 * stack.c (iterate_over_block_arg_vars): Fix comment.
4297 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4298
45f25d6c
AB
42992018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4300
4301 PR gdb/23203
4302 * frame.c
4303 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4304 Define.
4305 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4306 Define.
4307 * frame.h (class scoped_restore_selected_frame): New class.
4308 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4309 of any exception, use scoped_restore_selected_frame to restore the
4310 frame instead.
4311
da05d921
PA
43122018-05-24 Pedro Alves <palves@redhat.com>
4313
4314 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4315 override.
4316
a8be540e
TT
43172018-05-23 Tom Tromey <tom@tromey.com>
4318
4319 * complaints.c (struct complaints): Remove.
4320 (symfile_complaint_book): Remove.
4321 (series): New global.
4322 (complaint_internal): Update.
4323 (clear_complaints): Update.
4324
ff1cf532
TT
43252018-05-23 Tom Tromey <tom@tromey.com>
4326
4327 * complaints.c (counters): New global.
4328 (struct complain): Remove.
4329 (struct complaints) <root>: Remove.
4330 (complaint_sentinel): Remove.
4331 (symfile_complaint_book): Update.
4332 (find_complaint) Remove.
4333 (complaint_internal, clear_complaints): Update.
4334
7ff88174
TT
43352018-05-23 Tom Tromey <tom@tromey.com>
4336
4337 * complaints.c (struct complain) <file, line>: Remove.
4338 (find_complaint): Remove file, line parameters.
4339 (complaint_internal): Update.
4340
de54e1a5
TT
43412018-05-23 Tom Tromey <tom@tromey.com>
4342
4343 * complaints.c (vcomplaint): Remove.
4344 (complaint_internal) Merge in contents of vcomplaint.
4345
2ac237e5
TT
43462018-05-23 Tom Tromey <tom@tromey.com>
4347
4348 * complaints.c (struct complaints) <explanation>: Remove.
4349 (symfile_explanations): Remove.
4350 (symfile_complaint_book): Update.
4351 (vcomplaint): Update.
4352 (struct explanation): Remove.
4353
b98664d3
TT
43542018-05-23 Tom Tromey <tom@tromey.com>
4355
4356 * complaints.c (symfile_complaints): Remove.
4357 (complaint_internal): Remove "complaints" parameter.
4358 (clear_complaints, vcomplaint): Remove "c" parameter.
4359 (get_complaints): Remove.
4360 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4361 (dwarf2_debug_line_missing_file_complaint)
4362 (dwarf2_debug_line_missing_end_sequence_complaint)
4363 (dwarf2_complex_location_expr_complaint)
4364 (dwarf2_const_value_length_mismatch_complaint)
4365 (dwarf2_section_buffer_overflow_complaint)
4366 (dwarf2_macro_malformed_definition_complaint)
4367 (dwarf2_invalid_attrib_class_complaint)
4368 (create_addrmap_from_index, dw2_symtab_iter_next)
4369 (dw2_expand_marked_cus)
4370 (dw2_debug_names_iterator::find_vec_in_debug_names)
4371 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4372 (create_debug_type_hash_table, init_cutu_and_read_dies)
4373 (partial_die_parent_scope, add_partial_enumeration)
4374 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4375 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4376 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4377 (create_cus_hash_table, create_dwp_hash_table)
4378 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4379 (dwarf2_rnglists_process, dwarf2_ranges_process)
4380 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4381 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4382 (handle_struct_member_die, process_structure_scope)
4383 (read_array_type, read_common_block, read_module_type)
4384 (read_tag_pointer_type, read_typedef, read_base_type)
4385 (read_subrange_type, load_partial_dies, partial_die_info::read)
4386 (partial_die_info::read, partial_die_info::read)
4387 (partial_die_info::read, read_checked_initial_length_and_offset)
4388 (dwarf2_string_attr, read_formatted_entries)
4389 (dwarf_decode_line_header)
4390 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4391 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4392 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4393 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4394 (get_signatured_type, get_DW_AT_signature_type)
4395 (decode_locdesc, file_file_name, consume_improper_spaces)
4396 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4397 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4398 (dwarf2_symbol_mark_computed, set_die_type)
4399 (read_attribute_value): Update.
4400 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4401 Update.
4402 * dbxread.c (unknown_symtype_complaint)
4403 (lbrac_mismatch_complaint, repeated_header_complaint)
4404 (set_namestring, function_outside_compilation_unit_complaint)
4405 (read_dbx_symtab, process_one_symbol): Update.
4406 * gdbtypes.c (stub_noname_complaint): Update.
4407 * windows-nat.c (handle_unload_dll): Update.
4408 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4409 (decode_base_type): Update.
4410 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4411 (eb_complaint, record_include_begin, record_include_end)
4412 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4413 (process_xcoff_symbol, read_symbol)
4414 (function_outside_compilation_unit_complaint)
4415 (scan_xcoff_symtab): Update.
4416 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4417 * buildsym.c (finish_block_internal, make_blockvector)
4418 (end_symtab_get_static_block, augment_type_symtab): Update.
4419 * dtrace-probe.c (dtrace_process_dof)
4420 (dtrace_static_probe_ops::get_probes): Update.
4421 * complaints.h (struct complaint): Don't declare.
4422 (symfile_complaints): Remove.
4423 (complaint_internal): Remove "complaints" parameter.
4424 (complaint): Likewise.
4425 (clear_complaints): Likewise.
4426 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4427 (reread_symbols): Update.
4428 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4429 (dwarf2_frame_cache, decode_frame_entry): Update.
4430 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4431 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4432 (info_selectors_command): Update.
4433 * macrotab.c (macro_include, check_for_redefinition)
4434 (macro_undef): Update.
4435 * objfiles.c (filter_overlapping_sections): Update.
4436 * stabsread.c (invalid_cpp_abbrev_complaint)
4437 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4438 (define_symbol, error_type, read_type, rs6000_builtin_type)
4439 (stabs_method_name_from_physname, read_member_functions)
4440 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4441 (attach_fields_to_type, complain_about_struct_wipeout)
4442 (read_range_type, read_args, common_block_start)
4443 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4444 Update.
4445 * mdebugread.c (index_complaint, unknown_ext_complaint)
4446 (basic_type_complaint, bad_tag_guess_complaint)
4447 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4448 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4449 (parse_procedure, parse_lines)
4450 (function_outside_compilation_unit_complaint)
4451 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4452 (bad_tag_guess_complaint, reg_value_complaint): Update.
4453 * cp-support.c (demangled_name_complaint): Update.
4454 * macroscope.c (sal_macro_scope): Update.
4455 * dwarf-index-write.c (class debug_names): Update.
4456
4e9668d0
TT
44572018-05-23 Tom Tromey <tom@tromey.com>
4458
4459 * complaints.c (clear_complaints): Remove "noisy" parameter.
4460 * complaints.h (clear_complaints): Update.
4461 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4462 (reread_symbols): Update.
4463
43ba33c7
TT
44642018-05-23 Tom Tromey <tom@tromey.com>
4465
4466 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4467 SUBSEQUENT_MESSAGE.
4468 (vcomplaint, clear_complaints): Update.
4469 (symfile_explanations): Remove some messages.
4470
2b9496b2
TT
44712018-05-23 Tom Tromey <tom@tromey.com>
4472
4473 * complaints.c (internal_complaint): Remove.
4474 * complaints.h (internal_complaint): Remove.
4475
35f1fea3
MR
44762018-05-22 Maciej W. Rozycki <macro@mips.com>
4477
4478 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4479
6b8edb51
PA
44802018-05-22 Pedro Alves <palves@redhat.com>
4481
4482 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4483 (remote_fileio_badfd, remote_fileio_return_errno)
4484 (remote_fileio_return_success, remote_fileio_func_open)
4485 (remote_fileio_func_open, remote_fileio_func_close)
4486 (remote_fileio_func_read, remote_fileio_func_write)
4487 (remote_fileio_func_lseek, remote_fileio_func_rename)
4488 (remote_fileio_func_unlink, remote_fileio_func_stat)
4489 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4490 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4491 remote_target parameter.
4492 (remote_fio_func_map) <func>: Add remote_target parameter.
4493 (do_remote_fileio_request, remote_fileio_request):
4494 * remote-fileio.h (remote_fileio_request):
4495 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4496 remote_target parameter.
4497 (remote_notif_process, handle_notification): Adjust to pass down
4498 the remote.
4499 (remote_notif_state_allocate): Add remote_target parameter. Save
4500 it.
4501 * remote-notif.h (struct remote_target): Forward declare.
4502 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4503 remote_target parameter.
4504 (struct remote_notif_state) <remote>: New field.
4505 (remote_notif_ack, remote_notif_parse): Add remote_target
4506 parameter.
4507 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4508 remote_target parameter.
4509 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4510 (threads_listing_context, rmt_thread_action, protocol_feature)
4511 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4512 (packet_result, struct threads_listing_context, remote_state):
4513 Move definitions and declarations higher up.
4514 (remote_target) <~remote_target>: Declare.
4515 (remote_download_command_source, remote_file_put, remote_file_get)
4516 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4517 (remote_hostio_pread_vFile, remote_hostio_send_command)
4518 (remote_hostio_set_filesystem, remote_hostio_open)
4519 (remote_hostio_close, remote_hostio_unlink, remote_state)
4520 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4521 (get_memory_write_packet_size, get_memory_read_packet_size)
4522 (append_pending_thread_resumptions, remote_detach_1)
4523 (append_resumption, remote_resume_with_vcont)
4524 (add_current_inferior_and_thread, wait_ns, wait_as)
4525 (process_stop_reply, remote_notice_new_inferior)
4526 (process_initial_stop_replies, remote_add_thread)
4527 (btrace_sync_conf, remote_btrace_maybe_reopen)
4528 (remove_new_fork_children, kill_new_fork_children)
4529 (discard_pending_stop_replies, stop_reply_queue_length)
4530 (check_pending_events_prevent_wildcard_vcont)
4531 (discard_pending_stop_replies_in_queue, stop_reply)
4532 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4533 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4534 (remote_interrupt_as, remote_interrupt_ns)
4535 (remote_get_noisy_reply, remote_query_attached)
4536 (remote_add_inferior, remote_current_thread, get_current_thread)
4537 (set_thread, set_general_thread, set_continue_thread)
4538 (set_general_process, write_ptid)
4539 (remote_unpack_thread_info_response, remote_get_threadinfo)
4540 (parse_threadlist_response, remote_get_threadlist)
4541 (remote_threadlist_iterator, remote_get_threads_with_ql)
4542 (remote_get_threads_with_qxfer)
4543 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4544 (get_offsets, remote_check_symbols, remote_supported_packet)
4545 (remote_query_supported, remote_packet_size)
4546 (remote_serial_quit_handler, remote_detach_pid)
4547 (remote_vcont_probe, remote_resume_with_hc)
4548 (send_interrupt_sequence, interrupt_query)
4549 (remote_notif_get_pending_events, fetch_register_using_p)
4550 (send_g_packet, process_g_packet, fetch_registers_using_g)
4551 (store_register_using_P, store_registers_using_G)
4552 (set_remote_traceframe, check_binary_download)
4553 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4554 (remote_xfer_live_readonly_partial, remote_read_bytes)
4555 (remote_send_printf, remote_flash_write, readchar)
4556 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4557 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4558 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4559 (extended_remote_disable_randomization, extended_remote_run)
4560 (send_environment_packet, extended_remote_environment_support)
4561 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4562 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4563 (packet_command): Now methods of ...
4564 (remote_target): ... this class.
4565 (m_remote_state) <remote_target>: New field.
4566 (struct remote_state) <stop_reply_queue,
4567 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4568 fields.
4569 (remote_state::remote_state): Allocate stop_reply_queue.
4570 (remote_state): Delete global.
4571 (get_remote_state_raw): Delete.
4572 (remote_target::get_remote_state): Allocate m_remote_state on
4573 demand.
4574 (get_current_remote_target): New.
4575 (remote_ops, extended_remote_ops): Delete.
4576 (wait_forever_enabled_p, remote_async_inferior_event_token):
4577 Delete, moved to struct remote_state.
4578 (remote_target::close): Delete self. Destruction bits split to
4579 ...
4580 (remote_target::~remote_target): ... this.
4581 (show_memory_packet_size): Adjust to use
4582 get_current_remote_target.
4583 (struct protocol_feature) <func>: Add remote_target parameter.
4584 All callers adjusted.
4585 (curr_quit_handler_target): New.
4586 (remote_serial_quit_handler): Reimplement.
4587 (remote_target::open_1): Adjust to use get_current_remote_target.
4588 Heap-allocate remote_target/extended_remote_target instances.
4589 (vcont_builder::vcont_builder): Add remote_target parameter, and
4590 save it in m_remote. All callers adjusted.
4591 (vcont_builder::m_remote): New field.
4592 (vcont_builder::restart, vcont_builder::flush)
4593 (vcont_builder::push_action): Use it.
4594 (remote_target::commit_resume): Use it.
4595 (struct queue_iter_param) <remote>: New field.
4596 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4597 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4598 (check_pending_event_prevents_wildcard_vcont_callback)
4599 (remote_target::check_pending_events_prevent_wildcard_vcont)
4600 (remote_target::discard_pending_stop_replies)
4601 (remote_target::discard_pending_stop_replies_in_queue)
4602 (remote_target::remote_notif_remove_queued_reply): Fill in
4603 'remote' field.
4604 (remote_notif_get_pending_events): New.
4605 (remote_target::readchar, remote_target::remote_serial_write):
4606 Save/restore curr_quit_handler_target.
4607 (putpkt): New.
4608 (kill_new_fork_children): Fill in 'remote' field.
4609 (packet_command): Use get_current_remote_target, defer to
4610 remote_target method of same name.
4611 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4612 parameter, and save it in m_remote. All callers adjusted.
4613 (scoped_remote_fd::release): Use m_remote.
4614 (scoped_remote_fd::m_remote): New field.
4615 (remote_file_put, remote_file_get, remote_file_delete): Use
4616 get_current_remote_target, defer to remote_target method of same
4617 name.
4618 (remote_btrace_reset): Add remote_state paremeter. Update all
4619 callers.
4620 (remote_async_inferior_event_handler). Pass down 'data'.
4621 (remote_new_objfile): Use get_current_remote_target.
4622 (remote_target::vcont_r_supported): New.
4623 (set_range_stepping): Use get_current_remote_target and
4624 remote_target::vcont_r_supported.
4625 (_initialize_remote): Don't allocate 'remote_state' and
4626 'stop_reply_queue' globals.
4627 * remote.h (struct remote_target): Forward declare.
4628 (getpkt, putpkt, remote_notif_get_pending_events): Add
4629 'remote_target' parameter.
4630
f5db4863
PA
46312018-05-22 Pedro Alves <palves@redhat.com>
4632
4633 * remote.c (vcont_builder): Now a class. Make all data members
4634 private.
4635 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4636 Declare methods.
4637 (vcont_builder_restart): Rename to ...
4638 (vcont_builder::restart): ... this.
4639 (vcont_builder_flush): Rename to ...
4640 (vcont_builder::flush): ... this.
4641 (vcont_builder_push_action): Rename to ...
4642 (vcont_builder::push_action): ... this.
4643 (remote_target::commit_resume): Adjust.
4644
cc0be08f
PA
46452018-05-22 Pedro Alves <palves@redhat.com>
4646
4647 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4648 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4649 (get_fixed_memory_packet_size): New.
4650 (get_memory_packet_size): Use it.
4651 (set_memory_packet_size): Don't override the config size with
4652 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4653 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4654 Don't refer to get_memory_packet_size if not connected to a remote
4655 target. Show "(default)" if configured size is 0.
4656
9607784a
PA
46572018-05-22 Pedro Alves <palves@redhat.com>
4658
4659 * remote.c (remote_target::mourn_inferior): Move
4660 discard_pending_stop_replies call here from ...
4661 (_initialize_remote): ... here.
4662
0e9a6b2f
PA
46632018-05-22 Pedro Alves <palves@redhat.com>
4664
4665 * remote.c (compare_section_command): Remove set_general_process
4666 call.
4667
43c3a0e4
PA
46682018-05-22 Pedro Alves <palves@redhat.com>
4669
4670 * remote.c (struct packet_reg, struct remote_arch_state):
4671 Move higher up in the file.
4672 (remote_state) <m_arch_states>: Store remote_arch_state values
4673 instead of remote_arch_state pointers.
4674 (remote_state::get_remote_arch_state): Adjust.
4675
9d6eea31
PA
46762018-05-22 Pedro Alves <palves@redhat.com>
4677
4678 * remote.c: Include <unordered_map>.
4679 (remote_state): Now a class.
4680 (remote_state) <get_remote_arch_state>: Declare method.
4681 <get_remote_arch_state>: New field.
4682 (remote_arch_state) <remote_arch_state>: Declare ctor.
4683 <regs>: Now a unique_ptr.
4684 (remote_gdbarch_data_handle): Delete.
4685 (get_remote_arch_state): Delete.
4686 (remote_state::get_remote_arch_state): New.
4687 (get_remote_state): Adjust to call remote_state's
4688 get_remote_arch_state method.
4689 (init_remote_state): Delete, bits factored out to ...
4690 (remote_arch_state::remote_arch_state): ... this new method.
4691 (get_remote_packet_size, get_memory_packet_size)
4692 (process_g_packet, remote_target::fetch_registers)
4693 (remote_target::prepare_to_store, store_registers_using_G)
4694 (remote_target::store_registers, remote_target::get_trace_status):
4695 Adjust to call remote_state's method.
4696 (_initialize_remote): Remove reference to
4697 remote_gdbarch_data_handle.
4698
dd194f6b
PA
46992018-05-22 Pedro Alves <palves@redhat.com>
4700
4701 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4702 pread>: New method declarations.
4703 (remote_target::open_1): Adjust.
4704 (readahead_cache_invalidate): Rename to ...
4705 (readahead_cache::invalidate): ... this, and adjust to be a class
4706 method.
4707 (readahead_cache_invalidate_fd): Rename to ...
4708 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4709 class method.
4710 (remote_hostio_pwrite): Adjust.
4711 (remote_hostio_pread_from_cache): Rename to ...
4712 (readahead_cache::pread): ... this, and adjust to be a class
4713 method.
4714 (remote_hostio_close): Adjust.
4715
440b7aec
PA
47162018-05-22 Pedro Alves <palves@redhat.com>
4717
4718 * remote.c (remote_hostio_close_cleanup): Delete.
4719 (class scoped_remote_fd): New.
4720 (remote_file_put, remote_file_get): Use it.
4721
de44f5a7
PA
47222018-05-22 Pedro Alves <palves@redhat.com>
4723
4724 (struct vCont_action_support): Use bool and initialize all fields.
4725 (struct readahead_cache): Initialize all fields.
4726 (remote_state): Use bool and initialize all fields.
4727 (remote_state::remote_state, remote_state::~remote_state): New.
4728 (new_remote_state): Delete.
4729 (_initialize_remote): Use new to allocate remote_state.
4730
b1b60145
PA
47312018-05-22 Pedro Alves <palves@redhat.com>
4732 張俊芝 <zjz@zjz.name>
4733
4734 PR gdb/22973
4735 * c-exp.y: Include "c-support.h".
4736 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4737 of tolower. Use c_ident_is_alpha to scan names.
4738 * c-lang.c: Include "c-support.h".
4739 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4740 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4741 * c-support.h: New file, with bits factored out from ...
4742 * cp-name-parser.y: ... this file.
4743 Include "c-support.h".
4744 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4745 c-support.h and renamed.
4746 (symbol_end, yylex): Adjust.
4747
0ec848ad
PFC
47482018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4749
4750 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4751 parameter type to CORE_ADDR.
4752 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4753 parameter type in declaration to CORE_ADDR.
4754 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4755 target_auxv_search to get AT_HWCAP and use the result to get the
4756 target description.
4757 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4758 to CORE_ADDR. Remove the cast of the return value to unsigned
4759 long. Fix error predicate of target_auxv_search.
4760 (ppc_linux_nat_target::read_description): Change the type of the
4761 hwcap variable to CORE_ADDR.
4762
0fb2aaa1
PFC
47632018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4764
4765 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4766 if the size of fpscr is larger than 32 bits.
4767
2c3305f6
PFC
47682018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4769
4770 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4771 (ppc32_linux_vsxregmap): New global.
4772 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4773 regcache_supply_regset, and regcache_collect_regset.
4774 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4775 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4776 (fetch_vsx_register, store_vsx_register): Remove.
4777 (fetch_vsx_registers): Add regno parameter. Get regset using
4778 ppc_linux_vsxregset. Use regset to supply registers.
4779 (store_vsx_registers): Add regno parameter. Get regset using
4780 ppc_linux_vsxregset. Use regset to collect registers.
4781 (fetch_register): Call fetch_vsx_registers instead of
4782 fetch_vsx_register.
4783 (store_register): Call store_vsx_registers instead of
4784 store_vsx_register.
4785 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4786 new regno parameter.
4787 (store_ppc_registers): Call store_vsx_registers with -1 for the
4788 new regno parameter.
4789 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4790 (ppc_collect_vsxregset): Remove.
4791
1d75a658
PFC
47922018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4793
4794 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4795 offset fields.
4796 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4797 for vector register offset fields.
4798 (ppc64_fbsd_reg_offsets): Likewise.
4799 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4800 to vector register offset fields.
4801 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4802 to vector register offset fields.
4803 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4804 vector register offset fields.
4805 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4806 initializers for vector register offset fields.
4807 (rs6000_aix64_reg_offsets): Likewise.
4808 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4809 (ppc_supply_vrregset): Remove.
4810 (ppc_collect_vrregset): Remove.
4811 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4812 (ppc_linux_vrregset) : New function.
4813 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4814 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4815 (ppc32_linux_vrregset): Remove.
4816 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4817 and use result instead of ppc32_linux_vrregset.
4818 (ppc32_linux_reg_offsets): Remove initializers for vector register
4819 offset fields.
4820 (ppc64_linux_reg_offsets): Likewise.
4821 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4822 * ppc-linux-nat.c: Include regset.h.
4823 (gdb_vrregset_t): Adjust comment to account for little-endian
4824 mode.
4825 (supply_vrregset, fill_vrregset): Remove.
4826 (fetch_altivec_register, store_altivec_register): Remove.
4827 (fetch_altivec_registers): Add regno parameter. Get regset using
4828 ppc_linux_vrregset. Use regset to supply registers.
4829 (store_altivec_registers): Add regno parameter. Get regset using
4830 ppc_linux_vrregset. Use regset to collect registers.
4831 (fetch_register): Call fetch_altivec_registers instead of
4832 fetch_altivec_register.
4833 (store_register): Call store_altivec_registers instead of
4834 store_altivec_register.
4835 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4836 the new regno parameter.
4837 (store_ppc_registers): Call store_altivec_registers with -1 for
4838 the new regno parameter.
4839
d078308a
PFC
48402018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4841
4842 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4843 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4844 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4845 (gdb_vrregset_t): Change array type size to
4846 PPC_LINUX_SIZEOF_VRREGSET.
4847 (gdb_vsxregset_t): Change array type size to
4848 PPC_LINUX_SIZEOF_VSXREGSET.
4849 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4850 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4851 PPC_LINUX_SIZEOF_VSXREGSET.
4852
2e077f5e
PFC
48532018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4854
4855 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4856 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4857 nat/ppc-linux.c.
4858 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4859 ppc_linux_target_wordsize with tid.
4860 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4861 wordsize with tid.
4862 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4863 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4864 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4865 tid parameter. Remove static specifier.
4866 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4867 (ppc_linux_target_wordsize): New declaration.
4868
bd64614e
PFC
48692018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4870
4871 * arch/ppc-linux-common.c: New file.
4872 * arch/ppc-linux-common.h: New file.
4873 * arch/ppc-linux-tdesc.h: New file.
4874 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4875 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4876 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4877 arch/ppc-linux-tdesc.h.
4878 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4879 arch/ppc-linux-tdesc.h.
4880 (ppc_linux_nat_target::read_description): Remove target
4881 description matching code. Fill a ppc_linux_features struct and
4882 call ppc_linux_match_description with it. Move comment about ISA
4883 2.05 to ppc-linux-common.c.
4884 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4885 arch/ppc-linux-tdesc.h.
4886 (ppc_linux_core_read_description): Remove target description
4887 matching code. Fill a ppc_linux_features struct and call
4888 ppc_linux_match_description with it.
4889 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4890 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4891 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4892 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4893 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4894 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4895 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4896 (tdesc_powerpc_e500l): Remove.
4897
241db429
JB
48982018-05-22 Joel Brobecker <brobecker@adacore.com>
4899
4900 * ada-lang.c (catch_assert_command): Pass empty string instead
4901 of NULL for excep_string argument.
4902
75d74cca
MR
49032018-05-22 Maciej W. Rozycki <macro@mips.com>
4904
4905 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4906 the width of the requested register exceeds the width of the
4907 `ptrace' data type.
4908
122b53ea
TT
49092018-05-21 Tom Tromey <tom@tromey.com>
4910
4911 * printcmd.c (output_command): Remove.
4912 (output_command_const): Rename to output_command.
4913 * valprint.h (output_command): Rename from output_command_const.
4914 * tracepoint.c (trace_dump_actions): Call output_command.
4915
bc18fbb5
TT
49162018-05-21 Tom Tromey <tom@tromey.com>
4917
4918 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4919 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4920 * ada-lang.h (create_ada_exception_catchpoint): Update.
4921 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4922 std::string.
4923 (create_excep_cond_exprs, ~ada_catchpoint)
4924 (should_stop_exception, print_one_exception)
4925 (print_mention_exception, print_recreate_exception): Update.
4926 (ada_get_next_arg): Remove.
4927 (catch_ada_exception_command_split): Use std::string. Change type
4928 of "excep_string", "cond_string".
4929 (catch_ada_exception_command): Update.
4930 (create_ada_exception_catchpoint): Change type of excep_string.
4931 (ada_exception_sal): Remove excep_string parameter.
4932 (~ada_catchpoint): Remove.
4933
790217f6
TT
49342018-05-21 Tom Tromey <tom@tromey.com>
4935
4936 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4937 cleanup.
4938
6f46ac85
TT
49392018-05-21 Tom Tromey <tom@tromey.com>
4940
4941 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4942 Return unique_xmalloc_ptr.
4943 (print_it_exception): Update.
4944
15b6611c
TT
49452018-05-21 Tom Tromey <tom@tromey.com>
4946
4947 * tracepoint.c (trace_dump_actions): Use std::string.
4948
c0c9f665
TT
49492018-05-21 Tom Tromey <tom@tromey.com>
4950
4951 * symfile.c (reread_symbols): Use std::string for original_name.
4952
22ca247e
TT
49532018-05-21 Tom Tromey <tom@tromey.com>
4954
4955 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4956 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4957 constructor.
4958
184cde75
SM
49592018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4960
4961 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4962 instance to...
4963 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4964 * objfiles.c (get_objfile_bfd_data): Allocate
4965 objfile_per_bfd_storage with obstack_new when allocating on
4966 obstack.
4967
e39db4db
SM
49682018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4969
4970 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4971 OBSTACK_ZALLOC.
4972 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4973 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4974 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4975 (add_pending): Likewise.
4976 (parse_symbol): Likewise.
4977 (parse_partial_symbols): Likewise.
4978 (psymtab_to_symtab_1): Likewise.
4979 (new_psymtab): Likewise.
4980 (elfmdebug_build_psymtabs): Likewise.
4981 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4982 * objfiles.c (get_objfile_bfd_data): Likewise.
4983 (objfile_register_static_link): Likewise.
4984 * psymtab.c (allocate_psymtab): Likewise.
4985 * stabsread.c (read_member_functions): Likewise.
4986 * xcoffread.c (xcoff_end_psymtab): Likewise.
4987
284a0e3c
SM
49882018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4989
4990 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4991 compiler supports std::is_trivially_constructible.
4992 * common/poison.h: Include obstack.h.
4993 (IsMallocable): Define to is_trivially_constructible if the
4994 compiler supports it, define to true_type otherwise.
4995 (xobnew): New.
4996 (XOBNEW): Redefine.
4997 (xobnewvec): New.
4998 (XOBNEWVEC): Redefine.
4999 * gdb_obstack.h (obstack_zalloc): New.
5000 (OBSTACK_ZALLOC): Redefine.
5001 (obstack_calloc): New.
5002 (OBSTACK_CALLOC): Redefine.
5003 (obstack_new): New.
5004 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5005 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5006 gdbarch.c.
5007 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5008 obstack_calloc/obstack_zalloc.
5009 (gdbarch_obstack_zalloc): Remove.
5010 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5011
59f66be3
PW
50122018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5013
5014 * stack.c (backtrace_command_1): Remove useless variable int i.
5015
50c65c2d
PW
50162018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5017
5018 * stack.c (print_frame_info): Fix comment.
5019
7ff8cb8c
TT
50202018-05-18 Tom Tromey <tom@tromey.com>
5021
5022 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5023 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5024 (~dwarf2_per_objfile): Update
5025 (dwarf2_get_dwz_file): Use new.
5026 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5027 unique_ptr.
5028
400174b1
TT
50292018-05-18 Tom Tromey <tom@tromey.com>
5030
5031 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5032 unique_ptr.
5033 * dwarf2read.c (struct dwp_file): Add constructor and
5034 initializers.
5035 (open_and_init_dwp_file): Return a unique_ptr.
5036 (dwarf2_per_objfile, create_dwp_hash_table)
5037 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5038 (lookup_dwo_unit_in_dwp): Update.
5039 (open_and_init_dwp_file, get_dwp_file): Update.
5040
3063847f
TT
50412018-05-18 Tom Tromey <tom@tromey.com>
5042
5043 * dwarf2read.c (dwarf2_per_objfile): Update.
5044 (struct mapped_index): Add initializers.
5045 (dwarf2_read_index): Use new.
5046 (dw2_symtab_iter_init): Update.
5047 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5048 unique_ptr.
5049
d3d02dee
SM
50502018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5051
5052 * dwarf2read.c (mapped_index) <total_size>: Remove.
5053
1d143c36
SM
50542018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5055
5056 * unittests/format_pieces-selftests.c (test_format_specifier):
5057 Add ARI comments.
5058
ce1e8424
TT
50592018-05-18 Tom Tromey <tom@tromey.com>
5060
5061 * c-typeprint.c (maybe_print_hole): New function.
5062 (c_print_type_struct_field_offset): Update.
5063 (c_type_print_base_struct_union): Call maybe_print_hole.
5064
ddfe970e
KS
50652018-05-17 Keith Seitz <keiths@redhat.com>
5066
5067 * breakpoint.c (build_bpstat_chain): New function, moved from
5068 bpstat_stop_status.
5069 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5070 If no stop chain is passed, call build_bpstat_chain to build it.
5071 * breakpoint.h (build_bpstat_chain): Declare.
5072 (bpstat_stop_status): Move documentation here from breakpoint.c.
5073 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5074 build the stop chain and pass it to skip_inline_frames.
5075 Pass this stop chain to bpstat_stop_status.
5076 * inline-frame.c: Include breakpoint.h.
5077 (stopped_by_user_bp_inline_frame): New function.
5078 (skip_inline_frames): Add parameter `stop_chain'.
5079 Move documention to inline-frame.h.
5080 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5081 whether the frame should be elided.
5082 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5083 Add moved documentation and update for new parameter.
5084
b17992c1
SM
50852018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5086
5087 PR cli/14975
5088 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5089 unittests/format_pieces-selftests.c.
5090 * common/format.h (format_piece) <operator==>: New.
5091 (format_pieces) <operator[]>: Remove.
5092 * common/format.c (format_pieces::format_pieces): Handle \e.
5093 * unittests/format_pieces-selftests.c: New.
5094
58f0c718
TT
50952018-05-17 Tom Tromey <tom@tromey.com>
5096
5097 PR symtab/23010:
5098 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5099 (dw2_instantiate_symtab): Add skip_partial parameter.
5100 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5101 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5102 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5103 (dw2_expand_symtabs_matching_one)
5104 (dw2_find_pc_sect_compunit_symtab)
5105 (dw2_debug_names_lookup_symbol)
5106 (dw2_debug_names_expand_symtabs_for_function): Update.
5107 (init_cutu_and_read_dies): Add skip_partial parameter.
5108 (process_psymtab_comp_unit, build_type_psymtabs_1)
5109 (process_skeletonless_type_unit, load_partial_comp_unit)
5110 (psymtab_to_symtab_1): Update.
5111 (load_full_comp_unit): Add skip_partial parameter.
5112 (process_imported_unit_die, dwarf2_read_addr_index)
5113 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5114 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5115 (read_signatured_type): Update.
5116
3e618834
SM
51172018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5118
5119 * value.c (release_value): Remove unused variable.
5120 (record_latest_value): Likewise.
5121 (access_value_history): Likewise.
5122 (preserve_values): Likewise.
5123
fe10fe31
TT
51242018-05-17 Tom Tromey <tom@tromey.com>
5125
5126 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5127 Initialize.
5128
1d761124
MR
51292018-05-16 Maciej W. Rozycki <macro@mips.com>
5130
5131 PR gdb/22286
5132 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5133 Also handle registers whose width is not a multiple of
5134 PTRACE_TYPE_RET.
5135 (linux_nat_trad_target::store_register): Likewise.
5136
06333fea
TT
51372018-05-16 Tom Tromey <tom@tromey.com>
5138
5139 * gdbcore.h (core_bfd): Redefine.
5140 * corelow.c (core_target::close): Update.
5141 (core_target_open): Update.
5142 * progspace.h (struct program_space) <cbfd>: Now a
5143 gdb_bfd_ref_ptr.
5144
921222e2
TT
51452018-05-16 Tom Tromey <tom@tromey.com>
5146
5147 PR cli/19551:
5148 * symfile-add-flags.h (enum symfile_add_flags)
5149 <SYMFILE_NOT_FILENAME>: New constant.
5150 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5151 objfile name from BFD.
5152 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5153 * minidebug.c (find_separate_debug_file_in_section): Put
5154 ".gnu_debugdata" into BFD's file name.
5155
3acb7083
SM
51562018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5157
5158 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5159 Remove.
5160
561a72d4
TC
51612018-05-15 Tamar Christina <tamar.christina@arm.com>
5162
5163 PR binutils/21446
5164 * aarch64-tdep.c (aarch64_analyze_prologue,
5165 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5166 Indicate not interested in errors.
5167
4e6ff0e1
MR
51682018-05-15 Maciej W. Rozycki <macro@mips.com>
5169
5170 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5171 Supply the MIPS_ZERO_REGNUM register.
5172
ea33cd92
MR
51732018-05-15 Maciej W. Rozycki <macro@mips.com>
5174
5175 * mips-tdep.c (mask_address_var): Make variable static.
5176
2d79090e
TT
51772018-05-14 Tom Tromey <tom@tromey.com>
5178
5179 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5180
cf4912ae
AB
51812018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5182
5183 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5184 FXSAVE_ADDR for the mxcsr register.
5185
67e6f569
MF
51862018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5187
5188 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5189
15244507
PA
51902018-05-11 Pedro Alves <palves@redhat.com>
5191
5192 * corelow.c (core_target) <core_target>: No longer inline.
5193 Initialize m_core_gdbarch, m_core_vec and build the section table
5194 here.
5195 <~core_target>: New.
5196 <core_gdbarch, get_core_register_section>: New methods.
5197 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5198 factored out from ...
5199 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5200 (core_ops): Delete.
5201 (sniff_core_bfd): Add gdbarch parameter.
5202 (core_close): Delete, merged into ...
5203 (core_target::close): ... here. Delete self.
5204 (core_close_cleanup): Delete.
5205 (core_target_open): Allocate a core_target on the heap. Use a
5206 unique_ptr instead of a cleanup. Bits moved into the core_target
5207 ctor. Adjust to use core_target methods instead of globals.
5208 (get_core_register_section): Rename to ...
5209 (core_target::get_core_register_section): ... this and adjust.
5210 (struct get_core_registers_cb_data): New.
5211 (get_core_registers_cb): Use it. Use bool.
5212 (core_target::fetch_registers, core_target::files_info)
5213 (core_target::xfer_partial, core_target::read_description)
5214 (core_target::pid_to, core_target::thread_name): Adjust to
5215 reference class fields instead of globals.
5216 * target.h (struct target_ops_deleter, target_ops_up): New.
5217
451953fa
PA
52182018-05-11 Pedro Alves <palves@redhat.com>
5219
5220 * corefile.c (core_file_command): Move to corelow.c.
5221 * corelow.c (the_core_target): Delete.
5222 (core_file_command): Moved from corefile.c. Check exec_bfd
5223 instead of the_core_target. Use target_detach instead of calling
5224 into the_core_target directly.
5225 (maybe_say_no_core_file_now): New.
5226 (core_target::detach): Use it.
5227 (_initialize_corelow): Remove references to the_core_target.
5228 * gdbcore.h (the_core_target): Delete.
5229
e540a5a2 52302018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 5231 Pedro Alves <palves@redhat.com>
e540a5a2
TT
5232
5233 * corefile.c (core_bfd): Remove.
5234 * gdbcore.h (core_bfd): Now a macro.
5235 * progspace.h (struct program_space) <cbfd>: New field.
5236
633cf254
TT
52372018-05-11 Tom Tromey <tom@tromey.com>
5238
5239 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5240 gdb::def_vector.
5241
1a34f210
TT
52422018-05-10 Tom Tromey <tom@tromey.com>
5243
5244 * configure: Rebuild.
5245 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5246
190852c8
JB
52472018-05-10 Joel Brobecker <brobecker@adacore.com>
5248
5249 PR server/23158:
5250 * regformats/regdat.sh: Adjust script, following the addition
5251 of the new expedite_regs parameter to init_target_desc.
5252
8727de56
OJ
52532018-05-10 Omair Javaid <omair.javaid@linaro.org>
5254
5255 PR gdb/23127
5256 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5257 set_gdbarch_significant_addr_bit.
5258 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5259 set_gdbarch_significant_addr_bit.
5260 * utils.c (address_significant): Update to sign extend addr.
5261
37d9e062
MF
52622018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5263
5264 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5265 (xtensa_linux_init_abi): Limit tdep->num_regs by
5266 tdep->num_nopriv_regs.
5267 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5268 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5269 not initialized.
5270
7402fbca
SM
52712018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5272
5273 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5274
8ee22052
AB
52752018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5276
5277 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5278 (I387_MXCSR_INIT_VAL): New constant.
5279 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5280 buffer if it was supplied by the inferior.
5281 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5282 (i387_xsave_get_clear_bv): New function.
5283 (i387_supply_xsave): Only read x87 control registers from the
5284 xsave buffer if the feature is enabled, and the state will have
5285 been written, otherwise, provide a suitable default.
5286 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5287 including x87 control registers. Update control registers if they
5288 have changed from the default value, and mark features as enabled
5289 as required.
5290 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5291
968ae51b
UW
52922018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5293
5294 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5295
aff689d3
TT
52962018-05-07 Tom Tromey <tom@tromey.com>
5297
5298 * configure: Rebuild.
5299 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5300
ce887586
TT
53012018-05-07 Tom Tromey <tom@tromey.com>
5302
5303 PR tdep/20362:
5304 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5305 bit. Use correct value for VDIV.
5306
85e26832
TT
53072018-05-04 Tom Tromey <tom@tromey.com>
5308
5309 * configure: Rebuild.
5310 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5311
449b1ac7
TT
53122018-05-04 Tom Tromey <tom@tromey.com>
5313
5314 * linux-record.c (record_linux_system_call) <case
5315 RECORD_SYS_RECVFROM>: Add "break".
5316
15c9ffd6
TT
53172018-05-04 Tom Tromey <tom@tromey.com>
5318
5319 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5320 Add missing "break".
5321 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5322 Add missing "break".
5323
e3829d13
TT
53242018-05-04 Tom Tromey <tom@tromey.com>
5325
5326 * rs6000-tdep.c (ppc_process_record_op4)
5327 (ppc_process_record_op63): Add fall-through comment.
5328
da0e1563
TT
53292018-05-04 Tom Tromey <tom@tromey.com>
5330
5331 * i386-tdep.c (i386_process_record): Add fall-through comment.
5332
0019cd49
TT
53332018-05-04 Tom Tromey <tom@tromey.com>
5334
5335 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5336 comment.
5337
565e0eda
TT
53382018-05-04 Tom Tromey <tom@tromey.com>
5339
5340 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5341 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5342 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5343 comment.
5344 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5345 comment.
5346 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5347 comment.
5348
621846f4
TT
53492018-05-04 Tom Tromey <tom@tromey.com>
5350
5351 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5352
86a73007
TT
53532018-05-04 Tom Tromey <tom@tromey.com>
5354
5355 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5356 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5357 * symfile.c (section_is_mapped): Fix fall-through comment.
5358 * stabsread.c (define_symbol, read_member_functions): Fix
5359 fall-through comment.
5360 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5361 comment.
5362 * remote.c (remote_wait_as): Fix fall-through comment.
5363 * p-exp.y (yylex): Fix fall-through comment.
5364 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5365 comment.
5366 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5367 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5368 * jv-exp.y (yylex): Fix fall-through comment.
5369 * go-exp.y (lex_one_token): Fix fall-through comment.
5370 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5371 fall-through comment.
5372 * f-exp.y (yylex): Fix fall-through comment.
5373 * dwarf2read.c (process_die): Fix fall-through comments.
5374 * dbxread.c (process_one_symbol): Fix fall-through comment.
5375 * d-exp.y (lex_one_token): Fix fall-through comment.
5376 * cp-name-parser.y (yylex): Fix fall-through comment.
5377 * coffread.c (coff_symtab_read): Fix fall-through comment.
5378 * c-exp.y (lex_one_token): Fix fall-through comment.
5379 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5380 comment.
5381 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5382 comment.
5383
56bcdbea
TT
53842018-05-04 Tom Tromey <tom@tromey.com>
5385
5386 PR python/22730:
5387 * NEWS: Mention gdb.execute change.
5388 * gdbcmd.h (execute_control_command): Don't declare.
5389 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5390 execute_control_commands, execute_control_commands_to_string.
5391 * cli/cli-script.h (execute_control_commands)
5392 (execute_control_commands_to_string): Declare.
5393 (execute_control_command): Add from_tty parameter.
5394 * cli/cli-script.c (execute_control_commands)
5395 (execute_control_commands_to_string): New functions.
5396 (execute_user_command): Use execute_control_commands.
5397 (execute_control_command_1): Add "from_tty" parameter. Update.
5398 (execute_control_command): Likewise.
5399
a913fffb
TT
54002018-05-04 Tom Tromey <tom@tromey.com>
5401
5402 PR python/22731:
5403 * NEWS: Mention that breakpoint commands are writable.
5404 * python/py-breakpoint.c (bppy_set_commands): New function.
5405 (breakpoint_object_getset) <"commands">: Use it.
5406
60b3cef2
TT
54072018-05-04 Tom Tromey <tom@tromey.com>
5408
5409 * tracepoint.c (actions_command): Update.
5410 * mi/mi-cmd-break.c (mi_command_line_array)
5411 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5412 (mi_read_next_line): Remove.
5413 (mi_cmd_break_commands): Update.
5414 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5415 function_view.
5416 * cli/cli-script.c (get_command_line): Update.
5417 (process_next_line): Use function_view. Constify.
5418 (recurse_read_control_structure, read_command_lines)
5419 (read_command_lines_1): Change argument types to function_view.
5420 (do_define_command, document_command): Update.
5421 * breakpoint.h (check_tracepoint_command): Don't declare.
5422 * breakpoint.c (check_tracepoint_command): Remove.
5423 (commands_command_1, create_tracepoint_from_upload): Update.
5424
7a2c85f2
TT
54252018-05-04 Tom Tromey <tom@tromey.com>
5426
5427 PR gdb/11750:
5428 * cli/cli-script.h (enum command_control_type) <define_control>:
5429 New constant.
5430 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5431 (build_command_line, execute_control_command_1)
5432 (process_next_line): Likewise.
5433 (do_define_command): New function, extracted from define_command.
5434 (define_command): Use it.
5435
295dc222
TT
54362018-05-04 Tom Tromey <tom@tromey.com>
5437
5438 * tracepoint.c (actions_command): Update.
5439 * cli/cli-script.h (read_command_lines): Update.
5440 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5441 (MAX_TMPBUF): Remove define.
5442 (define_command): Use string_printf.
5443 (document_command): Likewise.
5444 * breakpoint.c (commands_command_1): Update.
5445
1263a9d5
TT
54462018-05-04 Tom Tromey <tom@tromey.com>
5447
5448 * top.c (execute_command): Update.
5449 * cli/cli-script.h (print_command_lines): Now varargs.
5450 * cli/cli-script.c (print_command_lines): Now varargs.
5451 (execute_control_command_1) <case while_control, case if_control>:
5452 Update.
5453
12973681
TT
54542018-05-04 Tom Tromey <tom@tromey.com>
5455
5456 * tracepoint.c (all_tracepoint_actions): Rename from
5457 all_tracepoint_actions_and_cleanup. Change return type.
5458 (actions_command, encode_actions_1, encode_actions)
5459 (trace_dump_actions, tdump_command): Update.
5460 * remote.c (remote_download_command_source): Update.
5461 * python/python.c (gdbpy_eval_from_control_command)
5462 (python_command, python_interactive_command): Update.
5463 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5464 * guile/guile.c (guile_command)
5465 (gdbscm_eval_from_control_command, guile_command): Update.
5466 * compile/compile.c (compile_code_command)
5467 (compile_print_command, compile_to_object): Update.
5468 * cli/cli-script.h (struct command_lines_deleter): New.
5469 (counted_command_line): New typedef.
5470 (struct command_line): Add constructor, destructor.
5471 <body_list>: Remove.
5472 <body_list_0, body_list_1>: New members.
5473 (command_line_up): Remove typedef.
5474 (read_command_lines, read_command_lines_1, get_command_line):
5475 Update.
5476 (copy_command_lines): Don't declare.
5477 * cli/cli-script.c (build_command_line): Use "new".
5478 (get_command_line): Return counted_command_line.
5479 (print_command_lines, execute_user_command)
5480 (execute_control_command_1, while_command, if_command): Update.
5481 (realloc_body_list): Remove.
5482 (process_next_line, recurse_read_control_structure): Update.
5483 (read_command_lines, read_command_lines_1): Return counted_command_line.
5484 (free_command_lines): Use "delete".
5485 (copy_command_lines): Remove.
5486 (define_command, document_command, show_user_1): Update.
5487 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5488 a counted_command_line.
5489 * breakpoint.h (counted_command_line): Remove typedef.
5490 (breakpoint_set_commands): Update.
5491 * breakpoint.c (check_no_tracepoint_commands)
5492 (validate_commands_for_breakpoint): Update.
5493 (breakpoint_set_commands): Change commands to be a
5494 counted_command_line.
5495 (commands_command_1, update_dprintf_command_list)
5496 (create_tracepoint_from_upload): Update.
5497
e2fc72e2
TT
54982018-05-04 Tom Tromey <tom@tromey.com>
5499
5500 * cli/cli-decode.h (cmd_list_element): New constructor.
5501 (~cmd_list_element): New destructor.
5502 (struct cmd_list_element): Add initializers.
5503 * cli/cli-decode.c (do_add_cmd): Use "new".
5504 (delete_cmd): Use "delete".
5505
a3b60e45
JK
55062018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5507 Pedro Alves <palves@redhat.com>
5508
5509 PR breakpoints/19806 and support for PR external/20207.
5510 * NEWS: Mention Aarch64 watchpoint improvements.
5511 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5512 watchpoints and PR external/20207 watchpoints.
5513 * nat/aarch64-linux-hw-point.c
5514 (kernel_supports_any_contiguous_range): New.
5515 (aarch64_watchpoint_offset): New.
5516 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5517 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5518 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5519 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5520 next_addr_orig_p. Support PR external/20207 watchpoints.
5521 (aarch64_downgrade_regs): New.
5522 (aarch64_dr_state_insert_one_point): New parameters offset and
5523 addr_orig.
5524 (aarch64_dr_state_remove_one_point): Likewise.
5525 (aarch64_handle_breakpoint): Update caller.
5526 (aarch64_handle_aligned_watchpoint): Likewise.
5527 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5528 aligned_offset.
5529 (aarch64_linux_set_debug_regs): Remove const from state. Call
5530 aarch64_downgrade_regs.
5531 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5532 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5533 (DR_CONTROL_MASK): ... this.
5534 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5535 (unsigned int aarch64_watchpoint_offset): New prototype.
5536 (aarch64_linux_set_debug_regs): Remove const from state.
5537 * utils.c (align_up, align_down): Move to ...
5538 * common/common-utils.c (align_up, align_down): ... here.
5539 * utils.h (align_up, align_down): Move to ...
5540 * common/common-utils.h (align_up, align_down): ... here.
5541
05bc7456
JB
55422018-05-04 Joel Brobecker <brobecker@adacore.com>
5543
5544 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5545 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5546 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5547 Re-implement to match the ABI as summarized in GCC's
5548 gcc/config/sparc/sparc.c. All callers updated.
5549 (sparc32_store_arguments): Remove assertion.
5550
2f433492
TT
55512018-05-04 Tom Tromey <tom@tromey.com>
5552
5553 * printcmd.c: Don't include tui.h.
5554 (decode_format): Use skip_spaces.
5555
9be2ae8f
TT
55562018-05-04 Tom Tromey <tom@tromey.com>
5557
5558 PR gdb/22619:
5559 * printcmd.c (last_count): New global.
5560 (x_command): Use saved count when repeating.
5561
f0b3976b
TT
55622018-05-04 Tom Tromey <tom@tromey.com>
5563
5564 * nto-procfs.c (do_closedir_cleanup): Remove.
5565 (procfs_pidlist): Use gdb_dir_up.
5566 * procfs.c (do_closedir_cleanup): Remove.
5567 (proc_update_threads): Use gdb_dir_up.
5568 * common/filestuff.h (struct gdb_dir_deleter): New.
5569 (gdb_dir_up): New typedef.
5570
862d101a
TT
55712018-05-04 Tom Tromey <tom@tromey.com>
5572
5573 * ada-lang.c (print_mention_exception): Use std::string.
5574
cb7de75e
TT
55752018-05-04 Tom Tromey <tom@tromey.com>
5576
5577 * ada-lang.c (create_excep_cond_exprs): Update.
5578 (ada_exception_catchpoint_cond_string): Use std::string.
5579
49d83361
TT
55802018-05-04 Tom Tromey <tom@tromey.com>
5581
5582 * ada-lang.c (xget_renaming_scope): Return std::string.
5583 (old_renaming_is_invisible): Update.
5584
ade72a34
TT
55852018-05-04 Tom Tromey <tom@tromey.com>
5586
5587 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5588 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5589
2be4d7f0
UW
55902018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5591
5592 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5593
69b6ecb0
TT
55942018-05-04 Tom Tromey <tom@tromey.com>
5595
5596 * remote.c (remote_query_supported_append): Change type.
5597 (remote_check_symbols): Update.
5598
bf27f0e2
PP
55992018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5600
5601 PR gdb/11420
5602 * configure.ac: Prepend libpython.
5603 * python/python-config.py: Likewise.
5604 * configure: Regenerate.
5605
4ea17de8
SM
56062018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5607
5608 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5609
bd732259
PA
56102018-05-03 Pedro Alves <palves@redhat.com>
5611
5612 * s390-linux-nat.c
5613 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5614 override. Write 'true' instead of '1'.
5615 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5616 declaration.
5617
d9f719f1
PA
56182018-05-02 Pedro Alves <palves@redhat.com>
5619
5620 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5621 add_inf_child_target.
5622 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5623 add_inf_child_target.
5624 * aix-thread.c (aix_thread_target_info): New.
5625 (aix_thread_target) <shortname, longname, doc>: Delete.
5626 <info>: New.
5627 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5628 add_inf_child_target.
5629 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5630 add_inf_child_target.
5631 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5632 add_inf_child_target.
5633 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5634 add_inf_child_target.
5635 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5636 add_inf_child_target.
5637 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5638 add_inf_child_target.
5639 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5640 add_inf_child_target.
5641 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5642 add_inf_child_target.
5643 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5644 add_inf_child_target.
5645 * bfd-target.c (target_bfd_target_info): New.
5646 (target_bfd) <shortname, longname, doc>: Delete.
5647 <info>: New.
5648 * bsd-kvm.c (bsd_kvm_target_info): New.
5649 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5650 <info>: New.
5651 (bsd_kvm_target::open): Rename to ...
5652 (bsd_kvm_target_open): ... this. Adjust.
5653 * bsd-uthread.c (bsd_uthread_target_info): New.
5654 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5655 <info>: New.
5656 * corefile.c (core_file_command): Adjust.
5657 * corelow.c (core_target_info): New.
5658 (core_target) <shortname, longname, doc>: Delete.
5659 <info>: New.
5660 (core_target::open): Rename to ...
5661 (core_target_open): ... this. Adjust.
5662 * ctf.c (ctf_target_info): New.
5663 (ctf_target) <shortname, longname, doc>: Delete.
5664 <info>: New.
5665 (ctf_target::open): Rename to ...
5666 (ctf_target_open): ... this.
5667 (_initialize_ctf): Adjust.
5668 * exec.c (exec_target_info): New.
5669 (exec_target) <shortname, longname, doc>: Delete.
5670 <info>: New.
5671 (exec_target::open): Rename to ...
5672 (exec_target_open): ... this.
5673 * gdbcore.h (core_target_open): Declare.
5674 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5675 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5676 add_inf_child_target.
5677 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5678 add_inf_child_target.
5679 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5680 add_inf_child_target.
5681 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5682 add_inf_child_target.
5683 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5684 add_inf_child_target.
5685 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5686 add_inf_child_target.
5687 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5688 add_inf_child_target.
5689 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5690 add_inf_child_target.
5691 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5692 add_inf_child_target.
5693 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5694 add_inf_child_target.
5695 * inf-child.c (inf_child_target_info): New.
5696 (inf_child_target::info): New.
5697 (inf_child_open_target): Remove 'target' parameter. Use
5698 get_native_target instead.
5699 (inf_child_target::open): Delete.
5700 (add_inf_child_target): New.
5701 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5702 Delete.
5703 <info>: New.
5704 (add_inf_child_target): Declare.
5705 (inf_child_open_target): Declare.
5706 * linux-thread-db.c (thread_db_target_info): New.
5707 (thread_db_target) <shortname, longname, doc>: Delete.
5708 <info>: New.
5709 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5710 add_inf_child_target.
5711 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5712 add_inf_child_target.
5713 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5714 add_inf_child_target.
5715 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5716 add_inf_child_target.
5717 * make-target-delegates (print_class): Adjust.
5718 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5719 add_inf_child_target.
5720 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5721 add_inf_child_target.
5722 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5723 add_inf_child_target.
5724 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5725 add_inf_child_target.
5726 * nto-procfs.c (nto_native_target_info): New.
5727 (nto_procfs_target_native) <shortname, longname, doc>:
5728 Delete.
5729 <info>: New.
5730 (nto_procfs_target_info): New.
5731 (nto_procfs_target_procfs) <shortname, longname, doc>:
5732 Delete.
5733 <info>: New.
5734 (init_procfs_targets): Adjust.
5735 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5736 add_inf_child_target.
5737 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5738 add_inf_child_target.
5739 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5740 add_inf_child_target.
5741 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5742 add_inf_child_target.
5743 * ravenscar-thread.c (ravenscar_target_info): New.
5744 (ravenscar_thread_target) <shortname, longname, doc>:
5745 Delete.
5746 <info>: New.
5747 * record-btrace.c (record_btrace_target_info):
5748 (record_btrace_target) <shortname, longname, doc>: Delete.
5749 <info>: New.
5750 (record_btrace_target::open): Rename to ...
5751 (record_btrace_target_open): ... this. Adjust.
5752 * record-full.c (record_longname, record_doc): New.
5753 (record_full_base_target) <shortname, longname, doc>: Delete.
5754 <info>: New.
5755 (record_full_target_info): New.
5756 (record_full_target): <shortname>: Delete.
5757 <info>: New.
5758 (record_full_core_open_1, record_full_open_1): Update comments.
5759 (record_full_base_target::open): Rename to ...
5760 (record_full_open): ... this.
5761 (cmd_record_full_restore): Update.
5762 (_initialize_record_full): Update.
5763 * remote-sim.c (remote_sim_target_info): New.
5764 (gdbsim_target) <shortname, longname, doc>: Delete.
5765 <info>: New.
5766 (gdbsim_target::open): Rename to ...
5767 (gdbsim_target_open): ... this.
5768 (_initialize_remote_sim): Adjust.
5769 * remote.c (remote_doc): New.
5770 (remote_target_info): New.
5771 (remote_target) <shortname, longname, doc>: Delete.
5772 <info>: New.
5773 (extended_remote_target_info): New.
5774 (extended_remote_target) <shortname, longname, doc>: Delete.
5775 <info>: New.
5776 (remote_target::open_1): Make static. Adjust.
5777 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5778 * s390-linux-nat.c (_initialize_s390_nat): Use
5779 add_inf_child_target.
5780 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5781 add_inf_child_target.
5782 * sol-thread.c (thread_db_target_info): New.
5783 (sol_thread_target) <shortname, longname, doc>: Delete.
5784 <info>: New.
5785 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5786 add_inf_child_target.
5787 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5788 add_inf_child_target.
5789 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5790 add_inf_child_target.
5791 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5792 add_inf_child_target.
5793 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5794 add_inf_child_target.
5795 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5796 add_inf_child_target.
5797 * spu-linux-nat.c (_initialize_spu_nat): Use
5798 add_inf_child_target.
5799 * spu-multiarch.c (spu_multiarch_target_info): New.
5800 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5801 <info>: New.
5802 * target-delegates.c: Regenerate.
5803 * target.c: Include <unordered_map>.
5804 (target_ops_p): Delete.
5805 (DEF_VEC_P(target_ops_p)): Delete.
5806 (target_factories): New.
5807 (test_target_info): New.
5808 (test_target_ops::info): New.
5809 (open_target): Adjust to use target_factories.
5810 (add_target_with_completer): Rename to ...
5811 (add_target): ... this. Change prototype. Register target_info
5812 and open callback in target_factories. Register target_info in
5813 command context instead of target_ops.
5814 (add_target): Delete old implementation.
5815 (add_deprecated_target_alias): Change prototype. Adjust.
5816 (the_native_target): New.
5817 (set_native_target, get_native_target): New.
5818 (find_default_run_target): Use the_native_target.
5819 (find_attach_target, find_run_target): Simplify.
5820 (target_ops::open): Delete.
5821 (dummy_target_info): New.
5822 (dummy_target::shortname, dummy_target::longname)
5823 (dummy_target::doc): Delete.
5824 (dummy_target::info): New.
5825 (debug_target::shortname, debug_target::longname)
5826 (debug_target::doc): Delete.
5827 (debug_target::info): New.
5828 * target.h (struct target_info): New.
5829 (target_ops::~target_ops): Add comment.
5830 (target_ops::info): New.
5831 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5832 longer virtual. Implement in terms of target_info.
5833 (set_native_target, get_native_target): Declare.
5834 (target_open_ftype): New.
5835 (add_target, add_target_with_completer)
5836 (add_deprecated_target_alias): Change prototype.
5837 (test_target) <shortname, longname, doc>: Delete.
5838 <info>: New.
5839 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5840 add_inf_child_target.
5841 * tracefile-tfile.c (tfile_target_info): New.
5842 (tfile_target) <shortname, longname, doc>: Delete.
5843 <info>: New.
5844 (tfile_target::open): Rename to ...
5845 (tfile_target_open): ... this.
5846 (_initialize_tracefile_tfile): Adjust.
5847 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5848 add_inf_child_target.
5849 * windows-nat.c (_initialize_windows_nat): Use
5850 add_inf_child_target.
5851 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5852 add_inf_child_target.
5853
135340af
PA
58542018-05-02 Pedro Alves <palves@redhat.com>
5855
5856 * linux-nat.h (linux_nat_target) <low_new_thread,
5857 low_delete_thread, low_new_fork, low_forget_process,
5858 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5859 New virtual methods.
5860 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5861 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5862 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5863 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5864 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5865 Delete.
5866 * linux-fork.c (delete_fork): Adjust to call low method.
5867 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5868 (linux_nat_new_fork, linux_nat_forget_process_hook)
5869 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5870 (linux_nat_status_is_event):
5871 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5872 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5873 to call low method.
5874 (sigtrap_is_event): Rename to ...
5875 (linux_nat_target::low_status_is_event): ... this.
5876 (linux_nat_set_status_is_event): Delete.
5877 (save_stop_reason, linux_nat_wait_1)
5878 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5879 low methods.
5880 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5881 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5882 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5883 (linux_nat_set_prepare_to_resume): Delete.
5884 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5885 low virtual methods.
5886 * amd64-linux-nat.c: Likewise.
5887 * arm-linux-nat.c: Likewise.
5888 * i386-linux-nat.c: Likewise.
5889 * ia64-linux-nat.c: Likewise.
5890 * mips-linux-nat.c: Likewise.
5891 * ppc-linux-nat.c: Likewise.
5892 * s390-linux-nat.c: Likewise.
5893 * sparc64-linux-nat.c: Likewise.
5894 * x86-linux-nat.c: Likewise.
5895 * x86-linux-nat.h: Include "nat/x86-linux.h".
5896 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5897 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5898 Override methods.
5899
57810aa7
PA
59002018-05-02 Pedro Alves <palves@redhat.com>
5901
5902 * target.h (target_ops)
5903 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5904 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5905 stopped_by_watchpoint, have_continuable_watchpoint,
5906 stopped_data_address, watchpoint_addr_within_range,
5907 can_accel_watchpoint_condition, can_run, thread_alive,
5908 has_all_memory, has_memory, has_stack, has_registers,
5909 has_execution, can_async_p, is_async_p, supports_non_stop,
5910 always_non_stop_p, can_execute_reverse, supports_multi_process,
5911 supports_enable_disable_tracepoint,
5912 supports_disable_randomization, supports_string_tracing,
5913 supports_evaluation_of_breakpoint_conditions,
5914 can_run_breakpoint_commands, filesystem_is_local,
5915 can_download_tracepoint, get_trace_state_variable_value,
5916 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5917 record_is_replaying, record_will_replay,
5918 augmented_libraries_svr4_read>: Adjust to return bool.
5919 * aarch64-linux-nat.c: All implementations adjusted.
5920 * aix-thread.c: All implementations adjusted.
5921 * arm-linux-nat.c: All implementations adjusted.
5922 * breakpoint.c: All implementations adjusted.
5923 * bsd-kvm.c: All implementations adjusted.
5924 * bsd-uthread.c: All implementations adjusted.
5925 * corelow.c: All implementations adjusted.
5926 * ctf.c: All implementations adjusted.
5927 * darwin-nat.c: All implementations adjusted.
5928 * darwin-nat.h: All implementations adjusted.
5929 * exec.c: All implementations adjusted.
5930 * fbsd-nat.c: All implementations adjusted.
5931 * fbsd-nat.h: All implementations adjusted.
5932 * gnu-nat.c: All implementations adjusted.
5933 * gnu-nat.h: All implementations adjusted.
5934 * go32-nat.c: All implementations adjusted.
5935 * ia64-linux-nat.c: All implementations adjusted.
5936 * inf-child.c: All implementations adjusted.
5937 * inf-child.h: All implementations adjusted.
5938 * inf-ptrace.c: All implementations adjusted.
5939 * inf-ptrace.h: All implementations adjusted.
5940 * linux-nat.c: All implementations adjusted.
5941 * linux-nat.h: All implementations adjusted.
5942 * mips-linux-nat.c: All implementations adjusted.
5943 * nto-procfs.c: All implementations adjusted.
5944 * ppc-linux-nat.c: All implementations adjusted.
5945 * procfs.c: All implementations adjusted.
5946 * ravenscar-thread.c: All implementations adjusted.
5947 * record-btrace.c: All implementations adjusted.
5948 * record-full.c: All implementations adjusted.
5949 * remote-sim.c: All implementations adjusted.
5950 * remote.c: All implementations adjusted.
5951 * s390-linux-nat.c: All implementations adjusted.
5952 * sol-thread.c: All implementations adjusted.
5953 * spu-multiarch.c: All implementations adjusted.
5954 * target-delegates.c: All implementations adjusted.
5955 * target.c: All implementations adjusted.
5956 * target.h: All implementations adjusted.
5957 * tracefile-tfile.c: All implementations adjusted.
5958 * tracefile.c: All implementations adjusted.
5959 * tracefile.h: All implementations adjusted.
5960 * windows-nat.c: All implementations adjusted.
5961 * x86-linux-nat.h: All implementations adjusted.
5962 * x86-nat.h: All implementations adjusted.
5963
ad6a4e2d
PA
59642018-05-02 Pedro Alves <palves@redhat.com>
5965
5966 * make-target-delegates (scan_target_h): Don't trim lines here.
5967 Replace sequences of tabs and/or whitespace with a single
5968 whitespace.
5969 (top level, parsing methods): Trim each line before processing it
5970 here.
5971
f6ac5f3d
PA
59722018-05-02 Pedro Alves <palves@redhat.com>
5973 John Baldwin <jhb@freebsd.org>
5974
5975 * target.h (enum strata) <debug_stratum>: New.
5976 (struct target_ops) <all delegation methods>: Replace by C++
5977 virtual methods, and drop "to_" prefix. All references updated
5978 throughout.
5979 <to_shortname, to_longname, to_doc, to_data,
5980 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5981 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5982 virtual methods. All references updated throughout.
5983 <can_attach, supports_terminal_ours, can_create_inferior,
5984 get_thread_control_capabilities, attach_no_wait>: New
5985 virtual methods.
5986 <insert_breakpoint, remove_breakpoint>: Now
5987 TARGET_DEFAULT_NORETURN methods.
5988 <info_proc>: Now returns bool.
5989 <to_magic>: Delete.
5990 (OPS_MAGIC): Delete.
5991 (current_target): Delete. All references replaced by references
5992 to ...
5993 (target_stack): ... this. New.
5994 (target_shortname, target_longname): Adjust.
5995 (target_can_run): Now a function declaration.
5996 (default_child_has_all_memory, default_child_has_memory)
5997 (default_child_has_stack, default_child_has_registers)
5998 (default_child_has_execution): Remove target_ops parameter.
5999 (complete_target_initialization): Delete.
6000 (memory_breakpoint_target): New template class.
6001 (test_target_ops): Refactor as a C++ class with virtual methods.
6002 * make-target-delegates (NAME_PART): Tighten.
6003 (POINTER_PART, CP_SYMBOL): New.
6004 (SIMPLE_RETURN_PART): Reimplement.
6005 (VEC_RETURN_PART): Expect less.
6006 (RETURN_PART, VIRTUAL_PART): New.
6007 (METHOD): Adjust to C++ virtual methods.
6008 (scan_target_h): Remove reference to C99.
6009 (dname): Output "target_ops::" prefix.
6010 (write_function_header): Adjust to output a C++ class method.
6011 (write_declaration): New.
6012 (write_delegator): Adjust to output a C++ class method.
6013 (tdname): Output "dummy_target::" prefix.
6014 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6015 method.
6016 (tdefault_names, debug_names): Delete.
6017 (return_types, tdefaults, styles, argtypes_array): New.
6018 (top level): All methods are delegators.
6019 (print_class): New.
6020 (top level): Print dummy_target and debug_target classes.
6021 * target-delegates.c: Regenerate.
6022 * target-debug.h (target_debug_print_enum_info_proc_what)
6023 (target_debug_print_thread_control_capabilities)
6024 (target_debug_print_thread_info_p): New.
6025 * target.c (dummy_target): Delete.
6026 (the_dummy_target, the_debug_target): New.
6027 (target_stack): Now extern.
6028 (set_targetdebug): Push/unpush debug target.
6029 (default_child_has_all_memory, default_child_has_memory)
6030 (default_child_has_stack, default_child_has_registers)
6031 (default_child_has_execution): Remove target_ops parameter.
6032 (complete_target_initialization): Delete.
6033 (add_target_with_completer): No longer call
6034 complete_target_initialization.
6035 (target_supports_terminal_ours): Use regular delegation.
6036 (update_current_target): Delete.
6037 (push_target): No longer check magic number. Don't call
6038 update_current_target.
6039 (unpush_target): Don't call update_current_target.
6040 (target_is_pushed): No longer check magic number.
6041 (target_require_runnable): Skip for all stratums over
6042 process_stratum.
6043 (target_ops::info_proc): New.
6044 (target_info_proc): Use find_target_at and
6045 find_default_run_target.
6046 (target_supports_disable_randomization): Use regular delegation.
6047 (target_get_osdata): Use find_target_at.
6048 (target_ops::open, target_ops::close, target_ops::can_attach)
6049 (target_ops::attach, target_ops::can_create_inferior)
6050 (target_ops::create_inferior, target_ops::can_run)
6051 (target_can_run): New.
6052 (default_fileio_target): Use regular delegation.
6053 (target_ops::fileio_open, target_ops::fileio_pwrite)
6054 (target_ops::fileio_pread, target_ops::fileio_fstat)
6055 (target_ops::fileio_close, target_ops::fileio_unlink)
6056 (target_ops::fileio_readlink): New.
6057 (target_fileio_open_1, target_fileio_unlink)
6058 (target_fileio_readlink): Always call the target method. Handle
6059 FILEIO_ENOSYS.
6060 (return_zero, return_zero_has_execution): Delete.
6061 (init_dummy_target): Delete.
6062 (dummy_target::dummy_target, dummy_target::shortname)
6063 (dummy_target::longname, dummy_target::doc)
6064 (debug_target::debug_target, debug_target::shortname)
6065 (debug_target::longname, debug_target::doc): New.
6066 (target_supports_delete_record): Use regular delegation.
6067 (setup_target_debug): Delete.
6068 (maintenance_print_target_stack): Skip debug_stratum.
6069 (initialize_targets): Instantiate the_dummy_target and
6070 the_debug_target.
6071 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6072 use target_stack.
6073 (target_auxv_search, fprint_target_auxv): Adjust.
6074 (info_auxv_command): Adjust to use target_stack.
6075 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6076 * exceptions.c (print_flush): Handle a NULL target_stack.
6077 * regcache.c (target_ops_no_register): Refactor as class with
6078 virtual methods.
6079
6080 * exec.c (exec_target): New class.
6081 (exec_ops): Now an exec_target.
6082 (exec_open, exec_close_1, exec_get_section_table)
6083 (exec_xfer_partial, exec_files_info, exec_has_memory)
6084 (exec_make_note_section): Refactor as exec_target methods.
6085 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6086 Delete.
6087 (exec_target::find_memory_regions): New.
6088 (_initialize_exec): Don't call init_exec_ops.
6089 * gdbcore.h (exec_file_clear): Delete.
6090
6091 * corefile.c (core_target): Delete.
6092 (core_file_command): Adjust.
6093 * corelow.c (core_target): New class.
6094 (the_core_target): New.
6095 (core_close): Remove target_ops parameter.
6096 (core_close_cleanup): Adjust.
6097 (core_target::close): New.
6098 (core_open, core_detach, get_core_registers, core_files_info)
6099 (core_xfer_partial, core_thread_alive, core_read_description)
6100 (core_pid_to_str, core_thread_name, core_has_memory)
6101 (core_has_stack, core_has_registers, core_info_proc): Rework as
6102 core_target methods.
6103 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6104 (_initialize_corelow): Initialize the_core_target.
6105 * gdbcore.h (core_target): Delete.
6106 (the_core_target): New.
6107
6108 * ctf.c: (ctf_target): New class.
6109 (ctf_ops): Now a ctf_target.
6110 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6111 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6112 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6113 methods.
6114 (init_ctf_ops): Delete.
6115 (_initialize_ctf): Don't call it.
6116 * tracefile-tfile.c (tfile_target): New class.
6117 (tfile_ops): Now a tfile_target.
6118 (tfile_open, tfile_close, tfile_files_info)
6119 (tfile_get_tracepoint_status, tfile_trace_find)
6120 (tfile_fetch_registers, tfile_xfer_partial)
6121 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6122 Refactor as tfile_target methods.
6123 (tfile_xfer_partial_features): Remove target_ops parameter.
6124 (init_tfile_ops): Delete.
6125 (_initialize_tracefile_tfile): Don't call it.
6126 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6127 (tracefile_has_stack, tracefile_has_registers)
6128 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6129 tracefile_target methods.
6130 (init_tracefile_ops): Delete.
6131 (tracefile_target::tracefile_target): New.
6132 * tracefile.h: Include "target.h".
6133 (tracefile_target): New class.
6134 (init_tracefile_ops): Delete.
6135
6136 * spu-multiarch.c (spu_multiarch_target): New class.
6137 (spu_ops): Now a spu_multiarch_target.
6138 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6139 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6140 (spu_search_memory, spu_mourn_inferior): Refactor as
6141 spu_multiarch_target methods.
6142 (init_spu_ops): Delete.
6143 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6144 complete_target_initialization.
6145
6146 * ravenscar-thread.c (ravenscar_thread_target): New class.
6147 (ravenscar_ops): Now a ravenscar_thread_target.
6148 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6149 (ravenscar_thread_alive, ravenscar_pid_to_str)
6150 (ravenscar_fetch_registers, ravenscar_store_registers)
6151 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6152 (ravenscar_stopped_by_hw_breakpoint)
6153 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6154 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6155 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6156 methods.
6157 (init_ravenscar_thread_ops): Delete.
6158 (_initialize_ravenscar): Remove references to
6159 init_ravenscar_thread_ops and complete_target_initialization.
6160
6161 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6162 (bsd_uthread_target): New class.
6163 (bsd_uthread_ops): Now a bsd_uthread_target.
6164 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6165 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6166 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6167 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6168 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6169 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6170 (bsd_uthread_target): Delete function.
6171 (_initialize_bsd_uthread): Remove reference to
6172 complete_target_initialization.
6173
6174 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6175 (target_bfd): ... this new class.
6176 (target_bfd_xfer_partial, target_bfd_get_section_table)
6177 (target_bfd_close): Refactor as target_bfd methods.
6178 (target_bfd::~target_bfd): New.
6179 (target_bfd_reopen): Adjust.
6180 (target_bfd::close): New.
6181
6182 * record-btrace.c (record_btrace_target): New class.
6183 (record_btrace_ops): Now a record_btrace_target.
6184 (record_btrace_open, record_btrace_stop_recording)
6185 (record_btrace_disconnect, record_btrace_close)
6186 (record_btrace_async, record_btrace_info)
6187 (record_btrace_insn_history, record_btrace_insn_history_range)
6188 (record_btrace_insn_history_from, record_btrace_call_history)
6189 (record_btrace_call_history_range)
6190 (record_btrace_call_history_from, record_btrace_record_method)
6191 (record_btrace_is_replaying, record_btrace_will_replay)
6192 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6193 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6194 (record_btrace_store_registers, record_btrace_prepare_to_store)
6195 (record_btrace_to_get_unwinder)
6196 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6197 (record_btrace_commit_resume, record_btrace_wait)
6198 (record_btrace_stop, record_btrace_can_execute_reverse)
6199 (record_btrace_stopped_by_sw_breakpoint)
6200 (record_btrace_supports_stopped_by_sw_breakpoint)
6201 (record_btrace_stopped_by_hw_breakpoint)
6202 (record_btrace_supports_stopped_by_hw_breakpoint)
6203 (record_btrace_update_thread_list, record_btrace_thread_alive)
6204 (record_btrace_goto_begin, record_btrace_goto_end)
6205 (record_btrace_goto, record_btrace_stop_replaying_all)
6206 (record_btrace_execution_direction)
6207 (record_btrace_prepare_to_generate_core)
6208 (record_btrace_done_generating_core): Refactor as
6209 record_btrace_target methods.
6210 (init_record_btrace_ops): Delete.
6211 (_initialize_record_btrace): Remove reference to
6212 init_record_btrace_ops.
6213 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6214 the execution_direction global.
6215 (record_full_base_target, record_full_target)
6216 (record_full_core_target): New classes.
6217 (record_full_ops): Now a record_full_target.
6218 (record_full_core_ops): Now a record_full_core_target.
6219 (record_full_target::detach, record_full_target::disconnect)
6220 (record_full_core_target::disconnect)
6221 (record_full_target::mourn_inferior, record_full_target::kill):
6222 New.
6223 (record_full_open, record_full_close, record_full_async): Refactor
6224 as methods of the record_full_base_target class.
6225 (record_full_resume, record_full_commit_resume): Refactor
6226 as methods of the record_full_target class.
6227 (record_full_wait, record_full_stopped_by_watchpoint)
6228 (record_full_stopped_data_address)
6229 (record_full_stopped_by_sw_breakpoint)
6230 (record_full_supports_stopped_by_sw_breakpoint)
6231 (record_full_stopped_by_hw_breakpoint)
6232 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6233 methods of the record_full_base_target class.
6234 (record_full_store_registers, record_full_xfer_partial)
6235 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6236 Refactor as methods of the record_full_target class.
6237 (record_full_can_execute_reverse, record_full_get_bookmark)
6238 (record_full_goto_bookmark, record_full_execution_direction)
6239 (record_full_record_method, record_full_info, record_full_delete)
6240 (record_full_is_replaying, record_full_will_replay)
6241 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6242 (record_full_stop_replaying): Refactor as methods of the
6243 record_full_base_target class.
6244 (record_full_core_resume, record_full_core_kill)
6245 (record_full_core_fetch_registers)
6246 (record_full_core_prepare_to_store)
6247 (record_full_core_store_registers, record_full_core_xfer_partial)
6248 (record_full_core_insert_breakpoint)
6249 (record_full_core_remove_breakpoint)
6250 (record_full_core_has_execution): Refactor
6251 as methods of the record_full_core_target class.
6252 (record_full_base_target::supports_delete_record): New.
6253 (init_record_full_ops): Delete.
6254 (init_record_full_core_ops): Delete.
6255 (record_full_save): Refactor as method of the
6256 record_full_base_target class.
6257 (_initialize_record_full): Remove references to
6258 init_record_full_ops and init_record_full_core_ops.
6259
6260 * remote.c (remote_target, extended_remote_target): New classes.
6261 (remote_ops): Now a remote_target.
6262 (extended_remote_ops): Now an extended_remote_target.
6263 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6264 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6265 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6266 (remote_pass_signals, remote_set_syscall_catchpoint)
6267 (remote_program_signals, )
6268 (remote_thread_always_alive): Remove target_ops parameter.
6269 (remote_thread_alive, remote_thread_name)
6270 (remote_update_thread_list, remote_threads_extra_info)
6271 (remote_static_tracepoint_marker_at)
6272 (remote_static_tracepoint_markers_by_strid)
6273 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6274 (remote_open): Refactor as methods of remote_target.
6275 (extended_remote_open, extended_remote_detach)
6276 (extended_remote_attach, extended_remote_post_attach):
6277 (extended_remote_supports_disable_randomization)
6278 (extended_remote_create_inferior): : Refactor as method of
6279 extended_remote_target.
6280 (remote_set_permissions, remote_open_1, remote_detach)
6281 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6282 (remote_resume, remote_commit_resume, remote_stop)
6283 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6284 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6285 (remote_prepare_to_store, remote_store_registers)
6286 (remote_flash_erase, remote_flash_done, remote_files_info)
6287 (remote_kill, remote_mourn, remote_insert_breakpoint)
6288 (remote_remove_breakpoint, remote_insert_watchpoint)
6289 (remote_watchpoint_addr_within_range)
6290 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6291 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6292 (remote_supports_stopped_by_sw_breakpoint)
6293 (remote_stopped_by_hw_breakpoint)
6294 (remote_supports_stopped_by_hw_breakpoint)
6295 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6296 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6297 (remote_verify_memory): Refactor as methods of remote_target.
6298 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6299 parameter.
6300 (remote_xfer_partial, remote_get_memory_xfer_limit)
6301 (remote_search_memory, remote_rcmd, remote_memory_map)
6302 (remote_pid_to_str, remote_get_thread_local_address)
6303 (remote_get_tib_address, remote_read_description): Refactor as
6304 methods of remote_target.
6305 (remote_target::fileio_open, remote_target::fileio_pwrite)
6306 (remote_target::fileio_pread, remote_target::fileio_close): New.
6307 (remote_hostio_readlink, remote_hostio_fstat)
6308 (remote_filesystem_is_local, remote_can_execute_reverse)
6309 (remote_supports_non_stop, remote_supports_disable_randomization)
6310 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6311 (remote_supports_enable_disable_tracepoint)
6312 (remote_supports_string_tracing)
6313 (remote_can_run_breakpoint_commands, remote_trace_init)
6314 (remote_download_tracepoint, remote_can_download_tracepoint)
6315 (remote_download_trace_state_variable, remote_enable_tracepoint)
6316 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6317 (remote_trace_start, remote_get_trace_status)
6318 (remote_get_tracepoint_status, remote_trace_stop)
6319 (remote_trace_find, remote_get_trace_state_variable_value)
6320 (remote_save_trace_data, remote_get_raw_trace_data)
6321 (remote_set_disconnected_tracing, remote_core_of_thread)
6322 (remote_set_circular_trace_buffer, remote_traceframe_info)
6323 (remote_get_min_fast_tracepoint_insn_len)
6324 (remote_set_trace_buffer_size, remote_set_trace_notes)
6325 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6326 (remote_disable_btrace, remote_teardown_btrace)
6327 (remote_read_btrace, remote_btrace_conf)
6328 (remote_augmented_libraries_svr4_read, remote_load)
6329 (remote_pid_to_exec_file, remote_can_do_single_step)
6330 (remote_execution_direction, remote_thread_handle_to_thread_info):
6331 Refactor as methods of remote_target.
6332 (init_remote_ops, init_extended_remote_ops): Delete.
6333 (remote_can_async_p, remote_is_async_p, remote_async)
6334 (remote_thread_events, remote_upload_tracepoints)
6335 (remote_upload_trace_state_variables): Refactor as methods of
6336 remote_target.
6337 (_initialize_remote): Remove references to init_remote_ops and
6338 init_extended_remote_ops.
6339
6340 * remote-sim.c (gdbsim_target): New class.
6341 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6342 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6343 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6344 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6345 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6346 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6347 Refactor as methods of gdbsim_target.
6348 (gdbsim_ops): Now a gdbsim_target.
6349 (init_gdbsim_ops): Delete.
6350 (gdbsim_cntrl_c): Adjust.
6351 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6352
6353 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6354 (the_amd64_linux_nat_target): New.
6355 (amd64_linux_fetch_inferior_registers)
6356 (amd64_linux_store_inferior_registers): Refactor as methods of
6357 amd64_linux_nat_target.
6358 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6359 * i386-linux-nat.c: Don't include "linux-nat.h".
6360 (i386_linux_nat_target): New class.
6361 (the_i386_linux_nat_target): New.
6362 (i386_linux_fetch_inferior_registers)
6363 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6364 as methods of i386_linux_nat_target.
6365 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6366 * inf-child.c (inf_child_ops): Delete.
6367 (inf_child_fetch_inferior_registers)
6368 (inf_child_store_inferior_registers): Delete.
6369 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6370 methods of inf_child_target.
6371 (inf_child_target::supports_terminal_ours)
6372 (inf_child_target::terminal_init)
6373 (inf_child_target::terminal_inferior)
6374 (inf_child_target::terminal_ours_for_output)
6375 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6376 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6377 New.
6378 (inf_child_open, inf_child_disconnect, inf_child_close)
6379 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6380 (inf_child_post_startup_inferior, inf_child_can_run)
6381 (inf_child_pid_to_exec_file): Refactor as methods of
6382 inf_child_target.
6383 (inf_child_follow_fork): Delete.
6384 (inf_child_target::can_create_inferior)
6385 (inf_child_target::can_attach): New.
6386 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6387 (inf_child_target::has_stack, inf_child_target::has_registers)
6388 (inf_child_target::has_execution): New.
6389 (inf_child_fileio_open, inf_child_fileio_pwrite)
6390 (inf_child_fileio_pread, inf_child_fileio_fstat)
6391 (inf_child_fileio_close, inf_child_fileio_unlink)
6392 (inf_child_fileio_readlink, inf_child_use_agent)
6393 (inf_child_can_use_agent): Refactor as methods of
6394 inf_child_target.
6395 (return_zero, inf_child_target): Delete.
6396 (inf_child_target::inf_child_target): New.
6397 * inf-child.h: Include "target.h".
6398 (inf_child_target): Delete function prototype.
6399 (inf_child_target): New class.
6400 (inf_child_open_target, inf_child_mourn_inferior)
6401 (inf_child_maybe_unpush_target): Delete.
6402 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6403 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6404 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6405 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6406 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6407 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6408 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6409 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6410 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6411 methods of inf_ptrace_target.
6412 (inf_ptrace_target): Delete function.
6413 * inf-ptrace.h: Include "inf-child.h".
6414 (inf_ptrace_target): Delete function declaration.
6415 (inf_ptrace_target): New class.
6416 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6417 * linux-nat.c (linux_target): New.
6418 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6419 (linux_nat_target::~linux_nat_target): New.
6420 (linux_child_post_attach, linux_child_post_startup_inferior)
6421 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6422 (linux_child_remove_fork_catchpoint)
6423 (linux_child_insert_vfork_catchpoint)
6424 (linux_child_remove_vfork_catchpoint)
6425 (linux_child_insert_exec_catchpoint)
6426 (linux_child_remove_exec_catchpoint)
6427 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6428 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6429 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6430 (linux_nat_stopped_data_address)
6431 (linux_nat_stopped_by_sw_breakpoint)
6432 (linux_nat_supports_stopped_by_sw_breakpoint)
6433 (linux_nat_stopped_by_hw_breakpoint)
6434 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6435 (linux_nat_kill, linux_nat_mourn_inferior)
6436 (linux_nat_xfer_partial, linux_nat_thread_alive)
6437 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6438 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6439 (linux_child_static_tracepoint_markers_by_strid)
6440 (linux_nat_is_async_p, linux_nat_can_async_p)
6441 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6442 (linux_nat_supports_multi_process)
6443 (linux_nat_supports_disable_randomization, linux_nat_async)
6444 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6445 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6446 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6447 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6448 methods of linux_nat_target.
6449 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6450 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6451 parameter.
6452 (check_stopped_by_watchpoint): Adjust.
6453 (linux_xfer_partial): Delete.
6454 (linux_target_install_ops, linux_target, linux_nat_add_target):
6455 Delete.
6456 (linux_nat_target::linux_nat_target): New.
6457 * linux-nat.h: Include "inf-ptrace.h".
6458 (linux_nat_target): New.
6459 (linux_target, linux_target_install_ops, linux_nat_add_target):
6460 Delete function declarations.
6461 (linux_target): Declare global.
6462 * linux-thread-db.c (thread_db_target): New.
6463 (thread_db_target::thread_db_target): New.
6464 (thread_db_ops): Delete.
6465 (the_thread_db_target): New.
6466 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6467 (thread_db_update_thread_list, thread_db_pid_to_str)
6468 (thread_db_extra_thread_info)
6469 (thread_db_thread_handle_to_thread_info)
6470 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6471 (thread_db_resume): Refactor as methods of thread_db_target.
6472 (init_thread_db_ops): Delete.
6473 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6474 * x86-linux-nat.c: Don't include "linux-nat.h".
6475 (super_post_startup_inferior): Delete.
6476 (x86_linux_nat_target::~x86_linux_nat_target): New.
6477 (x86_linux_child_post_startup_inferior)
6478 (x86_linux_read_description, x86_linux_enable_btrace)
6479 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6480 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6481 methods of x86_linux_nat_target.
6482 (x86_linux_create_target): Delete. Bits folded ...
6483 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6484 pointer.
6485 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6486 (x86_linux_nat_target): New class.
6487 (x86_linux_create_target): Delete.
6488 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6489 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6490 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6491 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6492 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6493 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6494 make extern.
6495 (x86_use_watchpoints): Delete.
6496 * x86-nat.h: Include "breakpoint.h" and "target.h".
6497 (x86_use_watchpoints): Delete.
6498 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6499 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6500 (x86_insert_watchpoint, x86_remove_watchpoint)
6501 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6502 (x86_stopped_by_hw_breakpoint): New declarations.
6503 (x86_nat_target): New template class.
6504
6505 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6506 (the_ppc_linux_nat_target): New.
6507 (ppc_linux_fetch_inferior_registers)
6508 (ppc_linux_can_use_hw_breakpoint)
6509 (ppc_linux_region_ok_for_hw_watchpoint)
6510 (ppc_linux_ranged_break_num_registers)
6511 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6512 (ppc_linux_insert_mask_watchpoint)
6513 (ppc_linux_remove_mask_watchpoint)
6514 (ppc_linux_can_accel_watchpoint_condition)
6515 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6516 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6517 (ppc_linux_watchpoint_addr_within_range)
6518 (ppc_linux_masked_watch_num_registers)
6519 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6520 (ppc_linux_read_description): Refactor as methods of
6521 ppc_linux_nat_target.
6522 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6523
6524 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6525 (procfs_target): New class.
6526 (the_procfs_target): New.
6527 (procfs_target): Delete function.
6528 (procfs_auxv_parse, procfs_attach, procfs_detach)
6529 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6530 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6531 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6532 (procfs_create_inferior, procfs_update_thread_list)
6533 (procfs_thread_alive, procfs_pid_to_str)
6534 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6535 (procfs_stopped_data_address, procfs_insert_watchpoint)
6536 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6537 (proc_find_memory_regions, procfs_info_proc)
6538 (procfs_make_note_section): Refactor as methods of procfs_target.
6539 (_initialize_procfs): Adjust.
6540 * sol-thread.c (sol_thread_target): New class.
6541 (sol_thread_ops): Now a sol_thread_target.
6542 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6543 (sol_thread_fetch_registers, sol_thread_store_registers)
6544 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6545 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6546 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6547 (init_sol_thread_ops): Delete.
6548 (_initialize_sol_thread): Adjust. Remove references to
6549 init_sol_thread_ops and complete_target_initialization.
6550
6551 * windows-nat.c (windows_nat_target): New class.
6552 (windows_fetch_inferior_registers)
6553 (windows_store_inferior_registers, windows_resume, windows_wait)
6554 (windows_attach, windows_detach, windows_pid_to_exec_file)
6555 (windows_files_info, windows_create_inferior)
6556 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6557 (windows_close, windows_pid_to_str, windows_xfer_partial)
6558 (windows_get_tib_address, windows_get_ada_task_ptid)
6559 (windows_thread_name, windows_thread_alive): Refactor as
6560 windows_nat_target methods.
6561 (do_initial_windows_stuff): Adjust.
6562 (windows_target): Delete function.
6563 (_initialize_windows_nat): Adjust.
6564
6565 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6566 (darwin_mourn_inferior, darwin_kill_inferior)
6567 (darwin_create_inferior, darwin_attach, darwin_detach)
6568 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6569 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6570 (darwin_supports_multi_process): Refactor as darwin_nat_target
6571 methods.
6572 (darwin_resume_to, darwin_files_info): Delete.
6573 (_initialize_darwin_inferior): Rename to ...
6574 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6575 * darwin-nat.h: Include "inf-child.h".
6576 (darwin_nat_target): New class.
6577 (darwin_complete_target): Delete.
6578 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6579 (darwin_target): New.
6580 (i386_darwin_fetch_inferior_registers)
6581 (i386_darwin_store_inferior_registers): Refactor as methods of
6582 darwin_nat_target.
6583 (darwin_complete_target): Delete, with ...
6584 (_initialize_i386_darwin_nat): ... bits factored out here.
6585
6586 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6587 (the_alpha_linux_nat_target): New.
6588 (alpha_linux_register_u_offset): Refactor as
6589 alpha_linux_nat_target method.
6590 (_initialize_alpha_linux_nat): Adjust.
6591 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6592 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6593 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6594 methods of linux_nat_trad_target.
6595 (linux_trad_target): Delete.
6596 * linux-nat-trad.h (linux_trad_target): Delete function.
6597 (linux_nat_trad_target): New class.
6598 * mips-linux-nat.c (mips_linux_nat_target): New class.
6599 (super_fetch_registers, super_store_registers, super_close):
6600 Delete.
6601 (the_mips_linux_nat_target): New.
6602 (mips64_linux_regsets_fetch_registers)
6603 (mips64_linux_regsets_store_registers)
6604 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6605 (mips_linux_register_u_offset, mips_linux_read_description)
6606 (mips_linux_can_use_hw_breakpoint)
6607 (mips_linux_stopped_by_watchpoint)
6608 (mips_linux_stopped_data_address)
6609 (mips_linux_region_ok_for_hw_watchpoint)
6610 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6611 (mips_linux_close): Refactor as methods of mips_linux_nat.
6612 (_initialize_mips_linux_nat): Adjust to C++ification.
6613
6614 * aix-thread.c (aix_thread_target): New class.
6615 (aix_thread_ops): Now an aix_thread_target.
6616 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6617 (aix_thread_fetch_registers, aix_thread_store_registers)
6618 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6619 (aix_thread_thread_alive, aix_thread_pid_to_str)
6620 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6621 Refactor as methods of aix_thread_target.
6622 (init_aix_thread_ops): Delete.
6623 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6624 and complete_target_initialization.
6625 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6626 (rs6000_nat_target): New class.
6627 (the_rs6000_nat_target): New.
6628 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6629 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6630 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6631 (super_create_inferior): Delete.
6632 (_initialize_rs6000_nat): Adjust to C++ification.
6633
6634 * arm-linux-nat.c (arm_linux_nat_target): New class.
6635 (the_arm_linux_nat_target): New.
6636 (arm_linux_fetch_inferior_registers)
6637 (arm_linux_store_inferior_registers, arm_linux_read_description)
6638 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6639 (arm_linux_remove_hw_breakpoint)
6640 (arm_linux_region_ok_for_hw_watchpoint)
6641 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6642 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6643 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6644 arm_linux_nat_target.
6645 (_initialize_arm_linux_nat): Adjust to C++ification.
6646
6647 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6648 (the_aarch64_linux_nat_target): New.
6649 (aarch64_linux_fetch_inferior_registers)
6650 (aarch64_linux_store_inferior_registers)
6651 (aarch64_linux_child_post_startup_inferior)
6652 (aarch64_linux_read_description)
6653 (aarch64_linux_can_use_hw_breakpoint)
6654 (aarch64_linux_insert_hw_breakpoint)
6655 (aarch64_linux_remove_hw_breakpoint)
6656 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6657 (aarch64_linux_region_ok_for_hw_watchpoint)
6658 (aarch64_linux_stopped_data_address)
6659 (aarch64_linux_stopped_by_watchpoint)
6660 (aarch64_linux_watchpoint_addr_within_range)
6661 (aarch64_linux_can_do_single_step): Refactor as methods of
6662 aarch64_linux_nat_target.
6663 (super_post_startup_inferior): Delete.
6664 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6665
6666 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6667 (the_hppa_linux_nat_target): New.
6668 (hppa_linux_fetch_inferior_registers)
6669 (hppa_linux_store_inferior_registers): Refactor as methods of
6670 hppa_linux_nat_target.
6671 (_initialize_hppa_linux_nat): Adjust to C++ification.
6672
6673 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6674 (the_ia64_linux_nat_target): New.
6675 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6676 (ia64_linux_stopped_data_address)
6677 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6678 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6679 ia64_linux_nat_target methods.
6680 (super_xfer_partial): Delete.
6681 (_initialize_ia64_linux_nat): Adjust to C++ification.
6682
6683 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6684 (the_m32r_linux_nat_target): New.
6685 (m32r_linux_fetch_inferior_registers)
6686 (m32r_linux_store_inferior_registers): Refactor as
6687 m32r_linux_nat_target methods.
6688 (_initialize_m32r_linux_nat): Adjust to C++ification.
6689
6690 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6691 (the_m68k_linux_nat_target): New.
6692 (m68k_linux_fetch_inferior_registers)
6693 (m68k_linux_store_inferior_registers): Refactor as
6694 m68k_linux_nat_target methods.
6695 (_initialize_m68k_linux_nat): Adjust to C++ification.
6696
6697 * s390-linux-nat.c (s390_linux_nat_target): New class.
6698 (the_s390_linux_nat_target): New.
6699 (s390_linux_fetch_inferior_registers)
6700 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6701 (s390_insert_watchpoint, s390_remove_watchpoint)
6702 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6703 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6704 (s390_auxv_parse, s390_read_description): Refactor as methods of
6705 s390_linux_nat_target.
6706 (_initialize_s390_nat): Adjust to C++ification.
6707
6708 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6709 (the_sparc_linux_nat_target): New.
6710 (_initialize_sparc_linux_nat): Adjust to C++ification.
6711 * sparc-nat.c (sparc_fetch_inferior_registers)
6712 (sparc_store_inferior_registers): Remove target_ops parameter.
6713 * sparc-nat.h (sparc_fetch_inferior_registers)
6714 (sparc_store_inferior_registers): Remove target_ops parameter.
6715 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6716 (the_sparc64_linux_nat_target): New.
6717 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6718
6719 * spu-linux-nat.c (spu_linux_nat_target): New class.
6720 (the_spu_linux_nat_target): New.
6721 (spu_child_post_startup_inferior, spu_child_post_attach)
6722 (spu_child_wait, spu_fetch_inferior_registers)
6723 (spu_store_inferior_registers, spu_xfer_partial)
6724 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6725 methods.
6726 (_initialize_spu_nat): Adjust to C++ification.
6727
6728 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6729 (the_tilegx_linux_nat_target): New.
6730 (fetch_inferior_registers, store_inferior_registers):
6731 Refactor as methods.
6732 (_initialize_tile_linux_nat): Adjust to C++ification.
6733
6734 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6735 (the_xtensa_linux_nat_target): New.
6736 (xtensa_linux_fetch_inferior_registers)
6737 (xtensa_linux_store_inferior_registers): Refactor as
6738 xtensa_linux_nat_target methods.
6739 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6740
6741 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6742 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6743 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6744 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6745 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6746 (fbsd_stopped_by_sw_breakpoint)
6747 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6748 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6749 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6750 (fbsd_post_startup_inferior, fbsd_post_attach)
6751 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6752 (fbsd_set_syscall_catchpoint)
6753 (super_xfer_partial, super_resume, super_wait)
6754 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6755 (fbsd_handle_debug_trap): Remove target_ops parameter.
6756 (fbsd_nat_add_target): Delete.
6757 * fbsd-nat.h: Include "inf-ptrace.h".
6758 (fbsd_nat_add_target): Delete.
6759 (USE_SIGTRAP_SIGINFO): Define.
6760 (fbsd_nat_target): New class.
6761
6762 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6763 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6764 (amd64bsd_target): Delete.
6765 * amd64-bsd-nat.h: New file.
6766 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6767 "x86-bsd-nat.h".
6768 (amd64_fbsd_nat_target): New class.
6769 (the_amd64_fbsd_nat_target): New.
6770 (amd64fbsd_read_description): Refactor as method of
6771 amd64_fbsd_nat_target.
6772 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6773 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6774 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6775 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6776 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6777 (i386bsd_target): Delete.
6778 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6779 (i386bsd_fetch_inferior_registers)
6780 (i386bsd_store_inferior_registers): Declare.
6781 (i386_bsd_nat_target): New class.
6782 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6783 (the_i386_fbsd_nat_target): New.
6784 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6785 i386_fbsd_nat_target methods.
6786 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6787 (_initialize_i386fbsd_nat): Adjust to C++ification.
6788 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6789 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6790 (_initialize_x86_bsd_nat): Adjust to C++ification.
6791 * x86-bsd-nat.h: Include "x86-nat.h".
6792 (x86bsd_target): Delete declaration.
6793 (x86bsd_nat_target): New class.
6794
6795 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6796 (the_aarch64_fbsd_nat_target): New.
6797 (aarch64_fbsd_fetch_inferior_registers)
6798 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6799 aarch64_fbsd_nat_target.
6800 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6801 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6802 (the_alpha_bsd_nat_target): New.
6803 (alphabsd_fetch_inferior_registers)
6804 (alphabsd_store_inferior_registers): Refactor as
6805 alpha_bsd_nat_target methods.
6806 (_initialize_alphabsd_nat): Refactor as methods of
6807 alpha_bsd_nat_target.
6808 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6809 (the_amd64_nbsd_nat_target): New.
6810 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6811 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6812 (the_amd64_obsd_nat_target): New.
6813 (_initialize_amd64obsd_nat): Adjust to C++ification.
6814 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6815 (the_arm_fbsd_nat_target): New.
6816 (arm_fbsd_fetch_inferior_registers)
6817 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6818 (_initialize_arm_fbsd_nat): Refactor as methods of
6819 arm_fbsd_nat_target.
6820 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6821 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6822 (the_arm_netbsd_nat_target): New.
6823 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6824 arm_netbsd_nat_target.
6825 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6826 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6827 (the_hppa_nbsd_nat_target): New.
6828 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6829 hppa_nbsd_nat_target methods.
6830 (_initialize_hppanbsd_nat): Adjust to C++ification.
6831 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6832 (the_hppa_obsd_nat_target): New.
6833 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6834 methods of hppa_obsd_nat_target.
6835 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6836 add_target.
6837 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6838 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6839 add_target.
6840 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6841 (_initialize_i386obsd_nat): Use add_target.
6842 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6843 (the_m68k_bsd_nat_target): New.
6844 (m68kbsd_fetch_inferior_registers)
6845 (m68kbsd_store_inferior_registers): Refactor as methods of
6846 m68k_bsd_nat_target.
6847 (_initialize_m68kbsd_nat): Adjust to C++ification.
6848 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6849 (the_mips_fbsd_nat_target): New.
6850 (mips_fbsd_fetch_inferior_registers)
6851 (mips_fbsd_store_inferior_registers): Refactor as methods of
6852 mips_fbsd_nat_target.
6853 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6854 add_target.
6855 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6856 (the_mips_nbsd_nat_target): New.
6857 (mipsnbsd_fetch_inferior_registers)
6858 (mipsnbsd_store_inferior_registers): Refactor as methods of
6859 mips_nbsd_nat_target.
6860 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6861 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6862 (the_mips64_obsd_nat_target): New.
6863 (mips64obsd_fetch_inferior_registers)
6864 (mips64obsd_store_inferior_registers): Refactor as methods of
6865 mips64_obsd_nat_target.
6866 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6867 add_target.
6868 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6869 nbsd_nat_target.
6870 * nbsd-nat.h: Include "inf-ptrace.h".
6871 (nbsd_nat_target): New class.
6872 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6873 (obsd_wait): Refactor as methods of obsd_nat_target.
6874 (obsd_add_target): Delete.
6875 * obsd-nat.h: Include "inf-ptrace.h".
6876 (obsd_nat_target): New class.
6877 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6878 (the_ppc_fbsd_nat_target): New.
6879 (ppcfbsd_fetch_inferior_registers)
6880 (ppcfbsd_store_inferior_registers): Refactor as methods of
6881 ppc_fbsd_nat_target.
6882 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6883 add_target.
6884 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6885 (the_ppc_nbsd_nat_target): New.
6886 (ppcnbsd_fetch_inferior_registers)
6887 (ppcnbsd_store_inferior_registers): Refactor as methods of
6888 ppc_nbsd_nat_target.
6889 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6890 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6891 (the_ppc_obsd_nat_target): New.
6892 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6893 methods of ppc_obsd_nat_target.
6894 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6895 add_target.
6896 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6897 (the_sh_nbsd_nat_target): New.
6898 (shnbsd_fetch_inferior_registers)
6899 (shnbsd_store_inferior_registers): Refactor as methods of
6900 sh_nbsd_nat_target.
6901 (_initialize_shnbsd_nat): Adjust to C++ification.
6902 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6903 (inf_ptrace_xfer_partial): Delete.
6904 (sparc_xfer_partial, sparc_target): Delete.
6905 * sparc-nat.h (sparc_fetch_inferior_registers)
6906 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6907 (sparc_target): Delete function declaration.
6908 (sparc_target): New template class.
6909 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6910 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6911 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6912 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6913 add_target.
6914 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6915 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6916 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6917 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6918 add_target.
6919 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6920 (the_vax_bsd_nat_target): New.
6921 (vaxbsd_fetch_inferior_registers)
6922 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6923 methods.
6924 (_initialize_vaxbsd_nat): Adjust to C++ification.
6925
6926 * bsd-kvm.c (bsd_kvm_target): New class.
6927 (bsd_kvm_ops): Now a bsd_kvm_target.
6928 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6929 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6930 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6931 bsd_kvm_target.
6932 (bsd_kvm_return_one): Delete.
6933 (bsd_kvm_add_target): Adjust to C++ification.
6934
6935 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6936 (nto_procfs_target_procfs): New classes.
6937 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6938 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6939 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6940 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6941 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6942 (procfs_remove_hw_breakpoint, procfs_resume)
6943 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6944 (procfs_kill_inferior, procfs_store_registers)
6945 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6946 as methods of nto_procfs_target.
6947 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6948 (nto_native_ops): Delete.
6949 (procfs_open, procfs_native_open): Delete.
6950 (nto_native_ops): Now an nto_procfs_target_native.
6951 (init_procfs_targets): Adjust to C++ification.
6952 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6953 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6954 Refactor as methods of nto_procfs_target.
6955
6956 * go32-nat.c (go32_nat_target): New class.
6957 (the_go32_nat_target): New.
6958 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6959 (go32_store_registers, go32_xfer_partial, go32_files_info)
6960 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6961 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6962 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6963 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6964 (go32_target): Delete.
6965 (_initialize_go32_nat): Adjust to C++ification.
6966
6967 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6968 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6969 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6970 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6971 gnu_nat_target.
6972 (gnu_target): Delete.
6973 * gnu-nat.h (gnu_target): Delete.
6974 (gnu_nat_target): New class.
6975 * i386-gnu-nat.c (gnu_base_target): New.
6976 (i386_gnu_nat_target): New class.
6977 (the_i386_gnu_nat_target): New.
6978 (_initialize_i386gnu_nat): Adjust to C++ification.
6979
3fffc070
PA
69802018-05-02 Pedro Alves <palves@redhat.com>
6981
6982 * bfd-target.c (target_bfd_xclose): Rename to ...
6983 (target_bfd_close): ... this.
6984 (target_bfd_reopen): Adjust.
6985 * target.c (target_close): Remove references to to_xclose.
6986 * target.h (target_ops::to_xclose): Delete.
6987 (target_ops::to_close): Update comments.
6988
6798487f
PA
69892018-05-02 Pedro Alves <palves@redhat.com>
6990
6991 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6992 "linux-nat.h".
6993 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6994 * inf-ptrace.c (inf_ptrace_register_u_offset)
6995 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6996 (inf_ptrace_store_register, inf_ptrace_store_registers)
6997 (inf_ptrace_trad_target): Move to ...
6998 * linux-nat-trad.c: ... this new file.
6999 * linux-nat-trad.h: New file.
7000 * linux-nat.c (linux_target_install_ops): Make extern.
7001 (linux_trad_target): Delete.
7002 * linux-nat.h (linux_trad_target): Delete declaration.
7003 (linux_target_install_ops): Declare.
7004 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7005 "linux-nat.h".
7006
c1955e17
PA
70072018-05-02 Pedro Alves <palves@redhat.com>
7008
7009 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7010 procfs_target/add_target here.
7011 * procfs.c (procfs_target): Make static.
7012 (_initialize_procfs): Call add_target here.
7013 * procfs.h (struct target_ops): Remove forward declaration.
7014 (procfs_target): Remove declaration.
7015 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7016
b5c8fcb1
PA
70172018-05-02 Pedro Alves <palves@redhat.com>
7018
7019 * procfs.c (procfs_stopped_by_watchpoint)
7020 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7021 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7022 Forward declare.
7023 (procfs_use_watchpoints): Delete, move contents...
7024 (procfs_target): ... here.
7025 * procfs.h (procfs_use_watchpoints): Delete declaration.
7026 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7027 procfs_use_watchpoints.
7028 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7029 procfs_use_watchpoints.
7030
0489430a
TT
70312018-05-02 Tom Tromey <tom@tromey.com>
7032
7033 PR python/20084:
7034 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7035 and var_zuinteger_unlimited.
7036 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7037 and PARAM_ZUINTEGER_UNLIMITED.
7038 (set_parameter_value): Handle var_zuinteger and
7039 var_zuinteger_unlimited.
7040 (add_setshow_generic): Likewise.
7041 (parmpy_init): Likewise.
7042
1632f8ba
DR
70432018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7044
7045 PR rust/23124
7046 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7047 pointer is not null before dereferencing it.
7048
76761936
TT
70492018-04-30 Tom Tromey <tom@tromey.com>
7050
7051 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7052 is_mi_like_p.
7053
2d33446d
TT
70542018-04-30 Tom Tromey <tom@tromey.com>
7055
7056 * breakpoint.c (mention): Remove use of is_mi_like_p.
7057 (print_mention_ranged_breakpoint): Likewise.
7058 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7059 of is_mi_like_p.
7060
f3c6abab
TT
70612018-04-30 Tom Tromey <tom@tromey.com>
7062
7063 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7064
40c03530
TT
70652018-04-30 Tom Tromey <tom@tromey.com>
7066
7067 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7068 (info_spu_event_command): Remove some uses of is_mi_like_p.
7069
2038b7fd
TT
70702018-04-30 Tom Tromey <tom@tromey.com>
7071
7072 * python/py-framefilter.c (py_print_single_arg)
7073 (enumerate_locals, py_print_args, py_print_frame): Remove some
7074 uses of is_mi_like_p.
7075
4904c3c6
TT
70762018-04-30 Tom Tromey <tom@tromey.com>
7077
7078 * ui-out.c: Update.
7079 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7080 * ui-out.h (ui_out::is_mi_like_p): Now const.
7081 (ui_out::do_is_mi_like_p): Now const.
7082 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7083
7c66fffc
TT
70842018-04-30 Tom Tromey <tom@tromey.com>
7085
7086 * varobj.c (varobj_set_visualizer): Use new_reference.
7087 * python/python.c (gdbpy_decode_line): Use new_reference.
7088 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7089 new_reference.
7090
bbfa6f00
TT
70912018-04-30 Tom Tromey <tom@tromey.com>
7092
7093 * varobj.c (install_new_value): Use new_reference.
7094 * value.h (value_incref): Return void. Swap intro comment with
7095 value_decref.
7096 * value.c (set_value_parent): Use new_reference.
7097 (value_incref): Return void. Update intro comment.
7098 (release_value): Use new_reference.
7099 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7100
1831a9f9
TT
71012018-04-30 Tom Tromey <tom@tromey.com>
7102
7103 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7104 * gdb_bfd.h (new_bfd_ref): Remove.
7105 (gdb_bfd_open): Update comment.
7106 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7107 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7108 (gdb_bfd_fdopenr): Use new_reference.
7109 * exec.c (exec_file_attach): Use new_reference.
7110
7c1b5f3d
TT
71112018-04-30 Tom Tromey <tom@tromey.com>
7112
7113 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7114 method.
7115
e11fb955
TT
71162018-04-30 Tom Tromey <tom@tromey.com>
7117
7118 * jit.c (jit_read_code_entry): Use type_align.
7119 * i386-tdep.c (i386_gdbarch_init): Don't call
7120 set_gdbarch_long_long_align_bit.
7121 * gdbarch.sh: Remove long_long_align_bit.
7122 * gdbarch.c, gdbarch.h: Rebuild.
7123 * arc-tdep.c (arc_type_align): New function.
7124 (arc_gdbarch_init): Use arc_type_align. Don't call
7125 set_gdbarch_long_long_align_bit.
7126
2fff16dd
TT
71272018-04-30 Tom Tromey <tom@tromey.com>
7128
7129 * rust-lang.c (rust_type_alignment): Remove.
7130 (rust_composite_type): Use type_align.
7131
6d7bb824
TT
71322018-04-30 Tom Tromey <tom@tromey.com>
7133
7134 * NEWS: Mention Type.align.
7135 * python/py-type.c (typy_get_alignof): New function.
7136 (type_object_getset): Add "alignof".
7137
007e1530
TT
71382018-04-30 Tom Tromey <tom@tromey.com>
7139
7140 PR exp/17095:
7141 * NEWS: Update.
7142 * std-operator.def (UNOP_ALIGNOF): New operator.
7143 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7144 New.
7145 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7146 * c-lang.c (c_op_print_tab): Add alignof.
7147 * c-exp.y (ALIGNOF): New token.
7148 (exp): Add "ALIGNOF" production.
7149 (ident_tokens): Add _Alignof and alignof.
7150
2b4424c3
TT
71512018-04-30 Tom Tromey <tom@tromey.com>
7152
7153 * i386-tdep.c (i386_type_align): New function.
7154 (i386_gdbarch_init): Update.
7155 * gdbarch.sh (type_align): New method.
7156 * gdbarch.c, gdbarch.h: Rebuild.
7157 * arch-utils.h (default_type_align): Declare.
7158 * arch-utils.c (default_type_align): New function.
7159 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7160 (struct type) <align_log2>: New field.
7161 <instance_flags>: Now a bitfield.
7162 (TYPE_RAW_ALIGN): New macro.
7163 (type_align, type_raw_align, set_type_align): Declare.
7164 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7165 functions.
7166 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7167 (get_alignment, maybe_set_alignment): New functions.
7168 (read_structure_type, read_enumeration_type, read_array_type)
7169 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7170 (read_subrange_type, read_base_type): Set type alignment.
7171
d33bc52e
SM
71722018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7173
7174 * dwarf2read.c (read_index_from_section): Use bool.
7175
e28b63a9
FG
71762018-04-29 Fabian Groffen <grobian@gentoo.org>
7177
7178 PR gdb/22950
7179 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7180 with #ifdef.
7181
cd8c76e4
JR
71822018-04-29 John Reiser <jreiser@BitWagon.com>
7183
7184 PR build/22873
7185 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7186 last step, and do it atomically.
7187
476d250e
AO
71882018-04-27 Alexandre Oliva <aoliva@redhat.com>
7189
7190 * compile/compile-c-types.c (convert_int, convert_float):
7191 Update for C FE v1.
7192
6873858b
TT
71932018-04-27 Tom Tromey <tom@tromey.com>
7194
7195 PR rust/22545:
7196 * rust-lang.c (rust_inclusive_range_type_p): New function.
7197 (rust_range): Handle inclusive ranges.
7198 (rust_compute_range): Likewise.
7199 * rust-exp.y (struct rust_op) <inclusive>: New field.
7200 (DOTDOTEQ): New constant.
7201 (range_expr): Add "..=" productions.
7202 (operator_tokens): Add "..=" token.
7203 (ast_range): Add "inclusive" parameter.
7204 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7205 ranges.
7206 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7207 bounds values.
7208 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7209 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7210 Update comments.
7211 * expprint.c (print_subexp_standard): Handle new bounds values.
7212 (dump_subexp_body_standard): Likewise.
7213
632e107b
TT
72142018-04-27 Tom Tromey <tom@tromey.com>
7215
7216 * configure: Rebuild.
7217 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7218 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7219 "OVERRIDE".
7220 (class symbol_needs_eval_context): Likewise.
7221 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7222 (mock_mapped_index::symbol_name_at): Use "override". Remove
7223 "virtual".
7224 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7225 "override".
7226 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7227 * aarch64-tdep.c (instruction_reader::read): Use "override".
7228 (instruction_reader_test::read): Likewise.
7229 * arm-tdep.c (instruction_reader::read): Use "override".
7230 (instruction_reader_thumb::read): Likewise.
7231
b75abf5b
AK
72322018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7233
7234 PR remote/9665
7235 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7236 instead of remote_send.
7237 (remote_send): Remove.
7238
79188d8d
PA
72392018-04-26 Pedro Alves <palves@redhat.com>
7240
7241 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7242 find_function_start_sal instead of find_pc_line.
7243
f50776aa
PA
72442018-04-26 Pedro Alves <palves@redhat.com>
7245
7246 * breakpoint.c (set_breakpoint_location_function): Handle
7247 mst_data_gnu_ifunc.
7248 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7249 * elfread.c (elf_symtab_read): Give data symbols with
7250 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7251 (elf_rel_plt_read): Update comment.
7252 * linespec.c (convert_linespec_to_sals): Handle
7253 mst_data_gnu_ifunc.
7254 (minsym_found): Handle mst_data_gnu_ifunc.
7255 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7256 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7257 * parse.c (find_minsym_type_and_address): Handle
7258 mst_data_gnu_ifunc.
7259 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7260 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7261 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7262 comment.
7263 <mst_data_gnu_ifunc>: New enumerator.
7264
20944a6e
PA
72652018-04-26 Pedro Alves <palves@redhat.com>
7266
7267 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7268 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7269 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7270 Handle it.
7271 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7272 (lookup_minimal_symbol_by_pc): Adjust.
7273 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7274 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7275 * minsyms.h (lookup_msym_prefer): New enum.
7276 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7277 parameter by a lookup_msym_prefer parameter.
7278
1adeb822
PA
72792018-04-26 Pedro Alves <palves@redhat.com>
7280
7281 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7282 ends in "@plt" instead of looking at the symbol's section.
7283
a0aca7b0
PA
72842018-04-26 Pedro Alves <palves@redhat.com>
7285
7286 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7287 all references.
7288 (find_pc_partial_function_gnu_ifunc): Rename to ...
7289 (find_pc_partial_function): ... this, and remove references to
7290 'is_gnu_ifunc_p'.
7291 (find_pc_partial_function): Delete old implementation.
7292 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7293
76af0f26
PA
72942018-04-26 Pedro Alves <palves@redhat.com>
7295
7296 * linespec.c (struct bound_minimal_symbol_search_key): New.
7297 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7298 skip first line if we found a GNU ifunc minimal symbol by name.
7299 (compare_msymbols): Change parameters to work with a destructured
7300 lhs minsym.
7301 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7302 functions.
7303
3467ec66
PA
73042018-04-26 Pedro Alves <palves@redhat.com>
7305
7306 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7307 ifunc targets here. Instead, if we have an ifunc minsym, use its
7308 address/name.
7309 (add_location_to_breakpoint): Store the minsym and the objfile in
7310 the breakpoint location.
7311 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7312 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7313 Record the minsym in the sal.
7314 * symtab.h (symtab_and_line) <msymbol>: New field.
7315
28f4fa4d
PA
73162018-04-26 Pedro Alves <palves@redhat.com>
7317
7318 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7319 unless we actually resolved the ifunc.
7320
ca31ab1d
PA
73212018-04-26 Pedro Alves <palves@redhat.com>
7322
7323 * c-exp.y (variable production): Prefer ifunc minsyms over
7324 regular function symbols.
7325 * symtab.c (find_gnu_ifunc): New function.
7326 * minsyms.h (lookup_msym_prefer): New enum.
7327 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7328 parameter by a lookup_msym_prefer parameter.
7329 * symtab.h (find_gnu_ifunc): New declaration.
7330
8388016d
PA
73312018-04-26 Pedro Alves <palves@redhat.com>
7332
7333 * blockframe.c (find_gnu_ifunc_target_type): New function.
7334 (find_function_type): New.
7335 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7336 return a value with a memory address.
7337 (eval_call): For calls to GNU ifunc functions, try to find the
7338 type of the target function from the type that the resolver
7339 returns.
7340 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7341 symbols.
7342 * infcall.c (find_function_return_type): Delete.
7343 (find_function_addr): Add 'function_type' parameter. For calls to
7344 GNU ifunc functions, try to find the type of the target function
7345 from the type that the resolver returns, and return it via
7346 FUNCTION_TYPE.
7347 (call_function_by_hand_dummy): Adjust to use the function type
7348 returned by find_function_addr.
7349 (find_function_addr): Add 'function_type' parameter and move
7350 description here.
7351 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7352 declarations.
7353
a376e11d
PA
73542018-04-26 Pedro Alves <palves@redhat.com>
7355
7356 * c-exp.y (variable production): Skip finding an alias for ifunc
7357 symbols.
7358
02e169e2
PA
73592018-04-26 Pedro Alves <palves@redhat.com>
7360
7361 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7362
249b5733
PA
73632018-04-25 Pedro Alves <palves@redhat.com>
7364
7365 * infcmd.c (kill_command): Print the pid as string, not the whole
7366 thread's ptid. Add comment. s/has been killed/killed/ in output
7367 message.
7368 * remote.c (remote_detach_1): Print the pid as string, not the
7369 whole thread's ptid.
7370
f67c0c91
SDJ
73712018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7372 Sergio Durigan Junior <sergiodj@redhat.com>
7373 Pedro Alves <palves@redhat.com>
7374
7375 * infcmd.c (kill_command): Print message when inferior has
7376 been killed.
7377 * inferior.c (print_inferior_events): Remove 'static'. Set as
7378 '1'.
7379 (add_inferior): Improve message printed when
7380 'print_inferior_events' is on.
7381 (exit_inferior): Remove message printed when
7382 'print_inferior_events' is on.
7383 (detach_inferior): Improve message printed when
7384 'print_inferior_events' is on.
7385 (initialize_inferiors): Use 'add_inferior_silent' to set
7386 'current_inferior_'.
7387 * inferior.h (print_inferior_events): Declare here as
7388 'extern'.
7389 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7390 '[Detaching...]' messages when 'print_inferior_events' is on.
7391 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7392 as prefix/suffix for messages. Remove periods. Fix erroneous
7393 'Detaching after fork from child...', replace it by '... from
7394 parent...'.
7395 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7396 prefix/suffix when printing 'Detaching...' messages. Print
7397 them when 'print_inferior_events' is on.
7398 * remote.c (remote_detach_1): Print message when detaching
7399 from inferior and '!is_fork_parent'.
7400
e427af18
TT
74012018-04-24 Tom Tromey <tom@tromey.com>
7402
7403 * cli-out.h: Reindent.
7404
05b1d8d6
TT
74052018-04-24 Tom Tromey <tom@tromey.com>
7406
7407 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7408 (cli_ui_out::do_field_string): Use fputs_filtered.
7409 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7410
a95c7dab
TT
74112018-04-23 Tom Tromey <tom@tromey.com>
7412
7413 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7414 gdb::unique_xmalloc_ptr.
7415
458412c3
TT
74162018-04-23 Tom Tromey <tom@tromey.com>
7417
7418 * configure: Rebuild.
7419
db86b02b
RS
74202018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7421
7422 PR gdb/23095
7423 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7424 prepare_for_testing. Set normal_bp to r_debug_state if target
7425 is bsd.
7426
00aecdcf
PA
74272018-04-21 Pedro Alves <palves@redhat.com>
7428 Rajendra SY <rajendra.sy@gmail.com>
7429
7430 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7431 * remote.c (extended_remote_attach): In all-stop mode, mark the
7432 thread as executing.
7433
224608c3
PW
74342018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7435
7436 * thread.c (thread_apply_all_command): Fix comment.
7437 (thread_command): Fix comment.
7438
3b74854b
AH
74392018-04-10 Alan Hayward <alan.hayward@arm.com>
7440
7441 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7442 parameter.
7443 * features/aarch64-core.c (create_feature_aarch64_core):
7444 Regenerate.
7445 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7446 Likewise.
7447 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7448 Likewise.
7449 * features/i386/32bit-avx512.c
7450 (create_feature_i386_32bit_avx512): Likewise.
7451 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7452 Likewise.
7453 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7454 Likewise.
7455 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7456 Likewise.
7457 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7458 Likewise.
7459 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7460 Likewise.
7461 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7462 Likewise.
7463 * features/i386/64bit-avx512.c
7464 (create_feature_i386_64bit_avx512): Likewise.
7465 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7466 Likewise.
7467 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7468 Likewise.
7469 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7470 Likewise.
7471 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7472 Likewise.
7473 * features/i386/64bit-segments.c
7474 (create_feature_i386_64bit_segments): Likewise.
7475 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7476 Likewise.
7477 * features/i386/x32-core.c
7478 (create_feature_i386_x32_core): Likewise.
7479 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7480 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7481 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7482 * target-descriptions.c: In generated code, don't pass xml
7483 filename.
7484
e98577a9
AH
74852018-04-18 Alan Hayward <alan.hayward@arm.com>
7486
7487 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7488 (print_xml_feature::visit_post): Likewise.
7489 (print_xml_feature::visit): Likewise.
7490 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7491 (print_xml_feature): Add new class.
7492 * regformats/regdat.sh: Null xmltarget on feature targets.
7493 * target-descriptions.c (struct target_desc): Add xmltarget.
7494 (maintenance_check_tdesc_xml_convert): Add unittest function.
7495 (tdesc_get_features_xml): Add function to get xml.
7496 (maintenance_check_xml_descriptions): Test xml generation.
7497 * xml-tdesc.c (string_read_description_xml): Add function.
7498 * xml-tdesc.h (string_read_description_xml): Add declaration.
7499
ad7fc756
AH
75002018-04-18 Alan Hayward <alan.hayward@arm.com>
7501
7502 * features/Makefile: Add feature marker to targets with new style
7503 target descriptions.
7504 * regformats/aarch64.dat: Regenerate.
7505 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7506 * regformats/i386/amd64-avx-linux.dat: Likewise.
7507 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7508 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7509 * regformats/i386/amd64-linux.dat: Likewise.
7510 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7511 * regformats/i386/amd64.dat: Likewise.
7512 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7513 * regformats/i386/i386-avx-linux.dat: Likewise.
7514 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7515 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7516 * regformats/i386/i386-linux.dat: Likewise.
7517 * regformats/i386/i386-mmx-linux.dat: Likewise.
7518 * regformats/i386/i386-mpx-linux.dat: Likewise.
7519 * regformats/i386/i386.dat: Likewise.
7520 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7521 * regformats/i386/x32-avx-linux.dat: Likewise.
7522 * regformats/i386/x32-linux.dat: Likewise.
7523 * regformats/tic6x-c62x-linux.dat: Likewise.
7524 * regformats/tic6x-c64x-linux.dat: Likewise.
7525 * regformats/tic6x-c64xp-linux.dat: Likewise.
7526 * regformats/regdat.sh: Parse feature marker.
7527
d278f585
AH
75282018-04-18 Alan Hayward <alan.hayward@arm.com>
7529
7530 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7531 (tdesc_osabi_name): Likewise.
7532 * target-descriptions.c (tdesc_architecture_name): Add new
7533 function.
7534 (tdesc_osabi_name): Likewise.
7535
eee8a18d
AH
75362018-04-18 Alan Hayward <alan.hayward@arm.com>
7537
7538 * common/tdesc.c (tdesc_predefined_type): Move to here.
7539 (tdesc_named_type): Likewise.
7540 (tdesc_create_vector): Likewise.
7541 (tdesc_create_struct): Likewise.
7542 (tdesc_set_struct_size): Likewise.
7543 (tdesc_create_union): Likewise.
7544 (tdesc_create_flags): Likewise.
7545 (tdesc_create_enum): Likewise.
7546 (tdesc_add_field): Likewise.
7547 (tdesc_add_typed_bitfield): Likewise.
7548 (tdesc_add_bitfield): Likewise.
7549 (tdesc_add_flag): Likewise.
7550 (tdesc_add_enum_value): Likewise.
7551 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7552 (struct tdesc_type_vector): Likewise.
7553 (struct tdesc_type_field): Likewise.
7554 (struct tdesc_type_with_fields): Likewise.
7555 (tdesc_create_enum): Add declaration.
7556 (tdesc_add_typed_bitfield): Likewise.
7557 (tdesc_add_enum_value): Likewise.
7558 * target-descriptions.c (tdesc_type_field): Move from here.
7559 (tdesc_type_builtin): Likewise.
7560 (tdesc_type_vector): Likewise.
7561 (tdesc_type_with_fields): Likewise.
7562 (tdesc_predefined_types): Likewise.
7563 (tdesc_named_type): Likewise.
7564 (tdesc_create_vector): Likewise.
7565 (tdesc_create_struct): Likewise.
7566 (tdesc_set_struct_size): Likewise.
7567 (tdesc_create_union): Likewise.
7568 (tdesc_create_flags): Likewise.
7569 (tdesc_create_enum): Likewise.
7570 (tdesc_add_field): Likewise.
7571 (tdesc_add_typed_bitfield): Likewise.
7572 (tdesc_add_bitfield): Likewise.
7573 (tdesc_add_flag): Likewise.
7574 (tdesc_add_enum_value): Likewise.
7575 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7576 (tdesc_add_typed_bitfield): Likewise.
7577 (tdesc_add_enum_value): Likewise.
7578
82ec9bc7
AH
75792018-04-18 Alan Hayward <alan.hayward@arm.com>
7580
7581 * common/tdesc.c (tdesc_feature::accept): Move to here.
7582 (tdesc_feature::operator==): Likewise.
7583 (tdesc_create_reg): Likewise.
7584 * common/tdesc.h (tdesc_type_kind): Likewise.
7585 (struct tdesc_type): Likewise.
7586 (struct tdesc_feature): Likewise.
7587 * regformats/regdat.sh: Create a feature.
7588 * target-descriptions.c (tdesc_type_kind): Move from here.
7589 (tdesc_type): Likewise.
7590 (tdesc_type_up): Likewise.
7591 (tdesc_feature): Likewise.
7592 (tdesc_create_reg): Likewise.
7593
ea3e7d71
AH
75942018-04-18 Alan Hayward <alan.hayward@arm.com>
7595
7596 * Makefile.in: Add arch/tdesc.c
7597 * common/tdesc.c: New file.
7598 * common/tdesc.h (tdesc_element_visitor): Move to here.
7599 (tdesc_element): Likewise.
7600 (tdesc_reg): Likewise.
7601 (tdesc_reg_up): Likewise.
7602 * regformats/regdef.h (reg): Add offset to constructors.
7603 * target-descriptions.c (tdesc_element_visitor): Move from here.
7604 (tdesc_element): Likewise.
7605 (tdesc_reg): Likewise.
7606 (tdesc_reg_up): Likewise.
7607
bedda9ac
TT
76082018-04-17 Tom Tromey <tom@tromey.com>
7609
7610 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7611 discriminant field.
7612
a037790e
TT
76132018-04-17 Tom Tromey <tom@tromey.com>
7614
7615 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7616
c7dcbf88
AA
76172018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7618
7619 * symtab.c (print_symbol_info): Skip printing filename and line
7620 number when `last' is NULL.
7621 (symtab_symbol_info): Use empty string instead of NULL for first
7622 invocation of print_symbol_info.
7623 (rbreak_command): Pass NULL to `last' parameter of
7624 print_symbol_info.
7625
07d28c77
SM
76262018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7627
7628 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7629 instead of nullptr.
7630
8a3de5e1
PA
76312018-04-16 Pedro Alves <palves@redhat.com>
7632
7633 * MAINTAINERS (sh): Remove.
7634 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7635 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7636 (ALLDEPFILES): Remove sh64-tdep.c.
7637 * NEWS: Mentions that support for SH-5/SH64 is removed.
7638 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7639 (sh*-*-openbsd*): Ditto.
7640 (sh64-*-elf*): Remove.
7641 (sh*): Remove.
7642 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7643 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7644 * sh-tdep.c: No longer include "sh64-tdep.h".
7645 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7646 * sh64-tdep.c, sh64-tdep.h: Remove files.
7647
a2a79012
PA
76482018-04-16 Pedro Alves <palves@redhat.com>
7649
7650 * MAINTAINERS: Remove m88k.
7651 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7652 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7653 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7654 * NEWS: Mention that support for m88k was removed.
7655 * configure.host (m88*-*-*): Remove support.
7656 * configure.nat (m88k-*-*): Remove support.
7657 * configure.tgt (m88*-*-openbsd*): Remove.
7658 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7659
eda4efb1
SM
76602018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7661
7662 * configure.tgt (x86_tobjs): New variable.
7663 (amd64_tobjs, i386_tobjs): Use it.
7664
b744723f
AA
76652018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7666
7667 * symtab.c (print_symbol_info): Precede the symbol definition by
7668 the line number when available.
7669 * NEWS: Advertise this enhancement.
7670
4a4495d6
MM
76712018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7672
7673 * NEWS (New options): announce set/show record btrace cpu.
7674 * btrace.c: Include record-btrace.h.
7675 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7676 the vendor is unknown.
7677 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7678 Maybe overwrite the btrace configuration's cpu.
7679 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7680 (btrace_fetch): Add cpu parameter. Update callers.
7681 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7682 Maybe overwrite the btrace configuration's cpu. Skip enabling
7683 errata workarounds if the vendor is unknown.
7684 * python/py-record-btrace.c: Include record-btrace.h.
7685 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7686 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7687 * record-btrace.c (record_btrace_cpu_state_kind): New.
7688 (record_btrace_cpu): New.
7689 (set_record_btrace_cpu_cmdlist): New.
7690 (record_btrace_get_cpu): New.
7691 (require_btrace_thread, record_btrace_info)
7692 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7693 (cmd_set_record_btrace_cpu_none): New.
7694 (cmd_set_record_btrace_cpu_auto): New.
7695 (cmd_set_record_btrace_cpu): New.
7696 (cmd_show_record_btrace_cpu): New.
7697 (_initialize_record_btrace): Initialize set/show record btrace cpu
7698 commands.
7699 * record-btrace.h (record_btrace_get_cpu): New.
7700
69f90c75
MM
77012018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7702
7703 * record.c (set_record_command): Fix typo in message.
7704
b85310e1
MM
77052018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7706
7707 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7708
1d509aa6
MM
77092018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7710
7711 * infrun.c (process_event_stop_test): Call
7712 gdbarch_in_indirect_branch_thunk.
7713 * gdbarch.sh (in_indirect_branch_thunk): New.
7714 * gdbarch.c: Regenerated.
7715 * gdbarch.h: Regenerated.
7716 * x86-tdep.h: New.
7717 * x86-tdep.c: New.
7718 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7719 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7720 (ALLDEPFILES): Add x86-tdep.c.
7721 * arch-utils.h (default_in_indirect_branch_thunk): New.
7722 * arch-utils.c (default_in_indirect_branch_thunk): New.
7723 * i386-tdep: Include x86-tdep.h.
7724 (i386_in_indirect_branch_thunk): New.
7725 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7726 function.
7727 * amd64-tdep: Include x86-tdep.h.
7728 (amd64_in_indirect_branch_thunk): New.
7729 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7730
b4be9bfd
JK
77312018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7732
7733 PR gdb/23053
7734 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7735 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7736 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7737 regression.
7738
53d7df28
TT
77392018-04-12 Tom Tromey <tom@tromey.com>
7740
7741 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7742 (rust_evaluate_subexp): Likewise.
7743
70b33f19
PA
77442018-04-12 Pedro Alves <palves@redhat.com>
7745
7746 * procfs.c (procfs_detach): Make forward declaration's prototype
7747 match definition's protototype.
7748 (proc_get_LDT_entry): Remove stale do_cleanups call.
7749
436411b1
PA
77502018-04-12 Pedro Alves <palves@redhat.com>
7751
7752 * target.h (target_ops::to_has_exited): Delete.
7753 (target_has_exited): Delete.
7754 * target-delegates.c: Regenerate.
7755
20db9c52
PA
77562018-04-11 Pedro Alves <palves@redhat.com>
7757
7758 * target.c (fileio_fh_t::t): Add comment.
7759 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7760 (target_fileio_close): Handle a NULL target.
7761 (invalidate_fileio_fh): New.
7762 (target_close): Call it.
7763 * remote.c (remote_hostio_send_command): No longer check whether
7764 remote_desc is open.
7765
5ff79300
PA
77662018-04-11 Pedro Alves <palves@redhat.com>
7767
7768 * target.c (fileio_fh_t): Make it a named struct instead of a
7769 typedef.
7770 (fileio_fh_t::is_closed): New method.
7771 (DEF_VEC_O (fileio_fh_t)): Remove.
7772 (fileio_fhandles): Now a std::vector.
7773 (is_closed_fileio_fh): Delete.
7774 (acquire_fileio_fd): Adjust. Rename parameters.
7775 (release_fileio_fd): Adjust.
7776 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7777 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7778 (target_fileio_close): Adjust.
7779
6e22e10d
SM
77802018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7781
7782 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7783 index.
7784
731f534f
PA
77852018-04-10 Pedro Alves <palves@redhat.com>
7786
7787 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7788 (scoped_finish_thread_state): New class.
7789 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7790 cleanup.
7791 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7792 (fetch_inferior_event, normal_stop): Likewise.
7793 * thread.c (finish_thread_state_cleanup): Delete.
7794
d5f4488f
SM
77952018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7796 Pedro Alves <palves@redhat.com>
7797
7798 * value.c: Include "selftest.h" and "common/array-view.h".
7799 (struct range) <operator ==>: New.
7800 (test_ranges_contain): New.
7801 (check_ranges_vector): New.
7802 (test_insert_into_bit_range_vector): New.
7803 (_initialize_values): Register selftests.
7804 * common/array-view.h (operator==, operator!=): New.
7805
b24531ed
SM
78062018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7807
7808 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7809 an iterator.
7810 * inline-frame.c: Include <algorithm>.
7811 (struct inline_state): Add constructor.
7812 (inline_state_s): Remove.
7813 (DEF_VEC_O(inline_state_s)): Remove.
7814 (inline_states): Change type to std::vector.
7815 (find_inline_frame_state): Adjust to std::vector.
7816 (allocate_inline_frame_state): Remove.
7817 (clear_inline_frame_state): Adjust to std::vector.
7818 (skip_inline_frames): Adjust to std::vector.
7819
c252925c
SM
78202018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7821
7822 * tracepoint.h (struct trace_state_variable): Add constructor.
7823 <name>: Change type to std::string.
7824 * tracepoint.c (tsv_s): Remove.
7825 (DEF_VEC_O(tsv_s)): Remove.
7826 (tvariables): Change to std::vector.
7827 (create_trace_state_variable): Adjust to std::vector.
7828 (find_trace_state_variable): Likewise.
7829 (find_trace_state_variable_by_number): Likewise.
7830 (delete_trace_state_variable): Likewise.
7831 (trace_variable_command): Adjust to std::string.
7832 (delete_trace_variable_command): Likewise.
7833 (tvariables_info_1): Adjust to std::vector.
7834 (save_trace_state_variables): Likewise.
7835 (start_tracing): Likewise.
7836 (merge_uploaded_trace_state_variables): Adjust to std::vector
7837 and std::string.
7838 * target.h (struct target_ops)
7839 <to_download_trace_state_variable>: Pass reference to
7840 trace_state_variable.
7841 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7842 * target-delegates.c: Re-generate.
7843 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7844 (mi_tsv_deleted): Likewise.
7845 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7846 * remote.c (remote_download_trace_state_variable): Change
7847 pointer to reference and adjust.
7848 * make-target-delegates (parse_argtypes): Handle references.
7849 (write_function_header): Likewise.
7850 (munge_type): Likewise.
7851
c9638d26
SM
78522018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7853
7854 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7855 string_view-selftests.c.
7856 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7857 testsuite.
7858 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7859 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7860 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7861 * unittests/basic_string_view/element_access/char/1.cc:
7862 Likewise.
7863 * unittests/basic_string_view/element_access/char/empty.cc:
7864 Likewise.
7865 * unittests/basic_string_view/element_access/char/front_back.cc:
7866 Likewise.
7867 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7868 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7869 Likewise.
7870 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7871 Likewise.
7872 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7873 Likewise.
7874 * unittests/basic_string_view/operations/compare/char/1.cc:
7875 Likewise.
7876 * unittests/basic_string_view/operations/compare/char/13650.cc:
7877 Likewise.
7878 * unittests/basic_string_view/operations/copy/char/1.cc:
7879 Likewise.
7880 * unittests/basic_string_view/operations/data/char/1.cc:
7881 Likewise.
7882 * unittests/basic_string_view/operations/find/char/1.cc:
7883 Likewise.
7884 * unittests/basic_string_view/operations/find/char/2.cc:
7885 Likewise.
7886 * unittests/basic_string_view/operations/find/char/3.cc:
7887 Likewise.
7888 * unittests/basic_string_view/operations/find/char/4.cc:
7889 Likewise.
7890 * unittests/basic_string_view/operations/rfind/char/1.cc:
7891 Likewise.
7892 * unittests/basic_string_view/operations/rfind/char/2.cc:
7893 Likewise.
7894 * unittests/basic_string_view/operations/rfind/char/3.cc:
7895 Likewise.
7896 * unittests/basic_string_view/operations/substr/char/1.cc:
7897 Likewise.
7898 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7899 * unittests/string_view-selftests.c: New file.
7900
fdc11678
SM
79012018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7902
7903 * unittests/basic_string_view/capacity/1.cc: New file.
7904 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7905 * unittests/basic_string_view/cons/char/1.cc: New file.
7906 * unittests/basic_string_view/cons/char/2.cc: New file.
7907 * unittests/basic_string_view/cons/char/3.cc: New file.
7908 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7909 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7910 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7911 * unittests/basic_string_view/element_access/char/1.cc: New file.
7912 * unittests/basic_string_view/element_access/char/2.cc: New file.
7913 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7914 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7915 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7916 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7917 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7918 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7919 * unittests/basic_string_view/include.cc: New file.
7920 * unittests/basic_string_view/inserters/char/1.cc: New file.
7921 * unittests/basic_string_view/inserters/char/2.cc: New file.
7922 * unittests/basic_string_view/inserters/char/3.cc: New file.
7923 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7924 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7925 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7926 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7927 * unittests/basic_string_view/literals/types.cc: New file.
7928 * unittests/basic_string_view/literals/values.cc: New file.
7929 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7930 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7931 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7932 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7933 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7934 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7935 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7936 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7937 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7938 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7939 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7940 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7941 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7942 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7943 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7944 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7945 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7946 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7947 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7948 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7949 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7950 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7951 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7952 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7953 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7954 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7955 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7956 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7957 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7958 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7959 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7960 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7961 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7962 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7963 * unittests/basic_string_view/operators/char/2.cc: New file.
7964 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7965 * unittests/basic_string_view/range_access/char/1.cc: New file.
7966 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7967 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7968 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7969 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7970 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7971 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7972 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7973 * unittests/basic_string_view/typedefs.cc: New file.
7974 * unittests/basic_string_view/types/1.cc: New file.
7975
8345c4a2
SM
79762018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7977
7978 * common/gdb_string_view.h: Remove libstdc++ implementation
7979 details, adjust to gdb reality.
7980 * common/gdb_string_view.tcc: Likewise.
7981 * cli/cli-script.c (struct string_view): Remove.
7982 (user_args) <m_args>: Change element type to gdb::string_view.
7983 (user_args::insert_args): Adjust.
7984
7adcdf08
SM
79852018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7986
7987 * common/gdb_string_view.h: New file.
7988 * common/gdb_string_view.tcc: New file.
7989
41260ac2
SM
79902018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7991
7992 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7993 * configure: Re-generate.
7994
0bee6dd4
PA
79952018-04-09 Pedro Alves <palves@redhat.com>
7996
7997 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7998 (set_target_gdbarch): Call
7999 gdb::observers::architecture_changed.notify instead of
8000 observer_notify_architecture_changed.
8001
6f14adc5
SM
80022018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8003
8004 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8005 (do_restore_current_traceframe_cleanup): Remove.
8006 (restore_current_traceframe_cleanup_dtor): Remove.
8007 (make_cleanup_restore_current_traceframe): Remove.
8008 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8009 New.
8010 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8011 * infrun.c (fetch_inferior_event): Use
8012 scoped_restore_current_traceframe.
8013
b2bdb8cf
SM
80142018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8015
8016 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8017 Remove.
8018 <n_allocated_type_units>: Remove.
8019 <all_type_units>: Change to std::vector.
8020 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8021 to std::vector change.
8022 (dwarf2_per_objfile::get_cutu): Likewise.
8023 (dwarf2_per_objfile::get_tu): Likewise.
8024 (create_signatured_type_table_from_index): Likewise.
8025 (create_signatured_type_table_from_debug_names): Likewise.
8026 (dw2_symtab_iter_next): Likewise.
8027 (dw2_print_stats): Likewise.
8028 (dw2_expand_all_symtabs): Likewise.
8029 (dw2_expand_marked_cus): Likewise.
8030 (dw2_debug_names_iterator::next): Likewise.
8031 (dwarf2_initialize_objfile): Likewise.
8032 (add_signatured_type_cu_to_table): Likewise.
8033 (create_all_type_units): Likewise.
8034 (add_type_unit): Likewise.
8035 (struct tu_abbrev_offset): Add constructor.
8036 (build_type_psymtabs_1): Adjust to std::vector change.
8037 (print_tu_stats): Likewise.
8038 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8039 (write_debug_names): Likewise.
8040
b76e467d
SM
80412018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8042
8043 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8044 Make an std::vector.
8045 <n_comp_units>: Remove.
8046 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8047 to std::vector change.
8048 (dwarf2_per_objfile::get_cutu): Likewise.
8049 (dwarf2_per_objfile::get_cu): Likewise.
8050 (create_cus_from_index): Likewise.
8051 (create_addrmap_from_index): Likewise.
8052 (create_addrmap_from_aranges): Likewise.
8053 (dwarf2_read_index): Likewise.
8054 (dw2_find_last_source_symtab): Likewise.
8055 (dw2_map_symtabs_matching_filename): Likewise.
8056 (dw2_symtab_iter_next): Likewise.
8057 (dw2_print_stats): Likewise.
8058 (dw2_expand_all_symtabs): Likewise.
8059 (dw2_expand_symtabs_with_fullname): Likewise.
8060 (dw2_expand_marked_cus): Likewise.
8061 (dw2_map_symbol_filenames): Likewise.
8062 (create_cus_from_debug_names): Likewise.
8063 (dwarf2_read_debug_names): Likewise.
8064 (dw2_debug_names_iterator::next): Likewise.
8065 (dwarf2_initialize_objfile): Likewise.
8066 (set_partial_user): Likewise.
8067 (dwarf2_build_psymtabs_hard): Likewise.
8068 (read_comp_units_from_section): Remove arguments, adjust to
8069 std::vector change.
8070 (create_all_comp_units): Adjust to std::vector and
8071 read_comp_units_from_section changes.
8072 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8073 change.
8074 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8075 (psyms_seen_size): Likewise.
8076 (write_gdbindex): Likewise.
8077 (write_debug_names): Likewise.
8078
12359b5e
SM
80792018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8080
8081 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8082 with dwarf2_per_objfile.
8083 (create_cus_from_index): Likewise.
8084 (create_signatured_type_table_from_index): Likewise.
8085 (dwarf2_read_index): Likewise.
8086 (dwarf2_initialize_objfile): Likewise.
8087 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8088 per_cu rather than get_dwarf2_per_objfile.
8089
ff4c9fec
SM
80902018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8091
8092 * dwarf2read.h (struct signatured_type): Forward declare.
8093 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8094 New methods.
8095 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8096 (dw2_get_cutu): ...this.
8097 (dwarf2_per_objfile::get_cu): Rename from...
8098 (dw2_get_cu): ...this.
8099 (dwarf2_per_objfile::get_tu): New.
8100 (create_addrmap_from_index): Adjust.
8101 (create_addrmap_from_aranges): Adjust.
8102 (dw2_find_last_source_symtab): Adjust.
8103 (dw2_map_symtabs_matching_filename): Adjust.
8104 (dw2_symtab_iter_next): Adjust.
8105 (dw2_print_stats): Adjust.
8106 (dw2_expand_all_symtabs): Adjust.
8107 (dw2_expand_symtabs_with_fullname): Adjust.
8108 (dw2_expand_marked_cus): Adjust.
8109 (dw_expand_symtabs_matching_file_matcher): Adjust.
8110 (dw2_map_symbol_filenames): Adjust.
8111 (dw2_debug_names_iterator::next): Adjust.
8112 (dwarf2_initialize_objfile): Adjust.
8113 (set_partial_user): Adjust.
8114 (dwarf2_build_psymtabs_hard): Adjust.
8115
5ca3fcb6
SM
81162018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8117
8118 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8119 Remove unused variables.
8120 (dw2_map_symtabs_matching_filename): Likewise.
8121 (dwarf2_record_block_ranges): Likewise.
8122 (dwarf2_read_addr_index): Likewise.
8123 (follow_die_offset): Likewise.
8124
b2e586e8
SM
81252018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8126
8127 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8128 to symbol_file_add_main.
8129
7c4e78cf
SM
81302018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8131
8132 PR mi/22299
8133 * mi/mi-console.c (do_fputc_async_safe): New.
8134 (mi_console_file::write_async_safe): New.
8135 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8136 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8137 New.
8138 * ui-file.c (ui_file::putstrn): Adjust call to
8139 fputstrn_unfiltered.
8140 * utils.c (printchar): Replace do_fputs and do_fprintf
8141 parameters by do_fputc.
8142 (fputstr_filtered): Adjust call to printchar.
8143 (fputstr_unfiltered): Likewise.
8144 (fputstrn_filtered): Likewise.
8145 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8146 printchar.
8147 * utils.h (do_fputc_ftype): New typedef.
8148 (fputstrn_unfiltered): Add do_fputc parameter.
8149
5dc026d3
SM
81502018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8151
8152 * regformats/i386/i386-avx.dat: Remove.
8153
c912f608
SM
81542018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8155
8156 PR gdb/22979
8157 * amd64-tdep.c (amd64_none_init_abi): New function.
8158 (amd64_x32_none_init_abi): New function.
8159 (_initialize_amd64_tdep): Register handlers for x86-64 and
8160 x64_32 with GDB_OSABI_NONE.
8161 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8162 GDB_OSABI_NONE osabi.
8163
26540402
SM
81642018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8165
8166 PR gdb/22980
8167 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8168 GDB_OSABI_NONE.
8169 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8170 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8171
9018be22
SM
81722018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8173
8174 * common/byte-vector.h (char_vector): New type.
8175 * target.h (target_read_alloc): Return
8176 gdb::optional<byte_vector>.
8177 (target_read_stralloc): Return gdb::optional<char_vector>.
8178 (target_get_osdata): Return gdb::optional<char_vector>.
8179 * target.c (target_read_alloc_1): Templatize. Replacement
8180 manual memory management with vector.
8181 (target_read_alloc): Change return type, adjust.
8182 (target_read_stralloc): Change return type, adjust.
8183 (target_get_osdata): Change return type, adjust.
8184 * auxv.c (struct auxv_info) <length>: Remove.
8185 <data>: Change type to gdb::optional<byte_vector>.
8186 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8187 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8188 (target_auxv_search): Adjust.
8189 (fprint_target_auxv): Adjust.
8190 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8191 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8192 (linux_make_corefile_notes): Adjust.
8193 * osdata.c (get_osdata): Adjust.
8194 * remote.c (remote_get_threads_with_qxfer): Adjust.
8195 (remote_memory_map): Adjust.
8196 (remote_traceframe_info): Adjust.
8197 (btrace_read_config): Adjust.
8198 (remote_read_btrace): Adjust.
8199 (remote_pid_to_exec_file): Adjust.
8200 * solib-aix.c (solib_aix_get_library_list): Adjust.
8201 * solib-dsbt.c (decode_loadmap): Don't free buf.
8202 (dsbt_get_initial_loadmaps): Adjust.
8203 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8204 * solib-target.c (solib_target_current_sos): Adjust.
8205 * tracepoint.c (sdata_make_value): Adjust.
8206 * xml-support.c (xinclude_start_include): Adjust.
8207 (xml_fetch_content_from_file): Adjust.
8208 * xml-support.h (xml_fetch_another): Change return type.
8209 (xml_fetch_content_from_file): Change return type.
8210 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8211 * xml-tdesc.c (file_read_description_xml): Adjust.
8212 (fetch_available_features_from_target): Change return type.
8213 (target_fetch_description_xml): Adjust.
8214 (target_read_description_xml): Adjust.
8215
14c88955
TT
82162018-04-06 Tom Tromey <tom@tromey.com>
8217
8218 * value.c (~value): Update.
8219 (struct value) <contents>: Now unique_xmalloc_ptr.
8220 (value_contents_bits_eq, allocate_value_contents)
8221 (value_contents_raw, value_contents_all_raw)
8222 (value_contents_for_printing, value_contents_for_printing_const)
8223 (set_value_enclosing_type): Update.
8224
0c7e6dd8
TT
82252018-04-06 Tom Tromey <tom@tromey.com>
8226
8227 * value.c (range_s): Remove typedef, VEC.
8228 (struct range): Add operator<.
8229 (range_lessthan): Remove.
8230 (ranges_contain): Change type.
8231 (~value): Update.
8232 (struct value) <unavailable, optimized_out>: Now std::vector.
8233 (value_entirely_available)
8234 (value_entirely_covered_by_range_vector)
8235 (value_entirely_unavailable, value_entirely_optimized_out):
8236 Update.
8237 (insert_into_bit_range_vector): Change argument type.
8238 (find_first_range_overlap): Likewise.
8239 (struct ranges_and_idx, value_contents_bits_eq)
8240 (require_not_optimized_out, require_available): Update.
8241 (ranges_copy_adjusted): Change argument types.
8242 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8243
2c8331b9
TT
82442018-04-06 Tom Tromey <tom@tromey.com>
8245
8246 * value.c (~value): Update.
8247 (struct value) <parent>: Now a value_ref_ptr.
8248 (value_parent, set_value_parent, value_address, value_copy):
8249 Update.
8250
466ce3ae
TT
82512018-04-06 Tom Tromey <tom@tromey.com>
8252
8253 * value.c (struct value): Add constructor, destructor, and member
8254 initializers.
8255 (allocate_value_lazy, value_decref): Update.
8256
062d818d
TT
82572018-04-06 Tom Tromey <tom@tromey.com>
8258
8259 * value.c (struct value) <released, next>: Remove.
8260 (all_values): Now a std::vector.
8261 (allocate_value_lazy): Update.
8262 (value_next): Remove.
8263 (value_mark, value_free_to_mark, release_value)
8264 (value_release_to_mark): Update.
8265
a6535de1
TT
82662018-04-06 Tom Tromey <tom@tromey.com>
8267
8268 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8269 (free_value_chain): Remove.
8270 * value.c (free_value_chain): Remove.
8271 (value_release_to_mark): Return a std::vector.
8272 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8273 std::vector.
8274 (check_condition): Update.
8275 * eval.c (fetch_subexp_value): Change "val_chain" to a
8276 std::vector.
8277 * breakpoint.c (update_watchpoint): Update.
8278 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8279
b5621201
TT
82802018-04-06 Tom Tromey <tom@tromey.com>
8281
8282 * value.h (free_all_values): Remove.
8283 * value.c (free_all_values): Remove.
8284
4d0266a0
TT
82852018-04-06 Tom Tromey <tom@tromey.com>
8286
8287 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8288 (value_history_chain, value_history_count): Remove.
8289 (value_history): New global.
8290 (record_latest_value, access_value_history, show_values)
8291 (preserve_values): Update.
8292
b4d61099
TT
82932018-04-06 Tom Tromey <tom@tromey.com>
8294
8295 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8296 * varobj.c (varobj_set_display_format, varobj_set_value)
8297 (install_default_visualizer, construct_visualizer)
8298 (install_new_value, ~varobj, varobj_get_value_type)
8299 (my_value_of_variable, varobj_editable_p): Update.
8300 * c-varobj.c (c_describe_child, c_value_of_variable)
8301 (cplus_number_of_children, cplus_describe_child): Update.
8302 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8303 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8304 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8305
9b558729
TT
83062018-04-06 Tom Tromey <tom@tromey.com>
8307
8308 * printcmd.c (last_examine_address): Change type to
8309 value_ref_ptr.
8310 (do_examine, x_command): Update.
8311
850645cf
TT
83122018-04-06 Tom Tromey <tom@tromey.com>
8313
8314 * value.c (release_value): Update.
8315 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8316 (struct bpstats) <val>: Now a value_ref_ptr.
8317 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8318 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8319 (~watchpoint, print_it_watchpoint, watch_command_1)
8320 (invalidate_bp_value_on_memory_change): Update.
8321
22bc8444
TT
83222018-04-06 Tom Tromey <tom@tromey.com>
8323
8324 * varobj.c (varobj_clear_saved_item)
8325 (update_dynamic_varobj_children, install_new_value, ~varobj):
8326 Update.
8327 * value.h (value_incref): Move declaration earlier.
8328 (value_decref): Rename from value_free.
8329 (struct value_ref_policy): New.
8330 (value_ref_ptr): New typedef.
8331 (struct value_deleter): Remove.
8332 (gdb_value_up): Remove typedef.
8333 (release_value): Change return type.
8334 (release_value_or_incref): Remove.
8335 * value.c (set_value_parent): Update.
8336 (value_incref): Change return type.
8337 (value_decref): Rename from value_free.
8338 (value_free_to_mark, free_all_values, free_value_chain): Update.
8339 (release_value): Return value_ref_ptr.
8340 (release_value_or_incref): Remove.
8341 (record_latest_value, set_internalvar, clear_internalvar):
8342 Update.
8343 * stack.c (info_frame_command): Don't call value_free.
8344 * python/py-value.c (valpy_dealloc, valpy_new)
8345 (value_to_value_object): Update.
8346 * printcmd.c (do_examine): Update.
8347 * opencl-lang.c (lval_func_free_closure): Update.
8348 * mi/mi-main.c (register_changed_p): Don't call value_free.
8349 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8350 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8351 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8352 value_free.
8353 * guile/scm-value.c (vlscm_free_value_smob)
8354 (vlscm_scm_from_value): Update.
8355 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8356 (frame_unwind_register_unsigned, get_frame_register_bytes)
8357 (put_frame_register_bytes): Don't call value_free.
8358 * findvar.c (address_from_register): Don't call value_free.
8359 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8360 * dwarf2loc.c (entry_data_value_free_closure)
8361 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8362 (dwarf2_evaluate_loc_desc_full): Update.
8363 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8364 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8365 (~watchpoint, watch_command_1)
8366 (invalidate_bp_value_on_memory_change): Update.
8367 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8368
7f8a5d38
SM
83692018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8370
8371 PR gdb/23022
8372 * warning.m4: Add -Wno-error=deprecated-register.
8373 * configure: Re-generate.
8374
8a76bd3b
TT
83752018-04-05 Tom Tromey <tom@tromey.com>
8376
8377 * linespec.h: Remove include of "vec.h".
8378
8e8d776e
TT
83792018-04-05 Tom Tromey <tom@tromey.com>
8380
8381 * linespec.c (typep): Remove typedef.
8382 (find_methods, find_superclass_methods): Take a std::vector.
8383 (find_method): Use std::vector.
8384
9b2f8581
TT
83852018-04-05 Tom Tromey <tom@tromey.com>
8386
8387 * utils.c (compare_strings): Remove.
8388 * utils.h (compare_strings): Remove.
8389 * objc-lang.h (find_imps): Update.
8390 * objc-lang.c (find_methods): Take a std::vector.
8391 (uniquify_strings, find_imps): Likewise.
8392 * linespec.c (find_methods): Take a std::vector.
8393 (decode_objc): Use std::vector.
8394 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8395 a std::vector.
8396 (find_method, find_function_symbols): Use std::vector.
8397
459a2e4c
TT
83982018-04-05 Tom Tromey <tom@tromey.com>
8399
8400 * completer.c (completion_tracker::completion_tracker): Remove
8401 cast.
8402 (completion_tracker::discard_completions): Likewise.
8403 * breakpoint.c (ambiguous_names_p): Remove cast.
8404 * ada-lang.c (_initialize_ada_language): Remove cast.
8405 * utils.h (streq): Update.
8406 (streq_hash): Add new declaration.
8407 * utils.c (streq): Return bool.
8408 (streq_hash): New function.
8409
9be2c17a
TT
84102018-04-05 Tom Tromey <tom@tromey.com>
8411
8412 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8413 Remove a string copy.
8414
f73c6ece
TT
84152018-04-05 Tom Tromey <tom@tromey.com>
8416
8417 * linespec.c (filter_results): Use std::vector.
8418 (decode_line_2, decode_line_full): Update.
8419
53a0f8a2
TT
84202018-04-05 Tom Tromey <tom@tromey.com>
8421
8422 * linespec.c (canonical_to_fullform): Return std::string.
8423 (filter_results): Update.
8424 (struct decode_line_2_item): Add constructor.
8425 <fullform, displayform>: Now std::string.
8426 (decode_line_2_compare_items): Now a std::sort comparator.
8427 (decode_line_2): Update.
8428
a5b5adf5
TT
84292018-04-05 Tom Tromey <tom@tromey.com>
8430
8431 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8432 (unexpected_linespec_error): Update.
8433 (linespec_parse_basic, parse_linespec): Update.
8434
6a307fc5
TT
84352018-04-05 Tom Tromey <tom@tromey.com>
8436
8437 * linespec.c (linespec_parse_basic): Reindent.
8438
41c1efc6
TT
84392018-04-05 Tom Tromey <tom@tromey.com>
8440
8441 * minsyms.h (iterate_over_minimal_symbols): Update.
8442 * minsyms.c (iterate_over_minimal_symbols): Take a
8443 gdb::function_view.
8444 * linespec.c (struct collect_minsyms): Remove.
8445 (compare_msyms): Now a std::sort comparator.
8446 (add_minsym): Add parameters.
8447 (search_minsyms_for_name): Update. Use std::vector.
8448
c5edbf3d
TT
84492018-04-03 Tom Tromey <tom@tromey.com>
8450
8451 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8452 gdb::byte_vector.
8453
b39efc48
WP
84542018-04-02 Weimin Pan <weimin.pan@oracle.com>
8455
8456 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8457
121ad66c 84582018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
8459
8460 PR gdb/16959
8461 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8462 printing static type.
8463
09473be8
TT
84642018-04-01 Tom Tromey <tom@tromey.com>
8465
8466 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8467 (rs6000_xfer_shared_libraries): Update.
8468
ec1f2d91
SM
84692018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8470
8471 * common/gdb_vecs.h (char_ptr): Remove.
8472 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8473
d8611974
SM
84742018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8475
8476 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8477 with std::vector.
8478 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8479
a18ba4e4
SM
84802018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8481
8482 * tracepoint.h (struct uploaded_tp): Initialize fields.
8483 <actions, step_actions, cmd_strings>: Change type to
8484 std::vector<char *>.
8485 * tracepoint.c (get_uploaded_tp): Allocate with new.
8486 (free_uploaded_tps): Free with delete.
8487 (parse_tracepoint_definition): Adjust to std::vector change.
8488 * breakpoint.c (read_uploaded_action): Likewise.
8489 (create_tracepoint_from_upload): Likewise.
8490 * ctf.c (ctf_write_uploaded_tp): Likewise.
8491 (SET_ARRAY_FIELD): Likewise.
8492 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8493
a7961323
TT
84942018-03-30 Tom Tromey <tom@tromey.com>
8495
8496 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8497 std::unique_ptr.
8498 (svr4_keep_data_in_core): Update.
8499 (svr4_read_so_list): Update.
8500
e83e4e24
TT
85012018-03-30 Tom Tromey <tom@tromey.com>
8502
8503 * windows-nat.c (handle_output_debug_string, handle_exception):
8504 Update.
8505 * target.h (target_read_string): Update.
8506 * target.c (target_read_string): Change "string" to
8507 unique_xmalloc_ptr.
8508 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8509 Update.
8510 * solib-frv.c (frv_current_sos): Update.
8511 * solib-dsbt.c (dsbt_current_sos): Update.
8512 * solib-darwin.c (darwin_current_sos): Update.
8513 * linux-thread-db.c (inferior_has_bug): Update.
8514 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8515 Update. Remove alloca.
8516 * ada-lang.c (ada_main_name): Update.
8517
263db9a1
TT
85182018-03-30 Tom Tromey <tom@tromey.com>
8519
8520 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8521 (struct dwo_file_deleter): New.
8522 (dwo_file_up): New typedef.
8523 (open_and_init_dwo_file): Use dwo_file_up.
8524 (free_dwo_file_cleanup): Remove.
8525
5dafb3d1
TT
85262018-03-30 Tom Tromey <tom@tromey.com>
8527
8528 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8529 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8530
11ed8cad
TT
85312018-03-30 Tom Tromey <tom@tromey.com>
8532
8533 * dwarf2read.c (class free_cached_comp_units): New class.
8534 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8535 (free_cached_comp_units): Remove function.
8536
9ae79dac
TT
85372018-03-30 Tom Tromey <tom@tromey.com>
8538
8539 * utils.h (make_cleanup_unpush_target): Remove.
8540 * inf-ptrace.c (struct target_unpusher): New.
8541 (target_unpush_up) New typedef.
8542 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8543 target_unpush_up.
8544 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8545
5aa89276
TT
85462018-03-27 Tom Tromey <tom@tromey.com>
8547
8548 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8549
1dbeed45
TT
85502018-03-27 Pedro Alves <palves@redhat.com>
8551 Tom Tromey <tom@tromey.com>
8552
8553 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8554 destructor. Now a class.
8555 (gdb_readline_wrapper_cleanup): Remove function.
8556 (gdb_readline_wrapper): Remove cleanups.
8557
c819b2c0
TT
85582018-03-27 Tom Tromey <tom@tromey.com>
8559
8560 * typeprint.h (struct type_print_options) <local_typedefs,
8561 global_typedefs>: Remove "struct" keyword.
8562 (class typedef_hash_table): New class.
8563 (recursively_update_typedef_hash, add_template_parameters)
8564 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8565 (find_typedef_in_hash): Don't declare.
8566 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8567 (typedef_hash_table::recursively_update): Rename from
8568 recursively_update_typedef_hash. Now a member.
8569 (typedef_hash_table::add_template_parameters): Rename from
8570 add_template_parameters. Now a member.
8571 (typedef_hash_table::typedef_hash_table): Now a constructor;
8572 rename from create_typedef_hash.
8573 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8574 rename from free_typedef_hash.
8575 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8576 (do_free_global_table): Remove.
8577 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8578 from copy_type_recursive.
8579 (create_global_typedef_table): Remove.
8580 (typedef_hash_table::find_global_typedef): Now a member of
8581 typedef_hash_table.
8582 (typedef_hash_table::find_typedef): Rename from
8583 find_typedef_in_hash; now a member.
8584 (whatis_exp): Update.
8585 * extension.h (struct ext_lang_type_printers): Add constructor and
8586 destructor.
8587 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8588 declare.
8589 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8590 Now a constructor; rename from start_ext_lang_type_printers.
8591 (ext_lang_type_printers): Now a destructor; rename from
8592 free_ext_lang_type_printers.
8593 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8594 Update.
8595 (c_type_print_base_struct_union): Update. Remove cleanups.
8596
608219fb
TT
85972018-03-27 Tom Tromey <tom@tromey.com>
8598
8599 * dwarf-index-write.c: Include <cmath>.
8600
3fcded8f
JB
86012018-03-27 Joel Brobecker <brobecker@adacore.com>
8602
8603 * NEWS: Add entry describing new "set|show varsize-limit" command.
8604 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8605 command.
8606 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8607 "set variable".
8608
cd4fb1b2
SM
86092018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8610
8611 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8612 dwarf-index-write.c
8613 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8614 * dwarf-index-common.c: New file.
8615 * dwarf-index-common.h: New file.
8616 * dwarf-index-write.c: New file.
8617 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8618 (struct dwarf2_section_info): Move from here.
8619 (dwarf2_section_info_def): Likewise.
8620 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8621 (offset_type): Likewise.
8622 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8623 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8624 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8625 (byte_swap): Likewise.
8626 (MAYBE_SWAP): Likewise.
8627 (dwarf2_per_cu_ptr): Likewise.
8628 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8629 (struct tu_stats): Likewise.
8630 (struct dwarf2_per_objfile): Likewise.
8631 (struct dwarf2_per_cu_data): Likewise.
8632 (struct signatured_type): Likewise.
8633 (sig_type_ptr): Likewise.
8634 (DEF_VEC_P (sig_type_ptr)): Likewise.
8635 (INDEX4_SUFFIX): Likewise.
8636 (INDEX5_SUFFIX): Likewise.
8637 (DEBUG_STR_SUFFIX): Likewise.
8638 (dwarf2_read_section): Make non-static.
8639 (mapped_index_string_hash): Move from here.
8640 (dwarf5_djb_hash): Likewise.
8641 (file_write): Likewise.
8642 (class data_buf): Likewise.
8643 (struct symtab_index_entry): Likewise.
8644 (struct mapped_symtab): Likewise.
8645 (find_slot): Likewise.
8646 (hash_expand): Likewise.
8647 (add_index_entry): Likewise.
8648 (uniquify_cu_indices): Likewise.
8649 (class c_str_view): Likewise.
8650 (class c_str_view_hasher): Likewise.
8651 (class vector_hasher): Likewise.
8652 (write_hash_table): Likewise.
8653 (psym_index_map): Likewise.
8654 (struct addrmap_index_data): Likewise.
8655 (add_address_entry): Likewise.
8656 (add_address_entry_worker): Likewise.
8657 (write_address_map): Likewise.
8658 (symbol_kind): Likewise.
8659 (write_psymbols): Likewise.
8660 (struct signatured_type_index_data): Likewise.
8661 (write_one_signatured_type): Likewise.
8662 (recursively_count_psymbols): Likewise.
8663 (recursively_write_psymbols): Likewise.
8664 (class debug_names): Likewise.
8665 (check_dwarf64_offsets): Likewise.
8666 (psyms_seen_size): Likewise.
8667 (write_gdbindex): Likewise.
8668 (write_debug_names): Likewise.
8669 (assert_file_size): Likewise.
8670 (write_psymtabs_to_index): Likewise.
8671 (save_gdb_index_command): Likewise.
8672 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8673 command.
8674 * dwarf2read.h: New file.
8675
59cc4834
JB
86762018-03-27 Joel Brobecker <brobecker@adacore.com>
8677
8678 PR gdb/22670
8679 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8680 symbol name if the CU's language stores symbol names in linkage
8681 format.
8682 * language.h (struct language_defn)
8683 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8684 all instances of this struct.
8685
67501539
TT
86862018-03-26 Tom Tromey <tom@tromey.com>
8687
8688 * stack.c (backtrace_command_1): Remove verbose code.
8689
76c939ac
TT
86902018-03-26 Tom Tromey <tom@tromey.com>
8691
8692 * python/py-framefilter.c (py_print_type): Don't catch
8693 exceptions. Return void.
8694 (py_print_value): Likewise.
8695 (py_print_single_arg): Likewise.
8696 (enumerate_args): Don't catch exceptions.
8697 (py_print_args): Likewise.
8698 (py_print_frame): Likewise.
8699 (gdbpy_apply_frame_filter): Catch exceptions here.
8700
9507b29c
TT
87012018-03-26 Tom Tromey <tom@tromey.com>
8702
8703 * stack.c (_initialize_stack): Remove trailing newlines from help
8704 text. Add "Usage" line to "backtrace" help.
8705
eb68e487
TT
87062018-03-26 Tom Tromey <tom@tromey.com>
8707
8708 PR python/16486:
8709 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8710
1f111921
TT
87112018-03-26 Tom Tromey <tom@tromey.com>
8712
8713 * python/py-framefilter.c (py_print_single_arg): Return
8714 EXT_LANG_BT_ERROR from catch.
8715
fb7eb8b5
TT
87162018-03-26 Tom Tromey <tom@tromey.com>
8717
8718 PR backtrace/15584:
8719 * stack.c (backtrace_command_1): Move some code into no-filters
8720 "if".
8721
4ca59a9f
TT
87222018-03-26 Tom Tromey <tom@tromey.com>
8723
8724 * python/py-framefilter.c (throw_quit_or_print_exception): New
8725 function.
8726 (gdbpy_apply_frame_filter): Use it.
8727
92256134
TT
87282018-03-26 Tom Tromey <tom@tromey.com>
8729
8730 PR cli/17716:
8731 * python/py-framefilter.c (py_print_type, py_print_value)
8732 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8733 RETURN_MASK_ERROR.
8734
7a630bc2
TT
87352018-03-26 Tom Tromey <tom@tromey.com>
8736
8737 * python/py-framefilter.c (enumerate_args): Use
8738 gdb::unique_xmalloc_ptr.
8739
63283d4a
TT
87402018-03-26 Tom Tromey <tom@tromey.com>
8741
8742 * python/py-framefilter.c (py_print_frame): Return
8743 EXT_LANG_BT_OK.
8744 (gdbpy_apply_frame_filter): Update comment.
8745 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8746 Remove.
8747 <EXT_LANG_BT_NO_FILTERS>: Change value.
8748
978d6c75
TT
87492018-03-26 Tom Tromey <tom@tromey.com>
8750
8751 PR backtrace/15582:
8752 * stack.c (backtrace_command): Parse "hide" argument.
8753 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8754 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8755 constant.
8756
1cf7e640
TT
87572018-03-26 Tom Tromey <tom@tromey.com>
8758
8759 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8760 add "flags".
8761 (backtrace_command): Remove "fulltrace", add "flags".
8762
ea3b0687
TT
87632018-03-26 Tom Tromey <tom@tromey.com>
8764
8765 * stack.c (backtrace_command): Rewrite command line parsing.
8766
9f034d75
SM
87672018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8768
8769 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8770
ce1459e5
SM
87712018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8772
8773 * filename-seen-cache.h: Add include guard.
8774
4f7ae6f5
KS
87752018-03-26 Keith Seitz <keiths@redhat.com>
8776
8777 * symfile.c (place_section): Remove "struct" from section_addr_info
8778 in comment.
8779 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8780 "struct" keyword from section_addr_info.
8781
5cd3e386
AH
87822018-03-26 Alan Hayward <alan.hayward@arm.com>
8783
8784 * regformats/regdef.h (reg): Add constructors.
8785
3e5ef9a4
PA
87862018-03-25 Pedro Alves <palves@redhat.com>
8787
8788 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8789 if then/else bodies in var_func_name extraction.
8790
c88d2fcc 87912018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
8792
8793 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8794 lookup_minimal_symbol() to find symbol entry.
8795 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8796
b7fee5a3
KS
87972018-03-23 Keith Seitz <keiths@redhat.com>
8798
8799 PR c++/22968
8800 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8801 nested type definitions for C++, too.
8802
2cc9b304
TT
88032018-03-23 Tom Tromey <tom@tromey.com>
8804
8805 * machoread.c (struct oso_el): Add a constructor. Don't define as
8806 a typedef.
8807 (macho_register_oso): Remove.
8808 (macho_symtab_read): Take a std::vector.
8809 (oso_el_compare_name): Now a std::sort comparator.
8810 (macho_symfile_read_all_oso): Take a std::vector.
8811 (macho_symfile_read): Use std::vector. Remove cleanups.
8812
a2b2bc12
TT
88132018-03-22 Tom Tromey <tom@tromey.com>
8814
8815 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8816 (record_full_goto_bookmark): Use std::string.
8817
7a8f494c
PFC
88182018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8819
8820 PR tdep/18295
8821 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8822 a single mask.
8823
dd6d677f
PFC
88242018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8825
8826 * rs6000-tdep.c (store_insn_p): New function.
8827 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8828 and cr_reg to their unshifted values. Use store_insn_p to
8829 match LR saves using either R1 or fdata->alloca_reg. Use
8830 store_insn_p to match CR saves. Set alloca_reg_offset
8831 when alloca_reg and framep are set. Remove lr_reg shift
8832 when assigning to fdata->lr_register.
8833
26d6cec4
AA
88342018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8835
8836 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8837 command line args instead of emitting a warning.
8838
5d9310c4
SM
88392018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8840
8841 * tracepoint.h (struct static_tracepoint_marker): Initialize
8842 fields, define default constructor, move constructor and move
8843 assignment, disable the rest.
8844 <str_id, extra>: Make std::string.
8845 (release_static_tracepoint_marker): Remove.
8846 (free_current_marker): Remove.
8847 * tracepoint.c (free_current_marker): Remove.
8848 (parse_static_tracepoint_marker_definition): Adjust to
8849 std::string, use new hex2str overload.
8850 (release_static_tracepoint_marker): Remove.
8851 (print_one_static_tracepoint_marker): Get marker by reference
8852 and adjust to std::string.
8853 (info_static_tracepoint_markers_command): Adjust to std::vector
8854 changes
8855 * target.h (static_tracepoint_marker_p): Remove typedef.
8856 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8857 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8858 bool.
8859 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8860 * target-debug.h
8861 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8862 (target_debug_print_std_vector_static_tracepoint_marker): New.
8863 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8864 to...
8865 (target_debug_print_static_tracepoint_marker_p): ... this.
8866 * target-delegates.c: Re-generate.
8867 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8868 Make std::string.
8869 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8870 (decode_static_tracepoint_spec): Adjust to std::vector.
8871 (tracepoint_print_one_detail): Adjust to std::string.
8872 (strace_marker_decode_location): Adjust to std::string.
8873 (update_static_tracepoint): Adjust to std::string, remove call
8874 to release_static_tracepoint_marker.
8875 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8876 Adjust to std::vector.
8877 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8878 (remote_static_tracepoint_markers_by_strid): Adjust to
8879 std::vector.
8880 * common/rsp-low.h (hex2str): New overload with explicit count
8881 of bytes.
8882 * common/rsp-low.c (hex2str): New overload with explicit count
8883 of bytes.
8884 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8885 (_initialize_rsp_low_selftests): Add test_hex2str test.
8886 * unittests/tracepoint-selftests.c
8887 (test_parse_static_tracepoint_marker_definition): Adjust to
8888 std::string.
8889
62c222b6
SM
88902018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8891
8892 * tracepoint.c (parse_static_tracepoint_marker_definition):
8893 Consider case where the definition is followed by more
8894 definitions.
8895 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8896 tracepoint-selftests.c.
8897 * unittests/tracepoint-selftests.c: New.
8898
7eb2418f
PFC
88992018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8900
8901 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8902 Carvalho.
8903
7cbe16e9
SR
89042018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8905
3d6b3b82 8906 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 8907
4ee89e90
SR
89082018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8909
3d6b3b82 8910 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 8911
92630041
TT
89122018-03-19 Tom Tromey <tom@tromey.com>
8913
8914 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8915 "IDENT" production.
8916
76727919
TT
89172018-03-19 Pedro Alves <palves@redhat.com>
8918 Tom Tromey <tom@tromey.com>
8919
8920 * unittests/observable-selftests.c: New file.
8921 * common/observable.h: New file.
8922 * observable.h: New file.
8923 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8924 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8925 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8926 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8927 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8928 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8929 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8930 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8931 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8932 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8933 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8934 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8935 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8936 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8937 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8938 tui/tui-interp.c, valops.c: Update all users.
8939 * tui/tui-hooks.c (tui_bp_created_observer)
8940 (tui_bp_deleted_observer, tui_bp_modified_observer)
8941 (tui_inferior_exit_observer, tui_before_prompt_observer)
8942 (tui_normal_stop_observer, tui_register_changed_observer):
8943 Remove.
8944 (tui_observers_token): New global.
8945 (attach_or_detach, tui_attach_detach_observers): New functions.
8946 (tui_install_hooks, tui_remove_hooks): Use
8947 tui_attach_detach_observers.
8948 * record-btrace.c (record_btrace_thread_observer): Remove.
8949 (record_btrace_thread_observer_token): New global.
8950 * observer.sh: Remove.
8951 * observer.c: Rename to observable.c.
8952 * observable.c (namespace gdb_observers): Define new objects.
8953 (observer_debug): Move into gdb_observers namespace.
8954 (struct observer, struct observer_list, xalloc_observer_list_node)
8955 (xfree_observer_list_node, generic_observer_attach)
8956 (generic_observer_detach, generic_observer_notify): Remove.
8957 (_initialize_observer): Update.
8958 Don't include observer.inc.
8959 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8960 (clean mostlyclean): Likewise.
8961 (observer.h, observer.inc): Remove targets.
8962 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8963 (COMMON_SFILES): Use observable.c, not observer.c.
8964 * .gitignore: Remove observer.h.
8965
1cb1f3da
TT
89662018-03-18 Tom Tromey <tom@tromey.com>
8967
8968 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8969 gdb::def_vector.
8970 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8971
a06ab151
TT
89722018-03-17 Tom Tromey <tom@tromey.com>
8973
8974 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8975
770623f7
TT
89762018-03-17 Tom Tromey <tom@tromey.com>
8977
8978 * target.c (class scoped_target_fd): New.
8979 (target_fileio_close_cleanup): Remove.
8980 (target_fileio_read_alloc_1): Use scoped_target_fd.
8981
39be3c7e
SM
89822018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8983
8984 * silent-rules.mk: New.
8985 * Makefile.in: Include silent-rules.mk
8986 (srcdir, VPATH, top_srcdir): Move up.
8987 (COMPILE): Add ECHO_CXX.
8988 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8989 (init.c): Add ECHO_INIT_C.
8990 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8991 (version.c): Add ECHO_GEN.
8992 (printcmd.o): Add ECHO_CXX.
8993 (target-float.o): Add ECHO_CXX.
8994 (ada-exp.o): Add ECHO_CXX.
8995 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8996 (insight$(EXEEXT)): Add ECHO_CXXLD.
8997 * gnulib/configure.ac: Add AM_SILENT_RULES.
8998 * gnulib/aclocal.m4: Re-generate.
8999 * gnulib/configure: Re-generate.
9000 * gnulib/import/Makefile.in: Re-generate.
9001
37e136b1
TT
90022018-03-16 Tom Tromey <tom@tromey.com>
9003
9004 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9005 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9006 * utils.c (do_free_section_addr_info)
9007 (make_cleanup_free_section_addr_info): Remove.
9008 * symfile.h (struct other_sections): Add constructor.
9009 (struct section_addr_info): Remove.
9010 (section_addr_info): New typedef.
9011 (struct sym_fns) <sym_offsets>: Change type of parameter.
9012 (build_section_addr_info_from_objfile)
9013 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9014 (default_symfile_offsets, symbol_file_add)
9015 (symbol_file_add_from_bfd)
9016 (build_section_addr_info_from_section_table): Update.
9017 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9018 * symfile.c (alloc_section_addr_info): Remove.
9019 (build_section_addr_info_from_section_table): Change return type.
9020 Update.
9021 (build_section_addr_info_from_bfd)
9022 (build_section_addr_info_from_objfile): Likewise.
9023 (free_section_addr_info): Remove.
9024 (relative_addr_info_to_section_offsets): Change type of "addrs".
9025 (addrs_section_compar): Now a std::sort comparator.
9026 (addrs_section_sort): Change return type.
9027 (addr_info_make_relative): Change type of "addrs". Update.
9028 (default_symfile_offsets, syms_from_objfile_1)
9029 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9030 (symbol_file_add_separate): Update.
9031 (symbol_file_add): Change type of "addrs". Update.
9032 (add_symbol_file_command): Update. Remove cleanups.
9033 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9034 cleanups.
9035 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9036 * solib.c (solib_read_symbols): Update.
9037 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9038 * machoread.c (macho_symfile_offsets): Update.
9039 * jit.c (jit_bfd_try_read_symtab): Update.
9040
03afa6ef
SM
90412018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9042
9043 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9044 unittests/utils-selftests.c.
9045 * unittests/utils-selftests.c: New file.
9046
3ae9ce5d
TT
90472018-03-14 Tom Tromey <tom@tromey.com>
9048
9049 PR cli/14977:
9050 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9051 for NULL.
9052
b8c2339b
TT
90532018-03-14 Tom Tromey <tom@tromey.com>
9054
9055 PR cli/19918:
9056 * printcmd.c (printf_pointer): Allow "-" in format.
9057
80ae639d
TT
90582018-03-14 Tom Tromey <tom@tromey.com>
9059
9060 * printcmd.c (_initialize_printcmd): Add usage to printf.
9061
0d671d99
YQ
90622018-03-14 Yao Qi <qiyao@sourceware.org>
9063
9064 * MAINTAINERS: Update my email address.
9065
b577b6af
TT
90662018-03-13 Tom Tromey <tom@tromey.com>
9067
9068 * machoread.c (macho_check_dsym): Change filenamep to a
9069 std::string*.
9070 (macho_symfile_read): Update.
9071 * symfile.c (load_command): Use std::string.
9072
89a3b63e
AB
90732018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9074
9075 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9076 to error message string.
9077 (riscv_register_name): Use xsnprintf instead of sprintf.
9078 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9079 internal_error.
9080 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9081 error.
9082 (riscv_push_dummy_call): Likewise.
9083
984c7238
TT
90842018-03-12 Tom Tromey <tom@tromey.com>
9085
9086 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9087 Use gdb::byte_vector.
9088 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9089
933522d1
YQ
90902018-03-12 Yao Qi <yao.qi@linaro.org>
9091
9092 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9093 parameter type to readable_regcache.
9094 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9095 the declaration.
9096
be2daae6
TT
90972018-03-11 Tom Tromey <tom@tromey.com>
9098
9099 * dwarf2read.c (struct nextfield): Add initializers.
9100 (struct nextfnfield): Remove.
9101 (struct fnfieldlist): Add initializers. Remove "length" and
9102 "head", use std::vector.
9103 (struct decl_field_list): Remove.
9104 (struct field_info): Add initializers.
9105 <fields, baseclasses>: Now std::vector.
9106 <nbaseclasses, nfnfields, typedef_field_list_count,
9107 nested_types_list_count>: Remove.
9108 (dwarf2_add_field, dwarf2_add_type_defn)
9109 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9110 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9111 (process_structure_scope): Update.
9112
484cf504
TT
91132018-03-11 Tom Tromey <tom@tromey.com>
9114
9115 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9116 for use by std::sort.
9117 (build_type_psymtabs_1): Use std::vector.
9118
9bd8e0b0
EZ
91192018-03-09 Eli Zaretskii <eliz@gnu.org>
9120
9121 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9122 and LIBMPFR in the printed configuration.
9123
5dc1a704
TT
91242018-03-08 Tom Tromey <tom@tromey.com>
9125
9126 * source.c (get_filename_and_charpos): Use scoped_fd.
9127 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9128 (procfs_pidlist): Likewise.
9129 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9130 (iterate_over_mappings): Likewise.
9131
fdf07f3a
TT
91322018-03-08 Tom Tromey <tom@tromey.com>
9133
9134 * infcall.c (struct call_return_meta_info)
9135 <stack_temporaries_enabled>: Remove.
9136 (get_call_return_value, call_function_by_hand_dummy): Update.
9137 * thread.c (disable_thread_stack_temporaries): Remove.
9138 (enable_thread_stack_temporaries): Remove.
9139 (thread_stack_temporaries_enabled_p): Return bool.
9140 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9141 (get_last_thread_stack_temporary): Update.
9142 * eval.c (evaluate_subexp): Update.
9143 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9144 class, not a function.
9145 (value_ptr, value_vec): Remove typedefs.
9146 (class thread_info) <stack_temporaries_enabled>: Now bool.
9147 <stack_temporaries>: Now a std::vector.
9148 (thread_stack_temporaries_enabled_p)
9149 (value_in_thread_stack_temporaries): Return bool.
9150
567a3e54
SM
91512018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9152
9153 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9154 (getpkt_or_notif_sane_1): Likewise.
9155
00b40057
SM
91562018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9157
9158 * build-id.c (build_id_to_debug_bfd): Use std::string.
9159
a8dbfd58
SM
91602018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9161
9162 * build-id.c (find_separate_debug_file_by_buildid): Return
9163 std::string.
9164 * build-id.h (find_separate_debug_file_by_buildid): Return
9165 std::string.
9166 * coffread.c (coff_symfile_read): Adjust to std::string.
9167 * elfread.c (elf_symfile_read): Adjust to std::string.
9168 * symfile.c (separate_debug_file_exists): Change parameter to
9169 std::string.
9170 (find_separate_debug_file): Return std::string.
9171 (find_separate_debug_file_by_debuglink): Return std::string.
9172 * symfile.h (find_separate_debug_file_by_debuglink): Return
9173 std::string.
9174
e6a58aa8
SM
91752018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9176
9177 * common/xml-utils.c (xml_escape_text): Move code to...
9178 (xml_escape_text_append): ... this new function.
9179 * common/xml-utils.h (xml_escape_text_append): New declaration.
9180 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9181 New function.
9182 (_initialize_xml_utils): register test_xml_escape_text_append as
9183 a selftest.
9184
4ef0bef6
AH
91852018-03-07 Alan Hayward <alan.hayward@arm.com>
9186
9187 * defs.h: Remove MAX_REGISTER_SIZE.
9188 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9189 asserts.
9190 * python/py-unwind.c (pyuw_sniffer): Likewise.
9191
e0d3522b
TT
91922018-03-07 Tom Tromey <tom@tromey.com>
9193
9194 * linux-tdep.c (linux_info_proc): Update.
9195 * target.h (struct target_ops) <to_fileio_readlink>: Return
9196 optional<string>.
9197 (target_fileio_readlink): Return optional<string>.
9198 * remote.c (remote_hostio_readlink): Return optional<string>.
9199 * inf-child.c (inf_child_fileio_readlink): Return
9200 optional<string>.
9201 * target.c (target_fileio_readlink): Return optional<string>.
9202
ea005f31
AB
92032018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9204
9205 * regcache.c (cooked_read_test): Add riscv to the list of
9206 architectures that have a save_reggroup.
9207
e95a97d4
AA
92082018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9209
9210 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9211 value is not a dynamic class object.
9212
d8344f3d
TT
92132018-03-06 Tom Tromey <tom@tromey.com>
9214
9215 * rust-exp.y: Formatting fixes.
9216
9add17f2
AB
92172018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9218
9219 * riscv-tdep.c (riscv_register_name): Remove target description
9220 support.
9221 (riscv_gdbarch_init): Remove target description check.
9222
c9486dfe
AB
92232018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9224
9225 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9226 comment.
9227 * riscv-tdep.h: Likewise.
9228
d74aff3d
AB
92292018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9230
9231 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9232 (riscv_pseudo_register_write): Delete.
9233 (riscv_gdbarch_init): Remove all use of pseudo registers.
9234
7ea78b59
SM
92352018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9236
9237 * record-btrace.c (btrace_print_lines): Replace cleanup
9238 parameter with RAII equivalents.
9239 (btrace_insn_history): Replace cleanup with RAII equivalents.
9240 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9241 make_cleanup_ui_out_tuple_begin_end): Remove.
9242 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9243 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9244 make_cleanup_ui_out_list_begin_end): Remove.
9245
53127008
SM
92462018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9247
9248 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9249 parameter types to std::vector. Use bool.
9250 (record_btrace_wait): Replace VEC(tp_t) with
9251 std::vector<thread_info *>.
9252 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9253
228f1508
SM
92542018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9255
9256 * record-btrace.c (record_btrace_disable_callback): Remove.
9257 (struct scoped_btrace_disable): New.
9258 (record_btrace_open): Use scoped_btrace_disable.
9259
b2970c23
AB
92602018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9261
9262 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9263 reading values from registers.
9264
fb294655
AB
92652018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9266
9267 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9268 where appropriate.
9269
cab5bb9d
AB
92702018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9271
9272 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9273 change parameter type. Use GDB's print functions, and use
9274 core_addr_to_string where appropriate.
9275 (riscv_push_dummy_call): Use core_addr_to_string where
9276 appropriate, update call to riscv_print_arg_location, and reindent
9277 a few lines.
9278 (riscv_return_value): Update call to riscv_print_arg_location.
9279
dbbb1059
AB
92802018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9281 Tim Newsome <tim@sifive.com>
9282 Albert Ou <a0u@eecs.berkeley.edu>
9283 Darius Rad <darius@bluespec.com>
9284
9285 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9286 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9287 (ALLDEPFILES): Add riscv-tdep.c
9288 * configure.tgt: Add riscv support.
9289 * riscv-tdep.c: New file.
9290 * riscv-tdep.h: New file.
9291 * NEWS: Mention new target.
9292 * MAINTAINERS: Add entry for riscv.
9293
5dc43913
AB
92942018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9295
9296 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9297 fields within aggregates.
9298
3dea1ef7
SM
92992018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9300
9301 * record-btrace.c (btrace_print_lines): Change type of flags to
9302 gdb_disassembly_flags.
9303
7efba073
JB
93042018-03-04 John Baldwin <jhb@FreeBSD.org>
9305
9306 * fbsd-nat.c: Include "inf-ptrace.h".
9307 (USE_SIGTRAP_SIGINFO): Conditionally define.
9308 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9309 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9310 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9311 function.
9312 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9313 Likewise.
9314 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9315 Likewise.
9316 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9317 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9318 "supports_stopped_by_hw_breakpoint" target methods.
9319
386a8676
JB
93202018-03-04 John Baldwin <jhb@FreeBSD.org>
9321
9322 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9323 * fbsd-nat.c (debug_fbsd_nat): New variable.
9324 (show_fbsd_nat_debug): New function.
9325 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9326 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9327
12279366
JB
93282018-03-04 John Baldwin <jhb@FreeBSD.org>
9329
9330 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9331 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9332 prototype.
9333 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9334 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9335 method.
9336
54693cf5
SM
93372018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9338
9339 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9340 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9341
ccb2231c
SM
93422018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9343
9344 * charset.c (struct charset_vector): New.
9345 (charsets): Change type to charset_vector.
9346 (find_charset_names): Adjust.
9347 (add_one): Adjust.
9348 (_initialize_charset): Adjust.
9349
6fb16ce6
SM
93502018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9351
9352 * progspace.h (struct program_space) <deleted_solibs>: Change
9353 type to std::vector<std::string>.
9354 * progspace.c (clear_program_space_solib_cache): Adjust.
9355 * breakpoint.c (print_solib_event): Adjust.
9356 (check_status_catch_solib): Adjust.
9357 * solib.c (update_solib_list): Adjust.
9358 * ui-out.h (class ui_out) <field_string>: New overload.
9359 * ui-out.c (ui_out::field_string): New overload.
9360
564b1e3f
SM
93612018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9362
9363 * progspace.h (struct program_space): Add constructor and
9364 destructor, initialize fields.
9365 (add_program_space): Remove.
9366 * progspace.c (add_program_space): Rename to...
9367 (program_space::program_space): ... this.
9368 (release_program_space): Rename to...
9369 (program_space::~program_space): ... this.
9370 (delete_program_space): Use delete to delete program_space.
9371 (initialize_progspace): Use new to allocate program_space.
9372 * inferior.c (add_inferior_with_spaces): Likewise.
9373 (clone_inferior_command): Likewise.
9374 * infrun.c (follow_fork_inferior): Likewise.
9375 (handle_vfork_child_exec_or_exit): Likewise.
9376
e80aaf61
SM
93772018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9378
9379 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9380 (delim_string_to_char_ptr_vec): Return std::vector of
9381 gdb::unique_xmalloc_ptr.
9382 (dirnames_to_char_ptr_vec_append): Take std::vector of
9383 gdb::unique_xmalloc_ptr.
9384 (dirnames_to_char_ptr_vec): Return std::vector of
9385 gdb::unique_xmalloc_ptr.
9386 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9387 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9388 (delim_string_to_char_ptr_vec): Return an std::vector of
9389 gdb::unique_xmalloc_ptr, adjust the code.
9390 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9391 gdb::unique_xmalloc_ptr, adjust the code.
9392 (dirnames_to_char_ptr_vec): Return an std::vector of
9393 gdb::unique_xmalloc_ptr, adjust the code.
9394 * auto-load.c (auto_load_safe_path_vec): Change type to
9395 std::vector of gdb::unique_xmalloc_ptr.
9396 (auto_load_expand_dir_vars): Return an std::vector of
9397 gdb::unique_xmalloc_ptr, adjust the code.
9398 (auto_load_safe_path_vec_update): Adjust.
9399 (filename_is_in_auto_load_safe_path_vec): Adjust.
9400 (auto_load_objfile_script_1): Adjust.
9401 * build-id.c (build_id_to_debug_bfd): Adjust.
9402 * linux-thread-db.c (thread_db_load_search): Adjust.
9403 * source.c (add_path): Adjust.
9404 (openp): Adjust.
9405 * symfile.c (find_separate_debug_file): Adjust.
9406 * utils.c (do_free_char_ptr_vec): Remove.
9407 (make_cleanup_free_char_ptr_vec): Remove.
9408
ab818ade
SDJ
94092018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9410
9411 PR gdb/22907
9412 * common/pathstuff.c: Conditionally include "<windows.h>".
9413
e1e6f073
GS
94142018-03-01 Georg Sauthoff <mail@georg.so>
9415
9416 PR gdb/22888
9417 * gcore.in: Quote variables and switch interpreter to bash.
9418
c7b15a66
TT
94192018-03-01 Tom Tromey <tom@tromey.com>
9420
9421 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9422 assertion. Add assertion for discriminant_index.
9423 (quirk_rust_enum): Use correct base type name in univariant case.
9424
0cb7c7b0
SM
94252018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9426
9427 * record.c (get_call_history_modifiers): Return a
9428 record_print_flags.
9429 (cmd_record_call_history): Adjust.
9430 * record-btrace.c (record_btrace_call_history): Adjust.
9431 (record_btrace_call_history_range): Adjust.
9432 (record_btrace_call_history_from): Adjust.
9433 * target-debug.h (target_debug_print_record_print_flags): New.
9434 * target-delegates.c: Re-generate.
9435 * target.c (target_call_history): Change flags type.
9436 (target_call_history_from): Likewise.
9437 (target_call_history_range): Likewise.
9438 * target.h (struct target_ops) <target_call_history>: Likewise.
9439 (target_call_history_from): Likewise.
9440 (target_call_history_range): Likewise.
9441
25e3c82c
SDJ
94422018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9443 Simon Marchi <simon.marchi@polymtl.ca>
9444
9445 * common/common-utils.c: Include "sys/stat.h".
9446 (is_regular_file): Move here from "source.c"; change return
9447 type to "bool".
9448 * common/common-utils.h (is_regular_file): New prototype.
9449 * common/pathstuff.c (contains_dir_separator): New function.
9450 * common/pathstuff.h (contains_dir_separator): New prototype.
9451 * source.c: Don't include "sys/stat.h".
9452 (is_regular_file): Move to "common/common-utils.c".
9453
b4987c95
SDJ
94542018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9455
9456 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9457 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9458 * auto-load.c: Include "common/pathstuff.h".
9459 * common/common-def.h (current_directory): Move here.
9460 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9461 function.
9462 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9463 prototype.
9464 * common/pathstuff.c: New file.
9465 * common/pathstuff.h: New file.
9466 * compile/compile.c: Include "common/pathstuff.h".
9467 * defs.h (current_directory): Move to "common/common-defs.h".
9468 * dwarf2read.c: Include "common/pathstuff.h".
9469 * exec.c: Likewise.
9470 * guile/scm-safe-call.c: Likewise.
9471 * linux-thread-db.c: Likewise.
9472 * main.c: Likewise.
9473 * nto-tdep.c: Likewise.
9474 * objfiles.c: Likewise.
9475 * source.c: Likewise.
9476 * symtab.c: Likewise.
9477 * utils.c: Include "common/pathstuff.h".
9478 (gdb_realpath): Move to "common/pathstuff.c".
9479 (gdb_realpath_keepfile): Likewise.
9480 (gdb_abspath): Likewise.
9481 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9482 (gdb_realpath_keepfile): Likewise.
9483 (gdb_abspath): Likewise.
9484
f169cfdc
JB
94852018-02-28 John Baldwin <jhb@FreeBSD.org>
9486
9487 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9488 wildcard process pid for super_resume for kernels with a
9489 specific bug.
9490
e05cac70
PM
94912018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9492
9493 * compile/compile.c (get_args): Add additional comments
9494 explaining function.
9495
55089490
TT
94962018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9497 Tom Tromey <tom@tromey.com>
9498
9499 * target.h (memory_write_request_s): Remove typedef. Don't define
9500 VEC.
9501 (target_write_memory_blocks): Change argument to std::vector.
9502 (struct memory_write_request): Add constructor.
9503 * target-memory.c (compare_block_starting_address): Return bool.
9504 Change argument types.
9505 (claim_memory): Change arguments to use std::vector.
9506 (split_regular_and_flash_blocks, blocks_to_erase)
9507 (compute_garbled_blocks): Likewise.
9508 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9509 (target_write_memory_blocks): Change argument to std::vector.
9510 * symfile.c (struct load_section_data): Add constructor and
9511 destructor. Use std::vector for "requests".
9512 (struct load_progress_data): Add initializers.
9513 (load_section_callback): Update. Use "new".
9514 (clear_memory_write_data): Remove.
9515 (generic_load): Update.
9516
0c305b61
AH
95172018-02-27 Alan Hayward <alan.hayward@arm.com>
9518
9519 * arch/aarch64.h: Use common/tdesc.h.
9520
c5196c92
MR
95212018-02-26 Maciej W. Rozycki <macro@mips.com>
9522
9523 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9524 architecture with a 64-bit ABI.
9525
37c33887
MR
95262018-02-26 Maciej W. Rozycki <macro@mips.com>
9527
9528 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9529 ahead of target description loading.
9530
d4dd3282
TT
95312018-02-26 Tom Tromey <tom@tromey.com>
9532
9533 * stack.c (backtrace_command_1): Update.
9534 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9535 of "flags".
9536 * python/py-framefilter.c (py_print_frame)
9537 (gdbpy_apply_frame_filter): Change type of "flags".
9538 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9539 of "flags".
9540 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9541 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9542 * extension.h (enum frame_filter_flag): Rename from
9543 frame_filter_flags.
9544 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9545 (apply_ext_lang_frame_filter): Change type of "flags".
9546 * extension.c (apply_ext_lang_frame_filter): Change type of
9547 "flags".
9548 * extension-priv.h (struct extension_language_ops)
9549 <apply_frame_filter>: Change type of "flags".
9550
6893c19a
TT
95512018-02-26 Tom Tromey <tom@tromey.com>
9552
9553 PR python/16497:
9554 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9555 off-by-one in py_end computation.
9556 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9557 PRINT_MORE_FRAMES.
9558 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9559 constant.
9560
2ddeaf8a
TT
95612018-02-26 Tom Tromey <tom@tromey.com>
9562
9563 * dwarf2read.c (struct variant_field): New.
9564 (struct nextfield) <variant>: New field.
9565 (dwarf2_add_field): Handle DW_TAG_variant_part.
9566 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9567 discriminated union.
9568 (read_structure_type): Handle DW_TAG_variant_part.
9569 (handle_struct_member_die): New function, extracted from
9570 process_structure_scope. Handle DW_TAG_variant.
9571 (process_structure_scope): Handle discriminated unions. Call
9572 handle_struct_member_die.
9573
c9317f21
TT
95742018-02-26 Tom Tromey <tom@tromey.com>
9575
9576 * rust-lang.h (rust_last_path_segment): Declare.
9577 * rust-lang.c (rust_last_path_segment): Now public. Change
9578 contract.
9579 (struct disr_info): Remove.
9580 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9581 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9582 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9583 (rust_enum_p, rust_enum_variant): New function.
9584 (rust_underscore_fields): Remove "offset" parameter.
9585 (rust_print_enum): New function.
9586 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9587 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9588 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9589 enums.
9590 (rust_internal_print_type): New function, from rust_print_type.
9591 Remove enum code.
9592 (rust_print_type): Call rust_internal_print_type.
9593 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9594 Update enum handling.
9595 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9596 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9597 (rust_union_quirks): New functions.
9598 (process_full_comp_unit, process_full_type_unit): Call
9599 rust_union_quirks.
9600 (process_structure_scope): Update rust_unions if necessary.
9601
7c22600a
TT
96022018-02-26 Tom Tromey <tom@tromey.com>
9603
9604 * value.h (value_union_variant): Declare.
9605 * valops.c (value_union_variant): New function.
9606 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9607 (struct discriminant_info): New.
9608 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9609 enumerator.
9610 (struct main_type) <flag_discriminated_union>: New field.
9611
15ce8941
TT
96122018-02-26 Tom Tromey <tom@tromey.com>
9613
9614 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9615 unittests/unpack-selftests.c.
9616 * unittests/unpack-selftests.c: New file.
9617 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9618
48fbe735
YQ
96192018-02-26 Yao Qi <yao.qi@linaro.org>
9620
9621 * dwarf2read.c (struct partial_die_info) <read>: New method.
9622 (read_partial_die): Remove the declaration.
9623 (load_partial_dies): Update.
9624 (partial_die_info::partial_die_info):
9625 (read_partial_die): Change it to partial_die_info::read.
9626
52356b79
YQ
96272018-02-26 Yao Qi <yao.qi@linaro.org>
9628
9629 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9630 (fixup_partial_die): Remove declaration.
9631 (scan_partial_symbols): Update.
9632 (partial_die_parent_scope): Likewise.
9633 (partial_die_full_name): Likewise.
9634 (fixup_partial_die): Change it to partial_die_info::fixup.
9635
35cc7ed7
YQ
96362018-02-26 Yao Qi <yao.qi@linaro.org>
9637
9638 * dwarf2read.c (read_partial_die): Update the declaration.
9639 (load_partial_dies): Caller update.
9640 (read_partial_die): Remove one argument abbrev_len.
9641
6f06d47b
YQ
96422018-02-26 Yao Qi <yao.qi@linaro.org>
9643
9644 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9645 assignment operator.
9646 (load_partial_dies): Use ctor and copy ctor.
9647 (read_partial_die): Update.
9648 (dwarf2_cu::find_partial_die): Use ctor.
9649
d590ff25
YQ
96502018-02-26 Yao Qi <yao.qi@linaro.org>
9651
9652 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9653 (find_partial_die_in_comp_unit): Change it to
9654 dwarf2_cu::find_partial_die.
9655 (find_partial_die): Update.
9656
fd0a254f
YQ
96572018-02-26 Yao Qi <yao.qi@linaro.org>
9658
9659 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9660 is NULL.
9661
cd9983dd
YQ
96622018-02-26 Yao Qi <yao.qi@linaro.org>
9663
9664 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9665
f46cd62a
AH
96662018-02-26 Alan Hayward <alan.hayward@arm.com>
9667
9668 * arch/amd64.h: Use common/tdesc.h.
9669 * arch/i386.c: Likewise.
9670 * arch/i386.h: Likewise.
9671 * arch/tic6x.c: Likewise.
9672 * arch/tdesc.h: Move file from here...
9673 * common/tdesc.h: ...to here.
9674 * features/aarch64-core.c: Regenerate.
9675 * features/aarch64-fpu.c: Regenerate.
9676 * features/i386/32bit-avx.c: Regenerate.
9677 * features/i386/32bit-avx512.c: Regenerate.
9678 * features/i386/32bit-core.c: Regenerate.
9679 * features/i386/32bit-linux.c: Regenerate.
9680 * features/i386/32bit-mpx.c: Regenerate.
9681 * features/i386/32bit-pkeys.c: Regenerate.
9682 * features/i386/32bit-sse.c: Regenerate.
9683 * features/i386/64bit-avx.c: Regenerate.
9684 * features/i386/64bit-avx512.c: Regenerate.
9685 * features/i386/64bit-core.c: Regenerate.
9686 * features/i386/64bit-linux.c: Regenerate.
9687 * features/i386/64bit-mpx.c: Regenerate.
9688 * features/i386/64bit-pkeys.c: Regenerate.
9689 * features/i386/64bit-segments.c: Regenerate.
9690 * features/i386/64bit-sse.c: Regenerate.
9691 * features/i386/x32-core.c: Regenerate.
9692 * features/tic6x-c6xp.c: Regenerate.
9693 * features/tic6x-core.c: Regenerate.
9694 * features/tic6x-gp.c: Regenerate.
9695 * target-descriptions.c: Use common/tdesc.h.
9696 * target-descriptions.h: Likewise.
9697
9b292f68
TT
96982018-02-24 Tom Tromey <tom@tromey.com>
9699
9700 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9701 (try_thread_db_load_from_dir, thread_db_load_search): Use
9702 std::string.
9703 (info_auto_load_libthread_db_compare): Return bool. Change
9704 argument types.
9705 (info_auto_load_libthread_db): Use std::vector, std::string.
9706 Remove cleanups.
9707
281d762b
TT
97082018-02-24 Tom Tromey <tom@tromey.com>
9709
9710 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9711 std::string.
9712 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9713 std::string*.
9714 * gdbarch.c: Rebuild.
9715 * gdbarch.h: Rebuild.
9716 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9717 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9718 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9719 std::string*.
9720
9d8780f0
SM
97212018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9722
9723 * gdbtypes.h (sect_offset): Change type to uint64_t.
9724 (sect_offset_str): New function.
9725 * dwarf2read.c (create_addrmap_from_aranges): Use
9726 sect_offset_str.
9727 (error_check_comp_unit_head): Likewise.
9728 (create_debug_type_hash_table): Likewise.
9729 (read_cutu_die_from_dwo): Likewise.
9730 (init_cutu_and_read_dies): Likewise.
9731 (init_cutu_and_read_dies_no_follow): Likewise.
9732 (process_psymtab_comp_unit_reader): Likewise.
9733 (partial_die_parent_scope): Likewise.
9734 (peek_die_abbrev): Likewise.
9735 (process_queue): Likewise.
9736 (dwarf2_physname): Likewise.
9737 (read_namespace_alias): Likewise.
9738 (read_import_statement): Likewise.
9739 (create_dwo_cu_reader): Likewise.
9740 (create_cus_hash_table): Likewise.
9741 (lookup_dwo_cutu): Likewise.
9742 (inherit_abstract_dies): Likewise.
9743 (read_func_scope): Likewise.
9744 (read_call_site_scope): Likewise.
9745 (dwarf2_add_member_fn): Likewise.
9746 (read_common_block): Likewise.
9747 (read_module_type): Likewise.
9748 (read_typedef): Likewise.
9749 (read_subrange_type): Likewise.
9750 (load_partial_dies): Likewise.
9751 (read_partial_die): Likewise.
9752 (find_partial_die): Likewise.
9753 (read_str_index): Likewise.
9754 (dwarf2_string_attr): Likewise.
9755 (build_error_marker_type): Likewise.
9756 (lookup_die_type): Likewise.
9757 (dump_die_shallow): Likewise.
9758 (follow_die_ref): Likewise.
9759 (dwarf2_fetch_die_loc_sect_off): Likewise.
9760 (dwarf2_fetch_constant_bytes): Likewise.
9761 (follow_die_sig): Likewise.
9762 (get_signatured_type): Likewise.
9763 (get_DW_AT_signature_type): Likewise.
9764 (dwarf2_find_containing_comp_unit): Likewise.
9765 (set_die_type): Likewise.
9766
8ec57239
JB
97672018-02-21 John Baldwin <jhb@FreeBSD.org>
9768
9769 * arch/aarch64.c: Include "common-defs.h".
9770 * arch/amd64.c: Likewise.
9771 * arch/i386.c: Likewise.
9772
3eac2b65
TT
97732018-02-21 Tom Tromey <tom@tromey.com>
9774
9775 * value.h: (extract_field_op): Update.
9776 * eval.c (extract_field_op): Return a const char *.
9777 * expression.h (parse_expression_for_completion): Update.
9778 * completer.c (complete_expression): Update.
9779 (add_struct_fields): Make fieldname const.
9780 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9781 (mark_completion_tag, parse_exp_in_context_1): Update.
9782 (parse_expression_for_completion): Change "name" to
9783 unique_xmalloc_ptr*.
9784
6ccb583f
TT
97852018-02-21 Tom Tromey <tom@tromey.com>
9786
9787 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9788
c113ed0c
YQ
97892018-02-21 Yao Qi <yao.qi@linaro.org>
9790
9791 * avr-tdep.c (avr_read_pc): Change parameter type to
9792 readable_regcache.
9793 * gdbarch.sh (read_pc): Likewise.
9794 * gdbarch.c: Re-generated.
9795 * gdbarch.h: Re-generated.
9796 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9797 readable_regcache.
9798 * ia64-tdep.c (ia64_read_pc): Likewise.
9799 * mips-tdep.c (mips_read_pc): Likewise.
9800 * spu-tdep.c (spu_read_pc): Likewise.
9801
4c74fe6b
YQ
98022018-02-21 Yao Qi <yao.qi@linaro.org>
9803
9804 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9805 * regcache-dump.c: New file.
9806 * regcache.c: Move register_dump to regcache-dump.c.
9807 (maintenance_print_registers): Likewise.
9808 (maintenance_print_raw_registers): Likewise.
9809 (maintenance_print_cooked_registers): Likewise.
9810 (maintenance_print_register_groups): Likewise.
9811 (maintenance_print_remote_registers): Likewise.
9812 (_initialize_regcache): Likewise.
9813 * regcache.h (register_dump): Moved from regcache.c.
9814
796bb026
YQ
98152018-02-21 Yao Qi <yao.qi@linaro.org>
9816
9817 * regcache.c (regcache::regcache): Update.
9818 (regcache::invalidate): Move it to detached_regcache::invalidate.
9819 (get_thread_arch_aspace_regcache): Update.
9820 (regcache::raw_update): Update.
9821 (regcache::cooked_read): Remove some code.
9822 (regcache::cooked_read_value): Likewise.
9823 (regcache::raw_write): Remove assert on m_readonly_p.
9824 (regcache::raw_supply_integer): Move it to
9825 detached_regcache::raw_supply_integer.
9826 (regcache::raw_supply_zeroed): Likewise.
9827 * regcache.h (detached_regcache) <raw_supply_integer>: New
9828 declaration.
9829 <raw_supply_zeroed, invalidate>: Likewise.
9830 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9831 <invalidate>: Likewise.
9832 <m_readonly_p>: Removed.
9833
215c69dc
YQ
98342018-02-21 Yao Qi <yao.qi@linaro.org>
9835
9836 * infcmd.c (get_return_value): Let stop_regs point to
9837 get_current_regcache.
9838 * regcache.c (regcache::regcache): Remove.
9839 (register_dump_reg_buffer): New class.
9840 (regcache_print): Adjust.
9841 * regcache.h (regcache): Remove constructors.
9842
f3384e66
YQ
98432018-02-21 Yao Qi <yao.qi@linaro.org>
9844
9845 * regcache.c (class register_dump): New class.
9846 (register_dump_regcache, register_dump_none): New class.
9847 (register_dump_remote, register_dump_groups): New class.
9848 (regcache_print): Update.
9849 * regcache.h (regcache_dump_what): Move it to regcache.c.
9850 (regcache) <dump>: Remove.
9851
c8ec2f33
YQ
98522018-02-21 Yao Qi <yao.qi@linaro.org>
9853
9854 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9855 reg_buffer_rw *.
9856 (jit_unwind_reg_set_impl): Call raw_supply.
9857 (jit_frame_sniffer): Use reg_buffer_rw.
9858 * record-full.c (record_full_core_regbuf): Change its type.
9859 (record_full_core_open_1): Use reg_buffer_rw.
9860 (record_full_close): Likewise.
9861 (record_full_core_fetch_registers): Use regcache->raw_supply.
9862 (record_full_core_store_registers): Likewise.
9863 * regcache.c (regcache::get_register_status): Move it to
9864 reg_buffer.
9865 (regcache_raw_set_cached_value): Remove.
9866 (regcache::raw_set_cached_value): Remove.
9867 (regcache::raw_write): Call raw_supply.
9868 (regcache::raw_supply): Move it to reg_buffer_rw.
9869 * regcache.h (regcache_raw_set_cached_value): Remove.
9870 (reg_buffer_rw): New class.
9871
daf6667d
YQ
98722018-02-21 Yao Qi <yao.qi@linaro.org>
9873
9874 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9875 readonly_detached_regcache.
9876 (dummy_frame_prev_register): Use regcache->cooked_read.
9877 * frame.c (frame_save_as_regcache): Change return type.
9878 (frame_pop): Update.
9879 * frame.h (frame_save_as_regcache): Update declaration.
9880 * inferior.h (get_infcall_suspend_state_regcache): Update
9881 declaration.
9882 * infrun.c (infcall_suspend_state) <registers>: use
9883 readonly_detached_regcache.
9884 (save_infcall_suspend_state): Don't use regcache_dup.
9885 (get_infcall_suspend_state_regcache): Change return type.
9886 * linux-fork.c (struct fork_info) <savedregs>: Change to
9887 readonly_detached_regcache.
9888 <pc>: New field.
9889 (fork_save_infrun_state): Don't use regcache_dup.
9890 (info_checkpoints_command): Adjust.
9891 * mi/mi-main.c (register_changed_p): Update declaration.
9892 (mi_cmd_data_list_changed_registers): Use
9893 readonly_detached_regcache.
9894 (register_changed_p): Change parameter type to
9895 readonly_detached_regcache.
9896 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9897 readonly_detached_regcache.
9898 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9899 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9900 New.
9901 (regcache::save): Move it to reg_buffer.
9902 (regcache::restore): Change parameter type.
9903 (regcache_dup): Remove.
9904 * regcache.h (reg_buffer) <save>: New method.
9905 (readonly_detached_regcache): New class.
9906 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9907 readonly_detached_regcache.
9908 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9909
fc5b8736
YQ
99102018-02-21 Yao Qi <yao.qi@linaro.org>
9911
9912 * frame.c (frame_save_as_regcache): Use regcache method save.
9913 (frame_pop): Use regcache method restore.
9914 * infrun.c (restore_infcall_suspend_state): Likewise.
9915 * linux-fork.c (fork_load_infrun_state): Likewise.
9916 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9917 save.
9918 * regcache.c (regcache_save): Remove.
9919 (regcache::restore): More asserts.
9920 (regcache_cpy): Remove.
9921 * regcache.h (regcache_save): Remove the declaration.
9922 (regcache::restore): Move from private to public.
9923 Remove the friend declaration of regcache_cpy.
9924 (regcache_cpy): Remove declaration.
9925
849d0ba8
YQ
99262018-02-21 Yao Qi <yao.qi@linaro.org>
9927
9928 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9929 parameter type to 'readable_regcache *'.
9930 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9931 * arm-tdep.c (arm_neon_quad_read): Likewise.
9932 (arm_pseudo_read): Likewise.
9933 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9934 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9935 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9936 * gdbarch.c: Re-generated.
9937 * gdbarch.h: Re-generated.
9938 * gdbarch.sh (pseudo_register_read): Change parameter type to
9939 'readable_regcache *'.
9940 (pseudo_register_read_value): Likewise.
9941 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9942 (h8300_pseudo_register_read): Likewise.
9943 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9944 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9945 (i386_pseudo_register_read_into_value): Likewise.
9946 (i386_pseudo_register_read_value): Likewise.
9947 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9948 declaration.
9949 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9950 * m32c-tdep.c (m32c_raw_read): Likewise.
9951 (m32c_read_flg): Likewise.
9952 (m32c_banked_register): Likewise.
9953 (m32c_banked_read): Likewise.
9954 (m32c_sb_read): Likewise.
9955 (m32c_part_read): Likewise.
9956 (m32c_cat_read): Likewise.
9957 (m32c_r3r2r1r0_read): Likewise.
9958 (m32c_pseudo_register_read): Likewise.
9959 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9960 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9961 (mep_pseudo_cr64_read): Likewise.
9962 (mep_pseudo_register_read): Likewise.
9963 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9964 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9965 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9966 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9967 (regcache::cooked_read): Likewise.
9968 (regcache::cooked_read_value): Likewise.
9969 (regcache_cooked_read_signed):
9970 (regcache::cooked_read): Likewise.
9971 * regcache.h (readable_regcache): New class.
9972 (regcache): Inherit readable_regcache. Move some methods to
9973 readable_regcache.
9974 * rl78-tdep.c (rl78_pseudo_register_read): Change
9975 parameter type to 'readable_regcache *'.
9976 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9977 (e500_pseudo_register_read): Change parameter type to
9978 'readable_regcache *'.
9979 (dfp_pseudo_register_read): Likewise.
9980 (vsx_pseudo_register_read): Likewise.
9981 (efpr_pseudo_register_read): Likewise.
9982 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9983 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9984 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9985 (sh64_pseudo_register_read): Likewise.
9986 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9987 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9988 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9989 (spu_pseudo_register_read): Likewise.
9990 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9991 (xtensa_pseudo_register_read): Likewise.
9992
31716595
YQ
99932018-02-21 Yao Qi <yao.qi@linaro.org>
9994
9995 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9996 (regcache::arch): Move it to reg_buffer::arch.
9997 (regcache::register_buffer): Likewise.
9998 (regcache::assert_regnum): Likewise.
9999 (regcache::num_raw_registers): Likewise.
10000 * regcache.h (reg_buffer): New class.
10001 (regcache): Inherit reg_buffer.
10002
7104e59b
SM
100032018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10004
10005 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10006 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10007
2d8adcbd
MM
100082018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10009
10010 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10011
b5884fa7
AH
100122018-02-19 Alan Hayward <alan.hayward@arm.com>
10013
10014 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10015 (SFILES): Remove common/*.c files.
10016 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10017 * common/common.host: Add common reference.
10018 * configure.ac: Likewise.
10019 * configure: Regenerate.
10020
fd90ace4
YQ
100212018-02-16 Yao Qi <yao.qi@linaro.org>
10022
10023 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10024 (block_initialize_namespace): Use new.
10025 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10026 (dwarf2_free_objfile): Use delete.
10027 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10028 (copy_type_recursive): Use new.
10029 * gdb_obstack.h (allocate_on_obstack): New.
10030
85046ae2
YQ
100312018-02-15 Yao Qi <yao.qi@linaro.org>
10032
10033 PR gdb/22849
10034 * inferior.c (exit_inferior_1): Reset inf->control.
10035
355c559b
JB
100362018-02-15 Joel Brobecker <brobecker@adacore.com>
10037
10038 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10039 declaration.
10040
980548fd
PA
100412018-02-14 Pedro Alves <palves@redhat.com>
10042
10043 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10044 frame_cleanup_after_sniffer on exception.
10045
692d6f97
TT
100462018-02-14 Tom Tromey <tom@tromey.com>
10047
10048 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10049 const.
10050 (solib_bfd_open): Make pathname const.
10051 * solib.c (solib_bfd_open): Make pathname const.
10052 * solib-spu.c (spu_bfd_fopen): Make name const.
10053 (spu_bfd_open): Make pathname const.
10054 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10055 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10056
e0cc99a6
TT
100572018-02-14 Tom Tromey <tom@tromey.com>
10058
10059 * symfile.c (symfile_bfd_open): Update.
10060 * source.h (openp, source_full_path_of, find_and_open_source):
10061 Change argument type to unique_xmalloc_ptr.
10062 * source.c (openp): Take a unique_xmalloc_ptr.
10063 (source_full_path_of, find_and_open_source): Likewise.
10064 (open_source_file, symtab_to_fullname): Update.
10065 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10066 unique_xmalloc_ptr.
10067 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10068 (exec_file_find): Update.
10069 * psymtab.c (psymtab_to_fullname): Update.
10070 * nto-tdep.h (nto_find_and_open_solib): Update.
10071 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10072 unique_xmalloc_ptr.
10073 * exec.c (exec_file_attach): Update.
10074 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10075 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10076
b46a8d7c
TT
100772018-02-14 Tom Tromey <tom@tromey.com>
10078
10079 * solib.c: Include source.h.
10080 * nto-tdep.c: Include source.h.
10081 * mi/mi-cmd-env.c: Include source.h.
10082 * infcmd.c: Include source.h.
10083 * exec.c: Include source.h.
10084 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10085 (add_path, directory_switch, source_path, init_source_path): Move
10086 declarations...
10087 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10088 (add_path, directory_switch, source_path, init_source_path):
10089 ...here.
10090
797bc1cb
TT
100912018-02-14 Tom Tromey <tom@tromey.com>
10092
10093 * solist.h (exec_file_find, solib_find): Return
10094 unique_xmalloc_ptr.
10095 (solib_bfd_fopen): Take a const char *.
10096 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10097 (exec_file_find, solib_find): Likewise.
10098 (solib_bfd_fopen): Do not take ownership of "pathname".
10099 (solib_bfd_open): Use unique_xmalloc_ptr.
10100 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10101 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10102 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10103 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10104
f98b2e33
JB
101052018-02-14 Joel Brobecker <brobecker@adacore.com>
10106
10107 * ada-lang.c (name_match_type_from_name): Remove reference to
10108 ada_name_for_lookup in function's documentation.
10109 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10110
24b9144d
SM
101112018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10112
10113 * defs.h (enum openp_flags): New enum.
10114 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10115 Move to enum openp_flags.
10116 (openp_flags): New enum flags.
10117 (openp): Change parameter type to openp_flags.
10118 * source.c (openp): Change parameter type to openp_flags.
10119 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10120 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10121
387cd15b
SM
101222018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10123
10124 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10125 per-command.
10126
b303c6f6
AB
101272018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10128
10129 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10130 into...
10131 (class dwarf2_queue_guard): ...the destructor of this new class.
10132 (dw2_do_instantiate_symtab): Create instance of the new class
10133 dwarf2_queue_guard, remove cleanup.
10134
9c3630e9
TT
101352018-02-09 Tom Tromey <tom@tromey.com>
10136
10137 * source.c (find_source_lines): Don't reference past the end of
10138 the vector.
10139
c4e12631
MM
101402018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10141
10142 * remote.c (remote_btrace_maybe_reopen): Change error message.
10143 * btrace.c (btrace_enable): Likewise.
10144 (parse_xml_btrace): Likewise.
10145 (parse_xml_btrace_conf): Likewise.
10146
88711fbf
MM
101472018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10148
10149 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10150 (linux_enable_pt, linux_enable_bts): Call
10151 diagnose_perf_event_open_fail.
10152
17ad2a4f
MM
101532018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10154
10155 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10156 Remove parameter and change return type. Update callers. Move it.
10157 (linux_enable_bts, linux_enable_pt): Improve error message.
10158 (linux_enable_pt): Remove zero buffer size check.
10159 (linux_enable_btrace): Improve error messages. Remove NULL return
10160 check.
10161
de6242d3
MM
101622018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10163
10164 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10165 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10166 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10167 (linux_supports_pt, linux_supports_btrace): Remove.
10168 (linux_enable_bts): Call cpu_supports_bts.
10169 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10170 * remote.c (remote_supports_btrace): Remove.
10171 (init_remote_ops): Remove remote_supports_btrace.
10172 * target-delegates.c: Regenerated.
10173 * target.c (target_supports_btrace): Remove.
10174 * target.h (target_ops) <to_supports_btrace>: Remove
10175 (target_supports_btrace): Remove.
10176 * x86-linux-nat.c (x86_linux_create_target): Remove
10177 linux_supports_btrace.
10178
9ee23a85
MM
101792018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10180
10181 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10182 btrace failed.
10183 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10184 exception and use message in own exception.
10185
5c3284c1
MM
101862018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10187
10188 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10189 (perf_event_pt_event_type): Use gdb_file_up.
10190 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10191 scoped_fd, and scoped_mmap.
10192
84696f37
MM
101932018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10194
10195 * common/scoped_mmap.h: New.
10196 * unittests/scoped_mmap-selftest.c: New.
10197 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10198 unittests/scoped_mmap-selftest.c.
10199
ea4a0888
MM
102002018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10201
10202 * common/scoped_fd.h: New.
10203 * unittests/scoped_fd-selftest.c: New.
10204 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10205 unittests/scoped_fd-selftest.c.
10206
869e8290
TT
102072018-02-09 Tom Tromey <tom@tromey.com>
10208
10209 * auto-load.c (auto_load_section_scripts): Use
10210 gdb::unique_xmalloc_ptr.
10211
a37a2ae7
TT
102122018-02-09 Tom Tromey <tom@tromey.com>
10213
10214 * auto-load.c (execute_script_contents): Use std::string.
10215
4e725347
JB
102162018-02-09 Joel Brobecker <brobecker@adacore.com>
10217
10218 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10219 Python function, rather than a new command.
10220
9a897d43
TT
102212018-02-08 Tom Tromey <tom@tromey.com>
10222
10223 * solib.c (solib_find_1): Use std::string.
10224 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10225
58ef3771
TT
102262018-02-08 Tom Tromey <tom@tromey.com>
10227
10228 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10229
a9abc434
TT
102302018-02-08 Tom Tromey <tom@tromey.com>
10231
10232 * source.c (find_source_lines): Use gdb::def_vector.
10233
84f27c6f
TT
102342018-02-08 Tom Tromey <tom@tromey.com>
10235
10236 * macrocmd.c (struct temporary_macro_definition): New.
10237 (macro_define_command): Use temporary_macro_definition. Remove
10238 cleanups.
10239 (free_macro_definition_ptr): Remove.
10240
0354904b
TT
102412018-02-08 Tom Tromey <tom@tromey.com>
10242
10243 * macroexp.c (maybe_expand): Use std::string.
10244
1739cf24
TT
102452018-02-08 Tom Tromey <tom@tromey.com>
10246
10247 * macroexp.c (struct macro_buffer): Add initializers for some
10248 members.
10249 (init_buffer, init_shared_buffer, free_buffer)
10250 (free_buffer_return_text): Remove.
10251 (macro_buffer): New constructors.
10252 (~macro_buffer): New destructor.
10253 (macro_buffer::set_shared): New method.
10254 (macro_buffer::resize_buffer, macro_buffer::appendc)
10255 (macro_buffer::appendmem): Now methods, not free functions.
10256 (set_token, append_tokens_without_splicing, stringify)
10257 (macro_stringify): Update.
10258 (gather_arguments): Change return type. Remove argc_p argument,
10259 add args_ptr argument. Use std::vector.
10260 (substitute_args): Remove argc argument. Accept std::vector.
10261 (expand): Update. Use std::vector.
10262 (scan, macro_expand, macro_expand_next): Update.
10263
f6c2623e
TT
102642018-02-08 Tom Tromey <tom@tromey.com>
10265
10266 * symtab.c (default_collect_symbol_completion_matches_break_on):
10267 Use unique_xmalloc_ptr.
10268 * macroscope.h: (sal_macro_scope, user_macro_scope)
10269 (default_macro_scope): Return unique_xmalloc_ptr.
10270 * macroscope.c (sal_macro_scope, user_macro_scope)
10271 (default_macro_scope): Return unique_xmalloc_ptr.
10272 * macroexp.h (macro_expand, macro_expand_once): Return
10273 unique_xmalloc_ptr.
10274 * macroexp.c (macro_expand, macro_expand_once): Return
10275 unique_xmalloc_ptr.
10276 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10277 (info_macro_command, info_macros_command): Use
10278 unique_xmalloc_ptr.
10279 * compile/compile-c-support.c (write_macro_definitions): Use
10280 unique_xmalloc_ptr.
10281 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10282
c2e0e465
SM
102832018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10284
10285 * value.c (value_static_field): Assign field type instead of
10286 containing type when returning an optimized out value.
10287
3f8c94b4
YQ
102882018-02-06 Yao Qi <yao.qi@linaro.org>
10289
10290 * ft32-tdep.c (ft32_read_pc): Remove.
10291 (ft32_write_pc): Remove.
10292 (ft32_gdbarch_init): Update.
10293 * m32r-tdep.c (m32r_read_pc): Remove.
10294 (m32r_gdbarch_init): Update.
10295 * mep-tdep.c (mep_read_pc): Remove.
10296 (mep_gdbarch_init): Update.
10297 * microblaze-tdep.c (microblaze_write_pc): Remove.
10298 (microblaze_gdbarch_init): Update.
10299 * mn10300-tdep.c (mn10300_read_pc): Remove.
10300 (mn10300_write_pc): Remove.
10301 (mn10300_gdbarch_init): Update.
10302 * moxie-tdep.c (moxie_read_pc): Remove.
10303 (moxie_write_pc): Remove.
10304 (moxie_gdbarch_init): Update.
10305
bca65a23
YQ
103062018-02-06 Yao Qi <yao.qi@linaro.org>
10307
10308 * expprint.c (print_subexp_standard): Handle
10309 OP_F77_UNDETERMINED_ARGLIST.
10310 (dump_subexp_body_standard): Likewise.
10311
583e3f90 103122018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 10313
583e3f90
YQ
10314 * target-descriptions.c (tdesc_element_visitor) Add empty
10315 implementations.
b8df6ca7
AH
10316 (tdesc_type): Move make_gdb_type from here.
10317 (tdesc_type_builtin): Likewise.
10318 (tdesc_type_vector): Likewise.
10319 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10320 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10321 (make_gdb_type_union): Likewise.
10322 (make_gdb_type_flags): Likewise.
10323 (make_gdb_type_enum): Likewise.
10324 (make_gdb_type): New function.
10325 (tdesc_register_type): Use static make_gdb_type.
10326
e813d34a
RK
103272018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10328
10329 * infcmd.c (default_print_one_register_info): Align natural-format
10330 column values consistently one under another.
10331 (pad_to_column): New function.
10332
0eb876f5
JB
103332018-02-05 Joel Brobecker <brobecker@adacore.com>
10334
10335 * dwarf2read.c (dwarf2_physname): Move commment.
10336
0625771b
LS
103372018-02-01 Leszek Swirski <leszeks@google.com>
10338
10339 * varobj.c (varobj_formatted_print_options): Allow recursive
10340 pretty printing if pretty printing is enabled.
10341
59498c30
LS
103422018-02-01 Leszek Swirski <leszeks@google.com>
10343
10344 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10345 names after a structop as a filename.
10346
2d9e6acb
YQ
103472018-02-01 Yao Qi <yao.qi@linaro.org>
10348
10349 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10350 (arm_record_coproc_data_proc): Likewise.
10351
df95a9cf
YQ
103522018-02-01 Yao Qi <yao.qi@linaro.org>
10353
10354 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10355
07e5f5cf
NP
103562018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10357
10358 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10359 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10360
3045b475
PA
103612018-01-31 Pedro Alves <palves@redhat.com>
10362
10363 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10364 * inflow.c (child_terminal_save_inferior): Wrap reference to
10365 tcgetpgrp in HAVE_TERMIOS_H.
10366 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10367 _WIN32.
10368 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10369 always iterate over all inferiors.
10370 (gdbsim_cntrl_c): Adjust.
10371 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10372
929b5ad4
JB
103732018-01-31 Joel Brobecker <brobecker@adacore.com>
10374
10375 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10376 index type is objfile-owned if the element type is as well.
10377
29236ca2
JB
103782018-01-31 Joel Brobecker <brobecker@adacore.com>
10379
10380 GDB 8.1 released.
10381
c81e8879
PR
103822018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10383
10384 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10385 "features/s390x-linux64.c".
10386 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10387 s390_linux32 and s390x_linux64.
10388 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10389 default tdesc.
10390 * s390-tdep.c: Include "features/s390-linux32.c" and
10391 "features/s390x-linux64.c".
10392 (s390_tdesc_valid): Add check for tdesc_has_registers.
10393 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10394 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10395 tdesc_s390x_linux64.
10396 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10397 tdesc_s390x_linux64 to...
10398 * s390-tdep.h: ...here.
10399
e671cd59
PA
104002018-01-30 Pedro Alves <palves@redhat.com>
10401
10402 PR gdb/13211
10403 * config.in, configure: Regenerate.
10404 * configure.ac: Check for getpgid.
10405 * go32-nat.c (go32_pass_ctrlc): New.
10406 (go32_target): Install it.
10407 * inf-child.c (inf_child_target): Install
10408 child_terminal_save_inferior, child_pass_ctrlc and
10409 child_interrupt.
10410 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10411 (inf_ptrace_target): No longer install it.
10412 * infcmd.c (interrupt_target_1): Adjust.
10413 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10414 (child_interrupt): Declare.
10415 (inferior::terminal_state): New.
10416 * inflow.c (struct terminal_info): Update comments.
10417 (inferior_process_group): Delete.
10418 (terminal_is_ours): Delete.
10419 (gdb_tty_state): New.
10420 (child_terminal_init): Adjust.
10421 (is_gdb_terminal, sharing_input_terminal_1)
10422 (sharing_input_terminal): New functions.
10423 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10424 Set the process's actual process group in the foreground if
10425 possible. Handle is_ours_for_output/is_ours distinction. Don't
10426 mark terminal as the inferior's if not sharing GDB's terminal.
10427 Don't check attach_flag.
10428 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10429 pass down a target_terminal_state.
10430 (child_terminal_save_inferior): New, factored out from ...
10431 (child_terminal_ours_1): ... this. Handle
10432 target_terminal_state::is_ours_for_output.
10433 (child_interrupt, child_pass_ctrlc): New.
10434 (inflow_inferior_exit): Clear the inferior's terminal_state.
10435 (copy_terminal_info): Copy the inferior's terminal state.
10436 (_initialize_inflow): Remove reference to terminal_is_ours.
10437 * inflow.h (inferior_process_group): Delete.
10438 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10439 * procfs.c (procfs_target): Don't install procfs_interrupt.
10440 (procfs_interrupt): Delete.
10441 * remote.c (remote_serial_quit_handler): Adjust.
10442 (remote_interrupt): Remove ptid parameter. Adjust.
10443 * target-delegates.c: Regenerate.
10444 * target.c: Include "terminal.h".
10445 (target_terminal::terminal_state): Rename to ...
10446 (target_terminal::m_terminal_state): ... this.
10447 (target_terminal::init): Adjust.
10448 (target_terminal::inferior): Adjust to per-inferior
10449 terminal_state.
10450 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10451 (target_terminal::ours, target_terminal::ours_for_output): Use
10452 target_terminal_is_ours_kind.
10453 (target_interrupt): Remove ptid parameter. Adjust.
10454 (default_target_pass_ctrlc): Adjust.
10455 * target.h (target_ops::to_terminal_save_inferior): New field.
10456 (target_ops::to_interrupt): Remove ptid_t parameter.
10457 (target_interrupt): Remove ptid_t parameter. Update comment.
10458 (target_pass_ctrlc): Update comment.
10459 * target/target.h (target_terminal_state): New scoped enum,
10460 factored out of ...
10461 (target_terminal::terminal_state): ... here.
10462 (target_terminal::inferior): Update comments.
10463 (target_terminal::restore_inferior): New.
10464 (target_terminal::is_inferior, target_terminal::is_ours)
10465 (target_terminal::is_ours_for_output): Adjust.
10466 (target_terminal::scoped_restore_terminal_state): Adjust to
10467 rename, and call restore_inferior() instead of inferior().
10468 (target_terminal::scoped_restore_terminal_state::m_state): Change
10469 type.
10470 (target_terminal::terminal_state): Rename to ...
10471 (target_terminal::m_terminal_state): ... this and change type.
10472
9c3a5d93
PA
104732018-01-30 Pedro Alves <palves@redhat.com>
10474
10475 * linux-nat.c (wait_for_signal): New function.
10476 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10477 directly.
10478 (async_terminal_is_ours)
10479 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10480 (linux_nat_add_target): Don't override
10481 to_terminal_inferior/to_terminal_ours.
10482
69ab5edb
SDJ
104832018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10484
10485 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10486
fc8e7e75
SM
104872018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10488
10489 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10490 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10491 dwarf2_per_objfile_free here.
10492 (dwarf2_per_objfile_free): Remove.
10493 (_initialize_dwarf2_read): Don't register
10494 dwarf2_per_objfile_free as a registry cleanup.
10495
b2a426e2
EZ
104962018-01-27 Eli Zaretskii <eliz@gnu.org>
10497
10498 Avoid compilation errors in MinGW native builds
10499
10500 The error is triggered by including python-internal.h, and the
10501 error message is:
10502
10503 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10504 from build-gnulib/import/math.h:27,
10505 from d:/usr/Python26/include/pyport.h:235,
10506 from d:/usr/Python26/include/Python.h:58,
10507 from python/python-internal.h:94,
10508 from python/py-arch.c:24:
10509 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10510 using ::hypot;
10511 ^~~~~
10512
10513 This happens because Python headers define 'hypot' to expand t
10514 '_hypot' in the Windows builds.
10515 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10516 'hypoth'. This avoids a compilation error.
10517
0bdd8eac
AH
105182018-01-26 Alan Hayward <alan.hayward@arm.com>
10519
10520 * MAINTAINERS (Write After Approval): Fix ordering.
10521
56ae9dc3
AH
105222018-01-26 Alan Hayward <alan.hayward@arm.com>
10523
10524 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10525
7433498b
AM
105262018-01-26 Alan Modra <amodra@gmail.com>
10527
10528 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10529 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10530 Remove nop. Make const. Comment.
10531 (powerpc32_plt_stub_so_2): New.
10532 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10533 Correct count. Update uses.
10534 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10535 Move common code reading PLT entry word. Correct
10536 powerpc32_plt_stub PLT address calculation.
10537 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10538 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10539 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10540 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10541 (ppc64_standard_linkage8): Likewise.
10542 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10543 Correct insns description.
10544 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10545
0f59d5fc
PA
105462018-01-24 Pedro Alves <palves@redhat.com>
10547
10548 GCC PR libstdc++/83906
10549 * gdbtypes.c (operator==(const dynamic_prop &,
10550 const dynamic_prop &)): New.
10551 (operator==(const range_bounds &, const range_bounds &)): New.
10552 (check_types_equal): Use them instead of memcmp.
10553 * gdbtypes.h (operator==(const dynamic_prop &,
10554 const dynamic_prop &)): Declare.
10555 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10556 (operator==(const range_bounds &, const range_bounds &)): Declare.
10557 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10558
ef8914a4
PR
105592018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10560
10561 * s390-linux-tdep.c (s390_record_address_mask)
10562 (s390_record_calc_disp_common, s390_record_calc_disp)
10563 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10564 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10565 (s390_process_record): Move to s390-tdep.c.
10566 (s390_linux_init_abi_any): Adjust.
10567 * s390-tdep.c (s390_record_address_mask)
10568 (s390_record_calc_disp_common, s390_record_calc_disp)
10569 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10570 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10571 (s390_process_record): Moved from s390-linux-tdep.c
10572 (s390_gdbarch_init): Adjust.
10573
d6e58945
PR
105742018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10575
10576 * s390-linux-nat.c (s390-tdep.h): New include.
10577 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10578 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10579 (ALLDEPFILES): Add s390-tdep.c.
10580 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10581 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10582 * s390-tdep.h: ...this. New file.
10583 * s390-linux-tdep.c (s390-tdep.h): New include.
10584 (_initialize_s390_tdep): Rename to...
10585 (_initialize_s390_linux_tdep): ...this and adjust.
10586 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10587 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10588 s390-tdep.h.
10589 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10590 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10591 (s390_is_partial_instruction, s390_software_single_step)
10592 (is_non_branch_ril, s390_displaced_step_copy_insn)
10593 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10594 (s390_prologue_data, s390_addr, s390_store, s390_load)
10595 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10596 (s390_register_call_saved, s390_guess_tracepoint_registers)
10597 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10598 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10599 (s390_pseudo_register_name, s390_pseudo_register_type)
10600 (s390_pseudo_register_read, s390_pseudo_register_write)
10601 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10602 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10603 (s390_addr_bits_remove, s390_address_class_type_flags)
10604 (s390_address_class_type_flags_to_name)
10605 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10606 (s390_function_arg_float, s390_function_arg_vector)
10607 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10608 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10609 (s390_frame_align, s390_register_return_value, s390_return_value)
10610 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10611 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10612 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10613 (s390_trad_frame_prev_register, s390_unwind_cache)
10614 (s390_prologue_frame_unwind_cache)
10615 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10616 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10617 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10618 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10619 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10620 (s390_frame_base_address, s390_local_base_address)
10621 (s390_frame_base, s390_gcc_target_options)
10622 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10623 (s390_validate_reg_range, s390_tdesc_valid)
10624 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10625 * s390-tdep.c: ...this. New file.
10626
9c0b896e
PR
106272018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10628
10629 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10630 (s390_process_record, s390_gdbarch_tdep_alloc)
10631 (s390_linux_init_abi_any): Use/set new hook.
10632
7042632b
PR
106332018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10634
10635 * s390-linux-tdep.c (osabi.h): New include.
10636 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10637 (s390_linux_init_abi_any): New functions.
10638 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10639
650f5e13
PR
106402018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10641
10642 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10643 tdesc_has_registers check
10644
47c9317e
PR
106452018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10646
10647 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10648 (s390_validate_reg_range): New macro.
10649 (s390_gdbarch_init): Adjust.
10650
095085d8
PR
106512018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10652
10653 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10654 (s390_gdbarch_tdep_alloc): Adjust.
10655 (s390_gdbarch_init): Adjust.
10656
ab9bcc67
PR
106572018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10658
10659 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10660 <have_tdb>: Change type to bool.
10661 (s390_gdbarch_tdep_alloc): Adjust.
10662 (s390_gdbarch_init): Adjust.
10663
21f6f5ff
PR
106642018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10665
10666 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10667 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10668 (s390_gdbarch_tdep_alloc): New function.
10669 (s390_gdbarch_init): Allocate tdep at start and use its fields
10670 instead of separate variables.
10671
0eb97953
PR
106722018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10673
10674 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10675 when looking for cached gdbarch and add comment for remaining.
10676
5c319bb2
PA
106772018-01-22 Pedro Alves <palves@redhat.com>
10678 Sergio Durigan Junior <sergiodj@redhat.com>
10679
10680 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10681 case.
10682
d65ce302
MR
106832018-01-22 Maciej W. Rozycki <macro@mips.com>
10684
10685 * MAINTAINERS: Update my company e-mail address.
10686
ec7a5fcb
YQ
106872018-01-22 Yao Qi <yao.qi@linaro.org>
10688
10689 * regcache.c (cooked_write_test): New function.
10690 (_initialize_regcache): Register the test.
10691
11f57cb6
YQ
106922018-01-22 Yao Qi <yao.qi@linaro.org>
10693
10694 * ia64-tdep.c (ia64_pseudo_register_read): Call
10695 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10696 * m32c-tdep.c (m32c_cat_read): Likewise.
10697 (m32c_r3r2r1r0_read): Likewise.
10698 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10699 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10700
03f50fc8
YQ
107012018-01-22 Yao Qi <yao.qi@linaro.org>
10702
10703 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10704 method raw_read instead of regcache_raw_read.
10705 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10706 * arm-tdep.c (arm_neon_quad_read): Likewise.
10707 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10708 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10709 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10710 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10711 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10712 (i386_pseudo_register_read_into_value): Likewise.
10713 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10714 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10715 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10716 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10717 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10718 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10719 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10720 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10721 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10722
dc711524
YQ
107232018-01-22 Yao Qi <yao.qi@linaro.org>
10724
10725 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10726 * configure.tgt: Remove target mt.
10727 * mt-tdep.c: Remove.
10728 * regcache.c (cooked_read_test): Remove the check for mt.
10729
3f5a868b
YQ
107302018-01-22 Yao Qi <yao.qi@linaro.org>
10731
10732 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10733 instead of gdbarch_pseudo_register_read_value.
10734
de4cb04a
JB
107352018-01-22 Joel Brobecker <brobecker@adacore.com>
10736
10737 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10738 language is Ada.
10739
a9e40818
JB
107402018-01-22 Joel Brobecker <brobecker@adacore.com>
10741
10742 * linespec.c (create_sals_line_offset): Remove code that preserved
10743 the symtab_and_line's line number.
10744
e707fc44
AB
107452018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10746
10747 * varobj.c (varobj_create): Don't set valid_block when creating a
10748 floating varobj.
10749
03d0bf7b
AB
107502018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10751
10752 * varobj.c (varobj_create): Remove out of date comment.
10753
ae451627
AB
107542018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10755
10756 PR mi/20395
10757 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10758 updating innermost block.
10759 * parse.c (innermost_block_tracker::update): Take extra type
10760 parameter, and check types match before updating innermost block.
10761 (write_dollar_variable): Update innermost block for registers.
10762 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10763 (innermost_block_tracker::innermost_block_tracker): Initialise
10764 m_types member.
10765 (innermost_block_tracker::reset): Take type parameter.
10766 (innermost_block_tracker::update): Take type parameter, and pass
10767 type through as needed.
10768 (innermost_block_tracker::m_types): New member.
10769 * varobj.c (varobj_create): Pass type when reseting innermost
10770 block.
10771
aee1fcdf
AB
107722018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10773
10774 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10775 * ada-lang.c (resolve_subexp): Likewise.
10776 * breakpoint.c (set_breakpoint_condition) Likewise.
10777 (watch_command_1) Likewise.
10778 * c-exp.y (variable): Likewise.
10779 * d-exp.y (PrimaryExpression): Likewise.
10780 * f-exp.y (variable): Likewise.
10781 * go-exp.y (variable): Likewise.
10782 * m2-exp.y (variable): Likewise.
10783 * objfiles.c (objfile::~objfile): Likewise.
10784 * p-exp.y (variable): Likewise.
10785 * parse.c (innermost_block): Change type.
10786 * parser-defs.h (class innermost_block_tracker): New.
10787 (innermost_block): Change to innermost_block_tracker.
10788 * printcmd.c (display_command): Switch to innermost_block API.
10789 (do_one_display): Likewise.
10790 * rust-exp.y (do_one_display): Likewise.
10791 * symfile.c (clear_symtab_users): Likewise.
10792 * varobj.c (varobj_create): Switch to innermost_block API, replace
10793 use of innermost_block with block stored on varobj object.
10794
396af9a1
AB
107952018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10796
10797 * expression.h (innermost_block): Remove declaration.
10798 * varobj.c: Add 'parser-defs.h' include.
10799
fcfcc376
TT
108002018-01-19 Tom Tromey <tom@tromey.com>
10801
10802 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10803 symbols in the static and global blocks.
10804
5a6c3296
JC
108052018-01-19 James Clarke <jrtc27@jrtc27.com>
10806
10807 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10808 gdb_ptrace.h, and move including gdb_wait.h ...
10809 * nat/linux-ptrace.h: ... to here.
10810
bc09b0c1
SM
108112018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10812
10813 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10814 inf_ptrace_detach_success.
10815 (inf_ptrace_detach_success): Add inferior parameter, use it
10816 instead of inferior_ptid, pass it to detach_inferior.
10817 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10818 parameter.
10819 * inferior.c (detach_inferior): Add overload that takes an
10820 inferior object.
10821 * inferior.h (detach_inferior): Likewise.
10822 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10823 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10824 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10825
6e1e1966
SM
108262018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10827
10828 * target.h (struct target_ops) <to_detach>: Add inferior
10829 parameter.
10830 (target_detach): Likewise.
10831 * target.c (dispose_inferior): Pass inferior down.
10832 (target_detach): Pass inferior down. Assert that it is equal to
10833 the current inferior.
10834 * aix-thread.c (aix_thread_detach): Pass inferior down.
10835 * corefile.c (core_file_command): Pass current_inferior() down.
10836 * corelow.c (core_detach): Add inferior parameter.
10837 * darwin-nat.c (darwin_detach): Likewise.
10838 * gnu-nat.c (gnu_detach): Likewise.
10839 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10840 * infcmd.c (detach_command): Pass current_inferior() down to
10841 target_detach.
10842 * infrun.c (follow_fork_inferior): Pass parent_inf to
10843 target_detach.
10844 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10845 target_detach.
10846 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10847 * linux-thread-db.c (thread_db_detach): Likewise.
10848 * nto-procfs.c (procfs_detach): Likewise.
10849 * procfs.c (procfs_detach): Likewise.
10850 * record.c (record_detach): Likewise.
10851 * record.h (struct inferior): Forward-declare.
10852 (record_detach): Add inferior parameter.
10853 * remote-sim.c (gdbsim_detach): Likewise.
10854 * remote.c (remote_detach_1): Likewise.
10855 (remote_detach): Likewise.
10856 (extended_remote_detach): Likewise.
10857 * sol-thread.c (sol_thread_detach): Likewise.
10858 * target-debug.h (target_debug_print_inferior_p): New macro.
10859 * target-delegates.c: Re-generate.
10860 * top.c (kill_or_detach): Pass inferior down to target_detach.
10861 * windows-nat.c (windows_detach): Add inferior parameter.
10862
6bd6f3b6
SM
108632018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10864
10865 * target.h (struct target_ops) <to_detach>: Remove args
10866 parameter.
10867 (target_detach): Likewise.
10868 * target.c (dispose_inferior): Adjust.
10869 (target_detach): Remove args parameter, adjust.
10870 * aix-thread.c (aix_thread_detach): Adjust.
10871 * corefile.c (core_file_command): Adjust.
10872 * corelow.c (core_detach): Adjust.
10873 * darwin-nat.c (darwin_detach): Adjust.
10874 * gnu-nat.c (gnu_detach): Adjust.
10875 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10876 * infcmd.c (detach_command): Adjust
10877 * infrun.c (follow_fork_inferior): Adjust.
10878 (handle_vfork_child_exec_or_exit): Adjust.
10879 * linux-fork.c (linux_fork_detach): Remove args parameter.
10880 * linux-fork.h (linux_fork_detach): Likewise.
10881 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10882 * linux-thread-db.c (thread_db_detach): Likewise.
10883 * nto-procfs.c (procfs_detach): Likewise.
10884 * procfs.c (procfs_detach): Likewise.
10885 (do_detach): Remove signo parameter.
10886 * record.c (record_detach): Remove args parameter.
10887 * record.h (record_detach): Likewise.
10888 * remote-sim.c (gdbsim_detach): Likewise.
10889 * remote.c (remote_detach_1): Likewise.
10890 (remote_detach): Likewise.
10891 (extended_remote_detach): Likewise.
10892 * sol-thread.c (sol_thread_detach): Likewise.
10893 * target-delegates.c: Re-generate.
10894 * top.c (struct qt_args) <args>: Remove field.
10895 (kill_or_detach): Don't pass args.
10896 (quit_force): Don't set args.
10897 * windows-nat.c (windows_detach): Remove args parameter.
10898
88af8ea8
YQ
108992018-01-19 Yao Qi <yao.qi@linaro.org>
10900
10901 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10902 (arm_linux_init_abi): Install it.
10903
dea445b9
YQ
109042018-01-19 Yao Qi <yao.qi@linaro.org>
10905
10906 * osabi.c (gdb_osabi_names): Extend the regexp for
10907 arm-linux-gnueabihf.
10908
4a17f768
YQ
109092018-01-18 Yao Qi <yao.qi@linaro.org>
10910
10911 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10912 m_abbrevs.
10913 (abbrev_table::add_abbrev): Update.
10914 (abbrev_table::lookup_abbrev): Update.
10915
d679c21a
YQ
109162018-01-18 Yao Qi <yao.qi@linaro.org>
10917
10918 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10919
7d937cad
SDJ
109202018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10921
10922 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10923 to "std::string".
10924
9e14690d
TT
109252018-01-17 Tom Tromey <tom@tromey.com>
10926
10927 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10928
50a82047
TT
109292018-01-17 Tom Tromey <tom@tromey.com>
10930
10931 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10932 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10933 (create_array_type_with_stride): Update.
10934 * dwarf2read.c (set_die_type): Update.
10935
c89b44cd
TT
109362018-01-17 Tom Tromey <tom@tromey.com>
10937
10938 * dwarf2read.c (delayed_method_info): Remove typedef.
10939 (dwarf2_cu::method_info): Now a std::vector.
10940 (add_to_method_list): Update.
10941 (free_delayed_list): Remove.
10942 (compute_delayed_physnames): Update.
10943 (process_full_comp_unit, process_full_type_unit): Clear the method
10944 list. Remove cleanups.
10945 (psymtab_include_file_name): Add name_holder parameter. Use
10946 unique_xmalloc_ptr.
10947 (dwarf_decode_lines): Update.
10948
fcd3b13d
SM
109492018-01-17 Tom Tromey <tom@tromey.com>
10950 Simon Marchi <simon.marchi@ericsson.com>
10951
10952 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10953 (dwarf2_per_objfile::free_cached_comp_units)
10954 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10955 (init_cutu_and_read_dies_no_follow): Update.
10956 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10957 (dwarf2_cu::~dwarf2_cu): New.
10958 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10959 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10960
685af9cd
TT
109612018-01-17 Tom Tromey <tom@tromey.com>
10962 Simon Marchi <simon.marchi@ericsson.com>
10963
10964 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10965 (struct die_reader_specs) <abbrev_table>: New member.
10966 (struct abbrev_table): Add constructor.
10967 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10968 <abbrev_obstack>: Now an auto_obstack.
10969 (abbrev_table_up): New typedef.
10970 (init_cu_die_reader): Add abbrev_table parameter.
10971 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10972 Add result_dwo_abbrev_table.
10973 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10974 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10975 Update.
10976 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10977 parameter.
10978 (skip_children): Update.
10979 (abbrev_table::alloc_abbrev): Rename from
10980 abbrev_table_alloc_abbrev.
10981 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10982 (abbrev_table::lookup_abbrev): Rename from
10983 abbrev_table_lookup_abbrev.
10984 (abbrev_table_read_table): Return abbrev_table_up.
10985 (abbrev_table_free, abbrev_table_free_cleanup)
10986 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10987 (load_partial_dies): Update.
10988
5e2db402
TT
109892018-01-17 Tom Tromey <tom@tromey.com>
10990
10991 * dwarf2read.c (dwarf2_compute_name): Update comment.
10992 (read_func_scope, read_variable): Update.
10993 (new_symbol): Remove.
10994 (new_symbol_full): Rename to new_symbol.
10995
ee7f689e 109962018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
10997
10998 PR gdb/16577
10999 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11000 a warning instead of throwing an error, set section size to 0 and return
11001 NULL.
11002 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11003
4d9b86e1
SM
110042018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11005
11006 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11007 std::string.
11008 (linux_ptrace_attach_fail_reason_string): Likewise.
11009 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11010 Likewise.
11011 (linux_ptrace_attach_fail_reason_string): Likewise.
11012 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11013
a7b2d0fb
SM
110142018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11015
11016 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11017
f517c180
EA
110182018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11019
11020 PR gdb/21559
11021 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11022 checking for fs_base/gs_base fields in struct user_regs_struct.
11023 * configure: Regenerate.
11024
7045b1ca
YQ
110252018-01-17 Yao Qi <yao.qi@linaro.org>
11026
11027 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11028 function.
11029 (aarch64_linux_init_abi): Install it to gdbarch hook
11030 gcc_target_options.
11031
db422fb2
PA
110322018-01-15 Pedro Alves <palves@redhat.com>
11033
11034 * common/signals-state-save-restore.c
11035 (save_original_signals_state): Fix typos.
11036
ba643918
SDJ
110372017-01-12 Tom Tromey <tom@tromey.com>
11038 Sergio Durigan Junior <sergiodj@redhat.com>
11039
11040 * Makefile.in (install-only): Install gdb-add-index.
11041
906b4aac
JB
110422018-01-12 John Baldwin <jhb@FreeBSD.org>
11043
11044 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11045
bdf2a94a
AA
110462018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11047
11048 * infrun.c (keep_going_pass_signal): Clear step-over info when
11049 insert_breakpoints fails.
11050
71d378ae
PA
110512018-01-11 Pedro Alves <palves@redhat.com>
11052
11053 PR gdb/22583
11054 * infrun.c (resume): Rename to ...
11055 (resume_1): ... this.
11056 (resume): Reimplement as wrapper around resume_1.
11057
3cada740
PA
110582018-01-11 Pedro Alves <palves@redhat.com>
11059
11060 PR remote/22597
11061 * remote.c (remote_parse_stop_reply): Default to the last-set
11062 general thread instead of to 'magic_null_ptid'.
11063
618daa93
PA
110642018-01-10 Pedro Alves <palves@redhat.com>
11065
11066 * language.h (language_get_symbol_name_matcher): Rename ...
11067 (get_symbol_name_matcher): ... this.
11068 * language.c (language_get_symbol_name_matcher): Ditto.
11069 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11070 callers adjusted.
11071
c63d3e8d
PA
110722018-01-10 Pedro Alves <palves@redhat.com>
11073
11074 PR gdb/22670
11075 * dwarf2read.c
11076 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11077 Adjust to use language_get_symbol_name_matcher instead of
11078 language_defn::la_get_symbol_name_matcher.
11079 * language.c (language_get_symbol_name_matcher): If in Ada mode
11080 and the lookup name is a verbatim match, return Ada's matcher.
11081 * language.h (language_get_symbol_name_matcher): Adjust comment.
11082 (ada_lookup_name_info::verbatim_p):: New method.
11083
d4c2a405
PA
110842018-01-10 Pedro Alves <palves@redhat.com>
11085
11086 PR gdb/22670
11087 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11088 minsym's language is language_auto or language_cplus, pass down
11089 language_ada instead.
11090 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11091
8825213e
PA
110922018-01-10 Pedro Alves <palves@redhat.com>
11093
11094 PR gdb/22670
11095 * minsyms.c (linkage_name_str): New function.
11096 (iterate_over_minimal_symbols): Use it.
11097
2d97a5d9
JB
110982018-01-09 John Baldwin <jhb@FreeBSD.org>
11099
11100 * NEWS: Document that 'info proc' now works on FreeBSD.
11101
92fce24d
JB
111022018-01-09 John Baldwin <jhb@FreeBSD.org>
11103
11104 * configure.ac: Check for kinfo_getfile in libutil.
11105 * configure: Regenerate.
11106 * config.in: Regenerate.
11107 * fbsd-nat.c: Include "fbsd-tdep.h".
11108 (fbsd_fetch_cmdline): New.
11109 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11110 rather than calling error.
11111 (fbsd_info_proc): New.
11112 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11113 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11114 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11115
262f62f5
JB
111162018-01-09 John Baldwin <jhb@FreeBSD.org>
11117
11118 * fbsd-nat.c (struct free_deleter): Remove.
11119 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11120
b999e203
JB
111212018-01-09 John Baldwin <jhb@FreeBSD.org>
11122
11123 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11124 NULL for an empty pathname.
11125
d2176225
JB
111262018-01-09 John Baldwin <jhb@FreeBSD.org>
11127
11128 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11129 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11130 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11131 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11132 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11133 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11134 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11135 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11136 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11137 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11138 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11139 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11140 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11141 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11142 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11143
9c4ac400
ST
111442018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11145
11146 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11147 (gnu_xfer_auxv): New function.
11148 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11149 TARGET_OBJECT_AUXV.
11150
1e5ded6c
YQ
111512018-01-08 Yao Qi <yao.qi@linaro.org>
11152 Simon Marchi <simon.marchi@ericsson.com>
11153
11154 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11155 common/selftest.c.
11156 (COMMON_OBS): Remove selftest.o.
11157 * configure.ac: Append selftest-arch.c and common/selftest.c to
11158 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11159 * configure: Re-generated.
11160 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11161 GDB_SELF_TEST.
11162 (maintenance_info_selftests): Likewise.
11163
04bafb1e
XR
111642018-01-08 Xavier Roirand <roirand@adacore.com>
11165
11166 * ada-valprint.c (val_print_packed_array_elements): Use
11167 proper number of elements when printing an array indexed
11168 by an enumeration type.
11169
518817b3
SM
111702018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11171
11172 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11173 (dw2_get_file_names_reader): Adjust.
11174 (lookup_dwo_signatured_type): Adjust.
11175 (lookup_dwp_signatured_type): Adjust.
11176 (lookup_signatured_type): Adjust.
11177 (create_type_unit_group): Adjust.
11178 (get_type_unit_group): Adjust.
11179 (process_psymtab_comp_unit_reader): Adjust.
11180 (build_type_psymtabs_reader): Adjust.
11181 (scan_partial_symbols): Adjust.
11182 (add_partial_symbol): Adjust.
11183 (add_partial_subprogram): Adjust.
11184 (peek_die_abbrev): Adjust.
11185 (fixup_go_packaging): Adjust.
11186 (process_imported_unit_die): Adjust.
11187 (dwarf2_compute_name): Adjust.
11188 (dwarf2_physname): Adjust.
11189 (read_import_statement): Adjust.
11190 (handle_DW_AT_stmt_list): Adjust.
11191 (read_file_scope): Adjust.
11192 (read_func_scope): Adjust.
11193 (read_lexical_block_scope): Adjust.
11194 (read_call_site_scope): Adjust.
11195 (read_variable): Adjust.
11196 (dwarf2_rnglists_process): Adjust.
11197 (dwarf2_ranges_process): Adjust.
11198 (dwarf2_ranges_read): Adjust.
11199 (dwarf2_get_pc_bounds): Adjust.
11200 (dwarf2_record_block_ranges): Adjust.
11201 (dwarf2_add_field): Adjust.
11202 (dwarf2_add_member_fn): Adjust.
11203 (read_structure_type): Adjust.
11204 (process_structure_scope): Adjust.
11205 (read_enumeration_type): Adjust.
11206 (read_array_type): Adjust.
11207 (mark_common_block_symbol_computed): Adjust.
11208 (read_common_block): Adjust.
11209 (read_namespace_type): Adjust.
11210 (read_namespace): Adjust.
11211 (read_module_type): Adjust.
11212 (read_tag_pointer_type): Adjust.
11213 (read_tag_ptr_to_member_type): Adjust.
11214 (read_tag_string_type): Adjust.
11215 (read_subroutine_type): Adjust.
11216 (read_typedef): Adjust.
11217 (read_base_type): Adjust.
11218 (attr_to_dynamic_prop): Adjust.
11219 (read_subrange_type): Adjust.
11220 (read_unspecified_type): Adjust.
11221 (dwarf2_read_abbrevs): Adjust.
11222 (load_partial_dies): Adjust.
11223 (read_partial_die): Adjust.
11224 (find_partial_die): Adjust.
11225 (guess_partial_die_structure_name): Adjust.
11226 (fixup_partial_die): Adjust.
11227 (read_attribute_value): Adjust.
11228 (read_addr_index): Adjust.
11229 (read_addr_index_from_leb128): Adjust.
11230 (read_str_index): Adjust.
11231 (dwarf2_string_attr): Adjust.
11232 (get_debug_line_section): Adjust.
11233 (dwarf_decode_line_header): Adjust.
11234 (lnp_state_machine::check_line_address): Adjust.
11235 (dwarf_decode_lines_1): Adjust.
11236 (dwarf_decode_lines): Adjust.
11237 (dwarf2_start_symtab): Adjust.
11238 (var_decode_location): Adjust.
11239 (new_symbol_full): Adjust.
11240 (dwarf2_const_value_data): Adjust.
11241 (dwarf2_const_value_attr): Adjust.
11242 (dwarf2_const_value): Adjust.
11243 (die_type): Adjust.
11244 (die_containing_type): Adjust.
11245 (build_error_marker_type): Adjust.
11246 (lookup_die_type): Adjust.
11247 (guess_full_die_structure_name): Adjust.
11248 (anonymous_struct_prefix): Adjust.
11249 (determine_prefix): Adjust.
11250 (dwarf2_name): Adjust.
11251 (follow_die_ref_or_sig): Adjust.
11252 (follow_die_offset): Adjust.
11253 (follow_die_ref): Adjust.
11254 (follow_die_sig_1): Adjust.
11255 (follow_die_sig): Adjust.
11256 (get_signatured_type): Adjust.
11257 (get_DW_AT_signature_type): Adjust.
11258 (decode_locdesc): Adjust.
11259 (dwarf_decode_macros): Adjust.
11260 (cu_debug_loc_section): Adjust.
11261 (fill_in_loclist_baton): Adjust.
11262 (dwarf2_symbol_mark_computed): Adjust.
11263 (init_one_comp_unit): Don't assign
11264 dwarf2_cu::dwarf2_per_objfile.
11265 (set_die_type): Adjust.
11266
ed2dc618
SM
112672018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11268
11269 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11270 <dwarf2_per_objfile>: New field.
11271 (dwarf2_per_objfile): Remove global.
11272 (get_dwarf2_per_objfile): New function.
11273 (set_dwarf2_per_objfile): New function.
11274 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11275 dwarf2_per_objfile.
11276 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11277 (read_abbrev_offset): Likewise.
11278 (read_indirect_string): Likewise.
11279 (read_indirect_line_string): Likewise.
11280 (read_indirect_string_at_offset): Likewise.
11281 (read_indirect_string_from_dwz): Likewise.
11282 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11283 dwarf2_per_objfile.
11284 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11285 (create_all_comp_units): Change objfile parameter to
11286 dwarf2_per_objfile.
11287 (create_all_type_units): Likewise.
11288 (process_queue): Add dwarf2_per_objfile parameter.
11289 (read_and_check_comp_unit_head): Likewise.
11290 (lookup_dwo_unit_in_dwp): Likewise.
11291 (get_dwp_file): Likewise.
11292 (process_cu_includes): Likewise.
11293 (struct free_dwo_file_cleanup_data): New struct.
11294 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11295 set_dwarf2_per_objfile.
11296 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11297 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11298 context, adjust calls.
11299 (dw2_instantiate_symtab): Likewise.
11300 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11301 (dw2_get_cu): Likewise.
11302 (create_cu_from_index_list): Change objfile parameter to
11303 dwarf2_per_objfile.
11304 (create_cus_from_index_list): Get dwarf2_per_objfile from
11305 context, adjust calls.
11306 (create_cus_from_index): Likewise.
11307 (create_signatured_type_table_from_index): Change objfile
11308 parameter to dwarf2_per_objfile.
11309 (create_signatured_type_table_from_debug_names): Change objfile
11310 parameter to dwarf2_per_objfile.
11311 (create_addrmap_from_index): Likewise.
11312 (create_addrmap_from_aranges): Likewise.
11313 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11314 (dw2_setup): Remove.
11315 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11316 context.
11317 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11318 get_dwarf2_per_objfile.
11319 (dw2_forget_cached_source_info): Likewise.
11320 (dw2_map_symtabs_matching_filename): Likewise.
11321 (struct dw2_symtab_iterator) <index>: Remove.
11322 <dwarf2_per_objfile>: New field.
11323 (dw2_symtab_iter_init): Replace index parameter with
11324 dwarf2_per_objfile.
11325 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11326 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11327 (dw2_print_stats): Likewise.
11328 (dw2_dump): Likewise.
11329 (dw2_expand_symtabs_for_function): Likewise.
11330 (dw2_expand_all_symtabs): Likewise.
11331 (dw2_expand_symtabs_with_fullname): Likewise.
11332 (dw2_expand_marked_cus): Replace index and objfile parameters
11333 with dwarf2_per_objfile.
11334 (dw_expand_symtabs_matching_file_matcher): Add
11335 dwarf2_per_objfile parameter and adjust calls.
11336 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11337 adjust calls.
11338 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11339 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11340 adjust calls.
11341 (create_cus_from_debug_names_list): Replace objfile parameter
11342 with dwarf2_per_objfile and adjust calls.
11343 (create_cus_from_debug_names): Likewise.
11344 (dwarf2_read_debug_names): Likewise.
11345 (mapped_debug_names::namei_to_name): Adjust call.
11346 (dw2_debug_names_iterator::next): Likewise.
11347 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11348 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11349 (dw2_debug_names_dump): Likewise.
11350 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11351 (dw2_debug_names_expand_symtabs_matching): Likewise.
11352 (dwarf2_initialize_objfile): Likewise.
11353 (dwarf2_build_psymtabs): Likewise.
11354 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11355 this_cu.
11356 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11357 (read_and_check_comp_unit_head): Likewise.
11358 (read_abbrev_offset): Likewise.
11359 (create_debug_type_hash_table): Likewise.
11360 (create_debug_types_hash_table): Likewise.
11361 (create_all_type_units): Replace objfile parameter with
11362 dwarf2_per_objfile.
11363 (add_type_unit): Add dwarf2_per_objfile parameter.
11364 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11365 with dwarf2_per_objfile.
11366 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11367 (lookup_dwp_signatured_type): Likewise.
11368 (lookup_signatured_type): Likewise.
11369 (read_cutu_die_from_dwo): Likewise.
11370 (init_tu_and_read_dwo_dies): Likewise.
11371 (init_cutu_and_read_dies): Likewise.
11372 (init_cutu_and_read_dies_no_follow): Likewise.
11373 (allocate_type_unit_groups_table): Add objfile parameter.
11374 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11375 (get_type_unit_group): Likewise.
11376 (process_psymtab_comp_unit): Update call.
11377 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11378 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11379 (print_tu_stats): Likewise.
11380 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11381 in void* parameter.
11382 (build_type_psymtabs): Change objfile parameter to
11383 dwarf2_per_objfile.
11384 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11385 passed in void* parameter.
11386 (process_skeletonless_type_units): Change objfile parameter to
11387 dwarf2_per_objfile.
11388 (set_partial_user): Likewise.
11389 (dwarf2_build_psymtabs_hard): Likewise.
11390 (read_comp_units_from_section): Likewise.
11391 (create_all_comp_units): Likewise.
11392 (scan_partial_symbols): Update calls.
11393 (add_partial_symbol): Likewise.
11394 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11395 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11396 (process_queue): Add dwarf2_per_objfile parameter.
11397 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11398 (compute_compunit_symtab_includes): Likewise.
11399 (process_cu_includes): Add dwarf2_per_objfile parameter.
11400 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11401 (process_full_type_unit): Likewise.
11402 (process_imported_unit_die): Update call.
11403 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11404 (read_file_scope): Likewise.
11405 (allocate_dwo_file_hash_table): Add objfile parameter.
11406 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11407 (create_cus_hash_table): Likewise.
11408 (create_dwp_hash_table): Likewise.
11409 (create_dwo_unit_in_dwp_v1): Likewise.
11410 (create_dwp_v2_section): Likewise.
11411 (create_dwo_unit_in_dwp_v2): Likewise.
11412 (lookup_dwo_unit_in_dwp): Likewise.
11413 (try_open_dwop_file): Likewise.
11414 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11415 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11416 cleanup to include a reference to dwarf2_per_objfile.
11417 (open_dwp_file): Add dwarf2_per_objfile parameter.
11418 (open_and_init_dwp_file): Likewise.
11419 (get_dwp_file): Likewise.
11420 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11421 (queue_and_load_all_dwo_tus): Update call.
11422 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11423 data.
11424 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11425 (dwarf2_ranges_process): Likewise.
11426 (dwarf2_get_pc_bounds): Likewise.
11427 (mark_common_block_symbol_computed): Likewise.
11428 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11429 (dwarf2_read_abbrevs): Update call.
11430 (read_partial_die): Use dwarf2_per_objfile from cu.
11431 (find_partial_die): Likewise.
11432 (fixup_partial_die): Likewise.
11433 (read_attribute_value): Likewise.
11434 (read_indirect_string_at_offset_from): Add objfile parameter.
11435 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11436 parameter.
11437 (read_indirect_string_from_dwz): Add objfile parameter.
11438 (read_indirect_string): Add objfile parameter.
11439 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11440 (read_addr_index): Use dwarf2_per_objfile from cu.
11441 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11442 call dw2_setup.
11443 (read_str_index): Use dwarf2_per_objfile from cu.
11444 (get_debug_line_section): Likewise.
11445 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11446 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11447 (new_symbol_full): Use dwarf2_per_objfile from cu.
11448 (build_error_marker_type): Likewise.
11449 (lookup_die_type): Likewise.
11450 (determine_prefix): Likewise.
11451 (follow_die_offset): Likewise.
11452 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11453 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11454 (dwarf2_fetch_die_type_sect_off): Likewise.
11455 (dwarf2_get_die_type): Likewise.
11456 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11457 (get_signatured_type): Likewise.
11458 (get_DW_AT_signature_type): Likewise.
11459 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11460 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11461 (cu_debug_loc_section): Likewise.
11462 (fill_in_loclist_baton): Likewise.
11463 (dwarf2_symbol_mark_computed): Likewise.
11464 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11465 dwarf2_per_objfile.
11466 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11467 parameter.
11468 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11469 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11470 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11471 (set_die_type): Use dwarf2_free_objfile from cu.
11472 (get_die_type_at_offset): Likewise.
11473 (dwarf2_per_objfile_free): Don't assign global variable.
11474 (debug_names) <constructor>: Add dwarf2_per_objfile
11475 parameter, update m_debugstrlookup construction.
11476 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11477 parameter.
11478 <m_dwarf2_per_objfile>: New field.
11479 <lookup>: Use m_dwarf2_per_objfile.
11480 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11481 (psyms_seen_size): Likewise.
11482 (write_gdbindex): Replace objfile parameter with
11483 dwarf2_per_objfile.
11484 (write_debug_names): Likewise.
11485 (write_psymtabs_to_index): Likewise.
11486 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11487 calls.
11488
e3b94546
SM
114892018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11490
11491 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11492 <dwarf2_per_objfile>: New field.
11493 (struct dwarf2_per_cu_data) <objfile>: Remove.
11494 <dwarf2_per_objfile>: New field.
11495 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11496 of objfile.
11497 (create_signatured_type_table_from_index): Likewise.
11498 (create_debug_type_hash_table): Likewise.
11499 (fill_in_sig_entry_from_dwo_entry): Likewise.
11500 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11501 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11502 objfile.
11503 (create_partial_symtab): Access objfile through
11504 dwarf2_per_objfile.
11505 (process_psymtab_comp_unit_reader): Likewise.
11506 (read_comp_units_from_section): Likewise.
11507 (scan_partial_symbols): Likewise.
11508 (add_partial_symbol): Likewise.
11509 (add_partial_subprogram): Likewise.
11510 (peek_die_abbrev): Likewise.
11511 (fixup_go_packaging): Likewise.
11512 (process_full_comp_unit): Likewise.
11513 (process_full_type_unit): Likewise.
11514 (process_imported_unit_die): Likewise.
11515 (dwarf2_compute_name): Likewise.
11516 (dwarf2_physname): Likewise.
11517 (read_import_statement): Likewise.
11518 (create_cus_hash_table): Assign dwarf2_physname instead of
11519 objfile.
11520 (read_func_scope): Access objfile through dwarf2_per_objfile.
11521 (read_lexical_block_scope): Likewise.
11522 (read_call_site_scope): Likewise.
11523 (read_variable): Likewise.
11524 (dwarf2_rnglists_process): Likewise.
11525 (dwarf2_ranges_process): Likewise.
11526 (dwarf2_ranges_read): Likewise.
11527 (dwarf2_record_block_ranges): Likewise.
11528 (dwarf2_add_field): Likewise.
11529 (dwarf2_add_member_fn): Likewise.
11530 (read_structure_type): Likewise.
11531 (process_structure_scope): Likewise.
11532 (read_enumeration_type): Likewise.
11533 (read_array_type): Likewise.
11534 (read_common_block): Likewise.
11535 (read_namespace_type): Likewise.
11536 (read_namespace): Likewise.
11537 (read_module_type): Likewise.
11538 (read_tag_pointer_type): Likewise.
11539 (read_tag_ptr_to_member_type): Likewise.
11540 (read_tag_string_type): Likewise.
11541 (read_subroutine_type): Likewise.
11542 (read_typedef): Likewise.
11543 (read_base_type): Likewise.
11544 (attr_to_dynamic_prop): Likewise.
11545 (read_subrange_type): Likewise.
11546 (read_unspecified_type): Likewise.
11547 (load_partial_dies): Likewise.
11548 (read_partial_die): Likewise.
11549 (find_partial_die): Likewise.
11550 (guess_partial_die_structure_name): Likewise.
11551 (fixup_partial_die): Likewise.
11552 (read_attribute_value): Likewise.
11553 (read_addr_index_from_leb128): Likewise.
11554 (dwarf2_read_addr_index): Likewise.
11555 (dwarf2_string_attr): Likewise.
11556 (lnp_state_machine::check_line_address): Likewise.
11557 (dwarf_decode_lines_1): Likewise.
11558 (dwarf_decode_lines): Likewise.
11559 (dwarf2_start_symtab): Likewise.
11560 (var_decode_location): Likewise.
11561 (new_symbol_full): Likewise.
11562 (dwarf2_const_value_data): Likewise.
11563 (dwarf2_const_value_attr): Likewise.
11564 (dwarf2_const_value): Likewise.
11565 (die_type): Likewise.
11566 (die_containing_type): Likewise.
11567 (lookup_die_type): Likewise.
11568 (guess_full_die_structure_name): Likewise.
11569 (anonymous_struct_prefix): Likewise.
11570 (dwarf2_name): Likewise.
11571 (follow_die_ref_or_sig): Likewise.
11572 (follow_die_offset): Likewise.
11573 (follow_die_ref): Likewise.
11574 (dwarf2_fetch_die_loc_sect_off): Likewise.
11575 (dwarf2_fetch_constant_bytes): Likewise.
11576 (dwarf2_fetch_die_type_sect_off): Likewise.
11577 (dwarf2_get_die_type): Likewise.
11578 (follow_die_sig): Likewise.
11579 (decode_locdesc): Likewise.
11580 (dwarf2_per_cu_objfile): Likewise.
11581 (dwarf2_per_cu_text_offset): Likewise.
11582 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11583 objfile.
11584 (set_die_type): Access objfile through
11585 dwarf2_per_objfile.
11586
b01ba14d
SM
115872018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11588
11589 * valprint.c (converted_character_d): Remove typedef.
11590 (DEF_VEC_O (converted_character_d)): Remove.
11591 (count_next_character): Use std::vector.
11592 (print_converted_chars_to_obstack): Likewise.
11593 (generic_printstr): Likewise.
11594
4d0fdd9b
SM
115952018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11596
11597 * xml-support.h (struct gdb_xml_value): Add constructor.
11598 <value>: Change type to unique_xmalloc_ptr.
11599 (gdb_xml_value_s): Remove typedef.
11600 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11601 (gdb_xml_element_start_handler): Change parameter type to
11602 std::vector.
11603 (xml_find_attribute): Likewise.
11604 * xml-support.c (xml_find_attribute): Change parameter type to
11605 std::vector and adjust.
11606 (gdb_xml_values_cleanup): Remove.
11607 (gdb_xml_parser::start_element): Adjust to std::vector.
11608 (xinclude_start_include): Change paraeter type to std::vector
11609 and adjust.
11610 * btrace.c (check_xml_btrace_version): Likewise.
11611 (parse_xml_btrace_block): Likewise.
11612 (parse_xml_btrace_pt_config_cpu): Likewise.
11613 (parse_xml_btrace_pt): Likewise.
11614 (parse_xml_btrace_conf_bts): Likewise.
11615 (parse_xml_btrace_conf_pt): Likewise.
11616 * memory-map.c (memory_map_start_memory): Likewise.
11617 (memory_map_start_property): Likewise.
11618 * osdata.c (osdata_start_osdata): Likewise.
11619 (osdata_start_item): Likewise.
11620 (osdata_start_column): Likewise.
11621 * remote.c (start_thread): Likewise.
11622 * solib-aix.c (library_list_start_library): Likewise.
11623 (library_list_start_list): Likewise.
11624 * solib-svr4.c (library_list_start_library): Likewise.
11625 (svr4_library_list_start_list): Likewise.
11626 * solib-target.c (library_list_start_segment): Likewise.
11627 (library_list_start_section): Likewise.
11628 (library_list_start_library): Likewise.
11629 (library_list_start_list): Likewise.
11630 * tracepoint.c (traceframe_info_start_memory): Likewise.
11631 (traceframe_info_start_tvar): Likewise.
11632 * xml-syscall.c (syscall_start_syscall): Likewise.
11633 * xml-tdesc.c (tdesc_start_target): Likewise.
11634 (tdesc_start_feature): Likewise.
11635 (tdesc_start_reg): Likewise.
11636 (tdesc_start_union): Likewise.
11637 (tdesc_start_struct): Likewise.
11638 (tdesc_start_flags): Likewise.
11639 (tdesc_start_enum): Likewise.
11640 (tdesc_start_field): Likewise.
11641 (tdesc_start_enum_value): Likewise.
11642 (tdesc_start_vector): Likewise.
11643
f979c73f
SM
116442018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11645
11646 * extension.h (struct xmethod_worker) <clone>: Remove.
11647 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11648 Remove.
11649 (python_xmethod_worker::clone): Remove.
11650 * valops.c (find_overload_match): Use std::move instead of
11651 clone.
11652
ba18742c
SM
116532018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11654
11655 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11656 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11657 <free_xmethod_worker_data>: Remove.
11658 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11659 <get_xmethod_arg_types>: Remove.
11660 <get_xmethod_result_type>: Remove.
11661 <invoke_xmethod>: Remove.
11662 * extension.c (new_xmethod_worker): Remove.
11663 (clone_xmethod_worker): Remove.
11664 (get_matching_xmethod_workers): Return void, pass std::vector by
11665 pointer.
11666 (get_xmethod_arg_types): Rename to...
11667 (xmethod_worker::get_arg_types): ... this, and adjust.
11668 (get_xmethod_result_type): Rename to...
11669 (xmethod_worker::get_result_type): ... this, and adjust.
11670 (invoke_xmethod): Remove.
11671 (free_xmethod_worker): Remove.
11672 (free_xmethod_worker_vec): Remove.
11673 * extension.h (enum ext_lang_rc): Move here from
11674 extension-priv.h.
11675 (struct xmethod_worker): Add constructor and destructor.
11676 <data>: Remove.
11677 <value>: Remove.
11678 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11679 virtual pure methods.
11680 <get_arg_types, get_result_type>: New methods.
11681 (xmethod_worker_ptr): Remove typedef.
11682 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11683 (xmethod_worker_vec): Remove typedef.
11684 (xmethod_worker_up): New typedef.
11685 (invoke_xmethod): Remove.
11686 (clone_xmethod_worker): Remove.
11687 (free_xmethod_worker): Remove.
11688 (free_xmethod_worker_vec): Remove.
11689 (get_xmethod_arg_types): Remove.
11690 (get_xmethod_result_type): Remove.
11691 * valops.c (find_method_list): Use std::vector, don't use
11692 intermediate vector.
11693 (value_find_oload_method_list): Use std::vector.
11694 (find_overload_match): Use std::vector.
11695 (find_oload_champ): Use std::vector.
11696 * value.c (value_free): Use operator delete.
11697 (value_of_xmethod): Rename to...
11698 (value_from_xmethod): ... this. Don't assign
11699 xmethod_worker::value, take rvalue-reference.
11700 (result_type_of_xmethod): Adjust.
11701 (call_xmethod): Adjust.
11702 * value.h: Include extension.h.
11703 (struct xmethod_worker): Don't forward-declare.
11704 (value_of_xmethod): Rename to...
11705 (value_from_xmethod): ... this, take rvalue-reference.
11706 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11707 (struct python_xmethod_worker): ... this, add constructor and
11708 destructor.
11709 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11710 (gdbpy_free_xmethod_worker_data): Rename to...
11711 (python_xmethod_worker::~python_xmethod_worker): ... this and
11712 adjust.
11713 (gdbpy_clone_xmethod_worker_data): Rename to...
11714 (python_xmethod_worker::clone): ... this and adjust.
11715 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11716 temporary vector.
11717 (gdbpy_get_xmethod_arg_types): Rename to...
11718 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11719 (gdbpy_get_xmethod_result_type): Rename to...
11720 (python_xmethod_worker::do_get_result_type): ... this and
11721 adjust.
11722 (gdbpy_invoke_xmethod): Rename to...
11723 (python_xmethod_worker::invoke): ... this and adjust.
11724 (new_python_xmethod_worker): Rename to...
11725 (python_xmethod_worker::python_xmethod_worker): ... this and
11726 adjust.
11727 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11728 Remove.
11729 (gdbpy_free_xmethod_worker_data): Remove.
11730 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11731 (gdbpy_get_xmethod_arg_types): Remove.
11732 (gdbpy_get_xmethod_result_type): Remove.
11733 (gdbpy_invoke_xmethod): Remove.
11734 * python/python.c (python_extension_ops): Remove obsolete
11735 callbacks.
11736
e379cee6
PA
117372018-01-05 Pedro Alves <palves@redhat.com>
11738
11739 PR gdb/18653
11740 * common/signals-state-save-restore.c
11741 (save_original_signals_state): New parameter 'quiet'. Warn if we
11742 find a custom handler preinstalled, instead of internal erroring.
11743 But only warn if !quiet.
11744 * common/signals-state-save-restore.h
11745 (save_original_signals_state): New parameter 'quiet'.
11746 * main.c (captured_main_1): Move save_original_signals_state call
11747 after option handling, and pass QUIET.
11748
a655456c
PA
117492018-01-05 Pedro Alves <palves@redhat.com>
11750
11751 * spu-tdep.c (spu_catch_start): Pass
11752 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11753
de63c46b
PA
117542018-01-05 Pedro Alves <palves@redhat.com>
11755
11756 PR gdb/22670
11757 * ada-lang.c (literal_symbol_name_matcher): New function.
11758 (ada_get_symbol_name_matcher): Use it for
11759 symbol_name_match_type::SEARCH_NAME.
11760 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11761 it down instead of assuming symbol_name_match_type::FULL.
11762 * block.h (block_lookup_symbol): New parameter 'match_type'.
11763 * c-valprint.c (print_unpacked_pointer): Use
11764 lookup_symbol_search_name instead of lookup_symbol.
11765 * compile/compile-object-load.c (get_out_value_type): Pass down
11766 symbol_name_match_type::SEARCH_NAME.
11767 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11768 symbol_name_match_type::FULL.
11769 * cp-support.c (cp_get_symbol_name_matcher): Handle
11770 symbol_name_match_type::SEARCH_NAME.
11771 * infrun.c (insert_exception_resume_breakpoint): Use
11772 lookup_symbol_search_name.
11773 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11774 * psymtab.c (maintenance_check_psymtabs): Use
11775 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11776 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11777 SYMBOL_SEARCH_NAME.
11778 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11779 if symbol_name_match_type::SEARCH_NAME.
11780 (lookup_symbol_in_language): Pass down
11781 symbol_name_match_type::FULL.
11782 (lookup_symbol_search_name): New.
11783 (lookup_language_this): Pass down
11784 symbol_name_match_type::SEARCH_NAME.
11785 (lookup_symbol_aux, lookup_local_symbol): New parameter
11786 'match_type'. Pass it down.
11787 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11788 (lookup_symbol_search_name): New declaration.
11789 (lookup_symbol_in_block): New 'match_type' parameter.
11790
f98fc17b
PA
117912018-01-05 Pedro Alves <palves@redhat.com>
11792
11793 PR gdb/22670
11794 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11795 ada_lookup_symbol.
11796 (ada_lookup_symbol): Reimplement in terms of
11797 ada_lookup_symbol_list, bits factored out from
11798 ada_lookup_encoded_symbol.
11799
342f8240
JB
118002018-01-05 Joel Brobecker <brobecker@adacore.com>
11801
11802 * ada-exp.y (write_object_renaming): When subscripting an array
11803 using a symbol as the index, pass the block in call to
11804 ada_lookup_encoded_symbol when looking that symbol up.
11805
7150d33c
JG
118062018-01-05 Jerome Guitton <guitton@adacore.com>
11807
11808 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11809 TYPE_INDEX_TYPE.
11810
cc0e770c
JB
118112018-01-05 Joel Brobecker <brobecker@adacore.com>
11812
11813 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11814 the case where VALUE_LVAL (val0) is not lval_memory.
11815
f79da888 118162018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
11817
11818 * ada-valprint.c (print_optional_low_bound): Handle
11819 character-indexed array printing like boolean-indexed array
11820 printing.
11821
cd385f94
JB
118222018-01-05 Joel Brobecker <brobecker@adacore.com>
11823
11824 * NEWS: Create a new section for the next release branch.
11825 Rename the section of the current branch, now that it has
11826 been cut.
11827
09aca949
JB
118282018-01-05 Joel Brobecker <brobecker@adacore.com>
11829
11830 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11831 * version.in: Bump version to 8.1.50.DATE-git.
11832
9f757bf7
XR
118332018-01-03 Xavier Roirand <roirand@adacore.com>
11834
11835 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11836 Add field.
11837 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11838 Add field.
11839 (default_exception_support_info) <catch_handlers_sym>: Add field.
11840 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11841 (ada_exception_name_addr_1): Add "catch handlers" handling.
11842 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11843 Update all callers.
11844 (create_excep_cond_exprs) <ex>: Add parameter.
11845 (re_set_exception): Update create_excep_cond_exprs call.
11846 (print_it_exception, print_one_exception, print_mention_exception)
11847 (print_recreate_exception): Add "catch handler" handling.
11848 (allocate_location_catch_handlers, re_set_catch_handlers)
11849 (check_status_catch_handlers, print_it_catch_handlers)
11850 (print_one_catch_handlers, print_mention_catch_handlers)
11851 (print_recreate_catch_handlers): New function.
11852 (catch_handlers_breakpoint_ops): New variable.
11853 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11854 Add parameter. Add "catch handler" handling.
11855 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11856 Add "catch handler" handling.
11857 (ada_exception_catchpoint_cond_string): Add "catch handler"
11858 handling.
11859 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11860 call.
11861 (catch_ada_handlers_command): New function.
11862 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11863 operations structure.
11864 (_initialize_ada_language): Add "catch handlers" command entry.
11865 * NEWS: Document "catch handlers" feature.
11866
9fe561ab
JB
118672018-01-02 Joel Brobecker <brobecker@adacore.com>
11868
11869 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11870 account when creating the array type of the slice.
11871 (ada_value_slice): Likewise.
11872
a405673c
JB
118732018-01-02 Joel Brobecker <brobecker@adacore.com>
11874
11875 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11876 New enum value.
11877 (create_array_type_with_stride): Add byte_stride_prop parameter.
11878 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11879 New parameter. Update all callers in this file.
11880 (array_type_has_dynamic_stride): New function.
11881 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11882 of arrays with dynamic byte strides.
11883 * dwarf2read.c (read_array_type): Add support for dynamic
11884 DW_AT_byte_stride attributes.
11885
74a2f8ff
JB
118862018-01-02 Joel Brobecker <brobecker@adacore.com>
11887
11888 * dwarf2read.c (read_unspecified_type): Treat
11889 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11890
e2882c85
JB
118912018-01-01 Joel Brobecker <brobecker@adacore.com>
11892
11893 Update copyright year range in all GDB files.
11894
1690bb24
JB
118952018-01-01 Joel Brobecker <brobecker@adacore.com>
11896
11897 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11898 and gdb/testsuite/gdb.base/step-line.c.
11899
0f0c98a8
JB
119002018-01-01 Joel Brobecker <brobecker@adacore.com>
11901
11902 * copyright.py (main): Dump the contents of
11903 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11904 even if BY_HAND is empty.
11905
82e1e79a
JB
119062018-01-01 Joel Brobecker <brobecker@adacore.com>
11907
11908 * top.c (print_gdb_version): Update Copyright year in version
11909 message.
11910
053f54e5 119112018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 11912
053f54e5 11913 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 11914
053f54e5 11915For older changes see ChangeLog-2017.
c906108c
SS
11916\f
11917Local Variables:
11918mode: change-log
11919left-margin: 8
11920fill-column: 74
11921version-control: never
57da7796 11922coding: utf-8
c906108c 11923End:
This page took 2.67997 seconds and 4 git commands to generate.