Make ada-lang.c::add_angle_brackets return an std::string
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
39e7af3e
SM
12018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * ada-lang.c (add_angle_brackets): Return std::string.
4
bbbbbcee
SM
52018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
6
7 * python/py-threadevent.c (py_get_event_thread): Initialize
8 pythread.
9
d98fc15b
PA
102018-08-24 Pedro Alves <palves@redhat.com>
11
12 * python/py-bpevent.c (create_breakpoint_event_object): Use
13 copy-initialization.
14 * python/py-continueevent.c (emit_continue_event): Use
15 copy-initialization.
16 * python/py-exitedevent.c (create_exited_event_object): Return a
17 gdbpy_ref<>.
18 (emit_exited_event): Use copy-initialization.
19 * python/py-inferior.c (python_new_inferior)
20 (python_inferior_deleted, add_thread_object): Use
21 copy-initialization.
22 * python/py-infevents.c (create_inferior_call_event_object)
23 (create_register_changed_event_object)
24 (create_memory_changed_event_object): Return a gdbpy_ref<>.
25 (emit_inferior_call_event, emit_memory_changed_event)
26 (emit_register_changed_event): Use copy-initialization.
27 * python/py-newobjfileevent.c (create_new_objfile_event_object):
28 Return a gdbpy_ref<>.
29 (emit_new_objfile_event): Use copy-initialization.
30 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
31 (emit_clear_objfiles_event): Use copy-initialization.
32 * python/py-signalevent.c (create_signal_event_object): Use
33 copy-initialization.
34 * python/py-threadevent.c (create_thread_event_object): Use
35 copy-initialization.
36
da3c8738
PA
372018-08-24 Pedro Alves <palves@redhat.com>
38 Simon Marchi <simon.marchi@ericsson.com>
39
40 PR gdb/23379
41 * python/py-continueevent.c: Include "gdbthread.h".
42 (create_continue_event_object): Add intro comment. Add 'ptid'
43 parameter. Use it to find thread to pass to
44 create_thread_event_object.
45 (emit_continue_event): Pass PTID down to
46 create_continue_event_object.
47 * python/py-event.h (py_get_event_thread): Declare.
48 (create_thread_event_object): Remove default from 'thread'
49 parameter.
50 * python/py-stopevent.c (create_stop_event_object): Use
51 py_get_event_thread.
52 * python/py-threadevent.c (get_event_thread): Rename to ...
53 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
54 and use it to find the thread.
55 (create_thread_event_object): Assert that THREAD isn't null.
56 Don't find the event thread here.
57
26457a9c
KB
582018-08-23 Kevin Buettner <kevinb@redhat.com>
59
60 * block.h (blockrange, blockranges): New struct declarations.
61 (struct block): Add new field named `ranges'.
62 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
63 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
64 macros for accessing ranges in struct block.
65 (make_blockranges): New declaration.
66 block.c (make_blockranges): New function.
2d5f09ec
KB
67 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
68 for block.
fc811edd
KB
69 * symtab.h (find_pc_partial_function): Add new parameter `block'.
70 * blockframe.c (cache_pc_function_block): New static global.
71 (clear_pc_function_cache): Clear cache_pc_function_block.
72 (find_pc_partial_function): Move comment to symtab.h. Add
73 support for non-contiguous blocks.
e9480230
KB
74 * cli/cli-cmds.c (block.h): Include.
75 (print_disassembly): Handle printing of non-contiguous blocks.
76 (disassemble_current_function): Likewise.
77 (disassemble_command): Likewise.
26457a9c 78
2b1ffcfd
KB
79 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
80 BLOCK_START.
81 * blockframe.c (get_pc_function_start): Likewise.
82 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
83 (gcc_symbol_address): Likewise.
84 * compile/compile-object-run.c (compile_object_run): Likewise.
85 * compile/compile.c (get_expr_block_and_pc): Likewise.
86 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
87 (func_addr_to_tail_call_list): Likewise.
88 * findvar.c (default_read_var_value): Likewise.
89 * inline-frame.c (inline_frame_this_id): Likewise.
90 (skip-inline_frames): Likewise.
91 * infcmd.c (until_next_command): Likewise.
92 * linespec.c (convert_linespec_to_sals): Likewise.
93 * parse.c (parse_exp_in_context_1): Likewise.
94 * printcmd.c (build_address_symbolic): likewise.
95 (info_address_command): Likewise.
96 symtab.c (find_function_start_sal): Likewise.
97 (skip_prologue_sal): Likewise.
98 (find_function_alias_target): Likewise.
99 (find_gnu_ifunc): Likewise.
100 * stack.c (find_frame_funname): Likewise.
101 * symtab.c (fixup_symbol_section): Likewise.
102 (find_function_start_sal): Likewise.
103 (skip_prologue_sal): Likewsie.
104 (find_function_alias_target): Likewise.
105 (find_gnu_ifunc): Likewise.
106 * tracepoint.c (info_scope_command): Likewise.
107 * value.c (value_fn_field): Likewise.
108
9644dc3a
KB
109 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
110 in place of find_pc_partial_function.
111 * blockframe.c (find_function_entry_range_from_pc): New function.
112 * symtab.h (find_function_entry_range_from_pc): Declare and document.
113 * objfiles.c (objfile_relocate1): Relocate start and end addresses
114 for each range in a block.
115
116
12a0d0f6
XR
1172018-08-23 Xavier Roirand <roirand@adacore.com>
118
119 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
120 incrementation.
121
d1012b8e
SM
1222018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
123
124 * solib-svr4.c (read_program_headers_from_bfd): Return
125 gdb::optional<gdb::byte_vector>.
126 (svr4_exec_displacement): Adjust.
127
17658d46
SM
1282018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
129
130 * solib-svr4.c (read_program_header): Return
131 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
132 (find_program_interpreter): Return
133 gdb::optional<gdb::byte_vector>.
134 (scan_dyntag_auxv): Adjust.
135 (enable_break): Adjust.
136 (svr4_exec_displacement): Adjust.
137
ae739fe7
SM
1382018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
139
140 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
141 * inf-child.c (inf_child_target::terminal_save_inferior): New.
142
467dc1e2
SM
1432018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
144
145 * guile/scm-string.c (gdbscm_scm_from_printf): Use
146 string_vprintf.
147 * guile/scm-utils.c (gdbscm_printf): Likewise.
148 * serial.c (serial_printf): Likewise.
149 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
150
6d52907e
JV
1512018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
152
153 * stack.c (print_frame): Print frame architecture when printing on
154 an MI output.
155 * NEWS: Mention new "arch" attribute in frame output.
156
9758a8f8
AH
1572018-08-21 Alan Hayward <alan.hayward@arm.com>
158
159 * arch/aarch64.h (aarch64_regnum): Update comment.
160
1461bdac
AH
1612018-08-21 Alan Hayward <alan.hayward@arm.com>
162
163 * NEWS: Add SVE to 8.2 section.
164
4895f384
PA
1652018-08-21 Pedro Alves <palves@redhat.com>
166
167 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
168 out from gdbscm_parse_function_args.
169 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
170 gdbscm_parse_function_args_1.
171
a4497d2f
SM
1722018-08-21 Simon Marchi <simon.marchi@ericsson.com>
173
174 PR gdb/17816
175 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
176 operator.
177
c44deb73
SM
1782018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
179
180 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
181
be2d111a
MS
1822018-08-19 Michael Spang <spang@google.com>
183
184 PR gdb/11786
185 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
186 for PT_TLS segments.
187
a6b786da
KB
1882018-08-18 Kevin Buettner <kevinb@redhat.com>
189
190 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
191 dwarf_variable_value.
192 * dwarf2-frame.c (class dwarf_expr_executor):
193 Add override for dwarf_variable_value.
194 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
195 (class symbol_needs_eval_context): Likewise.
196 (indirect_synthetic_pointer): Add forward declaration.
197 (sect_variable_value): New function.
198 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
199 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
200 for DW_OP_GNU_variable_value.
201
89fbedf3
TT
2022018-08-16 Tom Tromey <tom@tromey.com>
203
204 * top.c (read_command_file): Update.
205 (command_line_input): Remove "repeat" argument.
206 * ada-lang.c (get_selections): Update.
207 * linespec.c (decode_line_2): Update.
208 * defs.h (command_line_input): Remove argument.
209 * cli/cli-script.c (read_next_line): Update.
210 * python/py-gdb-readline.c: Update.
211
12582533
TT
2122018-08-17 Tom Tromey <tom@tromey.com>
213
214 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
215 command_line_input.
216
49514353
TT
2172018-08-15 Tom Tromey <tom@tromey.com>
218
219 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
220
26fb3983
JV
2212018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
222
223 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
224 If used, use find_pc_partial_function to find address range
225 to disassemble.
226 * mi/mi-main.c (mi_cmd_list_features): Report
227 "data-disassemble-a-option" feature.
228 * NEWS: Mention new -data-disassemble option -a.
229
a97b53dd
TT
2302018-08-13 Tom Tromey <tom@tromey.com>
231
232 * common/common-defs.h (_FORTIFY_SOURCE): Define.
233
0c76e06d
AH
2342018-08-13 Alan Hayward <alan.hayward@arm.com>
235
236 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
237 (aarch64_linux_collect_sve_regset): Likewise.
238 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
239 * regcache.h (regcache_map_entry_size): New function.
240
b7fd65b9
AH
2412018-08-13 Alan Hayward <alan.hayward@arm.com>
242
243 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
244 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
245 (SVE_HEADER_VL_LENGTH): Likewise.
246 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
247 (SVE_HEADER_FLAGS_LENGTH): Likewise.
248 (SVE_HEADER_RESERVED_LENGTH): Likewise.
249 (SVE_HEADER_SIZE_OFFSET): Likewise.
250 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
251 (SVE_HEADER_VL_OFFSET): Likewise.
252 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
253 (SVE_HEADER_FLAGS_OFFSET): Likewise.
254 (SVE_HEADER_RESERVED_OFFSET): Likewise.
255 (SVE_HEADER_SIZE): Likewise.
256 (aarch64_linux_core_read_vq): Add function.
257 (aarch64_linux_core_read_description): Check for SVE section.
258
a616bb94
AH
2592018-08-13 Alan Hayward <alan.hayward@arm.com>
260
261 * aarch64-fbsd-tdep.c
262 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
263 collect_size.
264 * aarch64-linux-tdep.c
265 (aarch64_linux_iterate_over_regset_sections): Likewise.
266 * alpha-linux-tdep.c
267 (alpha_linux_iterate_over_regset_sections):
268 * alpha-nbsd-tdep.c
269 (alphanbsd_iterate_over_regset_sections): Likewise.
270 * amd64-fbsd-tdep.c
271 (amd64fbsd_iterate_over_regset_sections): Likewise.
272 * amd64-linux-tdep.c
273 (amd64_linux_iterate_over_regset_sections): Likewise.
274 * arm-bsd-tdep.c
275 (armbsd_iterate_over_regset_sections): Likewise.
276 * arm-fbsd-tdep.c
277 (arm_fbsd_iterate_over_regset_sections): Likewise.
278 * arm-linux-tdep.c
279 (arm_linux_iterate_over_regset_sections): Likewise.
280 * corelow.c (get_core_registers_cb): Likewise.
281 (core_target::fetch_registers): Likewise.
282 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
283 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
284 * gdbarch.h (void): Regenerate.
285 * gdbarch.sh: Add supply_size and collect_size.
286 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
287 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
288 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
289 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
290 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
291 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
292 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
293 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
294 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
295 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
296 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
297 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
298 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
299 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
300 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
301 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
302 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
303 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
304 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
305 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
306 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
307 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
308 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
309 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
310 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
311 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
312 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
313 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
314 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
315 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
316
a9925d4f
SM
3172018-08-10 Simon Marchi <simon.marchi@ericsson.com>
318
319 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
320 with string_printf.
321
ad3a68e9
KS
3222018-08-10 Keith Seitz <keiths@redhat.com>
323
324 * compile/compile-c-support.c (add_code_header, add_code_footer):
325 Move into policy class.
326 (c_push_user_expression, pop_user_expression_nop)
327 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
328 (compile_program): New host class.
329 (c_compile_program): New typedef.
330 (c_compute_porgram): Use c_compile_program.
331
0cfbf430
KS
3322018-08-10 Keith Seitz <keiths@redhat.com>
333
334 * compile/compile-internal.h (compile_instance::~compile_instance):
335 Remove calls to htab_delete.
336 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
337 * compile.c (compile_instance::compile_instance): Initialize
338 htab unique pointers.
339 (compile_instance::get_cached_type, compile_instance::insert_type)
340 (compile_instance::error_symbol_once): Update for unique_ptr.
341
946d3d10
KS
3422018-08-10 Keith Seitz <keiths@redhat.com>
343
344 * compile/compile-c-symbols.c (struct symbol_error)
345 (hash_symbol_error, eq_symbol_error, del_symbol_error)
346 (compile_instance::insert_symbol_error)
347 (compile_instance::error_symbol_once): Move to ...
348 * compile/compile.c: ... here.
349
9cdfd9a2
KS
3502018-08-10 Keith Seitz <keiths@redhat.com>
351
352 * compile/compile-c-support.c (c_get_compile_context): Use `new'
353 instead of `new_compile_instance'.
354 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
355 Update description.
356 If the symbol error map is not initialized, create it.
357 (generate_c_for_for_one_symbol): Do not check/initialize
358 the symbol error map.
359 * compile/compile-c-types.c (compile_c_instance): Make a class.
360 Update all callers.
361 (compile_instance::compile_instance): Initialize the type cache.
362 (get_cached_type): New function.
363 (insert_type): Update description.
364 (compile_c_instance::m_default_cflags): Define.
365 (convert_type): Update description. Use get_cached_type.
366 (delete_instance): Moved to destructor.
367 (new_compile_instance): Moved to constructor.
368 * compile/compile-c.h (compile_c_instance): Make class inheriting
369 from compile_instance.
370 <base>: Remove field.
371 <type_map, symbol_err_map>: Move to base class.
372 <c_plugin>: Rename to `m_plugin' and remove pointer type.
373 * compile/compile-internal.h (compile_instance): Make class.
374 <type_map_t, symbol_err_map_t>: Define.
375 <fe>: Rename to `m_gcc_fe'.
376 <scope, block, gcc_target_options>: Add `m_' prefix.
377 <m_type_map, m_symbol_err_map>: New fields, moved from
378 compile_c_instance.
379 <destroy>: Remove.
380 (convert_type, new_compile_instance): Remove.
381 * compile/compile.c (cleanup_compile_instance): Remove.
382 (compile_to_object): Use unique_ptr to eliminate cleanups.
383 (compile_instance::set_print_callback, compile_instance::version)
384 (compile_instance::set_verbose)
385 (compile_instance::set_driver_filename)
386 (compile_instance::set_triplet_regexp)
387 (compile_instance::set_arguments)
388 (compile_instance::set_source_file)
389 (compile_instance::compile): Define.
390
18cdc6d8
KS
3912018-08-10 Keith Seitz <keiths@redhat.com>
392
393 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
394 * compile/compile-c-types.c: Define GCC_METHODN macros and include
395 gcc-c-fe.def to define C plugin.
396 (delete_instance): Delete `c_plugin'.
397 (new_compile_instance): Initialize `c_plugin'.
398 * compile/compile-c.h: Include gcc_c_plugin.h.
399 (struct compile_c_instance) <c_plugin>: New member.
400 * gcc-c-plugin.h: New file.
401 Update all callers with API change.
402
b7dc48b4
KS
4032018-08-10 Keith Seitz <keiths@redhat.com>
404
405 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
406 (HFILES_NO_SRCDIR): ... to here.
407 Add compile-internal.h and compile-c.h.
408 * compile/compile-c-support.c: Include compile-c.h.
409 * compile/compile-c-symbols.c: Include compile-c.h.
410 (generate_c_for_variable_locations): Update comment.
411 * compile/compile-c-types.c: Include compile-c.h.
412 * compile/compile-c.h: New file -- moved C language declarations
413 from other files here.
414 * compile/compile-internal.h: Do not include hashtab.h or
415 common/enum-flags.h.
416 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
417 (gcc_convert_symbol, gcc_symbol_address)
418 (generate_c_for_variable_locations, c_get_mode_for_size)
419 (c_get_range_decl_name): Definitions moved to compile-c.h.
420 * compile/compile-loc2c.c: Include compile-c.h.
421
6f36b6d2
KS
4222018-08-10 Keith Seitz <keiths@redhat.com>
423
424 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
425 (c_symbol_substitution_name): ... this.
426 Update all callers.
427
bd923e51
KS
4282018-08-10 Keith Seitz <keiths@redhat.com>
429
430 * compile/compile-c-support.c (c_compute_program): Use
431 unique_xmalloc_ptr to eliminate cleanup.
432 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
433 Return a unique_xmalloc_ptr and eliminate cleanup.
434 * compile/compile-internal.h (generate_c_for_variable_locations):
435 Return unique_xmalloc_ptr and update description.
436
dbd534fe
AH
4372018-08-10 Alan Hayward <alan.hayward@arm.com>
438
439 * corelow.c (core_target::get_core_register_section): Rename
440 min_size to section_min_size.
441
90ad3654
JW
4422018-08-09 Jim Wilson <jimw@sifive.com>
443
52a187f8
JW
444 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
445 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
446 * NEWS: Mention new GNU/Linux RISC-V target.
447 * configure.host: Add riscv*-*-linux*.
448 * configure.nat: Add riscv*.
449 * configure.tgt: Add riscv*-*-linux*.
3c77f97e 450 * riscv-linux-nat.c: New file.
90ad3654
JW
451 * riscv-linux-tdep.c: New file.
452
aff4e175
AB
4532018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
454
455 * infrun.c (resume): Make static, add forward declaration.
456 (proceed): Update header comment.
457 * infrun.h (resume): Delete declaration.
458
06ab9219
TT
4592018-08-09 Tom Tromey <tom@tromey.com>
460
461 * riscv-tdep.h: Minor formatting fixes.
462
83c8d318
SM
4632018-08-09 Simon Marchi <simon.marchi@ericsson.com>
464
465 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
466 * dwarf-index-cache.c (create_dir_and_check): Likewise.
467 (test_mkdir_recursive): Likewise.
468 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
469
5ff2bbae
AB
4702018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
471
472 * valarith.c (value_subscripted_rvalue): If an array is not in
473 memory, and we don't know the upper bound, then we can't know that
474 the requested element exists or not.
475
fdbac7d8
SM
4762018-08-08 Simon Marchi <simon.marchi@ericsson.com>
477
478 * target.c (str_comma_list_concat_elem): Fix typo in comment.
479 (target_options_to_string): Add comment.
480
83202f7a
TT
4812018-08-08 Tom Tromey <tom@tromey.com>
482
483 * unittests/scoped_mmap-selftests.c: Check result of "write".
484
411baa47
JW
4852018-08-08 Jim Wilson <jimw@sifive.com>
486
5c720ed8
JW
487 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
488 (decode_register_index_short): New.
489 (decode_j_type_insn, decode_cj_type_insn): New.
490 (decode_b_type_insn, decode_cb_type_insn): New.
491 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
492 local xlen. Check xlen when decoding ambiguous compressed insns. In
493 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
494 is_c_sw_insn instead of is_sw_insn.
495 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
496 (riscv_software_single_step): New.
497 * riscv-tdep.h (riscv_software_single_step): Declare.
498
411baa47
JW
499 * riscv-tdep.c (riscv_isa_xlen): Drop static.
500 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
501
9d4a934c
AB
5022018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
503
504 PR gdb/18050:
505 * target.c (dispose_inferior): Don't dispose of inferiors that are
506 already killed.
507
ff36536c
SN
5082018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
509
510 * remote.c (remote_target::download_tracepoint): Change char* to
511 const char*.
512
09ce46f2
SM
5132018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
514
515 * target.h (target_options_to_string): Return an std::string.
516 * target.c (str_comma_list_concat_elem): Return void, use
517 std::string.
518 (do_option): Likewise.
519 (target_options_to_string): Return an std::string.
520 * linux-nat.c (linux_nat_target::wait): Adjust.
521 * target-debug.h (target_debug_print_options): Adjust.
522
9c612964
TT
5232018-08-07 Tom Tromey <tom@tromey.com>
524
525 * Makefile.in (CPPFLAGS): New variable.
526 (INTERNAL_CPPFLAGS): Use it.
527
7d11235d
SM
5282018-08-07 Simon Marchi <simon.marchi@ericsson.com>
529
530 * NEWS: Mention the index cache.
531
87d6a7aa
SM
5322018-08-07 Simon Marchi <simon.marchi@ericsson.com>
533
534 * common/pathstuff.h (get_standard_cache_dir): New.
535 * common/pathstuff.c (get_standard_cache_dir): New.
536 * build-id.h (build_id_to_string): New.
537 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
538 DEBUG_STR_SUFFIX): Move to here.
539 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
540 DEBUG_STR_SUFFIX): Move from there.
541 (write_psymtabs_to_index): Make non-static, add basename
542 parameter. Write to temporary files, rename when done.
543 (save_gdb_index_command): Adjust call to
544 write_psymtabs_to_index.
545 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
546 field.
547 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
548 (get_gdb_index_contents_from_cache): New.
549 (get_gdb_index_contents_from_cache_dwz): New.
550 (dwarf2_initialize_objfile): Read index from cache.
551 (dwarf2_build_psymtabs): Save to index.
552 * dwarf-index-cache.h: New file.
553 * dwarf-index-cache.c: New file.
554 * dwarf-index-write.h: New file.
555
8a99096f
SM
5562018-08-07 Simon Marchi <simon.marchi@ericsson.com>
557
558 * gnulib/aclocal.m4: Re-generate.
559 * gnulib/config.in: Re-generate.
560 * gnulib/configure: Re-generate.
561 * gnulib/import/Makefile.am: Re-generate.
562 * gnulib/import/Makefile.in: Re-generate.
563 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
564 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
565 * gnulib/import/m4/mkdir.m4: New file.
566 * gnulib/import/mkdir.c: New file.
567 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
568 module.
569
5c831bb1
SM
5702018-08-07 Simon Marchi <simon.marchi@ericsson.com>
571
572 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
573 * common/scoped_mmap.c: New file.
574 * common/scoped_mmap.h (destroy): New method.
575 (~scoped_mmap, reset): Use destroy.
576 (scoped_mmap): New move constructor.
577 (mmap_file): New declaration.
578 * unittests/scoped_mmap-selftests.c (test_normal,
579 test_invalid_filename, run_tests): New functions.
580 (_initialize_scoped_mmap_selftests): Register selftest.
581
4485a1c1
SM
5822018-08-07 Simon Marchi <simon.marchi@ericsson.com>
583
584 * dwarf2read.c (read_gdb_index_from_section): Rename to...
585 (read_gdb_index_from_buffer): ... this. Remove section
586 parameter, add buffer parameter.
587 (get_gdb_index_contents_ftype,
588 get_gdb_index_contents_dwz_ftype): New typedefs.
589 (dwarf2_read_gdb_index): Add callback parameters to get the
590 index contents.
591 (get_gdb_index_contents_from_section): New.
592 (dwarf2_initialize_objfile): Update call to
593 dwarf2_read_gdb_index.
594
528e1572
SM
5952018-08-07 Simon Marchi <simon.marchi@ericsson.com>
596
597 * common/filestuff.h (gdb_fopen_cloexec): New overload.
598 (gdb_open_cloexec): Likewise.
599 * nat/linux-osdata.c (command_from_pid): Use string_printf.
600 (commandline_from_pid): Likewise.
601 (linux_xfer_osdata_threads): Likewise.
602 (linux_xfer_osdata_fds): Likewise.
603 * ada-lang.c (is_package_name): Likewise.
604 * auxv.c (procfs_xfer_auxv): Likewise.
605 * breakpoint.c (print_one_breakpoint_location): Use
606 uiout::field_fmt.
607 (print_one_catch_solib): Use string_printf.
608 * coff-pe-read.c (add_pe_exported_sym): Likewise.
609 (add_pe_forwarded_sym): Likewise.
610 * dwarf2read.c (create_type_unit_group): Likewise.
611 (build_error_marker_type): Likewise.
612 * infcall.c (get_function_name): Likewise.
613 * valprint.c (print_converted_chars_to_obstack): Likewise.
614 * xtensa-tdep.c (xtensa_register_type): Likewise.
615
a7f25a84
SM
6162018-08-06 Simon Marchi <simon.marchi@ericsson.com>
617
618 * remote.c (remote_target::download_tracepoint): Fix format
619 string errors.
620
296956be
PFC
6212018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
622
623 * tracefile.c: Include common/byte-vector.h.
624 (trace_save): Change type of buf to gdb::byte_vector. Initialize
625 with trace_regblock_size if needed. Update uses of buf.
626
a04b9d62
PFC
6272018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
628
629 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
630 std::vector<unsigned char>.
631 * tracepoint.c (collection_list::collection_list): Remove
632 m_regs_mask initializer from initializer list. Resize
633 m_regs_mask using the largest remote register number.
634 (collection_list::add_remote_register): Remove size check on
635 m_regs_mask. Use at to access element.
636 (collection_list::stringify): Change type of temp_buf to
637 gdb::char_vector. Update uses of temp_buf. Resize if needed to
638 stringify the register mask. Use pack_hex_byte for the register
639 mask.
640
4277c4b8
PFC
6412018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
642
643 * tracepoint.h (class collection_list) <add_register>: Remove.
644 <add_remote_register, add_ax_registers, add_local_register>:
645 Declare.
646 <add_memrange>: Add scope parameter.
647 * tracepoint.c (encode_actions_1): Likewise.
648 (collection_list::add_register): Rename to ...
649 (collection_list::add_remote_register): ... this. Update
650 comment.
651 (collection_list::add_ax_registers, add_local_register): New
652 methods.
653 (collection_list::add_memrange): Add scope parameter. Call
654 add_local_register instead of add_register.
655 (finalize_tracepoint_aexpr): New function.
656 (collection_list::collect_symbol): Update calls to add_memrange.
657 Call add_local_register instead of add_register. Call
658 add_ax_registers. Call finalize_tracepoint_aexpr.
659 (encode_actions_1): Get remote regnos for $reg action. Call
660 add_remote_register, add_ax_registers, and add_local_register.
661 Update call to add_memrange. Call finalize_tracepoint_aexpr.
662 (validate_actionline): Call finalize_tracepoint_aexpr.
663
3df3a985
PFC
6642018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
665
666 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
667 Replace array buf with gdb::char_vector buf, of size
668 get_remote_packet_size (). Replace references to buf and
669 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
670 and xsnprintf with snprintf. Raise errors if the buffer is too
671 small.
672
aa6f3694
PFC
6732018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
674
675 * remote.c (remote_target::download_tracepoint): Fix the has_more
676 predicate in the QTDP action list iteration.
677
05abfc39
PFC
6782018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
679
680 * remote.c (remote_target::download_tracepoint): Fix indentation
681 in for block.
682
821a2682
RO
6832018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
684
685 * proc-api.c (_initialize_proc_api): Remove c, unused.
686 * procfs.c (procfs_init_inferior): Remove signals, unused.
687 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
688 unused.
689
95347337
AB
6902018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
691 Andrew Burgess <andrew.burgess@embecosm.com>
692
693 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
694 'W_STOPCODE (0)' as this could be ambiguous.
695
425699f5
SDJ
6962018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
697
698 * ser-tcp.c (net_open): Fix thinko when deciding whether to
699 disable TCP's Nagle algorithm (use "ai_protocol" instead of
700 "ai_socktype").
701
3e1d3d8c
TT
7022018-08-02 Tom Tromey <tom@tromey.com>
703
704 PR symtab/16842.
705 * dwarf2read.c (read_func_scope): Set symtab on template parameter
706 symbols.
707 (process_structure_scope): Likewise.
708
15843549
XR
7092018-08-02 Xavier Roirand <roirand@adacore.com>
710
711 PR gdb/22629:
712 * darwin-nat.c (darwin_kill_inferior): Fix handling of
713 kill inferior.
714
b5bddbbb
TT
7152018-08-02 Tom Tromey <tom@tromey.com>
716
717 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
718 (darwin_suspend_inferior, darwin_resume_inferior)
719 (darwin_decode_notify_message, darwin_resume_inferior_threads)
720 (darwin_check_new_threads): Check result of get_darwin_inferior.
721
f61cfa07
JB
7222018-07-31 Joel Brobecker <brobecker@adacore.com>
723
724 GDB 8.1.1 released.
725
5abe0f0c
JV
7262018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
727
728 * varobj.c (varobj_get_path_expr_parent): Report an error if
729 parent is a dynamic varobj.
730
472fa5ee
SM
7312018-07-31 Simon Marchi <simon.marchi@ericsson.com>
732
733 * gnulib/aclocal.m4: Re-generate.
734 * gnulib/config.in: Re-generate.
735 * gnulib/configure: Re-generate.
736 * gnulib/import/Makefile.in: Re-generate.
737 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
738 * gnulib/import/m4/onceonly.m4: Re-generate.
739
1c28969e
SM
7402018-07-31 Simon Marchi <simon.marchi@ericsson.com>
741
742 * target-descriptions.c (struct xml_test_tdesc): New.
743 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
744 (record_xml_tdesc): Update.
745 (maintenance_check_xml_descriptions): Update.
746 * target-descriptions.h (record_xml_tdesc): Update comment.
747
c8f2dc0d
AB
7482018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
749
750 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
751 checking array bounds are defined.
752
463c08d1
TT
7532018-07-30 Tom Tromey <tom@tromey.com>
754
755 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
756 irreflexivity violation.
757
dba7455e
TT
7582018-07-30 Tom Tromey <tom@tromey.com>
759
760 * cli/cli-decode.c (lookup_cmd): Remove lint code.
761 * value.c (unpack_long): Remove lint code.
762 * valops.c (value_ind): Remove lint code.
763 * valarith.c (value_x_binop, value_x_unop, value_equal)
764 (value_pos): Remove lint code.
765
37cc0cae
TV
7662018-07-28 Tom de Vries <tdevries@suse.de>
767
768 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
769 with undefined upper bound as <optimized out>.
770
129eb0f1
SDJ
7712018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
772
773 * gcore.in: Rename variable "name" to "prefix". Expand
774 "usage" text.
775
6af79d7b
JT
7762018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
777
778 * windows-nat.c (windows_nat_target::create_inferior): Update to
779 call close() in global namespace.
780
79748972
TT
7812018-07-26 Tom Tromey <tom@tromey.com>
782
783 * dwarf-index-write.c (add_address_entry): Don't add objfile
784 offsets.
785 * dbxread.c (find_stab_function): Rename from
786 find_stab_function_addr. Return a bound_minimal_symbol.
787 (read_dbx_symtab): Use raw_text_low, raw_text_high.
788 Don't add objfile offsets.
789 (end_psymtab): Use raw_text_low, raw_text_high,
790 MSYMBOL_VALUE_RAW_ADDRESS.
791 (read_ofile_symtab): Update.
792 (process_one_symbol): Update.
793 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
794 offsets.
795 (dw2_relocate): Remove.
796 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
797 searching addrmap.
798 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
799 Update.
800 (process_psymtab_comp_unit_reader, add_partial_symbol)
801 (add_partial_subprogram, dwarf2_ranges_read): Update.
802 (load_partial_dies): Update.
803 (add_address_entry): Don't add objfile offsets.
804 (dwarf2_build_include_psymtabs): Update.
805 (create_addrmap_from_aranges): Don't add objfile offsets.
806 (dw2_find_pc_sect_compunit_symtab): Update.
807 * mdebugread.c (parse_symbol): Don't add objfile offsets.
808 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
809 Update.
810 (parse_partial_symbols): Don't add objfile offsets. Use
811 raw_text_low, raw_text_high. Update.
812 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
813 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
814 or call 'relocate' quick function. Clear psymbol_map.
815 * psympriv.h (struct partial_symbol) <address>: Add section
816 offset.
817 <set_unrelocated_address>: Rename from set_address.
818 <raw_text_low, raw_text_high>: New methods.
819 <text_low, text_high>: Add objfile parameter.
820 (add_psymbol_to_bcache): Add 'section' parameter. Call
821 set_unrelocated_address.
822 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
823 (find_pc_psymbol): Update.
824 (fixup_psymbol_section, relocate_psymtabs): Remove.
825 (dump_psymtab, psym_functions): Update.
826 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
827 parameter.
828 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
829 (start_psymtab_common): Update.
830 * symfile-debug.c (debug_qf_relocate): Remove.
831 (debug_sym_quick_functions): Update.
832 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
833 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
834 Update.
835
52948f01
TT
8362018-07-26 Tom Tromey <tromey@redhat.com>
837
838 * dbxread.c (end_psymtab): Use text_high_valid and
839 text_low_valid.
840 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
841 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
842 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
843 Update comment.
844 <text_low_valid, text_high_valid>: New fields.
845 <set_text_low, set_text_high>: Update.
846 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
847
4ae976d1
TT
8482018-07-26 Tom Tromey <tom@tromey.com>
849
850 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
851 Update.
852 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
853 textlow and texthigh fields.
854 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
855 Update.
856 * mdebugread.c (parse_lines, parse_partial_symbols)
857 (psymtab_to_symtab_1): Update.
858 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
859 Rename fields. Update comment. Now private.
860 <text_low, text_high, set_text_low, set_text_high>: New methods.
861 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
862 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
863 (start_psymtab_common, maintenance_info_psymtabs)
864 (maintenance_check_psymtabs): Update.
865 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
866 texthigh fields.
867 (scan_xcoff_symtab): Update.
868
02e9e7f7
TT
8692018-07-26 Tom Tromey <tromey@redhat.com>
870
871 * psympriv.h (struct partial_symbol) <unrelocated_address,
872 address, set_address>: New methods.
873 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
874 (fixup_psymbol_section, relocate_psymtabs): Update.
875 (print_partial_symbols): Add 'objfile' parameter. Update.
876 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
877 Update.
878
8a6d4234
TT
8792018-07-26 Tom Tromey <tom@tromey.com>
880
881 * dwarf-index-write.c (write_psymbols, debug_names::insert)
882 (debug_names::write_psymbols): Update.
883 * psympriv.h (struct partial_symbol): Derive from
884 general_symbol_info.
885 <obj_section>: New method.
886 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
887 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
888 (find_pc_sect_psymbol, fixup_psymbol_section)
889 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
890 (print_partial_symbols, recursively_search_psymtabs)
891 (compare_psymbols, psymbol_hash, psymbol_compare)
892 (add_psymbol_to_bcache, maintenance_check_psymtabs)
893 (psymbol_name_matches, psym_fill_psymbol_map): Update.
894
08994e1d
TT
8952018-07-26 Tom Tromey <tromey@redhat.com>
896
897 * dbxread.c (end_psymtab): Remove dead code.
898
3c3bb058
AB
8992018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
900
901 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
902 DWARF unwinders are disabled.
903 * dwarf2-frame.c: Add dwarf2read.h include.
904 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
905 disabled.
906 (dwarf2_frame_unwinders_enabled_p): Define.
907 (show_dwarf_unwinders_enabled_p): New function.
908 (_initialize_dwarf2_frame): Register switch to control DWARF
909 unwinder use.
910 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
911 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
912 (show_dwarf_cmdlist): Remove static keyword.
913 * dwarf2read.h (set_dwarf_cmdlist): Declare.
914 (show_dwarf_cmdlist): Declare.
915 * NEWS: Document new feature.
916
9e7f3bbb
TV
9172018-07-26 Tom de Vries <tdevries@suse.de>
918
919 PR breakpoints/23366
920 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
921
506f5c41
TV
9222018-07-26 Tom de Vries <tdevries@suse.de>
923
924 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
925 DW_AT_count can't be translated to a dynamic prop.
926
16f808ec
TV
9272018-07-25 Tom de Vries <tdevries@suse.de>
928
929 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
930 try/catch.
931
d7154a8d
JV
9322018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
933
934 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
935
a45389f6
JB
9362018-07-25 Joel Brobecker <brobecker@adacore.com>
937
938 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
939
380618d6
KS
9402018-07-24 Keith Seitz <keiths@redhat.comt
941
942 PR symtab/23010
943 * dwarf2read.c (dw2_add_symbol_to_list): New function.
944 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
945 instead of add_symbol_to_list.
946 (read_file_scope): Call prepare_one_comp_unit before reading
947 any other DIEs.
948
4b17aefe
SM
9492018-07-24 Simon Marchi <simon.marchi@ericsson.com>
950
951 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
952
29d17e47
TT
9532018-07-24 Tom Tromey <tom@tromey.com>
954
955 * utils.c (malloc, realloc, free): Don't declare.
956 * configure, config.in: Rebuild.
957 * configure.ac: Don't check for declarations of free, malloc, or
958 realloc.
959
cf4088a9
SM
9602018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
961
962 * aarch64-linux-nat.c
963 (aarch64_linux_nat_target::stopped_data_address): Remove unused
964 variable.
965 * arm-linux-nat.c (fetch_regs): Likewise.
966 (store_regs): Likewise.
967 (fetch_vfp_regs): Likewise.
968 (store_vfp_regs): Likewise.
969 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
970 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
971 (arm_linux_nat_target::insert_watchpoint): Likewise.
972 (arm_linux_nat_target::remove_watchpoint): Likewise.
973 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
974 Likewise.
975 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
976 Likewise.
977 * ppc-linux-nat.c (fetch_register): Likewise.
978 (fetch_all_gp_regs): Likewise.
979 (fetch_ppc_registers): Likewise.
980 (store_all_gp_regs): Likewise.
981 (store_ppc_registers): Likewise.
982 (hwdebug_insert_point): Likewise.
983 (can_use_watchpoint_cond_accel): Likewise.
984 * remote-sim.c (gdb_os_write_stdout): Likewise.
985
a0de763e
TT
9862018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
987 Tom Tromey <tom@tromey.com>
988
989 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
990 test for it.
991 * configure: Rebuild.
992
3b20124b
TT
9932018-07-22 Tom Tromey <tom@tromey.com>
994
995 * regformats/regdat.sh: Define xmltarget_${name} inside
996 #ifndef IN_PROCESS_AGENT.
997
8c8807f4
TT
9982018-07-22 Tom Tromey <tom@tromey.com>
999
1000 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1001
c486b610
TT
10022018-07-22 Tom Tromey <tom@tromey.com>
1003
1004 * symfile.c (reread_symbols): Notify iter, not objfile.
1005
494f80a9
TT
10062018-07-22 Tom Tromey <tom@tromey.com>
1007
1008 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1009 Use arch_ops.
1010 (ravenscar_thread_target::prepare_to_store): Likewise.
1011
c51f6a54
TT
10122018-07-22 Tom Tromey <tom@tromey.com>
1013
1014 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1015 unused variable. Call value_fetch_lazy when needed.
1016 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1017 Remove unused variable. Call value_fetch_lazy when needed.
1018
374fd1fd
TT
10192018-07-22 Tom Tromey <tom@tromey.com>
1020
1021 * m32c-tdep.c (mark_dma): Return void.
1022 (make_regs): Remove unused declarations.
1023
d5e9a511
TT
10242018-07-22 Tom Tromey <tom@tromey.com>
1025
1026 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1027 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1028 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1029 bkscm_get_valid_block_smob_arg_unsafe for effect.
1030
996d693a
TT
10312018-07-22 Tom Tromey <tom@tromey.com>
1032
1033 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1034 value_type.
1035
15766370
TT
10362018-07-22 Tom Tromey <tom@tromey.com>
1037
1038 * windows-nat.c (saved_context): Conditionally define.
1039 * remote.c (remote_target::remote_btrace_maybe_reopen):
1040 Conditionally declare "warned".
1041 * inflow.c (sigquit_ours): Conditionally define.
1042 (new_tty): Move "tty" declaration inside #if.
1043 * guile/guile.c (guile_datadir): Conditionally define.
1044 * charset.c (set_be_le_names): Move some declarations inside #if.
1045 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1046 #if.
1047 (parse_xml_btrace_conf): Likewise.
1048
f4e80e13
TT
10492018-07-22 Tom Tromey <tom@tromey.com>
1050
1051 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1052
8d49165d
TT
10532018-07-22 Tom Tromey <tom@tromey.com>
1054
1055 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1056 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1057 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1058 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1059 * stack.c (frame_apply_level_command): Remove unused variable.
1060 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1061 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1062 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1063 unused variable.
1064 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1065 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1066 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1067 variable.
1068 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1069 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1070 variable.
1071 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1072 Remove unused variable.
1073 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1074 variable.
1075 * common/tdesc.c (print_xml_feature::visit): Remove unused
1076 variable.
1077 * compile/compile-object-load.c (store_regs): Remove unused
1078 variables.
1079 * complaints.c (clear_complaints): Remove unused variable.
1080 * corelow.c (core_target_open): Remove unused variable.
1081 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1082 variable.
1083 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1084 variable.
1085 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1086 variable.
1087 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1088 variable.
1089 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1090 variable.
1091 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1092 variable.
1093 * ia64-tdep.c (examine_prologue): Remove unused variable.
1094 * infcall.c (run_inferior_call): Remove unused variable.
1095 * inferior.c (exit_inferior): Remove unused variable.
1096 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1097 * linespec.c (decode_line_2): Remove unused variable.
1098 * linux-nat.c (super_close): Remove.
1099 * linux-tdep.c (linux_info_proc): Remove unused variable.
1100 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1101 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1102 Remove unused variable.
1103 * parse.c (find_minsym_type_and_address): Remove unused variable.
1104 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1105 variable.
1106 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1107 variable.
1108 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1109 variables.
1110 * record-btrace.c (record_btrace_target::store_registers): Remove
1111 unused variable.
1112 (cmd_show_record_btrace_cpu): Remove unused variable.
1113 * riscv-tdep.c (riscv_register_reggroup_p)
1114 (riscv_push_dummy_call, riscv_return_value): Remove unused
1115 variable.
1116 * rust-exp.y (literal): Remove unused variable.
1117 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1118 unused variable.
1119 <STRUCTOP_ANONYMOUS>: Likewise.
1120 * s390-linux-tdep.c (s390_linux_init_abi_31)
1121 (s390_linux_init_abi_64): Remove unused variable.
1122 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1123 (file_select_thread, net_windows_open, _initialize_ser_windows):
1124 Remove unused variables.
1125 * symtab.c (find_pc_sect_line): Remove unused variable.
1126 * target-memory.c (compute_garbled_blocks): Remove unused
1127 variable.
1128 (target_write_memory_blocks): Remove unused variable.
1129 * target.c (target_stack::unpush): Remove unused variables.
1130 * tracepoint.c (start_tracing, all_tracepoint_actions)
1131 (merge_uploaded_trace_state_variables)
1132 (print_one_static_tracepoint_marker): Remove unused variable.
1133 * unittests/basic_string_view/element_access/char/1.cc (test01):
1134 Remove unused variable.
1135 * windows-nat.c (windows_continue, windows_add_all_dlls)
1136 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1137 Remove unused variables.
1138
17cbafdb
SM
11392018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1140
1141 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1142 attr_profile in HAVE_ELF.
1143 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1144 HAVE_ELF.
1145
0ee6c332
SM
11462018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1147
1148 * frame.c (frame_register_unwind): Change parameter name.
1149 (frame_unwind_register): Likewise.
1150 (frame_unwind_register_value): Likewise.
1151 (frame_unwind_register_signed): Likewise.
1152 (frame_unwind_register_unsigned): Likewise.
1153 * frame.h (frame_register_unwind): Likewise.
1154 (frame_unwind_register): Likewise.
1155 (frame_unwind_register_value): Likewise.
1156 (frame_unwind_register_signed): Likewise.
1157 (frame_unwind_register_unsigned): Likewise.
1158 (frame_unwind_arch): Likewise.
1159
e2e31f10
MR
11602018-07-20 Maciej W. Rozycki <macro@mips.com>
1161
1162 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1163 ISA maintenance.
1164
2d389915
MR
11652018-07-20 Maciej W. Rozycki <macro@mips.com>
1166
1167 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1168 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1169 hand.
1170
cbb09508
KS
11712018-07-20 Keith Seitz <keiths@redhat.com>
1172
1173 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1174 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1175 m_compunit_symtab, m_language>: Add "m_" prefix.
1176 Update all uses.
1177 * buildsym.c: Update all uses.
1178
bfe2e011
TT
11792018-07-20 Tom Tromey <tom@tromey.com>
1180
1181 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1182 * buildsym.h (record_line_ftype): Remove typedef.
1183
0e6f3061
TT
11842018-07-20 Tom Tromey <tom@tromey.com>
1185
1186 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1187 (end_expandable_symtab): Likewise.
1188 (end_symtab_get_static_block): Likewise.
1189 (end_symtab_from_static_block): Likewise.
1190 * buildsym-legacy.c (augment_type_symtab): Remove.
1191 (end_expandable_symtab): Remove.
1192 (end_symtab_get_static_block): Remove.
1193 (end_symtab_from_static_block): Remove.
1194
804d2729
TT
11952018-07-20 Tom Tromey <tom@tromey.com>
1196
1197 * dwarf2read.c: Include buildsym.h.
1198 (struct dwarf2_cu) <builder>: New method.
1199 (fixup_go_packaging): Update.
1200 (process_full_comp_unit, process_full_type_unit): Update. Don't
1201 use scoped_free_pendings.
1202 (using_directives): Add "cu" parameter, remove "language".
1203 (read_import_statement, setup_type_unit_groups, )
1204 (read_func_scope, read_lexical_block_scope)
1205 (dwarf2_record_block_ranges, read_namespace): Update.
1206 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1207 (lnp_state_machine::handle_end_sequence): Update.
1208 (class lnp_state_machine) <m_cu>: New member.
1209 <m_record_line_callback>: Remove.
1210 <m_currently_recording_lines>: New member.
1211 (lnp_state_machine::handle_set_file): Update.
1212 (noop_record_line): Remove.
1213 (dwarf_record_line_p): Add cu parameter.
1214 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1215 (lnp_state_machine::record_line)
1216 (lnp_state_machine::lnp_state_machine)
1217 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1218 (dwarf_decode_lines): Update.
1219 (dwarf2_start_subfile): Add cu parameter.
1220 (dwarf2_start_symtab, new_symbol): Update.
1221 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1222 Remove dwarf2_per_objfile parameter.
1223 (dwarf_decode_macros): Update.
1224
80e649fc
TT
12252018-07-20 Tom Tromey <tom@tromey.com>
1226
1227 * stabsread.c (define_symbol): Update.
1228 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1229 * dwarf2read.c (new_symbol): Update.
1230 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1231 * cp-namespace.c: Include buildsym.h.
1232 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1233 * buildsym-legacy.c (get_buildsym_compunit): New function.
1234
0baae8db
TT
12352018-07-20 Tom Tromey <tom@tromey.com>
1236
1237 * xcoffread.c: Include buildsym-legacy.h.
1238 * windows-nat.c: Include buildsym-legacy.h.
1239 * stabsread.c: Include buildsym-legacy.h.
1240 * mdebugread.c: Include buildsym-legacy.h.
1241 * buildsym-legacy.h: New file.
1242 * buildsym-legacy.c: New file, from buildsym.c.
1243 * go32-nat.c: Include buildsym-legacy.h.
1244 * dwarf2read.c: Include buildsym-legacy.h.
1245 * dbxread.c: Include buildsym-legacy.h.
1246 * cp-namespace.c: Include buildsym-legacy.h.
1247 * coffread.c: Include buildsym-legacy.h.
1248 * buildsym.h: Move some contents to buildsym-legacy.h.
1249 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1250 buildsym-legacy.c.
1251 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1252
ab209f6f
TT
12532018-07-20 Tom Tromey <tom@tromey.com>
1254
1255 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1256 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1257 (buildsym_compunit::buildsym_compunit)
1258 (buildsym_compunit::~buildsym_compunit)
1259 (buildsym_compunit::get_macro_table): Define.
1260
74c72eac
TT
12612018-07-20 Tom Tromey <tom@tromey.com>
1262
1263 * buildsym.c (reset_symtab_globals): Remove.
1264 (buildsym_compunit::end_symtab_from_static_block): Update.
1265 (buildsym_compunit::augment_type_symtab): Update.
1266 (end_symtab_from_static_block): Call free_buildsym_compunit.
1267 (augment_type_symtab, end_symtab, end_expandable_symtab):
1268 Likewise.
1269
da6580e5
TT
12702018-07-20 Tom Tromey <tom@tromey.com>
1271
1272 * arch-utils.c: Do not include buildsym.h.
1273 * mipsread.c: Do not include buildsym.h.
1274 * machoread.c: Do not include buildsym.h.
1275 * elfread.c: Do not include buildsym.h.
1276
4a2125f5
TT
12772018-07-20 Tom Tromey <tom@tromey.com>
1278
1279 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1280 initialization.
1281 (buildsym_compunit): Add new constructor.
1282 (struct buildsym_compunit) <get_last_source_file, finish_block,
1283 record_block_range, start_subfile, patch_subfile_names,
1284 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1285 set_last_source_start_addr, get_last_source_start_addr,
1286 get_local_using_directives, set_local_using_directives,
1287 get_global_using_directives, outermost_context_p,
1288 get_current_context_stack, get_context_stack_depth,
1289 get_current_subfile, get_local_symbols, get_file_symbols,
1290 get_global_symbols, record_debugformat, record_producer,
1291 push_context, pop_context, end_symtab_get_static_block,
1292 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1293 New public methods.
1294 <record_pending_block, finish_block_internal, make_blockvector,
1295 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1296 private methods.
1297 Update all users.
1298
12992018-05-22 Tom Tromey <tom@tromey.com>
1300
1301 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1302 parameter.
1303 (finish_block_internal): Update.
1304
6b213a47
TT
13052018-07-20 Tom Tromey <tom@tromey.com>
1306
1307 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1308 parameter.
1309 (finish_block_internal): Update.
1310
b80a981d
TT
13112018-07-20 Tom Tromey <tom@tromey.com>
1312
1313 * buildsym.h (EXTERN): Don't define or undef.
1314 * buildsym.c (EXTERN): Don't define.
1315
ddb70602
TT
13162018-07-20 Tom Tromey <tom@tromey.com>
1317
1318 * buildsym.c: Remove TODO comment.
1319
b37dd3bc
TT
13202018-07-20 Tom Tromey <tom@tromey.com>
1321
1322 * coffread.c (coff_symtab_read): Update.
1323 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1324 (xcoff_new_init): Update.
1325 * mipsread.c (mipscoff_new_init): Update.
1326 * mdebugread.c (mdebug_build_psymtabs): Update.
1327 * elfread.c (elf_new_init): Update.
1328 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1329 Update.
1330 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1331 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1332 (stabsect_build_psymtabs): Update.
1333 * buildsym.h (buildsym_init): Don't declare.
1334 * buildsym.c: Update comment.
1335 (prepare_for_building): Remove.
1336 (start_symtab, restart_symtab): Update.
1337 (reset_symtab_globals): Update comment.
1338 (buildsym_init): Remove.
1339
e148f09d
TT
13402018-07-20 Tom Tromey <tom@tromey.com>
1341
1342 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1343 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1344 (read_enum_type, common_block_start, common_block_end)
1345 (cleanup_undefined_types_1, finish_global_stabs): Update.
1346 * mdebugread.c (psymtab_to_symtab_1): Update.
1347 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1348 (read_lexical_block_scope, new_symbol): Update.
1349 * dbxread.c (process_one_symbol): Update.
1350 * coffread.c (coff_symtab_read, process_coff_symbol)
1351 (coff_read_enum_type): Update.
1352 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1353 declare.
1354 (get_local_symbols, get_file_symbols, get_global_symbols): New
1355 functions.
1356 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1357 m_global_symbols.
1358 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1359 (~scoped_free_pendings): Update.
1360 (finish_block, prepare_for_building, reset_symtab_globals)
1361 (end_symtab_get_static_block, end_symtab_with_blockvector)
1362 (augment_type_symtab, push_context): Update.
1363 (get_local_symbols, get_file_symbols, get_global_symbols): New
1364 functions.
1365 (buildsym_init): Update.
1366
93b8bea4
TT
13672018-07-20 Tom Tromey <tom@tromey.com>
1368
1369 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1370 (process_full_type_unit): Likewise.
1371 (dwarf2_start_symtab): Set list_in_scope.
1372
f62f6af5
TT
13732018-07-20 Tom Tromey <tom@tromey.com>
1374
1375 * dwarf2read.c (process_psymtab_comp_unit_reader)
1376 (build_type_psymtabs_reader): Do not set list_in_scope.
1377
1d376700
TT
13782018-07-20 Tom Tromey <tom@tromey.com>
1379
1380 * buildsym.c (free_pendings): Remove.
1381 (add_symbol_to_list, scoped_free_pendings)
1382 (finish_block_internal, buildsym_init): Update.
1383
c233e9c6
TT
13842018-07-20 Tom Tromey <tom@tromey.com>
1385
1386 * xcoffread.c (read_xcoff_symtab): Update.
1387 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1388 Update.
1389 * dbxread.c (process_one_symbol): Update.
1390 * coffread.c (coff_symtab_read): Update.
1391 * buildsym.h (finish_block): Update.
1392 * buildsym.c (finish_block): Remove "listhead" argument.
1393 (end_symtab_get_static_block): Update.
1394
5ac04550
TT
13952018-07-20 Tom Tromey <tom@tromey.com>
1396
1397 * buildsym.h (class scoped_free_pendings): Remove constructor.
1398 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1399 method.
1400 <m_pending_block_obstack, m_pending_blocks>: New members.
1401 (pending_block_obstack, pending_blocks): Remove.
1402 (scoped_free_pendings::scoped_free_pendings): Default.
1403 (~scoped_free_pendings): Update.
1404 (free_pending_blocks): Remove.
1405 (finish_block_internal, record_pending_block, make_blockvector)
1406 (end_symtab_get_static_block, augment_type_symtab, push_context)
1407 (buildsym_init): Update.
1408
7ea05a7b
TT
14092018-07-20 Tom Tromey <tom@tromey.com>
1410
1411 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1412 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1413 members.
1414 (pending_addrmap, pending_addrmap_obstack)
1415 (pending_addrmap_interesting): Remove.
1416 (scoped_free_pendings, record_block_range, make_blockvector)
1417 (prepare_for_building, reset_symtab_globals, buildsym_init):
1418 Update.
1419
3c65e5b3
TT
14202018-07-20 Tom Tromey <tom@tromey.com>
1421
1422 * xcoffread.c (process_linenos): Update.
1423 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1424 * mdebugread.c (psymtab_to_symtab_1): Update.
1425 * dwarf2read.c (setup_type_unit_groups)
1426 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1427 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1428 * dbxread.c (process_one_symbol): Update.
1429 * coffread.c (coff_symtab_read, enter_linenos)
1430 (process_coff_symbol): Update.
1431 * buildsym.h (current_subfile): Don't declare.
1432 (get_current_subfile): Declare.
1433 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1434 member.
1435 (start_subfile, free_buildsym_compunit, push_subfile)
1436 (prepare_for_building, start_symtab): Update.
1437 (get_current_subfile): New function.
1438
a60f3166
TT
14392018-07-20 Tom Tromey <tom@tromey.com>
1440
1441 * coffread.c (coff_symtab_read): Update.
1442 * xcoffread.c (read_xcoff_symtab): Update.
1443 * dwarf2read.c (new_symbol): Update.
1444 (read_func_scope, read_lexical_block_scope): Update.
1445 * dbxread.c (process_one_symbol): Update.
1446 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1447 (outermost_context_p): Remove macro.
1448 (outermost_context_p, get_current_context_stack)
1449 (get_context_stack_depth): Declare.
1450 (pop_context): Return struct context_stack.
1451 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1452 member.
1453 (context_stack_size): Remove.
1454 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1455 (prepare_for_building, end_symtab_get_static_block)
1456 (augment_type_symtab, push_context): Update.
1457 (pop_context): Return struct context_stack.
1458 (outermost_context_p, get_current_context_stack)
1459 (get_context_stack_depth): New functions.
1460 (buildsym_init): Update.
1461
56ba65a0
TT
14622018-07-20 Tom Tromey <tom@tromey.com>
1463
1464 * rust-exp.y: Now a pure parser. Update all rules.
1465 (%union): Move earlier.
1466 (current_parser, work_obstack): Remove globals.
1467 (rust_parser, ~rust_parser): Update.
1468 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1469 lex_character, lex_number, lex_string, lex_identifier,
1470 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1471 convert_name, convert_params_to_expression,
1472 convert_ast_to_expression, ast_basic_type, ast_operation,
1473 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1474 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1475 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1476 ast_array_type, ast_slice_type, ast_reference_type,
1477 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1478 (rust_parse): Update.
1479 (rustyyerror, rustyylex): Add parser parameter.
1480 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1481 (rust_lex_stringish_test, rust_lex_test_sequence)
1482 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1483 (rust_lex_test_push_back, rust_lex_tests): Update.
1484
4c693332
PA
14852018-07-19 Pedro Alves <palves@redhat.com>
1486
1487 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1488 gdb::unique_xmalloc_ptr.
1489 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1490 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1491 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1492 copy-initialization.
1493 * guile/scm-pretty-print.c (ppscm_print_children): Use
1494 gdb::unique_xmalloc_ptr instead of cleanups.
1495 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1496 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1497 gdb::unique_xmalloc_ptr.
1498 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1499 Adjust to use gdb::unique_xmalloc_ptr.
1500 * guile/scm-utils.c (extract_arg): Adjust.
1501 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1502 gdb::unique_xmalloc_ptr instead of a cleanup.
1503
4581dc82
TT
15042018-07-19 Tom Tromey <tom@tromey.com>
1505
1506 * utils.c (do_value_free_to_mark)
1507 (make_cleanup_value_free_to_mark): Remove.
1508 * utils.h (make_cleanup_value_free_to_mark): Remove.
1509
43cc6c3a
PA
15102018-07-19 Pedro Alves <palves@redhat.com>
1511
1512 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1513 forwarding reference.
1514
3a5f2a48
PA
15152018-07-18 Pedro Alves <palves@redhat.com>
1516
1517 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1518 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1519 cleanup.
1520
557e56be
PA
15212018-07-18 Pedro Alves <palves@redhat.com>
1522
1523 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1524 exceptions.
1525 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1526 (gdbscm_wrap): New.
1527 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1528 directly instead of a cleanup.
1529 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1530 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1531 (vlscm_binop_gdbthrow): New, factored out from ...
1532 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1533 (vlscm_rich_compare): Use gdbscm_wrap.
1534 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1535 instead of a cleanup.
1536 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1537 cleanup.
1538 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1539 Use xfree directly instead of a cleanup.
1540 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1541 Adjust to use gdbscm_wrap and scoped_value_mark.
1542 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1543 (gdbscm_value_address, gdbscm_value_dereference)
1544 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1545 scoped_value_mark.
1546 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1547 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1548 scoped_value_mark.
1549 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1550 gdbscm_wrap and scoped_value_mark.
1551 (gdbscm_value_to_string): Use xfree directly instead of a
1552 cleanup. Move 'buffer' unique_ptr to TRY scope.
1553 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1554 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1555 scoped_value_mark.
1556 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1557 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1558 scoped_value_mark.
1559 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1560 gdbscm_wrap.
1561
42dc7699
TV
15622018-07-18 Tom de Vries <tdevries@suse.de>
1563
1564 * findvar.c (default_read_var_value): Also resolve dynamic type for
1565 LOC_OPTIMIZED_OUT vars.
1566
6592ceed
MR
15672018-07-18 Maciej W. Rozycki <macro@mips.com>
1568
1569 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1570 decoding.
1571
c6c6149a
TT
15722018-07-17 Tom Tromey <tom@tromey.com>
1573
1574 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1575 (compute_enum_list, pascm_set_param_value_x)
1576 (gdbscm_parameter_value): Update.
1577 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1578 (gdbscm_scm_to_host_string): Update.
1579 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1580 Update.
1581 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1582 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1583 * guile/scm-string.c (gdbscm_scm_to_string): Return
1584 unique_xmalloc_ptr.
1585 (gdbscm_scm_to_host_string): Likewise.
1586
a1a31cb8
TT
15872018-07-17 Tom Tromey <tom@tromey.com>
1588
1589 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1590 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1591 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1592 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1593 unique_xmalloc_ptr.
1594
15bf3002
TT
15952018-07-17 Tom Tromey <tom@tromey.com>
1596
1597 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1598 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1599 Update.
1600 * guile/scm-cmd.c (cmdscm_function): Update.
1601 * guile/scm-pretty-print.c
1602 (ppscm_print_exception_unless_memory_error): Update.
1603 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1604 Return unique_xmalloc_ptr.
1605
7eb1a66c
TT
16062018-07-17 Tom Tromey <tom@tromey.com>
1607
1608 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1609 Use string_printf.
1610
ce73f310
JW
16112018-07-17 Jim Wilson <jimw@sifive.com>
1612
27724bad
JW
1613 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1614 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1615 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1616 unecessary braces after EF_RISCV_RVC test. Delete call to
1617 set_gdbarch_decr_pc_after_break.
1618
ce73f310
JW
1619 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1620 RISCV_LAST_FP_REGNUM + 1.
1621 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1622
056dec39
TT
16232018-07-17 Tom Tromey <tom@tromey.com>
1624
1625 * configure.ac: Remove --disable-gdbcli.
1626 * configure: Rebuild.
1627 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1628 (SUBDIR_CLI_CFLAGS): Remove.
1629 (SFILES): Use SUBDIR_CLI_SRCS.
1630 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1631
4735f0ed
TT
16322018-07-17 Tom Tromey <tom@tromey.com>
1633
1634 PR gdb/18624:
1635 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1636
117a0e99
JW
16372018-07-16 Jim Wilson <jimw@sifive.com>
1638
1639 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1640
8a67aaa8
SM
16412018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1642
1643 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1644 variable.
1645 (libunwind_frame_sniffer): Likewise.
1646 (libunwind_frame_prev_register): Likewise.
1647 (libunwind_sigtramp_frame_sniffer): Likewise.
1648 * ia64-tdep.c (ia64_access_reg): Likewise.
1649 (ia64_access_rse_reg): Likewise.
1650 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1651 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1652
ec74dcd8
SM
16532018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1654
1655 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1656
a700e753
SM
16572018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1658
1659 * remote-sim.c (gdbsim_target::close,
1660 gdbsim_target::mourn_inferior): Remove unused variables.
1661
8b411ff8
SM
16622018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1663
1664 * ia64-tdep.c (ktab_buf): New global.
1665 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1666 (get_kernel_table): Adjust.
1667
edb0470b
TT
16682018-07-16 Tom Tromey <tom@tromey.com>
1669
1670 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1671 * dwarf2read.c (using_directives, new_symbol): Use
1672 outermost_context_p.
1673 * dbxread.c (process_one_symbol): Use outermost_context_p.
1674 * coffread.c (coff_symtab_read): Use outermost_context_p.
1675
6cccc9a8
TT
16762018-07-16 Tom Tromey <tom@tromey.com>
1677
1678 * dwarf2read.c (using_directives, read_func_scope)
1679 (read_lexical_block_scope): Update.
1680 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1681 * buildsym.h (local_using_directives, global_using_directives):
1682 Don't declare.
1683 (get_local_using_directives, set_local_using_directives)
1684 (get_global_using_directives): Declare.
1685 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1686 m_global_using_directives>: New members.
1687 (finish_block_internal, prepare_for_building)
1688 (reset_symtab_globals, end_symtab_get_static_block)
1689 (push_context): Update.
1690 (get_local_using_directives, set_local_using_directives)
1691 (get_global_using_directives): New functions.
1692 (buildsym_init): Update.
1693
652788a7
TT
16942018-07-16 Tom Tromey <tom@tromey.com>
1695
1696 * xcoffread.c (xcoff_initial_scan): Don't call
1697 free_pending_blocks.
1698 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1699 * buildsym.h (class scoped_free_pendings): Add constructor.
1700 (free_pending_blocks): Don't declare.
1701 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1702 (free_pending_blocks): Now static.
1703
8419ee53
TT
17042018-07-16 Tom Tromey <tom@tromey.com>
1705
1706 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1707 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1708 member.
1709 (struct subfile_stack): Remove.
1710 (subfile_stack): Remove.
1711 (push_subfile, pop_subfile, buildsym_init): Update.
1712
ccdac490
TT
17132018-07-16 Tom Tromey <tom@tromey.com>
1714
1715 * buildsym.c (push_subfile): Use gdb_assert.
1716 (pop_subfile): Use gdb_assert.
1717
43130d6f
TT
17182018-07-16 Tom Tromey <tom@tromey.com>
1719
1720 * buildsym.h (merge_symbol_lists): Remove.
1721 * buildsym.c (merge_symbol_lists): Remove.
1722
77d6f1aa
TT
17232018-07-16 Tom Tromey <tom@tromey.com>
1724
1725 * stabsread.c (scan_file_globals): Update comment.
1726 * stabsread.h (scan_file_globals): Move from buildsym.h.
1727 * buildsym.h (scan_file_globals): Move to stabsread.h.
1728
2c722d18
TT
17292018-07-16 Tom Tromey <tom@tromey.com>
1730
1731 * xcoffread.c (xcoff_new_init): Update.
1732 * mipsread.c (mipscoff_new_init): Update.
1733 * mdebugread.c (mdebug_build_psymtabs): Update.
1734 * elfread.c (elf_new_init): Update.
1735 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1736 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1737 * buildsym.h (buildsym_new_init): Don't declare.
1738 * buildsym.c (buildsym_new_init): Remove.
1739
5985ac61
TT
17402018-07-16 Tom Tromey <tom@tromey.com>
1741
1742 * stabsread.h (within_function): Move from buildsym.h.
1743 * stabsread.c (start_stabs): Clear within_function.
1744 * coffread.c (coff_start_symtab): Clear within_function.
1745 * buildsym.h (within_function): Move to stabsread.h.
1746 * buildsym.c (prepare_for_building): Update.
1747
6b84eeb2
TT
17482018-07-16 Tom Tromey <tom@tromey.com>
1749
1750 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1751 * dwarf2read.c (dwarf2_start_symtab): Don't set
1752 processing_gcc_compilation.
1753 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1754
2150c3ef
TT
17552018-07-16 Tom Tromey <tom@tromey.com>
1756
1757 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1758 (next_symbol_text_func): Move from buildsym.h.
1759 * stabsread.c (hashname): Move from buildsym.c.
1760 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1761 (next_symbol_text_func, hashname): Move to stabsread.h.
1762 * buildsym.c: Don't include bcache.h
1763 (hashname): Move to stasbread.c.
1764
0ec44fc0
TT
17652018-07-16 Tom Tromey <tom@tromey.com>
1766
1767 * buildsym.h (context_stack_size): Don't declare.
1768 * buildsym.c (context_stack_size): New global.
1769
81cc346d
TT
17702018-07-16 Tom Tromey <tom@tromey.com>
1771
1772 * dbxread.c (processing_acc_compilation): New global.
1773 * buildsym.h (processing_acc_compilation): Don't declare.
1774
2c99ee5c
TT
17752018-07-16 Tom Tromey <tom@tromey.com>
1776
1777 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1778 * dbxread.c (read_ofile_symtab): Update.
1779 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1780 * buildsym.h (last_source_start_addr): Remove.
1781 (set_last_source_start_addr, get_last_source_start_addr):
1782 Declare.
1783 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1784 parameter.
1785 (struct buildsym_compunit) <m_last_source_start_addr>: New
1786 member.
1787 (prepare_for_building): Remove start_addr parameter.
1788 (start_symtab, restart_symtab, end_symtab_get_static_block)
1789 (end_symtab_with_blockvector): Update.
1790 (set_last_source_start_addr, get_last_source_start_addr): New
1791 functions.
1792
530fedbc
TT
17932018-07-16 Tom Tromey <tom@tromey.com>
1794
1795 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1796 member.
1797 (have_line_numbers): Remove.
1798 (record_line, prepare_for_building, end_symtab_get_static_block)
1799 (augment_type_symtab): Update.
1800
6a976300
TT
18012018-07-16 Tom Tromey <tom@tromey.com>
1802
1803 * buildsym.c (~buildsym_compunit): Free the macro table.
1804 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1805 methods.
1806 <m_pending_macros>: New member.
1807 (pending_macros): Remove.
1808 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1809 (reset_symtab_globals, end_symtab_get_static_block)
1810 (end_symtab_with_blockvector, augment_type_symtab)
1811 (buildsym_init): Update.
1812
c0015d44
TT
18132018-07-16 Tom Tromey <tom@tromey.com>
1814
1815 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1816 parameter.
1817 (buildsym_compunit::set_last_source_file): New method.
1818 <m_last_source_file>: New member.
1819 (prepare_for_building): Remove "name" parameter.
1820 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1821 (last_source_file): Remove.
1822 (set_last_source_file, get_last_source_file): Update.
1823
e62cca7c
TT
18242018-07-16 Tom Tromey <tom@tromey.com>
1825
1826 * buildsym.c (prepare_for_building): Add assert.
1827
905eb0e2
TT
18282018-07-16 Tom Tromey <tom@tromey.com>
1829
1830 * buildsym.c (~buildsym_compunit): Update.
1831 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1832 (start_subfile, patch_subfile_names)
1833 (end_symtab_with_blockvector): Update.
1834
b248663f
TT
18352018-07-16 Tom Tromey <tom@tromey.com>
1836
1837 * buildsym.c (struct buildsym_compunit): Add constructor,
1838 destructor, initializers.
1839 (start_buildsym_compunit): Remove.
1840 (free_buildsym_compunit): Use "delete".
1841 (start_symtab, restart_symtab): Use "new".
1842
ff27d073
SM
18432018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1844
1845 * symfile.c (set_objfile_default_section_offset): Remove struct
1846 keyword.
1847
6a15ecf5
SH
18482018-07-14 Stafford Horne <shorne@gmail.com>
1849
1850 * (Responsible Maintainers): Add myself as or1k maintainer.
1851
027a4c30
TT
18522018-07-13 Tom Tromey <tom@tromey.com>
1853
1854 * symfile.c (set_objfile_default_section_offset): Use extra braces
1855 around initializer.
1856
5c1eda30
AA
18572018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1858
1859 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1860 non-branching basr.
1861
bc7b042b
PW
18622018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1863
1864 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1865 unittests/cli-utils-selftests.c
1866 * unittests/cli-utils-selftests.c: New file.
1867
a14c4daa
PW
18682018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1869
1870 * NEWS: Mention new commands. Mention change to 'thread apply'.
1871
1fe75df7
PW
18722018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1873
1874 * thread.c (thr_try_catch_cmd): New function.
1875 (thread_apply_all_command): Handle qcs flags.
1876 (thread_apply_command): Handle qcs flags.
1877 (taas_command): New function.
1878 (tfaas_command): New function.
1879 (_initialize_thread): Update to setup the new commands 'taas
1880 and 'tfaas'. Change doc string for 'thread apply'.
1881
6a70eb7d
PW
18822018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1883
1884 * stack.c: (trailing_outermost_frame): New function, mostly
1885 extracted from backtrace_command_1.
1886 (leading_innermost_frame): New function.
1887 (backtrace_command_1): Update to call trailing_outermost_frame.
1888 (frame_apply_command_count): New function.
1889 (frame_apply_level_command): New function.
1890 (frame_apply_all_command): New function.
1891 (frame_apply_command): New function.
1892 (faas_command): New function.
1893 (frame_cmd_list): New variable.
1894 (_initialize_stack): Update to setup the new commands 'frame apply'
1895 and 'faas'.
1896
529c08b2
PW
18972018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1898
1899 * cli-utils.c (number_or_range_parser::get_number): Only handle
1900 numbers or convenience var as numbers.
1901 (parse_flags): New function.
1902 (parse_flags_qcs): New function.
1903 (number_or_range_parser::finished): Ensure parsing end is detected
1904 before end of string.
1905 * cli-utils.h (parse_flags): New function.
1906 (parse_flags_qcs): New function.
1907 (number_or_range_parser): Remove m_finished bool.
1908 (number_or_range_parser::skip_range): Set m_in_range to false.
1909
64b58472
SDJ
19102018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1911
1912 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1913 on Windows.
1914
c7ab0aef
SDJ
19152018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1916 Jan Kratochvil <jan.kratochvil@redhat.com>
1917 Paul Fertser <fercerpav@gmail.com>
1918 Tsutomu Seki <sekiriki@gmail.com>
1919 Pedro Alves <palves@redhat.com>
1920
1921 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1922 'unittests/parse-connection-spec-selftests.c'.
1923 (COMMON_SFILES): Add 'common/netstuff.c'.
1924 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1925 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1926 * common/netstuff.c: New file.
1927 * common/netstuff.h: New file.
1928 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1929 (wait_for_connect): Update comment. New parameter
1930 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1931 Use 'sock' directly instead of 'scb->fd'.
1932 (try_connect): New function, with code from 'net_open'.
1933 (net_open): Rewrite main loop to deal with multiple
1934 sockets/addresses. Handle IPv6-style hostnames; implement
1935 support for IPv6 connections.
1936 * unittests/parse-connection-spec-selftests.c: New file.
1937
4c7333b3
PA
19382018-07-11 Pedro Alves <palves@redhat.com>
1939
1940 PR gdb/23377
1941 * remote.c (remote_target::remote_detach_pid): Call
1942 set_current_process.
1943
a6f88f6e
PA
19442018-07-11 Pedro Alves <palves@redhat.com>
1945
1946 * h8300-tdep.c (h8300_gdbarch_init): Remove
1947 set_gdbarch_ecoff_reg_to_regnum calls.
1948
16ff70dd
SDJ
19492018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1950
1951 PR c++/23373
1952 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1953 offsets/sizes for static members of a class/struct.
1954
12863263
AH
19552018-07-11 Alan Hayward <alan.hayward@arm.com>
1956
1957 * target-descriptions.c (tdesc_register_bitsize): Rename.
1958 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1959 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1960 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1961
1123588c
TT
19622018-07-10 Tom Tromey <tom@tromey.com>
1963
1964 * breakpoint.c (moribund_locations): Now static and a
1965 std::vector.
1966 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1967 (build_bpstat_chain, update_global_location_list)
1968 (breakpoint_retire_moribund): Update.
1969 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1970 VEC.
1971
8c49aa89
AB
19722018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1973
1974 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1975 (riscv_register_reggroup_p): Use new function, remove unneeded
1976 parenthesis.
1977 (riscv_push_dummy_call): Extend assert to compare against xlen or
1978 flen based on register type.
1979
42ecac17
AB
19802018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1981
1982 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1983
055303e2
AB
19842018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1985
1986 * remote.c (show_hardware_watchpoint_limit): New function.
1987 (show_hardware_watchpoint_length_limit): New function.
1988 (show_hardware_breakpoint_limit): New function.
1989 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1990 where appropriate, update help text.
1991
8fd32c1c
TT
19922018-07-09 Tom Tromey <tom@tromey.com>
1993
1994 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1995 (CLIBS): Don't mention NAT_CLIBS.
1996
31278b51
TT
19972018-07-09 Tom Tromey <tom@tromey.com>
1998
1999 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2000 (LIBGDB_OBS, clean mostlyclean): Update.
2001 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2002
e5fd1493
TT
20032018-07-09 Tom Tromey <tom@tromey.com>
2004
2005 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2006 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2007 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2008
981e0c0c
TT
20092018-07-09 Tom Tromey <tom@tromey.com>
2010
2011 * Makefile.in (ALLDEPFILES): Remove exec.c.
2012 (COMMON_OBS): Remove exec.o.
2013 (COMMON_SFILES): Add exec.c.
2014
14ccceb2
TT
20152018-07-09 Tom Tromey <tom@tromey.com>
2016
2017 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2018
5d3c3a68
TT
20192018-07-09 Tom Tromey <tom@tromey.com>
2020
2021 * Makefile.in (clean mostlyclean): Remove stamp-version.
2022 (version.c): Depend on stamp-version.
2023 (stamp-version): New rule, from version.c rule.
2024
1998086d
TT
20252018-07-09 Tom Tromey <tom@tromey.com>
2026
2027 * Makefile.in (init.c): Depend on stamp-init.
2028 (stamp-init): New rule, from init.c rule.
2029 (clean mostlyclean): Remove stamp-init.
2030
4c754949
TT
20312018-07-09 Tom Tromey <tom@tromey.com>
2032
2033 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2034 SUBDIR_GCC_COMPILE_SRCS.
2035
6497f1dd
TT
20362018-07-09 Tom Tromey <tom@tromey.com>
2037
2038 * Makefile.in (init.c): Remove some unused sed rules.
2039
97a34db9
TT
20402018-07-09 Tom Tromey <tom@tromey.com>
2041
2042 * Makefile.in (TSOBS): Remove.
2043 (INIT_FILES): Update.
2044 (LIBGDB_OBS): Update.
2045 (COMMON_SFILES): Add inflow.c.
2046 (SFILES): Remove inflow.c.
2047
25289ac1
JK
20482018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2049
2050 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2051
e83f4d97
SM
20522018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2053
4869c585
SM
2054 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2055 get_saveloc_name, is_signal_frame_name, step_name,
2056 init_remote_name, create_addr_space_name,
2057 destroy_addr_space_name, search_unwind_table_name,
2058 find_dyn_list_name): Constify.
e83f4d97 2059
6821842f
SM
20602018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2061
2062 * darwin-nat.c (darwin_pthread_kill): New function.
2063 (darwin_resume_thread): Use darwin_pthread_kill.
2064
c530603c
TV
20652018-07-05 Tom de Vries <tdevries@suse.de>
2066
2067 * macroexp.c (macro_buffer) <operator=>: New member function.
2068
a7d0f0f0
TT
20692018-07-04 Tom Tromey <tom@tromey.com>
2070
2071 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2072
6242c6a6
SM
20732018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2074
2075 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2076 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2077 * maint.c: Likewise.
2078 * top.c: Likewise.
2079
4e5b2f89
JB
20802018-07-04 Joel Brobecker <brobecker@adacore.com>
2081
2082 * NEWS: Create a new section for the next release branch.
2083 Rename the section of the current branch, now that it has
2084 been cut.
2085
538ccc4a
JB
20862018-07-04 Joel Brobecker <brobecker@adacore.com>
2087
2088 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2089 * version.in: Bump version to 8.2.50.DATE-git.
2090
1b919490
VB
20912018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2092 Pedro Alves <palves@redhat.com>
2093
2094 * linux-nat.c (linux_init_ptrace): Rename to ...
2095 (linux_init_ptrace_procfs): ... this. Call
2096 linux_proc_init_warnings.
2097 (linux_nat_target::post_attach)
2098 (linux_nat_target::post_startup_inferior): Adjust.
2099 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2100 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2101
1ea5da02
TV
21022018-07-04 Tom de Vries <tdevries@suse.de>
2103
2104 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2105 check ...
2106 (read_comp_unit_head): ... here.
2107
f51e0e20
TT
21082018-07-03 Tom Tromey <tom@tromey.com>
2109
2110 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2111 (stop_tracing, tstatus_command)
2112 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2113 (print_one_static_tracepoint_marker): Update.
2114 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2115 std::vector.
2116 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2117 VEC.
2118 (all_tracepoints, static_tracepoints_here): Return std::vector.
2119
d7e15655
TT
21202018-07-03 Tom Tromey <tom@tromey.com>
2121
2122 * common/ptid.c (ptid_equal): Remove.
2123 * common/ptid.h (ptid_equal): Don't declare.
2124 * ada-tasks.c: Update.
2125 * breakpoint.c: Update.
2126 * common/agent.c: Update.
2127 * corelow.c: Update.
2128 * darwin-nat-info.c: Update.
2129 * darwin-nat.c: Update.
2130 * dcache.c: Update.
2131 * dtrace-probe.c: Update.
2132 * dummy-frame.c: Update.
2133 * fbsd-nat.c: Update.
2134 * frame.c: Update.
2135 * gdbthread.h: Update.
2136 * gnu-nat.c: Update.
2137 * go32-nat.c: Update.
2138 * inf-loop.c: Update.
2139 * inf-ptrace.c: Update.
2140 * infcall.c: Update.
2141 * infcmd.c: Update.
2142 * inflow.c: Update.
2143 * infrun.c: Update.
2144 * linux-fork.c: Update.
2145 * linux-nat.c: Update.
2146 * linux-thread-db.c: Update.
2147 * mi/mi-cmd-var.c: Update.
2148 * mi/mi-interp.c: Update.
2149 * mi/mi-main.c: Update.
2150 * nto-procfs.c: Update.
2151 * ppc-linux-tdep.c: Update.
2152 * procfs.c: Update.
2153 * python/py-inferior.c: Update.
2154 * python/py-record-btrace.c: Update.
2155 * python/py-record.c: Update.
2156 * ravenscar-thread.c: Update.
2157 * regcache.c: Update.
2158 * remote-sim.c: Update.
2159 * remote.c: Update.
2160 * sol-thread.c: Update.
2161 * solib.c: Update.
2162 * target.c: Update.
2163 * tui/tui-stack.c: Update.
2164 * varobj.c: Update.
2165 * windows-nat.c: Update.
2166 * windows-tdep.c: Update.
2167
26a57c92
TT
21682018-07-03 Tom Tromey <tom@tromey.com>
2169
2170 * common/ptid.c (ptid_match): Remove.
2171 * common/ptid.h (ptid_match): Don't declare.
2172 * fbsd-nat.c: Update.
2173 * infcmd.c: Update.
2174 * infrun.c: Update.
2175 * linux-nat.c: Update.
2176 * record-btrace.c: Update.
2177 * regcache.c: Update.
2178 * remote.c: Update.
2179
d2a107e3
TT
21802018-07-03 Tom Tromey <tom@tromey.com>
2181
2182 * common/ptid.c (ptid_tid_p): Remove.
2183 * common/ptid.h (ptid_tid_p): Don't declare.
2184 * sol-thread.c: Update.
2185
15a9e13e
TT
21862018-07-03 Tom Tromey <tom@tromey.com>
2187
2188 * common/ptid.c (ptid_lwp_p): Remove.
2189 * common/ptid.h (ptid_lwp_p): Don't declare.
2190 * fbsd-nat.c: Update.
2191 * linux-nat.c: Update.
2192 * nat/linux-procfs.c: Update.
2193 * nat/x86-linux-dregs.c: Update.
2194 * sol-thread.c: Update.
2195
0e998d96
TT
21962018-07-03 Tom Tromey <tom@tromey.com>
2197
2198 * common/ptid.c (ptid_is_pid): Remove.
2199 * common/ptid.h (ptid_is_pid): Don't declare.
2200 * infrun.c: Update.
2201 * linux-nat.c: Update.
2202 * mi/mi-interp.c: Update.
2203 * remote.c: Update.
2204 * thread.c: Update.
2205
cc6bcb54
TT
22062018-07-03 Tom Tromey <tom@tromey.com>
2207
2208 * common/ptid.c (ptid_get_tid): Remove.
2209 * common/ptid.h (ptid_get_tid): Don't declare.
2210 * ada-tasks.c: Update.
2211 * aix-thread.c: Update.
2212 * bsd-uthread.c: Update.
2213 * darwin-nat.c: Update.
2214 * fbsd-nat.c: Update.
2215 * i386-darwin-nat.c: Update.
2216 * infrun.c: Update.
2217 * linux-tdep.c: Update.
2218 * nto-procfs.c: Update.
2219 * ppc-ravenscar-thread.c: Update.
2220 * python/py-infthread.c: Update.
2221 * ravenscar-thread.c: Update.
2222 * sol-thread.c: Update.
2223 * sparc-ravenscar-thread.c: Update.
2224 * windows-nat.c: Update.
2225
e38504b3
TT
22262018-07-03 Tom Tromey <tom@tromey.com>
2227
2228 * common/ptid.c (ptid_get_lwp): Remove.
2229 * common/ptid.h (ptid_get_lwp): Don't declare.
2230 * aarch64-linux-nat.c: Update.
2231 * ada-tasks.c: Update.
2232 * aix-thread.c: Update.
2233 * amd64-linux-nat.c: Update.
2234 * arm-linux-nat.c: Update.
2235 * corelow.c: Update.
2236 * fbsd-nat.c: Update.
2237 * fbsd-tdep.c: Update.
2238 * gnu-nat.c: Update.
2239 * i386-cygwin-tdep.c: Update.
2240 * i386-gnu-nat.c: Update.
2241 * i386-linux-nat.c: Update.
2242 * ia64-linux-nat.c: Update.
2243 * inf-ptrace.c: Update.
2244 * infrun.c: Update.
2245 * linux-fork.c: Update.
2246 * linux-nat.c: Update.
2247 * linux-tdep.c: Update.
2248 * linux-thread-db.c: Update.
2249 * mips-linux-nat.c: Update.
2250 * nat/aarch64-linux-hw-point.c: Update.
2251 * nat/aarch64-linux.c: Update.
2252 * nat/linux-btrace.c: Update.
2253 * nat/linux-osdata.c: Update.
2254 * nat/linux-procfs.c: Update.
2255 * nat/x86-linux-dregs.c: Update.
2256 * obsd-nat.c: Update.
2257 * ppc-fbsd-nat.c: Update.
2258 * ppc-linux-nat.c: Update.
2259 * procfs.c: Update.
2260 * python/py-infthread.c: Update.
2261 * ravenscar-thread.c: Update.
2262 * remote.c: Update.
2263 * s390-linux-nat.c: Update.
2264 * sol-thread.c: Update.
2265 * sol2-tdep.c: Update.
2266 * spu-linux-nat.c: Update.
2267 * x86-linux-nat.c: Update.
2268 * xtensa-linux-nat.c: Update.
2269
e99b03dc
TT
22702018-07-03 Tom Tromey <tom@tromey.com>
2271
2272 * common/ptid.c (ptid_get_pid): Remove.
2273 * common/ptid.h (ptid_get_pid): Don't declare.
2274 * aarch64-linux-nat.c: Update.
2275 * ada-lang.c: Update.
2276 * aix-thread.c: Update.
2277 * alpha-bsd-nat.c: Update.
2278 * amd64-fbsd-nat.c: Update.
2279 * amd64-linux-nat.c: Update.
2280 * arm-linux-nat.c: Update.
2281 * arm-nbsd-nat.c: Update.
2282 * auxv.c: Update.
2283 * break-catch-syscall.c: Update.
2284 * breakpoint.c: Update.
2285 * bsd-uthread.c: Update.
2286 * corelow.c: Update.
2287 * ctf.c: Update.
2288 * darwin-nat.c: Update.
2289 * fbsd-nat.c: Update.
2290 * fbsd-tdep.c: Update.
2291 * gcore.c: Update.
2292 * gnu-nat.c: Update.
2293 * hppa-nbsd-nat.c: Update.
2294 * hppa-obsd-nat.c: Update.
2295 * i386-fbsd-nat.c: Update.
2296 * ia64-linux-nat.c: Update.
2297 * inf-ptrace.c: Update.
2298 * infcmd.c: Update.
2299 * inferior.c: Update.
2300 * inferior.h: Update.
2301 * inflow.c: Update.
2302 * infrun.c: Update.
2303 * linux-fork.c: Update.
2304 * linux-nat.c: Update.
2305 * linux-tdep.c: Update.
2306 * linux-thread-db.c: Update.
2307 * m68k-bsd-nat.c: Update.
2308 * mi/mi-interp.c: Update.
2309 * mi/mi-main.c: Update.
2310 * mips-linux-nat.c: Update.
2311 * mips-nbsd-nat.c: Update.
2312 * mips64-obsd-nat.c: Update.
2313 * nat/aarch64-linux-hw-point.c: Update.
2314 * nat/aarch64-linux.c: Update.
2315 * nat/linux-btrace.c: Update.
2316 * nat/linux-osdata.c: Update.
2317 * nat/linux-procfs.c: Update.
2318 * nat/x86-linux-dregs.c: Update.
2319 * nto-procfs.c: Update.
2320 * obsd-nat.c: Update.
2321 * ppc-linux-nat.c: Update.
2322 * ppc-nbsd-nat.c: Update.
2323 * ppc-obsd-nat.c: Update.
2324 * proc-service.c: Update.
2325 * procfs.c: Update.
2326 * python/py-inferior.c: Update.
2327 * python/py-infthread.c: Update.
2328 * ravenscar-thread.c: Update.
2329 * record.c: Update.
2330 * remote-sim.c: Update.
2331 * remote.c: Update.
2332 * rs6000-nat.c: Update.
2333 * s390-linux-nat.c: Update.
2334 * sh-nbsd-nat.c: Update.
2335 * sol-thread.c: Update.
2336 * sparc-nat.c: Update.
2337 * sparc64-tdep.c: Update.
2338 * spu-linux-nat.c: Update.
2339 * spu-tdep.c: Update.
2340 * target-debug.h: Update.
2341 * target.c: Update.
2342 * thread.c: Update.
2343 * tid-parse.c: Update.
2344 * tracefile-tfile.c: Update.
2345 * vax-bsd-nat.c: Update.
2346 * windows-nat.c: Update.
2347 * x86-linux-nat.c: Update.
2348 * x86-nat.c: Update.
2349
f2907e49
TT
23502018-07-03 Tom Tromey <tom@tromey.com>
2351
2352 * common/ptid.c (pid_to_ptid): Remove.
2353 * common/ptid.h (pid_to_ptid): Don't declare.
2354 * aix-thread.c: Update.
2355 * arm-linux-nat.c: Update.
2356 * common/ptid.c: Update.
2357 * common/ptid.h: Update.
2358 * corelow.c: Update.
2359 * ctf.c: Update.
2360 * darwin-nat.c: Update.
2361 * fbsd-nat.c: Update.
2362 * fork-child.c: Update.
2363 * gnu-nat.c: Update.
2364 * go32-nat.c: Update.
2365 * inf-ptrace.c: Update.
2366 * infcmd.c: Update.
2367 * inferior.c: Update.
2368 * infrun.c: Update.
2369 * linux-fork.c: Update.
2370 * linux-nat.c: Update.
2371 * nat/aarch64-linux-hw-point.c: Update.
2372 * nat/fork-inferior.c: Update.
2373 * nat/x86-linux-dregs.c: Update.
2374 * nto-procfs.c: Update.
2375 * obsd-nat.c: Update.
2376 * procfs.c: Update.
2377 * progspace.c: Update.
2378 * remote.c: Update.
2379 * rs6000-nat.c: Update.
2380 * s390-linux-nat.c: Update.
2381 * sol-thread.c: Update.
2382 * spu-linux-nat.c: Update.
2383 * target.c: Update.
2384 * top.c: Update.
2385 * tracefile-tfile.c: Update.
2386 * windows-nat.c: Update.
2387
fd79271b
TT
23882018-07-03 Tom Tromey <tom@tromey.com>
2389
2390 * common/ptid.h (ptid_build): Don't declare.
2391 * common/ptid.c (ptid_build): Remove.
2392 * aix-thread.c: Update.
2393 * bsd-kvm.c: Update.
2394 * bsd-uthread.c: Update.
2395 * common/agent.c: Update.
2396 * common/ptid.c: Update.
2397 * common/ptid.h: Update.
2398 * corelow.c: Update.
2399 * darwin-nat.c: Update.
2400 * fbsd-nat.c: Update.
2401 * gnu-nat.c: Update.
2402 * linux-fork.c: Update.
2403 * linux-nat.c: Update.
2404 * linux-thread-db.c: Update.
2405 * nat/linux-osdata.c: Update.
2406 * nat/linux-procfs.c: Update.
2407 * nto-procfs.c: Update.
2408 * obsd-nat.c: Update.
2409 * proc-service.c: Update.
2410 * procfs.c: Update.
2411 * ravenscar-thread.c: Update.
2412 * remote-sim.c: Update.
2413 * remote.c: Update.
2414 * sol-thread.c: Update.
2415 * target.c: Update.
2416 * windows-nat.c: Update.
2417
057302ce
TT
24182018-07-03 Tom Tromey <tom@tromey.com>
2419
2420 * infrun.c (follow_exec): Use exit_inferior_silent.
2421 * inferior.c (exit_inferior_num_silent): Remove.
2422 * inferior.h (exit_inferior_num_silent): Don't declare.
2423
a50c11c6
TT
24242018-07-03 Tom Tromey <tom@tromey.com>
2425
2426 PR cli/23340:
2427 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2428 inferior_ptid on error.
2429
471b9d15
MR
24302018-07-02 Maciej W. Rozycki <macro@mips.com>
2431 Simon Marchi <simon.marchi@polymtl.ca>
2432
2433 PR tdep/8282
2434 * disasm.h (gdb_disassembler): Add
2435 `m_disassembler_options_holder'. member
2436 * disasm.c (get_all_disassembler_options): New function.
2437 (gdb_disassembler::gdb_disassembler): Use it.
2438 (gdb_buffered_insn_length_init_dis): Likewise.
2439 (gdb_buffered_insn_length): Adjust accordingly.
2440 (set_disassembler_options): Handle options with arguments.
2441 (show_disassembler_options_sfunc): Likewise. Add a leading new
2442 line if showing options with descriptions.
2443 (disassembler_options_completer): Adapt to using the
2444 `disasm_options_and_args_t' structure.
2445 * mips-tdep.c (mips_disassembler_options): New variable.
2446 (mips_disassembler_options_o32): Likewise.
2447 (mips_disassembler_options_n32): Likewise.
2448 (mips_disassembler_options_n64): Likewise.
2449 (gdb_print_insn_mips): Don't set `disassembler_options'.
2450 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2451 functions.
2452 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2453 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2454 `gdbarch_disassembler_options_implicit' and
2455 `gdbarch_valid_disassembler_options'.
2456 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2457 `disasm_options_and_args_t' structure.
2458 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2459 method.
2460 (valid_disassembler_options): Switch from `disasm_options_t' to
2461 the `disasm_options_and_args_t' structure.
2462 * NEWS: Document `set disassembler-options' support for the MIPS
2463 target.
2464 * gdbarch.h: Regenerate.
2465 * gdbarch.c: Regenerate.
2466
41823f29
SH
24672018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2468
2469 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2470
41206e32
JB
24712018-06-29 Joel Brobecker <brobecker@adacore.com>
2472
2473 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2474 parameter in call to amd64_target_description.
2475 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2476 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2477 (amd64fbsd_init_abi): Likewise.
2478 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2479 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2480 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2481 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2482
de52b960
PA
24832018-06-29 Pedro Alves <palves@redhat.com>
2484
2485 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2486 "segments" parameter.
2487 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2488 (_initialize_amd64_tdep): Update call to
2489 amd64_create_target_description.
2490 (amd64_target_description): Add "segments" parameter. Adjust
2491 the implementation to use it.
2492 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2493 call to amd64_create_target_description.
2494 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2495 * gdb/arch/amd64.h (amd64_create_target_description): Add
2496 "segments" register.
2497 * gdb/arch/amd64.c (amd64_create_target_description): Add
2498 "segments" parameter. Call create_feature_i386_64bit_segments
2499 only if SEGMENTS is true.
2500 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2501 call to amd64_create_target_description.
2502
75acb486
PA
25032018-06-29 Pedro Alves <palves@redhat.com>
2504
2505 * thread.c (thread_target_id_str): New, factored out from ...
2506 (print_thread_info_1): ... here. Use it to compute the max
2507 "Target Id" column width.
2508
c76a8ea3
PA
25092018-06-29 Pedro Alves <palves@redhat.com>
2510
2511 * remote.c (remote_target::extra_thread_info): Delete
2512 'display_buf' and 'n' locals. from the cache, regardless of
2513 packet mechanims is in use. Use cache for qThreadExtra and qP
2514 methods too.
2515
cd2bb709
PA
25162018-06-29 Pedro Alves <palves@redhat.com>
2517
2518 * blockframe.c (find_pc_sect_containing_function): New function.
2519 * breakpoint.c (print_breakpoint_location): Don't call
2520 find_pc_sect_function.
2521 * linespec.c (create_sals_line_offset): Record the location's
2522 symbol in the sal.
2523 * linespec.c (convert_address_location_to_sals): Fill in sal's
2524 symbol with find_pc_sect_containing_function.
2525 * symtab.c (find_function_start_sal): Rename to ...
2526 (find_function_start_sal_1): ... this.
2527 (find_function_start_sal): Reimplement as wrapper around
2528 find_function_start_sal_1, and use
2529 find_pc_sect_containing_function to fill in the sal's symbol.
2530 (find_function_start_sal(symbol*, bool)): Adjust.
2531 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2532 comments.
2533 (find_pc_sect_containing_function): Declare.
2534
991ff292
PA
25352018-06-29 Pedro Alves <palves@redhat.com>
2536
2537 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2538 true if the the location has no symbol.
2539
44cee4fd
TT
25402018-06-28 Tom Tromey <tom@tromey.com>
2541
2542 * NEWS: Mention --enable-codesign.
2543 * silent-rules.mk (ECHO_SIGN): New variable.
2544 * configure.ac: Add --enable-codesign.
2545 * configure: Rebuild.
2546 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2547 (gdb$(EXEEXT)): Optionally invoke codesign.
2548
f2ffa92b
PA
25492018-06-28 Pedro Alves <palves@redhat.com>
2550
2551 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2552 comments.
2553 (switch_to_thread_no_regs): Adjust comment.
2554 * infcmd.c (stop_pc): Delete.
2555 (post_create_inferior, info_program_command): Replace references
2556 to stop_pc with references to thread_info->suspend.stop_pc.
2557 * inferior.h (stop_pc): Delete declaration.
2558 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2559 (handle_inferior_event_1, handle_signal_stop)
2560 (process_event_stop_test, keep_going_stepped_thread)
2561 (handle_step_into_function, handle_step_into_function_backward)
2562 (print_stop_location): Replace references to stop_pc with
2563 references to thread_info->suspend.stop_pc.
2564 (struct infcall_suspend_state) <stop_pc>: Delete field.
2565 (save_infcall_suspend_state, restore_infcall_suspend_state):
2566 Remove references to inf_stat->stop_pc.
2567 * linux-fork.c (fork_load_infrun_state): Likewise.
2568 * record-btrace.c (record_btrace_set_replay): Likewise.
2569 * record-full.c (record_full_goto_entry): Likewise.
2570 * remote.c (print_one_stopped_thread): Likewise.
2571 * target.c (target_resume): Extend comment.
2572 * thread.c (set_executing_thread): New.
2573 (set_executing): Use it.
2574 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2575 Remove references to stop_pc.
2576
ecdc3a72
PA
25772018-06-28 Pedro Alves <palves@redhat.com>
2578
2579 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2580 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2581
d95d3aef
TT
25822018-06-28 Tom Tromey <tom@tromey.com>
2583
2584 * coffread.c (coff_symfile_finish): Update.
2585 * xcoffread.c (xcoff_symfile_finish): Update.
2586 * elfread.c (elf_symfile_finish): Update.
2587 * symfile.h (dwarf2_free_objfile): Don't declare.
2588 * dwarf2read.c (_initialize_dwarf2_read): Use
2589 register_objfile_data_with_cleanup.
2590 (dwarf2_free_objfile): Now static. Change signature.
2591
291f9a96
PT
25922018-06-28 Petr Tesarik <ptesarik@suse.cz>
2593
2594 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2595 option "-o" to add-symbol-file-load to add an offset to each
2596 section's load address.
2597 * symfile.c (set_objfile_default_section_offset): New function.
2598
d81a3eaf
PT
25992018-06-28 Petr Tesarik <ptesarik@suse.cz>
2600
2601 * symfile.c (add_symbol_file_command): Make sure that sections
2602 with the same name are sorted in the same order.
2603
ed6dfe51
PT
26042018-06-28 Petr Tesarik <ptesarik@suse.cz>
2605
2606 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2607 require the second argument. If omitted, load sections at the
2608 addresses specified in the file.
2609
d4d429d5
PT
26102018-06-28 Petr Tesarik <ptesarik@suse.cz>
2611
2612 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2613 (_initialize_symfile): Add option "-o" to symbol-file to add an
2614 offset to each section of the symbol file.
2615
39b27ab6
PT
26162018-06-28 Petr Tesarik <ptesarik@suse.cz>
2617
2618 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2619
41827fc3
TT
26202018-06-27 Tom Tromey <tom@tromey.com>
2621
2622 * stack.c (_initialize_stack): Update "func" help text.
2623
0c6aef22
TT
26242018-06-27 Tom Tromey <tom@tromey.com>
2625
2626 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2627 std::vector.
2628 (unwind_infopy_str, pyuw_create_unwind_info)
2629 (unwind_infopy_add_saved_register, pyuw_sniffer)
2630 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2631 Update.
2632 (struct saved_reg): Add constructor.
2633 <value>: Now a gdbpy_ref<>.
2634
63177289
TT
26352018-06-27 Tom Tromey <tom@tromey.com>
2636
2637 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2638
e76f78a0
SM
26392018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2640
2641 * gdb-gdb.py.in: Format using autopep8.
2642
9a14af7b
SM
26432018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2644
2645 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2646 (type_lookup_function): Recognize CORE_ADDR values.
2647
189366cd
SM
26482018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2649
2650 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2651 print tag_name.
2652
68ad5fb9
SM
26532018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2654
2655 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2656 <__lt__>: Add.
2657
141ec9f6
SM
26582018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2659
2660 * gdb-gdb.py: Move to...
2661 * gdb-gdb.py.in: ... here.
2662 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2663 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2664 dependencies.
2665 (distclean): Remove gdb-gdb.py when cleaning.
2666 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2667 * configure: Re-generate.
2668
4c4e7ad4
PA
26692018-06-27 Pedro Alves <palves@redhat.com>
2670
2671 * proc-service.c (get_ps_regcache): New.
2672 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2673 (ps_lsetfpregs): Use it.
2674
7ab6656f
OJ
26752018-06-27 Omair Javaid <omair.javaid@linaro.org>
2676
2677 PR gdb/21695
2678 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2679 (dwarf_decode_lines_1): Adjust.
2680
bd583225
SM
26812018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2682
2683 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2684 override.
2685 <info_proc>: Likewise.
2686
9a325b7b
JB
26872018-06-26 Joel Brobecker <brobecker@adacore.com>
2688
2689 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2690 to windows_fetch_one_register, and only handle the case of
2691 fetching one register. Move the code that reloads the context
2692 and iterates over all registers if R is negative to...
2693 (windows_nat_target::fetch_registers): ... here.
2694 (do_windows_store_inferior_registers): Rename to
2695 windows_store_one_register, and only handle the case of storing
2696 one register. Move the code that handles the case where r is
2697 negative to...
2698 (windows_nat_target::store_registers) ... here.
2699
a33ccfc7
TT
27002018-06-26 Tom Tromey <tom@tromey.com>
2701
2702 PR rust/22574:
2703 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2704 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2705 Update.
2706 (rust_internal_print_type): Add podata parameter.
2707 (rust_print_type): Update.
2708
e0c547d1
TT
27092018-06-26 Tom Tromey <tom@tromey.com>
2710
2711 * typeprint.h (struct print_offset_data) <update, finish,
2712 maybe_print_hole>: New methods.
2713 <indentation>: New constant.
2714 * typeprint.c (print_offset_data::indentation): Define.
2715 (print_offset_data::maybe_print_hole, print_offset_data::update)
2716 (print_offset_data::finish): Move from c-typeprint.c and rename.
2717 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2718 (print_spaces_filtered_with_print_options): Update.
2719 (c_print_type_union_field_offset, maybe_print_hole)
2720 (c_print_type_struct_field_offset): Move to typeprint.c and
2721 rename.
2722 (c_type_print_base_struct_union): Update.
2723
75cbc781
PA
27242018-06-25 Pedro Alves <palves@redhat.com>
2725
2726 * gdbthread.h (thread_info_ref, delete_thread)
2727 (delete_thread_silent, first_thread_of_inferior)
2728 (any_thread_of_inferior, switch_to_thread)
2729 (enable_thread_stack_temporaries)
2730 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2731 (get_last_thread_stack_temporary)
2732 (value_in_thread_stack_temporaries, can_access_registers_thread):
2733 Spell out "struct thread_info" instead of just "thread_info".
2734 * inferior.h (notice_new_inferior): Likewise.
2735
b7a08269
PA
27362018-06-25 Pedro Alves <palves@redhat.com>
2737
2738 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2739 pass thread_info pointer to delete_thread.
2740 (windows_nat_target::detach): Pass inferior pointer to
2741 detach_inferior.
2742 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2743 delete_thread.
2744 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2745 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2746 and pass a thread_info pointer to delete_thread.
2747 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2748 pass thread_info pointer to delete_thread.
2749 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2750 delete_thread_silent call.
2751 * procfs.c (procfs_target::detach): Pass inferior pointer to
2752 detach_inferior.
2753 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2754 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2755 delete_thread_silent call.
2756 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2757 pass thread_info pointer to delete_thread.
2758 (windows_nat_target::detach): Pass inferior pointer to
2759 delete_inferior.
2760
8e7767e3
AH
27612018-06-22 Alan Hayward <alan.hayward@arm.com>
2762
2763 * regcache.c (readable_regcache::read_part): Fix asserts.
2764 (reg_buffer::raw_collect_part): New function.
2765 (regcache::write_part): Fix asserts.
2766 (reg_buffer::raw_supply_part): New function.
2767 (regcache::transfer_regset_register): New helper function.
2768 (regcache::transfer_regset): Call new functions.
2769 (regcache_supply_regset): Use gdb_byte*.
2770 (regcache::supply_regset): Likewise.
2771 (regcache_collect_regset): Likewise.
2772 (regcache::collect_regset): Likewise.
2773 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2774 (reg_buffer::raw_supply_part): Likewise.
2775 (regcache::transfer_regset_register): Likewise.
2776 (regcache::transfer_regset): Use gdb_byte*.
2777
bfd60e34
AH
27782018-06-22 Alan Hayward <alan.hayward@arm.com>
2779
2780 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2781
00431a78
PA
27822018-06-21 Pedro Alves <palves@redhat.com>
2783
2784 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2785 instead of a ptid_t. All callers adjusted.
2786 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2787 adjusted.
2788 (print_ada_task_info, display_current_task_id, task_command_1):
2789 Adjust.
2790 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2791 inferior_thread.
2792 (breakpoint_kind): Adjust.
2793 (remove_breakpoints_pid): Rename to ...
2794 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2795 pointer. All callers adjusted.
2796 (bpstat_clear_actions): Use inferior_thread.
2797 (get_bpstat_thread): New.
2798 (bpstat_do_actions): Use it.
2799 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2800 to take a thread_info pointer. All callers adjusted.
2801 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2802 (breakpoint_re_set_thread): Use inferior_thread.
2803 * breakpoint.h (struct inferior): Forward declare.
2804 (bpstat_stop_status): Update.
2805 (remove_breakpoints_pid): Delete.
2806 (remove_breakpoints_inf): New.
2807 * bsd-uthread.c (bsd_uthread_target::wait)
2808 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2809 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2810 (maint_btrace_packet_history_cmd)
2811 (maint_btrace_clear_packet_history_cmd): Adjust.
2812 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2813 inferior_thread.
2814 * cli/cli-interp.c: Include "inferior.h".
2815 * common/refcounted-object.h (struct
2816 refcounted_object_ref_policy): New.
2817 * compile/compile-object-load.c: Include gdbthread.h.
2818 (store_regs): Use inferior_thread.
2819 * corelow.c (core_target::close): Use current_inferior.
2820 (core_target_open): Adjust to use first_thread_of_inferior and use
2821 the current inferior.
2822 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2823 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2824 <thread>: ... this new field. All references adjusted.
2825 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2826 Take a thread_info pointer instead of a ptid_t.
2827 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2828 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2829 thread_info pointer instead of a ptid_t.
2830 * elfread.c: Include "inferior.h".
2831 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2832 Use inferior_thread.
2833 * eval.c (evaluate_subexp): Likewise.
2834 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2835 inferior_thread.
2836 * gdb_proc_service.h (struct thread_info): Forward declare.
2837 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2838 <thread>: ... this new field. All references adjusted.
2839 * gdbarch.h, gdbarch.c: Regenerate.
2840 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2841 'thread' parameter. All implementations and callers adjusted.
2842 * gdbthread.h (thread_info) <set_running>: New method.
2843 (delete_thread, delete_thread_silent): Take a thread_info pointer
2844 instead of a ptid.
2845 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2846 (first_thread_of_process): Delete, replaced by ...
2847 (first_thread_of_inferior): ... this new function. All callers
2848 adjusted.
2849 (any_live_thread_of_process): Delete, replaced by ...
2850 (any_live_thread_of_inferior): ... this new function. All callers
2851 adjusted.
2852 (switch_to_thread, switch_to_no_thread): Declare.
2853 (is_executing): Delete.
2854 (enable_thread_stack_temporaries): Update comment.
2855 <enable_thread_stack_temporaries>: Take a thread_info pointer
2856 instead of a ptid_t. Incref the thread.
2857 <~enable_thread_stack_temporaries>: Decref the thread.
2858 <m_ptid>: Delete
2859 <m_thr>: New.
2860 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2861 (get_last_thread_stack_temporary)
2862 (value_in_thread_stack_temporaries, can_access_registers_thread):
2863 Take a thread_info pointer instead of a ptid_t. All callers
2864 adjusted.
2865 * infcall.c (get_call_return_value): Use inferior_thread.
2866 (run_inferior_call): Work with thread pointers instead of ptid_t.
2867 (call_function_by_hand_dummy): Work with thread pointers instead
2868 of ptid_t. Use thread_info_ref.
2869 * infcmd.c (proceed_thread_callback): Access thread's state
2870 directly.
2871 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2872 access thread's state directly.
2873 (continue_command): Use inferior_thread.
2874 (info_program_command): Use find_thread_ptid and access thread
2875 state directly.
2876 (proceed_after_attach_callback): Use thread state directly.
2877 (notice_new_inferior): Take a thread_info pointer instead of a
2878 ptid_t. All callers adjusted.
2879 (exit_inferior): Take an inferior pointer instead of a pid. All
2880 callers adjusted.
2881 (exit_inferior_silent): New.
2882 (detach_inferior): Delete.
2883 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2884 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2885 (detach_inferior_command, kill_inferior_command): Use
2886 find_inferior_id instead of valid_gdb_inferior_id and
2887 gdb_inferior_id_to_pid.
2888 (inferior_command): Use inferior and thread pointers.
2889 * inferior.h (struct thread_info): Forward declare.
2890 (notice_new_inferior): Take a thread_info pointer instead of a
2891 ptid_t. All callers adjusted.
2892 (detach_inferior): Delete declaration.
2893 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2894 instead of a pid. All callers adjusted.
2895 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2896 (valid_gdb_inferior_id): Delete.
2897 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2898 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2899 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2900 ...
2901 <inf>: ... this new field.
2902 <step_ptid>: Delete, replaced by ...
2903 <step_thread>: ... this new field.
2904 (get_displaced_stepping_state): Take an inferior pointer instead
2905 of a pid. All callers adjusted.
2906 (displaced_step_in_progress_any_inferior): Adjust.
2907 (displaced_step_in_progress_thread): Take a thread pointer instead
2908 of a ptid_t. All callers adjusted.
2909 (displaced_step_in_progress, add_displaced_stepping_state): Take
2910 an inferior pointer instead of a pid. All callers adjusted.
2911 (get_displaced_step_closure_by_addr): Adjust.
2912 (remove_displaced_stepping_state): Take an inferior pointer
2913 instead of a pid. All callers adjusted.
2914 (displaced_step_prepare_throw, displaced_step_prepare)
2915 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2916 All callers adjusted.
2917 (start_step_over): Adjust.
2918 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2919 displaced step queue.
2920 (do_target_resume): Adjust.
2921 (fetch_inferior_event): Use inferior_thread.
2922 (context_switch, get_inferior_stop_soon): Take an
2923 execution_control_state pointer instead of a ptid_t. All callers
2924 adjusted.
2925 (switch_to_thread_cleanup): Delete.
2926 (stop_all_threads): Use scoped_restore_current_thread.
2927 * inline-frame.c: Include "gdbthread.h".
2928 (inline_state) <inline_state>: Take a thread pointer instead of a
2929 ptid_t. All callers adjusted.
2930 <ptid>: Delete, replaced by ...
2931 <thread>: ... this new field.
2932 (find_inline_frame_state): Take a thread pointer instead of a
2933 ptid_t. All callers adjusted.
2934 (skip_inline_frames, step_into_inline_frame)
2935 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2936 pointer instead of a ptid_t. All callers adjusted.
2937 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2938 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2939 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2940 pointers directly.
2941 * linux-nat.c (get_detach_signal): Likewise.
2942 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2943 (thread_db_notice_clone): Adjust.
2944 (thread_db_find_new_threads_silently)
2945 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2946 a thread pointer instead of a ptid_t. All callers adjusted.
2947 * mi/mi-cmd-var.c: Include "inferior.h".
2948 (mi_cmd_var_update_iter): Update to use thread pointers.
2949 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2950 inferior directly.
2951 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2952 out to ...
2953 (mi_output_running): ... this new function.
2954 (mi_on_resume_1): Adjust to use it.
2955 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2956 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2957 directly.
2958 (interrupt_thread_callback): : Adjust to use thread and inferior
2959 pointers.
2960 * proc-service.c: Include "gdbthread.h".
2961 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2962 * progspace-and-thread.c: Include "inferior.h".
2963 * progspace.c: Include "inferior.h".
2964 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2965 hold a reference to an inferior_object.
2966 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2967 inferior_thread.
2968 * python/py-inferior.c (struct inferior_object): Give the type a
2969 tag name instead of a typedef.
2970 (python_on_normal_stop): No need to check if the current thread is
2971 listed.
2972 (inferior_to_inferior_object): Change return type to
2973 inferior_object. All callers adjusted.
2974 (find_thread_object): Delete, bits factored out to ...
2975 (thread_to_thread_object): ... this new function.
2976 * python/py-infthread.c (create_thread_object): Use
2977 inferior_to_inferior_object.
2978 (thpy_is_stopped): Use thread pointer directly.
2979 (gdbpy_selected_thread): Use inferior_thread.
2980 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2981 field, replaced with ...
2982 <thread>: ... this new field. All users adjusted.
2983 (btpy_insn_or_gap_new): Drop const.
2984 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2985 callers adjusted.
2986 * python/py-record.c: Include "gdbthread.h".
2987 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2988 a ptid_t. All callers adjusted.
2989 (gdbpy_current_recording): Use inferior_thread.
2990 * python/py-record.h (recpy_record_object) <ptid>: Delete
2991 field, replaced with ...
2992 <thread>: ... this new field. All users adjusted.
2993 (recpy_element_object) <ptid>: Delete
2994 field, replaced with ...
2995 <thread>: ... this new field. All users adjusted.
2996 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2997 a ptid_t. All callers adjusted.
2998 * python/py-threadevent.c: Include "gdbthread.h".
2999 (get_event_thread): Use thread_to_thread_object.
3000 * python/python-internal.h (struct inferior_object): Forward
3001 declare.
3002 (find_thread_object, find_inferior_object): Delete declarations.
3003 (thread_to_thread_object, inferior_to_inferior_object): New
3004 declarations.
3005 * record-btrace.c: Include "inferior.h".
3006 (require_btrace_thread): Use inferior_thread.
3007 (record_btrace_frame_sniffer)
3008 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3009 (get_thread_current_frame): Use scoped_restore_current_thread and
3010 switch_to_thread.
3011 (get_thread_current_frame): Use thread pointer directly.
3012 (record_btrace_replay_at_breakpoint): Use thread's inferior
3013 pointer directly.
3014 * record-full.c: Include "inferior.h".
3015 * regcache.c: Include "gdbthread.h".
3016 (get_thread_arch_regcache): Use the inferior's address space
3017 directly.
3018 (get_thread_regcache, registers_changed_thread): New.
3019 * regcache.h (get_thread_regcache(thread_info *thread)): New
3020 overload.
3021 (registers_changed_thread): New.
3022 (remote_target) <remote_detach_1>: Swap order of parameters.
3023 (remote_add_thread): <remote_add_thread>: Return the new thread.
3024 (get_remote_thread_info(ptid_t)): New overload.
3025 (remote_target::remote_notice_new_inferior): Use thread pointers
3026 directly.
3027 (remote_target::process_initial_stop_replies): Use
3028 thread_info::set_running.
3029 (remote_target::remote_detach_1, remote_target::detach)
3030 (extended_remote_target::detach): Adjust.
3031 * stack.c (frame_show_address): Use inferior_thread.
3032 * target-debug.h (target_debug_print_thread_info_pp): New.
3033 * target-delegates.c: Regenerate.
3034 * target.c (default_thread_address_space): Delete.
3035 (memory_xfer_partial_1): Use current_inferior.
3036 (target_detach): Use current_inferior.
3037 (target_thread_address_space): Delete.
3038 (generic_mourn_inferior): Use current_inferior.
3039 * target.h (struct target_ops) <thread_address_space>: Delete.
3040 (target_thread_address_space): Delete.
3041 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3042 pointers directly.
3043 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3044 thread pointer instead of a ptid_t. Adjust all callers.
3045 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3046 (first_thread_of_process): Delete, replaced by ...
3047 (first_thread_of_inferior): ... this new function. All callers
3048 adjusted.
3049 (any_thread_of_process): Rename to ...
3050 (any_thread_of_inferior): ... this, and take an inferior pointer.
3051 (any_live_thread_of_process): Rename to ...
3052 (any_live_thread_of_inferior): ... this, and take an inferior
3053 pointer.
3054 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3055 (value_in_thread_stack_temporaries)
3056 (get_last_thread_stack_temporary): Take a thread pointer instead
3057 of a ptid_t. Adjust all callers.
3058 (thread_info::set_running): New.
3059 (validate_registers_access): Use inferior_thread.
3060 (can_access_registers_ptid): Rename to ...
3061 (can_access_registers_thread): ... this, and take a thread
3062 pointer.
3063 (print_thread_info_1): Adjust to compare thread pointers instead
3064 of ptids.
3065 (switch_to_no_thread, switch_to_thread): Make extern.
3066 (scoped_restore_current_thread::~scoped_restore_current_thread):
3067 Use m_thread pointer directly.
3068 (scoped_restore_current_thread::scoped_restore_current_thread):
3069 Use inferior_thread.
3070 (thread_command): Use thread pointer directly.
3071 (thread_num_make_value_helper): Use inferior_thread.
3072 * top.c (execute_command): Use inferior_thread.
3073 * tui/tui-interp.c: Include "inferior.h".
3074 * varobj.c (varobj_create): Use inferior_thread.
3075 (value_of_root_1): Use find_thread_global_id instead of
3076 global_thread_id_to_ptid.
3077
33bab475
AH
30782018-06-21 Alan Hayward <alan.hayward@arm.com>
3079
3080 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3081 possible.
3082 (regcache::write_part): Likewise.
3083 (readable_regcache::cooked_read_part): Update comment.
3084 (readable_regcache::cooked_write_part): Likewise.
3085 * regcache.h: (readable_regcache::read_part): Likewise.
3086 (regcache::write_part): Likewise.
3087
8363f9d5
RB
30882018-06-21 Richard Bunt <richard.bunt@arm.com>
3089 Dirk Schubert <dirk.schubert@arm.com>
3090
3091 * aarch64-linux-nat.c (post_attach): New.
3092 (aarch64_linux_nat_target::post_attach): Override post_attach to
3093 record the number of hardware debug registers.
3094
0d0b0ea2
TT
30952018-06-20 Tom Tromey <tom@tromey.com>
3096
3097 * python/py-param.c (add_setshow_generic): Make parameters const.
3098 (parmpy_init): Update.
3099
302abd6e
SM
31002018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3101
3102 * regcache.h (regcache_cooked_read_ftype): Rename to...
3103 (register_read_ftype): ...this, change type to function_view.
3104 (class reg_buffer) <save>: Remove src parameter.
3105 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3106 parameter non-const in first overload. Remove src parameter in
3107 second overload.
3108 * regcache.c (do_cooked_read): Remove.
3109 (readonly_detached_regcache::readonly_detached_regcache): Make
3110 parameter non-const, adjust call to other constructor.
3111 (reg_buffer::save): Remove src parameter.
3112 * frame.c (do_frame_register_read): Remove.
3113 (frame_save_as_regcache): Use lambda function.
3114 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3115 parameter to ppu2spu_data *.
3116 (ppu2spu_sniffer): Use lambda function.
3117
19f3f25f
SM
31182018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3119
3120 * record-full.c (record_full_target::insert_breakpoint): Remove
3121 "struct" keyword, add const.
3122
d0ac1c44
SM
31232018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3124
3125 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3126 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3127 * configure.ac: Remove AC_PREREQ, add missing quoting.
3128 * gnulib/configure.ac: Modernize usage of
3129 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3130 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3131 (AUTOMAKE_VERSION): Bump to 1.15.1.
3132 * configure: Re-generate.
3133 * config.in: Re-generate.
3134 * aclocal.m4: Re-generate.
3135 * gnulib/aclocal.m4: Re-generate.
3136 * gnulib/config.in: Re-generate.
3137 * gnulib/configure: Re-generate.
3138 * gnulib/import/Makefile.in: Re-generate.
3139
6ae50267
PA
31402018-06-19 Pedro Alves <palves@redhat.com>
3141
3142 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3143 (lookup_minimal_symbol_by_pc_section): ... here with
3144 gdb_assert_not_reached added.
3145
61b04dd0
PA
31462018-06-19 Pedro Alves <palves@redhat.com>
3147
3148 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3149 parameter with a block parameter. Compare location's block symbol
3150 with the frame's block instead of addresses.
3151 (skip_inline_frames): Pass the current block instead of the
3152 frame's address. Break out as soon as we determine the frame
3153 should not be skipped.
3154
f709fabb
TT
31552018-06-18 Tom Tromey <tom@tromey.com>
3156
3157 * solib-aix.c (solib_aix_get_section_offsets): Return
3158 unique_xmalloc_ptr.
3159 (solib_aix_solib_create_inferior_hook): Update.
3160
668eb2f0
TT
31612018-06-18 Tom Tromey <tom@tromey.com>
3162
3163 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3164
309822ca
TT
31652018-06-18 Tom Tromey <tom@tromey.com>
3166
3167 * solib-frv.c (frv_relocate_main_executable): Use
3168 unique_xmalloc_ptr.
3169 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3170 unique_xmalloc_ptr.
3171
06424eac
TT
31722018-06-18 Tom Tromey <tom@tromey.com>
3173
3174 * objfiles.h (inhibit_section_map_updates): Update.
3175 (resume_section_map_updates, resume_section_map_updates_cleanup):
3176 Remove.
3177 * solib-svr4.c (svr4_handle_solib_event): Update.
3178 * objfiles.c (inhibit_section_map_updates): Return
3179 scoped_restore_tmpl<int>.
3180 (resume_section_map_updates, resume_section_map_updates_cleanup):
3181 Remove.
3182
b4be9fad
TT
31832018-06-18 Tom Tromey <tom@tromey.com>
3184
3185 * valprint.h (read_string): Update.
3186 * valprint.c (read_string): Change type of "buffer".
3187 (val_print_string): Update.
3188 * python/py-value.c (valpy_string): Update.
3189 * language.h (struct language_defn) <la_get_string>: Change
3190 type of "buffer".
3191 (default_get_string, c_get_string): Update.
3192 * language.c (default_get_string): Change type of "buffer".
3193 * guile/scm-value.c (gdbscm_value_to_string): Update.
3194 * c-lang.c (c_get_string): Change type of "buffer".
3195
3f0dbd67
TT
31962018-06-18 Tom Tromey <tom@tromey.com>
3197
3198 * ser-mingw.c (struct pipe_state_destroyer): New.
3199 (pipe_state_up): New typedef.
3200 (cleanup_pipe_state): Remove.
3201 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3202
69d340c6
TT
32032018-06-18 Tom Tromey <tom@tromey.com>
3204
3205 * rust-lang.h (rust_yyerror): Don't declare.
3206 * rust-lang.c (rust_language_defn): Update.
3207 * rust-exp.y (yyerror): Now static.
3208 * parse.c (parse_exp_in_context_1): Update.
3209 * p-lang.h (p_yyerror): Don't declare.
3210 * p-lang.c (p_language_defn): Update.
3211 * p-exp.y (yyerror): Now static.
3212 * opencl-lang.c (opencl_language_defn): Update.
3213 * objc-lang.c (objc_language_defn): Update.
3214 * m2-lang.h (m2_yyerror): Don't declare.
3215 * m2-lang.c (m2_language_defn): Update.
3216 * m2-exp.y (yyerror): Now static.
3217 * language.h (struct language_defn) <la_error>: Remove.
3218 * language.c (unk_lang_error): Remove.
3219 (unknown_language_defn, auto_language_defn): Remove.
3220 * go-lang.h (go_yyerror): Don't declare.
3221 * go-lang.c (go_language_defn): Update.
3222 * go-exp.y (yyerror): Now static.
3223 * f-lang.h (f_yyerror): Don't declare.
3224 * f-lang.c (f_language_defn): Update.
3225 * f-exp.y (yyerror): Now static.
3226 * d-lang.h (d_yyerror): Don't declare.
3227 * d-lang.c (d_language_defn): Update.
3228 * d-exp.y (yyerror): Now static.
3229 * c-lang.h (c_yyerror): Don't declare.
3230 * c-lang.c (c_language_defn, cplus_language_defn)
3231 (asm_language_defn, minimal_language_defn): Update.
3232 * c-exp.y (yyerror): Now static.
3233 * ada-lang.h (ada_yyerror): Don't declare.
3234 * ada-lang.c (ada_language_defn): Update.
3235 * ada-exp.y (yyerror): Now static.
3236
e9902bfc
AH
32372018-06-18 Alan Hayward <alan.hayward@arm.com>
3238
3239 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3240 (store_sveregs_to_thread): Likewise.
3241 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3242 (aarch64_linux_store_inferior_registers): Likewise.
3243 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3244 function.
3245 (aarch64_sve_regs_copy_to_regcache): Likewise.
3246 (aarch64_sve_regs_copy_from_regcache): Likewise.
3247 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3248 declaration.
3249 (aarch64_sve_regs_copy_to_regcache): Likewise.
3250 (aarch64_sve_regs_copy_from_regcache): Likewise.
3251 (sve_context): Structure from Linux headers.
3252 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3253 (SVE_SIG_ZREG_SIZE): Likewise.
3254 (SVE_SIG_PREG_SIZE): Likewise.
3255 (SVE_SIG_FFR_SIZE): Likewise.
3256 (SVE_SIG_REGS_OFFSET): Likewise.
3257 (SVE_SIG_ZREGS_OFFSET): Likewise.
3258 (SVE_SIG_ZREG_OFFSET): Likewise.
3259 (SVE_SIG_ZREGS_SIZE): Likewise.
3260 (SVE_SIG_PREGS_OFFSET): Likewise.
3261 (SVE_SIG_PREG_OFFSET): Likewise.
3262 (SVE_SIG_PREGS_SIZE): Likewise.
3263 (SVE_SIG_FFR_OFFSET): Likewise.
3264 (SVE_SIG_REGS_SIZE): Likewise.
3265 (SVE_SIG_CONTEXT_SIZE): Likewise.
3266 (SVE_PT_REGS_MASK): Likewise.
3267 (SVE_PT_REGS_FPSIMD): Likewise.
3268 (SVE_PT_REGS_SVE): Likewise.
3269 (SVE_PT_VL_INHERIT): Likewise.
3270 (SVE_PT_VL_ONEXEC): Likewise.
3271 (SVE_PT_REGS_OFFSET): Likewise.
3272 (SVE_PT_FPSIMD_OFFSET): Likewise.
3273 (SVE_PT_FPSIMD_SIZE): Likewise.
3274 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3275 (SVE_PT_SVE_PREG_SIZE): Likewise.
3276 (SVE_PT_SVE_FFR_SIZE): Likewise.
3277 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3278 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3279 (__SVE_SIG_TO_PT): Likewise.
3280 (SVE_PT_SVE_OFFSET): Likewise.
3281 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3282 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3283 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3284 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3285 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3286 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3287 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3288 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3289 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3290 (SVE_PT_SVE_SIZE): Likewise.
3291 (SVE_PT_SIZE): Likewise.
3292 (HAS_SVE_STATE): New define.
3293
17a1cc89
AH
32942018-06-18 Alan Hayward <alan.hayward@arm.com>
3295
3296 * nat/aarch64-sve-linux-sigcontext.h: New file.
3297 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3298 new files.
3299 (SVE_VQ_MIN): Likewise.
3300 (SVE_VQ_MAX): Likewise.
3301 (SVE_VL_MIN): Likewise.
3302 (SVE_VL_MAX): Likewise.
3303 (SVE_NUM_ZREGS): Likewise.
3304 (SVE_NUM_PREGS): Likewise.
3305 (sve_vl_valid): Likewise.
3306 (struct user_sve_header): Likewise.
3307
7010835a
AB
33082018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3309 Richard Bunt <Richard.Bunt@arm.com>
3310
3311 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3312 was requested by GDB.
3313
479b3ef4
TV
33142018-06-15 Tom de Vries <tdevries@suse.de>
3315
3316 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3317
8199b8f4
SM
33182018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3319
3320 * gnulib/update-gnulib.sh: Print expected versions of
3321 autoconf/aclocal.
3322
55c748a1
SM
33232018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3324
3325 * arch-utils.c (default_type_align): Use type_length_units.
3326 * gdbtypes.c (type_align): Use type_length_units.
3327
87a8eca7
PW
33282018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3329
3330 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3331 of 'define' command.
3332
5d9a0608
TV
33332018-06-14 Tom de Vries <tdevries@suse.de>
3334
3335 PR cli/22573
3336 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3337 get_no_prettyformat_print_options.
3338
ab89b5a5
SM
33392018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3340
3341 * sparc-nat.h: Include target.h.
3342 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3343 <fetch_registers>: Remove this argument in function call.
3344 <store_registers>: Remove this argument in function call, remove
3345 extra semicolon.
3346 <low_forget_process>: Call sparc64_forget_process instead of
3347 sparc_forget_process.
3348
62c808ae
RO
33492018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3350
3351 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3352 (procfs_target::make_corefile_notes): Adjust to new
3353 target_read_alloc return type.
3354
1840d81a
AB
33552018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3356 Stephen Roberts <stephen.roberts@arm.com>
3357
3358 PR gdb/22882
3359 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3360 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3361 Move should_notify_stop local into more inner scope.
3362
9516f85a
AB
33632018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3364 Stephen Roberts <stephen.roberts@arm.com>
3365
3366 PR gdb/22882
3367 * infrun.c (resume_1): Add call to mark_async_event_handler.
3368
defd2172
AB
33692018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3370
3371 * infrun.c (do_target_wait): Change old version of $pc printed.
3372
7b23e087
SM
33732018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3374
3375 * dwarf2read.c (read_index_from_section): Rename to...
3376 (read_gdb_index_from_section): ... this, update all callers.
3377 (dwarf2_read_index): Rename to...
3378 (dwarf2_read_gdb_index): ... this, update all callers.
3379
69c67a0b
JDA
33802018-06-11 John David Anglin <danglin@gcc.gnu.org>
3381
3382 * gdb/hppa-linux-nat.c
3383 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3384 hppa_linux_nat_target::fetch_registers.
3385
65d4cada
AH
33862018-06-11 Alan Hayward <alan.hayward@arm.com>
3387
3388 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3389 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3390 (AARCH64_DWARF_SVE_FFR): Likewise.
3391 (AARCH64_DWARF_SVE_P0): Likewise.
3392 (AARCH64_DWARF_SVE_Z0): Likewise.
3393
f868386e
AH
33942018-06-11 Alan Hayward <alan.hayward@arm.com>
3395
3396 * common/common-regcache.h (raw_compare): New function.
3397 * regcache.c (regcache::raw_compare): Likewise.
3398 * regcache.h (regcache::raw_compare): New declaration.
3399
9c861883
AH
34002018-06-11 Alan Hayward <alan.hayward@arm.com>
3401
3402 * common/common-regcache.h (reg_buffer_common): New structure.
3403 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3404 (reg_buffer::raw_supply): Likewise.
3405 (reg_buffer::raw_supply_integer): Likewise.
3406 (reg_buffer::raw_supply_zeroed): Likewise.
3407 (reg_buffer::raw_collect): Likewise.
3408 (reg_buffer::raw_collect_integer): Likewise.
3409 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3410 (reg_buffer::raw_supply): Likewise.
3411 (reg_buffer::raw_supply_integer): Likewise.
3412 (reg_buffer::raw_supply_zeroed): Likewise.
3413 (reg_buffer::raw_collect): Likewise.
3414 (reg_buffer::raw_collect_integer): Likewise.
3415
953edf2b
TT
34162018-06-10 Tom Tromey <tom@tromey.com>
3417
3418 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3419 (class remote_state) <stop_reply_queue>: Now std::vector.
3420 (remote_state::~remote_state)
3421 (remote_target::stop_reply_queue_length): Update.
3422 (struct queue_iter_param, remove_child_of_pending_fork)
3423 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3424 (check_pending_event_prevents_wildcard_vcont_callback)
3425 (remove_stop_reply_for_inferior)
3426 (remove_stop_reply_of_remote_state)
3427 (remote_notif_remove_once_on_match)
3428 (stop_reply_match_ptid_and_ws)
3429 (remote_kill_child_of_pending_fork): Remove.
3430 (remote_target::remove_new_fork_children)
3431 (remote_target::check_pending_events_prevent_wildcard_vcont)
3432 (remote_target::discard_pending_stop_replies)
3433 (remote_target::discard_pending_stop_replies_in_queue)
3434 (remote_target::remote_notif_remove_queued_reply)
3435 (remote_target::queued_stop_reply)
3436 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3437 (remote_target::wait, remote_target::kill_new_fork_children)
3438 (remote_target::async): Update.
3439
1ddbba9d
TT
34402018-06-10 Tom Tromey <tom@tromey.com>
3441
3442 * record-full.c (record_full_arch_list_cleanups): Remove.
3443 (record_full_message): Use try/catch.
3444 (record_full_wait_cleanups): Remove.
3445 (record_full_wait_1): Use try/catch.
3446 (record_full_restore): Likewise.
3447
219605fd
TT
34482018-06-10 Tom Tromey <tom@tromey.com>
3449
3450 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3451 declare VEC. Add constructor.
3452 <in_target_beneath>: Now bool.
3453 (record_full_breakpoints): Now a std::vector, static.
3454 (record_full_sync_record_breakpoints)
3455 (record_full_init_record_breakpoints)
3456 (record_full_target::insert_breakpoint)
3457 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3458
71b73764
SM
34592018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3460
3461 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3462 * serial.c (serial_interface_lookup): Remove struct keyword.
3463
4360561f
TT
34642018-06-10 Tom Tromey <tom@tromey.com>
3465
3466 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3467 method.
3468 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3469 a method.
3470 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3471 method.
3472 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3473 "beneath" as a method.
3474 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3475 Use "beneath" as a method.
3476
d14b92bf
TT
34772018-06-10 Tom Tromey <tom@tromey.com>
3478
3479 * tracefile.c (struct trace_file_writer_deleter): New.
3480 <operator()>: Rename from trace_file_writer_xfree.
3481 (trace_file_writer_up): New typedef.
3482 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3483
835dcf92
SM
34842018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3485
3486 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3487 <m_registers, m_register_status>: Change type to
3488 std::unique_ptr.
3489 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3490 XCNEWVEC.
3491
aac0d564
SM
34922018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3493
3494 * common/common-regcache.h (enum register_status): Add
3495 underlying type "signed char".
3496 * regcache.h (reg_buffer) <m_register_status>: Change type to
3497 register_status *.
3498 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3499 register_status instead of signed char.
3500 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3501 (reg_buffer::get_register_status): Remove cast.
3502 (readable_regcache::raw_read): Remove cast.
3503 (readable_regcache::cooked_read): Remove cast.
3504
77ad7394
TT
35052018-06-09 Tom Tromey <tom@tromey.com>
3506
3507 * source.c (reverse_search_command, forward_search_command): Use
3508 scoped_fd.
3509
191cca63
TT
35102018-06-09 Tom Tromey <tom@tromey.com>
3511
3512 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3513 (serial_ops_list): Now static, std::vector.
3514 (serial_interface_lookup, serial_add_interface): Update.
3515
c5d0225d
TT
35162018-06-09 Tom Tromey <tom@tromey.com>
3517
3518 * dwarf2read.c (process_cu_includes): Update.
3519 (process_full_comp_unit): Update.
3520 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3521 std::vector.
3522
aeab5128
PK
35232018-06-08 Paul Koning <paul_koning@dell.com>
3524
3525 PR gdb/23252
3526
3527 * python/python.c (do_start_initialization):
3528 Avoid call to internal Python API.
3529 (init__gdb_module): New function.
3530
5045b3d7
GB
35312018-06-08 Gary Benson <gbenson@redhat.com>
3532
3533 * linux-thread-db.c (valprint.h): New include.
3534 (struct check_thread_db_info): New structure.
3535 (check_thread_db_on_load, tdb_testinfo): New static globals.
3536 (check_thread_db, check_thread_db_callback): New functions.
3537 (try_thread_db_load_1): Run integrity checks if requested.
3538 (maintenance_check_libthread_db): New function.
3539 (_initialize_thread_db): Register "maint check libthread-db"
3540 and "maint set/show check-libthread-db".
3541 * NEWS: Mention the above new commands.
3542
2f4f025f
TT
35432018-06-08 Tom Tromey <tom@tromey.com>
3544
3545 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3546 now a method.
3547
343b0027
TT
35482018-06-08 Tom Tromey <tom@tromey.com>
3549
3550 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3551
8dcc53b3
TT
35522018-06-08 Tom Tromey <tom@tromey.com>
3553
3554 * common/btrace-common.h (struct btrace_data): Add constructor,
3555 destructor, move assignment operator.
3556 <empty, clear, fini>: New methods.
3557 <format>: Initialize.
3558 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3559 (btrace_data_empty): Don't declare.
3560 * common/btrace-common.c (btrace_data_init): Remove.
3561 (btrace_data::fini): Rename from btrace_data_fini.
3562 (btrace_data::empty): Rename from btrace_data_empty.
3563 (btrace_data::clear): Rename from btrace_data_clear. Return
3564 bool.
3565 * btrace.h (make_cleanup_btrace_data): Don't declare.
3566 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3567 (parse_xml_btrace): Update.
3568 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3569 (maint_btrace_clear_packet_history_cmd): Update.
3570
a1740ee1
PA
35712018-06-07 Pedro Alves <palves@redhat.com>
3572
3573 * target.h (target_ops) <beneath>: Now a method. All references
3574 updated.
3575 (class target_stack): New.
3576 * target.c (g_target_stack): New.
3577 (g_current_top_target): Delete.
3578 (current_top_target): Get the top target out of g_target_stack.
3579 (target_stack::push, target_stack::unpush): New.
3580 (push_target, unpush_target): Reimplement.
3581 (target_is_pushed): Reimplement in terms of g_target_stack.
3582 (target_ops::beneath, target_stack::find_beneath): New.
3583
d6ca69cd
PA
35842018-06-07 Pedro Alves <palves@redhat.com>
3585
3586 * target.h (find_target_beneath): Delete declaration.
3587 * target.c (find_target_beneath): Delete definition.
3588 * aix-thread.c: All callers of find_target_beneath adjusted to
3589 call target_ops::beneath instead.
3590 * bsd-uthread.c: Likewise.
3591 * linux-thread-db.c: Likewise.
3592 * ravenscar-thread.c: Likewise.
3593 * sol-thread.c: Likewise.
3594 * spu-multiarch.c: Likewise.
3595
b6a8c27b
PA
35962018-06-07 Pedro Alves <palves@redhat.com>
3597
3598 * target.h (target_ops) <beneath>: Now a method. All references
3599 updated.
3600 (target_ops) <m_beneath>: New.
3601 * target.c (target_ops::beneath): New.
3602 * corelow.c: Adjust all references to target_ops::beneath.
3603 * linux-thread-db.c: Likewise.
3604 * make-target-delegates: Likewise.
3605 * record-btrace.c: Likewise.
3606 * record-full.c: Likewise.
3607 * remote.c: Likewise.
3608 * target.c: Likewise.
3609 * target-delegates.c: Regenerate.
3610
8b88a78e
PA
36112018-06-07 Pedro Alves <palves@redhat.com>
3612
3613 * target.h (target_stack): Delete.
3614 (current_top_target): Declare function.
3615 * target.c (target_stack): Delete.
3616 (g_current_top_target): New.
3617 (current_top_target): New function.
3618 * auxv.c: Use current_top_target instead of target_stack
3619 throughout.
3620 * avr-tdep.c: Likewise.
3621 * breakpoint.c: Likewise.
3622 * corefile.c: Likewise.
3623 * elfread.c: Likewise.
3624 * eval.c: Likewise.
3625 * exceptions.c: Likewise.
3626 * frame.c: Likewise.
3627 * gdbarch-selftests.c: Likewise.
3628 * gnu-v3-abi.c: Likewise.
3629 * ia64-tdep.c: Likewise.
3630 * ia64-vms-tdep.c: Likewise.
3631 * infcall.c: Likewise.
3632 * infcmd.c: Likewise.
3633 * infrun.c: Likewise.
3634 * linespec.c: Likewise.
3635 * linux-tdep.c: Likewise.
3636 * minsyms.c: Likewise.
3637 * ppc-linux-nat.c: Likewise.
3638 * ppc-linux-tdep.c: Likewise.
3639 * procfs.c: Likewise.
3640 * regcache.c: Likewise.
3641 * remote.c: Likewise.
3642 * rs6000-tdep.c: Likewise.
3643 * s390-linux-nat.c: Likewise.
3644 * s390-tdep.c: Likewise.
3645 * solib-aix.c: Likewise.
3646 * solib-darwin.c: Likewise.
3647 * solib-dsbt.c: Likewise.
3648 * solib-spu.c: Likewise.
3649 * solib-svr4.c: Likewise.
3650 * solib-target.c: Likewise.
3651 * sparc-tdep.c: Likewise.
3652 * sparc64-tdep.c: Likewise.
3653 * spu-tdep.c: Likewise.
3654 * symfile.c: Likewise.
3655 * symtab.c: Likewise.
3656 * target-descriptions.c: Likewise.
3657 * target-memory.c: Likewise.
3658 * target.c: Likewise.
3659 * target.h: Likewise.
3660 * tracefile-tfile.c: Likewise.
3661 * tracepoint.c: Likewise.
3662 * valops.c: Likewise.
3663 * valprint.c: Likewise.
3664 * value.c: Likewise.
3665 * windows-tdep.c: Likewise.
3666 * mi/mi-main.c: Likewise.
3667
c7110220
TT
36682018-06-07 Tom Tromey <tom@tromey.com>
3669
3670 * valprint.h (build_address_symbolic): Declare.
3671 * printcmd.c (print_address_symbolic): Update.
3672 (build_address_symbolic): Change "name" and "filename" to
3673 std::string.
3674 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3675 Update.
3676 * defs.h (build_address_symbolic): Remove declaration.
3677
63bad7b6
AH
36782018-06-07 Alan Hayward <alan.hayward@arm.com>
3679
3680 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3681 (aarch64_vnv_type): Add function.
3682 (aarch64_pseudo_register_name): Add V regs for SVE.
3683 (aarch64_pseudo_register_type): Likewise.
3684 (aarch64_pseudo_register_reggroup_p): Likewise.
3685 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3686 (aarch64_pseudo_read_value): Add V regs for SVE.
3687 (aarch64_pseudo_write_2): Use V0 offset for SVE
3688 (aarch64_pseudo_write): Add V regs for SVE.
3689 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3690
13e3c608
SDJ
36912018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3692
3693 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3694 (sve_vl_from_vq): Likewise.
3695
c61b06a1
TT
36962018-06-05 Tom Tromey <tom@tromey.com>
3697
3698 * cli/cli-cmds.c (show_version): Update.
3699 * top.c (print_gdb_version): Add "interactive" parameter.
3700 Update.
3701 * main.c (captured_main_1): Update.
3702 * top.h (print_gdb_version): Add "interactive" parameter and a
3703 comment.
3704
115f7325
DM
37052018-06-05 David Malcolm <dmalcolm@redhat.com>
3706
3707 * common/enum-flags.h: Add trailing semicolon to example in
3708 comment.
3709
eb6af809
TT
37102018-06-05 Tom Tromey <tom@tromey.com>
3711
3712 PR cli/12326:
3713 * NEWS: Add entry about pager.
3714 * utils.c (pagination_disabled_for_command): New global.
3715 (prompt_for_continue): Allow "c" response to prompt.
3716 (reinitialize_more_filter): Clear
3717 pagination_disabled_for_command.
3718 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3719
54d343a2
TT
37202018-06-04 Tom Tromey <tom@tromey.com>
3721
3722 * ada-lang.h (ada_lookup_symbol_list): Update.
3723 * ada-lang.c (resolve_subexp): Update.
3724 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3725 parameter.
3726 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3727 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3728 results parameter to std::vector.
3729 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3730 Update.
3731 * ada-exp.y (block_lookup): Update.
3732 (select_possible_type_sym): Change type of syms. Remove nsyms
3733 parameter.
3734 (write_var_or_type, write_name_assoc): Update.
3735
178d6a63
JB
37362018-06-04 Joel Brobecker <brobecker@adacore.com>
3737
3738 * windows-nat.c (windows_nat_target::xfer_partial): Return
3739 TARGET_XFER_E_IO if we need to delegate to the target beneath
3740 but BENEATH is NULL.
3741
baf00c2d
SM
37422018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3743
3744 * Makefile.in (config.status): Add configure.nat as a
3745 dependency.
3746
214b073c
TT
37472018-06-04 Tom Tromey <tom@tromey.com>
3748
3749 * cp-name-parser.y (cpname_state): Add method declarations.
3750 (HANDLE_QUAL): Update.
3751 (cpname_state::d_grab, cpname_state::fill_comp)
3752 (cpname_state::make_operator, cpname_state::make_dtor)
3753 (cpname_state::make_builtin_type, cpname_state::make_name)
3754 (cpname_state::d_qualify, cpname_state::d_int_type)
3755 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3756 (%union): Move earlier.
3757
62b74cb8
AH
37582018-06-04 Alan Hayward <alan.hayward@arm.com>
3759
3760 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3761
3c5cd5c3
AH
37622018-06-04 Alan Hayward <alan.hayward@arm.com>
3763
3764 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3765 (aarch64_pseudo_write_1): Likewise.
3766 (aarch64_pseudo_read_value): Use helper.
3767 (aarch64_pseudo_write): Likewise.
3768
59f413d5
PA
37692018-06-04 Pedro Alves <palves@redhat.com>
3770
3771 * darwin-nat.c (darwin_ops): Delete.
3772 (darwin_attach_pid): Use get_native_target.
3773
1332a140
AH
37742018-06-04 Alan Hayward <alan.hayward@arm.com>
3775
3776 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3777 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3778
ba2d2bb2
AH
37792018-06-04 Alan Hayward <alan.hayward@arm.com>
3780
3781 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3782 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3783 (aarch64_gdbarch_init): Check for SVE.
3784 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3785
37862018-06-04 Alan Hayward <alan.hayward@arm.com>
39bfb937
AH
3787
3788 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3789 * aarch64-tdep.h (aarch64_read_description): Likewise.
3790 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3791 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3792 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3793 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3794 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3795
41c60b4b
SM
37962018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3797
3798 * value.c (value_fetch_lazy_bitfield): New.
3799 (value_fetch_lazy_memory): New.
3800 (value_fetch_lazy_register): New.
3801 (value_fetch_lazy): Factor out to smaller functions.
3802
7b640f72
TT
38032018-06-01 Tom Tromey <tom@tromey.com>
3804
3805 * cp-name-parser.y (backslashable, represented): Now const.
3806
98e69eb3
TT
38072018-06-01 Tom Tromey <tom@tromey.com>
3808
3809 * cp-name-parser.y: Include parser-defs.h.
3810 (parser_fprintf): Remove declaration.
3811
49265499
TT
38122018-06-01 Tom Tromey <tom@tromey.com>
3813
3814 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3815 %parse-param.
3816 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3817 (global_result): Remove globals.
3818 (struct cpname_state): New.
3819 (yyparse): Don't declare.
3820 (yylex, yyerror): Move declarations after %union.
3821 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3822 (make_name): Add state parameter.
3823 Update all callers.
3824 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3825 parameter.
3826 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3827 Update.
3828 (yylex): Add lvalp, state parameters.
3829 (yyerror): Add state parameter.
3830 (cp_demangled_name_to_comp): Update.
3831
55b6c984
TT
38322018-06-01 Tom Tromey <tom@tromey.com>
3833
3834 * cp-name-parser.y (parser_fprintf): Declare.
3835 (GDB_YY_REMAP_PREFIX): Define.
3836 Include yy-remap.h. Don't redefine yy* identifiers.
3837
3513a6bb
TT
38382018-06-01 Tom Tromey <tom@tromey.com>
3839
3840 * python/py-type.c (typy_legacy_template_argument): Update.
3841 * cp-support.h (cp_demangled_name_to_comp): Update.
3842 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3843 parameter to be a "std::string *".
3844 (main): Update.
3845
e9cb46ab
L
38462018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3847
3848 * ada-lex.l: Include "diagnostics.h" instead of
3849 "common/diagnostics.h".
3850 * unittests/environ-selftests.c: Likewise.
3851 * common/diagnostics.h: Moved to ../include.
3852
8e817061
JB
38532018-06-01 Joel Brobecker <brobecker@adacore.com>
3854
3855 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3856 to language_mode_manual while calling breakpoint_re_set_one.
3857
a737d952
TT
38582018-06-01 Tom Tromey <tom@tromey.com>
3859
3860 * valops.c (value_cast_structs, destructor_name_p): Update.
3861 * symtab.c (gdb_mangle_name): Update.
3862 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3863 Update.
3864 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3865 (pascal_object_print_value_fields, pascal_object_print_value):
3866 Update.
3867 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3868 * linespec.c (find_methods): Update.
3869 * gdbtypes.h (type_name_no_tag): Remove.
3870 (type_name_or_error): Rename from type_name_no_tag_or_error.
3871 * gdbtypes.c (type_name_no_tag): Remove.
3872 (type_name_or_error): Rename from type_name_no_tag_or_error.
3873 (lookup_struct_elt_type, check_typedef): Update.
3874 * expprint.c (print_subexp_standard): Update.
3875 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3876 * d-namespace.c (d_lookup_nested_symbol): Update.
3877 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3878 (cp_print_class_member): Update.
3879 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3880 * completer.c (add_struct_fields): Update.
3881 * c-typeprint.c (cp_type_print_derivation_info)
3882 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3883 Update.
3884 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3885 (ada_prefer_type, ada_is_exception_sym): Update.
3886
e86ca25f
TT
38872018-06-01 Tom Tromey <tom@tromey.com>
3888
3889 * valops.c (enum_constant_from_type, value_namespace_elt)
3890 (value_maybe_namespace_elt): Update.
3891 * valarith.c (find_size_for_pointer_math): Update.
3892 * target-descriptions.c (make_gdb_type): Update.
3893 * symmisc.c (print_symbol): Update.
3894 * stabsread.c (define_symbol, read_type)
3895 (complain_about_struct_wipeout, add_undefined_type)
3896 (cleanup_undefined_types_1): Update.
3897 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3898 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3899 (rust_internal_print_type, rust_composite_type)
3900 (rust_evaluate_funcall, rust_evaluate_subexp)
3901 (rust_inclusive_range_type_p): Update.
3902 * python/py-type.c (typy_get_tag): Update.
3903 * p-typeprint.c (pascal_type_print_base): Update.
3904 * mdebugread.c (parse_symbol, parse_type): Update.
3905 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3906 Update.
3907 * guile/scm-type.c (gdbscm_type_tag): Update.
3908 * go-lang.c (sixg_string_p): Update.
3909 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3910 Update.
3911 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3912 (TYPE_TAG_NAME): Remove.
3913 * gdbtypes.c (type_name_no_tag): Simplify.
3914 (check_typedef, check_types_equal, recursive_dump_type)
3915 (copy_type_recursive, arch_composite_type): Update.
3916 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3917 in summary mode when needed.
3918 * eval.c (evaluate_funcall): Update.
3919 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3920 (process_structure_scope, read_enumeration_type)
3921 (read_namespace_type, read_module_type, determine_prefix): Update.
3922 * cp-support.c (inspect_type): Update.
3923 * coffread.c (process_coff_symbol, decode_base_type): Update.
3924 * c-varobj.c (c_is_path_expr_parent): Update.
3925 * c-typeprint.c (c_type_print_base_struct_union): Update.
3926 (c_type_print_base_1): Update. Print struct/class/union/enum in
3927 summary when using C language.
3928 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3929 (gen_maybe_namespace_elt): Update.
3930 * ada-lang.c (ada_type_name): Simplify.
3931 (empty_record, ada_template_to_fixed_record_type_1)
3932 (template_to_static_fixed_type)
3933 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3934
c1ec8cea
TT
39352018-06-01 Tom Tromey <tom@tromey.com>
3936
3937 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3938 c_print_type.
3939 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3940 (c_print_type): Update.
3941 (c_print_type): New overload.
3942 (c_type_print_varspec_prefix, c_type_print_args)
3943 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3944 (c_type_print_base_struct_union, c_type_print_base_1)
3945 (cp_type_print_method_args): Add "language" parameter.
3946 (c_type_print_base): Update.
3947 * c-lang.h (c_print_type): Add new overload.
3948
bc8453a7
TT
39492018-06-01 Tom Tromey <tom@tromey.com>
3950
3951 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3952 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3953
739e8682
AH
39542018-06-01 Alan Hayward <alan.hayward@arm.com>
3955
3956 * aarch64-tdep.c (aarch64_sve_register_names): New const
3957 var.
3958 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3959 (AARCH64_SVE_Z_REGS_NUM): New define.
3960 (AARCH64_SVE_P_REGS_NUM): Likewise.
3961 (AARCH64_SVE_NUM_REGS): Likewise.
3962
8a60efe7
UB
39632018-05-31 Uros Bizjak <ubizjak@gmail.com>
3964
3965 * nat/linux-ptrace.h [__alpha__]
3966 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3967 definitions.
3968
4b2dfa9d
MR
39692018-05-31 Maciej W. Rozycki <macro@mips.com>
3970
3971 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3972 the endianness selected.
3973 * NEWS: Document `set endian auto' mode operation update.
3974
122394f1
AH
39752018-05-31 Alan Hayward <alan.hayward@arm.com>
3976
3977 * Makefile.in: Add new header.
3978 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3979 (sve_vl_from_vg): Likewise.
3980 (sve_vq_from_vl): Likewise.
3981 (sve_vl_from_vq): Likewise.
3982 (sve_vq_from_vg): Likewise.
3983 (sve_vg_from_vq): Likewise.
3984 * configure.nat: Add new c file.
3985 * nat/aarch64-sve-linux-ptrace.c: New file.
3986 * nat/aarch64-sve-linux-ptrace.h: New file.
3987
95228a0d
AH
39882018-05-31 Alan Hayward <alan.hayward@arm.com>
3989
3990 * aarch64-linux-nat.c (aarch64_linux_read_description):
3991 Add parmeter zero.
3992 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3993 Likewise.
3994 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3995 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3996 (aarch64_gdbarch_init): Add parmeter zero.
3997 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3998 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3999 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4000 parmeter.
4001 * doc/gdb.texinfo: Describe SVE feature
4002 * features/aarch64-sve.c: New file.
4003
5969f0db
OJ
40042018-05-31 Omair Javaid <omair.javaid@linaro.org>
4005
4006 PR gdb/23210
4007 * gdbarch.sh (significant_addr_bit): Default to zero when
4008 not set by target architecture.
4009 * gdbarch.c: Re-generated.
4010 * utils.c (address_significant): Update.
4011
61367c61
JB
40122018-05-30 Joel Brobecker <brobecker@adacore.com>
4013
4014 * stack.c (func_command): Remove trailing newline in call to error.
4015
34a79281
SM
40162018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4017
4018 * regcache.h (regcache_raw_collect): Remove, update callers to
4019 use regcache::raw_collect.
4020 * regcache.c (regcache_raw_collect): Remove.
4021
73e1c03f
SM
40222018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4023
4024 * regcache.h (regcache_raw_supply): Remove, update callers to
4025 use detached_regcache::raw_supply.
4026 * regcache.c (regcache_raw_supply): Remove.
4027
e4c4a59b
SM
40282018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4029
4030 * regcache.h (regcache_cooked_write_part): Remove, update
4031 callers to use regcache::cooked_write_part.
4032 * regcache.c (regcache_cooked_write_part): Remove.
4033
73bb0000
SM
40342018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4035
4036 * regcache.h (regcache_cooked_read_part): Remove, update callers
4037 to use readable_regcache::cooked_read_part.
4038 * regcache.c (regcache_cooked_read_part): Remove.
4039
46a45e9d
SM
40402018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4041
4042 * regcache.h (regcache_cooked_read_value): Remove, update
4043 callers to use readable_regcache::cooked_read_value.
4044 * regcache.c (regcache_cooked_read_value): Remove.
4045
b66f5587
SM
40462018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4047
4048 * regcache.h (regcache_cooked_write): Remove, update callers to
4049 use regcache::cooked_write.
4050 * regcache.c (regcache_cooked_write): Remove.
4051
6aa7d724
SM
40522018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4053
4054 * regcache.h (regcache_invalidate): Remove, update callers to
4055 use detached_regcache::invalidate instead.
4056 * regcache.c (regcache_invalidate): Remove.
4057
4f0420fd
SM
40582018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4059
4060 * regcache.h (regcache_raw_write_part): Remove, update callers
4061 to use regcache::raw_write_part instead.
4062 * regcache.c (regcache_raw_write_part): Remove.
4063
502fe83e
SM
40642018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4065
4066 * regcache.h (regcache_raw_read_part): Remove, update callers to
4067 use readable_regcache::raw_read_part instead.
4068 * regcache.c (regcache_raw_read_part): Remove.
4069
dca08e1f
SM
40702018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4071
4072 * regcache.h (regcache_cooked_read): Remove, update callers to
4073 use readable_regcache::cooked_read instead.
4074 * regcache.c (regcache_cooked_read): Remove.
4075
10eaee5f
SM
40762018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4077
4078 * regcache.h (regcache_raw_write): Remove, update callers to use
4079 regcache::raw_write instead.
4080 * regcache.c (regcache_raw_write): Remove.
4081
0b883586
SM
40822018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4083
4084 * regcache.h (regcache_raw_read): Remove, update callers to use
4085 readable_regcache::raw_read instead.
4086 * regcache.c (regcache_raw_read): Remove.
4087
0b47d985
SM
40882018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4089
4090 * regcache.h (regcache_raw_update): Remove, update callers to
4091 use readable_regcache::raw_update instead.
4092 * regcache.c (regcache_raw_update): Remove.
4093
0ec9f114
SM
40942018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4095
4096 * regcache.h (regcache_register_status): Remove, update callers
4097 to use reg_buffer::get_register_status directly instead.
4098 * regcache.c (regcache_register_status): Remove.
4099
222312d3
SM
41002018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4101
4102 * regcache.h (regcache_get_ptid): Remove, update all callers to
4103 call regcache::ptid instead.
4104 * regcache.c (regcache_get_ptid): Remove.
4105
fdbe37e3
SM
41062018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4107
4108 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4109
f7c6f423
PA
41102018-05-30 Pedro Alves <palves@redhat.com>
4111
4112 * common/common-exceptions.h (exception_rethrow): Use
4113 ATTRIBUTE_NORETURN.
4114
52941706
SM
41152018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4116
4117 * breakpoint.c (print_solib_event, check_status_catch_solib):
4118 Remove struct keyword in range-based for loops.
4119 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4120 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4121 Likewise.
4122 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4123 Likewise.
4124 * symfile.c (addr_info_make_relative): Likewise.
4125 * thread.c (value_in_thread_stack_temporaries): Likewise.
4126
bf2977b5
WP
41272018-06-12 Weimin Pan <weimin.pan@oracle.com>
4128
4129 PR gdb/16841
4130 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4131 aggregate type to get its real type before accessing it.
4132
64cc34d8
WP
41332018-05-29 Weimin Pan <weimin.pan@oracle.com>
4134
4135 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4136 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4137 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4138 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4139 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4140 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4141 * printcmd.c (info_address_command): Likewise.
4142
e7ec8713
TT
41432018-05-29 Tom Tromey <tom@tromey.com>
4144
4145 * windows-nat.c (handle_exception): Update fall-through comment.
4146
bcb430e4
TT
41472018-05-29 Tom Tromey <tom@tromey.com>
4148
4149 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4150 (struct program_space) <added_solibs>: Now a std::vector.
4151 * breakpoint.c (print_solib_event): Update.
4152 (check_status_catch_solib): Update.
4153 * progspace.c (clear_program_space_solib_cache): Update.
4154 * solib.c (update_solib_list): Update.
4155
894882e3
TT
41562018-05-29 Tom Tromey <tom@tromey.com>
4157
4158 * python/py-type.c (typy_richcompare): Update.
4159 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4160 * gdbtypes.h (types_deeply_equal): Return bool.
4161 (types_equal): Likewise.
4162 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4163 declare VEC.
4164 (check_types_equal): Change worklist to std::vector. Return
4165 bool.
4166 (struct type_equality_entry): Add constructor.
4167 (compare_maybe_null_strings): Return bool.
4168 (check_types_worklist): Return bool. Change worklist to
4169 std::vector.
4170 (types_deeply_equal): Use std::vector.
4171 (types_equal): Return bool.
4172 (compare_maybe_null_strings): Simplify.
4173
10b2ded4
TT
41742018-05-29 Tom Tromey <tom@tromey.com>
4175
4176 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4177
4f7deebe
TT
41782018-05-29 Tom Tromey <tom@tromey.com>
4179
4180 * objc-lang.h: Don't include cp-support.h.
4181 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4182 declare VEC.
4183
b8283aea
TT
41842018-05-27 Tom Tromey <tom@tromey.com>
4185
4186 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4187
41a883c8
TT
41882018-05-25 Tom Tromey <tom@tromey.com>
4189
4190 * value.c (value::location): Initialize.
4191
bf259e25
TT
41922018-05-25 Tom Tromey <tom@tromey.com>
4193
4194 * dbxread.c (init_bincl_list): Remove.
4195 (bincl_list): Now a std::vector.
4196 (bincls_allocated, next_bincl): Remove.
4197 (free_bincl_list, do_free_bincl_list_cleanup)
4198 (make_cleanup_free_bincl_list): Remove.
4199 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4200 unique_xmalloc_ptr.
4201 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4202 (struct header_file_location): Add constructor.
4203 (add_bincl_to_list): Remove.
4204
d525a99b
TT
42052018-05-25 Tom Tromey <tom@tromey.com>
4206
4207 * tui/tui.c (tui_enable): Update.
4208 * mi/mi-interp.c (mi_interp::init): Update.
4209 * interps.h (class interp) <name>: New method.
4210 <m_name>: Rename from name.
4211 (~scoped_restore_interp): Update.
4212 * interps.c (interp::interp): Update.
4213 (interp_add, interp_set, interp_lookup_existing)
4214 (current_interp_named_p): Update.
4215
da505cff
TT
42162018-05-25 Tom Tromey <tom@tromey.com>
4217
4218 * interps.c (interp_name): Remove.
4219 * mi/mi-interp.c (mi_interp::init): Update.
4220 * interps.h (interp_name): Remove.
4221 (~scoped_restore_interp): Update.
4222 * tui/tui.c (tui_enable): Update.
4223
29f94340
TT
42242018-05-25 Tom Tromey <tom@tromey.com>
4225
4226 * utils.c (fputs_maybe_filtered): Update.
4227 * linespec.c (decode_line_full): Update.
4228 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4229 (mi_print_breakpoint_for_event, mi_solib_loaded)
4230 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4231 (mi_user_selected_context_changed): Update.
4232 * mi/mi-main.c (mi_execute_command): Update.
4233 * cli/cli-script.c (execute_control_command): Update.
4234 * python/python.c (execute_gdb_command): Update.
4235 * solib.c (info_sharedlibrary_command): Update.
4236 * interps.c (interp_ui_out): Remove.
4237 * interps.h (interp_ui_out): Remove.
4238
716b8bc5
TT
42392018-05-25 Tom Tromey <tom@tromey.com>
4240
4241 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4242 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4243 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4244
753ff9bd
TT
42452018-05-25 Tom Tromey <tom@tromey.com>
4246
4247 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4248 * interps.c (interp_exec): Use scoped_restore.
4249
5ca3b260
TT
42502018-05-25 Tom Tromey <tom@tromey.com>
4251
4252 * remote.c (remote_target::remote_file_get): Use
4253 gdb::byte_vector.
4254 (remote_target::remote_file_put): Likewise.
4255
3173aa2f
TT
42562018-05-25 Tom Tromey <tom@tromey.com>
4257
4258 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4259 a std::string.
4260 (get_pe_section_index, add_pe_exported_sym): Update.
4261 (read_pe_exported_syms): Use gdb::def_vector.
4262
09a5e1b5
TT
42632018-05-25 Tom Tromey <tom@tromey.com>
4264
4265 * frame.c (remove_prev_frame): Remove.
4266 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4267
d8dab6c3
MR
42682018-05-25 Maciej W. Rozycki <macro@mips.com>
4269
4270 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4271 Remove prototypes.
4272 * mips-linux-nat.c (supply_fpregset): Always call
4273 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4274 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4275 `mips_fill_fpregset'.
4276 * mips-linux-tdep.c (mips_supply_fpregset)
4277 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4278 (mips_fill_fpregset_wrapper): Remove functions.
4279 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4280 (mips_linux_fpregset): Remove variable.
4281 (mips_linux_iterate_over_regset_sections): Use
4282 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4283 (mips_linux_o32_sigframe_init): Remove comment.
4284
3c69da40
PA
42852018-05-25 Pedro Alves <palves@redhat.com>
4286
4287 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4288 (struct readahead_cache, struct packet_reg, struct
4289 remote_arch_state, class remote_state): Move higher up in the
4290 file.
4291 (remote_target::m_remote_state): Now an object instead of a pointer.
4292 (remote_target::get_remote_state): Adjust.
4293
39f0c204
AB
42942018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4295
4296 * stack.c (select_and_print_frame): Delete.
4297 (struct function_bounds): Move struct within function.
4298 (func_command): Most content moved into new function
4299 find_frame_for_function, use new function, print result, add
4300 function comment.
4301 (find_frame_for_function): New function, now returns a result.
4302
d392224a
PW
43032018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4304
4305 * stack.c (iterate_over_block_arg_vars): Fix comment.
4306 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4307
45f25d6c
AB
43082018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4309
4310 PR gdb/23203
4311 * frame.c
4312 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4313 Define.
4314 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4315 Define.
4316 * frame.h (class scoped_restore_selected_frame): New class.
4317 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4318 of any exception, use scoped_restore_selected_frame to restore the
4319 frame instead.
4320
da05d921
PA
43212018-05-24 Pedro Alves <palves@redhat.com>
4322
4323 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4324 override.
4325
a8be540e
TT
43262018-05-23 Tom Tromey <tom@tromey.com>
4327
4328 * complaints.c (struct complaints): Remove.
4329 (symfile_complaint_book): Remove.
4330 (series): New global.
4331 (complaint_internal): Update.
4332 (clear_complaints): Update.
4333
ff1cf532
TT
43342018-05-23 Tom Tromey <tom@tromey.com>
4335
4336 * complaints.c (counters): New global.
4337 (struct complain): Remove.
4338 (struct complaints) <root>: Remove.
4339 (complaint_sentinel): Remove.
4340 (symfile_complaint_book): Update.
4341 (find_complaint) Remove.
4342 (complaint_internal, clear_complaints): Update.
4343
7ff88174
TT
43442018-05-23 Tom Tromey <tom@tromey.com>
4345
4346 * complaints.c (struct complain) <file, line>: Remove.
4347 (find_complaint): Remove file, line parameters.
4348 (complaint_internal): Update.
4349
de54e1a5
TT
43502018-05-23 Tom Tromey <tom@tromey.com>
4351
4352 * complaints.c (vcomplaint): Remove.
4353 (complaint_internal) Merge in contents of vcomplaint.
4354
2ac237e5
TT
43552018-05-23 Tom Tromey <tom@tromey.com>
4356
4357 * complaints.c (struct complaints) <explanation>: Remove.
4358 (symfile_explanations): Remove.
4359 (symfile_complaint_book): Update.
4360 (vcomplaint): Update.
4361 (struct explanation): Remove.
4362
b98664d3
TT
43632018-05-23 Tom Tromey <tom@tromey.com>
4364
4365 * complaints.c (symfile_complaints): Remove.
4366 (complaint_internal): Remove "complaints" parameter.
4367 (clear_complaints, vcomplaint): Remove "c" parameter.
4368 (get_complaints): Remove.
4369 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4370 (dwarf2_debug_line_missing_file_complaint)
4371 (dwarf2_debug_line_missing_end_sequence_complaint)
4372 (dwarf2_complex_location_expr_complaint)
4373 (dwarf2_const_value_length_mismatch_complaint)
4374 (dwarf2_section_buffer_overflow_complaint)
4375 (dwarf2_macro_malformed_definition_complaint)
4376 (dwarf2_invalid_attrib_class_complaint)
4377 (create_addrmap_from_index, dw2_symtab_iter_next)
4378 (dw2_expand_marked_cus)
4379 (dw2_debug_names_iterator::find_vec_in_debug_names)
4380 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4381 (create_debug_type_hash_table, init_cutu_and_read_dies)
4382 (partial_die_parent_scope, add_partial_enumeration)
4383 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4384 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4385 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4386 (create_cus_hash_table, create_dwp_hash_table)
4387 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4388 (dwarf2_rnglists_process, dwarf2_ranges_process)
4389 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4390 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4391 (handle_struct_member_die, process_structure_scope)
4392 (read_array_type, read_common_block, read_module_type)
4393 (read_tag_pointer_type, read_typedef, read_base_type)
4394 (read_subrange_type, load_partial_dies, partial_die_info::read)
4395 (partial_die_info::read, partial_die_info::read)
4396 (partial_die_info::read, read_checked_initial_length_and_offset)
4397 (dwarf2_string_attr, read_formatted_entries)
4398 (dwarf_decode_line_header)
4399 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4400 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4401 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4402 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4403 (get_signatured_type, get_DW_AT_signature_type)
4404 (decode_locdesc, file_file_name, consume_improper_spaces)
4405 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4406 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4407 (dwarf2_symbol_mark_computed, set_die_type)
4408 (read_attribute_value): Update.
4409 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4410 Update.
4411 * dbxread.c (unknown_symtype_complaint)
4412 (lbrac_mismatch_complaint, repeated_header_complaint)
4413 (set_namestring, function_outside_compilation_unit_complaint)
4414 (read_dbx_symtab, process_one_symbol): Update.
4415 * gdbtypes.c (stub_noname_complaint): Update.
4416 * windows-nat.c (handle_unload_dll): Update.
4417 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4418 (decode_base_type): Update.
4419 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4420 (eb_complaint, record_include_begin, record_include_end)
4421 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4422 (process_xcoff_symbol, read_symbol)
4423 (function_outside_compilation_unit_complaint)
4424 (scan_xcoff_symtab): Update.
4425 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4426 * buildsym.c (finish_block_internal, make_blockvector)
4427 (end_symtab_get_static_block, augment_type_symtab): Update.
4428 * dtrace-probe.c (dtrace_process_dof)
4429 (dtrace_static_probe_ops::get_probes): Update.
4430 * complaints.h (struct complaint): Don't declare.
4431 (symfile_complaints): Remove.
4432 (complaint_internal): Remove "complaints" parameter.
4433 (complaint): Likewise.
4434 (clear_complaints): Likewise.
4435 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4436 (reread_symbols): Update.
4437 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4438 (dwarf2_frame_cache, decode_frame_entry): Update.
4439 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4440 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4441 (info_selectors_command): Update.
4442 * macrotab.c (macro_include, check_for_redefinition)
4443 (macro_undef): Update.
4444 * objfiles.c (filter_overlapping_sections): Update.
4445 * stabsread.c (invalid_cpp_abbrev_complaint)
4446 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4447 (define_symbol, error_type, read_type, rs6000_builtin_type)
4448 (stabs_method_name_from_physname, read_member_functions)
4449 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4450 (attach_fields_to_type, complain_about_struct_wipeout)
4451 (read_range_type, read_args, common_block_start)
4452 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4453 Update.
4454 * mdebugread.c (index_complaint, unknown_ext_complaint)
4455 (basic_type_complaint, bad_tag_guess_complaint)
4456 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4457 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4458 (parse_procedure, parse_lines)
4459 (function_outside_compilation_unit_complaint)
4460 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4461 (bad_tag_guess_complaint, reg_value_complaint): Update.
4462 * cp-support.c (demangled_name_complaint): Update.
4463 * macroscope.c (sal_macro_scope): Update.
4464 * dwarf-index-write.c (class debug_names): Update.
4465
4e9668d0
TT
44662018-05-23 Tom Tromey <tom@tromey.com>
4467
4468 * complaints.c (clear_complaints): Remove "noisy" parameter.
4469 * complaints.h (clear_complaints): Update.
4470 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4471 (reread_symbols): Update.
4472
43ba33c7
TT
44732018-05-23 Tom Tromey <tom@tromey.com>
4474
4475 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4476 SUBSEQUENT_MESSAGE.
4477 (vcomplaint, clear_complaints): Update.
4478 (symfile_explanations): Remove some messages.
4479
2b9496b2
TT
44802018-05-23 Tom Tromey <tom@tromey.com>
4481
4482 * complaints.c (internal_complaint): Remove.
4483 * complaints.h (internal_complaint): Remove.
4484
35f1fea3
MR
44852018-05-22 Maciej W. Rozycki <macro@mips.com>
4486
4487 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4488
6b8edb51
PA
44892018-05-22 Pedro Alves <palves@redhat.com>
4490
4491 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4492 (remote_fileio_badfd, remote_fileio_return_errno)
4493 (remote_fileio_return_success, remote_fileio_func_open)
4494 (remote_fileio_func_open, remote_fileio_func_close)
4495 (remote_fileio_func_read, remote_fileio_func_write)
4496 (remote_fileio_func_lseek, remote_fileio_func_rename)
4497 (remote_fileio_func_unlink, remote_fileio_func_stat)
4498 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4499 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4500 remote_target parameter.
4501 (remote_fio_func_map) <func>: Add remote_target parameter.
4502 (do_remote_fileio_request, remote_fileio_request):
4503 * remote-fileio.h (remote_fileio_request):
4504 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4505 remote_target parameter.
4506 (remote_notif_process, handle_notification): Adjust to pass down
4507 the remote.
4508 (remote_notif_state_allocate): Add remote_target parameter. Save
4509 it.
4510 * remote-notif.h (struct remote_target): Forward declare.
4511 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4512 remote_target parameter.
4513 (struct remote_notif_state) <remote>: New field.
4514 (remote_notif_ack, remote_notif_parse): Add remote_target
4515 parameter.
4516 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4517 remote_target parameter.
4518 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4519 (threads_listing_context, rmt_thread_action, protocol_feature)
4520 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4521 (packet_result, struct threads_listing_context, remote_state):
4522 Move definitions and declarations higher up.
4523 (remote_target) <~remote_target>: Declare.
4524 (remote_download_command_source, remote_file_put, remote_file_get)
4525 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4526 (remote_hostio_pread_vFile, remote_hostio_send_command)
4527 (remote_hostio_set_filesystem, remote_hostio_open)
4528 (remote_hostio_close, remote_hostio_unlink, remote_state)
4529 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4530 (get_memory_write_packet_size, get_memory_read_packet_size)
4531 (append_pending_thread_resumptions, remote_detach_1)
4532 (append_resumption, remote_resume_with_vcont)
4533 (add_current_inferior_and_thread, wait_ns, wait_as)
4534 (process_stop_reply, remote_notice_new_inferior)
4535 (process_initial_stop_replies, remote_add_thread)
4536 (btrace_sync_conf, remote_btrace_maybe_reopen)
4537 (remove_new_fork_children, kill_new_fork_children)
4538 (discard_pending_stop_replies, stop_reply_queue_length)
4539 (check_pending_events_prevent_wildcard_vcont)
4540 (discard_pending_stop_replies_in_queue, stop_reply)
4541 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4542 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4543 (remote_interrupt_as, remote_interrupt_ns)
4544 (remote_get_noisy_reply, remote_query_attached)
4545 (remote_add_inferior, remote_current_thread, get_current_thread)
4546 (set_thread, set_general_thread, set_continue_thread)
4547 (set_general_process, write_ptid)
4548 (remote_unpack_thread_info_response, remote_get_threadinfo)
4549 (parse_threadlist_response, remote_get_threadlist)
4550 (remote_threadlist_iterator, remote_get_threads_with_ql)
4551 (remote_get_threads_with_qxfer)
4552 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4553 (get_offsets, remote_check_symbols, remote_supported_packet)
4554 (remote_query_supported, remote_packet_size)
4555 (remote_serial_quit_handler, remote_detach_pid)
4556 (remote_vcont_probe, remote_resume_with_hc)
4557 (send_interrupt_sequence, interrupt_query)
4558 (remote_notif_get_pending_events, fetch_register_using_p)
4559 (send_g_packet, process_g_packet, fetch_registers_using_g)
4560 (store_register_using_P, store_registers_using_G)
4561 (set_remote_traceframe, check_binary_download)
4562 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4563 (remote_xfer_live_readonly_partial, remote_read_bytes)
4564 (remote_send_printf, remote_flash_write, readchar)
4565 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4566 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4567 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4568 (extended_remote_disable_randomization, extended_remote_run)
4569 (send_environment_packet, extended_remote_environment_support)
4570 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4571 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4572 (packet_command): Now methods of ...
4573 (remote_target): ... this class.
4574 (m_remote_state) <remote_target>: New field.
4575 (struct remote_state) <stop_reply_queue,
4576 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4577 fields.
4578 (remote_state::remote_state): Allocate stop_reply_queue.
4579 (remote_state): Delete global.
4580 (get_remote_state_raw): Delete.
4581 (remote_target::get_remote_state): Allocate m_remote_state on
4582 demand.
4583 (get_current_remote_target): New.
4584 (remote_ops, extended_remote_ops): Delete.
4585 (wait_forever_enabled_p, remote_async_inferior_event_token):
4586 Delete, moved to struct remote_state.
4587 (remote_target::close): Delete self. Destruction bits split to
4588 ...
4589 (remote_target::~remote_target): ... this.
4590 (show_memory_packet_size): Adjust to use
4591 get_current_remote_target.
4592 (struct protocol_feature) <func>: Add remote_target parameter.
4593 All callers adjusted.
4594 (curr_quit_handler_target): New.
4595 (remote_serial_quit_handler): Reimplement.
4596 (remote_target::open_1): Adjust to use get_current_remote_target.
4597 Heap-allocate remote_target/extended_remote_target instances.
4598 (vcont_builder::vcont_builder): Add remote_target parameter, and
4599 save it in m_remote. All callers adjusted.
4600 (vcont_builder::m_remote): New field.
4601 (vcont_builder::restart, vcont_builder::flush)
4602 (vcont_builder::push_action): Use it.
4603 (remote_target::commit_resume): Use it.
4604 (struct queue_iter_param) <remote>: New field.
4605 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4606 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4607 (check_pending_event_prevents_wildcard_vcont_callback)
4608 (remote_target::check_pending_events_prevent_wildcard_vcont)
4609 (remote_target::discard_pending_stop_replies)
4610 (remote_target::discard_pending_stop_replies_in_queue)
4611 (remote_target::remote_notif_remove_queued_reply): Fill in
4612 'remote' field.
4613 (remote_notif_get_pending_events): New.
4614 (remote_target::readchar, remote_target::remote_serial_write):
4615 Save/restore curr_quit_handler_target.
4616 (putpkt): New.
4617 (kill_new_fork_children): Fill in 'remote' field.
4618 (packet_command): Use get_current_remote_target, defer to
4619 remote_target method of same name.
4620 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4621 parameter, and save it in m_remote. All callers adjusted.
4622 (scoped_remote_fd::release): Use m_remote.
4623 (scoped_remote_fd::m_remote): New field.
4624 (remote_file_put, remote_file_get, remote_file_delete): Use
4625 get_current_remote_target, defer to remote_target method of same
4626 name.
4627 (remote_btrace_reset): Add remote_state paremeter. Update all
4628 callers.
4629 (remote_async_inferior_event_handler). Pass down 'data'.
4630 (remote_new_objfile): Use get_current_remote_target.
4631 (remote_target::vcont_r_supported): New.
4632 (set_range_stepping): Use get_current_remote_target and
4633 remote_target::vcont_r_supported.
4634 (_initialize_remote): Don't allocate 'remote_state' and
4635 'stop_reply_queue' globals.
4636 * remote.h (struct remote_target): Forward declare.
4637 (getpkt, putpkt, remote_notif_get_pending_events): Add
4638 'remote_target' parameter.
4639
f5db4863
PA
46402018-05-22 Pedro Alves <palves@redhat.com>
4641
4642 * remote.c (vcont_builder): Now a class. Make all data members
4643 private.
4644 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4645 Declare methods.
4646 (vcont_builder_restart): Rename to ...
4647 (vcont_builder::restart): ... this.
4648 (vcont_builder_flush): Rename to ...
4649 (vcont_builder::flush): ... this.
4650 (vcont_builder_push_action): Rename to ...
4651 (vcont_builder::push_action): ... this.
4652 (remote_target::commit_resume): Adjust.
4653
cc0be08f
PA
46542018-05-22 Pedro Alves <palves@redhat.com>
4655
4656 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4657 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4658 (get_fixed_memory_packet_size): New.
4659 (get_memory_packet_size): Use it.
4660 (set_memory_packet_size): Don't override the config size with
4661 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4662 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4663 Don't refer to get_memory_packet_size if not connected to a remote
4664 target. Show "(default)" if configured size is 0.
4665
9607784a
PA
46662018-05-22 Pedro Alves <palves@redhat.com>
4667
4668 * remote.c (remote_target::mourn_inferior): Move
4669 discard_pending_stop_replies call here from ...
4670 (_initialize_remote): ... here.
4671
0e9a6b2f
PA
46722018-05-22 Pedro Alves <palves@redhat.com>
4673
4674 * remote.c (compare_section_command): Remove set_general_process
4675 call.
4676
43c3a0e4
PA
46772018-05-22 Pedro Alves <palves@redhat.com>
4678
4679 * remote.c (struct packet_reg, struct remote_arch_state):
4680 Move higher up in the file.
4681 (remote_state) <m_arch_states>: Store remote_arch_state values
4682 instead of remote_arch_state pointers.
4683 (remote_state::get_remote_arch_state): Adjust.
4684
9d6eea31
PA
46852018-05-22 Pedro Alves <palves@redhat.com>
4686
4687 * remote.c: Include <unordered_map>.
4688 (remote_state): Now a class.
4689 (remote_state) <get_remote_arch_state>: Declare method.
4690 <get_remote_arch_state>: New field.
4691 (remote_arch_state) <remote_arch_state>: Declare ctor.
4692 <regs>: Now a unique_ptr.
4693 (remote_gdbarch_data_handle): Delete.
4694 (get_remote_arch_state): Delete.
4695 (remote_state::get_remote_arch_state): New.
4696 (get_remote_state): Adjust to call remote_state's
4697 get_remote_arch_state method.
4698 (init_remote_state): Delete, bits factored out to ...
4699 (remote_arch_state::remote_arch_state): ... this new method.
4700 (get_remote_packet_size, get_memory_packet_size)
4701 (process_g_packet, remote_target::fetch_registers)
4702 (remote_target::prepare_to_store, store_registers_using_G)
4703 (remote_target::store_registers, remote_target::get_trace_status):
4704 Adjust to call remote_state's method.
4705 (_initialize_remote): Remove reference to
4706 remote_gdbarch_data_handle.
4707
dd194f6b
PA
47082018-05-22 Pedro Alves <palves@redhat.com>
4709
4710 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4711 pread>: New method declarations.
4712 (remote_target::open_1): Adjust.
4713 (readahead_cache_invalidate): Rename to ...
4714 (readahead_cache::invalidate): ... this, and adjust to be a class
4715 method.
4716 (readahead_cache_invalidate_fd): Rename to ...
4717 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4718 class method.
4719 (remote_hostio_pwrite): Adjust.
4720 (remote_hostio_pread_from_cache): Rename to ...
4721 (readahead_cache::pread): ... this, and adjust to be a class
4722 method.
4723 (remote_hostio_close): Adjust.
4724
440b7aec
PA
47252018-05-22 Pedro Alves <palves@redhat.com>
4726
4727 * remote.c (remote_hostio_close_cleanup): Delete.
4728 (class scoped_remote_fd): New.
4729 (remote_file_put, remote_file_get): Use it.
4730
de44f5a7
PA
47312018-05-22 Pedro Alves <palves@redhat.com>
4732
4733 (struct vCont_action_support): Use bool and initialize all fields.
4734 (struct readahead_cache): Initialize all fields.
4735 (remote_state): Use bool and initialize all fields.
4736 (remote_state::remote_state, remote_state::~remote_state): New.
4737 (new_remote_state): Delete.
4738 (_initialize_remote): Use new to allocate remote_state.
4739
b1b60145
PA
47402018-05-22 Pedro Alves <palves@redhat.com>
4741 張俊芝 <zjz@zjz.name>
4742
4743 PR gdb/22973
4744 * c-exp.y: Include "c-support.h".
4745 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4746 of tolower. Use c_ident_is_alpha to scan names.
4747 * c-lang.c: Include "c-support.h".
4748 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4749 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4750 * c-support.h: New file, with bits factored out from ...
4751 * cp-name-parser.y: ... this file.
4752 Include "c-support.h".
4753 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4754 c-support.h and renamed.
4755 (symbol_end, yylex): Adjust.
4756
0ec848ad
PFC
47572018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4758
4759 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4760 parameter type to CORE_ADDR.
4761 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4762 parameter type in declaration to CORE_ADDR.
4763 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4764 target_auxv_search to get AT_HWCAP and use the result to get the
4765 target description.
4766 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4767 to CORE_ADDR. Remove the cast of the return value to unsigned
4768 long. Fix error predicate of target_auxv_search.
4769 (ppc_linux_nat_target::read_description): Change the type of the
4770 hwcap variable to CORE_ADDR.
4771
0fb2aaa1
PFC
47722018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4773
4774 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4775 if the size of fpscr is larger than 32 bits.
4776
2c3305f6
PFC
47772018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4778
4779 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4780 (ppc32_linux_vsxregmap): New global.
4781 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4782 regcache_supply_regset, and regcache_collect_regset.
4783 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4784 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4785 (fetch_vsx_register, store_vsx_register): Remove.
4786 (fetch_vsx_registers): Add regno parameter. Get regset using
4787 ppc_linux_vsxregset. Use regset to supply registers.
4788 (store_vsx_registers): Add regno parameter. Get regset using
4789 ppc_linux_vsxregset. Use regset to collect registers.
4790 (fetch_register): Call fetch_vsx_registers instead of
4791 fetch_vsx_register.
4792 (store_register): Call store_vsx_registers instead of
4793 store_vsx_register.
4794 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4795 new regno parameter.
4796 (store_ppc_registers): Call store_vsx_registers with -1 for the
4797 new regno parameter.
4798 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4799 (ppc_collect_vsxregset): Remove.
4800
1d75a658
PFC
48012018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4802
4803 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4804 offset fields.
4805 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4806 for vector register offset fields.
4807 (ppc64_fbsd_reg_offsets): Likewise.
4808 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4809 to vector register offset fields.
4810 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4811 to vector register offset fields.
4812 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4813 vector register offset fields.
4814 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4815 initializers for vector register offset fields.
4816 (rs6000_aix64_reg_offsets): Likewise.
4817 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4818 (ppc_supply_vrregset): Remove.
4819 (ppc_collect_vrregset): Remove.
4820 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4821 (ppc_linux_vrregset) : New function.
4822 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4823 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4824 (ppc32_linux_vrregset): Remove.
4825 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4826 and use result instead of ppc32_linux_vrregset.
4827 (ppc32_linux_reg_offsets): Remove initializers for vector register
4828 offset fields.
4829 (ppc64_linux_reg_offsets): Likewise.
4830 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4831 * ppc-linux-nat.c: Include regset.h.
4832 (gdb_vrregset_t): Adjust comment to account for little-endian
4833 mode.
4834 (supply_vrregset, fill_vrregset): Remove.
4835 (fetch_altivec_register, store_altivec_register): Remove.
4836 (fetch_altivec_registers): Add regno parameter. Get regset using
4837 ppc_linux_vrregset. Use regset to supply registers.
4838 (store_altivec_registers): Add regno parameter. Get regset using
4839 ppc_linux_vrregset. Use regset to collect registers.
4840 (fetch_register): Call fetch_altivec_registers instead of
4841 fetch_altivec_register.
4842 (store_register): Call store_altivec_registers instead of
4843 store_altivec_register.
4844 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4845 the new regno parameter.
4846 (store_ppc_registers): Call store_altivec_registers with -1 for
4847 the new regno parameter.
4848
d078308a
PFC
48492018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4850
4851 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4852 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4853 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4854 (gdb_vrregset_t): Change array type size to
4855 PPC_LINUX_SIZEOF_VRREGSET.
4856 (gdb_vsxregset_t): Change array type size to
4857 PPC_LINUX_SIZEOF_VSXREGSET.
4858 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4859 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4860 PPC_LINUX_SIZEOF_VSXREGSET.
4861
2e077f5e
PFC
48622018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4863
4864 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4865 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4866 nat/ppc-linux.c.
4867 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4868 ppc_linux_target_wordsize with tid.
4869 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4870 wordsize with tid.
4871 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4872 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4873 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4874 tid parameter. Remove static specifier.
4875 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4876 (ppc_linux_target_wordsize): New declaration.
4877
bd64614e
PFC
48782018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4879
4880 * arch/ppc-linux-common.c: New file.
4881 * arch/ppc-linux-common.h: New file.
4882 * arch/ppc-linux-tdesc.h: New file.
4883 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4884 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4885 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4886 arch/ppc-linux-tdesc.h.
4887 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4888 arch/ppc-linux-tdesc.h.
4889 (ppc_linux_nat_target::read_description): Remove target
4890 description matching code. Fill a ppc_linux_features struct and
4891 call ppc_linux_match_description with it. Move comment about ISA
4892 2.05 to ppc-linux-common.c.
4893 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4894 arch/ppc-linux-tdesc.h.
4895 (ppc_linux_core_read_description): Remove target description
4896 matching code. Fill a ppc_linux_features struct and call
4897 ppc_linux_match_description with it.
4898 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4899 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4900 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4901 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4902 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4903 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4904 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4905 (tdesc_powerpc_e500l): Remove.
4906
241db429
JB
49072018-05-22 Joel Brobecker <brobecker@adacore.com>
4908
4909 * ada-lang.c (catch_assert_command): Pass empty string instead
4910 of NULL for excep_string argument.
4911
75d74cca
MR
49122018-05-22 Maciej W. Rozycki <macro@mips.com>
4913
4914 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4915 the width of the requested register exceeds the width of the
4916 `ptrace' data type.
4917
122b53ea
TT
49182018-05-21 Tom Tromey <tom@tromey.com>
4919
4920 * printcmd.c (output_command): Remove.
4921 (output_command_const): Rename to output_command.
4922 * valprint.h (output_command): Rename from output_command_const.
4923 * tracepoint.c (trace_dump_actions): Call output_command.
4924
bc18fbb5
TT
49252018-05-21 Tom Tromey <tom@tromey.com>
4926
4927 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4928 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4929 * ada-lang.h (create_ada_exception_catchpoint): Update.
4930 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4931 std::string.
4932 (create_excep_cond_exprs, ~ada_catchpoint)
4933 (should_stop_exception, print_one_exception)
4934 (print_mention_exception, print_recreate_exception): Update.
4935 (ada_get_next_arg): Remove.
4936 (catch_ada_exception_command_split): Use std::string. Change type
4937 of "excep_string", "cond_string".
4938 (catch_ada_exception_command): Update.
4939 (create_ada_exception_catchpoint): Change type of excep_string.
4940 (ada_exception_sal): Remove excep_string parameter.
4941 (~ada_catchpoint): Remove.
4942
790217f6
TT
49432018-05-21 Tom Tromey <tom@tromey.com>
4944
4945 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4946 cleanup.
4947
6f46ac85
TT
49482018-05-21 Tom Tromey <tom@tromey.com>
4949
4950 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4951 Return unique_xmalloc_ptr.
4952 (print_it_exception): Update.
4953
15b6611c
TT
49542018-05-21 Tom Tromey <tom@tromey.com>
4955
4956 * tracepoint.c (trace_dump_actions): Use std::string.
4957
c0c9f665
TT
49582018-05-21 Tom Tromey <tom@tromey.com>
4959
4960 * symfile.c (reread_symbols): Use std::string for original_name.
4961
22ca247e
TT
49622018-05-21 Tom Tromey <tom@tromey.com>
4963
4964 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4965 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4966 constructor.
4967
184cde75
SM
49682018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4969
4970 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4971 instance to...
4972 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4973 * objfiles.c (get_objfile_bfd_data): Allocate
4974 objfile_per_bfd_storage with obstack_new when allocating on
4975 obstack.
4976
e39db4db
SM
49772018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4978
4979 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4980 OBSTACK_ZALLOC.
4981 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4982 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4983 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4984 (add_pending): Likewise.
4985 (parse_symbol): Likewise.
4986 (parse_partial_symbols): Likewise.
4987 (psymtab_to_symtab_1): Likewise.
4988 (new_psymtab): Likewise.
4989 (elfmdebug_build_psymtabs): Likewise.
4990 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4991 * objfiles.c (get_objfile_bfd_data): Likewise.
4992 (objfile_register_static_link): Likewise.
4993 * psymtab.c (allocate_psymtab): Likewise.
4994 * stabsread.c (read_member_functions): Likewise.
4995 * xcoffread.c (xcoff_end_psymtab): Likewise.
4996
284a0e3c
SM
49972018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4998
4999 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5000 compiler supports std::is_trivially_constructible.
5001 * common/poison.h: Include obstack.h.
5002 (IsMallocable): Define to is_trivially_constructible if the
5003 compiler supports it, define to true_type otherwise.
5004 (xobnew): New.
5005 (XOBNEW): Redefine.
5006 (xobnewvec): New.
5007 (XOBNEWVEC): Redefine.
5008 * gdb_obstack.h (obstack_zalloc): New.
5009 (OBSTACK_ZALLOC): Redefine.
5010 (obstack_calloc): New.
5011 (OBSTACK_CALLOC): Redefine.
5012 (obstack_new): New.
5013 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5014 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5015 gdbarch.c.
5016 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5017 obstack_calloc/obstack_zalloc.
5018 (gdbarch_obstack_zalloc): Remove.
5019 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5020
59f66be3
PW
50212018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5022
5023 * stack.c (backtrace_command_1): Remove useless variable int i.
5024
50c65c2d
PW
50252018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5026
5027 * stack.c (print_frame_info): Fix comment.
5028
7ff8cb8c
TT
50292018-05-18 Tom Tromey <tom@tromey.com>
5030
5031 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5032 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5033 (~dwarf2_per_objfile): Update
5034 (dwarf2_get_dwz_file): Use new.
5035 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5036 unique_ptr.
5037
400174b1
TT
50382018-05-18 Tom Tromey <tom@tromey.com>
5039
5040 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5041 unique_ptr.
5042 * dwarf2read.c (struct dwp_file): Add constructor and
5043 initializers.
5044 (open_and_init_dwp_file): Return a unique_ptr.
5045 (dwarf2_per_objfile, create_dwp_hash_table)
5046 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5047 (lookup_dwo_unit_in_dwp): Update.
5048 (open_and_init_dwp_file, get_dwp_file): Update.
5049
3063847f
TT
50502018-05-18 Tom Tromey <tom@tromey.com>
5051
5052 * dwarf2read.c (dwarf2_per_objfile): Update.
5053 (struct mapped_index): Add initializers.
5054 (dwarf2_read_index): Use new.
5055 (dw2_symtab_iter_init): Update.
5056 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5057 unique_ptr.
5058
d3d02dee
SM
50592018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5060
5061 * dwarf2read.c (mapped_index) <total_size>: Remove.
5062
1d143c36
SM
50632018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5064
5065 * unittests/format_pieces-selftests.c (test_format_specifier):
5066 Add ARI comments.
5067
ce1e8424
TT
50682018-05-18 Tom Tromey <tom@tromey.com>
5069
5070 * c-typeprint.c (maybe_print_hole): New function.
5071 (c_print_type_struct_field_offset): Update.
5072 (c_type_print_base_struct_union): Call maybe_print_hole.
5073
ddfe970e
KS
50742018-05-17 Keith Seitz <keiths@redhat.com>
5075
5076 * breakpoint.c (build_bpstat_chain): New function, moved from
5077 bpstat_stop_status.
5078 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5079 If no stop chain is passed, call build_bpstat_chain to build it.
5080 * breakpoint.h (build_bpstat_chain): Declare.
5081 (bpstat_stop_status): Move documentation here from breakpoint.c.
5082 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5083 build the stop chain and pass it to skip_inline_frames.
5084 Pass this stop chain to bpstat_stop_status.
5085 * inline-frame.c: Include breakpoint.h.
5086 (stopped_by_user_bp_inline_frame): New function.
5087 (skip_inline_frames): Add parameter `stop_chain'.
5088 Move documention to inline-frame.h.
5089 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5090 whether the frame should be elided.
5091 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5092 Add moved documentation and update for new parameter.
5093
b17992c1
SM
50942018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5095
5096 PR cli/14975
5097 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5098 unittests/format_pieces-selftests.c.
5099 * common/format.h (format_piece) <operator==>: New.
5100 (format_pieces) <operator[]>: Remove.
5101 * common/format.c (format_pieces::format_pieces): Handle \e.
5102 * unittests/format_pieces-selftests.c: New.
5103
58f0c718
TT
51042018-05-17 Tom Tromey <tom@tromey.com>
5105
5106 PR symtab/23010:
5107 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5108 (dw2_instantiate_symtab): Add skip_partial parameter.
5109 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5110 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5111 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5112 (dw2_expand_symtabs_matching_one)
5113 (dw2_find_pc_sect_compunit_symtab)
5114 (dw2_debug_names_lookup_symbol)
5115 (dw2_debug_names_expand_symtabs_for_function): Update.
5116 (init_cutu_and_read_dies): Add skip_partial parameter.
5117 (process_psymtab_comp_unit, build_type_psymtabs_1)
5118 (process_skeletonless_type_unit, load_partial_comp_unit)
5119 (psymtab_to_symtab_1): Update.
5120 (load_full_comp_unit): Add skip_partial parameter.
5121 (process_imported_unit_die, dwarf2_read_addr_index)
5122 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5123 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5124 (read_signatured_type): Update.
5125
3e618834
SM
51262018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5127
5128 * value.c (release_value): Remove unused variable.
5129 (record_latest_value): Likewise.
5130 (access_value_history): Likewise.
5131 (preserve_values): Likewise.
5132
fe10fe31
TT
51332018-05-17 Tom Tromey <tom@tromey.com>
5134
5135 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5136 Initialize.
5137
1d761124
MR
51382018-05-16 Maciej W. Rozycki <macro@mips.com>
5139
5140 PR gdb/22286
5141 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5142 Also handle registers whose width is not a multiple of
5143 PTRACE_TYPE_RET.
5144 (linux_nat_trad_target::store_register): Likewise.
5145
06333fea
TT
51462018-05-16 Tom Tromey <tom@tromey.com>
5147
5148 * gdbcore.h (core_bfd): Redefine.
5149 * corelow.c (core_target::close): Update.
5150 (core_target_open): Update.
5151 * progspace.h (struct program_space) <cbfd>: Now a
5152 gdb_bfd_ref_ptr.
5153
921222e2
TT
51542018-05-16 Tom Tromey <tom@tromey.com>
5155
5156 PR cli/19551:
5157 * symfile-add-flags.h (enum symfile_add_flags)
5158 <SYMFILE_NOT_FILENAME>: New constant.
5159 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5160 objfile name from BFD.
5161 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5162 * minidebug.c (find_separate_debug_file_in_section): Put
5163 ".gnu_debugdata" into BFD's file name.
5164
3acb7083
SM
51652018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5166
5167 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5168 Remove.
5169
561a72d4
TC
51702018-05-15 Tamar Christina <tamar.christina@arm.com>
5171
5172 PR binutils/21446
5173 * aarch64-tdep.c (aarch64_analyze_prologue,
5174 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5175 Indicate not interested in errors.
5176
4e6ff0e1
MR
51772018-05-15 Maciej W. Rozycki <macro@mips.com>
5178
5179 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5180 Supply the MIPS_ZERO_REGNUM register.
5181
ea33cd92
MR
51822018-05-15 Maciej W. Rozycki <macro@mips.com>
5183
5184 * mips-tdep.c (mask_address_var): Make variable static.
5185
2d79090e
TT
51862018-05-14 Tom Tromey <tom@tromey.com>
5187
5188 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5189
cf4912ae
AB
51902018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5191
5192 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5193 FXSAVE_ADDR for the mxcsr register.
5194
67e6f569
MF
51952018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5196
5197 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5198
15244507
PA
51992018-05-11 Pedro Alves <palves@redhat.com>
5200
5201 * corelow.c (core_target) <core_target>: No longer inline.
5202 Initialize m_core_gdbarch, m_core_vec and build the section table
5203 here.
5204 <~core_target>: New.
5205 <core_gdbarch, get_core_register_section>: New methods.
5206 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5207 factored out from ...
5208 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5209 (core_ops): Delete.
5210 (sniff_core_bfd): Add gdbarch parameter.
5211 (core_close): Delete, merged into ...
5212 (core_target::close): ... here. Delete self.
5213 (core_close_cleanup): Delete.
5214 (core_target_open): Allocate a core_target on the heap. Use a
5215 unique_ptr instead of a cleanup. Bits moved into the core_target
5216 ctor. Adjust to use core_target methods instead of globals.
5217 (get_core_register_section): Rename to ...
5218 (core_target::get_core_register_section): ... this and adjust.
5219 (struct get_core_registers_cb_data): New.
5220 (get_core_registers_cb): Use it. Use bool.
5221 (core_target::fetch_registers, core_target::files_info)
5222 (core_target::xfer_partial, core_target::read_description)
5223 (core_target::pid_to, core_target::thread_name): Adjust to
5224 reference class fields instead of globals.
5225 * target.h (struct target_ops_deleter, target_ops_up): New.
5226
451953fa
PA
52272018-05-11 Pedro Alves <palves@redhat.com>
5228
5229 * corefile.c (core_file_command): Move to corelow.c.
5230 * corelow.c (the_core_target): Delete.
5231 (core_file_command): Moved from corefile.c. Check exec_bfd
5232 instead of the_core_target. Use target_detach instead of calling
5233 into the_core_target directly.
5234 (maybe_say_no_core_file_now): New.
5235 (core_target::detach): Use it.
5236 (_initialize_corelow): Remove references to the_core_target.
5237 * gdbcore.h (the_core_target): Delete.
5238
e540a5a2 52392018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 5240 Pedro Alves <palves@redhat.com>
e540a5a2
TT
5241
5242 * corefile.c (core_bfd): Remove.
5243 * gdbcore.h (core_bfd): Now a macro.
5244 * progspace.h (struct program_space) <cbfd>: New field.
5245
633cf254
TT
52462018-05-11 Tom Tromey <tom@tromey.com>
5247
5248 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5249 gdb::def_vector.
5250
1a34f210
TT
52512018-05-10 Tom Tromey <tom@tromey.com>
5252
5253 * configure: Rebuild.
5254 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5255
190852c8
JB
52562018-05-10 Joel Brobecker <brobecker@adacore.com>
5257
5258 PR server/23158:
5259 * regformats/regdat.sh: Adjust script, following the addition
5260 of the new expedite_regs parameter to init_target_desc.
5261
8727de56
OJ
52622018-05-10 Omair Javaid <omair.javaid@linaro.org>
5263
5264 PR gdb/23127
5265 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5266 set_gdbarch_significant_addr_bit.
5267 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5268 set_gdbarch_significant_addr_bit.
5269 * utils.c (address_significant): Update to sign extend addr.
5270
37d9e062
MF
52712018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5272
5273 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5274 (xtensa_linux_init_abi): Limit tdep->num_regs by
5275 tdep->num_nopriv_regs.
5276 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5277 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5278 not initialized.
5279
7402fbca
SM
52802018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5281
5282 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5283
8ee22052
AB
52842018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5285
5286 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5287 (I387_MXCSR_INIT_VAL): New constant.
5288 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5289 buffer if it was supplied by the inferior.
5290 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5291 (i387_xsave_get_clear_bv): New function.
5292 (i387_supply_xsave): Only read x87 control registers from the
5293 xsave buffer if the feature is enabled, and the state will have
5294 been written, otherwise, provide a suitable default.
5295 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5296 including x87 control registers. Update control registers if they
5297 have changed from the default value, and mark features as enabled
5298 as required.
5299 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5300
968ae51b
UW
53012018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5302
5303 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5304
aff689d3
TT
53052018-05-07 Tom Tromey <tom@tromey.com>
5306
5307 * configure: Rebuild.
5308 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5309
ce887586
TT
53102018-05-07 Tom Tromey <tom@tromey.com>
5311
5312 PR tdep/20362:
5313 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5314 bit. Use correct value for VDIV.
5315
85e26832
TT
53162018-05-04 Tom Tromey <tom@tromey.com>
5317
5318 * configure: Rebuild.
5319 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5320
449b1ac7
TT
53212018-05-04 Tom Tromey <tom@tromey.com>
5322
5323 * linux-record.c (record_linux_system_call) <case
5324 RECORD_SYS_RECVFROM>: Add "break".
5325
15c9ffd6
TT
53262018-05-04 Tom Tromey <tom@tromey.com>
5327
5328 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5329 Add missing "break".
5330 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5331 Add missing "break".
5332
e3829d13
TT
53332018-05-04 Tom Tromey <tom@tromey.com>
5334
5335 * rs6000-tdep.c (ppc_process_record_op4)
5336 (ppc_process_record_op63): Add fall-through comment.
5337
da0e1563
TT
53382018-05-04 Tom Tromey <tom@tromey.com>
5339
5340 * i386-tdep.c (i386_process_record): Add fall-through comment.
5341
0019cd49
TT
53422018-05-04 Tom Tromey <tom@tromey.com>
5343
5344 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5345 comment.
5346
565e0eda
TT
53472018-05-04 Tom Tromey <tom@tromey.com>
5348
5349 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5350 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5351 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5352 comment.
5353 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5354 comment.
5355 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5356 comment.
5357
621846f4
TT
53582018-05-04 Tom Tromey <tom@tromey.com>
5359
5360 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5361
86a73007
TT
53622018-05-04 Tom Tromey <tom@tromey.com>
5363
5364 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5365 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5366 * symfile.c (section_is_mapped): Fix fall-through comment.
5367 * stabsread.c (define_symbol, read_member_functions): Fix
5368 fall-through comment.
5369 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5370 comment.
5371 * remote.c (remote_wait_as): Fix fall-through comment.
5372 * p-exp.y (yylex): Fix fall-through comment.
5373 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5374 comment.
5375 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5376 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5377 * jv-exp.y (yylex): Fix fall-through comment.
5378 * go-exp.y (lex_one_token): Fix fall-through comment.
5379 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5380 fall-through comment.
5381 * f-exp.y (yylex): Fix fall-through comment.
5382 * dwarf2read.c (process_die): Fix fall-through comments.
5383 * dbxread.c (process_one_symbol): Fix fall-through comment.
5384 * d-exp.y (lex_one_token): Fix fall-through comment.
5385 * cp-name-parser.y (yylex): Fix fall-through comment.
5386 * coffread.c (coff_symtab_read): Fix fall-through comment.
5387 * c-exp.y (lex_one_token): Fix fall-through comment.
5388 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5389 comment.
5390 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5391 comment.
5392
56bcdbea
TT
53932018-05-04 Tom Tromey <tom@tromey.com>
5394
5395 PR python/22730:
5396 * NEWS: Mention gdb.execute change.
5397 * gdbcmd.h (execute_control_command): Don't declare.
5398 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5399 execute_control_commands, execute_control_commands_to_string.
5400 * cli/cli-script.h (execute_control_commands)
5401 (execute_control_commands_to_string): Declare.
5402 (execute_control_command): Add from_tty parameter.
5403 * cli/cli-script.c (execute_control_commands)
5404 (execute_control_commands_to_string): New functions.
5405 (execute_user_command): Use execute_control_commands.
5406 (execute_control_command_1): Add "from_tty" parameter. Update.
5407 (execute_control_command): Likewise.
5408
a913fffb
TT
54092018-05-04 Tom Tromey <tom@tromey.com>
5410
5411 PR python/22731:
5412 * NEWS: Mention that breakpoint commands are writable.
5413 * python/py-breakpoint.c (bppy_set_commands): New function.
5414 (breakpoint_object_getset) <"commands">: Use it.
5415
60b3cef2
TT
54162018-05-04 Tom Tromey <tom@tromey.com>
5417
5418 * tracepoint.c (actions_command): Update.
5419 * mi/mi-cmd-break.c (mi_command_line_array)
5420 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5421 (mi_read_next_line): Remove.
5422 (mi_cmd_break_commands): Update.
5423 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5424 function_view.
5425 * cli/cli-script.c (get_command_line): Update.
5426 (process_next_line): Use function_view. Constify.
5427 (recurse_read_control_structure, read_command_lines)
5428 (read_command_lines_1): Change argument types to function_view.
5429 (do_define_command, document_command): Update.
5430 * breakpoint.h (check_tracepoint_command): Don't declare.
5431 * breakpoint.c (check_tracepoint_command): Remove.
5432 (commands_command_1, create_tracepoint_from_upload): Update.
5433
7a2c85f2
TT
54342018-05-04 Tom Tromey <tom@tromey.com>
5435
5436 PR gdb/11750:
5437 * cli/cli-script.h (enum command_control_type) <define_control>:
5438 New constant.
5439 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5440 (build_command_line, execute_control_command_1)
5441 (process_next_line): Likewise.
5442 (do_define_command): New function, extracted from define_command.
5443 (define_command): Use it.
5444
295dc222
TT
54452018-05-04 Tom Tromey <tom@tromey.com>
5446
5447 * tracepoint.c (actions_command): Update.
5448 * cli/cli-script.h (read_command_lines): Update.
5449 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5450 (MAX_TMPBUF): Remove define.
5451 (define_command): Use string_printf.
5452 (document_command): Likewise.
5453 * breakpoint.c (commands_command_1): Update.
5454
1263a9d5
TT
54552018-05-04 Tom Tromey <tom@tromey.com>
5456
5457 * top.c (execute_command): Update.
5458 * cli/cli-script.h (print_command_lines): Now varargs.
5459 * cli/cli-script.c (print_command_lines): Now varargs.
5460 (execute_control_command_1) <case while_control, case if_control>:
5461 Update.
5462
12973681
TT
54632018-05-04 Tom Tromey <tom@tromey.com>
5464
5465 * tracepoint.c (all_tracepoint_actions): Rename from
5466 all_tracepoint_actions_and_cleanup. Change return type.
5467 (actions_command, encode_actions_1, encode_actions)
5468 (trace_dump_actions, tdump_command): Update.
5469 * remote.c (remote_download_command_source): Update.
5470 * python/python.c (gdbpy_eval_from_control_command)
5471 (python_command, python_interactive_command): Update.
5472 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5473 * guile/guile.c (guile_command)
5474 (gdbscm_eval_from_control_command, guile_command): Update.
5475 * compile/compile.c (compile_code_command)
5476 (compile_print_command, compile_to_object): Update.
5477 * cli/cli-script.h (struct command_lines_deleter): New.
5478 (counted_command_line): New typedef.
5479 (struct command_line): Add constructor, destructor.
5480 <body_list>: Remove.
5481 <body_list_0, body_list_1>: New members.
5482 (command_line_up): Remove typedef.
5483 (read_command_lines, read_command_lines_1, get_command_line):
5484 Update.
5485 (copy_command_lines): Don't declare.
5486 * cli/cli-script.c (build_command_line): Use "new".
5487 (get_command_line): Return counted_command_line.
5488 (print_command_lines, execute_user_command)
5489 (execute_control_command_1, while_command, if_command): Update.
5490 (realloc_body_list): Remove.
5491 (process_next_line, recurse_read_control_structure): Update.
5492 (read_command_lines, read_command_lines_1): Return counted_command_line.
5493 (free_command_lines): Use "delete".
5494 (copy_command_lines): Remove.
5495 (define_command, document_command, show_user_1): Update.
5496 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5497 a counted_command_line.
5498 * breakpoint.h (counted_command_line): Remove typedef.
5499 (breakpoint_set_commands): Update.
5500 * breakpoint.c (check_no_tracepoint_commands)
5501 (validate_commands_for_breakpoint): Update.
5502 (breakpoint_set_commands): Change commands to be a
5503 counted_command_line.
5504 (commands_command_1, update_dprintf_command_list)
5505 (create_tracepoint_from_upload): Update.
5506
e2fc72e2
TT
55072018-05-04 Tom Tromey <tom@tromey.com>
5508
5509 * cli/cli-decode.h (cmd_list_element): New constructor.
5510 (~cmd_list_element): New destructor.
5511 (struct cmd_list_element): Add initializers.
5512 * cli/cli-decode.c (do_add_cmd): Use "new".
5513 (delete_cmd): Use "delete".
5514
a3b60e45
JK
55152018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5516 Pedro Alves <palves@redhat.com>
5517
5518 PR breakpoints/19806 and support for PR external/20207.
5519 * NEWS: Mention Aarch64 watchpoint improvements.
5520 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5521 watchpoints and PR external/20207 watchpoints.
5522 * nat/aarch64-linux-hw-point.c
5523 (kernel_supports_any_contiguous_range): New.
5524 (aarch64_watchpoint_offset): New.
5525 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5526 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5527 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5528 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5529 next_addr_orig_p. Support PR external/20207 watchpoints.
5530 (aarch64_downgrade_regs): New.
5531 (aarch64_dr_state_insert_one_point): New parameters offset and
5532 addr_orig.
5533 (aarch64_dr_state_remove_one_point): Likewise.
5534 (aarch64_handle_breakpoint): Update caller.
5535 (aarch64_handle_aligned_watchpoint): Likewise.
5536 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5537 aligned_offset.
5538 (aarch64_linux_set_debug_regs): Remove const from state. Call
5539 aarch64_downgrade_regs.
5540 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5541 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5542 (DR_CONTROL_MASK): ... this.
5543 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5544 (unsigned int aarch64_watchpoint_offset): New prototype.
5545 (aarch64_linux_set_debug_regs): Remove const from state.
5546 * utils.c (align_up, align_down): Move to ...
5547 * common/common-utils.c (align_up, align_down): ... here.
5548 * utils.h (align_up, align_down): Move to ...
5549 * common/common-utils.h (align_up, align_down): ... here.
5550
05bc7456
JB
55512018-05-04 Joel Brobecker <brobecker@adacore.com>
5552
5553 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5554 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5555 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5556 Re-implement to match the ABI as summarized in GCC's
5557 gcc/config/sparc/sparc.c. All callers updated.
5558 (sparc32_store_arguments): Remove assertion.
5559
2f433492
TT
55602018-05-04 Tom Tromey <tom@tromey.com>
5561
5562 * printcmd.c: Don't include tui.h.
5563 (decode_format): Use skip_spaces.
5564
9be2ae8f
TT
55652018-05-04 Tom Tromey <tom@tromey.com>
5566
5567 PR gdb/22619:
5568 * printcmd.c (last_count): New global.
5569 (x_command): Use saved count when repeating.
5570
f0b3976b
TT
55712018-05-04 Tom Tromey <tom@tromey.com>
5572
5573 * nto-procfs.c (do_closedir_cleanup): Remove.
5574 (procfs_pidlist): Use gdb_dir_up.
5575 * procfs.c (do_closedir_cleanup): Remove.
5576 (proc_update_threads): Use gdb_dir_up.
5577 * common/filestuff.h (struct gdb_dir_deleter): New.
5578 (gdb_dir_up): New typedef.
5579
862d101a
TT
55802018-05-04 Tom Tromey <tom@tromey.com>
5581
5582 * ada-lang.c (print_mention_exception): Use std::string.
5583
cb7de75e
TT
55842018-05-04 Tom Tromey <tom@tromey.com>
5585
5586 * ada-lang.c (create_excep_cond_exprs): Update.
5587 (ada_exception_catchpoint_cond_string): Use std::string.
5588
49d83361
TT
55892018-05-04 Tom Tromey <tom@tromey.com>
5590
5591 * ada-lang.c (xget_renaming_scope): Return std::string.
5592 (old_renaming_is_invisible): Update.
5593
ade72a34
TT
55942018-05-04 Tom Tromey <tom@tromey.com>
5595
5596 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5597 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5598
2be4d7f0
UW
55992018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5600
5601 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5602
69b6ecb0
TT
56032018-05-04 Tom Tromey <tom@tromey.com>
5604
5605 * remote.c (remote_query_supported_append): Change type.
5606 (remote_check_symbols): Update.
5607
bf27f0e2
PP
56082018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5609
5610 PR gdb/11420
5611 * configure.ac: Prepend libpython.
5612 * python/python-config.py: Likewise.
5613 * configure: Regenerate.
5614
4ea17de8
SM
56152018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5616
5617 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5618
bd732259
PA
56192018-05-03 Pedro Alves <palves@redhat.com>
5620
5621 * s390-linux-nat.c
5622 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5623 override. Write 'true' instead of '1'.
5624 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5625 declaration.
5626
d9f719f1
PA
56272018-05-02 Pedro Alves <palves@redhat.com>
5628
5629 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5630 add_inf_child_target.
5631 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5632 add_inf_child_target.
5633 * aix-thread.c (aix_thread_target_info): New.
5634 (aix_thread_target) <shortname, longname, doc>: Delete.
5635 <info>: New.
5636 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5637 add_inf_child_target.
5638 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5639 add_inf_child_target.
5640 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5641 add_inf_child_target.
5642 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5643 add_inf_child_target.
5644 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5645 add_inf_child_target.
5646 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5647 add_inf_child_target.
5648 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5649 add_inf_child_target.
5650 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5651 add_inf_child_target.
5652 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5653 add_inf_child_target.
5654 * bfd-target.c (target_bfd_target_info): New.
5655 (target_bfd) <shortname, longname, doc>: Delete.
5656 <info>: New.
5657 * bsd-kvm.c (bsd_kvm_target_info): New.
5658 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5659 <info>: New.
5660 (bsd_kvm_target::open): Rename to ...
5661 (bsd_kvm_target_open): ... this. Adjust.
5662 * bsd-uthread.c (bsd_uthread_target_info): New.
5663 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5664 <info>: New.
5665 * corefile.c (core_file_command): Adjust.
5666 * corelow.c (core_target_info): New.
5667 (core_target) <shortname, longname, doc>: Delete.
5668 <info>: New.
5669 (core_target::open): Rename to ...
5670 (core_target_open): ... this. Adjust.
5671 * ctf.c (ctf_target_info): New.
5672 (ctf_target) <shortname, longname, doc>: Delete.
5673 <info>: New.
5674 (ctf_target::open): Rename to ...
5675 (ctf_target_open): ... this.
5676 (_initialize_ctf): Adjust.
5677 * exec.c (exec_target_info): New.
5678 (exec_target) <shortname, longname, doc>: Delete.
5679 <info>: New.
5680 (exec_target::open): Rename to ...
5681 (exec_target_open): ... this.
5682 * gdbcore.h (core_target_open): Declare.
5683 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5684 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5685 add_inf_child_target.
5686 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5687 add_inf_child_target.
5688 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5689 add_inf_child_target.
5690 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5691 add_inf_child_target.
5692 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5693 add_inf_child_target.
5694 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5695 add_inf_child_target.
5696 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5697 add_inf_child_target.
5698 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5699 add_inf_child_target.
5700 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5701 add_inf_child_target.
5702 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5703 add_inf_child_target.
5704 * inf-child.c (inf_child_target_info): New.
5705 (inf_child_target::info): New.
5706 (inf_child_open_target): Remove 'target' parameter. Use
5707 get_native_target instead.
5708 (inf_child_target::open): Delete.
5709 (add_inf_child_target): New.
5710 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5711 Delete.
5712 <info>: New.
5713 (add_inf_child_target): Declare.
5714 (inf_child_open_target): Declare.
5715 * linux-thread-db.c (thread_db_target_info): New.
5716 (thread_db_target) <shortname, longname, doc>: Delete.
5717 <info>: New.
5718 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5719 add_inf_child_target.
5720 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5721 add_inf_child_target.
5722 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5723 add_inf_child_target.
5724 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5725 add_inf_child_target.
5726 * make-target-delegates (print_class): Adjust.
5727 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5728 add_inf_child_target.
5729 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5730 add_inf_child_target.
5731 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5732 add_inf_child_target.
5733 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5734 add_inf_child_target.
5735 * nto-procfs.c (nto_native_target_info): New.
5736 (nto_procfs_target_native) <shortname, longname, doc>:
5737 Delete.
5738 <info>: New.
5739 (nto_procfs_target_info): New.
5740 (nto_procfs_target_procfs) <shortname, longname, doc>:
5741 Delete.
5742 <info>: New.
5743 (init_procfs_targets): Adjust.
5744 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5745 add_inf_child_target.
5746 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5747 add_inf_child_target.
5748 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5749 add_inf_child_target.
5750 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5751 add_inf_child_target.
5752 * ravenscar-thread.c (ravenscar_target_info): New.
5753 (ravenscar_thread_target) <shortname, longname, doc>:
5754 Delete.
5755 <info>: New.
5756 * record-btrace.c (record_btrace_target_info):
5757 (record_btrace_target) <shortname, longname, doc>: Delete.
5758 <info>: New.
5759 (record_btrace_target::open): Rename to ...
5760 (record_btrace_target_open): ... this. Adjust.
5761 * record-full.c (record_longname, record_doc): New.
5762 (record_full_base_target) <shortname, longname, doc>: Delete.
5763 <info>: New.
5764 (record_full_target_info): New.
5765 (record_full_target): <shortname>: Delete.
5766 <info>: New.
5767 (record_full_core_open_1, record_full_open_1): Update comments.
5768 (record_full_base_target::open): Rename to ...
5769 (record_full_open): ... this.
5770 (cmd_record_full_restore): Update.
5771 (_initialize_record_full): Update.
5772 * remote-sim.c (remote_sim_target_info): New.
5773 (gdbsim_target) <shortname, longname, doc>: Delete.
5774 <info>: New.
5775 (gdbsim_target::open): Rename to ...
5776 (gdbsim_target_open): ... this.
5777 (_initialize_remote_sim): Adjust.
5778 * remote.c (remote_doc): New.
5779 (remote_target_info): New.
5780 (remote_target) <shortname, longname, doc>: Delete.
5781 <info>: New.
5782 (extended_remote_target_info): New.
5783 (extended_remote_target) <shortname, longname, doc>: Delete.
5784 <info>: New.
5785 (remote_target::open_1): Make static. Adjust.
5786 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5787 * s390-linux-nat.c (_initialize_s390_nat): Use
5788 add_inf_child_target.
5789 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5790 add_inf_child_target.
5791 * sol-thread.c (thread_db_target_info): New.
5792 (sol_thread_target) <shortname, longname, doc>: Delete.
5793 <info>: New.
5794 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5795 add_inf_child_target.
5796 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5797 add_inf_child_target.
5798 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5799 add_inf_child_target.
5800 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5801 add_inf_child_target.
5802 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5803 add_inf_child_target.
5804 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5805 add_inf_child_target.
5806 * spu-linux-nat.c (_initialize_spu_nat): Use
5807 add_inf_child_target.
5808 * spu-multiarch.c (spu_multiarch_target_info): New.
5809 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5810 <info>: New.
5811 * target-delegates.c: Regenerate.
5812 * target.c: Include <unordered_map>.
5813 (target_ops_p): Delete.
5814 (DEF_VEC_P(target_ops_p)): Delete.
5815 (target_factories): New.
5816 (test_target_info): New.
5817 (test_target_ops::info): New.
5818 (open_target): Adjust to use target_factories.
5819 (add_target_with_completer): Rename to ...
5820 (add_target): ... this. Change prototype. Register target_info
5821 and open callback in target_factories. Register target_info in
5822 command context instead of target_ops.
5823 (add_target): Delete old implementation.
5824 (add_deprecated_target_alias): Change prototype. Adjust.
5825 (the_native_target): New.
5826 (set_native_target, get_native_target): New.
5827 (find_default_run_target): Use the_native_target.
5828 (find_attach_target, find_run_target): Simplify.
5829 (target_ops::open): Delete.
5830 (dummy_target_info): New.
5831 (dummy_target::shortname, dummy_target::longname)
5832 (dummy_target::doc): Delete.
5833 (dummy_target::info): New.
5834 (debug_target::shortname, debug_target::longname)
5835 (debug_target::doc): Delete.
5836 (debug_target::info): New.
5837 * target.h (struct target_info): New.
5838 (target_ops::~target_ops): Add comment.
5839 (target_ops::info): New.
5840 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5841 longer virtual. Implement in terms of target_info.
5842 (set_native_target, get_native_target): Declare.
5843 (target_open_ftype): New.
5844 (add_target, add_target_with_completer)
5845 (add_deprecated_target_alias): Change prototype.
5846 (test_target) <shortname, longname, doc>: Delete.
5847 <info>: New.
5848 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5849 add_inf_child_target.
5850 * tracefile-tfile.c (tfile_target_info): New.
5851 (tfile_target) <shortname, longname, doc>: Delete.
5852 <info>: New.
5853 (tfile_target::open): Rename to ...
5854 (tfile_target_open): ... this.
5855 (_initialize_tracefile_tfile): Adjust.
5856 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5857 add_inf_child_target.
5858 * windows-nat.c (_initialize_windows_nat): Use
5859 add_inf_child_target.
5860 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5861 add_inf_child_target.
5862
135340af
PA
58632018-05-02 Pedro Alves <palves@redhat.com>
5864
5865 * linux-nat.h (linux_nat_target) <low_new_thread,
5866 low_delete_thread, low_new_fork, low_forget_process,
5867 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5868 New virtual methods.
5869 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5870 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5871 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5872 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5873 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5874 Delete.
5875 * linux-fork.c (delete_fork): Adjust to call low method.
5876 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5877 (linux_nat_new_fork, linux_nat_forget_process_hook)
5878 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5879 (linux_nat_status_is_event):
5880 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5881 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5882 to call low method.
5883 (sigtrap_is_event): Rename to ...
5884 (linux_nat_target::low_status_is_event): ... this.
5885 (linux_nat_set_status_is_event): Delete.
5886 (save_stop_reason, linux_nat_wait_1)
5887 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5888 low methods.
5889 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5890 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5891 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5892 (linux_nat_set_prepare_to_resume): Delete.
5893 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5894 low virtual methods.
5895 * amd64-linux-nat.c: Likewise.
5896 * arm-linux-nat.c: Likewise.
5897 * i386-linux-nat.c: Likewise.
5898 * ia64-linux-nat.c: Likewise.
5899 * mips-linux-nat.c: Likewise.
5900 * ppc-linux-nat.c: Likewise.
5901 * s390-linux-nat.c: Likewise.
5902 * sparc64-linux-nat.c: Likewise.
5903 * x86-linux-nat.c: Likewise.
5904 * x86-linux-nat.h: Include "nat/x86-linux.h".
5905 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5906 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5907 Override methods.
5908
57810aa7
PA
59092018-05-02 Pedro Alves <palves@redhat.com>
5910
5911 * target.h (target_ops)
5912 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5913 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5914 stopped_by_watchpoint, have_continuable_watchpoint,
5915 stopped_data_address, watchpoint_addr_within_range,
5916 can_accel_watchpoint_condition, can_run, thread_alive,
5917 has_all_memory, has_memory, has_stack, has_registers,
5918 has_execution, can_async_p, is_async_p, supports_non_stop,
5919 always_non_stop_p, can_execute_reverse, supports_multi_process,
5920 supports_enable_disable_tracepoint,
5921 supports_disable_randomization, supports_string_tracing,
5922 supports_evaluation_of_breakpoint_conditions,
5923 can_run_breakpoint_commands, filesystem_is_local,
5924 can_download_tracepoint, get_trace_state_variable_value,
5925 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5926 record_is_replaying, record_will_replay,
5927 augmented_libraries_svr4_read>: Adjust to return bool.
5928 * aarch64-linux-nat.c: All implementations adjusted.
5929 * aix-thread.c: All implementations adjusted.
5930 * arm-linux-nat.c: All implementations adjusted.
5931 * breakpoint.c: All implementations adjusted.
5932 * bsd-kvm.c: All implementations adjusted.
5933 * bsd-uthread.c: All implementations adjusted.
5934 * corelow.c: All implementations adjusted.
5935 * ctf.c: All implementations adjusted.
5936 * darwin-nat.c: All implementations adjusted.
5937 * darwin-nat.h: All implementations adjusted.
5938 * exec.c: All implementations adjusted.
5939 * fbsd-nat.c: All implementations adjusted.
5940 * fbsd-nat.h: All implementations adjusted.
5941 * gnu-nat.c: All implementations adjusted.
5942 * gnu-nat.h: All implementations adjusted.
5943 * go32-nat.c: All implementations adjusted.
5944 * ia64-linux-nat.c: All implementations adjusted.
5945 * inf-child.c: All implementations adjusted.
5946 * inf-child.h: All implementations adjusted.
5947 * inf-ptrace.c: All implementations adjusted.
5948 * inf-ptrace.h: All implementations adjusted.
5949 * linux-nat.c: All implementations adjusted.
5950 * linux-nat.h: All implementations adjusted.
5951 * mips-linux-nat.c: All implementations adjusted.
5952 * nto-procfs.c: All implementations adjusted.
5953 * ppc-linux-nat.c: All implementations adjusted.
5954 * procfs.c: All implementations adjusted.
5955 * ravenscar-thread.c: All implementations adjusted.
5956 * record-btrace.c: All implementations adjusted.
5957 * record-full.c: All implementations adjusted.
5958 * remote-sim.c: All implementations adjusted.
5959 * remote.c: All implementations adjusted.
5960 * s390-linux-nat.c: All implementations adjusted.
5961 * sol-thread.c: All implementations adjusted.
5962 * spu-multiarch.c: All implementations adjusted.
5963 * target-delegates.c: All implementations adjusted.
5964 * target.c: All implementations adjusted.
5965 * target.h: All implementations adjusted.
5966 * tracefile-tfile.c: All implementations adjusted.
5967 * tracefile.c: All implementations adjusted.
5968 * tracefile.h: All implementations adjusted.
5969 * windows-nat.c: All implementations adjusted.
5970 * x86-linux-nat.h: All implementations adjusted.
5971 * x86-nat.h: All implementations adjusted.
5972
ad6a4e2d
PA
59732018-05-02 Pedro Alves <palves@redhat.com>
5974
5975 * make-target-delegates (scan_target_h): Don't trim lines here.
5976 Replace sequences of tabs and/or whitespace with a single
5977 whitespace.
5978 (top level, parsing methods): Trim each line before processing it
5979 here.
5980
f6ac5f3d
PA
59812018-05-02 Pedro Alves <palves@redhat.com>
5982 John Baldwin <jhb@freebsd.org>
5983
5984 * target.h (enum strata) <debug_stratum>: New.
5985 (struct target_ops) <all delegation methods>: Replace by C++
5986 virtual methods, and drop "to_" prefix. All references updated
5987 throughout.
5988 <to_shortname, to_longname, to_doc, to_data,
5989 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5990 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5991 virtual methods. All references updated throughout.
5992 <can_attach, supports_terminal_ours, can_create_inferior,
5993 get_thread_control_capabilities, attach_no_wait>: New
5994 virtual methods.
5995 <insert_breakpoint, remove_breakpoint>: Now
5996 TARGET_DEFAULT_NORETURN methods.
5997 <info_proc>: Now returns bool.
5998 <to_magic>: Delete.
5999 (OPS_MAGIC): Delete.
6000 (current_target): Delete. All references replaced by references
6001 to ...
6002 (target_stack): ... this. New.
6003 (target_shortname, target_longname): Adjust.
6004 (target_can_run): Now a function declaration.
6005 (default_child_has_all_memory, default_child_has_memory)
6006 (default_child_has_stack, default_child_has_registers)
6007 (default_child_has_execution): Remove target_ops parameter.
6008 (complete_target_initialization): Delete.
6009 (memory_breakpoint_target): New template class.
6010 (test_target_ops): Refactor as a C++ class with virtual methods.
6011 * make-target-delegates (NAME_PART): Tighten.
6012 (POINTER_PART, CP_SYMBOL): New.
6013 (SIMPLE_RETURN_PART): Reimplement.
6014 (VEC_RETURN_PART): Expect less.
6015 (RETURN_PART, VIRTUAL_PART): New.
6016 (METHOD): Adjust to C++ virtual methods.
6017 (scan_target_h): Remove reference to C99.
6018 (dname): Output "target_ops::" prefix.
6019 (write_function_header): Adjust to output a C++ class method.
6020 (write_declaration): New.
6021 (write_delegator): Adjust to output a C++ class method.
6022 (tdname): Output "dummy_target::" prefix.
6023 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6024 method.
6025 (tdefault_names, debug_names): Delete.
6026 (return_types, tdefaults, styles, argtypes_array): New.
6027 (top level): All methods are delegators.
6028 (print_class): New.
6029 (top level): Print dummy_target and debug_target classes.
6030 * target-delegates.c: Regenerate.
6031 * target-debug.h (target_debug_print_enum_info_proc_what)
6032 (target_debug_print_thread_control_capabilities)
6033 (target_debug_print_thread_info_p): New.
6034 * target.c (dummy_target): Delete.
6035 (the_dummy_target, the_debug_target): New.
6036 (target_stack): Now extern.
6037 (set_targetdebug): Push/unpush debug target.
6038 (default_child_has_all_memory, default_child_has_memory)
6039 (default_child_has_stack, default_child_has_registers)
6040 (default_child_has_execution): Remove target_ops parameter.
6041 (complete_target_initialization): Delete.
6042 (add_target_with_completer): No longer call
6043 complete_target_initialization.
6044 (target_supports_terminal_ours): Use regular delegation.
6045 (update_current_target): Delete.
6046 (push_target): No longer check magic number. Don't call
6047 update_current_target.
6048 (unpush_target): Don't call update_current_target.
6049 (target_is_pushed): No longer check magic number.
6050 (target_require_runnable): Skip for all stratums over
6051 process_stratum.
6052 (target_ops::info_proc): New.
6053 (target_info_proc): Use find_target_at and
6054 find_default_run_target.
6055 (target_supports_disable_randomization): Use regular delegation.
6056 (target_get_osdata): Use find_target_at.
6057 (target_ops::open, target_ops::close, target_ops::can_attach)
6058 (target_ops::attach, target_ops::can_create_inferior)
6059 (target_ops::create_inferior, target_ops::can_run)
6060 (target_can_run): New.
6061 (default_fileio_target): Use regular delegation.
6062 (target_ops::fileio_open, target_ops::fileio_pwrite)
6063 (target_ops::fileio_pread, target_ops::fileio_fstat)
6064 (target_ops::fileio_close, target_ops::fileio_unlink)
6065 (target_ops::fileio_readlink): New.
6066 (target_fileio_open_1, target_fileio_unlink)
6067 (target_fileio_readlink): Always call the target method. Handle
6068 FILEIO_ENOSYS.
6069 (return_zero, return_zero_has_execution): Delete.
6070 (init_dummy_target): Delete.
6071 (dummy_target::dummy_target, dummy_target::shortname)
6072 (dummy_target::longname, dummy_target::doc)
6073 (debug_target::debug_target, debug_target::shortname)
6074 (debug_target::longname, debug_target::doc): New.
6075 (target_supports_delete_record): Use regular delegation.
6076 (setup_target_debug): Delete.
6077 (maintenance_print_target_stack): Skip debug_stratum.
6078 (initialize_targets): Instantiate the_dummy_target and
6079 the_debug_target.
6080 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6081 use target_stack.
6082 (target_auxv_search, fprint_target_auxv): Adjust.
6083 (info_auxv_command): Adjust to use target_stack.
6084 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6085 * exceptions.c (print_flush): Handle a NULL target_stack.
6086 * regcache.c (target_ops_no_register): Refactor as class with
6087 virtual methods.
6088
6089 * exec.c (exec_target): New class.
6090 (exec_ops): Now an exec_target.
6091 (exec_open, exec_close_1, exec_get_section_table)
6092 (exec_xfer_partial, exec_files_info, exec_has_memory)
6093 (exec_make_note_section): Refactor as exec_target methods.
6094 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6095 Delete.
6096 (exec_target::find_memory_regions): New.
6097 (_initialize_exec): Don't call init_exec_ops.
6098 * gdbcore.h (exec_file_clear): Delete.
6099
6100 * corefile.c (core_target): Delete.
6101 (core_file_command): Adjust.
6102 * corelow.c (core_target): New class.
6103 (the_core_target): New.
6104 (core_close): Remove target_ops parameter.
6105 (core_close_cleanup): Adjust.
6106 (core_target::close): New.
6107 (core_open, core_detach, get_core_registers, core_files_info)
6108 (core_xfer_partial, core_thread_alive, core_read_description)
6109 (core_pid_to_str, core_thread_name, core_has_memory)
6110 (core_has_stack, core_has_registers, core_info_proc): Rework as
6111 core_target methods.
6112 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6113 (_initialize_corelow): Initialize the_core_target.
6114 * gdbcore.h (core_target): Delete.
6115 (the_core_target): New.
6116
6117 * ctf.c: (ctf_target): New class.
6118 (ctf_ops): Now a ctf_target.
6119 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6120 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6121 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6122 methods.
6123 (init_ctf_ops): Delete.
6124 (_initialize_ctf): Don't call it.
6125 * tracefile-tfile.c (tfile_target): New class.
6126 (tfile_ops): Now a tfile_target.
6127 (tfile_open, tfile_close, tfile_files_info)
6128 (tfile_get_tracepoint_status, tfile_trace_find)
6129 (tfile_fetch_registers, tfile_xfer_partial)
6130 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6131 Refactor as tfile_target methods.
6132 (tfile_xfer_partial_features): Remove target_ops parameter.
6133 (init_tfile_ops): Delete.
6134 (_initialize_tracefile_tfile): Don't call it.
6135 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6136 (tracefile_has_stack, tracefile_has_registers)
6137 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6138 tracefile_target methods.
6139 (init_tracefile_ops): Delete.
6140 (tracefile_target::tracefile_target): New.
6141 * tracefile.h: Include "target.h".
6142 (tracefile_target): New class.
6143 (init_tracefile_ops): Delete.
6144
6145 * spu-multiarch.c (spu_multiarch_target): New class.
6146 (spu_ops): Now a spu_multiarch_target.
6147 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6148 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6149 (spu_search_memory, spu_mourn_inferior): Refactor as
6150 spu_multiarch_target methods.
6151 (init_spu_ops): Delete.
6152 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6153 complete_target_initialization.
6154
6155 * ravenscar-thread.c (ravenscar_thread_target): New class.
6156 (ravenscar_ops): Now a ravenscar_thread_target.
6157 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6158 (ravenscar_thread_alive, ravenscar_pid_to_str)
6159 (ravenscar_fetch_registers, ravenscar_store_registers)
6160 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6161 (ravenscar_stopped_by_hw_breakpoint)
6162 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6163 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6164 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6165 methods.
6166 (init_ravenscar_thread_ops): Delete.
6167 (_initialize_ravenscar): Remove references to
6168 init_ravenscar_thread_ops and complete_target_initialization.
6169
6170 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6171 (bsd_uthread_target): New class.
6172 (bsd_uthread_ops): Now a bsd_uthread_target.
6173 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6174 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6175 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6176 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6177 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6178 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6179 (bsd_uthread_target): Delete function.
6180 (_initialize_bsd_uthread): Remove reference to
6181 complete_target_initialization.
6182
6183 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6184 (target_bfd): ... this new class.
6185 (target_bfd_xfer_partial, target_bfd_get_section_table)
6186 (target_bfd_close): Refactor as target_bfd methods.
6187 (target_bfd::~target_bfd): New.
6188 (target_bfd_reopen): Adjust.
6189 (target_bfd::close): New.
6190
6191 * record-btrace.c (record_btrace_target): New class.
6192 (record_btrace_ops): Now a record_btrace_target.
6193 (record_btrace_open, record_btrace_stop_recording)
6194 (record_btrace_disconnect, record_btrace_close)
6195 (record_btrace_async, record_btrace_info)
6196 (record_btrace_insn_history, record_btrace_insn_history_range)
6197 (record_btrace_insn_history_from, record_btrace_call_history)
6198 (record_btrace_call_history_range)
6199 (record_btrace_call_history_from, record_btrace_record_method)
6200 (record_btrace_is_replaying, record_btrace_will_replay)
6201 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6202 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6203 (record_btrace_store_registers, record_btrace_prepare_to_store)
6204 (record_btrace_to_get_unwinder)
6205 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6206 (record_btrace_commit_resume, record_btrace_wait)
6207 (record_btrace_stop, record_btrace_can_execute_reverse)
6208 (record_btrace_stopped_by_sw_breakpoint)
6209 (record_btrace_supports_stopped_by_sw_breakpoint)
6210 (record_btrace_stopped_by_hw_breakpoint)
6211 (record_btrace_supports_stopped_by_hw_breakpoint)
6212 (record_btrace_update_thread_list, record_btrace_thread_alive)
6213 (record_btrace_goto_begin, record_btrace_goto_end)
6214 (record_btrace_goto, record_btrace_stop_replaying_all)
6215 (record_btrace_execution_direction)
6216 (record_btrace_prepare_to_generate_core)
6217 (record_btrace_done_generating_core): Refactor as
6218 record_btrace_target methods.
6219 (init_record_btrace_ops): Delete.
6220 (_initialize_record_btrace): Remove reference to
6221 init_record_btrace_ops.
6222 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6223 the execution_direction global.
6224 (record_full_base_target, record_full_target)
6225 (record_full_core_target): New classes.
6226 (record_full_ops): Now a record_full_target.
6227 (record_full_core_ops): Now a record_full_core_target.
6228 (record_full_target::detach, record_full_target::disconnect)
6229 (record_full_core_target::disconnect)
6230 (record_full_target::mourn_inferior, record_full_target::kill):
6231 New.
6232 (record_full_open, record_full_close, record_full_async): Refactor
6233 as methods of the record_full_base_target class.
6234 (record_full_resume, record_full_commit_resume): Refactor
6235 as methods of the record_full_target class.
6236 (record_full_wait, record_full_stopped_by_watchpoint)
6237 (record_full_stopped_data_address)
6238 (record_full_stopped_by_sw_breakpoint)
6239 (record_full_supports_stopped_by_sw_breakpoint)
6240 (record_full_stopped_by_hw_breakpoint)
6241 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6242 methods of the record_full_base_target class.
6243 (record_full_store_registers, record_full_xfer_partial)
6244 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6245 Refactor as methods of the record_full_target class.
6246 (record_full_can_execute_reverse, record_full_get_bookmark)
6247 (record_full_goto_bookmark, record_full_execution_direction)
6248 (record_full_record_method, record_full_info, record_full_delete)
6249 (record_full_is_replaying, record_full_will_replay)
6250 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6251 (record_full_stop_replaying): Refactor as methods of the
6252 record_full_base_target class.
6253 (record_full_core_resume, record_full_core_kill)
6254 (record_full_core_fetch_registers)
6255 (record_full_core_prepare_to_store)
6256 (record_full_core_store_registers, record_full_core_xfer_partial)
6257 (record_full_core_insert_breakpoint)
6258 (record_full_core_remove_breakpoint)
6259 (record_full_core_has_execution): Refactor
6260 as methods of the record_full_core_target class.
6261 (record_full_base_target::supports_delete_record): New.
6262 (init_record_full_ops): Delete.
6263 (init_record_full_core_ops): Delete.
6264 (record_full_save): Refactor as method of the
6265 record_full_base_target class.
6266 (_initialize_record_full): Remove references to
6267 init_record_full_ops and init_record_full_core_ops.
6268
6269 * remote.c (remote_target, extended_remote_target): New classes.
6270 (remote_ops): Now a remote_target.
6271 (extended_remote_ops): Now an extended_remote_target.
6272 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6273 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6274 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6275 (remote_pass_signals, remote_set_syscall_catchpoint)
6276 (remote_program_signals, )
6277 (remote_thread_always_alive): Remove target_ops parameter.
6278 (remote_thread_alive, remote_thread_name)
6279 (remote_update_thread_list, remote_threads_extra_info)
6280 (remote_static_tracepoint_marker_at)
6281 (remote_static_tracepoint_markers_by_strid)
6282 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6283 (remote_open): Refactor as methods of remote_target.
6284 (extended_remote_open, extended_remote_detach)
6285 (extended_remote_attach, extended_remote_post_attach):
6286 (extended_remote_supports_disable_randomization)
6287 (extended_remote_create_inferior): : Refactor as method of
6288 extended_remote_target.
6289 (remote_set_permissions, remote_open_1, remote_detach)
6290 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6291 (remote_resume, remote_commit_resume, remote_stop)
6292 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6293 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6294 (remote_prepare_to_store, remote_store_registers)
6295 (remote_flash_erase, remote_flash_done, remote_files_info)
6296 (remote_kill, remote_mourn, remote_insert_breakpoint)
6297 (remote_remove_breakpoint, remote_insert_watchpoint)
6298 (remote_watchpoint_addr_within_range)
6299 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6300 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6301 (remote_supports_stopped_by_sw_breakpoint)
6302 (remote_stopped_by_hw_breakpoint)
6303 (remote_supports_stopped_by_hw_breakpoint)
6304 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6305 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6306 (remote_verify_memory): Refactor as methods of remote_target.
6307 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6308 parameter.
6309 (remote_xfer_partial, remote_get_memory_xfer_limit)
6310 (remote_search_memory, remote_rcmd, remote_memory_map)
6311 (remote_pid_to_str, remote_get_thread_local_address)
6312 (remote_get_tib_address, remote_read_description): Refactor as
6313 methods of remote_target.
6314 (remote_target::fileio_open, remote_target::fileio_pwrite)
6315 (remote_target::fileio_pread, remote_target::fileio_close): New.
6316 (remote_hostio_readlink, remote_hostio_fstat)
6317 (remote_filesystem_is_local, remote_can_execute_reverse)
6318 (remote_supports_non_stop, remote_supports_disable_randomization)
6319 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6320 (remote_supports_enable_disable_tracepoint)
6321 (remote_supports_string_tracing)
6322 (remote_can_run_breakpoint_commands, remote_trace_init)
6323 (remote_download_tracepoint, remote_can_download_tracepoint)
6324 (remote_download_trace_state_variable, remote_enable_tracepoint)
6325 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6326 (remote_trace_start, remote_get_trace_status)
6327 (remote_get_tracepoint_status, remote_trace_stop)
6328 (remote_trace_find, remote_get_trace_state_variable_value)
6329 (remote_save_trace_data, remote_get_raw_trace_data)
6330 (remote_set_disconnected_tracing, remote_core_of_thread)
6331 (remote_set_circular_trace_buffer, remote_traceframe_info)
6332 (remote_get_min_fast_tracepoint_insn_len)
6333 (remote_set_trace_buffer_size, remote_set_trace_notes)
6334 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6335 (remote_disable_btrace, remote_teardown_btrace)
6336 (remote_read_btrace, remote_btrace_conf)
6337 (remote_augmented_libraries_svr4_read, remote_load)
6338 (remote_pid_to_exec_file, remote_can_do_single_step)
6339 (remote_execution_direction, remote_thread_handle_to_thread_info):
6340 Refactor as methods of remote_target.
6341 (init_remote_ops, init_extended_remote_ops): Delete.
6342 (remote_can_async_p, remote_is_async_p, remote_async)
6343 (remote_thread_events, remote_upload_tracepoints)
6344 (remote_upload_trace_state_variables): Refactor as methods of
6345 remote_target.
6346 (_initialize_remote): Remove references to init_remote_ops and
6347 init_extended_remote_ops.
6348
6349 * remote-sim.c (gdbsim_target): New class.
6350 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6351 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6352 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6353 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6354 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6355 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6356 Refactor as methods of gdbsim_target.
6357 (gdbsim_ops): Now a gdbsim_target.
6358 (init_gdbsim_ops): Delete.
6359 (gdbsim_cntrl_c): Adjust.
6360 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6361
6362 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6363 (the_amd64_linux_nat_target): New.
6364 (amd64_linux_fetch_inferior_registers)
6365 (amd64_linux_store_inferior_registers): Refactor as methods of
6366 amd64_linux_nat_target.
6367 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6368 * i386-linux-nat.c: Don't include "linux-nat.h".
6369 (i386_linux_nat_target): New class.
6370 (the_i386_linux_nat_target): New.
6371 (i386_linux_fetch_inferior_registers)
6372 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6373 as methods of i386_linux_nat_target.
6374 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6375 * inf-child.c (inf_child_ops): Delete.
6376 (inf_child_fetch_inferior_registers)
6377 (inf_child_store_inferior_registers): Delete.
6378 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6379 methods of inf_child_target.
6380 (inf_child_target::supports_terminal_ours)
6381 (inf_child_target::terminal_init)
6382 (inf_child_target::terminal_inferior)
6383 (inf_child_target::terminal_ours_for_output)
6384 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6385 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6386 New.
6387 (inf_child_open, inf_child_disconnect, inf_child_close)
6388 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6389 (inf_child_post_startup_inferior, inf_child_can_run)
6390 (inf_child_pid_to_exec_file): Refactor as methods of
6391 inf_child_target.
6392 (inf_child_follow_fork): Delete.
6393 (inf_child_target::can_create_inferior)
6394 (inf_child_target::can_attach): New.
6395 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6396 (inf_child_target::has_stack, inf_child_target::has_registers)
6397 (inf_child_target::has_execution): New.
6398 (inf_child_fileio_open, inf_child_fileio_pwrite)
6399 (inf_child_fileio_pread, inf_child_fileio_fstat)
6400 (inf_child_fileio_close, inf_child_fileio_unlink)
6401 (inf_child_fileio_readlink, inf_child_use_agent)
6402 (inf_child_can_use_agent): Refactor as methods of
6403 inf_child_target.
6404 (return_zero, inf_child_target): Delete.
6405 (inf_child_target::inf_child_target): New.
6406 * inf-child.h: Include "target.h".
6407 (inf_child_target): Delete function prototype.
6408 (inf_child_target): New class.
6409 (inf_child_open_target, inf_child_mourn_inferior)
6410 (inf_child_maybe_unpush_target): Delete.
6411 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6412 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6413 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6414 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6415 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6416 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6417 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6418 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6419 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6420 methods of inf_ptrace_target.
6421 (inf_ptrace_target): Delete function.
6422 * inf-ptrace.h: Include "inf-child.h".
6423 (inf_ptrace_target): Delete function declaration.
6424 (inf_ptrace_target): New class.
6425 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6426 * linux-nat.c (linux_target): New.
6427 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6428 (linux_nat_target::~linux_nat_target): New.
6429 (linux_child_post_attach, linux_child_post_startup_inferior)
6430 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6431 (linux_child_remove_fork_catchpoint)
6432 (linux_child_insert_vfork_catchpoint)
6433 (linux_child_remove_vfork_catchpoint)
6434 (linux_child_insert_exec_catchpoint)
6435 (linux_child_remove_exec_catchpoint)
6436 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6437 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6438 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6439 (linux_nat_stopped_data_address)
6440 (linux_nat_stopped_by_sw_breakpoint)
6441 (linux_nat_supports_stopped_by_sw_breakpoint)
6442 (linux_nat_stopped_by_hw_breakpoint)
6443 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6444 (linux_nat_kill, linux_nat_mourn_inferior)
6445 (linux_nat_xfer_partial, linux_nat_thread_alive)
6446 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6447 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6448 (linux_child_static_tracepoint_markers_by_strid)
6449 (linux_nat_is_async_p, linux_nat_can_async_p)
6450 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6451 (linux_nat_supports_multi_process)
6452 (linux_nat_supports_disable_randomization, linux_nat_async)
6453 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6454 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6455 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6456 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6457 methods of linux_nat_target.
6458 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6459 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6460 parameter.
6461 (check_stopped_by_watchpoint): Adjust.
6462 (linux_xfer_partial): Delete.
6463 (linux_target_install_ops, linux_target, linux_nat_add_target):
6464 Delete.
6465 (linux_nat_target::linux_nat_target): New.
6466 * linux-nat.h: Include "inf-ptrace.h".
6467 (linux_nat_target): New.
6468 (linux_target, linux_target_install_ops, linux_nat_add_target):
6469 Delete function declarations.
6470 (linux_target): Declare global.
6471 * linux-thread-db.c (thread_db_target): New.
6472 (thread_db_target::thread_db_target): New.
6473 (thread_db_ops): Delete.
6474 (the_thread_db_target): New.
6475 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6476 (thread_db_update_thread_list, thread_db_pid_to_str)
6477 (thread_db_extra_thread_info)
6478 (thread_db_thread_handle_to_thread_info)
6479 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6480 (thread_db_resume): Refactor as methods of thread_db_target.
6481 (init_thread_db_ops): Delete.
6482 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6483 * x86-linux-nat.c: Don't include "linux-nat.h".
6484 (super_post_startup_inferior): Delete.
6485 (x86_linux_nat_target::~x86_linux_nat_target): New.
6486 (x86_linux_child_post_startup_inferior)
6487 (x86_linux_read_description, x86_linux_enable_btrace)
6488 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6489 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6490 methods of x86_linux_nat_target.
6491 (x86_linux_create_target): Delete. Bits folded ...
6492 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6493 pointer.
6494 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6495 (x86_linux_nat_target): New class.
6496 (x86_linux_create_target): Delete.
6497 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6498 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6499 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6500 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6501 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6502 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6503 make extern.
6504 (x86_use_watchpoints): Delete.
6505 * x86-nat.h: Include "breakpoint.h" and "target.h".
6506 (x86_use_watchpoints): Delete.
6507 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6508 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6509 (x86_insert_watchpoint, x86_remove_watchpoint)
6510 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6511 (x86_stopped_by_hw_breakpoint): New declarations.
6512 (x86_nat_target): New template class.
6513
6514 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6515 (the_ppc_linux_nat_target): New.
6516 (ppc_linux_fetch_inferior_registers)
6517 (ppc_linux_can_use_hw_breakpoint)
6518 (ppc_linux_region_ok_for_hw_watchpoint)
6519 (ppc_linux_ranged_break_num_registers)
6520 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6521 (ppc_linux_insert_mask_watchpoint)
6522 (ppc_linux_remove_mask_watchpoint)
6523 (ppc_linux_can_accel_watchpoint_condition)
6524 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6525 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6526 (ppc_linux_watchpoint_addr_within_range)
6527 (ppc_linux_masked_watch_num_registers)
6528 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6529 (ppc_linux_read_description): Refactor as methods of
6530 ppc_linux_nat_target.
6531 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6532
6533 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6534 (procfs_target): New class.
6535 (the_procfs_target): New.
6536 (procfs_target): Delete function.
6537 (procfs_auxv_parse, procfs_attach, procfs_detach)
6538 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6539 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6540 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6541 (procfs_create_inferior, procfs_update_thread_list)
6542 (procfs_thread_alive, procfs_pid_to_str)
6543 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6544 (procfs_stopped_data_address, procfs_insert_watchpoint)
6545 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6546 (proc_find_memory_regions, procfs_info_proc)
6547 (procfs_make_note_section): Refactor as methods of procfs_target.
6548 (_initialize_procfs): Adjust.
6549 * sol-thread.c (sol_thread_target): New class.
6550 (sol_thread_ops): Now a sol_thread_target.
6551 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6552 (sol_thread_fetch_registers, sol_thread_store_registers)
6553 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6554 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6555 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6556 (init_sol_thread_ops): Delete.
6557 (_initialize_sol_thread): Adjust. Remove references to
6558 init_sol_thread_ops and complete_target_initialization.
6559
6560 * windows-nat.c (windows_nat_target): New class.
6561 (windows_fetch_inferior_registers)
6562 (windows_store_inferior_registers, windows_resume, windows_wait)
6563 (windows_attach, windows_detach, windows_pid_to_exec_file)
6564 (windows_files_info, windows_create_inferior)
6565 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6566 (windows_close, windows_pid_to_str, windows_xfer_partial)
6567 (windows_get_tib_address, windows_get_ada_task_ptid)
6568 (windows_thread_name, windows_thread_alive): Refactor as
6569 windows_nat_target methods.
6570 (do_initial_windows_stuff): Adjust.
6571 (windows_target): Delete function.
6572 (_initialize_windows_nat): Adjust.
6573
6574 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6575 (darwin_mourn_inferior, darwin_kill_inferior)
6576 (darwin_create_inferior, darwin_attach, darwin_detach)
6577 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6578 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6579 (darwin_supports_multi_process): Refactor as darwin_nat_target
6580 methods.
6581 (darwin_resume_to, darwin_files_info): Delete.
6582 (_initialize_darwin_inferior): Rename to ...
6583 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6584 * darwin-nat.h: Include "inf-child.h".
6585 (darwin_nat_target): New class.
6586 (darwin_complete_target): Delete.
6587 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6588 (darwin_target): New.
6589 (i386_darwin_fetch_inferior_registers)
6590 (i386_darwin_store_inferior_registers): Refactor as methods of
6591 darwin_nat_target.
6592 (darwin_complete_target): Delete, with ...
6593 (_initialize_i386_darwin_nat): ... bits factored out here.
6594
6595 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6596 (the_alpha_linux_nat_target): New.
6597 (alpha_linux_register_u_offset): Refactor as
6598 alpha_linux_nat_target method.
6599 (_initialize_alpha_linux_nat): Adjust.
6600 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6601 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6602 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6603 methods of linux_nat_trad_target.
6604 (linux_trad_target): Delete.
6605 * linux-nat-trad.h (linux_trad_target): Delete function.
6606 (linux_nat_trad_target): New class.
6607 * mips-linux-nat.c (mips_linux_nat_target): New class.
6608 (super_fetch_registers, super_store_registers, super_close):
6609 Delete.
6610 (the_mips_linux_nat_target): New.
6611 (mips64_linux_regsets_fetch_registers)
6612 (mips64_linux_regsets_store_registers)
6613 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6614 (mips_linux_register_u_offset, mips_linux_read_description)
6615 (mips_linux_can_use_hw_breakpoint)
6616 (mips_linux_stopped_by_watchpoint)
6617 (mips_linux_stopped_data_address)
6618 (mips_linux_region_ok_for_hw_watchpoint)
6619 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6620 (mips_linux_close): Refactor as methods of mips_linux_nat.
6621 (_initialize_mips_linux_nat): Adjust to C++ification.
6622
6623 * aix-thread.c (aix_thread_target): New class.
6624 (aix_thread_ops): Now an aix_thread_target.
6625 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6626 (aix_thread_fetch_registers, aix_thread_store_registers)
6627 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6628 (aix_thread_thread_alive, aix_thread_pid_to_str)
6629 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6630 Refactor as methods of aix_thread_target.
6631 (init_aix_thread_ops): Delete.
6632 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6633 and complete_target_initialization.
6634 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6635 (rs6000_nat_target): New class.
6636 (the_rs6000_nat_target): New.
6637 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6638 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6639 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6640 (super_create_inferior): Delete.
6641 (_initialize_rs6000_nat): Adjust to C++ification.
6642
6643 * arm-linux-nat.c (arm_linux_nat_target): New class.
6644 (the_arm_linux_nat_target): New.
6645 (arm_linux_fetch_inferior_registers)
6646 (arm_linux_store_inferior_registers, arm_linux_read_description)
6647 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6648 (arm_linux_remove_hw_breakpoint)
6649 (arm_linux_region_ok_for_hw_watchpoint)
6650 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6651 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6652 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6653 arm_linux_nat_target.
6654 (_initialize_arm_linux_nat): Adjust to C++ification.
6655
6656 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6657 (the_aarch64_linux_nat_target): New.
6658 (aarch64_linux_fetch_inferior_registers)
6659 (aarch64_linux_store_inferior_registers)
6660 (aarch64_linux_child_post_startup_inferior)
6661 (aarch64_linux_read_description)
6662 (aarch64_linux_can_use_hw_breakpoint)
6663 (aarch64_linux_insert_hw_breakpoint)
6664 (aarch64_linux_remove_hw_breakpoint)
6665 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6666 (aarch64_linux_region_ok_for_hw_watchpoint)
6667 (aarch64_linux_stopped_data_address)
6668 (aarch64_linux_stopped_by_watchpoint)
6669 (aarch64_linux_watchpoint_addr_within_range)
6670 (aarch64_linux_can_do_single_step): Refactor as methods of
6671 aarch64_linux_nat_target.
6672 (super_post_startup_inferior): Delete.
6673 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6674
6675 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6676 (the_hppa_linux_nat_target): New.
6677 (hppa_linux_fetch_inferior_registers)
6678 (hppa_linux_store_inferior_registers): Refactor as methods of
6679 hppa_linux_nat_target.
6680 (_initialize_hppa_linux_nat): Adjust to C++ification.
6681
6682 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6683 (the_ia64_linux_nat_target): New.
6684 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6685 (ia64_linux_stopped_data_address)
6686 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6687 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6688 ia64_linux_nat_target methods.
6689 (super_xfer_partial): Delete.
6690 (_initialize_ia64_linux_nat): Adjust to C++ification.
6691
6692 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6693 (the_m32r_linux_nat_target): New.
6694 (m32r_linux_fetch_inferior_registers)
6695 (m32r_linux_store_inferior_registers): Refactor as
6696 m32r_linux_nat_target methods.
6697 (_initialize_m32r_linux_nat): Adjust to C++ification.
6698
6699 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6700 (the_m68k_linux_nat_target): New.
6701 (m68k_linux_fetch_inferior_registers)
6702 (m68k_linux_store_inferior_registers): Refactor as
6703 m68k_linux_nat_target methods.
6704 (_initialize_m68k_linux_nat): Adjust to C++ification.
6705
6706 * s390-linux-nat.c (s390_linux_nat_target): New class.
6707 (the_s390_linux_nat_target): New.
6708 (s390_linux_fetch_inferior_registers)
6709 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6710 (s390_insert_watchpoint, s390_remove_watchpoint)
6711 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6712 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6713 (s390_auxv_parse, s390_read_description): Refactor as methods of
6714 s390_linux_nat_target.
6715 (_initialize_s390_nat): Adjust to C++ification.
6716
6717 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6718 (the_sparc_linux_nat_target): New.
6719 (_initialize_sparc_linux_nat): Adjust to C++ification.
6720 * sparc-nat.c (sparc_fetch_inferior_registers)
6721 (sparc_store_inferior_registers): Remove target_ops parameter.
6722 * sparc-nat.h (sparc_fetch_inferior_registers)
6723 (sparc_store_inferior_registers): Remove target_ops parameter.
6724 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6725 (the_sparc64_linux_nat_target): New.
6726 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6727
6728 * spu-linux-nat.c (spu_linux_nat_target): New class.
6729 (the_spu_linux_nat_target): New.
6730 (spu_child_post_startup_inferior, spu_child_post_attach)
6731 (spu_child_wait, spu_fetch_inferior_registers)
6732 (spu_store_inferior_registers, spu_xfer_partial)
6733 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6734 methods.
6735 (_initialize_spu_nat): Adjust to C++ification.
6736
6737 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6738 (the_tilegx_linux_nat_target): New.
6739 (fetch_inferior_registers, store_inferior_registers):
6740 Refactor as methods.
6741 (_initialize_tile_linux_nat): Adjust to C++ification.
6742
6743 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6744 (the_xtensa_linux_nat_target): New.
6745 (xtensa_linux_fetch_inferior_registers)
6746 (xtensa_linux_store_inferior_registers): Refactor as
6747 xtensa_linux_nat_target methods.
6748 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6749
6750 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6751 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6752 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6753 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6754 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6755 (fbsd_stopped_by_sw_breakpoint)
6756 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6757 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6758 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6759 (fbsd_post_startup_inferior, fbsd_post_attach)
6760 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6761 (fbsd_set_syscall_catchpoint)
6762 (super_xfer_partial, super_resume, super_wait)
6763 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6764 (fbsd_handle_debug_trap): Remove target_ops parameter.
6765 (fbsd_nat_add_target): Delete.
6766 * fbsd-nat.h: Include "inf-ptrace.h".
6767 (fbsd_nat_add_target): Delete.
6768 (USE_SIGTRAP_SIGINFO): Define.
6769 (fbsd_nat_target): New class.
6770
6771 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6772 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6773 (amd64bsd_target): Delete.
6774 * amd64-bsd-nat.h: New file.
6775 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6776 "x86-bsd-nat.h".
6777 (amd64_fbsd_nat_target): New class.
6778 (the_amd64_fbsd_nat_target): New.
6779 (amd64fbsd_read_description): Refactor as method of
6780 amd64_fbsd_nat_target.
6781 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6782 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6783 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6784 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6785 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6786 (i386bsd_target): Delete.
6787 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6788 (i386bsd_fetch_inferior_registers)
6789 (i386bsd_store_inferior_registers): Declare.
6790 (i386_bsd_nat_target): New class.
6791 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6792 (the_i386_fbsd_nat_target): New.
6793 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6794 i386_fbsd_nat_target methods.
6795 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6796 (_initialize_i386fbsd_nat): Adjust to C++ification.
6797 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6798 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6799 (_initialize_x86_bsd_nat): Adjust to C++ification.
6800 * x86-bsd-nat.h: Include "x86-nat.h".
6801 (x86bsd_target): Delete declaration.
6802 (x86bsd_nat_target): New class.
6803
6804 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6805 (the_aarch64_fbsd_nat_target): New.
6806 (aarch64_fbsd_fetch_inferior_registers)
6807 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6808 aarch64_fbsd_nat_target.
6809 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6810 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6811 (the_alpha_bsd_nat_target): New.
6812 (alphabsd_fetch_inferior_registers)
6813 (alphabsd_store_inferior_registers): Refactor as
6814 alpha_bsd_nat_target methods.
6815 (_initialize_alphabsd_nat): Refactor as methods of
6816 alpha_bsd_nat_target.
6817 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6818 (the_amd64_nbsd_nat_target): New.
6819 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6820 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6821 (the_amd64_obsd_nat_target): New.
6822 (_initialize_amd64obsd_nat): Adjust to C++ification.
6823 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6824 (the_arm_fbsd_nat_target): New.
6825 (arm_fbsd_fetch_inferior_registers)
6826 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6827 (_initialize_arm_fbsd_nat): Refactor as methods of
6828 arm_fbsd_nat_target.
6829 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6830 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6831 (the_arm_netbsd_nat_target): New.
6832 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6833 arm_netbsd_nat_target.
6834 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6835 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6836 (the_hppa_nbsd_nat_target): New.
6837 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6838 hppa_nbsd_nat_target methods.
6839 (_initialize_hppanbsd_nat): Adjust to C++ification.
6840 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6841 (the_hppa_obsd_nat_target): New.
6842 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6843 methods of hppa_obsd_nat_target.
6844 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6845 add_target.
6846 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6847 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6848 add_target.
6849 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6850 (_initialize_i386obsd_nat): Use add_target.
6851 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6852 (the_m68k_bsd_nat_target): New.
6853 (m68kbsd_fetch_inferior_registers)
6854 (m68kbsd_store_inferior_registers): Refactor as methods of
6855 m68k_bsd_nat_target.
6856 (_initialize_m68kbsd_nat): Adjust to C++ification.
6857 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6858 (the_mips_fbsd_nat_target): New.
6859 (mips_fbsd_fetch_inferior_registers)
6860 (mips_fbsd_store_inferior_registers): Refactor as methods of
6861 mips_fbsd_nat_target.
6862 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6863 add_target.
6864 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6865 (the_mips_nbsd_nat_target): New.
6866 (mipsnbsd_fetch_inferior_registers)
6867 (mipsnbsd_store_inferior_registers): Refactor as methods of
6868 mips_nbsd_nat_target.
6869 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6870 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6871 (the_mips64_obsd_nat_target): New.
6872 (mips64obsd_fetch_inferior_registers)
6873 (mips64obsd_store_inferior_registers): Refactor as methods of
6874 mips64_obsd_nat_target.
6875 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6876 add_target.
6877 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6878 nbsd_nat_target.
6879 * nbsd-nat.h: Include "inf-ptrace.h".
6880 (nbsd_nat_target): New class.
6881 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6882 (obsd_wait): Refactor as methods of obsd_nat_target.
6883 (obsd_add_target): Delete.
6884 * obsd-nat.h: Include "inf-ptrace.h".
6885 (obsd_nat_target): New class.
6886 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6887 (the_ppc_fbsd_nat_target): New.
6888 (ppcfbsd_fetch_inferior_registers)
6889 (ppcfbsd_store_inferior_registers): Refactor as methods of
6890 ppc_fbsd_nat_target.
6891 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6892 add_target.
6893 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6894 (the_ppc_nbsd_nat_target): New.
6895 (ppcnbsd_fetch_inferior_registers)
6896 (ppcnbsd_store_inferior_registers): Refactor as methods of
6897 ppc_nbsd_nat_target.
6898 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6899 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6900 (the_ppc_obsd_nat_target): New.
6901 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6902 methods of ppc_obsd_nat_target.
6903 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6904 add_target.
6905 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6906 (the_sh_nbsd_nat_target): New.
6907 (shnbsd_fetch_inferior_registers)
6908 (shnbsd_store_inferior_registers): Refactor as methods of
6909 sh_nbsd_nat_target.
6910 (_initialize_shnbsd_nat): Adjust to C++ification.
6911 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6912 (inf_ptrace_xfer_partial): Delete.
6913 (sparc_xfer_partial, sparc_target): Delete.
6914 * sparc-nat.h (sparc_fetch_inferior_registers)
6915 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6916 (sparc_target): Delete function declaration.
6917 (sparc_target): New template class.
6918 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6919 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6920 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6921 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6922 add_target.
6923 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6924 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6925 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6926 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6927 add_target.
6928 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6929 (the_vax_bsd_nat_target): New.
6930 (vaxbsd_fetch_inferior_registers)
6931 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6932 methods.
6933 (_initialize_vaxbsd_nat): Adjust to C++ification.
6934
6935 * bsd-kvm.c (bsd_kvm_target): New class.
6936 (bsd_kvm_ops): Now a bsd_kvm_target.
6937 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6938 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6939 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6940 bsd_kvm_target.
6941 (bsd_kvm_return_one): Delete.
6942 (bsd_kvm_add_target): Adjust to C++ification.
6943
6944 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6945 (nto_procfs_target_procfs): New classes.
6946 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6947 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6948 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6949 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6950 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6951 (procfs_remove_hw_breakpoint, procfs_resume)
6952 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6953 (procfs_kill_inferior, procfs_store_registers)
6954 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6955 as methods of nto_procfs_target.
6956 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6957 (nto_native_ops): Delete.
6958 (procfs_open, procfs_native_open): Delete.
6959 (nto_native_ops): Now an nto_procfs_target_native.
6960 (init_procfs_targets): Adjust to C++ification.
6961 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6962 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6963 Refactor as methods of nto_procfs_target.
6964
6965 * go32-nat.c (go32_nat_target): New class.
6966 (the_go32_nat_target): New.
6967 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6968 (go32_store_registers, go32_xfer_partial, go32_files_info)
6969 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6970 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6971 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6972 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6973 (go32_target): Delete.
6974 (_initialize_go32_nat): Adjust to C++ification.
6975
6976 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6977 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6978 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6979 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6980 gnu_nat_target.
6981 (gnu_target): Delete.
6982 * gnu-nat.h (gnu_target): Delete.
6983 (gnu_nat_target): New class.
6984 * i386-gnu-nat.c (gnu_base_target): New.
6985 (i386_gnu_nat_target): New class.
6986 (the_i386_gnu_nat_target): New.
6987 (_initialize_i386gnu_nat): Adjust to C++ification.
6988
3fffc070
PA
69892018-05-02 Pedro Alves <palves@redhat.com>
6990
6991 * bfd-target.c (target_bfd_xclose): Rename to ...
6992 (target_bfd_close): ... this.
6993 (target_bfd_reopen): Adjust.
6994 * target.c (target_close): Remove references to to_xclose.
6995 * target.h (target_ops::to_xclose): Delete.
6996 (target_ops::to_close): Update comments.
6997
6798487f
PA
69982018-05-02 Pedro Alves <palves@redhat.com>
6999
7000 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7001 "linux-nat.h".
7002 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7003 * inf-ptrace.c (inf_ptrace_register_u_offset)
7004 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7005 (inf_ptrace_store_register, inf_ptrace_store_registers)
7006 (inf_ptrace_trad_target): Move to ...
7007 * linux-nat-trad.c: ... this new file.
7008 * linux-nat-trad.h: New file.
7009 * linux-nat.c (linux_target_install_ops): Make extern.
7010 (linux_trad_target): Delete.
7011 * linux-nat.h (linux_trad_target): Delete declaration.
7012 (linux_target_install_ops): Declare.
7013 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7014 "linux-nat.h".
7015
c1955e17
PA
70162018-05-02 Pedro Alves <palves@redhat.com>
7017
7018 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7019 procfs_target/add_target here.
7020 * procfs.c (procfs_target): Make static.
7021 (_initialize_procfs): Call add_target here.
7022 * procfs.h (struct target_ops): Remove forward declaration.
7023 (procfs_target): Remove declaration.
7024 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7025
b5c8fcb1
PA
70262018-05-02 Pedro Alves <palves@redhat.com>
7027
7028 * procfs.c (procfs_stopped_by_watchpoint)
7029 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7030 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7031 Forward declare.
7032 (procfs_use_watchpoints): Delete, move contents...
7033 (procfs_target): ... here.
7034 * procfs.h (procfs_use_watchpoints): Delete declaration.
7035 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7036 procfs_use_watchpoints.
7037 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7038 procfs_use_watchpoints.
7039
0489430a
TT
70402018-05-02 Tom Tromey <tom@tromey.com>
7041
7042 PR python/20084:
7043 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7044 and var_zuinteger_unlimited.
7045 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7046 and PARAM_ZUINTEGER_UNLIMITED.
7047 (set_parameter_value): Handle var_zuinteger and
7048 var_zuinteger_unlimited.
7049 (add_setshow_generic): Likewise.
7050 (parmpy_init): Likewise.
7051
1632f8ba
DR
70522018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7053
7054 PR rust/23124
7055 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7056 pointer is not null before dereferencing it.
7057
76761936
TT
70582018-04-30 Tom Tromey <tom@tromey.com>
7059
7060 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7061 is_mi_like_p.
7062
2d33446d
TT
70632018-04-30 Tom Tromey <tom@tromey.com>
7064
7065 * breakpoint.c (mention): Remove use of is_mi_like_p.
7066 (print_mention_ranged_breakpoint): Likewise.
7067 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7068 of is_mi_like_p.
7069
f3c6abab
TT
70702018-04-30 Tom Tromey <tom@tromey.com>
7071
7072 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7073
40c03530
TT
70742018-04-30 Tom Tromey <tom@tromey.com>
7075
7076 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7077 (info_spu_event_command): Remove some uses of is_mi_like_p.
7078
2038b7fd
TT
70792018-04-30 Tom Tromey <tom@tromey.com>
7080
7081 * python/py-framefilter.c (py_print_single_arg)
7082 (enumerate_locals, py_print_args, py_print_frame): Remove some
7083 uses of is_mi_like_p.
7084
4904c3c6
TT
70852018-04-30 Tom Tromey <tom@tromey.com>
7086
7087 * ui-out.c: Update.
7088 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7089 * ui-out.h (ui_out::is_mi_like_p): Now const.
7090 (ui_out::do_is_mi_like_p): Now const.
7091 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7092
7c66fffc
TT
70932018-04-30 Tom Tromey <tom@tromey.com>
7094
7095 * varobj.c (varobj_set_visualizer): Use new_reference.
7096 * python/python.c (gdbpy_decode_line): Use new_reference.
7097 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7098 new_reference.
7099
bbfa6f00
TT
71002018-04-30 Tom Tromey <tom@tromey.com>
7101
7102 * varobj.c (install_new_value): Use new_reference.
7103 * value.h (value_incref): Return void. Swap intro comment with
7104 value_decref.
7105 * value.c (set_value_parent): Use new_reference.
7106 (value_incref): Return void. Update intro comment.
7107 (release_value): Use new_reference.
7108 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7109
1831a9f9
TT
71102018-04-30 Tom Tromey <tom@tromey.com>
7111
7112 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7113 * gdb_bfd.h (new_bfd_ref): Remove.
7114 (gdb_bfd_open): Update comment.
7115 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7116 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7117 (gdb_bfd_fdopenr): Use new_reference.
7118 * exec.c (exec_file_attach): Use new_reference.
7119
7c1b5f3d
TT
71202018-04-30 Tom Tromey <tom@tromey.com>
7121
7122 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7123 method.
7124
e11fb955
TT
71252018-04-30 Tom Tromey <tom@tromey.com>
7126
7127 * jit.c (jit_read_code_entry): Use type_align.
7128 * i386-tdep.c (i386_gdbarch_init): Don't call
7129 set_gdbarch_long_long_align_bit.
7130 * gdbarch.sh: Remove long_long_align_bit.
7131 * gdbarch.c, gdbarch.h: Rebuild.
7132 * arc-tdep.c (arc_type_align): New function.
7133 (arc_gdbarch_init): Use arc_type_align. Don't call
7134 set_gdbarch_long_long_align_bit.
7135
2fff16dd
TT
71362018-04-30 Tom Tromey <tom@tromey.com>
7137
7138 * rust-lang.c (rust_type_alignment): Remove.
7139 (rust_composite_type): Use type_align.
7140
6d7bb824
TT
71412018-04-30 Tom Tromey <tom@tromey.com>
7142
7143 * NEWS: Mention Type.align.
7144 * python/py-type.c (typy_get_alignof): New function.
7145 (type_object_getset): Add "alignof".
7146
007e1530
TT
71472018-04-30 Tom Tromey <tom@tromey.com>
7148
7149 PR exp/17095:
7150 * NEWS: Update.
7151 * std-operator.def (UNOP_ALIGNOF): New operator.
7152 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7153 New.
7154 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7155 * c-lang.c (c_op_print_tab): Add alignof.
7156 * c-exp.y (ALIGNOF): New token.
7157 (exp): Add "ALIGNOF" production.
7158 (ident_tokens): Add _Alignof and alignof.
7159
2b4424c3
TT
71602018-04-30 Tom Tromey <tom@tromey.com>
7161
7162 * i386-tdep.c (i386_type_align): New function.
7163 (i386_gdbarch_init): Update.
7164 * gdbarch.sh (type_align): New method.
7165 * gdbarch.c, gdbarch.h: Rebuild.
7166 * arch-utils.h (default_type_align): Declare.
7167 * arch-utils.c (default_type_align): New function.
7168 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7169 (struct type) <align_log2>: New field.
7170 <instance_flags>: Now a bitfield.
7171 (TYPE_RAW_ALIGN): New macro.
7172 (type_align, type_raw_align, set_type_align): Declare.
7173 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7174 functions.
7175 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7176 (get_alignment, maybe_set_alignment): New functions.
7177 (read_structure_type, read_enumeration_type, read_array_type)
7178 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7179 (read_subrange_type, read_base_type): Set type alignment.
7180
d33bc52e
SM
71812018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7182
7183 * dwarf2read.c (read_index_from_section): Use bool.
7184
e28b63a9
FG
71852018-04-29 Fabian Groffen <grobian@gentoo.org>
7186
7187 PR gdb/22950
7188 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7189 with #ifdef.
7190
cd8c76e4
JR
71912018-04-29 John Reiser <jreiser@BitWagon.com>
7192
7193 PR build/22873
7194 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7195 last step, and do it atomically.
7196
476d250e
AO
71972018-04-27 Alexandre Oliva <aoliva@redhat.com>
7198
7199 * compile/compile-c-types.c (convert_int, convert_float):
7200 Update for C FE v1.
7201
6873858b
TT
72022018-04-27 Tom Tromey <tom@tromey.com>
7203
7204 PR rust/22545:
7205 * rust-lang.c (rust_inclusive_range_type_p): New function.
7206 (rust_range): Handle inclusive ranges.
7207 (rust_compute_range): Likewise.
7208 * rust-exp.y (struct rust_op) <inclusive>: New field.
7209 (DOTDOTEQ): New constant.
7210 (range_expr): Add "..=" productions.
7211 (operator_tokens): Add "..=" token.
7212 (ast_range): Add "inclusive" parameter.
7213 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7214 ranges.
7215 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7216 bounds values.
7217 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7218 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7219 Update comments.
7220 * expprint.c (print_subexp_standard): Handle new bounds values.
7221 (dump_subexp_body_standard): Likewise.
7222
632e107b
TT
72232018-04-27 Tom Tromey <tom@tromey.com>
7224
7225 * configure: Rebuild.
7226 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7227 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7228 "OVERRIDE".
7229 (class symbol_needs_eval_context): Likewise.
7230 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7231 (mock_mapped_index::symbol_name_at): Use "override". Remove
7232 "virtual".
7233 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7234 "override".
7235 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7236 * aarch64-tdep.c (instruction_reader::read): Use "override".
7237 (instruction_reader_test::read): Likewise.
7238 * arm-tdep.c (instruction_reader::read): Use "override".
7239 (instruction_reader_thumb::read): Likewise.
7240
b75abf5b
AK
72412018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7242
7243 PR remote/9665
7244 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7245 instead of remote_send.
7246 (remote_send): Remove.
7247
79188d8d
PA
72482018-04-26 Pedro Alves <palves@redhat.com>
7249
7250 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7251 find_function_start_sal instead of find_pc_line.
7252
f50776aa
PA
72532018-04-26 Pedro Alves <palves@redhat.com>
7254
7255 * breakpoint.c (set_breakpoint_location_function): Handle
7256 mst_data_gnu_ifunc.
7257 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7258 * elfread.c (elf_symtab_read): Give data symbols with
7259 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7260 (elf_rel_plt_read): Update comment.
7261 * linespec.c (convert_linespec_to_sals): Handle
7262 mst_data_gnu_ifunc.
7263 (minsym_found): Handle mst_data_gnu_ifunc.
7264 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7265 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7266 * parse.c (find_minsym_type_and_address): Handle
7267 mst_data_gnu_ifunc.
7268 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7269 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7270 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7271 comment.
7272 <mst_data_gnu_ifunc>: New enumerator.
7273
20944a6e
PA
72742018-04-26 Pedro Alves <palves@redhat.com>
7275
7276 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7277 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7278 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7279 Handle it.
7280 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7281 (lookup_minimal_symbol_by_pc): Adjust.
7282 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7283 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7284 * minsyms.h (lookup_msym_prefer): New enum.
7285 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7286 parameter by a lookup_msym_prefer parameter.
7287
1adeb822
PA
72882018-04-26 Pedro Alves <palves@redhat.com>
7289
7290 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7291 ends in "@plt" instead of looking at the symbol's section.
7292
a0aca7b0
PA
72932018-04-26 Pedro Alves <palves@redhat.com>
7294
7295 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7296 all references.
7297 (find_pc_partial_function_gnu_ifunc): Rename to ...
7298 (find_pc_partial_function): ... this, and remove references to
7299 'is_gnu_ifunc_p'.
7300 (find_pc_partial_function): Delete old implementation.
7301 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7302
76af0f26
PA
73032018-04-26 Pedro Alves <palves@redhat.com>
7304
7305 * linespec.c (struct bound_minimal_symbol_search_key): New.
7306 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7307 skip first line if we found a GNU ifunc minimal symbol by name.
7308 (compare_msymbols): Change parameters to work with a destructured
7309 lhs minsym.
7310 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7311 functions.
7312
3467ec66
PA
73132018-04-26 Pedro Alves <palves@redhat.com>
7314
7315 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7316 ifunc targets here. Instead, if we have an ifunc minsym, use its
7317 address/name.
7318 (add_location_to_breakpoint): Store the minsym and the objfile in
7319 the breakpoint location.
7320 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7321 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7322 Record the minsym in the sal.
7323 * symtab.h (symtab_and_line) <msymbol>: New field.
7324
28f4fa4d
PA
73252018-04-26 Pedro Alves <palves@redhat.com>
7326
7327 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7328 unless we actually resolved the ifunc.
7329
ca31ab1d
PA
73302018-04-26 Pedro Alves <palves@redhat.com>
7331
7332 * c-exp.y (variable production): Prefer ifunc minsyms over
7333 regular function symbols.
7334 * symtab.c (find_gnu_ifunc): New function.
7335 * minsyms.h (lookup_msym_prefer): New enum.
7336 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7337 parameter by a lookup_msym_prefer parameter.
7338 * symtab.h (find_gnu_ifunc): New declaration.
7339
8388016d
PA
73402018-04-26 Pedro Alves <palves@redhat.com>
7341
7342 * blockframe.c (find_gnu_ifunc_target_type): New function.
7343 (find_function_type): New.
7344 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7345 return a value with a memory address.
7346 (eval_call): For calls to GNU ifunc functions, try to find the
7347 type of the target function from the type that the resolver
7348 returns.
7349 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7350 symbols.
7351 * infcall.c (find_function_return_type): Delete.
7352 (find_function_addr): Add 'function_type' parameter. For calls to
7353 GNU ifunc functions, try to find the type of the target function
7354 from the type that the resolver returns, and return it via
7355 FUNCTION_TYPE.
7356 (call_function_by_hand_dummy): Adjust to use the function type
7357 returned by find_function_addr.
7358 (find_function_addr): Add 'function_type' parameter and move
7359 description here.
7360 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7361 declarations.
7362
a376e11d
PA
73632018-04-26 Pedro Alves <palves@redhat.com>
7364
7365 * c-exp.y (variable production): Skip finding an alias for ifunc
7366 symbols.
7367
02e169e2
PA
73682018-04-26 Pedro Alves <palves@redhat.com>
7369
7370 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7371
249b5733
PA
73722018-04-25 Pedro Alves <palves@redhat.com>
7373
7374 * infcmd.c (kill_command): Print the pid as string, not the whole
7375 thread's ptid. Add comment. s/has been killed/killed/ in output
7376 message.
7377 * remote.c (remote_detach_1): Print the pid as string, not the
7378 whole thread's ptid.
7379
f67c0c91
SDJ
73802018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7381 Sergio Durigan Junior <sergiodj@redhat.com>
7382 Pedro Alves <palves@redhat.com>
7383
7384 * infcmd.c (kill_command): Print message when inferior has
7385 been killed.
7386 * inferior.c (print_inferior_events): Remove 'static'. Set as
7387 '1'.
7388 (add_inferior): Improve message printed when
7389 'print_inferior_events' is on.
7390 (exit_inferior): Remove message printed when
7391 'print_inferior_events' is on.
7392 (detach_inferior): Improve message printed when
7393 'print_inferior_events' is on.
7394 (initialize_inferiors): Use 'add_inferior_silent' to set
7395 'current_inferior_'.
7396 * inferior.h (print_inferior_events): Declare here as
7397 'extern'.
7398 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7399 '[Detaching...]' messages when 'print_inferior_events' is on.
7400 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7401 as prefix/suffix for messages. Remove periods. Fix erroneous
7402 'Detaching after fork from child...', replace it by '... from
7403 parent...'.
7404 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7405 prefix/suffix when printing 'Detaching...' messages. Print
7406 them when 'print_inferior_events' is on.
7407 * remote.c (remote_detach_1): Print message when detaching
7408 from inferior and '!is_fork_parent'.
7409
e427af18
TT
74102018-04-24 Tom Tromey <tom@tromey.com>
7411
7412 * cli-out.h: Reindent.
7413
05b1d8d6
TT
74142018-04-24 Tom Tromey <tom@tromey.com>
7415
7416 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7417 (cli_ui_out::do_field_string): Use fputs_filtered.
7418 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7419
a95c7dab
TT
74202018-04-23 Tom Tromey <tom@tromey.com>
7421
7422 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7423 gdb::unique_xmalloc_ptr.
7424
458412c3
TT
74252018-04-23 Tom Tromey <tom@tromey.com>
7426
7427 * configure: Rebuild.
7428
db86b02b
RS
74292018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7430
7431 PR gdb/23095
7432 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7433 prepare_for_testing. Set normal_bp to r_debug_state if target
7434 is bsd.
7435
00aecdcf
PA
74362018-04-21 Pedro Alves <palves@redhat.com>
7437 Rajendra SY <rajendra.sy@gmail.com>
7438
7439 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7440 * remote.c (extended_remote_attach): In all-stop mode, mark the
7441 thread as executing.
7442
224608c3
PW
74432018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7444
7445 * thread.c (thread_apply_all_command): Fix comment.
7446 (thread_command): Fix comment.
7447
3b74854b
AH
74482018-04-10 Alan Hayward <alan.hayward@arm.com>
7449
7450 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7451 parameter.
7452 * features/aarch64-core.c (create_feature_aarch64_core):
7453 Regenerate.
7454 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7455 Likewise.
7456 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7457 Likewise.
7458 * features/i386/32bit-avx512.c
7459 (create_feature_i386_32bit_avx512): Likewise.
7460 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7461 Likewise.
7462 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7463 Likewise.
7464 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7465 Likewise.
7466 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7467 Likewise.
7468 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7469 Likewise.
7470 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7471 Likewise.
7472 * features/i386/64bit-avx512.c
7473 (create_feature_i386_64bit_avx512): Likewise.
7474 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7475 Likewise.
7476 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7477 Likewise.
7478 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7479 Likewise.
7480 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7481 Likewise.
7482 * features/i386/64bit-segments.c
7483 (create_feature_i386_64bit_segments): Likewise.
7484 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7485 Likewise.
7486 * features/i386/x32-core.c
7487 (create_feature_i386_x32_core): Likewise.
7488 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7489 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7490 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7491 * target-descriptions.c: In generated code, don't pass xml
7492 filename.
7493
e98577a9
AH
74942018-04-18 Alan Hayward <alan.hayward@arm.com>
7495
7496 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7497 (print_xml_feature::visit_post): Likewise.
7498 (print_xml_feature::visit): Likewise.
7499 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7500 (print_xml_feature): Add new class.
7501 * regformats/regdat.sh: Null xmltarget on feature targets.
7502 * target-descriptions.c (struct target_desc): Add xmltarget.
7503 (maintenance_check_tdesc_xml_convert): Add unittest function.
7504 (tdesc_get_features_xml): Add function to get xml.
7505 (maintenance_check_xml_descriptions): Test xml generation.
7506 * xml-tdesc.c (string_read_description_xml): Add function.
7507 * xml-tdesc.h (string_read_description_xml): Add declaration.
7508
ad7fc756
AH
75092018-04-18 Alan Hayward <alan.hayward@arm.com>
7510
7511 * features/Makefile: Add feature marker to targets with new style
7512 target descriptions.
7513 * regformats/aarch64.dat: Regenerate.
7514 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7515 * regformats/i386/amd64-avx-linux.dat: Likewise.
7516 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7517 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7518 * regformats/i386/amd64-linux.dat: Likewise.
7519 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7520 * regformats/i386/amd64.dat: Likewise.
7521 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7522 * regformats/i386/i386-avx-linux.dat: Likewise.
7523 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7524 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7525 * regformats/i386/i386-linux.dat: Likewise.
7526 * regformats/i386/i386-mmx-linux.dat: Likewise.
7527 * regformats/i386/i386-mpx-linux.dat: Likewise.
7528 * regformats/i386/i386.dat: Likewise.
7529 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7530 * regformats/i386/x32-avx-linux.dat: Likewise.
7531 * regformats/i386/x32-linux.dat: Likewise.
7532 * regformats/tic6x-c62x-linux.dat: Likewise.
7533 * regformats/tic6x-c64x-linux.dat: Likewise.
7534 * regformats/tic6x-c64xp-linux.dat: Likewise.
7535 * regformats/regdat.sh: Parse feature marker.
7536
d278f585
AH
75372018-04-18 Alan Hayward <alan.hayward@arm.com>
7538
7539 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7540 (tdesc_osabi_name): Likewise.
7541 * target-descriptions.c (tdesc_architecture_name): Add new
7542 function.
7543 (tdesc_osabi_name): Likewise.
7544
eee8a18d
AH
75452018-04-18 Alan Hayward <alan.hayward@arm.com>
7546
7547 * common/tdesc.c (tdesc_predefined_type): Move to here.
7548 (tdesc_named_type): Likewise.
7549 (tdesc_create_vector): Likewise.
7550 (tdesc_create_struct): Likewise.
7551 (tdesc_set_struct_size): Likewise.
7552 (tdesc_create_union): Likewise.
7553 (tdesc_create_flags): Likewise.
7554 (tdesc_create_enum): Likewise.
7555 (tdesc_add_field): Likewise.
7556 (tdesc_add_typed_bitfield): Likewise.
7557 (tdesc_add_bitfield): Likewise.
7558 (tdesc_add_flag): Likewise.
7559 (tdesc_add_enum_value): Likewise.
7560 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7561 (struct tdesc_type_vector): Likewise.
7562 (struct tdesc_type_field): Likewise.
7563 (struct tdesc_type_with_fields): Likewise.
7564 (tdesc_create_enum): Add declaration.
7565 (tdesc_add_typed_bitfield): Likewise.
7566 (tdesc_add_enum_value): Likewise.
7567 * target-descriptions.c (tdesc_type_field): Move from here.
7568 (tdesc_type_builtin): Likewise.
7569 (tdesc_type_vector): Likewise.
7570 (tdesc_type_with_fields): Likewise.
7571 (tdesc_predefined_types): Likewise.
7572 (tdesc_named_type): Likewise.
7573 (tdesc_create_vector): Likewise.
7574 (tdesc_create_struct): Likewise.
7575 (tdesc_set_struct_size): Likewise.
7576 (tdesc_create_union): Likewise.
7577 (tdesc_create_flags): Likewise.
7578 (tdesc_create_enum): Likewise.
7579 (tdesc_add_field): Likewise.
7580 (tdesc_add_typed_bitfield): Likewise.
7581 (tdesc_add_bitfield): Likewise.
7582 (tdesc_add_flag): Likewise.
7583 (tdesc_add_enum_value): Likewise.
7584 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7585 (tdesc_add_typed_bitfield): Likewise.
7586 (tdesc_add_enum_value): Likewise.
7587
82ec9bc7
AH
75882018-04-18 Alan Hayward <alan.hayward@arm.com>
7589
7590 * common/tdesc.c (tdesc_feature::accept): Move to here.
7591 (tdesc_feature::operator==): Likewise.
7592 (tdesc_create_reg): Likewise.
7593 * common/tdesc.h (tdesc_type_kind): Likewise.
7594 (struct tdesc_type): Likewise.
7595 (struct tdesc_feature): Likewise.
7596 * regformats/regdat.sh: Create a feature.
7597 * target-descriptions.c (tdesc_type_kind): Move from here.
7598 (tdesc_type): Likewise.
7599 (tdesc_type_up): Likewise.
7600 (tdesc_feature): Likewise.
7601 (tdesc_create_reg): Likewise.
7602
ea3e7d71
AH
76032018-04-18 Alan Hayward <alan.hayward@arm.com>
7604
7605 * Makefile.in: Add arch/tdesc.c
7606 * common/tdesc.c: New file.
7607 * common/tdesc.h (tdesc_element_visitor): Move to here.
7608 (tdesc_element): Likewise.
7609 (tdesc_reg): Likewise.
7610 (tdesc_reg_up): Likewise.
7611 * regformats/regdef.h (reg): Add offset to constructors.
7612 * target-descriptions.c (tdesc_element_visitor): Move from here.
7613 (tdesc_element): Likewise.
7614 (tdesc_reg): Likewise.
7615 (tdesc_reg_up): Likewise.
7616
bedda9ac
TT
76172018-04-17 Tom Tromey <tom@tromey.com>
7618
7619 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7620 discriminant field.
7621
a037790e
TT
76222018-04-17 Tom Tromey <tom@tromey.com>
7623
7624 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7625
c7dcbf88
AA
76262018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7627
7628 * symtab.c (print_symbol_info): Skip printing filename and line
7629 number when `last' is NULL.
7630 (symtab_symbol_info): Use empty string instead of NULL for first
7631 invocation of print_symbol_info.
7632 (rbreak_command): Pass NULL to `last' parameter of
7633 print_symbol_info.
7634
07d28c77
SM
76352018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7636
7637 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7638 instead of nullptr.
7639
8a3de5e1
PA
76402018-04-16 Pedro Alves <palves@redhat.com>
7641
7642 * MAINTAINERS (sh): Remove.
7643 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7644 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7645 (ALLDEPFILES): Remove sh64-tdep.c.
7646 * NEWS: Mentions that support for SH-5/SH64 is removed.
7647 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7648 (sh*-*-openbsd*): Ditto.
7649 (sh64-*-elf*): Remove.
7650 (sh*): Remove.
7651 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7652 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7653 * sh-tdep.c: No longer include "sh64-tdep.h".
7654 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7655 * sh64-tdep.c, sh64-tdep.h: Remove files.
7656
a2a79012
PA
76572018-04-16 Pedro Alves <palves@redhat.com>
7658
7659 * MAINTAINERS: Remove m88k.
7660 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7661 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7662 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7663 * NEWS: Mention that support for m88k was removed.
7664 * configure.host (m88*-*-*): Remove support.
7665 * configure.nat (m88k-*-*): Remove support.
7666 * configure.tgt (m88*-*-openbsd*): Remove.
7667 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7668
eda4efb1
SM
76692018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7670
7671 * configure.tgt (x86_tobjs): New variable.
7672 (amd64_tobjs, i386_tobjs): Use it.
7673
b744723f
AA
76742018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7675
7676 * symtab.c (print_symbol_info): Precede the symbol definition by
7677 the line number when available.
7678 * NEWS: Advertise this enhancement.
7679
4a4495d6
MM
76802018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7681
7682 * NEWS (New options): announce set/show record btrace cpu.
7683 * btrace.c: Include record-btrace.h.
7684 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7685 the vendor is unknown.
7686 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7687 Maybe overwrite the btrace configuration's cpu.
7688 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7689 (btrace_fetch): Add cpu parameter. Update callers.
7690 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7691 Maybe overwrite the btrace configuration's cpu. Skip enabling
7692 errata workarounds if the vendor is unknown.
7693 * python/py-record-btrace.c: Include record-btrace.h.
7694 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7695 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7696 * record-btrace.c (record_btrace_cpu_state_kind): New.
7697 (record_btrace_cpu): New.
7698 (set_record_btrace_cpu_cmdlist): New.
7699 (record_btrace_get_cpu): New.
7700 (require_btrace_thread, record_btrace_info)
7701 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7702 (cmd_set_record_btrace_cpu_none): New.
7703 (cmd_set_record_btrace_cpu_auto): New.
7704 (cmd_set_record_btrace_cpu): New.
7705 (cmd_show_record_btrace_cpu): New.
7706 (_initialize_record_btrace): Initialize set/show record btrace cpu
7707 commands.
7708 * record-btrace.h (record_btrace_get_cpu): New.
7709
69f90c75
MM
77102018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7711
7712 * record.c (set_record_command): Fix typo in message.
7713
b85310e1
MM
77142018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7715
7716 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7717
1d509aa6
MM
77182018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7719
7720 * infrun.c (process_event_stop_test): Call
7721 gdbarch_in_indirect_branch_thunk.
7722 * gdbarch.sh (in_indirect_branch_thunk): New.
7723 * gdbarch.c: Regenerated.
7724 * gdbarch.h: Regenerated.
7725 * x86-tdep.h: New.
7726 * x86-tdep.c: New.
7727 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7728 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7729 (ALLDEPFILES): Add x86-tdep.c.
7730 * arch-utils.h (default_in_indirect_branch_thunk): New.
7731 * arch-utils.c (default_in_indirect_branch_thunk): New.
7732 * i386-tdep: Include x86-tdep.h.
7733 (i386_in_indirect_branch_thunk): New.
7734 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7735 function.
7736 * amd64-tdep: Include x86-tdep.h.
7737 (amd64_in_indirect_branch_thunk): New.
7738 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7739
b4be9bfd
JK
77402018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7741
7742 PR gdb/23053
7743 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7744 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7745 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7746 regression.
7747
53d7df28
TT
77482018-04-12 Tom Tromey <tom@tromey.com>
7749
7750 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7751 (rust_evaluate_subexp): Likewise.
7752
70b33f19
PA
77532018-04-12 Pedro Alves <palves@redhat.com>
7754
7755 * procfs.c (procfs_detach): Make forward declaration's prototype
7756 match definition's protototype.
7757 (proc_get_LDT_entry): Remove stale do_cleanups call.
7758
436411b1
PA
77592018-04-12 Pedro Alves <palves@redhat.com>
7760
7761 * target.h (target_ops::to_has_exited): Delete.
7762 (target_has_exited): Delete.
7763 * target-delegates.c: Regenerate.
7764
20db9c52
PA
77652018-04-11 Pedro Alves <palves@redhat.com>
7766
7767 * target.c (fileio_fh_t::t): Add comment.
7768 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7769 (target_fileio_close): Handle a NULL target.
7770 (invalidate_fileio_fh): New.
7771 (target_close): Call it.
7772 * remote.c (remote_hostio_send_command): No longer check whether
7773 remote_desc is open.
7774
5ff79300
PA
77752018-04-11 Pedro Alves <palves@redhat.com>
7776
7777 * target.c (fileio_fh_t): Make it a named struct instead of a
7778 typedef.
7779 (fileio_fh_t::is_closed): New method.
7780 (DEF_VEC_O (fileio_fh_t)): Remove.
7781 (fileio_fhandles): Now a std::vector.
7782 (is_closed_fileio_fh): Delete.
7783 (acquire_fileio_fd): Adjust. Rename parameters.
7784 (release_fileio_fd): Adjust.
7785 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7786 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7787 (target_fileio_close): Adjust.
7788
6e22e10d
SM
77892018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7790
7791 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7792 index.
7793
731f534f
PA
77942018-04-10 Pedro Alves <palves@redhat.com>
7795
7796 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7797 (scoped_finish_thread_state): New class.
7798 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7799 cleanup.
7800 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7801 (fetch_inferior_event, normal_stop): Likewise.
7802 * thread.c (finish_thread_state_cleanup): Delete.
7803
d5f4488f
SM
78042018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7805 Pedro Alves <palves@redhat.com>
7806
7807 * value.c: Include "selftest.h" and "common/array-view.h".
7808 (struct range) <operator ==>: New.
7809 (test_ranges_contain): New.
7810 (check_ranges_vector): New.
7811 (test_insert_into_bit_range_vector): New.
7812 (_initialize_values): Register selftests.
7813 * common/array-view.h (operator==, operator!=): New.
7814
b24531ed
SM
78152018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7816
7817 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7818 an iterator.
7819 * inline-frame.c: Include <algorithm>.
7820 (struct inline_state): Add constructor.
7821 (inline_state_s): Remove.
7822 (DEF_VEC_O(inline_state_s)): Remove.
7823 (inline_states): Change type to std::vector.
7824 (find_inline_frame_state): Adjust to std::vector.
7825 (allocate_inline_frame_state): Remove.
7826 (clear_inline_frame_state): Adjust to std::vector.
7827 (skip_inline_frames): Adjust to std::vector.
7828
c252925c
SM
78292018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7830
7831 * tracepoint.h (struct trace_state_variable): Add constructor.
7832 <name>: Change type to std::string.
7833 * tracepoint.c (tsv_s): Remove.
7834 (DEF_VEC_O(tsv_s)): Remove.
7835 (tvariables): Change to std::vector.
7836 (create_trace_state_variable): Adjust to std::vector.
7837 (find_trace_state_variable): Likewise.
7838 (find_trace_state_variable_by_number): Likewise.
7839 (delete_trace_state_variable): Likewise.
7840 (trace_variable_command): Adjust to std::string.
7841 (delete_trace_variable_command): Likewise.
7842 (tvariables_info_1): Adjust to std::vector.
7843 (save_trace_state_variables): Likewise.
7844 (start_tracing): Likewise.
7845 (merge_uploaded_trace_state_variables): Adjust to std::vector
7846 and std::string.
7847 * target.h (struct target_ops)
7848 <to_download_trace_state_variable>: Pass reference to
7849 trace_state_variable.
7850 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7851 * target-delegates.c: Re-generate.
7852 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7853 (mi_tsv_deleted): Likewise.
7854 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7855 * remote.c (remote_download_trace_state_variable): Change
7856 pointer to reference and adjust.
7857 * make-target-delegates (parse_argtypes): Handle references.
7858 (write_function_header): Likewise.
7859 (munge_type): Likewise.
7860
c9638d26
SM
78612018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7862
7863 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7864 string_view-selftests.c.
7865 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7866 testsuite.
7867 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7868 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7869 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7870 * unittests/basic_string_view/element_access/char/1.cc:
7871 Likewise.
7872 * unittests/basic_string_view/element_access/char/empty.cc:
7873 Likewise.
7874 * unittests/basic_string_view/element_access/char/front_back.cc:
7875 Likewise.
7876 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7877 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7878 Likewise.
7879 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7880 Likewise.
7881 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7882 Likewise.
7883 * unittests/basic_string_view/operations/compare/char/1.cc:
7884 Likewise.
7885 * unittests/basic_string_view/operations/compare/char/13650.cc:
7886 Likewise.
7887 * unittests/basic_string_view/operations/copy/char/1.cc:
7888 Likewise.
7889 * unittests/basic_string_view/operations/data/char/1.cc:
7890 Likewise.
7891 * unittests/basic_string_view/operations/find/char/1.cc:
7892 Likewise.
7893 * unittests/basic_string_view/operations/find/char/2.cc:
7894 Likewise.
7895 * unittests/basic_string_view/operations/find/char/3.cc:
7896 Likewise.
7897 * unittests/basic_string_view/operations/find/char/4.cc:
7898 Likewise.
7899 * unittests/basic_string_view/operations/rfind/char/1.cc:
7900 Likewise.
7901 * unittests/basic_string_view/operations/rfind/char/2.cc:
7902 Likewise.
7903 * unittests/basic_string_view/operations/rfind/char/3.cc:
7904 Likewise.
7905 * unittests/basic_string_view/operations/substr/char/1.cc:
7906 Likewise.
7907 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7908 * unittests/string_view-selftests.c: New file.
7909
fdc11678
SM
79102018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7911
7912 * unittests/basic_string_view/capacity/1.cc: New file.
7913 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7914 * unittests/basic_string_view/cons/char/1.cc: New file.
7915 * unittests/basic_string_view/cons/char/2.cc: New file.
7916 * unittests/basic_string_view/cons/char/3.cc: New file.
7917 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7918 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7919 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7920 * unittests/basic_string_view/element_access/char/1.cc: New file.
7921 * unittests/basic_string_view/element_access/char/2.cc: New file.
7922 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7923 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7924 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7925 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7926 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7927 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7928 * unittests/basic_string_view/include.cc: New file.
7929 * unittests/basic_string_view/inserters/char/1.cc: New file.
7930 * unittests/basic_string_view/inserters/char/2.cc: New file.
7931 * unittests/basic_string_view/inserters/char/3.cc: New file.
7932 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7933 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7934 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7935 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7936 * unittests/basic_string_view/literals/types.cc: New file.
7937 * unittests/basic_string_view/literals/values.cc: New file.
7938 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7939 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7940 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7941 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7942 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7943 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7944 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7945 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7946 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7947 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7948 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7949 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7950 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7951 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7952 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7953 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7954 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7955 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7956 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7957 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7958 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7959 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7960 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7961 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7962 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7963 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7964 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7965 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7966 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7967 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7968 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7969 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7970 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7971 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7972 * unittests/basic_string_view/operators/char/2.cc: New file.
7973 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7974 * unittests/basic_string_view/range_access/char/1.cc: New file.
7975 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7976 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7977 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7978 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7979 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7980 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7981 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7982 * unittests/basic_string_view/typedefs.cc: New file.
7983 * unittests/basic_string_view/types/1.cc: New file.
7984
8345c4a2
SM
79852018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7986
7987 * common/gdb_string_view.h: Remove libstdc++ implementation
7988 details, adjust to gdb reality.
7989 * common/gdb_string_view.tcc: Likewise.
7990 * cli/cli-script.c (struct string_view): Remove.
7991 (user_args) <m_args>: Change element type to gdb::string_view.
7992 (user_args::insert_args): Adjust.
7993
7adcdf08
SM
79942018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7995
7996 * common/gdb_string_view.h: New file.
7997 * common/gdb_string_view.tcc: New file.
7998
41260ac2
SM
79992018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8000
8001 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8002 * configure: Re-generate.
8003
0bee6dd4
PA
80042018-04-09 Pedro Alves <palves@redhat.com>
8005
8006 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8007 (set_target_gdbarch): Call
8008 gdb::observers::architecture_changed.notify instead of
8009 observer_notify_architecture_changed.
8010
6f14adc5
SM
80112018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8012
8013 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8014 (do_restore_current_traceframe_cleanup): Remove.
8015 (restore_current_traceframe_cleanup_dtor): Remove.
8016 (make_cleanup_restore_current_traceframe): Remove.
8017 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8018 New.
8019 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8020 * infrun.c (fetch_inferior_event): Use
8021 scoped_restore_current_traceframe.
8022
b2bdb8cf
SM
80232018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8024
8025 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8026 Remove.
8027 <n_allocated_type_units>: Remove.
8028 <all_type_units>: Change to std::vector.
8029 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8030 to std::vector change.
8031 (dwarf2_per_objfile::get_cutu): Likewise.
8032 (dwarf2_per_objfile::get_tu): Likewise.
8033 (create_signatured_type_table_from_index): Likewise.
8034 (create_signatured_type_table_from_debug_names): Likewise.
8035 (dw2_symtab_iter_next): Likewise.
8036 (dw2_print_stats): Likewise.
8037 (dw2_expand_all_symtabs): Likewise.
8038 (dw2_expand_marked_cus): Likewise.
8039 (dw2_debug_names_iterator::next): Likewise.
8040 (dwarf2_initialize_objfile): Likewise.
8041 (add_signatured_type_cu_to_table): Likewise.
8042 (create_all_type_units): Likewise.
8043 (add_type_unit): Likewise.
8044 (struct tu_abbrev_offset): Add constructor.
8045 (build_type_psymtabs_1): Adjust to std::vector change.
8046 (print_tu_stats): Likewise.
8047 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8048 (write_debug_names): Likewise.
8049
b76e467d
SM
80502018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8051
8052 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8053 Make an std::vector.
8054 <n_comp_units>: Remove.
8055 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8056 to std::vector change.
8057 (dwarf2_per_objfile::get_cutu): Likewise.
8058 (dwarf2_per_objfile::get_cu): Likewise.
8059 (create_cus_from_index): Likewise.
8060 (create_addrmap_from_index): Likewise.
8061 (create_addrmap_from_aranges): Likewise.
8062 (dwarf2_read_index): Likewise.
8063 (dw2_find_last_source_symtab): Likewise.
8064 (dw2_map_symtabs_matching_filename): Likewise.
8065 (dw2_symtab_iter_next): Likewise.
8066 (dw2_print_stats): Likewise.
8067 (dw2_expand_all_symtabs): Likewise.
8068 (dw2_expand_symtabs_with_fullname): Likewise.
8069 (dw2_expand_marked_cus): Likewise.
8070 (dw2_map_symbol_filenames): Likewise.
8071 (create_cus_from_debug_names): Likewise.
8072 (dwarf2_read_debug_names): Likewise.
8073 (dw2_debug_names_iterator::next): Likewise.
8074 (dwarf2_initialize_objfile): Likewise.
8075 (set_partial_user): Likewise.
8076 (dwarf2_build_psymtabs_hard): Likewise.
8077 (read_comp_units_from_section): Remove arguments, adjust to
8078 std::vector change.
8079 (create_all_comp_units): Adjust to std::vector and
8080 read_comp_units_from_section changes.
8081 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8082 change.
8083 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8084 (psyms_seen_size): Likewise.
8085 (write_gdbindex): Likewise.
8086 (write_debug_names): Likewise.
8087
12359b5e
SM
80882018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8089
8090 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8091 with dwarf2_per_objfile.
8092 (create_cus_from_index): Likewise.
8093 (create_signatured_type_table_from_index): Likewise.
8094 (dwarf2_read_index): Likewise.
8095 (dwarf2_initialize_objfile): Likewise.
8096 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8097 per_cu rather than get_dwarf2_per_objfile.
8098
ff4c9fec
SM
80992018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8100
8101 * dwarf2read.h (struct signatured_type): Forward declare.
8102 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8103 New methods.
8104 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8105 (dw2_get_cutu): ...this.
8106 (dwarf2_per_objfile::get_cu): Rename from...
8107 (dw2_get_cu): ...this.
8108 (dwarf2_per_objfile::get_tu): New.
8109 (create_addrmap_from_index): Adjust.
8110 (create_addrmap_from_aranges): Adjust.
8111 (dw2_find_last_source_symtab): Adjust.
8112 (dw2_map_symtabs_matching_filename): Adjust.
8113 (dw2_symtab_iter_next): Adjust.
8114 (dw2_print_stats): Adjust.
8115 (dw2_expand_all_symtabs): Adjust.
8116 (dw2_expand_symtabs_with_fullname): Adjust.
8117 (dw2_expand_marked_cus): Adjust.
8118 (dw_expand_symtabs_matching_file_matcher): Adjust.
8119 (dw2_map_symbol_filenames): Adjust.
8120 (dw2_debug_names_iterator::next): Adjust.
8121 (dwarf2_initialize_objfile): Adjust.
8122 (set_partial_user): Adjust.
8123 (dwarf2_build_psymtabs_hard): Adjust.
8124
5ca3fcb6
SM
81252018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8126
8127 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8128 Remove unused variables.
8129 (dw2_map_symtabs_matching_filename): Likewise.
8130 (dwarf2_record_block_ranges): Likewise.
8131 (dwarf2_read_addr_index): Likewise.
8132 (follow_die_offset): Likewise.
8133
b2e586e8
SM
81342018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8135
8136 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8137 to symbol_file_add_main.
8138
7c4e78cf
SM
81392018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8140
8141 PR mi/22299
8142 * mi/mi-console.c (do_fputc_async_safe): New.
8143 (mi_console_file::write_async_safe): New.
8144 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8145 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8146 New.
8147 * ui-file.c (ui_file::putstrn): Adjust call to
8148 fputstrn_unfiltered.
8149 * utils.c (printchar): Replace do_fputs and do_fprintf
8150 parameters by do_fputc.
8151 (fputstr_filtered): Adjust call to printchar.
8152 (fputstr_unfiltered): Likewise.
8153 (fputstrn_filtered): Likewise.
8154 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8155 printchar.
8156 * utils.h (do_fputc_ftype): New typedef.
8157 (fputstrn_unfiltered): Add do_fputc parameter.
8158
5dc026d3
SM
81592018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8160
8161 * regformats/i386/i386-avx.dat: Remove.
8162
c912f608
SM
81632018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8164
8165 PR gdb/22979
8166 * amd64-tdep.c (amd64_none_init_abi): New function.
8167 (amd64_x32_none_init_abi): New function.
8168 (_initialize_amd64_tdep): Register handlers for x86-64 and
8169 x64_32 with GDB_OSABI_NONE.
8170 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8171 GDB_OSABI_NONE osabi.
8172
26540402
SM
81732018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8174
8175 PR gdb/22980
8176 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8177 GDB_OSABI_NONE.
8178 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8179 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8180
9018be22
SM
81812018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8182
8183 * common/byte-vector.h (char_vector): New type.
8184 * target.h (target_read_alloc): Return
8185 gdb::optional<byte_vector>.
8186 (target_read_stralloc): Return gdb::optional<char_vector>.
8187 (target_get_osdata): Return gdb::optional<char_vector>.
8188 * target.c (target_read_alloc_1): Templatize. Replacement
8189 manual memory management with vector.
8190 (target_read_alloc): Change return type, adjust.
8191 (target_read_stralloc): Change return type, adjust.
8192 (target_get_osdata): Change return type, adjust.
8193 * auxv.c (struct auxv_info) <length>: Remove.
8194 <data>: Change type to gdb::optional<byte_vector>.
8195 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8196 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8197 (target_auxv_search): Adjust.
8198 (fprint_target_auxv): Adjust.
8199 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8200 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8201 (linux_make_corefile_notes): Adjust.
8202 * osdata.c (get_osdata): Adjust.
8203 * remote.c (remote_get_threads_with_qxfer): Adjust.
8204 (remote_memory_map): Adjust.
8205 (remote_traceframe_info): Adjust.
8206 (btrace_read_config): Adjust.
8207 (remote_read_btrace): Adjust.
8208 (remote_pid_to_exec_file): Adjust.
8209 * solib-aix.c (solib_aix_get_library_list): Adjust.
8210 * solib-dsbt.c (decode_loadmap): Don't free buf.
8211 (dsbt_get_initial_loadmaps): Adjust.
8212 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8213 * solib-target.c (solib_target_current_sos): Adjust.
8214 * tracepoint.c (sdata_make_value): Adjust.
8215 * xml-support.c (xinclude_start_include): Adjust.
8216 (xml_fetch_content_from_file): Adjust.
8217 * xml-support.h (xml_fetch_another): Change return type.
8218 (xml_fetch_content_from_file): Change return type.
8219 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8220 * xml-tdesc.c (file_read_description_xml): Adjust.
8221 (fetch_available_features_from_target): Change return type.
8222 (target_fetch_description_xml): Adjust.
8223 (target_read_description_xml): Adjust.
8224
14c88955
TT
82252018-04-06 Tom Tromey <tom@tromey.com>
8226
8227 * value.c (~value): Update.
8228 (struct value) <contents>: Now unique_xmalloc_ptr.
8229 (value_contents_bits_eq, allocate_value_contents)
8230 (value_contents_raw, value_contents_all_raw)
8231 (value_contents_for_printing, value_contents_for_printing_const)
8232 (set_value_enclosing_type): Update.
8233
0c7e6dd8
TT
82342018-04-06 Tom Tromey <tom@tromey.com>
8235
8236 * value.c (range_s): Remove typedef, VEC.
8237 (struct range): Add operator<.
8238 (range_lessthan): Remove.
8239 (ranges_contain): Change type.
8240 (~value): Update.
8241 (struct value) <unavailable, optimized_out>: Now std::vector.
8242 (value_entirely_available)
8243 (value_entirely_covered_by_range_vector)
8244 (value_entirely_unavailable, value_entirely_optimized_out):
8245 Update.
8246 (insert_into_bit_range_vector): Change argument type.
8247 (find_first_range_overlap): Likewise.
8248 (struct ranges_and_idx, value_contents_bits_eq)
8249 (require_not_optimized_out, require_available): Update.
8250 (ranges_copy_adjusted): Change argument types.
8251 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8252
2c8331b9
TT
82532018-04-06 Tom Tromey <tom@tromey.com>
8254
8255 * value.c (~value): Update.
8256 (struct value) <parent>: Now a value_ref_ptr.
8257 (value_parent, set_value_parent, value_address, value_copy):
8258 Update.
8259
466ce3ae
TT
82602018-04-06 Tom Tromey <tom@tromey.com>
8261
8262 * value.c (struct value): Add constructor, destructor, and member
8263 initializers.
8264 (allocate_value_lazy, value_decref): Update.
8265
062d818d
TT
82662018-04-06 Tom Tromey <tom@tromey.com>
8267
8268 * value.c (struct value) <released, next>: Remove.
8269 (all_values): Now a std::vector.
8270 (allocate_value_lazy): Update.
8271 (value_next): Remove.
8272 (value_mark, value_free_to_mark, release_value)
8273 (value_release_to_mark): Update.
8274
a6535de1
TT
82752018-04-06 Tom Tromey <tom@tromey.com>
8276
8277 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8278 (free_value_chain): Remove.
8279 * value.c (free_value_chain): Remove.
8280 (value_release_to_mark): Return a std::vector.
8281 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8282 std::vector.
8283 (check_condition): Update.
8284 * eval.c (fetch_subexp_value): Change "val_chain" to a
8285 std::vector.
8286 * breakpoint.c (update_watchpoint): Update.
8287 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8288
b5621201
TT
82892018-04-06 Tom Tromey <tom@tromey.com>
8290
8291 * value.h (free_all_values): Remove.
8292 * value.c (free_all_values): Remove.
8293
4d0266a0
TT
82942018-04-06 Tom Tromey <tom@tromey.com>
8295
8296 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8297 (value_history_chain, value_history_count): Remove.
8298 (value_history): New global.
8299 (record_latest_value, access_value_history, show_values)
8300 (preserve_values): Update.
8301
b4d61099
TT
83022018-04-06 Tom Tromey <tom@tromey.com>
8303
8304 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8305 * varobj.c (varobj_set_display_format, varobj_set_value)
8306 (install_default_visualizer, construct_visualizer)
8307 (install_new_value, ~varobj, varobj_get_value_type)
8308 (my_value_of_variable, varobj_editable_p): Update.
8309 * c-varobj.c (c_describe_child, c_value_of_variable)
8310 (cplus_number_of_children, cplus_describe_child): Update.
8311 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8312 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8313 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8314
9b558729
TT
83152018-04-06 Tom Tromey <tom@tromey.com>
8316
8317 * printcmd.c (last_examine_address): Change type to
8318 value_ref_ptr.
8319 (do_examine, x_command): Update.
8320
850645cf
TT
83212018-04-06 Tom Tromey <tom@tromey.com>
8322
8323 * value.c (release_value): Update.
8324 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8325 (struct bpstats) <val>: Now a value_ref_ptr.
8326 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8327 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8328 (~watchpoint, print_it_watchpoint, watch_command_1)
8329 (invalidate_bp_value_on_memory_change): Update.
8330
22bc8444
TT
83312018-04-06 Tom Tromey <tom@tromey.com>
8332
8333 * varobj.c (varobj_clear_saved_item)
8334 (update_dynamic_varobj_children, install_new_value, ~varobj):
8335 Update.
8336 * value.h (value_incref): Move declaration earlier.
8337 (value_decref): Rename from value_free.
8338 (struct value_ref_policy): New.
8339 (value_ref_ptr): New typedef.
8340 (struct value_deleter): Remove.
8341 (gdb_value_up): Remove typedef.
8342 (release_value): Change return type.
8343 (release_value_or_incref): Remove.
8344 * value.c (set_value_parent): Update.
8345 (value_incref): Change return type.
8346 (value_decref): Rename from value_free.
8347 (value_free_to_mark, free_all_values, free_value_chain): Update.
8348 (release_value): Return value_ref_ptr.
8349 (release_value_or_incref): Remove.
8350 (record_latest_value, set_internalvar, clear_internalvar):
8351 Update.
8352 * stack.c (info_frame_command): Don't call value_free.
8353 * python/py-value.c (valpy_dealloc, valpy_new)
8354 (value_to_value_object): Update.
8355 * printcmd.c (do_examine): Update.
8356 * opencl-lang.c (lval_func_free_closure): Update.
8357 * mi/mi-main.c (register_changed_p): Don't call value_free.
8358 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8359 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8360 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8361 value_free.
8362 * guile/scm-value.c (vlscm_free_value_smob)
8363 (vlscm_scm_from_value): Update.
8364 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8365 (frame_unwind_register_unsigned, get_frame_register_bytes)
8366 (put_frame_register_bytes): Don't call value_free.
8367 * findvar.c (address_from_register): Don't call value_free.
8368 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8369 * dwarf2loc.c (entry_data_value_free_closure)
8370 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8371 (dwarf2_evaluate_loc_desc_full): Update.
8372 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8373 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8374 (~watchpoint, watch_command_1)
8375 (invalidate_bp_value_on_memory_change): Update.
8376 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8377
7f8a5d38
SM
83782018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8379
8380 PR gdb/23022
8381 * warning.m4: Add -Wno-error=deprecated-register.
8382 * configure: Re-generate.
8383
8a76bd3b
TT
83842018-04-05 Tom Tromey <tom@tromey.com>
8385
8386 * linespec.h: Remove include of "vec.h".
8387
8e8d776e
TT
83882018-04-05 Tom Tromey <tom@tromey.com>
8389
8390 * linespec.c (typep): Remove typedef.
8391 (find_methods, find_superclass_methods): Take a std::vector.
8392 (find_method): Use std::vector.
8393
9b2f8581
TT
83942018-04-05 Tom Tromey <tom@tromey.com>
8395
8396 * utils.c (compare_strings): Remove.
8397 * utils.h (compare_strings): Remove.
8398 * objc-lang.h (find_imps): Update.
8399 * objc-lang.c (find_methods): Take a std::vector.
8400 (uniquify_strings, find_imps): Likewise.
8401 * linespec.c (find_methods): Take a std::vector.
8402 (decode_objc): Use std::vector.
8403 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8404 a std::vector.
8405 (find_method, find_function_symbols): Use std::vector.
8406
459a2e4c
TT
84072018-04-05 Tom Tromey <tom@tromey.com>
8408
8409 * completer.c (completion_tracker::completion_tracker): Remove
8410 cast.
8411 (completion_tracker::discard_completions): Likewise.
8412 * breakpoint.c (ambiguous_names_p): Remove cast.
8413 * ada-lang.c (_initialize_ada_language): Remove cast.
8414 * utils.h (streq): Update.
8415 (streq_hash): Add new declaration.
8416 * utils.c (streq): Return bool.
8417 (streq_hash): New function.
8418
9be2c17a
TT
84192018-04-05 Tom Tromey <tom@tromey.com>
8420
8421 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8422 Remove a string copy.
8423
f73c6ece
TT
84242018-04-05 Tom Tromey <tom@tromey.com>
8425
8426 * linespec.c (filter_results): Use std::vector.
8427 (decode_line_2, decode_line_full): Update.
8428
53a0f8a2
TT
84292018-04-05 Tom Tromey <tom@tromey.com>
8430
8431 * linespec.c (canonical_to_fullform): Return std::string.
8432 (filter_results): Update.
8433 (struct decode_line_2_item): Add constructor.
8434 <fullform, displayform>: Now std::string.
8435 (decode_line_2_compare_items): Now a std::sort comparator.
8436 (decode_line_2): Update.
8437
a5b5adf5
TT
84382018-04-05 Tom Tromey <tom@tromey.com>
8439
8440 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8441 (unexpected_linespec_error): Update.
8442 (linespec_parse_basic, parse_linespec): Update.
8443
6a307fc5
TT
84442018-04-05 Tom Tromey <tom@tromey.com>
8445
8446 * linespec.c (linespec_parse_basic): Reindent.
8447
41c1efc6
TT
84482018-04-05 Tom Tromey <tom@tromey.com>
8449
8450 * minsyms.h (iterate_over_minimal_symbols): Update.
8451 * minsyms.c (iterate_over_minimal_symbols): Take a
8452 gdb::function_view.
8453 * linespec.c (struct collect_minsyms): Remove.
8454 (compare_msyms): Now a std::sort comparator.
8455 (add_minsym): Add parameters.
8456 (search_minsyms_for_name): Update. Use std::vector.
8457
c5edbf3d
TT
84582018-04-03 Tom Tromey <tom@tromey.com>
8459
8460 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8461 gdb::byte_vector.
8462
b39efc48
WP
84632018-04-02 Weimin Pan <weimin.pan@oracle.com>
8464
8465 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8466
121ad66c 84672018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
8468
8469 PR gdb/16959
8470 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8471 printing static type.
8472
09473be8
TT
84732018-04-01 Tom Tromey <tom@tromey.com>
8474
8475 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8476 (rs6000_xfer_shared_libraries): Update.
8477
ec1f2d91
SM
84782018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8479
8480 * common/gdb_vecs.h (char_ptr): Remove.
8481 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8482
d8611974
SM
84832018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8484
8485 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8486 with std::vector.
8487 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8488
a18ba4e4
SM
84892018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8490
8491 * tracepoint.h (struct uploaded_tp): Initialize fields.
8492 <actions, step_actions, cmd_strings>: Change type to
8493 std::vector<char *>.
8494 * tracepoint.c (get_uploaded_tp): Allocate with new.
8495 (free_uploaded_tps): Free with delete.
8496 (parse_tracepoint_definition): Adjust to std::vector change.
8497 * breakpoint.c (read_uploaded_action): Likewise.
8498 (create_tracepoint_from_upload): Likewise.
8499 * ctf.c (ctf_write_uploaded_tp): Likewise.
8500 (SET_ARRAY_FIELD): Likewise.
8501 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8502
a7961323
TT
85032018-03-30 Tom Tromey <tom@tromey.com>
8504
8505 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8506 std::unique_ptr.
8507 (svr4_keep_data_in_core): Update.
8508 (svr4_read_so_list): Update.
8509
e83e4e24
TT
85102018-03-30 Tom Tromey <tom@tromey.com>
8511
8512 * windows-nat.c (handle_output_debug_string, handle_exception):
8513 Update.
8514 * target.h (target_read_string): Update.
8515 * target.c (target_read_string): Change "string" to
8516 unique_xmalloc_ptr.
8517 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8518 Update.
8519 * solib-frv.c (frv_current_sos): Update.
8520 * solib-dsbt.c (dsbt_current_sos): Update.
8521 * solib-darwin.c (darwin_current_sos): Update.
8522 * linux-thread-db.c (inferior_has_bug): Update.
8523 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8524 Update. Remove alloca.
8525 * ada-lang.c (ada_main_name): Update.
8526
263db9a1
TT
85272018-03-30 Tom Tromey <tom@tromey.com>
8528
8529 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8530 (struct dwo_file_deleter): New.
8531 (dwo_file_up): New typedef.
8532 (open_and_init_dwo_file): Use dwo_file_up.
8533 (free_dwo_file_cleanup): Remove.
8534
5dafb3d1
TT
85352018-03-30 Tom Tromey <tom@tromey.com>
8536
8537 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8538 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8539
11ed8cad
TT
85402018-03-30 Tom Tromey <tom@tromey.com>
8541
8542 * dwarf2read.c (class free_cached_comp_units): New class.
8543 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8544 (free_cached_comp_units): Remove function.
8545
9ae79dac
TT
85462018-03-30 Tom Tromey <tom@tromey.com>
8547
8548 * utils.h (make_cleanup_unpush_target): Remove.
8549 * inf-ptrace.c (struct target_unpusher): New.
8550 (target_unpush_up) New typedef.
8551 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8552 target_unpush_up.
8553 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8554
5aa89276
TT
85552018-03-27 Tom Tromey <tom@tromey.com>
8556
8557 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8558
1dbeed45
TT
85592018-03-27 Pedro Alves <palves@redhat.com>
8560 Tom Tromey <tom@tromey.com>
8561
8562 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8563 destructor. Now a class.
8564 (gdb_readline_wrapper_cleanup): Remove function.
8565 (gdb_readline_wrapper): Remove cleanups.
8566
c819b2c0
TT
85672018-03-27 Tom Tromey <tom@tromey.com>
8568
8569 * typeprint.h (struct type_print_options) <local_typedefs,
8570 global_typedefs>: Remove "struct" keyword.
8571 (class typedef_hash_table): New class.
8572 (recursively_update_typedef_hash, add_template_parameters)
8573 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8574 (find_typedef_in_hash): Don't declare.
8575 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8576 (typedef_hash_table::recursively_update): Rename from
8577 recursively_update_typedef_hash. Now a member.
8578 (typedef_hash_table::add_template_parameters): Rename from
8579 add_template_parameters. Now a member.
8580 (typedef_hash_table::typedef_hash_table): Now a constructor;
8581 rename from create_typedef_hash.
8582 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8583 rename from free_typedef_hash.
8584 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8585 (do_free_global_table): Remove.
8586 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8587 from copy_type_recursive.
8588 (create_global_typedef_table): Remove.
8589 (typedef_hash_table::find_global_typedef): Now a member of
8590 typedef_hash_table.
8591 (typedef_hash_table::find_typedef): Rename from
8592 find_typedef_in_hash; now a member.
8593 (whatis_exp): Update.
8594 * extension.h (struct ext_lang_type_printers): Add constructor and
8595 destructor.
8596 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8597 declare.
8598 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8599 Now a constructor; rename from start_ext_lang_type_printers.
8600 (ext_lang_type_printers): Now a destructor; rename from
8601 free_ext_lang_type_printers.
8602 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8603 Update.
8604 (c_type_print_base_struct_union): Update. Remove cleanups.
8605
608219fb
TT
86062018-03-27 Tom Tromey <tom@tromey.com>
8607
8608 * dwarf-index-write.c: Include <cmath>.
8609
3fcded8f
JB
86102018-03-27 Joel Brobecker <brobecker@adacore.com>
8611
8612 * NEWS: Add entry describing new "set|show varsize-limit" command.
8613 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8614 command.
8615 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8616 "set variable".
8617
cd4fb1b2
SM
86182018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8619
8620 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8621 dwarf-index-write.c
8622 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8623 * dwarf-index-common.c: New file.
8624 * dwarf-index-common.h: New file.
8625 * dwarf-index-write.c: New file.
8626 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8627 (struct dwarf2_section_info): Move from here.
8628 (dwarf2_section_info_def): Likewise.
8629 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8630 (offset_type): Likewise.
8631 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8632 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8633 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8634 (byte_swap): Likewise.
8635 (MAYBE_SWAP): Likewise.
8636 (dwarf2_per_cu_ptr): Likewise.
8637 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8638 (struct tu_stats): Likewise.
8639 (struct dwarf2_per_objfile): Likewise.
8640 (struct dwarf2_per_cu_data): Likewise.
8641 (struct signatured_type): Likewise.
8642 (sig_type_ptr): Likewise.
8643 (DEF_VEC_P (sig_type_ptr)): Likewise.
8644 (INDEX4_SUFFIX): Likewise.
8645 (INDEX5_SUFFIX): Likewise.
8646 (DEBUG_STR_SUFFIX): Likewise.
8647 (dwarf2_read_section): Make non-static.
8648 (mapped_index_string_hash): Move from here.
8649 (dwarf5_djb_hash): Likewise.
8650 (file_write): Likewise.
8651 (class data_buf): Likewise.
8652 (struct symtab_index_entry): Likewise.
8653 (struct mapped_symtab): Likewise.
8654 (find_slot): Likewise.
8655 (hash_expand): Likewise.
8656 (add_index_entry): Likewise.
8657 (uniquify_cu_indices): Likewise.
8658 (class c_str_view): Likewise.
8659 (class c_str_view_hasher): Likewise.
8660 (class vector_hasher): Likewise.
8661 (write_hash_table): Likewise.
8662 (psym_index_map): Likewise.
8663 (struct addrmap_index_data): Likewise.
8664 (add_address_entry): Likewise.
8665 (add_address_entry_worker): Likewise.
8666 (write_address_map): Likewise.
8667 (symbol_kind): Likewise.
8668 (write_psymbols): Likewise.
8669 (struct signatured_type_index_data): Likewise.
8670 (write_one_signatured_type): Likewise.
8671 (recursively_count_psymbols): Likewise.
8672 (recursively_write_psymbols): Likewise.
8673 (class debug_names): Likewise.
8674 (check_dwarf64_offsets): Likewise.
8675 (psyms_seen_size): Likewise.
8676 (write_gdbindex): Likewise.
8677 (write_debug_names): Likewise.
8678 (assert_file_size): Likewise.
8679 (write_psymtabs_to_index): Likewise.
8680 (save_gdb_index_command): Likewise.
8681 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8682 command.
8683 * dwarf2read.h: New file.
8684
59cc4834
JB
86852018-03-27 Joel Brobecker <brobecker@adacore.com>
8686
8687 PR gdb/22670
8688 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8689 symbol name if the CU's language stores symbol names in linkage
8690 format.
8691 * language.h (struct language_defn)
8692 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8693 all instances of this struct.
8694
67501539
TT
86952018-03-26 Tom Tromey <tom@tromey.com>
8696
8697 * stack.c (backtrace_command_1): Remove verbose code.
8698
76c939ac
TT
86992018-03-26 Tom Tromey <tom@tromey.com>
8700
8701 * python/py-framefilter.c (py_print_type): Don't catch
8702 exceptions. Return void.
8703 (py_print_value): Likewise.
8704 (py_print_single_arg): Likewise.
8705 (enumerate_args): Don't catch exceptions.
8706 (py_print_args): Likewise.
8707 (py_print_frame): Likewise.
8708 (gdbpy_apply_frame_filter): Catch exceptions here.
8709
9507b29c
TT
87102018-03-26 Tom Tromey <tom@tromey.com>
8711
8712 * stack.c (_initialize_stack): Remove trailing newlines from help
8713 text. Add "Usage" line to "backtrace" help.
8714
eb68e487
TT
87152018-03-26 Tom Tromey <tom@tromey.com>
8716
8717 PR python/16486:
8718 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8719
1f111921
TT
87202018-03-26 Tom Tromey <tom@tromey.com>
8721
8722 * python/py-framefilter.c (py_print_single_arg): Return
8723 EXT_LANG_BT_ERROR from catch.
8724
fb7eb8b5
TT
87252018-03-26 Tom Tromey <tom@tromey.com>
8726
8727 PR backtrace/15584:
8728 * stack.c (backtrace_command_1): Move some code into no-filters
8729 "if".
8730
4ca59a9f
TT
87312018-03-26 Tom Tromey <tom@tromey.com>
8732
8733 * python/py-framefilter.c (throw_quit_or_print_exception): New
8734 function.
8735 (gdbpy_apply_frame_filter): Use it.
8736
92256134
TT
87372018-03-26 Tom Tromey <tom@tromey.com>
8738
8739 PR cli/17716:
8740 * python/py-framefilter.c (py_print_type, py_print_value)
8741 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8742 RETURN_MASK_ERROR.
8743
7a630bc2
TT
87442018-03-26 Tom Tromey <tom@tromey.com>
8745
8746 * python/py-framefilter.c (enumerate_args): Use
8747 gdb::unique_xmalloc_ptr.
8748
63283d4a
TT
87492018-03-26 Tom Tromey <tom@tromey.com>
8750
8751 * python/py-framefilter.c (py_print_frame): Return
8752 EXT_LANG_BT_OK.
8753 (gdbpy_apply_frame_filter): Update comment.
8754 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8755 Remove.
8756 <EXT_LANG_BT_NO_FILTERS>: Change value.
8757
978d6c75
TT
87582018-03-26 Tom Tromey <tom@tromey.com>
8759
8760 PR backtrace/15582:
8761 * stack.c (backtrace_command): Parse "hide" argument.
8762 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8763 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8764 constant.
8765
1cf7e640
TT
87662018-03-26 Tom Tromey <tom@tromey.com>
8767
8768 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8769 add "flags".
8770 (backtrace_command): Remove "fulltrace", add "flags".
8771
ea3b0687
TT
87722018-03-26 Tom Tromey <tom@tromey.com>
8773
8774 * stack.c (backtrace_command): Rewrite command line parsing.
8775
9f034d75
SM
87762018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8777
8778 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8779
ce1459e5
SM
87802018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8781
8782 * filename-seen-cache.h: Add include guard.
8783
4f7ae6f5
KS
87842018-03-26 Keith Seitz <keiths@redhat.com>
8785
8786 * symfile.c (place_section): Remove "struct" from section_addr_info
8787 in comment.
8788 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8789 "struct" keyword from section_addr_info.
8790
5cd3e386
AH
87912018-03-26 Alan Hayward <alan.hayward@arm.com>
8792
8793 * regformats/regdef.h (reg): Add constructors.
8794
3e5ef9a4
PA
87952018-03-25 Pedro Alves <palves@redhat.com>
8796
8797 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8798 if then/else bodies in var_func_name extraction.
8799
c88d2fcc 88002018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
8801
8802 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8803 lookup_minimal_symbol() to find symbol entry.
8804 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8805
b7fee5a3
KS
88062018-03-23 Keith Seitz <keiths@redhat.com>
8807
8808 PR c++/22968
8809 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8810 nested type definitions for C++, too.
8811
2cc9b304
TT
88122018-03-23 Tom Tromey <tom@tromey.com>
8813
8814 * machoread.c (struct oso_el): Add a constructor. Don't define as
8815 a typedef.
8816 (macho_register_oso): Remove.
8817 (macho_symtab_read): Take a std::vector.
8818 (oso_el_compare_name): Now a std::sort comparator.
8819 (macho_symfile_read_all_oso): Take a std::vector.
8820 (macho_symfile_read): Use std::vector. Remove cleanups.
8821
a2b2bc12
TT
88222018-03-22 Tom Tromey <tom@tromey.com>
8823
8824 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8825 (record_full_goto_bookmark): Use std::string.
8826
7a8f494c
PFC
88272018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8828
8829 PR tdep/18295
8830 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8831 a single mask.
8832
dd6d677f
PFC
88332018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8834
8835 * rs6000-tdep.c (store_insn_p): New function.
8836 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8837 and cr_reg to their unshifted values. Use store_insn_p to
8838 match LR saves using either R1 or fdata->alloca_reg. Use
8839 store_insn_p to match CR saves. Set alloca_reg_offset
8840 when alloca_reg and framep are set. Remove lr_reg shift
8841 when assigning to fdata->lr_register.
8842
26d6cec4
AA
88432018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8844
8845 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8846 command line args instead of emitting a warning.
8847
5d9310c4
SM
88482018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8849
8850 * tracepoint.h (struct static_tracepoint_marker): Initialize
8851 fields, define default constructor, move constructor and move
8852 assignment, disable the rest.
8853 <str_id, extra>: Make std::string.
8854 (release_static_tracepoint_marker): Remove.
8855 (free_current_marker): Remove.
8856 * tracepoint.c (free_current_marker): Remove.
8857 (parse_static_tracepoint_marker_definition): Adjust to
8858 std::string, use new hex2str overload.
8859 (release_static_tracepoint_marker): Remove.
8860 (print_one_static_tracepoint_marker): Get marker by reference
8861 and adjust to std::string.
8862 (info_static_tracepoint_markers_command): Adjust to std::vector
8863 changes
8864 * target.h (static_tracepoint_marker_p): Remove typedef.
8865 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8866 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8867 bool.
8868 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8869 * target-debug.h
8870 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8871 (target_debug_print_std_vector_static_tracepoint_marker): New.
8872 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8873 to...
8874 (target_debug_print_static_tracepoint_marker_p): ... this.
8875 * target-delegates.c: Re-generate.
8876 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8877 Make std::string.
8878 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8879 (decode_static_tracepoint_spec): Adjust to std::vector.
8880 (tracepoint_print_one_detail): Adjust to std::string.
8881 (strace_marker_decode_location): Adjust to std::string.
8882 (update_static_tracepoint): Adjust to std::string, remove call
8883 to release_static_tracepoint_marker.
8884 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8885 Adjust to std::vector.
8886 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8887 (remote_static_tracepoint_markers_by_strid): Adjust to
8888 std::vector.
8889 * common/rsp-low.h (hex2str): New overload with explicit count
8890 of bytes.
8891 * common/rsp-low.c (hex2str): New overload with explicit count
8892 of bytes.
8893 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8894 (_initialize_rsp_low_selftests): Add test_hex2str test.
8895 * unittests/tracepoint-selftests.c
8896 (test_parse_static_tracepoint_marker_definition): Adjust to
8897 std::string.
8898
62c222b6
SM
88992018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8900
8901 * tracepoint.c (parse_static_tracepoint_marker_definition):
8902 Consider case where the definition is followed by more
8903 definitions.
8904 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8905 tracepoint-selftests.c.
8906 * unittests/tracepoint-selftests.c: New.
8907
7eb2418f
PFC
89082018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8909
8910 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8911 Carvalho.
8912
7cbe16e9
SR
89132018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8914
3d6b3b82 8915 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 8916
4ee89e90
SR
89172018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8918
3d6b3b82 8919 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 8920
92630041
TT
89212018-03-19 Tom Tromey <tom@tromey.com>
8922
8923 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8924 "IDENT" production.
8925
76727919
TT
89262018-03-19 Pedro Alves <palves@redhat.com>
8927 Tom Tromey <tom@tromey.com>
8928
8929 * unittests/observable-selftests.c: New file.
8930 * common/observable.h: New file.
8931 * observable.h: New file.
8932 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8933 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8934 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8935 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8936 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8937 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8938 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8939 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8940 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8941 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8942 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8943 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8944 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8945 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8946 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8947 tui/tui-interp.c, valops.c: Update all users.
8948 * tui/tui-hooks.c (tui_bp_created_observer)
8949 (tui_bp_deleted_observer, tui_bp_modified_observer)
8950 (tui_inferior_exit_observer, tui_before_prompt_observer)
8951 (tui_normal_stop_observer, tui_register_changed_observer):
8952 Remove.
8953 (tui_observers_token): New global.
8954 (attach_or_detach, tui_attach_detach_observers): New functions.
8955 (tui_install_hooks, tui_remove_hooks): Use
8956 tui_attach_detach_observers.
8957 * record-btrace.c (record_btrace_thread_observer): Remove.
8958 (record_btrace_thread_observer_token): New global.
8959 * observer.sh: Remove.
8960 * observer.c: Rename to observable.c.
8961 * observable.c (namespace gdb_observers): Define new objects.
8962 (observer_debug): Move into gdb_observers namespace.
8963 (struct observer, struct observer_list, xalloc_observer_list_node)
8964 (xfree_observer_list_node, generic_observer_attach)
8965 (generic_observer_detach, generic_observer_notify): Remove.
8966 (_initialize_observer): Update.
8967 Don't include observer.inc.
8968 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8969 (clean mostlyclean): Likewise.
8970 (observer.h, observer.inc): Remove targets.
8971 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8972 (COMMON_SFILES): Use observable.c, not observer.c.
8973 * .gitignore: Remove observer.h.
8974
1cb1f3da
TT
89752018-03-18 Tom Tromey <tom@tromey.com>
8976
8977 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8978 gdb::def_vector.
8979 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8980
a06ab151
TT
89812018-03-17 Tom Tromey <tom@tromey.com>
8982
8983 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8984
770623f7
TT
89852018-03-17 Tom Tromey <tom@tromey.com>
8986
8987 * target.c (class scoped_target_fd): New.
8988 (target_fileio_close_cleanup): Remove.
8989 (target_fileio_read_alloc_1): Use scoped_target_fd.
8990
39be3c7e
SM
89912018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8992
8993 * silent-rules.mk: New.
8994 * Makefile.in: Include silent-rules.mk
8995 (srcdir, VPATH, top_srcdir): Move up.
8996 (COMPILE): Add ECHO_CXX.
8997 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8998 (init.c): Add ECHO_INIT_C.
8999 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9000 (version.c): Add ECHO_GEN.
9001 (printcmd.o): Add ECHO_CXX.
9002 (target-float.o): Add ECHO_CXX.
9003 (ada-exp.o): Add ECHO_CXX.
9004 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9005 (insight$(EXEEXT)): Add ECHO_CXXLD.
9006 * gnulib/configure.ac: Add AM_SILENT_RULES.
9007 * gnulib/aclocal.m4: Re-generate.
9008 * gnulib/configure: Re-generate.
9009 * gnulib/import/Makefile.in: Re-generate.
9010
37e136b1
TT
90112018-03-16 Tom Tromey <tom@tromey.com>
9012
9013 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9014 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9015 * utils.c (do_free_section_addr_info)
9016 (make_cleanup_free_section_addr_info): Remove.
9017 * symfile.h (struct other_sections): Add constructor.
9018 (struct section_addr_info): Remove.
9019 (section_addr_info): New typedef.
9020 (struct sym_fns) <sym_offsets>: Change type of parameter.
9021 (build_section_addr_info_from_objfile)
9022 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9023 (default_symfile_offsets, symbol_file_add)
9024 (symbol_file_add_from_bfd)
9025 (build_section_addr_info_from_section_table): Update.
9026 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9027 * symfile.c (alloc_section_addr_info): Remove.
9028 (build_section_addr_info_from_section_table): Change return type.
9029 Update.
9030 (build_section_addr_info_from_bfd)
9031 (build_section_addr_info_from_objfile): Likewise.
9032 (free_section_addr_info): Remove.
9033 (relative_addr_info_to_section_offsets): Change type of "addrs".
9034 (addrs_section_compar): Now a std::sort comparator.
9035 (addrs_section_sort): Change return type.
9036 (addr_info_make_relative): Change type of "addrs". Update.
9037 (default_symfile_offsets, syms_from_objfile_1)
9038 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9039 (symbol_file_add_separate): Update.
9040 (symbol_file_add): Change type of "addrs". Update.
9041 (add_symbol_file_command): Update. Remove cleanups.
9042 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9043 cleanups.
9044 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9045 * solib.c (solib_read_symbols): Update.
9046 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9047 * machoread.c (macho_symfile_offsets): Update.
9048 * jit.c (jit_bfd_try_read_symtab): Update.
9049
03afa6ef
SM
90502018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9051
9052 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9053 unittests/utils-selftests.c.
9054 * unittests/utils-selftests.c: New file.
9055
3ae9ce5d
TT
90562018-03-14 Tom Tromey <tom@tromey.com>
9057
9058 PR cli/14977:
9059 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9060 for NULL.
9061
b8c2339b
TT
90622018-03-14 Tom Tromey <tom@tromey.com>
9063
9064 PR cli/19918:
9065 * printcmd.c (printf_pointer): Allow "-" in format.
9066
80ae639d
TT
90672018-03-14 Tom Tromey <tom@tromey.com>
9068
9069 * printcmd.c (_initialize_printcmd): Add usage to printf.
9070
0d671d99
YQ
90712018-03-14 Yao Qi <qiyao@sourceware.org>
9072
9073 * MAINTAINERS: Update my email address.
9074
b577b6af
TT
90752018-03-13 Tom Tromey <tom@tromey.com>
9076
9077 * machoread.c (macho_check_dsym): Change filenamep to a
9078 std::string*.
9079 (macho_symfile_read): Update.
9080 * symfile.c (load_command): Use std::string.
9081
89a3b63e
AB
90822018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9083
9084 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9085 to error message string.
9086 (riscv_register_name): Use xsnprintf instead of sprintf.
9087 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9088 internal_error.
9089 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9090 error.
9091 (riscv_push_dummy_call): Likewise.
9092
984c7238
TT
90932018-03-12 Tom Tromey <tom@tromey.com>
9094
9095 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9096 Use gdb::byte_vector.
9097 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9098
933522d1
YQ
90992018-03-12 Yao Qi <yao.qi@linaro.org>
9100
9101 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9102 parameter type to readable_regcache.
9103 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9104 the declaration.
9105
be2daae6
TT
91062018-03-11 Tom Tromey <tom@tromey.com>
9107
9108 * dwarf2read.c (struct nextfield): Add initializers.
9109 (struct nextfnfield): Remove.
9110 (struct fnfieldlist): Add initializers. Remove "length" and
9111 "head", use std::vector.
9112 (struct decl_field_list): Remove.
9113 (struct field_info): Add initializers.
9114 <fields, baseclasses>: Now std::vector.
9115 <nbaseclasses, nfnfields, typedef_field_list_count,
9116 nested_types_list_count>: Remove.
9117 (dwarf2_add_field, dwarf2_add_type_defn)
9118 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9119 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9120 (process_structure_scope): Update.
9121
484cf504
TT
91222018-03-11 Tom Tromey <tom@tromey.com>
9123
9124 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9125 for use by std::sort.
9126 (build_type_psymtabs_1): Use std::vector.
9127
9bd8e0b0
EZ
91282018-03-09 Eli Zaretskii <eliz@gnu.org>
9129
9130 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9131 and LIBMPFR in the printed configuration.
9132
5dc1a704
TT
91332018-03-08 Tom Tromey <tom@tromey.com>
9134
9135 * source.c (get_filename_and_charpos): Use scoped_fd.
9136 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9137 (procfs_pidlist): Likewise.
9138 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9139 (iterate_over_mappings): Likewise.
9140
fdf07f3a
TT
91412018-03-08 Tom Tromey <tom@tromey.com>
9142
9143 * infcall.c (struct call_return_meta_info)
9144 <stack_temporaries_enabled>: Remove.
9145 (get_call_return_value, call_function_by_hand_dummy): Update.
9146 * thread.c (disable_thread_stack_temporaries): Remove.
9147 (enable_thread_stack_temporaries): Remove.
9148 (thread_stack_temporaries_enabled_p): Return bool.
9149 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9150 (get_last_thread_stack_temporary): Update.
9151 * eval.c (evaluate_subexp): Update.
9152 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9153 class, not a function.
9154 (value_ptr, value_vec): Remove typedefs.
9155 (class thread_info) <stack_temporaries_enabled>: Now bool.
9156 <stack_temporaries>: Now a std::vector.
9157 (thread_stack_temporaries_enabled_p)
9158 (value_in_thread_stack_temporaries): Return bool.
9159
567a3e54
SM
91602018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9161
9162 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9163 (getpkt_or_notif_sane_1): Likewise.
9164
00b40057
SM
91652018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9166
9167 * build-id.c (build_id_to_debug_bfd): Use std::string.
9168
a8dbfd58
SM
91692018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9170
9171 * build-id.c (find_separate_debug_file_by_buildid): Return
9172 std::string.
9173 * build-id.h (find_separate_debug_file_by_buildid): Return
9174 std::string.
9175 * coffread.c (coff_symfile_read): Adjust to std::string.
9176 * elfread.c (elf_symfile_read): Adjust to std::string.
9177 * symfile.c (separate_debug_file_exists): Change parameter to
9178 std::string.
9179 (find_separate_debug_file): Return std::string.
9180 (find_separate_debug_file_by_debuglink): Return std::string.
9181 * symfile.h (find_separate_debug_file_by_debuglink): Return
9182 std::string.
9183
e6a58aa8
SM
91842018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9185
9186 * common/xml-utils.c (xml_escape_text): Move code to...
9187 (xml_escape_text_append): ... this new function.
9188 * common/xml-utils.h (xml_escape_text_append): New declaration.
9189 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9190 New function.
9191 (_initialize_xml_utils): register test_xml_escape_text_append as
9192 a selftest.
9193
4ef0bef6
AH
91942018-03-07 Alan Hayward <alan.hayward@arm.com>
9195
9196 * defs.h: Remove MAX_REGISTER_SIZE.
9197 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9198 asserts.
9199 * python/py-unwind.c (pyuw_sniffer): Likewise.
9200
e0d3522b
TT
92012018-03-07 Tom Tromey <tom@tromey.com>
9202
9203 * linux-tdep.c (linux_info_proc): Update.
9204 * target.h (struct target_ops) <to_fileio_readlink>: Return
9205 optional<string>.
9206 (target_fileio_readlink): Return optional<string>.
9207 * remote.c (remote_hostio_readlink): Return optional<string>.
9208 * inf-child.c (inf_child_fileio_readlink): Return
9209 optional<string>.
9210 * target.c (target_fileio_readlink): Return optional<string>.
9211
ea005f31
AB
92122018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9213
9214 * regcache.c (cooked_read_test): Add riscv to the list of
9215 architectures that have a save_reggroup.
9216
e95a97d4
AA
92172018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9218
9219 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9220 value is not a dynamic class object.
9221
d8344f3d
TT
92222018-03-06 Tom Tromey <tom@tromey.com>
9223
9224 * rust-exp.y: Formatting fixes.
9225
9add17f2
AB
92262018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9227
9228 * riscv-tdep.c (riscv_register_name): Remove target description
9229 support.
9230 (riscv_gdbarch_init): Remove target description check.
9231
c9486dfe
AB
92322018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9233
9234 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9235 comment.
9236 * riscv-tdep.h: Likewise.
9237
d74aff3d
AB
92382018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9239
9240 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9241 (riscv_pseudo_register_write): Delete.
9242 (riscv_gdbarch_init): Remove all use of pseudo registers.
9243
7ea78b59
SM
92442018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9245
9246 * record-btrace.c (btrace_print_lines): Replace cleanup
9247 parameter with RAII equivalents.
9248 (btrace_insn_history): Replace cleanup with RAII equivalents.
9249 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9250 make_cleanup_ui_out_tuple_begin_end): Remove.
9251 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9252 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9253 make_cleanup_ui_out_list_begin_end): Remove.
9254
53127008
SM
92552018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9256
9257 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9258 parameter types to std::vector. Use bool.
9259 (record_btrace_wait): Replace VEC(tp_t) with
9260 std::vector<thread_info *>.
9261 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9262
228f1508
SM
92632018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9264
9265 * record-btrace.c (record_btrace_disable_callback): Remove.
9266 (struct scoped_btrace_disable): New.
9267 (record_btrace_open): Use scoped_btrace_disable.
9268
b2970c23
AB
92692018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9270
9271 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9272 reading values from registers.
9273
fb294655
AB
92742018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9275
9276 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9277 where appropriate.
9278
cab5bb9d
AB
92792018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9280
9281 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9282 change parameter type. Use GDB's print functions, and use
9283 core_addr_to_string where appropriate.
9284 (riscv_push_dummy_call): Use core_addr_to_string where
9285 appropriate, update call to riscv_print_arg_location, and reindent
9286 a few lines.
9287 (riscv_return_value): Update call to riscv_print_arg_location.
9288
dbbb1059
AB
92892018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9290 Tim Newsome <tim@sifive.com>
9291 Albert Ou <a0u@eecs.berkeley.edu>
9292 Darius Rad <darius@bluespec.com>
9293
9294 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9295 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9296 (ALLDEPFILES): Add riscv-tdep.c
9297 * configure.tgt: Add riscv support.
9298 * riscv-tdep.c: New file.
9299 * riscv-tdep.h: New file.
9300 * NEWS: Mention new target.
9301 * MAINTAINERS: Add entry for riscv.
9302
5dc43913
AB
93032018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9304
9305 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9306 fields within aggregates.
9307
3dea1ef7
SM
93082018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9309
9310 * record-btrace.c (btrace_print_lines): Change type of flags to
9311 gdb_disassembly_flags.
9312
7efba073
JB
93132018-03-04 John Baldwin <jhb@FreeBSD.org>
9314
9315 * fbsd-nat.c: Include "inf-ptrace.h".
9316 (USE_SIGTRAP_SIGINFO): Conditionally define.
9317 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9318 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9319 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9320 function.
9321 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9322 Likewise.
9323 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9324 Likewise.
9325 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9326 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9327 "supports_stopped_by_hw_breakpoint" target methods.
9328
386a8676
JB
93292018-03-04 John Baldwin <jhb@FreeBSD.org>
9330
9331 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9332 * fbsd-nat.c (debug_fbsd_nat): New variable.
9333 (show_fbsd_nat_debug): New function.
9334 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9335 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9336
12279366
JB
93372018-03-04 John Baldwin <jhb@FreeBSD.org>
9338
9339 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9340 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9341 prototype.
9342 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9343 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9344 method.
9345
54693cf5
SM
93462018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9347
9348 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9349 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9350
ccb2231c
SM
93512018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9352
9353 * charset.c (struct charset_vector): New.
9354 (charsets): Change type to charset_vector.
9355 (find_charset_names): Adjust.
9356 (add_one): Adjust.
9357 (_initialize_charset): Adjust.
9358
6fb16ce6
SM
93592018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9360
9361 * progspace.h (struct program_space) <deleted_solibs>: Change
9362 type to std::vector<std::string>.
9363 * progspace.c (clear_program_space_solib_cache): Adjust.
9364 * breakpoint.c (print_solib_event): Adjust.
9365 (check_status_catch_solib): Adjust.
9366 * solib.c (update_solib_list): Adjust.
9367 * ui-out.h (class ui_out) <field_string>: New overload.
9368 * ui-out.c (ui_out::field_string): New overload.
9369
564b1e3f
SM
93702018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9371
9372 * progspace.h (struct program_space): Add constructor and
9373 destructor, initialize fields.
9374 (add_program_space): Remove.
9375 * progspace.c (add_program_space): Rename to...
9376 (program_space::program_space): ... this.
9377 (release_program_space): Rename to...
9378 (program_space::~program_space): ... this.
9379 (delete_program_space): Use delete to delete program_space.
9380 (initialize_progspace): Use new to allocate program_space.
9381 * inferior.c (add_inferior_with_spaces): Likewise.
9382 (clone_inferior_command): Likewise.
9383 * infrun.c (follow_fork_inferior): Likewise.
9384 (handle_vfork_child_exec_or_exit): Likewise.
9385
e80aaf61
SM
93862018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9387
9388 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9389 (delim_string_to_char_ptr_vec): Return std::vector of
9390 gdb::unique_xmalloc_ptr.
9391 (dirnames_to_char_ptr_vec_append): Take std::vector of
9392 gdb::unique_xmalloc_ptr.
9393 (dirnames_to_char_ptr_vec): Return std::vector of
9394 gdb::unique_xmalloc_ptr.
9395 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9396 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9397 (delim_string_to_char_ptr_vec): Return an std::vector of
9398 gdb::unique_xmalloc_ptr, adjust the code.
9399 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9400 gdb::unique_xmalloc_ptr, adjust the code.
9401 (dirnames_to_char_ptr_vec): Return an std::vector of
9402 gdb::unique_xmalloc_ptr, adjust the code.
9403 * auto-load.c (auto_load_safe_path_vec): Change type to
9404 std::vector of gdb::unique_xmalloc_ptr.
9405 (auto_load_expand_dir_vars): Return an std::vector of
9406 gdb::unique_xmalloc_ptr, adjust the code.
9407 (auto_load_safe_path_vec_update): Adjust.
9408 (filename_is_in_auto_load_safe_path_vec): Adjust.
9409 (auto_load_objfile_script_1): Adjust.
9410 * build-id.c (build_id_to_debug_bfd): Adjust.
9411 * linux-thread-db.c (thread_db_load_search): Adjust.
9412 * source.c (add_path): Adjust.
9413 (openp): Adjust.
9414 * symfile.c (find_separate_debug_file): Adjust.
9415 * utils.c (do_free_char_ptr_vec): Remove.
9416 (make_cleanup_free_char_ptr_vec): Remove.
9417
ab818ade
SDJ
94182018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9419
9420 PR gdb/22907
9421 * common/pathstuff.c: Conditionally include "<windows.h>".
9422
e1e6f073
GS
94232018-03-01 Georg Sauthoff <mail@georg.so>
9424
9425 PR gdb/22888
9426 * gcore.in: Quote variables and switch interpreter to bash.
9427
c7b15a66
TT
94282018-03-01 Tom Tromey <tom@tromey.com>
9429
9430 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9431 assertion. Add assertion for discriminant_index.
9432 (quirk_rust_enum): Use correct base type name in univariant case.
9433
0cb7c7b0
SM
94342018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9435
9436 * record.c (get_call_history_modifiers): Return a
9437 record_print_flags.
9438 (cmd_record_call_history): Adjust.
9439 * record-btrace.c (record_btrace_call_history): Adjust.
9440 (record_btrace_call_history_range): Adjust.
9441 (record_btrace_call_history_from): Adjust.
9442 * target-debug.h (target_debug_print_record_print_flags): New.
9443 * target-delegates.c: Re-generate.
9444 * target.c (target_call_history): Change flags type.
9445 (target_call_history_from): Likewise.
9446 (target_call_history_range): Likewise.
9447 * target.h (struct target_ops) <target_call_history>: Likewise.
9448 (target_call_history_from): Likewise.
9449 (target_call_history_range): Likewise.
9450
25e3c82c
SDJ
94512018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9452 Simon Marchi <simon.marchi@polymtl.ca>
9453
9454 * common/common-utils.c: Include "sys/stat.h".
9455 (is_regular_file): Move here from "source.c"; change return
9456 type to "bool".
9457 * common/common-utils.h (is_regular_file): New prototype.
9458 * common/pathstuff.c (contains_dir_separator): New function.
9459 * common/pathstuff.h (contains_dir_separator): New prototype.
9460 * source.c: Don't include "sys/stat.h".
9461 (is_regular_file): Move to "common/common-utils.c".
9462
b4987c95
SDJ
94632018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9464
9465 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9466 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9467 * auto-load.c: Include "common/pathstuff.h".
9468 * common/common-def.h (current_directory): Move here.
9469 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9470 function.
9471 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9472 prototype.
9473 * common/pathstuff.c: New file.
9474 * common/pathstuff.h: New file.
9475 * compile/compile.c: Include "common/pathstuff.h".
9476 * defs.h (current_directory): Move to "common/common-defs.h".
9477 * dwarf2read.c: Include "common/pathstuff.h".
9478 * exec.c: Likewise.
9479 * guile/scm-safe-call.c: Likewise.
9480 * linux-thread-db.c: Likewise.
9481 * main.c: Likewise.
9482 * nto-tdep.c: Likewise.
9483 * objfiles.c: Likewise.
9484 * source.c: Likewise.
9485 * symtab.c: Likewise.
9486 * utils.c: Include "common/pathstuff.h".
9487 (gdb_realpath): Move to "common/pathstuff.c".
9488 (gdb_realpath_keepfile): Likewise.
9489 (gdb_abspath): Likewise.
9490 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9491 (gdb_realpath_keepfile): Likewise.
9492 (gdb_abspath): Likewise.
9493
f169cfdc
JB
94942018-02-28 John Baldwin <jhb@FreeBSD.org>
9495
9496 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9497 wildcard process pid for super_resume for kernels with a
9498 specific bug.
9499
e05cac70
PM
95002018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9501
9502 * compile/compile.c (get_args): Add additional comments
9503 explaining function.
9504
55089490
TT
95052018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9506 Tom Tromey <tom@tromey.com>
9507
9508 * target.h (memory_write_request_s): Remove typedef. Don't define
9509 VEC.
9510 (target_write_memory_blocks): Change argument to std::vector.
9511 (struct memory_write_request): Add constructor.
9512 * target-memory.c (compare_block_starting_address): Return bool.
9513 Change argument types.
9514 (claim_memory): Change arguments to use std::vector.
9515 (split_regular_and_flash_blocks, blocks_to_erase)
9516 (compute_garbled_blocks): Likewise.
9517 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9518 (target_write_memory_blocks): Change argument to std::vector.
9519 * symfile.c (struct load_section_data): Add constructor and
9520 destructor. Use std::vector for "requests".
9521 (struct load_progress_data): Add initializers.
9522 (load_section_callback): Update. Use "new".
9523 (clear_memory_write_data): Remove.
9524 (generic_load): Update.
9525
0c305b61
AH
95262018-02-27 Alan Hayward <alan.hayward@arm.com>
9527
9528 * arch/aarch64.h: Use common/tdesc.h.
9529
c5196c92
MR
95302018-02-26 Maciej W. Rozycki <macro@mips.com>
9531
9532 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9533 architecture with a 64-bit ABI.
9534
37c33887
MR
95352018-02-26 Maciej W. Rozycki <macro@mips.com>
9536
9537 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9538 ahead of target description loading.
9539
d4dd3282
TT
95402018-02-26 Tom Tromey <tom@tromey.com>
9541
9542 * stack.c (backtrace_command_1): Update.
9543 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9544 of "flags".
9545 * python/py-framefilter.c (py_print_frame)
9546 (gdbpy_apply_frame_filter): Change type of "flags".
9547 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9548 of "flags".
9549 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9550 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9551 * extension.h (enum frame_filter_flag): Rename from
9552 frame_filter_flags.
9553 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9554 (apply_ext_lang_frame_filter): Change type of "flags".
9555 * extension.c (apply_ext_lang_frame_filter): Change type of
9556 "flags".
9557 * extension-priv.h (struct extension_language_ops)
9558 <apply_frame_filter>: Change type of "flags".
9559
6893c19a
TT
95602018-02-26 Tom Tromey <tom@tromey.com>
9561
9562 PR python/16497:
9563 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9564 off-by-one in py_end computation.
9565 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9566 PRINT_MORE_FRAMES.
9567 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9568 constant.
9569
2ddeaf8a
TT
95702018-02-26 Tom Tromey <tom@tromey.com>
9571
9572 * dwarf2read.c (struct variant_field): New.
9573 (struct nextfield) <variant>: New field.
9574 (dwarf2_add_field): Handle DW_TAG_variant_part.
9575 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9576 discriminated union.
9577 (read_structure_type): Handle DW_TAG_variant_part.
9578 (handle_struct_member_die): New function, extracted from
9579 process_structure_scope. Handle DW_TAG_variant.
9580 (process_structure_scope): Handle discriminated unions. Call
9581 handle_struct_member_die.
9582
c9317f21
TT
95832018-02-26 Tom Tromey <tom@tromey.com>
9584
9585 * rust-lang.h (rust_last_path_segment): Declare.
9586 * rust-lang.c (rust_last_path_segment): Now public. Change
9587 contract.
9588 (struct disr_info): Remove.
9589 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9590 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9591 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9592 (rust_enum_p, rust_enum_variant): New function.
9593 (rust_underscore_fields): Remove "offset" parameter.
9594 (rust_print_enum): New function.
9595 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9596 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9597 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9598 enums.
9599 (rust_internal_print_type): New function, from rust_print_type.
9600 Remove enum code.
9601 (rust_print_type): Call rust_internal_print_type.
9602 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9603 Update enum handling.
9604 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9605 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9606 (rust_union_quirks): New functions.
9607 (process_full_comp_unit, process_full_type_unit): Call
9608 rust_union_quirks.
9609 (process_structure_scope): Update rust_unions if necessary.
9610
7c22600a
TT
96112018-02-26 Tom Tromey <tom@tromey.com>
9612
9613 * value.h (value_union_variant): Declare.
9614 * valops.c (value_union_variant): New function.
9615 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9616 (struct discriminant_info): New.
9617 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9618 enumerator.
9619 (struct main_type) <flag_discriminated_union>: New field.
9620
15ce8941
TT
96212018-02-26 Tom Tromey <tom@tromey.com>
9622
9623 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9624 unittests/unpack-selftests.c.
9625 * unittests/unpack-selftests.c: New file.
9626 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9627
48fbe735
YQ
96282018-02-26 Yao Qi <yao.qi@linaro.org>
9629
9630 * dwarf2read.c (struct partial_die_info) <read>: New method.
9631 (read_partial_die): Remove the declaration.
9632 (load_partial_dies): Update.
9633 (partial_die_info::partial_die_info):
9634 (read_partial_die): Change it to partial_die_info::read.
9635
52356b79
YQ
96362018-02-26 Yao Qi <yao.qi@linaro.org>
9637
9638 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9639 (fixup_partial_die): Remove declaration.
9640 (scan_partial_symbols): Update.
9641 (partial_die_parent_scope): Likewise.
9642 (partial_die_full_name): Likewise.
9643 (fixup_partial_die): Change it to partial_die_info::fixup.
9644
35cc7ed7
YQ
96452018-02-26 Yao Qi <yao.qi@linaro.org>
9646
9647 * dwarf2read.c (read_partial_die): Update the declaration.
9648 (load_partial_dies): Caller update.
9649 (read_partial_die): Remove one argument abbrev_len.
9650
6f06d47b
YQ
96512018-02-26 Yao Qi <yao.qi@linaro.org>
9652
9653 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9654 assignment operator.
9655 (load_partial_dies): Use ctor and copy ctor.
9656 (read_partial_die): Update.
9657 (dwarf2_cu::find_partial_die): Use ctor.
9658
d590ff25
YQ
96592018-02-26 Yao Qi <yao.qi@linaro.org>
9660
9661 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9662 (find_partial_die_in_comp_unit): Change it to
9663 dwarf2_cu::find_partial_die.
9664 (find_partial_die): Update.
9665
fd0a254f
YQ
96662018-02-26 Yao Qi <yao.qi@linaro.org>
9667
9668 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9669 is NULL.
9670
cd9983dd
YQ
96712018-02-26 Yao Qi <yao.qi@linaro.org>
9672
9673 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9674
f46cd62a
AH
96752018-02-26 Alan Hayward <alan.hayward@arm.com>
9676
9677 * arch/amd64.h: Use common/tdesc.h.
9678 * arch/i386.c: Likewise.
9679 * arch/i386.h: Likewise.
9680 * arch/tic6x.c: Likewise.
9681 * arch/tdesc.h: Move file from here...
9682 * common/tdesc.h: ...to here.
9683 * features/aarch64-core.c: Regenerate.
9684 * features/aarch64-fpu.c: Regenerate.
9685 * features/i386/32bit-avx.c: Regenerate.
9686 * features/i386/32bit-avx512.c: Regenerate.
9687 * features/i386/32bit-core.c: Regenerate.
9688 * features/i386/32bit-linux.c: Regenerate.
9689 * features/i386/32bit-mpx.c: Regenerate.
9690 * features/i386/32bit-pkeys.c: Regenerate.
9691 * features/i386/32bit-sse.c: Regenerate.
9692 * features/i386/64bit-avx.c: Regenerate.
9693 * features/i386/64bit-avx512.c: Regenerate.
9694 * features/i386/64bit-core.c: Regenerate.
9695 * features/i386/64bit-linux.c: Regenerate.
9696 * features/i386/64bit-mpx.c: Regenerate.
9697 * features/i386/64bit-pkeys.c: Regenerate.
9698 * features/i386/64bit-segments.c: Regenerate.
9699 * features/i386/64bit-sse.c: Regenerate.
9700 * features/i386/x32-core.c: Regenerate.
9701 * features/tic6x-c6xp.c: Regenerate.
9702 * features/tic6x-core.c: Regenerate.
9703 * features/tic6x-gp.c: Regenerate.
9704 * target-descriptions.c: Use common/tdesc.h.
9705 * target-descriptions.h: Likewise.
9706
9b292f68
TT
97072018-02-24 Tom Tromey <tom@tromey.com>
9708
9709 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9710 (try_thread_db_load_from_dir, thread_db_load_search): Use
9711 std::string.
9712 (info_auto_load_libthread_db_compare): Return bool. Change
9713 argument types.
9714 (info_auto_load_libthread_db): Use std::vector, std::string.
9715 Remove cleanups.
9716
281d762b
TT
97172018-02-24 Tom Tromey <tom@tromey.com>
9718
9719 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9720 std::string.
9721 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9722 std::string*.
9723 * gdbarch.c: Rebuild.
9724 * gdbarch.h: Rebuild.
9725 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9726 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9727 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9728 std::string*.
9729
9d8780f0
SM
97302018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9731
9732 * gdbtypes.h (sect_offset): Change type to uint64_t.
9733 (sect_offset_str): New function.
9734 * dwarf2read.c (create_addrmap_from_aranges): Use
9735 sect_offset_str.
9736 (error_check_comp_unit_head): Likewise.
9737 (create_debug_type_hash_table): Likewise.
9738 (read_cutu_die_from_dwo): Likewise.
9739 (init_cutu_and_read_dies): Likewise.
9740 (init_cutu_and_read_dies_no_follow): Likewise.
9741 (process_psymtab_comp_unit_reader): Likewise.
9742 (partial_die_parent_scope): Likewise.
9743 (peek_die_abbrev): Likewise.
9744 (process_queue): Likewise.
9745 (dwarf2_physname): Likewise.
9746 (read_namespace_alias): Likewise.
9747 (read_import_statement): Likewise.
9748 (create_dwo_cu_reader): Likewise.
9749 (create_cus_hash_table): Likewise.
9750 (lookup_dwo_cutu): Likewise.
9751 (inherit_abstract_dies): Likewise.
9752 (read_func_scope): Likewise.
9753 (read_call_site_scope): Likewise.
9754 (dwarf2_add_member_fn): Likewise.
9755 (read_common_block): Likewise.
9756 (read_module_type): Likewise.
9757 (read_typedef): Likewise.
9758 (read_subrange_type): Likewise.
9759 (load_partial_dies): Likewise.
9760 (read_partial_die): Likewise.
9761 (find_partial_die): Likewise.
9762 (read_str_index): Likewise.
9763 (dwarf2_string_attr): Likewise.
9764 (build_error_marker_type): Likewise.
9765 (lookup_die_type): Likewise.
9766 (dump_die_shallow): Likewise.
9767 (follow_die_ref): Likewise.
9768 (dwarf2_fetch_die_loc_sect_off): Likewise.
9769 (dwarf2_fetch_constant_bytes): Likewise.
9770 (follow_die_sig): Likewise.
9771 (get_signatured_type): Likewise.
9772 (get_DW_AT_signature_type): Likewise.
9773 (dwarf2_find_containing_comp_unit): Likewise.
9774 (set_die_type): Likewise.
9775
8ec57239
JB
97762018-02-21 John Baldwin <jhb@FreeBSD.org>
9777
9778 * arch/aarch64.c: Include "common-defs.h".
9779 * arch/amd64.c: Likewise.
9780 * arch/i386.c: Likewise.
9781
3eac2b65
TT
97822018-02-21 Tom Tromey <tom@tromey.com>
9783
9784 * value.h: (extract_field_op): Update.
9785 * eval.c (extract_field_op): Return a const char *.
9786 * expression.h (parse_expression_for_completion): Update.
9787 * completer.c (complete_expression): Update.
9788 (add_struct_fields): Make fieldname const.
9789 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9790 (mark_completion_tag, parse_exp_in_context_1): Update.
9791 (parse_expression_for_completion): Change "name" to
9792 unique_xmalloc_ptr*.
9793
6ccb583f
TT
97942018-02-21 Tom Tromey <tom@tromey.com>
9795
9796 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9797
c113ed0c
YQ
97982018-02-21 Yao Qi <yao.qi@linaro.org>
9799
9800 * avr-tdep.c (avr_read_pc): Change parameter type to
9801 readable_regcache.
9802 * gdbarch.sh (read_pc): Likewise.
9803 * gdbarch.c: Re-generated.
9804 * gdbarch.h: Re-generated.
9805 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9806 readable_regcache.
9807 * ia64-tdep.c (ia64_read_pc): Likewise.
9808 * mips-tdep.c (mips_read_pc): Likewise.
9809 * spu-tdep.c (spu_read_pc): Likewise.
9810
4c74fe6b
YQ
98112018-02-21 Yao Qi <yao.qi@linaro.org>
9812
9813 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9814 * regcache-dump.c: New file.
9815 * regcache.c: Move register_dump to regcache-dump.c.
9816 (maintenance_print_registers): Likewise.
9817 (maintenance_print_raw_registers): Likewise.
9818 (maintenance_print_cooked_registers): Likewise.
9819 (maintenance_print_register_groups): Likewise.
9820 (maintenance_print_remote_registers): Likewise.
9821 (_initialize_regcache): Likewise.
9822 * regcache.h (register_dump): Moved from regcache.c.
9823
796bb026
YQ
98242018-02-21 Yao Qi <yao.qi@linaro.org>
9825
9826 * regcache.c (regcache::regcache): Update.
9827 (regcache::invalidate): Move it to detached_regcache::invalidate.
9828 (get_thread_arch_aspace_regcache): Update.
9829 (regcache::raw_update): Update.
9830 (regcache::cooked_read): Remove some code.
9831 (regcache::cooked_read_value): Likewise.
9832 (regcache::raw_write): Remove assert on m_readonly_p.
9833 (regcache::raw_supply_integer): Move it to
9834 detached_regcache::raw_supply_integer.
9835 (regcache::raw_supply_zeroed): Likewise.
9836 * regcache.h (detached_regcache) <raw_supply_integer>: New
9837 declaration.
9838 <raw_supply_zeroed, invalidate>: Likewise.
9839 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9840 <invalidate>: Likewise.
9841 <m_readonly_p>: Removed.
9842
215c69dc
YQ
98432018-02-21 Yao Qi <yao.qi@linaro.org>
9844
9845 * infcmd.c (get_return_value): Let stop_regs point to
9846 get_current_regcache.
9847 * regcache.c (regcache::regcache): Remove.
9848 (register_dump_reg_buffer): New class.
9849 (regcache_print): Adjust.
9850 * regcache.h (regcache): Remove constructors.
9851
f3384e66
YQ
98522018-02-21 Yao Qi <yao.qi@linaro.org>
9853
9854 * regcache.c (class register_dump): New class.
9855 (register_dump_regcache, register_dump_none): New class.
9856 (register_dump_remote, register_dump_groups): New class.
9857 (regcache_print): Update.
9858 * regcache.h (regcache_dump_what): Move it to regcache.c.
9859 (regcache) <dump>: Remove.
9860
c8ec2f33
YQ
98612018-02-21 Yao Qi <yao.qi@linaro.org>
9862
9863 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9864 reg_buffer_rw *.
9865 (jit_unwind_reg_set_impl): Call raw_supply.
9866 (jit_frame_sniffer): Use reg_buffer_rw.
9867 * record-full.c (record_full_core_regbuf): Change its type.
9868 (record_full_core_open_1): Use reg_buffer_rw.
9869 (record_full_close): Likewise.
9870 (record_full_core_fetch_registers): Use regcache->raw_supply.
9871 (record_full_core_store_registers): Likewise.
9872 * regcache.c (regcache::get_register_status): Move it to
9873 reg_buffer.
9874 (regcache_raw_set_cached_value): Remove.
9875 (regcache::raw_set_cached_value): Remove.
9876 (regcache::raw_write): Call raw_supply.
9877 (regcache::raw_supply): Move it to reg_buffer_rw.
9878 * regcache.h (regcache_raw_set_cached_value): Remove.
9879 (reg_buffer_rw): New class.
9880
daf6667d
YQ
98812018-02-21 Yao Qi <yao.qi@linaro.org>
9882
9883 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9884 readonly_detached_regcache.
9885 (dummy_frame_prev_register): Use regcache->cooked_read.
9886 * frame.c (frame_save_as_regcache): Change return type.
9887 (frame_pop): Update.
9888 * frame.h (frame_save_as_regcache): Update declaration.
9889 * inferior.h (get_infcall_suspend_state_regcache): Update
9890 declaration.
9891 * infrun.c (infcall_suspend_state) <registers>: use
9892 readonly_detached_regcache.
9893 (save_infcall_suspend_state): Don't use regcache_dup.
9894 (get_infcall_suspend_state_regcache): Change return type.
9895 * linux-fork.c (struct fork_info) <savedregs>: Change to
9896 readonly_detached_regcache.
9897 <pc>: New field.
9898 (fork_save_infrun_state): Don't use regcache_dup.
9899 (info_checkpoints_command): Adjust.
9900 * mi/mi-main.c (register_changed_p): Update declaration.
9901 (mi_cmd_data_list_changed_registers): Use
9902 readonly_detached_regcache.
9903 (register_changed_p): Change parameter type to
9904 readonly_detached_regcache.
9905 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9906 readonly_detached_regcache.
9907 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9908 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9909 New.
9910 (regcache::save): Move it to reg_buffer.
9911 (regcache::restore): Change parameter type.
9912 (regcache_dup): Remove.
9913 * regcache.h (reg_buffer) <save>: New method.
9914 (readonly_detached_regcache): New class.
9915 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9916 readonly_detached_regcache.
9917 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9918
fc5b8736
YQ
99192018-02-21 Yao Qi <yao.qi@linaro.org>
9920
9921 * frame.c (frame_save_as_regcache): Use regcache method save.
9922 (frame_pop): Use regcache method restore.
9923 * infrun.c (restore_infcall_suspend_state): Likewise.
9924 * linux-fork.c (fork_load_infrun_state): Likewise.
9925 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9926 save.
9927 * regcache.c (regcache_save): Remove.
9928 (regcache::restore): More asserts.
9929 (regcache_cpy): Remove.
9930 * regcache.h (regcache_save): Remove the declaration.
9931 (regcache::restore): Move from private to public.
9932 Remove the friend declaration of regcache_cpy.
9933 (regcache_cpy): Remove declaration.
9934
849d0ba8
YQ
99352018-02-21 Yao Qi <yao.qi@linaro.org>
9936
9937 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9938 parameter type to 'readable_regcache *'.
9939 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9940 * arm-tdep.c (arm_neon_quad_read): Likewise.
9941 (arm_pseudo_read): Likewise.
9942 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9943 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9944 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9945 * gdbarch.c: Re-generated.
9946 * gdbarch.h: Re-generated.
9947 * gdbarch.sh (pseudo_register_read): Change parameter type to
9948 'readable_regcache *'.
9949 (pseudo_register_read_value): Likewise.
9950 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9951 (h8300_pseudo_register_read): Likewise.
9952 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9953 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9954 (i386_pseudo_register_read_into_value): Likewise.
9955 (i386_pseudo_register_read_value): Likewise.
9956 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9957 declaration.
9958 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9959 * m32c-tdep.c (m32c_raw_read): Likewise.
9960 (m32c_read_flg): Likewise.
9961 (m32c_banked_register): Likewise.
9962 (m32c_banked_read): Likewise.
9963 (m32c_sb_read): Likewise.
9964 (m32c_part_read): Likewise.
9965 (m32c_cat_read): Likewise.
9966 (m32c_r3r2r1r0_read): Likewise.
9967 (m32c_pseudo_register_read): Likewise.
9968 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9969 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9970 (mep_pseudo_cr64_read): Likewise.
9971 (mep_pseudo_register_read): Likewise.
9972 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9973 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9974 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9975 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9976 (regcache::cooked_read): Likewise.
9977 (regcache::cooked_read_value): Likewise.
9978 (regcache_cooked_read_signed):
9979 (regcache::cooked_read): Likewise.
9980 * regcache.h (readable_regcache): New class.
9981 (regcache): Inherit readable_regcache. Move some methods to
9982 readable_regcache.
9983 * rl78-tdep.c (rl78_pseudo_register_read): Change
9984 parameter type to 'readable_regcache *'.
9985 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9986 (e500_pseudo_register_read): Change parameter type to
9987 'readable_regcache *'.
9988 (dfp_pseudo_register_read): Likewise.
9989 (vsx_pseudo_register_read): Likewise.
9990 (efpr_pseudo_register_read): Likewise.
9991 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9992 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9993 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9994 (sh64_pseudo_register_read): Likewise.
9995 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9996 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9997 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9998 (spu_pseudo_register_read): Likewise.
9999 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10000 (xtensa_pseudo_register_read): Likewise.
10001
31716595
YQ
100022018-02-21 Yao Qi <yao.qi@linaro.org>
10003
10004 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10005 (regcache::arch): Move it to reg_buffer::arch.
10006 (regcache::register_buffer): Likewise.
10007 (regcache::assert_regnum): Likewise.
10008 (regcache::num_raw_registers): Likewise.
10009 * regcache.h (reg_buffer): New class.
10010 (regcache): Inherit reg_buffer.
10011
7104e59b
SM
100122018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10013
10014 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10015 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10016
2d8adcbd
MM
100172018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10018
10019 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10020
b5884fa7
AH
100212018-02-19 Alan Hayward <alan.hayward@arm.com>
10022
10023 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10024 (SFILES): Remove common/*.c files.
10025 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10026 * common/common.host: Add common reference.
10027 * configure.ac: Likewise.
10028 * configure: Regenerate.
10029
fd90ace4
YQ
100302018-02-16 Yao Qi <yao.qi@linaro.org>
10031
10032 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10033 (block_initialize_namespace): Use new.
10034 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10035 (dwarf2_free_objfile): Use delete.
10036 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10037 (copy_type_recursive): Use new.
10038 * gdb_obstack.h (allocate_on_obstack): New.
10039
85046ae2
YQ
100402018-02-15 Yao Qi <yao.qi@linaro.org>
10041
10042 PR gdb/22849
10043 * inferior.c (exit_inferior_1): Reset inf->control.
10044
355c559b
JB
100452018-02-15 Joel Brobecker <brobecker@adacore.com>
10046
10047 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10048 declaration.
10049
980548fd
PA
100502018-02-14 Pedro Alves <palves@redhat.com>
10051
10052 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10053 frame_cleanup_after_sniffer on exception.
10054
692d6f97
TT
100552018-02-14 Tom Tromey <tom@tromey.com>
10056
10057 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10058 const.
10059 (solib_bfd_open): Make pathname const.
10060 * solib.c (solib_bfd_open): Make pathname const.
10061 * solib-spu.c (spu_bfd_fopen): Make name const.
10062 (spu_bfd_open): Make pathname const.
10063 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10064 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10065
e0cc99a6
TT
100662018-02-14 Tom Tromey <tom@tromey.com>
10067
10068 * symfile.c (symfile_bfd_open): Update.
10069 * source.h (openp, source_full_path_of, find_and_open_source):
10070 Change argument type to unique_xmalloc_ptr.
10071 * source.c (openp): Take a unique_xmalloc_ptr.
10072 (source_full_path_of, find_and_open_source): Likewise.
10073 (open_source_file, symtab_to_fullname): Update.
10074 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10075 unique_xmalloc_ptr.
10076 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10077 (exec_file_find): Update.
10078 * psymtab.c (psymtab_to_fullname): Update.
10079 * nto-tdep.h (nto_find_and_open_solib): Update.
10080 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10081 unique_xmalloc_ptr.
10082 * exec.c (exec_file_attach): Update.
10083 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10084 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10085
b46a8d7c
TT
100862018-02-14 Tom Tromey <tom@tromey.com>
10087
10088 * solib.c: Include source.h.
10089 * nto-tdep.c: Include source.h.
10090 * mi/mi-cmd-env.c: Include source.h.
10091 * infcmd.c: Include source.h.
10092 * exec.c: Include source.h.
10093 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10094 (add_path, directory_switch, source_path, init_source_path): Move
10095 declarations...
10096 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10097 (add_path, directory_switch, source_path, init_source_path):
10098 ...here.
10099
797bc1cb
TT
101002018-02-14 Tom Tromey <tom@tromey.com>
10101
10102 * solist.h (exec_file_find, solib_find): Return
10103 unique_xmalloc_ptr.
10104 (solib_bfd_fopen): Take a const char *.
10105 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10106 (exec_file_find, solib_find): Likewise.
10107 (solib_bfd_fopen): Do not take ownership of "pathname".
10108 (solib_bfd_open): Use unique_xmalloc_ptr.
10109 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10110 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10111 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10112 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10113
f98b2e33
JB
101142018-02-14 Joel Brobecker <brobecker@adacore.com>
10115
10116 * ada-lang.c (name_match_type_from_name): Remove reference to
10117 ada_name_for_lookup in function's documentation.
10118 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10119
24b9144d
SM
101202018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10121
10122 * defs.h (enum openp_flags): New enum.
10123 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10124 Move to enum openp_flags.
10125 (openp_flags): New enum flags.
10126 (openp): Change parameter type to openp_flags.
10127 * source.c (openp): Change parameter type to openp_flags.
10128 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10129 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10130
387cd15b
SM
101312018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10132
10133 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10134 per-command.
10135
b303c6f6
AB
101362018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10137
10138 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10139 into...
10140 (class dwarf2_queue_guard): ...the destructor of this new class.
10141 (dw2_do_instantiate_symtab): Create instance of the new class
10142 dwarf2_queue_guard, remove cleanup.
10143
9c3630e9
TT
101442018-02-09 Tom Tromey <tom@tromey.com>
10145
10146 * source.c (find_source_lines): Don't reference past the end of
10147 the vector.
10148
c4e12631
MM
101492018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10150
10151 * remote.c (remote_btrace_maybe_reopen): Change error message.
10152 * btrace.c (btrace_enable): Likewise.
10153 (parse_xml_btrace): Likewise.
10154 (parse_xml_btrace_conf): Likewise.
10155
88711fbf
MM
101562018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10157
10158 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10159 (linux_enable_pt, linux_enable_bts): Call
10160 diagnose_perf_event_open_fail.
10161
17ad2a4f
MM
101622018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10163
10164 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10165 Remove parameter and change return type. Update callers. Move it.
10166 (linux_enable_bts, linux_enable_pt): Improve error message.
10167 (linux_enable_pt): Remove zero buffer size check.
10168 (linux_enable_btrace): Improve error messages. Remove NULL return
10169 check.
10170
de6242d3
MM
101712018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10172
10173 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10174 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10175 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10176 (linux_supports_pt, linux_supports_btrace): Remove.
10177 (linux_enable_bts): Call cpu_supports_bts.
10178 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10179 * remote.c (remote_supports_btrace): Remove.
10180 (init_remote_ops): Remove remote_supports_btrace.
10181 * target-delegates.c: Regenerated.
10182 * target.c (target_supports_btrace): Remove.
10183 * target.h (target_ops) <to_supports_btrace>: Remove
10184 (target_supports_btrace): Remove.
10185 * x86-linux-nat.c (x86_linux_create_target): Remove
10186 linux_supports_btrace.
10187
9ee23a85
MM
101882018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10189
10190 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10191 btrace failed.
10192 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10193 exception and use message in own exception.
10194
5c3284c1
MM
101952018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10196
10197 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10198 (perf_event_pt_event_type): Use gdb_file_up.
10199 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10200 scoped_fd, and scoped_mmap.
10201
84696f37
MM
102022018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10203
10204 * common/scoped_mmap.h: New.
10205 * unittests/scoped_mmap-selftest.c: New.
10206 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10207 unittests/scoped_mmap-selftest.c.
10208
ea4a0888
MM
102092018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10210
10211 * common/scoped_fd.h: New.
10212 * unittests/scoped_fd-selftest.c: New.
10213 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10214 unittests/scoped_fd-selftest.c.
10215
869e8290
TT
102162018-02-09 Tom Tromey <tom@tromey.com>
10217
10218 * auto-load.c (auto_load_section_scripts): Use
10219 gdb::unique_xmalloc_ptr.
10220
a37a2ae7
TT
102212018-02-09 Tom Tromey <tom@tromey.com>
10222
10223 * auto-load.c (execute_script_contents): Use std::string.
10224
4e725347
JB
102252018-02-09 Joel Brobecker <brobecker@adacore.com>
10226
10227 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10228 Python function, rather than a new command.
10229
9a897d43
TT
102302018-02-08 Tom Tromey <tom@tromey.com>
10231
10232 * solib.c (solib_find_1): Use std::string.
10233 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10234
58ef3771
TT
102352018-02-08 Tom Tromey <tom@tromey.com>
10236
10237 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10238
a9abc434
TT
102392018-02-08 Tom Tromey <tom@tromey.com>
10240
10241 * source.c (find_source_lines): Use gdb::def_vector.
10242
84f27c6f
TT
102432018-02-08 Tom Tromey <tom@tromey.com>
10244
10245 * macrocmd.c (struct temporary_macro_definition): New.
10246 (macro_define_command): Use temporary_macro_definition. Remove
10247 cleanups.
10248 (free_macro_definition_ptr): Remove.
10249
0354904b
TT
102502018-02-08 Tom Tromey <tom@tromey.com>
10251
10252 * macroexp.c (maybe_expand): Use std::string.
10253
1739cf24
TT
102542018-02-08 Tom Tromey <tom@tromey.com>
10255
10256 * macroexp.c (struct macro_buffer): Add initializers for some
10257 members.
10258 (init_buffer, init_shared_buffer, free_buffer)
10259 (free_buffer_return_text): Remove.
10260 (macro_buffer): New constructors.
10261 (~macro_buffer): New destructor.
10262 (macro_buffer::set_shared): New method.
10263 (macro_buffer::resize_buffer, macro_buffer::appendc)
10264 (macro_buffer::appendmem): Now methods, not free functions.
10265 (set_token, append_tokens_without_splicing, stringify)
10266 (macro_stringify): Update.
10267 (gather_arguments): Change return type. Remove argc_p argument,
10268 add args_ptr argument. Use std::vector.
10269 (substitute_args): Remove argc argument. Accept std::vector.
10270 (expand): Update. Use std::vector.
10271 (scan, macro_expand, macro_expand_next): Update.
10272
f6c2623e
TT
102732018-02-08 Tom Tromey <tom@tromey.com>
10274
10275 * symtab.c (default_collect_symbol_completion_matches_break_on):
10276 Use unique_xmalloc_ptr.
10277 * macroscope.h: (sal_macro_scope, user_macro_scope)
10278 (default_macro_scope): Return unique_xmalloc_ptr.
10279 * macroscope.c (sal_macro_scope, user_macro_scope)
10280 (default_macro_scope): Return unique_xmalloc_ptr.
10281 * macroexp.h (macro_expand, macro_expand_once): Return
10282 unique_xmalloc_ptr.
10283 * macroexp.c (macro_expand, macro_expand_once): Return
10284 unique_xmalloc_ptr.
10285 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10286 (info_macro_command, info_macros_command): Use
10287 unique_xmalloc_ptr.
10288 * compile/compile-c-support.c (write_macro_definitions): Use
10289 unique_xmalloc_ptr.
10290 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10291
c2e0e465
SM
102922018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10293
10294 * value.c (value_static_field): Assign field type instead of
10295 containing type when returning an optimized out value.
10296
3f8c94b4
YQ
102972018-02-06 Yao Qi <yao.qi@linaro.org>
10298
10299 * ft32-tdep.c (ft32_read_pc): Remove.
10300 (ft32_write_pc): Remove.
10301 (ft32_gdbarch_init): Update.
10302 * m32r-tdep.c (m32r_read_pc): Remove.
10303 (m32r_gdbarch_init): Update.
10304 * mep-tdep.c (mep_read_pc): Remove.
10305 (mep_gdbarch_init): Update.
10306 * microblaze-tdep.c (microblaze_write_pc): Remove.
10307 (microblaze_gdbarch_init): Update.
10308 * mn10300-tdep.c (mn10300_read_pc): Remove.
10309 (mn10300_write_pc): Remove.
10310 (mn10300_gdbarch_init): Update.
10311 * moxie-tdep.c (moxie_read_pc): Remove.
10312 (moxie_write_pc): Remove.
10313 (moxie_gdbarch_init): Update.
10314
bca65a23
YQ
103152018-02-06 Yao Qi <yao.qi@linaro.org>
10316
10317 * expprint.c (print_subexp_standard): Handle
10318 OP_F77_UNDETERMINED_ARGLIST.
10319 (dump_subexp_body_standard): Likewise.
10320
583e3f90 103212018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 10322
583e3f90
YQ
10323 * target-descriptions.c (tdesc_element_visitor) Add empty
10324 implementations.
b8df6ca7
AH
10325 (tdesc_type): Move make_gdb_type from here.
10326 (tdesc_type_builtin): Likewise.
10327 (tdesc_type_vector): Likewise.
10328 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10329 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10330 (make_gdb_type_union): Likewise.
10331 (make_gdb_type_flags): Likewise.
10332 (make_gdb_type_enum): Likewise.
10333 (make_gdb_type): New function.
10334 (tdesc_register_type): Use static make_gdb_type.
10335
e813d34a
RK
103362018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10337
10338 * infcmd.c (default_print_one_register_info): Align natural-format
10339 column values consistently one under another.
10340 (pad_to_column): New function.
10341
0eb876f5
JB
103422018-02-05 Joel Brobecker <brobecker@adacore.com>
10343
10344 * dwarf2read.c (dwarf2_physname): Move commment.
10345
0625771b
LS
103462018-02-01 Leszek Swirski <leszeks@google.com>
10347
10348 * varobj.c (varobj_formatted_print_options): Allow recursive
10349 pretty printing if pretty printing is enabled.
10350
59498c30
LS
103512018-02-01 Leszek Swirski <leszeks@google.com>
10352
10353 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10354 names after a structop as a filename.
10355
2d9e6acb
YQ
103562018-02-01 Yao Qi <yao.qi@linaro.org>
10357
10358 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10359 (arm_record_coproc_data_proc): Likewise.
10360
df95a9cf
YQ
103612018-02-01 Yao Qi <yao.qi@linaro.org>
10362
10363 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10364
07e5f5cf
NP
103652018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10366
10367 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10368 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10369
3045b475
PA
103702018-01-31 Pedro Alves <palves@redhat.com>
10371
10372 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10373 * inflow.c (child_terminal_save_inferior): Wrap reference to
10374 tcgetpgrp in HAVE_TERMIOS_H.
10375 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10376 _WIN32.
10377 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10378 always iterate over all inferiors.
10379 (gdbsim_cntrl_c): Adjust.
10380 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10381
929b5ad4
JB
103822018-01-31 Joel Brobecker <brobecker@adacore.com>
10383
10384 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10385 index type is objfile-owned if the element type is as well.
10386
29236ca2
JB
103872018-01-31 Joel Brobecker <brobecker@adacore.com>
10388
10389 GDB 8.1 released.
10390
c81e8879
PR
103912018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10392
10393 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10394 "features/s390x-linux64.c".
10395 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10396 s390_linux32 and s390x_linux64.
10397 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10398 default tdesc.
10399 * s390-tdep.c: Include "features/s390-linux32.c" and
10400 "features/s390x-linux64.c".
10401 (s390_tdesc_valid): Add check for tdesc_has_registers.
10402 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10403 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10404 tdesc_s390x_linux64.
10405 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10406 tdesc_s390x_linux64 to...
10407 * s390-tdep.h: ...here.
10408
e671cd59
PA
104092018-01-30 Pedro Alves <palves@redhat.com>
10410
10411 PR gdb/13211
10412 * config.in, configure: Regenerate.
10413 * configure.ac: Check for getpgid.
10414 * go32-nat.c (go32_pass_ctrlc): New.
10415 (go32_target): Install it.
10416 * inf-child.c (inf_child_target): Install
10417 child_terminal_save_inferior, child_pass_ctrlc and
10418 child_interrupt.
10419 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10420 (inf_ptrace_target): No longer install it.
10421 * infcmd.c (interrupt_target_1): Adjust.
10422 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10423 (child_interrupt): Declare.
10424 (inferior::terminal_state): New.
10425 * inflow.c (struct terminal_info): Update comments.
10426 (inferior_process_group): Delete.
10427 (terminal_is_ours): Delete.
10428 (gdb_tty_state): New.
10429 (child_terminal_init): Adjust.
10430 (is_gdb_terminal, sharing_input_terminal_1)
10431 (sharing_input_terminal): New functions.
10432 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10433 Set the process's actual process group in the foreground if
10434 possible. Handle is_ours_for_output/is_ours distinction. Don't
10435 mark terminal as the inferior's if not sharing GDB's terminal.
10436 Don't check attach_flag.
10437 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10438 pass down a target_terminal_state.
10439 (child_terminal_save_inferior): New, factored out from ...
10440 (child_terminal_ours_1): ... this. Handle
10441 target_terminal_state::is_ours_for_output.
10442 (child_interrupt, child_pass_ctrlc): New.
10443 (inflow_inferior_exit): Clear the inferior's terminal_state.
10444 (copy_terminal_info): Copy the inferior's terminal state.
10445 (_initialize_inflow): Remove reference to terminal_is_ours.
10446 * inflow.h (inferior_process_group): Delete.
10447 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10448 * procfs.c (procfs_target): Don't install procfs_interrupt.
10449 (procfs_interrupt): Delete.
10450 * remote.c (remote_serial_quit_handler): Adjust.
10451 (remote_interrupt): Remove ptid parameter. Adjust.
10452 * target-delegates.c: Regenerate.
10453 * target.c: Include "terminal.h".
10454 (target_terminal::terminal_state): Rename to ...
10455 (target_terminal::m_terminal_state): ... this.
10456 (target_terminal::init): Adjust.
10457 (target_terminal::inferior): Adjust to per-inferior
10458 terminal_state.
10459 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10460 (target_terminal::ours, target_terminal::ours_for_output): Use
10461 target_terminal_is_ours_kind.
10462 (target_interrupt): Remove ptid parameter. Adjust.
10463 (default_target_pass_ctrlc): Adjust.
10464 * target.h (target_ops::to_terminal_save_inferior): New field.
10465 (target_ops::to_interrupt): Remove ptid_t parameter.
10466 (target_interrupt): Remove ptid_t parameter. Update comment.
10467 (target_pass_ctrlc): Update comment.
10468 * target/target.h (target_terminal_state): New scoped enum,
10469 factored out of ...
10470 (target_terminal::terminal_state): ... here.
10471 (target_terminal::inferior): Update comments.
10472 (target_terminal::restore_inferior): New.
10473 (target_terminal::is_inferior, target_terminal::is_ours)
10474 (target_terminal::is_ours_for_output): Adjust.
10475 (target_terminal::scoped_restore_terminal_state): Adjust to
10476 rename, and call restore_inferior() instead of inferior().
10477 (target_terminal::scoped_restore_terminal_state::m_state): Change
10478 type.
10479 (target_terminal::terminal_state): Rename to ...
10480 (target_terminal::m_terminal_state): ... this and change type.
10481
9c3a5d93
PA
104822018-01-30 Pedro Alves <palves@redhat.com>
10483
10484 * linux-nat.c (wait_for_signal): New function.
10485 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10486 directly.
10487 (async_terminal_is_ours)
10488 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10489 (linux_nat_add_target): Don't override
10490 to_terminal_inferior/to_terminal_ours.
10491
69ab5edb
SDJ
104922018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10493
10494 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10495
fc8e7e75
SM
104962018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10497
10498 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10499 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10500 dwarf2_per_objfile_free here.
10501 (dwarf2_per_objfile_free): Remove.
10502 (_initialize_dwarf2_read): Don't register
10503 dwarf2_per_objfile_free as a registry cleanup.
10504
b2a426e2
EZ
105052018-01-27 Eli Zaretskii <eliz@gnu.org>
10506
10507 Avoid compilation errors in MinGW native builds
10508
10509 The error is triggered by including python-internal.h, and the
10510 error message is:
10511
10512 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10513 from build-gnulib/import/math.h:27,
10514 from d:/usr/Python26/include/pyport.h:235,
10515 from d:/usr/Python26/include/Python.h:58,
10516 from python/python-internal.h:94,
10517 from python/py-arch.c:24:
10518 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10519 using ::hypot;
10520 ^~~~~
10521
10522 This happens because Python headers define 'hypot' to expand t
10523 '_hypot' in the Windows builds.
10524 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10525 'hypoth'. This avoids a compilation error.
10526
0bdd8eac
AH
105272018-01-26 Alan Hayward <alan.hayward@arm.com>
10528
10529 * MAINTAINERS (Write After Approval): Fix ordering.
10530
56ae9dc3
AH
105312018-01-26 Alan Hayward <alan.hayward@arm.com>
10532
10533 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10534
7433498b
AM
105352018-01-26 Alan Modra <amodra@gmail.com>
10536
10537 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10538 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10539 Remove nop. Make const. Comment.
10540 (powerpc32_plt_stub_so_2): New.
10541 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10542 Correct count. Update uses.
10543 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10544 Move common code reading PLT entry word. Correct
10545 powerpc32_plt_stub PLT address calculation.
10546 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10547 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10548 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10549 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10550 (ppc64_standard_linkage8): Likewise.
10551 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10552 Correct insns description.
10553 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10554
0f59d5fc
PA
105552018-01-24 Pedro Alves <palves@redhat.com>
10556
10557 GCC PR libstdc++/83906
10558 * gdbtypes.c (operator==(const dynamic_prop &,
10559 const dynamic_prop &)): New.
10560 (operator==(const range_bounds &, const range_bounds &)): New.
10561 (check_types_equal): Use them instead of memcmp.
10562 * gdbtypes.h (operator==(const dynamic_prop &,
10563 const dynamic_prop &)): Declare.
10564 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10565 (operator==(const range_bounds &, const range_bounds &)): Declare.
10566 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10567
ef8914a4
PR
105682018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10569
10570 * s390-linux-tdep.c (s390_record_address_mask)
10571 (s390_record_calc_disp_common, s390_record_calc_disp)
10572 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10573 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10574 (s390_process_record): Move to s390-tdep.c.
10575 (s390_linux_init_abi_any): Adjust.
10576 * s390-tdep.c (s390_record_address_mask)
10577 (s390_record_calc_disp_common, s390_record_calc_disp)
10578 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10579 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10580 (s390_process_record): Moved from s390-linux-tdep.c
10581 (s390_gdbarch_init): Adjust.
10582
d6e58945
PR
105832018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10584
10585 * s390-linux-nat.c (s390-tdep.h): New include.
10586 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10587 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10588 (ALLDEPFILES): Add s390-tdep.c.
10589 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10590 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10591 * s390-tdep.h: ...this. New file.
10592 * s390-linux-tdep.c (s390-tdep.h): New include.
10593 (_initialize_s390_tdep): Rename to...
10594 (_initialize_s390_linux_tdep): ...this and adjust.
10595 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10596 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10597 s390-tdep.h.
10598 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10599 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10600 (s390_is_partial_instruction, s390_software_single_step)
10601 (is_non_branch_ril, s390_displaced_step_copy_insn)
10602 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10603 (s390_prologue_data, s390_addr, s390_store, s390_load)
10604 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10605 (s390_register_call_saved, s390_guess_tracepoint_registers)
10606 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10607 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10608 (s390_pseudo_register_name, s390_pseudo_register_type)
10609 (s390_pseudo_register_read, s390_pseudo_register_write)
10610 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10611 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10612 (s390_addr_bits_remove, s390_address_class_type_flags)
10613 (s390_address_class_type_flags_to_name)
10614 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10615 (s390_function_arg_float, s390_function_arg_vector)
10616 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10617 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10618 (s390_frame_align, s390_register_return_value, s390_return_value)
10619 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10620 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10621 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10622 (s390_trad_frame_prev_register, s390_unwind_cache)
10623 (s390_prologue_frame_unwind_cache)
10624 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10625 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10626 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10627 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10628 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10629 (s390_frame_base_address, s390_local_base_address)
10630 (s390_frame_base, s390_gcc_target_options)
10631 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10632 (s390_validate_reg_range, s390_tdesc_valid)
10633 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10634 * s390-tdep.c: ...this. New file.
10635
9c0b896e
PR
106362018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10637
10638 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10639 (s390_process_record, s390_gdbarch_tdep_alloc)
10640 (s390_linux_init_abi_any): Use/set new hook.
10641
7042632b
PR
106422018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10643
10644 * s390-linux-tdep.c (osabi.h): New include.
10645 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10646 (s390_linux_init_abi_any): New functions.
10647 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10648
650f5e13
PR
106492018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10650
10651 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10652 tdesc_has_registers check
10653
47c9317e
PR
106542018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10655
10656 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10657 (s390_validate_reg_range): New macro.
10658 (s390_gdbarch_init): Adjust.
10659
095085d8
PR
106602018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10661
10662 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10663 (s390_gdbarch_tdep_alloc): Adjust.
10664 (s390_gdbarch_init): Adjust.
10665
ab9bcc67
PR
106662018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10667
10668 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10669 <have_tdb>: Change type to bool.
10670 (s390_gdbarch_tdep_alloc): Adjust.
10671 (s390_gdbarch_init): Adjust.
10672
21f6f5ff
PR
106732018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10674
10675 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10676 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10677 (s390_gdbarch_tdep_alloc): New function.
10678 (s390_gdbarch_init): Allocate tdep at start and use its fields
10679 instead of separate variables.
10680
0eb97953
PR
106812018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10682
10683 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10684 when looking for cached gdbarch and add comment for remaining.
10685
5c319bb2
PA
106862018-01-22 Pedro Alves <palves@redhat.com>
10687 Sergio Durigan Junior <sergiodj@redhat.com>
10688
10689 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10690 case.
10691
d65ce302
MR
106922018-01-22 Maciej W. Rozycki <macro@mips.com>
10693
10694 * MAINTAINERS: Update my company e-mail address.
10695
ec7a5fcb
YQ
106962018-01-22 Yao Qi <yao.qi@linaro.org>
10697
10698 * regcache.c (cooked_write_test): New function.
10699 (_initialize_regcache): Register the test.
10700
11f57cb6
YQ
107012018-01-22 Yao Qi <yao.qi@linaro.org>
10702
10703 * ia64-tdep.c (ia64_pseudo_register_read): Call
10704 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10705 * m32c-tdep.c (m32c_cat_read): Likewise.
10706 (m32c_r3r2r1r0_read): Likewise.
10707 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10708 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10709
03f50fc8
YQ
107102018-01-22 Yao Qi <yao.qi@linaro.org>
10711
10712 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10713 method raw_read instead of regcache_raw_read.
10714 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10715 * arm-tdep.c (arm_neon_quad_read): Likewise.
10716 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10717 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10718 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10719 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10720 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10721 (i386_pseudo_register_read_into_value): Likewise.
10722 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10723 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10724 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10725 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10726 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10727 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10728 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10729 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10730 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10731
dc711524
YQ
107322018-01-22 Yao Qi <yao.qi@linaro.org>
10733
10734 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10735 * configure.tgt: Remove target mt.
10736 * mt-tdep.c: Remove.
10737 * regcache.c (cooked_read_test): Remove the check for mt.
10738
3f5a868b
YQ
107392018-01-22 Yao Qi <yao.qi@linaro.org>
10740
10741 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10742 instead of gdbarch_pseudo_register_read_value.
10743
de4cb04a
JB
107442018-01-22 Joel Brobecker <brobecker@adacore.com>
10745
10746 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10747 language is Ada.
10748
a9e40818
JB
107492018-01-22 Joel Brobecker <brobecker@adacore.com>
10750
10751 * linespec.c (create_sals_line_offset): Remove code that preserved
10752 the symtab_and_line's line number.
10753
e707fc44
AB
107542018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10755
10756 * varobj.c (varobj_create): Don't set valid_block when creating a
10757 floating varobj.
10758
03d0bf7b
AB
107592018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10760
10761 * varobj.c (varobj_create): Remove out of date comment.
10762
ae451627
AB
107632018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10764
10765 PR mi/20395
10766 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10767 updating innermost block.
10768 * parse.c (innermost_block_tracker::update): Take extra type
10769 parameter, and check types match before updating innermost block.
10770 (write_dollar_variable): Update innermost block for registers.
10771 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10772 (innermost_block_tracker::innermost_block_tracker): Initialise
10773 m_types member.
10774 (innermost_block_tracker::reset): Take type parameter.
10775 (innermost_block_tracker::update): Take type parameter, and pass
10776 type through as needed.
10777 (innermost_block_tracker::m_types): New member.
10778 * varobj.c (varobj_create): Pass type when reseting innermost
10779 block.
10780
aee1fcdf
AB
107812018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10782
10783 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10784 * ada-lang.c (resolve_subexp): Likewise.
10785 * breakpoint.c (set_breakpoint_condition) Likewise.
10786 (watch_command_1) Likewise.
10787 * c-exp.y (variable): Likewise.
10788 * d-exp.y (PrimaryExpression): Likewise.
10789 * f-exp.y (variable): Likewise.
10790 * go-exp.y (variable): Likewise.
10791 * m2-exp.y (variable): Likewise.
10792 * objfiles.c (objfile::~objfile): Likewise.
10793 * p-exp.y (variable): Likewise.
10794 * parse.c (innermost_block): Change type.
10795 * parser-defs.h (class innermost_block_tracker): New.
10796 (innermost_block): Change to innermost_block_tracker.
10797 * printcmd.c (display_command): Switch to innermost_block API.
10798 (do_one_display): Likewise.
10799 * rust-exp.y (do_one_display): Likewise.
10800 * symfile.c (clear_symtab_users): Likewise.
10801 * varobj.c (varobj_create): Switch to innermost_block API, replace
10802 use of innermost_block with block stored on varobj object.
10803
396af9a1
AB
108042018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10805
10806 * expression.h (innermost_block): Remove declaration.
10807 * varobj.c: Add 'parser-defs.h' include.
10808
fcfcc376
TT
108092018-01-19 Tom Tromey <tom@tromey.com>
10810
10811 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10812 symbols in the static and global blocks.
10813
5a6c3296
JC
108142018-01-19 James Clarke <jrtc27@jrtc27.com>
10815
10816 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10817 gdb_ptrace.h, and move including gdb_wait.h ...
10818 * nat/linux-ptrace.h: ... to here.
10819
bc09b0c1
SM
108202018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10821
10822 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10823 inf_ptrace_detach_success.
10824 (inf_ptrace_detach_success): Add inferior parameter, use it
10825 instead of inferior_ptid, pass it to detach_inferior.
10826 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10827 parameter.
10828 * inferior.c (detach_inferior): Add overload that takes an
10829 inferior object.
10830 * inferior.h (detach_inferior): Likewise.
10831 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10832 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10833 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10834
6e1e1966
SM
108352018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10836
10837 * target.h (struct target_ops) <to_detach>: Add inferior
10838 parameter.
10839 (target_detach): Likewise.
10840 * target.c (dispose_inferior): Pass inferior down.
10841 (target_detach): Pass inferior down. Assert that it is equal to
10842 the current inferior.
10843 * aix-thread.c (aix_thread_detach): Pass inferior down.
10844 * corefile.c (core_file_command): Pass current_inferior() down.
10845 * corelow.c (core_detach): Add inferior parameter.
10846 * darwin-nat.c (darwin_detach): Likewise.
10847 * gnu-nat.c (gnu_detach): Likewise.
10848 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10849 * infcmd.c (detach_command): Pass current_inferior() down to
10850 target_detach.
10851 * infrun.c (follow_fork_inferior): Pass parent_inf to
10852 target_detach.
10853 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10854 target_detach.
10855 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10856 * linux-thread-db.c (thread_db_detach): Likewise.
10857 * nto-procfs.c (procfs_detach): Likewise.
10858 * procfs.c (procfs_detach): Likewise.
10859 * record.c (record_detach): Likewise.
10860 * record.h (struct inferior): Forward-declare.
10861 (record_detach): Add inferior parameter.
10862 * remote-sim.c (gdbsim_detach): Likewise.
10863 * remote.c (remote_detach_1): Likewise.
10864 (remote_detach): Likewise.
10865 (extended_remote_detach): Likewise.
10866 * sol-thread.c (sol_thread_detach): Likewise.
10867 * target-debug.h (target_debug_print_inferior_p): New macro.
10868 * target-delegates.c: Re-generate.
10869 * top.c (kill_or_detach): Pass inferior down to target_detach.
10870 * windows-nat.c (windows_detach): Add inferior parameter.
10871
6bd6f3b6
SM
108722018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10873
10874 * target.h (struct target_ops) <to_detach>: Remove args
10875 parameter.
10876 (target_detach): Likewise.
10877 * target.c (dispose_inferior): Adjust.
10878 (target_detach): Remove args parameter, adjust.
10879 * aix-thread.c (aix_thread_detach): Adjust.
10880 * corefile.c (core_file_command): Adjust.
10881 * corelow.c (core_detach): Adjust.
10882 * darwin-nat.c (darwin_detach): Adjust.
10883 * gnu-nat.c (gnu_detach): Adjust.
10884 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10885 * infcmd.c (detach_command): Adjust
10886 * infrun.c (follow_fork_inferior): Adjust.
10887 (handle_vfork_child_exec_or_exit): Adjust.
10888 * linux-fork.c (linux_fork_detach): Remove args parameter.
10889 * linux-fork.h (linux_fork_detach): Likewise.
10890 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10891 * linux-thread-db.c (thread_db_detach): Likewise.
10892 * nto-procfs.c (procfs_detach): Likewise.
10893 * procfs.c (procfs_detach): Likewise.
10894 (do_detach): Remove signo parameter.
10895 * record.c (record_detach): Remove args parameter.
10896 * record.h (record_detach): Likewise.
10897 * remote-sim.c (gdbsim_detach): Likewise.
10898 * remote.c (remote_detach_1): Likewise.
10899 (remote_detach): Likewise.
10900 (extended_remote_detach): Likewise.
10901 * sol-thread.c (sol_thread_detach): Likewise.
10902 * target-delegates.c: Re-generate.
10903 * top.c (struct qt_args) <args>: Remove field.
10904 (kill_or_detach): Don't pass args.
10905 (quit_force): Don't set args.
10906 * windows-nat.c (windows_detach): Remove args parameter.
10907
88af8ea8
YQ
109082018-01-19 Yao Qi <yao.qi@linaro.org>
10909
10910 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10911 (arm_linux_init_abi): Install it.
10912
dea445b9
YQ
109132018-01-19 Yao Qi <yao.qi@linaro.org>
10914
10915 * osabi.c (gdb_osabi_names): Extend the regexp for
10916 arm-linux-gnueabihf.
10917
4a17f768
YQ
109182018-01-18 Yao Qi <yao.qi@linaro.org>
10919
10920 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10921 m_abbrevs.
10922 (abbrev_table::add_abbrev): Update.
10923 (abbrev_table::lookup_abbrev): Update.
10924
d679c21a
YQ
109252018-01-18 Yao Qi <yao.qi@linaro.org>
10926
10927 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10928
7d937cad
SDJ
109292018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10930
10931 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10932 to "std::string".
10933
9e14690d
TT
109342018-01-17 Tom Tromey <tom@tromey.com>
10935
10936 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10937
50a82047
TT
109382018-01-17 Tom Tromey <tom@tromey.com>
10939
10940 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10941 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10942 (create_array_type_with_stride): Update.
10943 * dwarf2read.c (set_die_type): Update.
10944
c89b44cd
TT
109452018-01-17 Tom Tromey <tom@tromey.com>
10946
10947 * dwarf2read.c (delayed_method_info): Remove typedef.
10948 (dwarf2_cu::method_info): Now a std::vector.
10949 (add_to_method_list): Update.
10950 (free_delayed_list): Remove.
10951 (compute_delayed_physnames): Update.
10952 (process_full_comp_unit, process_full_type_unit): Clear the method
10953 list. Remove cleanups.
10954 (psymtab_include_file_name): Add name_holder parameter. Use
10955 unique_xmalloc_ptr.
10956 (dwarf_decode_lines): Update.
10957
fcd3b13d
SM
109582018-01-17 Tom Tromey <tom@tromey.com>
10959 Simon Marchi <simon.marchi@ericsson.com>
10960
10961 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10962 (dwarf2_per_objfile::free_cached_comp_units)
10963 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10964 (init_cutu_and_read_dies_no_follow): Update.
10965 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10966 (dwarf2_cu::~dwarf2_cu): New.
10967 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10968 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10969
685af9cd
TT
109702018-01-17 Tom Tromey <tom@tromey.com>
10971 Simon Marchi <simon.marchi@ericsson.com>
10972
10973 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10974 (struct die_reader_specs) <abbrev_table>: New member.
10975 (struct abbrev_table): Add constructor.
10976 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10977 <abbrev_obstack>: Now an auto_obstack.
10978 (abbrev_table_up): New typedef.
10979 (init_cu_die_reader): Add abbrev_table parameter.
10980 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10981 Add result_dwo_abbrev_table.
10982 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10983 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10984 Update.
10985 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10986 parameter.
10987 (skip_children): Update.
10988 (abbrev_table::alloc_abbrev): Rename from
10989 abbrev_table_alloc_abbrev.
10990 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10991 (abbrev_table::lookup_abbrev): Rename from
10992 abbrev_table_lookup_abbrev.
10993 (abbrev_table_read_table): Return abbrev_table_up.
10994 (abbrev_table_free, abbrev_table_free_cleanup)
10995 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10996 (load_partial_dies): Update.
10997
5e2db402
TT
109982018-01-17 Tom Tromey <tom@tromey.com>
10999
11000 * dwarf2read.c (dwarf2_compute_name): Update comment.
11001 (read_func_scope, read_variable): Update.
11002 (new_symbol): Remove.
11003 (new_symbol_full): Rename to new_symbol.
11004
ee7f689e 110052018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
11006
11007 PR gdb/16577
11008 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11009 a warning instead of throwing an error, set section size to 0 and return
11010 NULL.
11011 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11012
4d9b86e1
SM
110132018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11014
11015 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11016 std::string.
11017 (linux_ptrace_attach_fail_reason_string): Likewise.
11018 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11019 Likewise.
11020 (linux_ptrace_attach_fail_reason_string): Likewise.
11021 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11022
a7b2d0fb
SM
110232018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11024
11025 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11026
f517c180
EA
110272018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11028
11029 PR gdb/21559
11030 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11031 checking for fs_base/gs_base fields in struct user_regs_struct.
11032 * configure: Regenerate.
11033
7045b1ca
YQ
110342018-01-17 Yao Qi <yao.qi@linaro.org>
11035
11036 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11037 function.
11038 (aarch64_linux_init_abi): Install it to gdbarch hook
11039 gcc_target_options.
11040
db422fb2
PA
110412018-01-15 Pedro Alves <palves@redhat.com>
11042
11043 * common/signals-state-save-restore.c
11044 (save_original_signals_state): Fix typos.
11045
ba643918
SDJ
110462017-01-12 Tom Tromey <tom@tromey.com>
11047 Sergio Durigan Junior <sergiodj@redhat.com>
11048
11049 * Makefile.in (install-only): Install gdb-add-index.
11050
906b4aac
JB
110512018-01-12 John Baldwin <jhb@FreeBSD.org>
11052
11053 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11054
bdf2a94a
AA
110552018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11056
11057 * infrun.c (keep_going_pass_signal): Clear step-over info when
11058 insert_breakpoints fails.
11059
71d378ae
PA
110602018-01-11 Pedro Alves <palves@redhat.com>
11061
11062 PR gdb/22583
11063 * infrun.c (resume): Rename to ...
11064 (resume_1): ... this.
11065 (resume): Reimplement as wrapper around resume_1.
11066
3cada740
PA
110672018-01-11 Pedro Alves <palves@redhat.com>
11068
11069 PR remote/22597
11070 * remote.c (remote_parse_stop_reply): Default to the last-set
11071 general thread instead of to 'magic_null_ptid'.
11072
618daa93
PA
110732018-01-10 Pedro Alves <palves@redhat.com>
11074
11075 * language.h (language_get_symbol_name_matcher): Rename ...
11076 (get_symbol_name_matcher): ... this.
11077 * language.c (language_get_symbol_name_matcher): Ditto.
11078 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11079 callers adjusted.
11080
c63d3e8d
PA
110812018-01-10 Pedro Alves <palves@redhat.com>
11082
11083 PR gdb/22670
11084 * dwarf2read.c
11085 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11086 Adjust to use language_get_symbol_name_matcher instead of
11087 language_defn::la_get_symbol_name_matcher.
11088 * language.c (language_get_symbol_name_matcher): If in Ada mode
11089 and the lookup name is a verbatim match, return Ada's matcher.
11090 * language.h (language_get_symbol_name_matcher): Adjust comment.
11091 (ada_lookup_name_info::verbatim_p):: New method.
11092
d4c2a405
PA
110932018-01-10 Pedro Alves <palves@redhat.com>
11094
11095 PR gdb/22670
11096 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11097 minsym's language is language_auto or language_cplus, pass down
11098 language_ada instead.
11099 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11100
8825213e
PA
111012018-01-10 Pedro Alves <palves@redhat.com>
11102
11103 PR gdb/22670
11104 * minsyms.c (linkage_name_str): New function.
11105 (iterate_over_minimal_symbols): Use it.
11106
2d97a5d9
JB
111072018-01-09 John Baldwin <jhb@FreeBSD.org>
11108
11109 * NEWS: Document that 'info proc' now works on FreeBSD.
11110
92fce24d
JB
111112018-01-09 John Baldwin <jhb@FreeBSD.org>
11112
11113 * configure.ac: Check for kinfo_getfile in libutil.
11114 * configure: Regenerate.
11115 * config.in: Regenerate.
11116 * fbsd-nat.c: Include "fbsd-tdep.h".
11117 (fbsd_fetch_cmdline): New.
11118 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11119 rather than calling error.
11120 (fbsd_info_proc): New.
11121 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11122 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11123 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11124
262f62f5
JB
111252018-01-09 John Baldwin <jhb@FreeBSD.org>
11126
11127 * fbsd-nat.c (struct free_deleter): Remove.
11128 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11129
b999e203
JB
111302018-01-09 John Baldwin <jhb@FreeBSD.org>
11131
11132 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11133 NULL for an empty pathname.
11134
d2176225
JB
111352018-01-09 John Baldwin <jhb@FreeBSD.org>
11136
11137 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11138 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11139 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11140 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11141 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11142 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11143 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11144 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11145 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11146 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11147 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11148 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11149 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11150 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11151 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11152
9c4ac400
ST
111532018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11154
11155 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11156 (gnu_xfer_auxv): New function.
11157 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11158 TARGET_OBJECT_AUXV.
11159
1e5ded6c
YQ
111602018-01-08 Yao Qi <yao.qi@linaro.org>
11161 Simon Marchi <simon.marchi@ericsson.com>
11162
11163 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11164 common/selftest.c.
11165 (COMMON_OBS): Remove selftest.o.
11166 * configure.ac: Append selftest-arch.c and common/selftest.c to
11167 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11168 * configure: Re-generated.
11169 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11170 GDB_SELF_TEST.
11171 (maintenance_info_selftests): Likewise.
11172
04bafb1e
XR
111732018-01-08 Xavier Roirand <roirand@adacore.com>
11174
11175 * ada-valprint.c (val_print_packed_array_elements): Use
11176 proper number of elements when printing an array indexed
11177 by an enumeration type.
11178
518817b3
SM
111792018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11180
11181 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11182 (dw2_get_file_names_reader): Adjust.
11183 (lookup_dwo_signatured_type): Adjust.
11184 (lookup_dwp_signatured_type): Adjust.
11185 (lookup_signatured_type): Adjust.
11186 (create_type_unit_group): Adjust.
11187 (get_type_unit_group): Adjust.
11188 (process_psymtab_comp_unit_reader): Adjust.
11189 (build_type_psymtabs_reader): Adjust.
11190 (scan_partial_symbols): Adjust.
11191 (add_partial_symbol): Adjust.
11192 (add_partial_subprogram): Adjust.
11193 (peek_die_abbrev): Adjust.
11194 (fixup_go_packaging): Adjust.
11195 (process_imported_unit_die): Adjust.
11196 (dwarf2_compute_name): Adjust.
11197 (dwarf2_physname): Adjust.
11198 (read_import_statement): Adjust.
11199 (handle_DW_AT_stmt_list): Adjust.
11200 (read_file_scope): Adjust.
11201 (read_func_scope): Adjust.
11202 (read_lexical_block_scope): Adjust.
11203 (read_call_site_scope): Adjust.
11204 (read_variable): Adjust.
11205 (dwarf2_rnglists_process): Adjust.
11206 (dwarf2_ranges_process): Adjust.
11207 (dwarf2_ranges_read): Adjust.
11208 (dwarf2_get_pc_bounds): Adjust.
11209 (dwarf2_record_block_ranges): Adjust.
11210 (dwarf2_add_field): Adjust.
11211 (dwarf2_add_member_fn): Adjust.
11212 (read_structure_type): Adjust.
11213 (process_structure_scope): Adjust.
11214 (read_enumeration_type): Adjust.
11215 (read_array_type): Adjust.
11216 (mark_common_block_symbol_computed): Adjust.
11217 (read_common_block): Adjust.
11218 (read_namespace_type): Adjust.
11219 (read_namespace): Adjust.
11220 (read_module_type): Adjust.
11221 (read_tag_pointer_type): Adjust.
11222 (read_tag_ptr_to_member_type): Adjust.
11223 (read_tag_string_type): Adjust.
11224 (read_subroutine_type): Adjust.
11225 (read_typedef): Adjust.
11226 (read_base_type): Adjust.
11227 (attr_to_dynamic_prop): Adjust.
11228 (read_subrange_type): Adjust.
11229 (read_unspecified_type): Adjust.
11230 (dwarf2_read_abbrevs): Adjust.
11231 (load_partial_dies): Adjust.
11232 (read_partial_die): Adjust.
11233 (find_partial_die): Adjust.
11234 (guess_partial_die_structure_name): Adjust.
11235 (fixup_partial_die): Adjust.
11236 (read_attribute_value): Adjust.
11237 (read_addr_index): Adjust.
11238 (read_addr_index_from_leb128): Adjust.
11239 (read_str_index): Adjust.
11240 (dwarf2_string_attr): Adjust.
11241 (get_debug_line_section): Adjust.
11242 (dwarf_decode_line_header): Adjust.
11243 (lnp_state_machine::check_line_address): Adjust.
11244 (dwarf_decode_lines_1): Adjust.
11245 (dwarf_decode_lines): Adjust.
11246 (dwarf2_start_symtab): Adjust.
11247 (var_decode_location): Adjust.
11248 (new_symbol_full): Adjust.
11249 (dwarf2_const_value_data): Adjust.
11250 (dwarf2_const_value_attr): Adjust.
11251 (dwarf2_const_value): Adjust.
11252 (die_type): Adjust.
11253 (die_containing_type): Adjust.
11254 (build_error_marker_type): Adjust.
11255 (lookup_die_type): Adjust.
11256 (guess_full_die_structure_name): Adjust.
11257 (anonymous_struct_prefix): Adjust.
11258 (determine_prefix): Adjust.
11259 (dwarf2_name): Adjust.
11260 (follow_die_ref_or_sig): Adjust.
11261 (follow_die_offset): Adjust.
11262 (follow_die_ref): Adjust.
11263 (follow_die_sig_1): Adjust.
11264 (follow_die_sig): Adjust.
11265 (get_signatured_type): Adjust.
11266 (get_DW_AT_signature_type): Adjust.
11267 (decode_locdesc): Adjust.
11268 (dwarf_decode_macros): Adjust.
11269 (cu_debug_loc_section): Adjust.
11270 (fill_in_loclist_baton): Adjust.
11271 (dwarf2_symbol_mark_computed): Adjust.
11272 (init_one_comp_unit): Don't assign
11273 dwarf2_cu::dwarf2_per_objfile.
11274 (set_die_type): Adjust.
11275
ed2dc618
SM
112762018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11277
11278 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11279 <dwarf2_per_objfile>: New field.
11280 (dwarf2_per_objfile): Remove global.
11281 (get_dwarf2_per_objfile): New function.
11282 (set_dwarf2_per_objfile): New function.
11283 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11284 dwarf2_per_objfile.
11285 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11286 (read_abbrev_offset): Likewise.
11287 (read_indirect_string): Likewise.
11288 (read_indirect_line_string): Likewise.
11289 (read_indirect_string_at_offset): Likewise.
11290 (read_indirect_string_from_dwz): Likewise.
11291 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11292 dwarf2_per_objfile.
11293 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11294 (create_all_comp_units): Change objfile parameter to
11295 dwarf2_per_objfile.
11296 (create_all_type_units): Likewise.
11297 (process_queue): Add dwarf2_per_objfile parameter.
11298 (read_and_check_comp_unit_head): Likewise.
11299 (lookup_dwo_unit_in_dwp): Likewise.
11300 (get_dwp_file): Likewise.
11301 (process_cu_includes): Likewise.
11302 (struct free_dwo_file_cleanup_data): New struct.
11303 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11304 set_dwarf2_per_objfile.
11305 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11306 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11307 context, adjust calls.
11308 (dw2_instantiate_symtab): Likewise.
11309 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11310 (dw2_get_cu): Likewise.
11311 (create_cu_from_index_list): Change objfile parameter to
11312 dwarf2_per_objfile.
11313 (create_cus_from_index_list): Get dwarf2_per_objfile from
11314 context, adjust calls.
11315 (create_cus_from_index): Likewise.
11316 (create_signatured_type_table_from_index): Change objfile
11317 parameter to dwarf2_per_objfile.
11318 (create_signatured_type_table_from_debug_names): Change objfile
11319 parameter to dwarf2_per_objfile.
11320 (create_addrmap_from_index): Likewise.
11321 (create_addrmap_from_aranges): Likewise.
11322 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11323 (dw2_setup): Remove.
11324 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11325 context.
11326 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11327 get_dwarf2_per_objfile.
11328 (dw2_forget_cached_source_info): Likewise.
11329 (dw2_map_symtabs_matching_filename): Likewise.
11330 (struct dw2_symtab_iterator) <index>: Remove.
11331 <dwarf2_per_objfile>: New field.
11332 (dw2_symtab_iter_init): Replace index parameter with
11333 dwarf2_per_objfile.
11334 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11335 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11336 (dw2_print_stats): Likewise.
11337 (dw2_dump): Likewise.
11338 (dw2_expand_symtabs_for_function): Likewise.
11339 (dw2_expand_all_symtabs): Likewise.
11340 (dw2_expand_symtabs_with_fullname): Likewise.
11341 (dw2_expand_marked_cus): Replace index and objfile parameters
11342 with dwarf2_per_objfile.
11343 (dw_expand_symtabs_matching_file_matcher): Add
11344 dwarf2_per_objfile parameter and adjust calls.
11345 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11346 adjust calls.
11347 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11348 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11349 adjust calls.
11350 (create_cus_from_debug_names_list): Replace objfile parameter
11351 with dwarf2_per_objfile and adjust calls.
11352 (create_cus_from_debug_names): Likewise.
11353 (dwarf2_read_debug_names): Likewise.
11354 (mapped_debug_names::namei_to_name): Adjust call.
11355 (dw2_debug_names_iterator::next): Likewise.
11356 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11357 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11358 (dw2_debug_names_dump): Likewise.
11359 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11360 (dw2_debug_names_expand_symtabs_matching): Likewise.
11361 (dwarf2_initialize_objfile): Likewise.
11362 (dwarf2_build_psymtabs): Likewise.
11363 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11364 this_cu.
11365 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11366 (read_and_check_comp_unit_head): Likewise.
11367 (read_abbrev_offset): Likewise.
11368 (create_debug_type_hash_table): Likewise.
11369 (create_debug_types_hash_table): Likewise.
11370 (create_all_type_units): Replace objfile parameter with
11371 dwarf2_per_objfile.
11372 (add_type_unit): Add dwarf2_per_objfile parameter.
11373 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11374 with dwarf2_per_objfile.
11375 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11376 (lookup_dwp_signatured_type): Likewise.
11377 (lookup_signatured_type): Likewise.
11378 (read_cutu_die_from_dwo): Likewise.
11379 (init_tu_and_read_dwo_dies): Likewise.
11380 (init_cutu_and_read_dies): Likewise.
11381 (init_cutu_and_read_dies_no_follow): Likewise.
11382 (allocate_type_unit_groups_table): Add objfile parameter.
11383 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11384 (get_type_unit_group): Likewise.
11385 (process_psymtab_comp_unit): Update call.
11386 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11387 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11388 (print_tu_stats): Likewise.
11389 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11390 in void* parameter.
11391 (build_type_psymtabs): Change objfile parameter to
11392 dwarf2_per_objfile.
11393 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11394 passed in void* parameter.
11395 (process_skeletonless_type_units): Change objfile parameter to
11396 dwarf2_per_objfile.
11397 (set_partial_user): Likewise.
11398 (dwarf2_build_psymtabs_hard): Likewise.
11399 (read_comp_units_from_section): Likewise.
11400 (create_all_comp_units): Likewise.
11401 (scan_partial_symbols): Update calls.
11402 (add_partial_symbol): Likewise.
11403 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11404 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11405 (process_queue): Add dwarf2_per_objfile parameter.
11406 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11407 (compute_compunit_symtab_includes): Likewise.
11408 (process_cu_includes): Add dwarf2_per_objfile parameter.
11409 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11410 (process_full_type_unit): Likewise.
11411 (process_imported_unit_die): Update call.
11412 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11413 (read_file_scope): Likewise.
11414 (allocate_dwo_file_hash_table): Add objfile parameter.
11415 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11416 (create_cus_hash_table): Likewise.
11417 (create_dwp_hash_table): Likewise.
11418 (create_dwo_unit_in_dwp_v1): Likewise.
11419 (create_dwp_v2_section): Likewise.
11420 (create_dwo_unit_in_dwp_v2): Likewise.
11421 (lookup_dwo_unit_in_dwp): Likewise.
11422 (try_open_dwop_file): Likewise.
11423 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11424 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11425 cleanup to include a reference to dwarf2_per_objfile.
11426 (open_dwp_file): Add dwarf2_per_objfile parameter.
11427 (open_and_init_dwp_file): Likewise.
11428 (get_dwp_file): Likewise.
11429 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11430 (queue_and_load_all_dwo_tus): Update call.
11431 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11432 data.
11433 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11434 (dwarf2_ranges_process): Likewise.
11435 (dwarf2_get_pc_bounds): Likewise.
11436 (mark_common_block_symbol_computed): Likewise.
11437 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11438 (dwarf2_read_abbrevs): Update call.
11439 (read_partial_die): Use dwarf2_per_objfile from cu.
11440 (find_partial_die): Likewise.
11441 (fixup_partial_die): Likewise.
11442 (read_attribute_value): Likewise.
11443 (read_indirect_string_at_offset_from): Add objfile parameter.
11444 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11445 parameter.
11446 (read_indirect_string_from_dwz): Add objfile parameter.
11447 (read_indirect_string): Add objfile parameter.
11448 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11449 (read_addr_index): Use dwarf2_per_objfile from cu.
11450 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11451 call dw2_setup.
11452 (read_str_index): Use dwarf2_per_objfile from cu.
11453 (get_debug_line_section): Likewise.
11454 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11455 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11456 (new_symbol_full): Use dwarf2_per_objfile from cu.
11457 (build_error_marker_type): Likewise.
11458 (lookup_die_type): Likewise.
11459 (determine_prefix): Likewise.
11460 (follow_die_offset): Likewise.
11461 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11462 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11463 (dwarf2_fetch_die_type_sect_off): Likewise.
11464 (dwarf2_get_die_type): Likewise.
11465 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11466 (get_signatured_type): Likewise.
11467 (get_DW_AT_signature_type): Likewise.
11468 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11469 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11470 (cu_debug_loc_section): Likewise.
11471 (fill_in_loclist_baton): Likewise.
11472 (dwarf2_symbol_mark_computed): Likewise.
11473 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11474 dwarf2_per_objfile.
11475 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11476 parameter.
11477 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11478 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11479 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11480 (set_die_type): Use dwarf2_free_objfile from cu.
11481 (get_die_type_at_offset): Likewise.
11482 (dwarf2_per_objfile_free): Don't assign global variable.
11483 (debug_names) <constructor>: Add dwarf2_per_objfile
11484 parameter, update m_debugstrlookup construction.
11485 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11486 parameter.
11487 <m_dwarf2_per_objfile>: New field.
11488 <lookup>: Use m_dwarf2_per_objfile.
11489 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11490 (psyms_seen_size): Likewise.
11491 (write_gdbindex): Replace objfile parameter with
11492 dwarf2_per_objfile.
11493 (write_debug_names): Likewise.
11494 (write_psymtabs_to_index): Likewise.
11495 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11496 calls.
11497
e3b94546
SM
114982018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11499
11500 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11501 <dwarf2_per_objfile>: New field.
11502 (struct dwarf2_per_cu_data) <objfile>: Remove.
11503 <dwarf2_per_objfile>: New field.
11504 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11505 of objfile.
11506 (create_signatured_type_table_from_index): Likewise.
11507 (create_debug_type_hash_table): Likewise.
11508 (fill_in_sig_entry_from_dwo_entry): Likewise.
11509 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11510 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11511 objfile.
11512 (create_partial_symtab): Access objfile through
11513 dwarf2_per_objfile.
11514 (process_psymtab_comp_unit_reader): Likewise.
11515 (read_comp_units_from_section): Likewise.
11516 (scan_partial_symbols): Likewise.
11517 (add_partial_symbol): Likewise.
11518 (add_partial_subprogram): Likewise.
11519 (peek_die_abbrev): Likewise.
11520 (fixup_go_packaging): Likewise.
11521 (process_full_comp_unit): Likewise.
11522 (process_full_type_unit): Likewise.
11523 (process_imported_unit_die): Likewise.
11524 (dwarf2_compute_name): Likewise.
11525 (dwarf2_physname): Likewise.
11526 (read_import_statement): Likewise.
11527 (create_cus_hash_table): Assign dwarf2_physname instead of
11528 objfile.
11529 (read_func_scope): Access objfile through dwarf2_per_objfile.
11530 (read_lexical_block_scope): Likewise.
11531 (read_call_site_scope): Likewise.
11532 (read_variable): Likewise.
11533 (dwarf2_rnglists_process): Likewise.
11534 (dwarf2_ranges_process): Likewise.
11535 (dwarf2_ranges_read): Likewise.
11536 (dwarf2_record_block_ranges): Likewise.
11537 (dwarf2_add_field): Likewise.
11538 (dwarf2_add_member_fn): Likewise.
11539 (read_structure_type): Likewise.
11540 (process_structure_scope): Likewise.
11541 (read_enumeration_type): Likewise.
11542 (read_array_type): Likewise.
11543 (read_common_block): Likewise.
11544 (read_namespace_type): Likewise.
11545 (read_namespace): Likewise.
11546 (read_module_type): Likewise.
11547 (read_tag_pointer_type): Likewise.
11548 (read_tag_ptr_to_member_type): Likewise.
11549 (read_tag_string_type): Likewise.
11550 (read_subroutine_type): Likewise.
11551 (read_typedef): Likewise.
11552 (read_base_type): Likewise.
11553 (attr_to_dynamic_prop): Likewise.
11554 (read_subrange_type): Likewise.
11555 (read_unspecified_type): Likewise.
11556 (load_partial_dies): Likewise.
11557 (read_partial_die): Likewise.
11558 (find_partial_die): Likewise.
11559 (guess_partial_die_structure_name): Likewise.
11560 (fixup_partial_die): Likewise.
11561 (read_attribute_value): Likewise.
11562 (read_addr_index_from_leb128): Likewise.
11563 (dwarf2_read_addr_index): Likewise.
11564 (dwarf2_string_attr): Likewise.
11565 (lnp_state_machine::check_line_address): Likewise.
11566 (dwarf_decode_lines_1): Likewise.
11567 (dwarf_decode_lines): Likewise.
11568 (dwarf2_start_symtab): Likewise.
11569 (var_decode_location): Likewise.
11570 (new_symbol_full): Likewise.
11571 (dwarf2_const_value_data): Likewise.
11572 (dwarf2_const_value_attr): Likewise.
11573 (dwarf2_const_value): Likewise.
11574 (die_type): Likewise.
11575 (die_containing_type): Likewise.
11576 (lookup_die_type): Likewise.
11577 (guess_full_die_structure_name): Likewise.
11578 (anonymous_struct_prefix): Likewise.
11579 (dwarf2_name): Likewise.
11580 (follow_die_ref_or_sig): Likewise.
11581 (follow_die_offset): Likewise.
11582 (follow_die_ref): Likewise.
11583 (dwarf2_fetch_die_loc_sect_off): Likewise.
11584 (dwarf2_fetch_constant_bytes): Likewise.
11585 (dwarf2_fetch_die_type_sect_off): Likewise.
11586 (dwarf2_get_die_type): Likewise.
11587 (follow_die_sig): Likewise.
11588 (decode_locdesc): Likewise.
11589 (dwarf2_per_cu_objfile): Likewise.
11590 (dwarf2_per_cu_text_offset): Likewise.
11591 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11592 objfile.
11593 (set_die_type): Access objfile through
11594 dwarf2_per_objfile.
11595
b01ba14d
SM
115962018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11597
11598 * valprint.c (converted_character_d): Remove typedef.
11599 (DEF_VEC_O (converted_character_d)): Remove.
11600 (count_next_character): Use std::vector.
11601 (print_converted_chars_to_obstack): Likewise.
11602 (generic_printstr): Likewise.
11603
4d0fdd9b
SM
116042018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11605
11606 * xml-support.h (struct gdb_xml_value): Add constructor.
11607 <value>: Change type to unique_xmalloc_ptr.
11608 (gdb_xml_value_s): Remove typedef.
11609 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11610 (gdb_xml_element_start_handler): Change parameter type to
11611 std::vector.
11612 (xml_find_attribute): Likewise.
11613 * xml-support.c (xml_find_attribute): Change parameter type to
11614 std::vector and adjust.
11615 (gdb_xml_values_cleanup): Remove.
11616 (gdb_xml_parser::start_element): Adjust to std::vector.
11617 (xinclude_start_include): Change paraeter type to std::vector
11618 and adjust.
11619 * btrace.c (check_xml_btrace_version): Likewise.
11620 (parse_xml_btrace_block): Likewise.
11621 (parse_xml_btrace_pt_config_cpu): Likewise.
11622 (parse_xml_btrace_pt): Likewise.
11623 (parse_xml_btrace_conf_bts): Likewise.
11624 (parse_xml_btrace_conf_pt): Likewise.
11625 * memory-map.c (memory_map_start_memory): Likewise.
11626 (memory_map_start_property): Likewise.
11627 * osdata.c (osdata_start_osdata): Likewise.
11628 (osdata_start_item): Likewise.
11629 (osdata_start_column): Likewise.
11630 * remote.c (start_thread): Likewise.
11631 * solib-aix.c (library_list_start_library): Likewise.
11632 (library_list_start_list): Likewise.
11633 * solib-svr4.c (library_list_start_library): Likewise.
11634 (svr4_library_list_start_list): Likewise.
11635 * solib-target.c (library_list_start_segment): Likewise.
11636 (library_list_start_section): Likewise.
11637 (library_list_start_library): Likewise.
11638 (library_list_start_list): Likewise.
11639 * tracepoint.c (traceframe_info_start_memory): Likewise.
11640 (traceframe_info_start_tvar): Likewise.
11641 * xml-syscall.c (syscall_start_syscall): Likewise.
11642 * xml-tdesc.c (tdesc_start_target): Likewise.
11643 (tdesc_start_feature): Likewise.
11644 (tdesc_start_reg): Likewise.
11645 (tdesc_start_union): Likewise.
11646 (tdesc_start_struct): Likewise.
11647 (tdesc_start_flags): Likewise.
11648 (tdesc_start_enum): Likewise.
11649 (tdesc_start_field): Likewise.
11650 (tdesc_start_enum_value): Likewise.
11651 (tdesc_start_vector): Likewise.
11652
f979c73f
SM
116532018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11654
11655 * extension.h (struct xmethod_worker) <clone>: Remove.
11656 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11657 Remove.
11658 (python_xmethod_worker::clone): Remove.
11659 * valops.c (find_overload_match): Use std::move instead of
11660 clone.
11661
ba18742c
SM
116622018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11663
11664 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11665 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11666 <free_xmethod_worker_data>: Remove.
11667 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11668 <get_xmethod_arg_types>: Remove.
11669 <get_xmethod_result_type>: Remove.
11670 <invoke_xmethod>: Remove.
11671 * extension.c (new_xmethod_worker): Remove.
11672 (clone_xmethod_worker): Remove.
11673 (get_matching_xmethod_workers): Return void, pass std::vector by
11674 pointer.
11675 (get_xmethod_arg_types): Rename to...
11676 (xmethod_worker::get_arg_types): ... this, and adjust.
11677 (get_xmethod_result_type): Rename to...
11678 (xmethod_worker::get_result_type): ... this, and adjust.
11679 (invoke_xmethod): Remove.
11680 (free_xmethod_worker): Remove.
11681 (free_xmethod_worker_vec): Remove.
11682 * extension.h (enum ext_lang_rc): Move here from
11683 extension-priv.h.
11684 (struct xmethod_worker): Add constructor and destructor.
11685 <data>: Remove.
11686 <value>: Remove.
11687 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11688 virtual pure methods.
11689 <get_arg_types, get_result_type>: New methods.
11690 (xmethod_worker_ptr): Remove typedef.
11691 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11692 (xmethod_worker_vec): Remove typedef.
11693 (xmethod_worker_up): New typedef.
11694 (invoke_xmethod): Remove.
11695 (clone_xmethod_worker): Remove.
11696 (free_xmethod_worker): Remove.
11697 (free_xmethod_worker_vec): Remove.
11698 (get_xmethod_arg_types): Remove.
11699 (get_xmethod_result_type): Remove.
11700 * valops.c (find_method_list): Use std::vector, don't use
11701 intermediate vector.
11702 (value_find_oload_method_list): Use std::vector.
11703 (find_overload_match): Use std::vector.
11704 (find_oload_champ): Use std::vector.
11705 * value.c (value_free): Use operator delete.
11706 (value_of_xmethod): Rename to...
11707 (value_from_xmethod): ... this. Don't assign
11708 xmethod_worker::value, take rvalue-reference.
11709 (result_type_of_xmethod): Adjust.
11710 (call_xmethod): Adjust.
11711 * value.h: Include extension.h.
11712 (struct xmethod_worker): Don't forward-declare.
11713 (value_of_xmethod): Rename to...
11714 (value_from_xmethod): ... this, take rvalue-reference.
11715 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11716 (struct python_xmethod_worker): ... this, add constructor and
11717 destructor.
11718 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11719 (gdbpy_free_xmethod_worker_data): Rename to...
11720 (python_xmethod_worker::~python_xmethod_worker): ... this and
11721 adjust.
11722 (gdbpy_clone_xmethod_worker_data): Rename to...
11723 (python_xmethod_worker::clone): ... this and adjust.
11724 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11725 temporary vector.
11726 (gdbpy_get_xmethod_arg_types): Rename to...
11727 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11728 (gdbpy_get_xmethod_result_type): Rename to...
11729 (python_xmethod_worker::do_get_result_type): ... this and
11730 adjust.
11731 (gdbpy_invoke_xmethod): Rename to...
11732 (python_xmethod_worker::invoke): ... this and adjust.
11733 (new_python_xmethod_worker): Rename to...
11734 (python_xmethod_worker::python_xmethod_worker): ... this and
11735 adjust.
11736 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11737 Remove.
11738 (gdbpy_free_xmethod_worker_data): Remove.
11739 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11740 (gdbpy_get_xmethod_arg_types): Remove.
11741 (gdbpy_get_xmethod_result_type): Remove.
11742 (gdbpy_invoke_xmethod): Remove.
11743 * python/python.c (python_extension_ops): Remove obsolete
11744 callbacks.
11745
e379cee6
PA
117462018-01-05 Pedro Alves <palves@redhat.com>
11747
11748 PR gdb/18653
11749 * common/signals-state-save-restore.c
11750 (save_original_signals_state): New parameter 'quiet'. Warn if we
11751 find a custom handler preinstalled, instead of internal erroring.
11752 But only warn if !quiet.
11753 * common/signals-state-save-restore.h
11754 (save_original_signals_state): New parameter 'quiet'.
11755 * main.c (captured_main_1): Move save_original_signals_state call
11756 after option handling, and pass QUIET.
11757
a655456c
PA
117582018-01-05 Pedro Alves <palves@redhat.com>
11759
11760 * spu-tdep.c (spu_catch_start): Pass
11761 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11762
de63c46b
PA
117632018-01-05 Pedro Alves <palves@redhat.com>
11764
11765 PR gdb/22670
11766 * ada-lang.c (literal_symbol_name_matcher): New function.
11767 (ada_get_symbol_name_matcher): Use it for
11768 symbol_name_match_type::SEARCH_NAME.
11769 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11770 it down instead of assuming symbol_name_match_type::FULL.
11771 * block.h (block_lookup_symbol): New parameter 'match_type'.
11772 * c-valprint.c (print_unpacked_pointer): Use
11773 lookup_symbol_search_name instead of lookup_symbol.
11774 * compile/compile-object-load.c (get_out_value_type): Pass down
11775 symbol_name_match_type::SEARCH_NAME.
11776 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11777 symbol_name_match_type::FULL.
11778 * cp-support.c (cp_get_symbol_name_matcher): Handle
11779 symbol_name_match_type::SEARCH_NAME.
11780 * infrun.c (insert_exception_resume_breakpoint): Use
11781 lookup_symbol_search_name.
11782 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11783 * psymtab.c (maintenance_check_psymtabs): Use
11784 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11785 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11786 SYMBOL_SEARCH_NAME.
11787 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11788 if symbol_name_match_type::SEARCH_NAME.
11789 (lookup_symbol_in_language): Pass down
11790 symbol_name_match_type::FULL.
11791 (lookup_symbol_search_name): New.
11792 (lookup_language_this): Pass down
11793 symbol_name_match_type::SEARCH_NAME.
11794 (lookup_symbol_aux, lookup_local_symbol): New parameter
11795 'match_type'. Pass it down.
11796 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11797 (lookup_symbol_search_name): New declaration.
11798 (lookup_symbol_in_block): New 'match_type' parameter.
11799
f98fc17b
PA
118002018-01-05 Pedro Alves <palves@redhat.com>
11801
11802 PR gdb/22670
11803 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11804 ada_lookup_symbol.
11805 (ada_lookup_symbol): Reimplement in terms of
11806 ada_lookup_symbol_list, bits factored out from
11807 ada_lookup_encoded_symbol.
11808
342f8240
JB
118092018-01-05 Joel Brobecker <brobecker@adacore.com>
11810
11811 * ada-exp.y (write_object_renaming): When subscripting an array
11812 using a symbol as the index, pass the block in call to
11813 ada_lookup_encoded_symbol when looking that symbol up.
11814
7150d33c
JG
118152018-01-05 Jerome Guitton <guitton@adacore.com>
11816
11817 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11818 TYPE_INDEX_TYPE.
11819
cc0e770c
JB
118202018-01-05 Joel Brobecker <brobecker@adacore.com>
11821
11822 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11823 the case where VALUE_LVAL (val0) is not lval_memory.
11824
f79da888 118252018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
11826
11827 * ada-valprint.c (print_optional_low_bound): Handle
11828 character-indexed array printing like boolean-indexed array
11829 printing.
11830
cd385f94
JB
118312018-01-05 Joel Brobecker <brobecker@adacore.com>
11832
11833 * NEWS: Create a new section for the next release branch.
11834 Rename the section of the current branch, now that it has
11835 been cut.
11836
09aca949
JB
118372018-01-05 Joel Brobecker <brobecker@adacore.com>
11838
11839 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11840 * version.in: Bump version to 8.1.50.DATE-git.
11841
9f757bf7
XR
118422018-01-03 Xavier Roirand <roirand@adacore.com>
11843
11844 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11845 Add field.
11846 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11847 Add field.
11848 (default_exception_support_info) <catch_handlers_sym>: Add field.
11849 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11850 (ada_exception_name_addr_1): Add "catch handlers" handling.
11851 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11852 Update all callers.
11853 (create_excep_cond_exprs) <ex>: Add parameter.
11854 (re_set_exception): Update create_excep_cond_exprs call.
11855 (print_it_exception, print_one_exception, print_mention_exception)
11856 (print_recreate_exception): Add "catch handler" handling.
11857 (allocate_location_catch_handlers, re_set_catch_handlers)
11858 (check_status_catch_handlers, print_it_catch_handlers)
11859 (print_one_catch_handlers, print_mention_catch_handlers)
11860 (print_recreate_catch_handlers): New function.
11861 (catch_handlers_breakpoint_ops): New variable.
11862 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11863 Add parameter. Add "catch handler" handling.
11864 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11865 Add "catch handler" handling.
11866 (ada_exception_catchpoint_cond_string): Add "catch handler"
11867 handling.
11868 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11869 call.
11870 (catch_ada_handlers_command): New function.
11871 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11872 operations structure.
11873 (_initialize_ada_language): Add "catch handlers" command entry.
11874 * NEWS: Document "catch handlers" feature.
11875
9fe561ab
JB
118762018-01-02 Joel Brobecker <brobecker@adacore.com>
11877
11878 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11879 account when creating the array type of the slice.
11880 (ada_value_slice): Likewise.
11881
a405673c
JB
118822018-01-02 Joel Brobecker <brobecker@adacore.com>
11883
11884 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11885 New enum value.
11886 (create_array_type_with_stride): Add byte_stride_prop parameter.
11887 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11888 New parameter. Update all callers in this file.
11889 (array_type_has_dynamic_stride): New function.
11890 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11891 of arrays with dynamic byte strides.
11892 * dwarf2read.c (read_array_type): Add support for dynamic
11893 DW_AT_byte_stride attributes.
11894
74a2f8ff
JB
118952018-01-02 Joel Brobecker <brobecker@adacore.com>
11896
11897 * dwarf2read.c (read_unspecified_type): Treat
11898 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11899
e2882c85
JB
119002018-01-01 Joel Brobecker <brobecker@adacore.com>
11901
11902 Update copyright year range in all GDB files.
11903
1690bb24
JB
119042018-01-01 Joel Brobecker <brobecker@adacore.com>
11905
11906 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11907 and gdb/testsuite/gdb.base/step-line.c.
11908
0f0c98a8
JB
119092018-01-01 Joel Brobecker <brobecker@adacore.com>
11910
11911 * copyright.py (main): Dump the contents of
11912 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11913 even if BY_HAND is empty.
11914
82e1e79a
JB
119152018-01-01 Joel Brobecker <brobecker@adacore.com>
11916
11917 * top.c (print_gdb_version): Update Copyright year in version
11918 message.
11919
053f54e5 119202018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 11921
053f54e5 11922 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 11923
053f54e5 11924For older changes see ChangeLog-2017.
c906108c
SS
11925\f
11926Local Variables:
11927mode: change-log
11928left-margin: 8
11929fill-column: 74
11930version-control: never
57da7796 11931coding: utf-8
c906108c 11932End:
This page took 2.729459 seconds and 4 git commands to generate.