Change ada_catchpoint::excep_string to be a std::string
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
bc18fbb5
TT
12018-05-21 Tom Tromey <tom@tromey.com>
2
3 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5 * ada-lang.h (create_ada_exception_catchpoint): Update.
6 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7 std::string.
8 (create_excep_cond_exprs, ~ada_catchpoint)
9 (should_stop_exception, print_one_exception)
10 (print_mention_exception, print_recreate_exception): Update.
11 (ada_get_next_arg): Remove.
12 (catch_ada_exception_command_split): Use std::string. Change type
13 of "excep_string", "cond_string".
14 (catch_ada_exception_command): Update.
15 (create_ada_exception_catchpoint): Change type of excep_string.
16 (ada_exception_sal): Remove excep_string parameter.
17 (~ada_catchpoint): Remove.
18
790217f6
TT
192018-05-21 Tom Tromey <tom@tromey.com>
20
21 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
22 cleanup.
23
6f46ac85
TT
242018-05-21 Tom Tromey <tom@tromey.com>
25
26 * ada-lang.c (ada_exception_message_1, ada_exception_message):
27 Return unique_xmalloc_ptr.
28 (print_it_exception): Update.
29
15b6611c
TT
302018-05-21 Tom Tromey <tom@tromey.com>
31
32 * tracepoint.c (trace_dump_actions): Use std::string.
33
c0c9f665
TT
342018-05-21 Tom Tromey <tom@tromey.com>
35
36 * symfile.c (reread_symbols): Use std::string for original_name.
37
22ca247e
TT
382018-05-21 Tom Tromey <tom@tromey.com>
39
40 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
41 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
42 constructor.
43
184cde75
SM
442018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
45
46 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
47 instance to...
48 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
49 * objfiles.c (get_objfile_bfd_data): Allocate
50 objfile_per_bfd_storage with obstack_new when allocating on
51 obstack.
52
e39db4db
SM
532018-05-20 Simon Marchi <simon.marchi@ericsson.com>
54
55 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
56 OBSTACK_ZALLOC.
57 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
58 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
59 * mdebugread.c (mdebug_build_psymtabs): Likewise.
60 (add_pending): Likewise.
61 (parse_symbol): Likewise.
62 (parse_partial_symbols): Likewise.
63 (psymtab_to_symtab_1): Likewise.
64 (new_psymtab): Likewise.
65 (elfmdebug_build_psymtabs): Likewise.
66 * minsyms.c (terminate_minimal_symbol_table): Likewise.
67 * objfiles.c (get_objfile_bfd_data): Likewise.
68 (objfile_register_static_link): Likewise.
69 * psymtab.c (allocate_psymtab): Likewise.
70 * stabsread.c (read_member_functions): Likewise.
71 * xcoffread.c (xcoff_end_psymtab): Likewise.
72
284a0e3c
SM
732018-05-20 Simon Marchi <simon.marchi@ericsson.com>
74
75 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
76 compiler supports std::is_trivially_constructible.
77 * common/poison.h: Include obstack.h.
78 (IsMallocable): Define to is_trivially_constructible if the
79 compiler supports it, define to true_type otherwise.
80 (xobnew): New.
81 (XOBNEW): Redefine.
82 (xobnewvec): New.
83 (XOBNEWVEC): Redefine.
84 * gdb_obstack.h (obstack_zalloc): New.
85 (OBSTACK_ZALLOC): Redefine.
86 (obstack_calloc): New.
87 (OBSTACK_CALLOC): Redefine.
88 (obstack_new): New.
89 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
90 (gdbarch_obstack): New declaration in gdbarch.h, definition in
91 gdbarch.c.
92 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
93 obstack_calloc/obstack_zalloc.
94 (gdbarch_obstack_zalloc): Remove.
95 * target-descriptions.c (tdesc_data_init): Use obstack_new.
96
59f66be3
PW
972018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
98
99 * stack.c (backtrace_command_1): Remove useless variable int i.
100
50c65c2d
PW
1012018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
102
103 * stack.c (print_frame_info): Fix comment.
104
7ff8cb8c
TT
1052018-05-18 Tom Tromey <tom@tromey.com>
106
107 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
108 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
109 (~dwarf2_per_objfile): Update
110 (dwarf2_get_dwz_file): Use new.
111 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
112 unique_ptr.
113
400174b1
TT
1142018-05-18 Tom Tromey <tom@tromey.com>
115
116 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
117 unique_ptr.
118 * dwarf2read.c (struct dwp_file): Add constructor and
119 initializers.
120 (open_and_init_dwp_file): Return a unique_ptr.
121 (dwarf2_per_objfile, create_dwp_hash_table)
122 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
123 (lookup_dwo_unit_in_dwp): Update.
124 (open_and_init_dwp_file, get_dwp_file): Update.
125
3063847f
TT
1262018-05-18 Tom Tromey <tom@tromey.com>
127
128 * dwarf2read.c (dwarf2_per_objfile): Update.
129 (struct mapped_index): Add initializers.
130 (dwarf2_read_index): Use new.
131 (dw2_symtab_iter_init): Update.
132 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
133 unique_ptr.
134
d3d02dee
SM
1352018-05-18 Simon Marchi <simon.marchi@ericsson.com>
136
137 * dwarf2read.c (mapped_index) <total_size>: Remove.
138
1d143c36
SM
1392018-05-18 Simon Marchi <simon.marchi@ericsson.com>
140
141 * unittests/format_pieces-selftests.c (test_format_specifier):
142 Add ARI comments.
143
ce1e8424
TT
1442018-05-18 Tom Tromey <tom@tromey.com>
145
146 * c-typeprint.c (maybe_print_hole): New function.
147 (c_print_type_struct_field_offset): Update.
148 (c_type_print_base_struct_union): Call maybe_print_hole.
149
ddfe970e
KS
1502018-05-17 Keith Seitz <keiths@redhat.com>
151
152 * breakpoint.c (build_bpstat_chain): New function, moved from
153 bpstat_stop_status.
154 (bpstat_stop_status): Add optional parameter, `stop_chain'.
155 If no stop chain is passed, call build_bpstat_chain to build it.
156 * breakpoint.h (build_bpstat_chain): Declare.
157 (bpstat_stop_status): Move documentation here from breakpoint.c.
158 * infrun.c (handle_signal_stop): Before eliding inlined frames,
159 build the stop chain and pass it to skip_inline_frames.
160 Pass this stop chain to bpstat_stop_status.
161 * inline-frame.c: Include breakpoint.h.
162 (stopped_by_user_bp_inline_frame): New function.
163 (skip_inline_frames): Add parameter `stop_chain'.
164 Move documention to inline-frame.h.
165 If non-NULL, use stopped_by_user_bp_inline_frame to determine
166 whether the frame should be elided.
167 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
168 Add moved documentation and update for new parameter.
169
b17992c1
SM
1702018-05-17 Simon Marchi <simon.marchi@ericsson.com>
171
172 PR cli/14975
173 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
174 unittests/format_pieces-selftests.c.
175 * common/format.h (format_piece) <operator==>: New.
176 (format_pieces) <operator[]>: Remove.
177 * common/format.c (format_pieces::format_pieces): Handle \e.
178 * unittests/format_pieces-selftests.c: New.
179
58f0c718
TT
1802018-05-17 Tom Tromey <tom@tromey.com>
181
182 PR symtab/23010:
183 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
184 (dw2_instantiate_symtab): Add skip_partial parameter.
185 (dw2_find_last_source_symtab, dw2_map_expand_apply)
186 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
187 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
188 (dw2_expand_symtabs_matching_one)
189 (dw2_find_pc_sect_compunit_symtab)
190 (dw2_debug_names_lookup_symbol)
191 (dw2_debug_names_expand_symtabs_for_function): Update.
192 (init_cutu_and_read_dies): Add skip_partial parameter.
193 (process_psymtab_comp_unit, build_type_psymtabs_1)
194 (process_skeletonless_type_unit, load_partial_comp_unit)
195 (psymtab_to_symtab_1): Update.
196 (load_full_comp_unit): Add skip_partial parameter.
197 (process_imported_unit_die, dwarf2_read_addr_index)
198 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
199 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
200 (read_signatured_type): Update.
201
3e618834
SM
2022018-05-17 Simon Marchi <simon.marchi@ericsson.com>
203
204 * value.c (release_value): Remove unused variable.
205 (record_latest_value): Likewise.
206 (access_value_history): Likewise.
207 (preserve_values): Likewise.
208
fe10fe31
TT
2092018-05-17 Tom Tromey <tom@tromey.com>
210
211 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
212 Initialize.
213
1d761124
MR
2142018-05-16 Maciej W. Rozycki <macro@mips.com>
215
216 PR gdb/22286
217 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
218 Also handle registers whose width is not a multiple of
219 PTRACE_TYPE_RET.
220 (linux_nat_trad_target::store_register): Likewise.
221
06333fea
TT
2222018-05-16 Tom Tromey <tom@tromey.com>
223
224 * gdbcore.h (core_bfd): Redefine.
225 * corelow.c (core_target::close): Update.
226 (core_target_open): Update.
227 * progspace.h (struct program_space) <cbfd>: Now a
228 gdb_bfd_ref_ptr.
229
921222e2
TT
2302018-05-16 Tom Tromey <tom@tromey.com>
231
232 PR cli/19551:
233 * symfile-add-flags.h (enum symfile_add_flags)
234 <SYMFILE_NOT_FILENAME>: New constant.
235 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
236 objfile name from BFD.
237 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
238 * minidebug.c (find_separate_debug_file_in_section): Put
239 ".gnu_debugdata" into BFD's file name.
240
3acb7083
SM
2412018-05-16 Simon Marchi <simon.marchi@ericsson.com>
242
243 * regcache.c (regcache_read_ftype, regcache_write_ftype):
244 Remove.
245
561a72d4
TC
2462018-05-15 Tamar Christina <tamar.christina@arm.com>
247
248 PR binutils/21446
249 * aarch64-tdep.c (aarch64_analyze_prologue,
250 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
251 Indicate not interested in errors.
252
4e6ff0e1
MR
2532018-05-15 Maciej W. Rozycki <macro@mips.com>
254
255 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
256 Supply the MIPS_ZERO_REGNUM register.
257
ea33cd92
MR
2582018-05-15 Maciej W. Rozycki <macro@mips.com>
259
260 * mips-tdep.c (mask_address_var): Make variable static.
261
2d79090e
TT
2622018-05-14 Tom Tromey <tom@tromey.com>
263
264 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
265
cf4912ae
AB
2662018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
267
268 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
269 FXSAVE_ADDR for the mxcsr register.
270
67e6f569
MF
2712018-05-11 Max Filippov <jcmvbkbc@gmail.com>
272
273 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
274
15244507
PA
2752018-05-11 Pedro Alves <palves@redhat.com>
276
277 * corelow.c (core_target) <core_target>: No longer inline.
278 Initialize m_core_gdbarch, m_core_vec and build the section table
279 here.
280 <~core_target>: New.
281 <core_gdbarch, get_core_register_section>: New methods.
282 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
283 factored out from ...
284 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
285 (core_ops): Delete.
286 (sniff_core_bfd): Add gdbarch parameter.
287 (core_close): Delete, merged into ...
288 (core_target::close): ... here. Delete self.
289 (core_close_cleanup): Delete.
290 (core_target_open): Allocate a core_target on the heap. Use a
291 unique_ptr instead of a cleanup. Bits moved into the core_target
292 ctor. Adjust to use core_target methods instead of globals.
293 (get_core_register_section): Rename to ...
294 (core_target::get_core_register_section): ... this and adjust.
295 (struct get_core_registers_cb_data): New.
296 (get_core_registers_cb): Use it. Use bool.
297 (core_target::fetch_registers, core_target::files_info)
298 (core_target::xfer_partial, core_target::read_description)
299 (core_target::pid_to, core_target::thread_name): Adjust to
300 reference class fields instead of globals.
301 * target.h (struct target_ops_deleter, target_ops_up): New.
302
451953fa
PA
3032018-05-11 Pedro Alves <palves@redhat.com>
304
305 * corefile.c (core_file_command): Move to corelow.c.
306 * corelow.c (the_core_target): Delete.
307 (core_file_command): Moved from corefile.c. Check exec_bfd
308 instead of the_core_target. Use target_detach instead of calling
309 into the_core_target directly.
310 (maybe_say_no_core_file_now): New.
311 (core_target::detach): Use it.
312 (_initialize_corelow): Remove references to the_core_target.
313 * gdbcore.h (the_core_target): Delete.
314
e540a5a2 3152018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 316 Pedro Alves <palves@redhat.com>
e540a5a2
TT
317
318 * corefile.c (core_bfd): Remove.
319 * gdbcore.h (core_bfd): Now a macro.
320 * progspace.h (struct program_space) <cbfd>: New field.
321
633cf254
TT
3222018-05-11 Tom Tromey <tom@tromey.com>
323
324 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
325 gdb::def_vector.
326
1a34f210
TT
3272018-05-10 Tom Tromey <tom@tromey.com>
328
329 * configure: Rebuild.
330 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
331
190852c8
JB
3322018-05-10 Joel Brobecker <brobecker@adacore.com>
333
334 PR server/23158:
335 * regformats/regdat.sh: Adjust script, following the addition
336 of the new expedite_regs parameter to init_target_desc.
337
8727de56
OJ
3382018-05-10 Omair Javaid <omair.javaid@linaro.org>
339
340 PR gdb/23127
341 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
342 set_gdbarch_significant_addr_bit.
343 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
344 set_gdbarch_significant_addr_bit.
345 * utils.c (address_significant): Update to sign extend addr.
346
37d9e062
MF
3472018-05-09 Max Filippov <jcmvbkbc@gmail.com>
348
349 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
350 (xtensa_linux_init_abi): Limit tdep->num_regs by
351 tdep->num_nopriv_regs.
352 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
353 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
354 not initialized.
355
7402fbca
SM
3562018-05-08 Simon Marchi <simon.marchi@ericsson.com>
357
358 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
359
8ee22052
AB
3602018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
361
362 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
363 (I387_MXCSR_INIT_VAL): New constant.
364 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
365 buffer if it was supplied by the inferior.
366 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
367 (i387_xsave_get_clear_bv): New function.
368 (i387_supply_xsave): Only read x87 control registers from the
369 xsave buffer if the feature is enabled, and the state will have
370 been written, otherwise, provide a suitable default.
371 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
372 including x87 control registers. Update control registers if they
373 have changed from the default value, and mark features as enabled
374 as required.
375 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
376
968ae51b
UW
3772018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
378
379 * spu-tdep.c (info_spu_event_command): Fix output formatting.
380
aff689d3
TT
3812018-05-07 Tom Tromey <tom@tromey.com>
382
383 * configure: Rebuild.
384 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
385
ce887586
TT
3862018-05-07 Tom Tromey <tom@tromey.com>
387
388 PR tdep/20362:
389 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
390 bit. Use correct value for VDIV.
391
85e26832
TT
3922018-05-04 Tom Tromey <tom@tromey.com>
393
394 * configure: Rebuild.
395 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
396
449b1ac7
TT
3972018-05-04 Tom Tromey <tom@tromey.com>
398
399 * linux-record.c (record_linux_system_call) <case
400 RECORD_SYS_RECVFROM>: Add "break".
401
15c9ffd6
TT
4022018-05-04 Tom Tromey <tom@tromey.com>
403
404 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
405 Add missing "break".
406 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
407 Add missing "break".
408
e3829d13
TT
4092018-05-04 Tom Tromey <tom@tromey.com>
410
411 * rs6000-tdep.c (ppc_process_record_op4)
412 (ppc_process_record_op63): Add fall-through comment.
413
da0e1563
TT
4142018-05-04 Tom Tromey <tom@tromey.com>
415
416 * i386-tdep.c (i386_process_record): Add fall-through comment.
417
0019cd49
TT
4182018-05-04 Tom Tromey <tom@tromey.com>
419
420 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
421 comment.
422
565e0eda
TT
4232018-05-04 Tom Tromey <tom@tromey.com>
424
425 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
426 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
427 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
428 comment.
429 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
430 comment.
431 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
432 comment.
433
621846f4
TT
4342018-05-04 Tom Tromey <tom@tromey.com>
435
436 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
437
86a73007
TT
4382018-05-04 Tom Tromey <tom@tromey.com>
439
440 * s390-tdep.c (s390_process_record): Fix fall-through comments.
441 * xcoffread.c (scan_xcoff_symtab): Move comment later.
442 * symfile.c (section_is_mapped): Fix fall-through comment.
443 * stabsread.c (define_symbol, read_member_functions): Fix
444 fall-through comment.
445 * s390-linux-tdep.c (s390_process_record): Fix fall-through
446 comment.
447 * remote.c (remote_wait_as): Fix fall-through comment.
448 * p-exp.y (yylex): Fix fall-through comment.
449 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
450 comment.
451 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
452 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
453 * jv-exp.y (yylex): Fix fall-through comment.
454 * go-exp.y (lex_one_token): Fix fall-through comment.
455 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
456 fall-through comment.
457 * f-exp.y (yylex): Fix fall-through comment.
458 * dwarf2read.c (process_die): Fix fall-through comments.
459 * dbxread.c (process_one_symbol): Fix fall-through comment.
460 * d-exp.y (lex_one_token): Fix fall-through comment.
461 * cp-name-parser.y (yylex): Fix fall-through comment.
462 * coffread.c (coff_symtab_read): Fix fall-through comment.
463 * c-exp.y (lex_one_token): Fix fall-through comment.
464 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
465 comment.
466 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
467 comment.
468
56bcdbea
TT
4692018-05-04 Tom Tromey <tom@tromey.com>
470
471 PR python/22730:
472 * NEWS: Mention gdb.execute change.
473 * gdbcmd.h (execute_control_command): Don't declare.
474 * python/python.c (execute_gdb_command): Use read_command_lines_1,
475 execute_control_commands, execute_control_commands_to_string.
476 * cli/cli-script.h (execute_control_commands)
477 (execute_control_commands_to_string): Declare.
478 (execute_control_command): Add from_tty parameter.
479 * cli/cli-script.c (execute_control_commands)
480 (execute_control_commands_to_string): New functions.
481 (execute_user_command): Use execute_control_commands.
482 (execute_control_command_1): Add "from_tty" parameter. Update.
483 (execute_control_command): Likewise.
484
a913fffb
TT
4852018-05-04 Tom Tromey <tom@tromey.com>
486
487 PR python/22731:
488 * NEWS: Mention that breakpoint commands are writable.
489 * python/py-breakpoint.c (bppy_set_commands): New function.
490 (breakpoint_object_getset) <"commands">: Use it.
491
60b3cef2
TT
4922018-05-04 Tom Tromey <tom@tromey.com>
493
494 * tracepoint.c (actions_command): Update.
495 * mi/mi-cmd-break.c (mi_command_line_array)
496 (mi_command_line_array_cnt, mi_command_line_array_ptr)
497 (mi_read_next_line): Remove.
498 (mi_cmd_break_commands): Update.
499 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
500 function_view.
501 * cli/cli-script.c (get_command_line): Update.
502 (process_next_line): Use function_view. Constify.
503 (recurse_read_control_structure, read_command_lines)
504 (read_command_lines_1): Change argument types to function_view.
505 (do_define_command, document_command): Update.
506 * breakpoint.h (check_tracepoint_command): Don't declare.
507 * breakpoint.c (check_tracepoint_command): Remove.
508 (commands_command_1, create_tracepoint_from_upload): Update.
509
7a2c85f2
TT
5102018-05-04 Tom Tromey <tom@tromey.com>
511
512 PR gdb/11750:
513 * cli/cli-script.h (enum command_control_type) <define_control>:
514 New constant.
515 * cli/cli-script.c (multi_line_command_p): Handle define_control.
516 (build_command_line, execute_control_command_1)
517 (process_next_line): Likewise.
518 (do_define_command): New function, extracted from define_command.
519 (define_command): Use it.
520
295dc222
TT
5212018-05-04 Tom Tromey <tom@tromey.com>
522
523 * tracepoint.c (actions_command): Update.
524 * cli/cli-script.h (read_command_lines): Update.
525 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
526 (MAX_TMPBUF): Remove define.
527 (define_command): Use string_printf.
528 (document_command): Likewise.
529 * breakpoint.c (commands_command_1): Update.
530
1263a9d5
TT
5312018-05-04 Tom Tromey <tom@tromey.com>
532
533 * top.c (execute_command): Update.
534 * cli/cli-script.h (print_command_lines): Now varargs.
535 * cli/cli-script.c (print_command_lines): Now varargs.
536 (execute_control_command_1) <case while_control, case if_control>:
537 Update.
538
12973681
TT
5392018-05-04 Tom Tromey <tom@tromey.com>
540
541 * tracepoint.c (all_tracepoint_actions): Rename from
542 all_tracepoint_actions_and_cleanup. Change return type.
543 (actions_command, encode_actions_1, encode_actions)
544 (trace_dump_actions, tdump_command): Update.
545 * remote.c (remote_download_command_source): Update.
546 * python/python.c (gdbpy_eval_from_control_command)
547 (python_command, python_interactive_command): Update.
548 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
549 * guile/guile.c (guile_command)
550 (gdbscm_eval_from_control_command, guile_command): Update.
551 * compile/compile.c (compile_code_command)
552 (compile_print_command, compile_to_object): Update.
553 * cli/cli-script.h (struct command_lines_deleter): New.
554 (counted_command_line): New typedef.
555 (struct command_line): Add constructor, destructor.
556 <body_list>: Remove.
557 <body_list_0, body_list_1>: New members.
558 (command_line_up): Remove typedef.
559 (read_command_lines, read_command_lines_1, get_command_line):
560 Update.
561 (copy_command_lines): Don't declare.
562 * cli/cli-script.c (build_command_line): Use "new".
563 (get_command_line): Return counted_command_line.
564 (print_command_lines, execute_user_command)
565 (execute_control_command_1, while_command, if_command): Update.
566 (realloc_body_list): Remove.
567 (process_next_line, recurse_read_control_structure): Update.
568 (read_command_lines, read_command_lines_1): Return counted_command_line.
569 (free_command_lines): Use "delete".
570 (copy_command_lines): Remove.
571 (define_command, document_command, show_user_1): Update.
572 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
573 a counted_command_line.
574 * breakpoint.h (counted_command_line): Remove typedef.
575 (breakpoint_set_commands): Update.
576 * breakpoint.c (check_no_tracepoint_commands)
577 (validate_commands_for_breakpoint): Update.
578 (breakpoint_set_commands): Change commands to be a
579 counted_command_line.
580 (commands_command_1, update_dprintf_command_list)
581 (create_tracepoint_from_upload): Update.
582
e2fc72e2
TT
5832018-05-04 Tom Tromey <tom@tromey.com>
584
585 * cli/cli-decode.h (cmd_list_element): New constructor.
586 (~cmd_list_element): New destructor.
587 (struct cmd_list_element): Add initializers.
588 * cli/cli-decode.c (do_add_cmd): Use "new".
589 (delete_cmd): Use "delete".
590
a3b60e45
JK
5912018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
592 Pedro Alves <palves@redhat.com>
593
594 PR breakpoints/19806 and support for PR external/20207.
595 * NEWS: Mention Aarch64 watchpoint improvements.
596 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
597 watchpoints and PR external/20207 watchpoints.
598 * nat/aarch64-linux-hw-point.c
599 (kernel_supports_any_contiguous_range): New.
600 (aarch64_watchpoint_offset): New.
601 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
602 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
603 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
604 (aarch64_align_watchpoint): New parameters aligned_offset_p and
605 next_addr_orig_p. Support PR external/20207 watchpoints.
606 (aarch64_downgrade_regs): New.
607 (aarch64_dr_state_insert_one_point): New parameters offset and
608 addr_orig.
609 (aarch64_dr_state_remove_one_point): Likewise.
610 (aarch64_handle_breakpoint): Update caller.
611 (aarch64_handle_aligned_watchpoint): Likewise.
612 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
613 aligned_offset.
614 (aarch64_linux_set_debug_regs): Remove const from state. Call
615 aarch64_downgrade_regs.
616 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
617 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
618 (DR_CONTROL_MASK): ... this.
619 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
620 (unsigned int aarch64_watchpoint_offset): New prototype.
621 (aarch64_linux_set_debug_regs): Remove const from state.
622 * utils.c (align_up, align_down): Move to ...
623 * common/common-utils.c (align_up, align_down): ... here.
624 * utils.h (align_up, align_down): Move to ...
625 * common/common-utils.h (align_up, align_down): ... here.
626
05bc7456
JB
6272018-05-04 Joel Brobecker <brobecker@adacore.com>
628
629 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
630 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
631 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
632 Re-implement to match the ABI as summarized in GCC's
633 gcc/config/sparc/sparc.c. All callers updated.
634 (sparc32_store_arguments): Remove assertion.
635
2f433492
TT
6362018-05-04 Tom Tromey <tom@tromey.com>
637
638 * printcmd.c: Don't include tui.h.
639 (decode_format): Use skip_spaces.
640
9be2ae8f
TT
6412018-05-04 Tom Tromey <tom@tromey.com>
642
643 PR gdb/22619:
644 * printcmd.c (last_count): New global.
645 (x_command): Use saved count when repeating.
646
f0b3976b
TT
6472018-05-04 Tom Tromey <tom@tromey.com>
648
649 * nto-procfs.c (do_closedir_cleanup): Remove.
650 (procfs_pidlist): Use gdb_dir_up.
651 * procfs.c (do_closedir_cleanup): Remove.
652 (proc_update_threads): Use gdb_dir_up.
653 * common/filestuff.h (struct gdb_dir_deleter): New.
654 (gdb_dir_up): New typedef.
655
862d101a
TT
6562018-05-04 Tom Tromey <tom@tromey.com>
657
658 * ada-lang.c (print_mention_exception): Use std::string.
659
cb7de75e
TT
6602018-05-04 Tom Tromey <tom@tromey.com>
661
662 * ada-lang.c (create_excep_cond_exprs): Update.
663 (ada_exception_catchpoint_cond_string): Use std::string.
664
49d83361
TT
6652018-05-04 Tom Tromey <tom@tromey.com>
666
667 * ada-lang.c (xget_renaming_scope): Return std::string.
668 (old_renaming_is_invisible): Update.
669
ade72a34
TT
6702018-05-04 Tom Tromey <tom@tromey.com>
671
672 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
673 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
674
2be4d7f0
UW
6752018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
676
677 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
678
69b6ecb0
TT
6792018-05-04 Tom Tromey <tom@tromey.com>
680
681 * remote.c (remote_query_supported_append): Change type.
682 (remote_check_symbols): Update.
683
bf27f0e2
PP
6842018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
685
686 PR gdb/11420
687 * configure.ac: Prepend libpython.
688 * python/python-config.py: Likewise.
689 * configure: Regenerate.
690
4ea17de8
SM
6912018-05-03 Simon Marchi <simon.marchi@ericsson.com>
692
693 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
694
bd732259
PA
6952018-05-03 Pedro Alves <palves@redhat.com>
696
697 * s390-linux-nat.c
698 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
699 override. Write 'true' instead of '1'.
700 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
701 declaration.
702
d9f719f1
PA
7032018-05-02 Pedro Alves <palves@redhat.com>
704
705 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
706 add_inf_child_target.
707 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
708 add_inf_child_target.
709 * aix-thread.c (aix_thread_target_info): New.
710 (aix_thread_target) <shortname, longname, doc>: Delete.
711 <info>: New.
712 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
713 add_inf_child_target.
714 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
715 add_inf_child_target.
716 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
717 add_inf_child_target.
718 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
719 add_inf_child_target.
720 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
721 add_inf_child_target.
722 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
723 add_inf_child_target.
724 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
725 add_inf_child_target.
726 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
727 add_inf_child_target.
728 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
729 add_inf_child_target.
730 * bfd-target.c (target_bfd_target_info): New.
731 (target_bfd) <shortname, longname, doc>: Delete.
732 <info>: New.
733 * bsd-kvm.c (bsd_kvm_target_info): New.
734 (bsd_kvm_target) <shortname, longname, doc>: Delete.
735 <info>: New.
736 (bsd_kvm_target::open): Rename to ...
737 (bsd_kvm_target_open): ... this. Adjust.
738 * bsd-uthread.c (bsd_uthread_target_info): New.
739 (bsd_uthread_target) <shortname, longname, doc>: Delete.
740 <info>: New.
741 * corefile.c (core_file_command): Adjust.
742 * corelow.c (core_target_info): New.
743 (core_target) <shortname, longname, doc>: Delete.
744 <info>: New.
745 (core_target::open): Rename to ...
746 (core_target_open): ... this. Adjust.
747 * ctf.c (ctf_target_info): New.
748 (ctf_target) <shortname, longname, doc>: Delete.
749 <info>: New.
750 (ctf_target::open): Rename to ...
751 (ctf_target_open): ... this.
752 (_initialize_ctf): Adjust.
753 * exec.c (exec_target_info): New.
754 (exec_target) <shortname, longname, doc>: Delete.
755 <info>: New.
756 (exec_target::open): Rename to ...
757 (exec_target_open): ... this.
758 * gdbcore.h (core_target_open): Declare.
759 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
760 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
761 add_inf_child_target.
762 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
763 add_inf_child_target.
764 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
765 add_inf_child_target.
766 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
767 add_inf_child_target.
768 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
769 add_inf_child_target.
770 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
771 add_inf_child_target.
772 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
773 add_inf_child_target.
774 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
775 add_inf_child_target.
776 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
777 add_inf_child_target.
778 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
779 add_inf_child_target.
780 * inf-child.c (inf_child_target_info): New.
781 (inf_child_target::info): New.
782 (inf_child_open_target): Remove 'target' parameter. Use
783 get_native_target instead.
784 (inf_child_target::open): Delete.
785 (add_inf_child_target): New.
786 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
787 Delete.
788 <info>: New.
789 (add_inf_child_target): Declare.
790 (inf_child_open_target): Declare.
791 * linux-thread-db.c (thread_db_target_info): New.
792 (thread_db_target) <shortname, longname, doc>: Delete.
793 <info>: New.
794 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
795 add_inf_child_target.
796 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
797 add_inf_child_target.
798 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
799 add_inf_child_target.
800 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
801 add_inf_child_target.
802 * make-target-delegates (print_class): Adjust.
803 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
804 add_inf_child_target.
805 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
806 add_inf_child_target.
807 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
808 add_inf_child_target.
809 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
810 add_inf_child_target.
811 * nto-procfs.c (nto_native_target_info): New.
812 (nto_procfs_target_native) <shortname, longname, doc>:
813 Delete.
814 <info>: New.
815 (nto_procfs_target_info): New.
816 (nto_procfs_target_procfs) <shortname, longname, doc>:
817 Delete.
818 <info>: New.
819 (init_procfs_targets): Adjust.
820 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
821 add_inf_child_target.
822 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
823 add_inf_child_target.
824 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
825 add_inf_child_target.
826 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
827 add_inf_child_target.
828 * ravenscar-thread.c (ravenscar_target_info): New.
829 (ravenscar_thread_target) <shortname, longname, doc>:
830 Delete.
831 <info>: New.
832 * record-btrace.c (record_btrace_target_info):
833 (record_btrace_target) <shortname, longname, doc>: Delete.
834 <info>: New.
835 (record_btrace_target::open): Rename to ...
836 (record_btrace_target_open): ... this. Adjust.
837 * record-full.c (record_longname, record_doc): New.
838 (record_full_base_target) <shortname, longname, doc>: Delete.
839 <info>: New.
840 (record_full_target_info): New.
841 (record_full_target): <shortname>: Delete.
842 <info>: New.
843 (record_full_core_open_1, record_full_open_1): Update comments.
844 (record_full_base_target::open): Rename to ...
845 (record_full_open): ... this.
846 (cmd_record_full_restore): Update.
847 (_initialize_record_full): Update.
848 * remote-sim.c (remote_sim_target_info): New.
849 (gdbsim_target) <shortname, longname, doc>: Delete.
850 <info>: New.
851 (gdbsim_target::open): Rename to ...
852 (gdbsim_target_open): ... this.
853 (_initialize_remote_sim): Adjust.
854 * remote.c (remote_doc): New.
855 (remote_target_info): New.
856 (remote_target) <shortname, longname, doc>: Delete.
857 <info>: New.
858 (extended_remote_target_info): New.
859 (extended_remote_target) <shortname, longname, doc>: Delete.
860 <info>: New.
861 (remote_target::open_1): Make static. Adjust.
862 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
863 * s390-linux-nat.c (_initialize_s390_nat): Use
864 add_inf_child_target.
865 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
866 add_inf_child_target.
867 * sol-thread.c (thread_db_target_info): New.
868 (sol_thread_target) <shortname, longname, doc>: Delete.
869 <info>: New.
870 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
871 add_inf_child_target.
872 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
873 add_inf_child_target.
874 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
875 add_inf_child_target.
876 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
877 add_inf_child_target.
878 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
879 add_inf_child_target.
880 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
881 add_inf_child_target.
882 * spu-linux-nat.c (_initialize_spu_nat): Use
883 add_inf_child_target.
884 * spu-multiarch.c (spu_multiarch_target_info): New.
885 (spu_multiarch_target) <shortname, longname, doc>: Delete.
886 <info>: New.
887 * target-delegates.c: Regenerate.
888 * target.c: Include <unordered_map>.
889 (target_ops_p): Delete.
890 (DEF_VEC_P(target_ops_p)): Delete.
891 (target_factories): New.
892 (test_target_info): New.
893 (test_target_ops::info): New.
894 (open_target): Adjust to use target_factories.
895 (add_target_with_completer): Rename to ...
896 (add_target): ... this. Change prototype. Register target_info
897 and open callback in target_factories. Register target_info in
898 command context instead of target_ops.
899 (add_target): Delete old implementation.
900 (add_deprecated_target_alias): Change prototype. Adjust.
901 (the_native_target): New.
902 (set_native_target, get_native_target): New.
903 (find_default_run_target): Use the_native_target.
904 (find_attach_target, find_run_target): Simplify.
905 (target_ops::open): Delete.
906 (dummy_target_info): New.
907 (dummy_target::shortname, dummy_target::longname)
908 (dummy_target::doc): Delete.
909 (dummy_target::info): New.
910 (debug_target::shortname, debug_target::longname)
911 (debug_target::doc): Delete.
912 (debug_target::info): New.
913 * target.h (struct target_info): New.
914 (target_ops::~target_ops): Add comment.
915 (target_ops::info): New.
916 (target_ops::shortname, target_ops::longname, target_ops::doc): No
917 longer virtual. Implement in terms of target_info.
918 (set_native_target, get_native_target): Declare.
919 (target_open_ftype): New.
920 (add_target, add_target_with_completer)
921 (add_deprecated_target_alias): Change prototype.
922 (test_target) <shortname, longname, doc>: Delete.
923 <info>: New.
924 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
925 add_inf_child_target.
926 * tracefile-tfile.c (tfile_target_info): New.
927 (tfile_target) <shortname, longname, doc>: Delete.
928 <info>: New.
929 (tfile_target::open): Rename to ...
930 (tfile_target_open): ... this.
931 (_initialize_tracefile_tfile): Adjust.
932 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
933 add_inf_child_target.
934 * windows-nat.c (_initialize_windows_nat): Use
935 add_inf_child_target.
936 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
937 add_inf_child_target.
938
135340af
PA
9392018-05-02 Pedro Alves <palves@redhat.com>
940
941 * linux-nat.h (linux_nat_target) <low_new_thread,
942 low_delete_thread, low_new_fork, low_forget_process,
943 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
944 New virtual methods.
945 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
946 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
947 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
948 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
949 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
950 Delete.
951 * linux-fork.c (delete_fork): Adjust to call low method.
952 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
953 (linux_nat_new_fork, linux_nat_forget_process_hook)
954 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
955 (linux_nat_status_is_event):
956 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
957 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
958 to call low method.
959 (sigtrap_is_event): Rename to ...
960 (linux_nat_target::low_status_is_event): ... this.
961 (linux_nat_set_status_is_event): Delete.
962 (save_stop_reason, linux_nat_wait_1)
963 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
964 low methods.
965 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
966 (linux_nat_set_new_fork, linux_nat_set_forget_process)
967 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
968 (linux_nat_set_prepare_to_resume): Delete.
969 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
970 low virtual methods.
971 * amd64-linux-nat.c: Likewise.
972 * arm-linux-nat.c: Likewise.
973 * i386-linux-nat.c: Likewise.
974 * ia64-linux-nat.c: Likewise.
975 * mips-linux-nat.c: Likewise.
976 * ppc-linux-nat.c: Likewise.
977 * s390-linux-nat.c: Likewise.
978 * sparc64-linux-nat.c: Likewise.
979 * x86-linux-nat.c: Likewise.
980 * x86-linux-nat.h: Include "nat/x86-linux.h".
981 (x86_linux_nat_target) <low_new_fork, low_forget_process,
982 low_prepare_to_resume, low_new_thread, low_delete_thread>:
983 Override methods.
984
57810aa7
PA
9852018-05-02 Pedro Alves <palves@redhat.com>
986
987 * target.h (target_ops)
988 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
989 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
990 stopped_by_watchpoint, have_continuable_watchpoint,
991 stopped_data_address, watchpoint_addr_within_range,
992 can_accel_watchpoint_condition, can_run, thread_alive,
993 has_all_memory, has_memory, has_stack, has_registers,
994 has_execution, can_async_p, is_async_p, supports_non_stop,
995 always_non_stop_p, can_execute_reverse, supports_multi_process,
996 supports_enable_disable_tracepoint,
997 supports_disable_randomization, supports_string_tracing,
998 supports_evaluation_of_breakpoint_conditions,
999 can_run_breakpoint_commands, filesystem_is_local,
1000 can_download_tracepoint, get_trace_state_variable_value,
1001 set_trace_notes, get_tib_address, use_agent, can_use_agent,
1002 record_is_replaying, record_will_replay,
1003 augmented_libraries_svr4_read>: Adjust to return bool.
1004 * aarch64-linux-nat.c: All implementations adjusted.
1005 * aix-thread.c: All implementations adjusted.
1006 * arm-linux-nat.c: All implementations adjusted.
1007 * breakpoint.c: All implementations adjusted.
1008 * bsd-kvm.c: All implementations adjusted.
1009 * bsd-uthread.c: All implementations adjusted.
1010 * corelow.c: All implementations adjusted.
1011 * ctf.c: All implementations adjusted.
1012 * darwin-nat.c: All implementations adjusted.
1013 * darwin-nat.h: All implementations adjusted.
1014 * exec.c: All implementations adjusted.
1015 * fbsd-nat.c: All implementations adjusted.
1016 * fbsd-nat.h: All implementations adjusted.
1017 * gnu-nat.c: All implementations adjusted.
1018 * gnu-nat.h: All implementations adjusted.
1019 * go32-nat.c: All implementations adjusted.
1020 * ia64-linux-nat.c: All implementations adjusted.
1021 * inf-child.c: All implementations adjusted.
1022 * inf-child.h: All implementations adjusted.
1023 * inf-ptrace.c: All implementations adjusted.
1024 * inf-ptrace.h: All implementations adjusted.
1025 * linux-nat.c: All implementations adjusted.
1026 * linux-nat.h: All implementations adjusted.
1027 * mips-linux-nat.c: All implementations adjusted.
1028 * nto-procfs.c: All implementations adjusted.
1029 * ppc-linux-nat.c: All implementations adjusted.
1030 * procfs.c: All implementations adjusted.
1031 * ravenscar-thread.c: All implementations adjusted.
1032 * record-btrace.c: All implementations adjusted.
1033 * record-full.c: All implementations adjusted.
1034 * remote-sim.c: All implementations adjusted.
1035 * remote.c: All implementations adjusted.
1036 * s390-linux-nat.c: All implementations adjusted.
1037 * sol-thread.c: All implementations adjusted.
1038 * spu-multiarch.c: All implementations adjusted.
1039 * target-delegates.c: All implementations adjusted.
1040 * target.c: All implementations adjusted.
1041 * target.h: All implementations adjusted.
1042 * tracefile-tfile.c: All implementations adjusted.
1043 * tracefile.c: All implementations adjusted.
1044 * tracefile.h: All implementations adjusted.
1045 * windows-nat.c: All implementations adjusted.
1046 * x86-linux-nat.h: All implementations adjusted.
1047 * x86-nat.h: All implementations adjusted.
1048
ad6a4e2d
PA
10492018-05-02 Pedro Alves <palves@redhat.com>
1050
1051 * make-target-delegates (scan_target_h): Don't trim lines here.
1052 Replace sequences of tabs and/or whitespace with a single
1053 whitespace.
1054 (top level, parsing methods): Trim each line before processing it
1055 here.
1056
f6ac5f3d
PA
10572018-05-02 Pedro Alves <palves@redhat.com>
1058 John Baldwin <jhb@freebsd.org>
1059
1060 * target.h (enum strata) <debug_stratum>: New.
1061 (struct target_ops) <all delegation methods>: Replace by C++
1062 virtual methods, and drop "to_" prefix. All references updated
1063 throughout.
1064 <to_shortname, to_longname, to_doc, to_data,
1065 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
1066 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
1067 virtual methods. All references updated throughout.
1068 <can_attach, supports_terminal_ours, can_create_inferior,
1069 get_thread_control_capabilities, attach_no_wait>: New
1070 virtual methods.
1071 <insert_breakpoint, remove_breakpoint>: Now
1072 TARGET_DEFAULT_NORETURN methods.
1073 <info_proc>: Now returns bool.
1074 <to_magic>: Delete.
1075 (OPS_MAGIC): Delete.
1076 (current_target): Delete. All references replaced by references
1077 to ...
1078 (target_stack): ... this. New.
1079 (target_shortname, target_longname): Adjust.
1080 (target_can_run): Now a function declaration.
1081 (default_child_has_all_memory, default_child_has_memory)
1082 (default_child_has_stack, default_child_has_registers)
1083 (default_child_has_execution): Remove target_ops parameter.
1084 (complete_target_initialization): Delete.
1085 (memory_breakpoint_target): New template class.
1086 (test_target_ops): Refactor as a C++ class with virtual methods.
1087 * make-target-delegates (NAME_PART): Tighten.
1088 (POINTER_PART, CP_SYMBOL): New.
1089 (SIMPLE_RETURN_PART): Reimplement.
1090 (VEC_RETURN_PART): Expect less.
1091 (RETURN_PART, VIRTUAL_PART): New.
1092 (METHOD): Adjust to C++ virtual methods.
1093 (scan_target_h): Remove reference to C99.
1094 (dname): Output "target_ops::" prefix.
1095 (write_function_header): Adjust to output a C++ class method.
1096 (write_declaration): New.
1097 (write_delegator): Adjust to output a C++ class method.
1098 (tdname): Output "dummy_target::" prefix.
1099 (write_tdefault, write_debugmethod): Adjust to output a C++ class
1100 method.
1101 (tdefault_names, debug_names): Delete.
1102 (return_types, tdefaults, styles, argtypes_array): New.
1103 (top level): All methods are delegators.
1104 (print_class): New.
1105 (top level): Print dummy_target and debug_target classes.
1106 * target-delegates.c: Regenerate.
1107 * target-debug.h (target_debug_print_enum_info_proc_what)
1108 (target_debug_print_thread_control_capabilities)
1109 (target_debug_print_thread_info_p): New.
1110 * target.c (dummy_target): Delete.
1111 (the_dummy_target, the_debug_target): New.
1112 (target_stack): Now extern.
1113 (set_targetdebug): Push/unpush debug target.
1114 (default_child_has_all_memory, default_child_has_memory)
1115 (default_child_has_stack, default_child_has_registers)
1116 (default_child_has_execution): Remove target_ops parameter.
1117 (complete_target_initialization): Delete.
1118 (add_target_with_completer): No longer call
1119 complete_target_initialization.
1120 (target_supports_terminal_ours): Use regular delegation.
1121 (update_current_target): Delete.
1122 (push_target): No longer check magic number. Don't call
1123 update_current_target.
1124 (unpush_target): Don't call update_current_target.
1125 (target_is_pushed): No longer check magic number.
1126 (target_require_runnable): Skip for all stratums over
1127 process_stratum.
1128 (target_ops::info_proc): New.
1129 (target_info_proc): Use find_target_at and
1130 find_default_run_target.
1131 (target_supports_disable_randomization): Use regular delegation.
1132 (target_get_osdata): Use find_target_at.
1133 (target_ops::open, target_ops::close, target_ops::can_attach)
1134 (target_ops::attach, target_ops::can_create_inferior)
1135 (target_ops::create_inferior, target_ops::can_run)
1136 (target_can_run): New.
1137 (default_fileio_target): Use regular delegation.
1138 (target_ops::fileio_open, target_ops::fileio_pwrite)
1139 (target_ops::fileio_pread, target_ops::fileio_fstat)
1140 (target_ops::fileio_close, target_ops::fileio_unlink)
1141 (target_ops::fileio_readlink): New.
1142 (target_fileio_open_1, target_fileio_unlink)
1143 (target_fileio_readlink): Always call the target method. Handle
1144 FILEIO_ENOSYS.
1145 (return_zero, return_zero_has_execution): Delete.
1146 (init_dummy_target): Delete.
1147 (dummy_target::dummy_target, dummy_target::shortname)
1148 (dummy_target::longname, dummy_target::doc)
1149 (debug_target::debug_target, debug_target::shortname)
1150 (debug_target::longname, debug_target::doc): New.
1151 (target_supports_delete_record): Use regular delegation.
1152 (setup_target_debug): Delete.
1153 (maintenance_print_target_stack): Skip debug_stratum.
1154 (initialize_targets): Instantiate the_dummy_target and
1155 the_debug_target.
1156 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
1157 use target_stack.
1158 (target_auxv_search, fprint_target_auxv): Adjust.
1159 (info_auxv_command): Adjust to use target_stack.
1160 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
1161 * exceptions.c (print_flush): Handle a NULL target_stack.
1162 * regcache.c (target_ops_no_register): Refactor as class with
1163 virtual methods.
1164
1165 * exec.c (exec_target): New class.
1166 (exec_ops): Now an exec_target.
1167 (exec_open, exec_close_1, exec_get_section_table)
1168 (exec_xfer_partial, exec_files_info, exec_has_memory)
1169 (exec_make_note_section): Refactor as exec_target methods.
1170 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
1171 Delete.
1172 (exec_target::find_memory_regions): New.
1173 (_initialize_exec): Don't call init_exec_ops.
1174 * gdbcore.h (exec_file_clear): Delete.
1175
1176 * corefile.c (core_target): Delete.
1177 (core_file_command): Adjust.
1178 * corelow.c (core_target): New class.
1179 (the_core_target): New.
1180 (core_close): Remove target_ops parameter.
1181 (core_close_cleanup): Adjust.
1182 (core_target::close): New.
1183 (core_open, core_detach, get_core_registers, core_files_info)
1184 (core_xfer_partial, core_thread_alive, core_read_description)
1185 (core_pid_to_str, core_thread_name, core_has_memory)
1186 (core_has_stack, core_has_registers, core_info_proc): Rework as
1187 core_target methods.
1188 (ignore, core_remove_breakpoint, init_core_ops): Delete.
1189 (_initialize_corelow): Initialize the_core_target.
1190 * gdbcore.h (core_target): Delete.
1191 (the_core_target): New.
1192
1193 * ctf.c: (ctf_target): New class.
1194 (ctf_ops): Now a ctf_target.
1195 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
1196 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
1197 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
1198 methods.
1199 (init_ctf_ops): Delete.
1200 (_initialize_ctf): Don't call it.
1201 * tracefile-tfile.c (tfile_target): New class.
1202 (tfile_ops): Now a tfile_target.
1203 (tfile_open, tfile_close, tfile_files_info)
1204 (tfile_get_tracepoint_status, tfile_trace_find)
1205 (tfile_fetch_registers, tfile_xfer_partial)
1206 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
1207 Refactor as tfile_target methods.
1208 (tfile_xfer_partial_features): Remove target_ops parameter.
1209 (init_tfile_ops): Delete.
1210 (_initialize_tracefile_tfile): Don't call it.
1211 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
1212 (tracefile_has_stack, tracefile_has_registers)
1213 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
1214 tracefile_target methods.
1215 (init_tracefile_ops): Delete.
1216 (tracefile_target::tracefile_target): New.
1217 * tracefile.h: Include "target.h".
1218 (tracefile_target): New class.
1219 (init_tracefile_ops): Delete.
1220
1221 * spu-multiarch.c (spu_multiarch_target): New class.
1222 (spu_ops): Now a spu_multiarch_target.
1223 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
1224 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
1225 (spu_search_memory, spu_mourn_inferior): Refactor as
1226 spu_multiarch_target methods.
1227 (init_spu_ops): Delete.
1228 (_initialize_spu_multiarch): Remove references to init_spu_ops,
1229 complete_target_initialization.
1230
1231 * ravenscar-thread.c (ravenscar_thread_target): New class.
1232 (ravenscar_ops): Now a ravenscar_thread_target.
1233 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
1234 (ravenscar_thread_alive, ravenscar_pid_to_str)
1235 (ravenscar_fetch_registers, ravenscar_store_registers)
1236 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
1237 (ravenscar_stopped_by_hw_breakpoint)
1238 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
1239 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
1240 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
1241 methods.
1242 (init_ravenscar_thread_ops): Delete.
1243 (_initialize_ravenscar): Remove references to
1244 init_ravenscar_thread_ops and complete_target_initialization.
1245
1246 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
1247 (bsd_uthread_target): New class.
1248 (bsd_uthread_ops): Now a bsd_uthread_target.
1249 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
1250 (bsd_uthread_close, bsd_uthread_mourn_inferior)
1251 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
1252 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
1253 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
1254 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
1255 (bsd_uthread_target): Delete function.
1256 (_initialize_bsd_uthread): Remove reference to
1257 complete_target_initialization.
1258
1259 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
1260 (target_bfd): ... this new class.
1261 (target_bfd_xfer_partial, target_bfd_get_section_table)
1262 (target_bfd_close): Refactor as target_bfd methods.
1263 (target_bfd::~target_bfd): New.
1264 (target_bfd_reopen): Adjust.
1265 (target_bfd::close): New.
1266
1267 * record-btrace.c (record_btrace_target): New class.
1268 (record_btrace_ops): Now a record_btrace_target.
1269 (record_btrace_open, record_btrace_stop_recording)
1270 (record_btrace_disconnect, record_btrace_close)
1271 (record_btrace_async, record_btrace_info)
1272 (record_btrace_insn_history, record_btrace_insn_history_range)
1273 (record_btrace_insn_history_from, record_btrace_call_history)
1274 (record_btrace_call_history_range)
1275 (record_btrace_call_history_from, record_btrace_record_method)
1276 (record_btrace_is_replaying, record_btrace_will_replay)
1277 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
1278 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
1279 (record_btrace_store_registers, record_btrace_prepare_to_store)
1280 (record_btrace_to_get_unwinder)
1281 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
1282 (record_btrace_commit_resume, record_btrace_wait)
1283 (record_btrace_stop, record_btrace_can_execute_reverse)
1284 (record_btrace_stopped_by_sw_breakpoint)
1285 (record_btrace_supports_stopped_by_sw_breakpoint)
1286 (record_btrace_stopped_by_hw_breakpoint)
1287 (record_btrace_supports_stopped_by_hw_breakpoint)
1288 (record_btrace_update_thread_list, record_btrace_thread_alive)
1289 (record_btrace_goto_begin, record_btrace_goto_end)
1290 (record_btrace_goto, record_btrace_stop_replaying_all)
1291 (record_btrace_execution_direction)
1292 (record_btrace_prepare_to_generate_core)
1293 (record_btrace_done_generating_core): Refactor as
1294 record_btrace_target methods.
1295 (init_record_btrace_ops): Delete.
1296 (_initialize_record_btrace): Remove reference to
1297 init_record_btrace_ops.
1298 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
1299 the execution_direction global.
1300 (record_full_base_target, record_full_target)
1301 (record_full_core_target): New classes.
1302 (record_full_ops): Now a record_full_target.
1303 (record_full_core_ops): Now a record_full_core_target.
1304 (record_full_target::detach, record_full_target::disconnect)
1305 (record_full_core_target::disconnect)
1306 (record_full_target::mourn_inferior, record_full_target::kill):
1307 New.
1308 (record_full_open, record_full_close, record_full_async): Refactor
1309 as methods of the record_full_base_target class.
1310 (record_full_resume, record_full_commit_resume): Refactor
1311 as methods of the record_full_target class.
1312 (record_full_wait, record_full_stopped_by_watchpoint)
1313 (record_full_stopped_data_address)
1314 (record_full_stopped_by_sw_breakpoint)
1315 (record_full_supports_stopped_by_sw_breakpoint)
1316 (record_full_stopped_by_hw_breakpoint)
1317 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
1318 methods of the record_full_base_target class.
1319 (record_full_store_registers, record_full_xfer_partial)
1320 (record_full_insert_breakpoint, record_full_remove_breakpoint):
1321 Refactor as methods of the record_full_target class.
1322 (record_full_can_execute_reverse, record_full_get_bookmark)
1323 (record_full_goto_bookmark, record_full_execution_direction)
1324 (record_full_record_method, record_full_info, record_full_delete)
1325 (record_full_is_replaying, record_full_will_replay)
1326 (record_full_goto_begin, record_full_goto_end, record_full_goto)
1327 (record_full_stop_replaying): Refactor as methods of the
1328 record_full_base_target class.
1329 (record_full_core_resume, record_full_core_kill)
1330 (record_full_core_fetch_registers)
1331 (record_full_core_prepare_to_store)
1332 (record_full_core_store_registers, record_full_core_xfer_partial)
1333 (record_full_core_insert_breakpoint)
1334 (record_full_core_remove_breakpoint)
1335 (record_full_core_has_execution): Refactor
1336 as methods of the record_full_core_target class.
1337 (record_full_base_target::supports_delete_record): New.
1338 (init_record_full_ops): Delete.
1339 (init_record_full_core_ops): Delete.
1340 (record_full_save): Refactor as method of the
1341 record_full_base_target class.
1342 (_initialize_record_full): Remove references to
1343 init_record_full_ops and init_record_full_core_ops.
1344
1345 * remote.c (remote_target, extended_remote_target): New classes.
1346 (remote_ops): Now a remote_target.
1347 (extended_remote_ops): Now an extended_remote_target.
1348 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
1349 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
1350 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
1351 (remote_pass_signals, remote_set_syscall_catchpoint)
1352 (remote_program_signals, )
1353 (remote_thread_always_alive): Remove target_ops parameter.
1354 (remote_thread_alive, remote_thread_name)
1355 (remote_update_thread_list, remote_threads_extra_info)
1356 (remote_static_tracepoint_marker_at)
1357 (remote_static_tracepoint_markers_by_strid)
1358 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
1359 (remote_open): Refactor as methods of remote_target.
1360 (extended_remote_open, extended_remote_detach)
1361 (extended_remote_attach, extended_remote_post_attach):
1362 (extended_remote_supports_disable_randomization)
1363 (extended_remote_create_inferior): : Refactor as method of
1364 extended_remote_target.
1365 (remote_set_permissions, remote_open_1, remote_detach)
1366 (remote_follow_fork, remote_follow_exec, remote_disconnect)
1367 (remote_resume, remote_commit_resume, remote_stop)
1368 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
1369 (remote_terminal_ours, remote_wait, remote_fetch_registers)
1370 (remote_prepare_to_store, remote_store_registers)
1371 (remote_flash_erase, remote_flash_done, remote_files_info)
1372 (remote_kill, remote_mourn, remote_insert_breakpoint)
1373 (remote_remove_breakpoint, remote_insert_watchpoint)
1374 (remote_watchpoint_addr_within_range)
1375 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
1376 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
1377 (remote_supports_stopped_by_sw_breakpoint)
1378 (remote_stopped_by_hw_breakpoint)
1379 (remote_supports_stopped_by_hw_breakpoint)
1380 (remote_stopped_by_watchpoint, remote_stopped_data_address)
1381 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
1382 (remote_verify_memory): Refactor as methods of remote_target.
1383 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
1384 parameter.
1385 (remote_xfer_partial, remote_get_memory_xfer_limit)
1386 (remote_search_memory, remote_rcmd, remote_memory_map)
1387 (remote_pid_to_str, remote_get_thread_local_address)
1388 (remote_get_tib_address, remote_read_description): Refactor as
1389 methods of remote_target.
1390 (remote_target::fileio_open, remote_target::fileio_pwrite)
1391 (remote_target::fileio_pread, remote_target::fileio_close): New.
1392 (remote_hostio_readlink, remote_hostio_fstat)
1393 (remote_filesystem_is_local, remote_can_execute_reverse)
1394 (remote_supports_non_stop, remote_supports_disable_randomization)
1395 (remote_supports_multi_process, remote_supports_cond_breakpoints)
1396 (remote_supports_enable_disable_tracepoint)
1397 (remote_supports_string_tracing)
1398 (remote_can_run_breakpoint_commands, remote_trace_init)
1399 (remote_download_tracepoint, remote_can_download_tracepoint)
1400 (remote_download_trace_state_variable, remote_enable_tracepoint)
1401 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
1402 (remote_trace_start, remote_get_trace_status)
1403 (remote_get_tracepoint_status, remote_trace_stop)
1404 (remote_trace_find, remote_get_trace_state_variable_value)
1405 (remote_save_trace_data, remote_get_raw_trace_data)
1406 (remote_set_disconnected_tracing, remote_core_of_thread)
1407 (remote_set_circular_trace_buffer, remote_traceframe_info)
1408 (remote_get_min_fast_tracepoint_insn_len)
1409 (remote_set_trace_buffer_size, remote_set_trace_notes)
1410 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
1411 (remote_disable_btrace, remote_teardown_btrace)
1412 (remote_read_btrace, remote_btrace_conf)
1413 (remote_augmented_libraries_svr4_read, remote_load)
1414 (remote_pid_to_exec_file, remote_can_do_single_step)
1415 (remote_execution_direction, remote_thread_handle_to_thread_info):
1416 Refactor as methods of remote_target.
1417 (init_remote_ops, init_extended_remote_ops): Delete.
1418 (remote_can_async_p, remote_is_async_p, remote_async)
1419 (remote_thread_events, remote_upload_tracepoints)
1420 (remote_upload_trace_state_variables): Refactor as methods of
1421 remote_target.
1422 (_initialize_remote): Remove references to init_remote_ops and
1423 init_extended_remote_ops.
1424
1425 * remote-sim.c (gdbsim_target): New class.
1426 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
1427 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
1428 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
1429 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
1430 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
1431 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
1432 Refactor as methods of gdbsim_target.
1433 (gdbsim_ops): Now a gdbsim_target.
1434 (init_gdbsim_ops): Delete.
1435 (gdbsim_cntrl_c): Adjust.
1436 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
1437
1438 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
1439 (the_amd64_linux_nat_target): New.
1440 (amd64_linux_fetch_inferior_registers)
1441 (amd64_linux_store_inferior_registers): Refactor as methods of
1442 amd64_linux_nat_target.
1443 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
1444 * i386-linux-nat.c: Don't include "linux-nat.h".
1445 (i386_linux_nat_target): New class.
1446 (the_i386_linux_nat_target): New.
1447 (i386_linux_fetch_inferior_registers)
1448 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
1449 as methods of i386_linux_nat_target.
1450 (_initialize_i386_linux_nat): Adjust. Set linux_target.
1451 * inf-child.c (inf_child_ops): Delete.
1452 (inf_child_fetch_inferior_registers)
1453 (inf_child_store_inferior_registers): Delete.
1454 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
1455 methods of inf_child_target.
1456 (inf_child_target::supports_terminal_ours)
1457 (inf_child_target::terminal_init)
1458 (inf_child_target::terminal_inferior)
1459 (inf_child_target::terminal_ours_for_output)
1460 (inf_child_target::terminal_ours, inf_child_target::interrupt)
1461 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
1462 New.
1463 (inf_child_open, inf_child_disconnect, inf_child_close)
1464 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
1465 (inf_child_post_startup_inferior, inf_child_can_run)
1466 (inf_child_pid_to_exec_file): Refactor as methods of
1467 inf_child_target.
1468 (inf_child_follow_fork): Delete.
1469 (inf_child_target::can_create_inferior)
1470 (inf_child_target::can_attach): New.
1471 (inf_child_target::has_all_memory, inf_child_target::has_memory)
1472 (inf_child_target::has_stack, inf_child_target::has_registers)
1473 (inf_child_target::has_execution): New.
1474 (inf_child_fileio_open, inf_child_fileio_pwrite)
1475 (inf_child_fileio_pread, inf_child_fileio_fstat)
1476 (inf_child_fileio_close, inf_child_fileio_unlink)
1477 (inf_child_fileio_readlink, inf_child_use_agent)
1478 (inf_child_can_use_agent): Refactor as methods of
1479 inf_child_target.
1480 (return_zero, inf_child_target): Delete.
1481 (inf_child_target::inf_child_target): New.
1482 * inf-child.h: Include "target.h".
1483 (inf_child_target): Delete function prototype.
1484 (inf_child_target): New class.
1485 (inf_child_open_target, inf_child_mourn_inferior)
1486 (inf_child_maybe_unpush_target): Delete.
1487 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
1488 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
1489 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
1490 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
1491 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
1492 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
1493 (inf_ptrace_wait, inf_ptrace_xfer_partial)
1494 (inf_ptrace_thread_alive, inf_ptrace_files_info)
1495 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
1496 methods of inf_ptrace_target.
1497 (inf_ptrace_target): Delete function.
1498 * inf-ptrace.h: Include "inf-child.h".
1499 (inf_ptrace_target): Delete function declaration.
1500 (inf_ptrace_target): New class.
1501 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
1502 * linux-nat.c (linux_target): New.
1503 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
1504 (linux_nat_target::~linux_nat_target): New.
1505 (linux_child_post_attach, linux_child_post_startup_inferior)
1506 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
1507 (linux_child_remove_fork_catchpoint)
1508 (linux_child_insert_vfork_catchpoint)
1509 (linux_child_remove_vfork_catchpoint)
1510 (linux_child_insert_exec_catchpoint)
1511 (linux_child_remove_exec_catchpoint)
1512 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
1513 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
1514 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
1515 (linux_nat_stopped_data_address)
1516 (linux_nat_stopped_by_sw_breakpoint)
1517 (linux_nat_supports_stopped_by_sw_breakpoint)
1518 (linux_nat_stopped_by_hw_breakpoint)
1519 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
1520 (linux_nat_kill, linux_nat_mourn_inferior)
1521 (linux_nat_xfer_partial, linux_nat_thread_alive)
1522 (linux_nat_update_thread_list, linux_nat_pid_to_str)
1523 (linux_nat_thread_name, linux_child_pid_to_exec_file)
1524 (linux_child_static_tracepoint_markers_by_strid)
1525 (linux_nat_is_async_p, linux_nat_can_async_p)
1526 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
1527 (linux_nat_supports_multi_process)
1528 (linux_nat_supports_disable_randomization, linux_nat_async)
1529 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
1530 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
1531 (linux_nat_fileio_open, linux_nat_fileio_readlink)
1532 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
1533 methods of linux_nat_target.
1534 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
1535 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
1536 parameter.
1537 (check_stopped_by_watchpoint): Adjust.
1538 (linux_xfer_partial): Delete.
1539 (linux_target_install_ops, linux_target, linux_nat_add_target):
1540 Delete.
1541 (linux_nat_target::linux_nat_target): New.
1542 * linux-nat.h: Include "inf-ptrace.h".
1543 (linux_nat_target): New.
1544 (linux_target, linux_target_install_ops, linux_nat_add_target):
1545 Delete function declarations.
1546 (linux_target): Declare global.
1547 * linux-thread-db.c (thread_db_target): New.
1548 (thread_db_target::thread_db_target): New.
1549 (thread_db_ops): Delete.
1550 (the_thread_db_target): New.
1551 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
1552 (thread_db_update_thread_list, thread_db_pid_to_str)
1553 (thread_db_extra_thread_info)
1554 (thread_db_thread_handle_to_thread_info)
1555 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
1556 (thread_db_resume): Refactor as methods of thread_db_target.
1557 (init_thread_db_ops): Delete.
1558 (_initialize_thread_db): Remove reference to init_thread_db_ops.
1559 * x86-linux-nat.c: Don't include "linux-nat.h".
1560 (super_post_startup_inferior): Delete.
1561 (x86_linux_nat_target::~x86_linux_nat_target): New.
1562 (x86_linux_child_post_startup_inferior)
1563 (x86_linux_read_description, x86_linux_enable_btrace)
1564 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
1565 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
1566 methods of x86_linux_nat_target.
1567 (x86_linux_create_target): Delete. Bits folded ...
1568 (x86_linux_add_target): ... here. Now takes a linux_nat_target
1569 pointer.
1570 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
1571 (x86_linux_nat_target): New class.
1572 (x86_linux_create_target): Delete.
1573 (x86_linux_add_target): Now takes a linux_nat_target pointer.
1574 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
1575 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
1576 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
1577 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
1578 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
1579 make extern.
1580 (x86_use_watchpoints): Delete.
1581 * x86-nat.h: Include "breakpoint.h" and "target.h".
1582 (x86_use_watchpoints): Delete.
1583 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
1584 (x86_stopped_by_watchpoint, x86_stopped_data_address)
1585 (x86_insert_watchpoint, x86_remove_watchpoint)
1586 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
1587 (x86_stopped_by_hw_breakpoint): New declarations.
1588 (x86_nat_target): New template class.
1589
1590 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
1591 (the_ppc_linux_nat_target): New.
1592 (ppc_linux_fetch_inferior_registers)
1593 (ppc_linux_can_use_hw_breakpoint)
1594 (ppc_linux_region_ok_for_hw_watchpoint)
1595 (ppc_linux_ranged_break_num_registers)
1596 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
1597 (ppc_linux_insert_mask_watchpoint)
1598 (ppc_linux_remove_mask_watchpoint)
1599 (ppc_linux_can_accel_watchpoint_condition)
1600 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
1601 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
1602 (ppc_linux_watchpoint_addr_within_range)
1603 (ppc_linux_masked_watch_num_registers)
1604 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
1605 (ppc_linux_read_description): Refactor as methods of
1606 ppc_linux_nat_target.
1607 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
1608
1609 * procfs.c (procfs_xfer_partial): Delete forward declaration.
1610 (procfs_target): New class.
1611 (the_procfs_target): New.
1612 (procfs_target): Delete function.
1613 (procfs_auxv_parse, procfs_attach, procfs_detach)
1614 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
1615 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
1616 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
1617 (procfs_create_inferior, procfs_update_thread_list)
1618 (procfs_thread_alive, procfs_pid_to_str)
1619 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
1620 (procfs_stopped_data_address, procfs_insert_watchpoint)
1621 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
1622 (proc_find_memory_regions, procfs_info_proc)
1623 (procfs_make_note_section): Refactor as methods of procfs_target.
1624 (_initialize_procfs): Adjust.
1625 * sol-thread.c (sol_thread_target): New class.
1626 (sol_thread_ops): Now a sol_thread_target.
1627 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
1628 (sol_thread_fetch_registers, sol_thread_store_registers)
1629 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
1630 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
1631 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
1632 (init_sol_thread_ops): Delete.
1633 (_initialize_sol_thread): Adjust. Remove references to
1634 init_sol_thread_ops and complete_target_initialization.
1635
1636 * windows-nat.c (windows_nat_target): New class.
1637 (windows_fetch_inferior_registers)
1638 (windows_store_inferior_registers, windows_resume, windows_wait)
1639 (windows_attach, windows_detach, windows_pid_to_exec_file)
1640 (windows_files_info, windows_create_inferior)
1641 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
1642 (windows_close, windows_pid_to_str, windows_xfer_partial)
1643 (windows_get_tib_address, windows_get_ada_task_ptid)
1644 (windows_thread_name, windows_thread_alive): Refactor as
1645 windows_nat_target methods.
1646 (do_initial_windows_stuff): Adjust.
1647 (windows_target): Delete function.
1648 (_initialize_windows_nat): Adjust.
1649
1650 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
1651 (darwin_mourn_inferior, darwin_kill_inferior)
1652 (darwin_create_inferior, darwin_attach, darwin_detach)
1653 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
1654 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
1655 (darwin_supports_multi_process): Refactor as darwin_nat_target
1656 methods.
1657 (darwin_resume_to, darwin_files_info): Delete.
1658 (_initialize_darwin_inferior): Rename to ...
1659 (_initialize_darwin_nat): ... this. Adjust to C++ification.
1660 * darwin-nat.h: Include "inf-child.h".
1661 (darwin_nat_target): New class.
1662 (darwin_complete_target): Delete.
1663 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
1664 (darwin_target): New.
1665 (i386_darwin_fetch_inferior_registers)
1666 (i386_darwin_store_inferior_registers): Refactor as methods of
1667 darwin_nat_target.
1668 (darwin_complete_target): Delete, with ...
1669 (_initialize_i386_darwin_nat): ... bits factored out here.
1670
1671 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
1672 (the_alpha_linux_nat_target): New.
1673 (alpha_linux_register_u_offset): Refactor as
1674 alpha_linux_nat_target method.
1675 (_initialize_alpha_linux_nat): Adjust.
1676 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
1677 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1678 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
1679 methods of linux_nat_trad_target.
1680 (linux_trad_target): Delete.
1681 * linux-nat-trad.h (linux_trad_target): Delete function.
1682 (linux_nat_trad_target): New class.
1683 * mips-linux-nat.c (mips_linux_nat_target): New class.
1684 (super_fetch_registers, super_store_registers, super_close):
1685 Delete.
1686 (the_mips_linux_nat_target): New.
1687 (mips64_linux_regsets_fetch_registers)
1688 (mips64_linux_regsets_store_registers)
1689 (mips64_linux_fetch_registers, mips64_linux_store_registers)
1690 (mips_linux_register_u_offset, mips_linux_read_description)
1691 (mips_linux_can_use_hw_breakpoint)
1692 (mips_linux_stopped_by_watchpoint)
1693 (mips_linux_stopped_data_address)
1694 (mips_linux_region_ok_for_hw_watchpoint)
1695 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
1696 (mips_linux_close): Refactor as methods of mips_linux_nat.
1697 (_initialize_mips_linux_nat): Adjust to C++ification.
1698
1699 * aix-thread.c (aix_thread_target): New class.
1700 (aix_thread_ops): Now an aix_thread_target.
1701 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
1702 (aix_thread_fetch_registers, aix_thread_store_registers)
1703 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
1704 (aix_thread_thread_alive, aix_thread_pid_to_str)
1705 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
1706 Refactor as methods of aix_thread_target.
1707 (init_aix_thread_ops): Delete.
1708 (_initialize_aix_thread): Remove references to init_aix_thread_ops
1709 and complete_target_initialization.
1710 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
1711 (rs6000_nat_target): New class.
1712 (the_rs6000_nat_target): New.
1713 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
1714 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
1715 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
1716 (super_create_inferior): Delete.
1717 (_initialize_rs6000_nat): Adjust to C++ification.
1718
1719 * arm-linux-nat.c (arm_linux_nat_target): New class.
1720 (the_arm_linux_nat_target): New.
1721 (arm_linux_fetch_inferior_registers)
1722 (arm_linux_store_inferior_registers, arm_linux_read_description)
1723 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
1724 (arm_linux_remove_hw_breakpoint)
1725 (arm_linux_region_ok_for_hw_watchpoint)
1726 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
1727 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
1728 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
1729 arm_linux_nat_target.
1730 (_initialize_arm_linux_nat): Adjust to C++ification.
1731
1732 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
1733 (the_aarch64_linux_nat_target): New.
1734 (aarch64_linux_fetch_inferior_registers)
1735 (aarch64_linux_store_inferior_registers)
1736 (aarch64_linux_child_post_startup_inferior)
1737 (aarch64_linux_read_description)
1738 (aarch64_linux_can_use_hw_breakpoint)
1739 (aarch64_linux_insert_hw_breakpoint)
1740 (aarch64_linux_remove_hw_breakpoint)
1741 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
1742 (aarch64_linux_region_ok_for_hw_watchpoint)
1743 (aarch64_linux_stopped_data_address)
1744 (aarch64_linux_stopped_by_watchpoint)
1745 (aarch64_linux_watchpoint_addr_within_range)
1746 (aarch64_linux_can_do_single_step): Refactor as methods of
1747 aarch64_linux_nat_target.
1748 (super_post_startup_inferior): Delete.
1749 (_initialize_aarch64_linux_nat): Adjust to C++ification.
1750
1751 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
1752 (the_hppa_linux_nat_target): New.
1753 (hppa_linux_fetch_inferior_registers)
1754 (hppa_linux_store_inferior_registers): Refactor as methods of
1755 hppa_linux_nat_target.
1756 (_initialize_hppa_linux_nat): Adjust to C++ification.
1757
1758 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
1759 (the_ia64_linux_nat_target): New.
1760 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
1761 (ia64_linux_stopped_data_address)
1762 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
1763 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
1764 ia64_linux_nat_target methods.
1765 (super_xfer_partial): Delete.
1766 (_initialize_ia64_linux_nat): Adjust to C++ification.
1767
1768 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
1769 (the_m32r_linux_nat_target): New.
1770 (m32r_linux_fetch_inferior_registers)
1771 (m32r_linux_store_inferior_registers): Refactor as
1772 m32r_linux_nat_target methods.
1773 (_initialize_m32r_linux_nat): Adjust to C++ification.
1774
1775 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
1776 (the_m68k_linux_nat_target): New.
1777 (m68k_linux_fetch_inferior_registers)
1778 (m68k_linux_store_inferior_registers): Refactor as
1779 m68k_linux_nat_target methods.
1780 (_initialize_m68k_linux_nat): Adjust to C++ification.
1781
1782 * s390-linux-nat.c (s390_linux_nat_target): New class.
1783 (the_s390_linux_nat_target): New.
1784 (s390_linux_fetch_inferior_registers)
1785 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
1786 (s390_insert_watchpoint, s390_remove_watchpoint)
1787 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
1788 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
1789 (s390_auxv_parse, s390_read_description): Refactor as methods of
1790 s390_linux_nat_target.
1791 (_initialize_s390_nat): Adjust to C++ification.
1792
1793 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
1794 (the_sparc_linux_nat_target): New.
1795 (_initialize_sparc_linux_nat): Adjust to C++ification.
1796 * sparc-nat.c (sparc_fetch_inferior_registers)
1797 (sparc_store_inferior_registers): Remove target_ops parameter.
1798 * sparc-nat.h (sparc_fetch_inferior_registers)
1799 (sparc_store_inferior_registers): Remove target_ops parameter.
1800 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
1801 (the_sparc64_linux_nat_target): New.
1802 (_initialize_sparc64_linux_nat): Adjust to C++ification.
1803
1804 * spu-linux-nat.c (spu_linux_nat_target): New class.
1805 (the_spu_linux_nat_target): New.
1806 (spu_child_post_startup_inferior, spu_child_post_attach)
1807 (spu_child_wait, spu_fetch_inferior_registers)
1808 (spu_store_inferior_registers, spu_xfer_partial)
1809 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
1810 methods.
1811 (_initialize_spu_nat): Adjust to C++ification.
1812
1813 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
1814 (the_tilegx_linux_nat_target): New.
1815 (fetch_inferior_registers, store_inferior_registers):
1816 Refactor as methods.
1817 (_initialize_tile_linux_nat): Adjust to C++ification.
1818
1819 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
1820 (the_xtensa_linux_nat_target): New.
1821 (xtensa_linux_fetch_inferior_registers)
1822 (xtensa_linux_store_inferior_registers): Refactor as
1823 xtensa_linux_nat_target methods.
1824 (_initialize_xtensa_linux_nat): Adjust to C++ification.
1825
1826 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
1827 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
1828 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
1829 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
1830 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
1831 (fbsd_stopped_by_sw_breakpoint)
1832 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
1833 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
1834 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
1835 (fbsd_post_startup_inferior, fbsd_post_attach)
1836 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
1837 (fbsd_set_syscall_catchpoint)
1838 (super_xfer_partial, super_resume, super_wait)
1839 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
1840 (fbsd_handle_debug_trap): Remove target_ops parameter.
1841 (fbsd_nat_add_target): Delete.
1842 * fbsd-nat.h: Include "inf-ptrace.h".
1843 (fbsd_nat_add_target): Delete.
1844 (USE_SIGTRAP_SIGINFO): Define.
1845 (fbsd_nat_target): New class.
1846
1847 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
1848 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
1849 (amd64bsd_target): Delete.
1850 * amd64-bsd-nat.h: New file.
1851 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
1852 "x86-bsd-nat.h".
1853 (amd64_fbsd_nat_target): New class.
1854 (the_amd64_fbsd_nat_target): New.
1855 (amd64fbsd_read_description): Refactor as method of
1856 amd64_fbsd_nat_target.
1857 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1858 (_initialize_amd64fbsd_nat): Adjust to C++ification.
1859 * amd64-nat.h (amd64bsd_target): Delete function declaration.
1860 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
1861 (i386bsd_store_inferior_registers): Remove target_ops parameter.
1862 (i386bsd_target): Delete.
1863 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
1864 (i386bsd_fetch_inferior_registers)
1865 (i386bsd_store_inferior_registers): Declare.
1866 (i386_bsd_nat_target): New class.
1867 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
1868 (the_i386_fbsd_nat_target): New.
1869 (i386fbsd_resume, i386fbsd_read_description): Refactor as
1870 i386_fbsd_nat_target methods.
1871 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1872 (_initialize_i386fbsd_nat): Adjust to C++ification.
1873 * x86-bsd-nat.c (super_mourn_inferior): Delete.
1874 (x86bsd_mourn_inferior, x86bsd_target): Delete.
1875 (_initialize_x86_bsd_nat): Adjust to C++ification.
1876 * x86-bsd-nat.h: Include "x86-nat.h".
1877 (x86bsd_target): Delete declaration.
1878 (x86bsd_nat_target): New class.
1879
1880 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
1881 (the_aarch64_fbsd_nat_target): New.
1882 (aarch64_fbsd_fetch_inferior_registers)
1883 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
1884 aarch64_fbsd_nat_target.
1885 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
1886 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
1887 (the_alpha_bsd_nat_target): New.
1888 (alphabsd_fetch_inferior_registers)
1889 (alphabsd_store_inferior_registers): Refactor as
1890 alpha_bsd_nat_target methods.
1891 (_initialize_alphabsd_nat): Refactor as methods of
1892 alpha_bsd_nat_target.
1893 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
1894 (the_amd64_nbsd_nat_target): New.
1895 (_initialize_amd64nbsd_nat): Adjust to C++ification.
1896 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
1897 (the_amd64_obsd_nat_target): New.
1898 (_initialize_amd64obsd_nat): Adjust to C++ification.
1899 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
1900 (the_arm_fbsd_nat_target): New.
1901 (arm_fbsd_fetch_inferior_registers)
1902 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
1903 (_initialize_arm_fbsd_nat): Refactor as methods of
1904 arm_fbsd_nat_target.
1905 (_initialize_arm_fbsd_nat): Adjust to C++ification.
1906 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
1907 (the_arm_netbsd_nat_target): New.
1908 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
1909 arm_netbsd_nat_target.
1910 (_initialize_arm_netbsd_nat): Adjust to C++ification.
1911 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
1912 (the_hppa_nbsd_nat_target): New.
1913 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
1914 hppa_nbsd_nat_target methods.
1915 (_initialize_hppanbsd_nat): Adjust to C++ification.
1916 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
1917 (the_hppa_obsd_nat_target): New.
1918 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
1919 methods of hppa_obsd_nat_target.
1920 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
1921 add_target.
1922 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
1923 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
1924 add_target.
1925 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
1926 (_initialize_i386obsd_nat): Use add_target.
1927 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
1928 (the_m68k_bsd_nat_target): New.
1929 (m68kbsd_fetch_inferior_registers)
1930 (m68kbsd_store_inferior_registers): Refactor as methods of
1931 m68k_bsd_nat_target.
1932 (_initialize_m68kbsd_nat): Adjust to C++ification.
1933 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
1934 (the_mips_fbsd_nat_target): New.
1935 (mips_fbsd_fetch_inferior_registers)
1936 (mips_fbsd_store_inferior_registers): Refactor as methods of
1937 mips_fbsd_nat_target.
1938 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
1939 add_target.
1940 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
1941 (the_mips_nbsd_nat_target): New.
1942 (mipsnbsd_fetch_inferior_registers)
1943 (mipsnbsd_store_inferior_registers): Refactor as methods of
1944 mips_nbsd_nat_target.
1945 (_initialize_mipsnbsd_nat): Adjust to C++ification.
1946 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
1947 (the_mips64_obsd_nat_target): New.
1948 (mips64obsd_fetch_inferior_registers)
1949 (mips64obsd_store_inferior_registers): Refactor as methods of
1950 mips64_obsd_nat_target.
1951 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
1952 add_target.
1953 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
1954 nbsd_nat_target.
1955 * nbsd-nat.h: Include "inf-ptrace.h".
1956 (nbsd_nat_target): New class.
1957 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
1958 (obsd_wait): Refactor as methods of obsd_nat_target.
1959 (obsd_add_target): Delete.
1960 * obsd-nat.h: Include "inf-ptrace.h".
1961 (obsd_nat_target): New class.
1962 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
1963 (the_ppc_fbsd_nat_target): New.
1964 (ppcfbsd_fetch_inferior_registers)
1965 (ppcfbsd_store_inferior_registers): Refactor as methods of
1966 ppc_fbsd_nat_target.
1967 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
1968 add_target.
1969 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
1970 (the_ppc_nbsd_nat_target): New.
1971 (ppcnbsd_fetch_inferior_registers)
1972 (ppcnbsd_store_inferior_registers): Refactor as methods of
1973 ppc_nbsd_nat_target.
1974 (_initialize_ppcnbsd_nat): Adjust to C++ification.
1975 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
1976 (the_ppc_obsd_nat_target): New.
1977 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
1978 methods of ppc_obsd_nat_target.
1979 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
1980 add_target.
1981 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
1982 (the_sh_nbsd_nat_target): New.
1983 (shnbsd_fetch_inferior_registers)
1984 (shnbsd_store_inferior_registers): Refactor as methods of
1985 sh_nbsd_nat_target.
1986 (_initialize_shnbsd_nat): Adjust to C++ification.
1987 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
1988 (inf_ptrace_xfer_partial): Delete.
1989 (sparc_xfer_partial, sparc_target): Delete.
1990 * sparc-nat.h (sparc_fetch_inferior_registers)
1991 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
1992 (sparc_target): Delete function declaration.
1993 (sparc_target): New template class.
1994 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
1995 (_initialize_sparcnbsd_nat): Adjust to C++ification.
1996 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
1997 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
1998 add_target.
1999 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
2000 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
2001 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
2002 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
2003 add_target.
2004 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
2005 (the_vax_bsd_nat_target): New.
2006 (vaxbsd_fetch_inferior_registers)
2007 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
2008 methods.
2009 (_initialize_vaxbsd_nat): Adjust to C++ification.
2010
2011 * bsd-kvm.c (bsd_kvm_target): New class.
2012 (bsd_kvm_ops): Now a bsd_kvm_target.
2013 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
2014 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
2015 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
2016 bsd_kvm_target.
2017 (bsd_kvm_return_one): Delete.
2018 (bsd_kvm_add_target): Adjust to C++ification.
2019
2020 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
2021 (nto_procfs_target_procfs): New classes.
2022 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
2023 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
2024 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
2025 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
2026 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
2027 (procfs_remove_hw_breakpoint, procfs_resume)
2028 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
2029 (procfs_kill_inferior, procfs_store_registers)
2030 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
2031 as methods of nto_procfs_target.
2032 (nto_procfs_ops): Now an nto_procfs_target_procfs.
2033 (nto_native_ops): Delete.
2034 (procfs_open, procfs_native_open): Delete.
2035 (nto_native_ops): Now an nto_procfs_target_native.
2036 (init_procfs_targets): Adjust to C++ification.
2037 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
2038 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
2039 Refactor as methods of nto_procfs_target.
2040
2041 * go32-nat.c (go32_nat_target): New class.
2042 (the_go32_nat_target): New.
2043 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
2044 (go32_store_registers, go32_xfer_partial, go32_files_info)
2045 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
2046 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
2047 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
2048 (go32_pid_to_str): Refactor as methods of go32_nat_target.
2049 (go32_target): Delete.
2050 (_initialize_go32_nat): Adjust to C++ification.
2051
2052 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
2053 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
2054 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
2055 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
2056 gnu_nat_target.
2057 (gnu_target): Delete.
2058 * gnu-nat.h (gnu_target): Delete.
2059 (gnu_nat_target): New class.
2060 * i386-gnu-nat.c (gnu_base_target): New.
2061 (i386_gnu_nat_target): New class.
2062 (the_i386_gnu_nat_target): New.
2063 (_initialize_i386gnu_nat): Adjust to C++ification.
2064
3fffc070
PA
20652018-05-02 Pedro Alves <palves@redhat.com>
2066
2067 * bfd-target.c (target_bfd_xclose): Rename to ...
2068 (target_bfd_close): ... this.
2069 (target_bfd_reopen): Adjust.
2070 * target.c (target_close): Remove references to to_xclose.
2071 * target.h (target_ops::to_xclose): Delete.
2072 (target_ops::to_close): Update comments.
2073
6798487f
PA
20742018-05-02 Pedro Alves <palves@redhat.com>
2075
2076 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
2077 "linux-nat.h".
2078 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
2079 * inf-ptrace.c (inf_ptrace_register_u_offset)
2080 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
2081 (inf_ptrace_store_register, inf_ptrace_store_registers)
2082 (inf_ptrace_trad_target): Move to ...
2083 * linux-nat-trad.c: ... this new file.
2084 * linux-nat-trad.h: New file.
2085 * linux-nat.c (linux_target_install_ops): Make extern.
2086 (linux_trad_target): Delete.
2087 * linux-nat.h (linux_trad_target): Delete declaration.
2088 (linux_target_install_ops): Declare.
2089 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
2090 "linux-nat.h".
2091
c1955e17
PA
20922018-05-02 Pedro Alves <palves@redhat.com>
2093
2094 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
2095 procfs_target/add_target here.
2096 * procfs.c (procfs_target): Make static.
2097 (_initialize_procfs): Call add_target here.
2098 * procfs.h (struct target_ops): Remove forward declaration.
2099 (procfs_target): Remove declaration.
2100 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
2101
b5c8fcb1
PA
21022018-05-02 Pedro Alves <palves@redhat.com>
2103
2104 * procfs.c (procfs_stopped_by_watchpoint)
2105 (procfs_insert_watchpoint, procfs_remove_watchpoint)
2106 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
2107 Forward declare.
2108 (procfs_use_watchpoints): Delete, move contents...
2109 (procfs_target): ... here.
2110 * procfs.h (procfs_use_watchpoints): Delete declaration.
2111 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
2112 procfs_use_watchpoints.
2113 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
2114 procfs_use_watchpoints.
2115
0489430a
TT
21162018-05-02 Tom Tromey <tom@tromey.com>
2117
2118 PR python/20084:
2119 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
2120 and var_zuinteger_unlimited.
2121 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
2122 and PARAM_ZUINTEGER_UNLIMITED.
2123 (set_parameter_value): Handle var_zuinteger and
2124 var_zuinteger_unlimited.
2125 (add_setshow_generic): Likewise.
2126 (parmpy_init): Likewise.
2127
1632f8ba
DR
21282018-04-28 Dan Robertson <danlrobertson89@gmail.com>
2129
2130 PR rust/23124
2131 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
2132 pointer is not null before dereferencing it.
2133
76761936
TT
21342018-04-30 Tom Tromey <tom@tromey.com>
2135
2136 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
2137 is_mi_like_p.
2138
2d33446d
TT
21392018-04-30 Tom Tromey <tom@tromey.com>
2140
2141 * breakpoint.c (mention): Remove use of is_mi_like_p.
2142 (print_mention_ranged_breakpoint): Likewise.
2143 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
2144 of is_mi_like_p.
2145
f3c6abab
TT
21462018-04-30 Tom Tromey <tom@tromey.com>
2147
2148 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
2149
40c03530
TT
21502018-04-30 Tom Tromey <tom@tromey.com>
2151
2152 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
2153 (info_spu_event_command): Remove some uses of is_mi_like_p.
2154
2038b7fd
TT
21552018-04-30 Tom Tromey <tom@tromey.com>
2156
2157 * python/py-framefilter.c (py_print_single_arg)
2158 (enumerate_locals, py_print_args, py_print_frame): Remove some
2159 uses of is_mi_like_p.
2160
4904c3c6
TT
21612018-04-30 Tom Tromey <tom@tromey.com>
2162
2163 * ui-out.c: Update.
2164 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
2165 * ui-out.h (ui_out::is_mi_like_p): Now const.
2166 (ui_out::do_is_mi_like_p): Now const.
2167 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
2168
7c66fffc
TT
21692018-04-30 Tom Tromey <tom@tromey.com>
2170
2171 * varobj.c (varobj_set_visualizer): Use new_reference.
2172 * python/python.c (gdbpy_decode_line): Use new_reference.
2173 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
2174 new_reference.
2175
bbfa6f00
TT
21762018-04-30 Tom Tromey <tom@tromey.com>
2177
2178 * varobj.c (install_new_value): Use new_reference.
2179 * value.h (value_incref): Return void. Swap intro comment with
2180 value_decref.
2181 * value.c (set_value_parent): Use new_reference.
2182 (value_incref): Return void. Update intro comment.
2183 (release_value): Use new_reference.
2184 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
2185
1831a9f9
TT
21862018-04-30 Tom Tromey <tom@tromey.com>
2187
2188 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
2189 * gdb_bfd.h (new_bfd_ref): Remove.
2190 (gdb_bfd_open): Update comment.
2191 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2192 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
2193 (gdb_bfd_fdopenr): Use new_reference.
2194 * exec.c (exec_file_attach): Use new_reference.
2195
7c1b5f3d
TT
21962018-04-30 Tom Tromey <tom@tromey.com>
2197
2198 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
2199 method.
2200
e11fb955
TT
22012018-04-30 Tom Tromey <tom@tromey.com>
2202
2203 * jit.c (jit_read_code_entry): Use type_align.
2204 * i386-tdep.c (i386_gdbarch_init): Don't call
2205 set_gdbarch_long_long_align_bit.
2206 * gdbarch.sh: Remove long_long_align_bit.
2207 * gdbarch.c, gdbarch.h: Rebuild.
2208 * arc-tdep.c (arc_type_align): New function.
2209 (arc_gdbarch_init): Use arc_type_align. Don't call
2210 set_gdbarch_long_long_align_bit.
2211
2fff16dd
TT
22122018-04-30 Tom Tromey <tom@tromey.com>
2213
2214 * rust-lang.c (rust_type_alignment): Remove.
2215 (rust_composite_type): Use type_align.
2216
6d7bb824
TT
22172018-04-30 Tom Tromey <tom@tromey.com>
2218
2219 * NEWS: Mention Type.align.
2220 * python/py-type.c (typy_get_alignof): New function.
2221 (type_object_getset): Add "alignof".
2222
007e1530
TT
22232018-04-30 Tom Tromey <tom@tromey.com>
2224
2225 PR exp/17095:
2226 * NEWS: Update.
2227 * std-operator.def (UNOP_ALIGNOF): New operator.
2228 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
2229 New.
2230 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
2231 * c-lang.c (c_op_print_tab): Add alignof.
2232 * c-exp.y (ALIGNOF): New token.
2233 (exp): Add "ALIGNOF" production.
2234 (ident_tokens): Add _Alignof and alignof.
2235
2b4424c3
TT
22362018-04-30 Tom Tromey <tom@tromey.com>
2237
2238 * i386-tdep.c (i386_type_align): New function.
2239 (i386_gdbarch_init): Update.
2240 * gdbarch.sh (type_align): New method.
2241 * gdbarch.c, gdbarch.h: Rebuild.
2242 * arch-utils.h (default_type_align): Declare.
2243 * arch-utils.c (default_type_align): New function.
2244 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
2245 (struct type) <align_log2>: New field.
2246 <instance_flags>: Now a bitfield.
2247 (TYPE_RAW_ALIGN): New macro.
2248 (type_align, type_raw_align, set_type_align): Declare.
2249 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
2250 functions.
2251 * dwarf2read.c (quirk_rust_enum): Set type alignment.
2252 (get_alignment, maybe_set_alignment): New functions.
2253 (read_structure_type, read_enumeration_type, read_array_type)
2254 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
2255 (read_subrange_type, read_base_type): Set type alignment.
2256
d33bc52e
SM
22572018-04-30 Simon Marchi <simon.marchi@ericsson.com>
2258
2259 * dwarf2read.c (read_index_from_section): Use bool.
2260
e28b63a9
FG
22612018-04-29 Fabian Groffen <grobian@gentoo.org>
2262
2263 PR gdb/22950
2264 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
2265 with #ifdef.
2266
cd8c76e4
JR
22672018-04-29 John Reiser <jreiser@BitWagon.com>
2268
2269 PR build/22873
2270 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
2271 last step, and do it atomically.
2272
476d250e
AO
22732018-04-27 Alexandre Oliva <aoliva@redhat.com>
2274
2275 * compile/compile-c-types.c (convert_int, convert_float):
2276 Update for C FE v1.
2277
6873858b
TT
22782018-04-27 Tom Tromey <tom@tromey.com>
2279
2280 PR rust/22545:
2281 * rust-lang.c (rust_inclusive_range_type_p): New function.
2282 (rust_range): Handle inclusive ranges.
2283 (rust_compute_range): Likewise.
2284 * rust-exp.y (struct rust_op) <inclusive>: New field.
2285 (DOTDOTEQ): New constant.
2286 (range_expr): Add "..=" productions.
2287 (operator_tokens): Add "..=" token.
2288 (ast_range): Add "inclusive" parameter.
2289 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
2290 ranges.
2291 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
2292 bounds values.
2293 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
2294 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
2295 Update comments.
2296 * expprint.c (print_subexp_standard): Handle new bounds values.
2297 (dump_subexp_body_standard): Likewise.
2298
632e107b
TT
22992018-04-27 Tom Tromey <tom@tromey.com>
2300
2301 * configure: Rebuild.
2302 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
2303 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
2304 "OVERRIDE".
2305 (class symbol_needs_eval_context): Likewise.
2306 * dwarf2read.c (mock_mapped_index::symbol_name_count)
2307 (mock_mapped_index::symbol_name_at): Use "override". Remove
2308 "virtual".
2309 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
2310 "override".
2311 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
2312 * aarch64-tdep.c (instruction_reader::read): Use "override".
2313 (instruction_reader_test::read): Likewise.
2314 * arm-tdep.c (instruction_reader::read): Use "override".
2315 (instruction_reader_thumb::read): Likewise.
2316
b75abf5b
AK
23172018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2318
2319 PR remote/9665
2320 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
2321 instead of remote_send.
2322 (remote_send): Remove.
2323
79188d8d
PA
23242018-04-26 Pedro Alves <palves@redhat.com>
2325
2326 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
2327 find_function_start_sal instead of find_pc_line.
2328
f50776aa
PA
23292018-04-26 Pedro Alves <palves@redhat.com>
2330
2331 * breakpoint.c (set_breakpoint_location_function): Handle
2332 mst_data_gnu_ifunc.
2333 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
2334 * elfread.c (elf_symtab_read): Give data symbols with
2335 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
2336 (elf_rel_plt_read): Update comment.
2337 * linespec.c (convert_linespec_to_sals): Handle
2338 mst_data_gnu_ifunc.
2339 (minsym_found): Handle mst_data_gnu_ifunc.
2340 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
2341 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
2342 * parse.c (find_minsym_type_and_address): Handle
2343 mst_data_gnu_ifunc.
2344 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
2345 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
2346 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
2347 comment.
2348 <mst_data_gnu_ifunc>: New enumerator.
2349
20944a6e
PA
23502018-04-26 Pedro Alves <palves@redhat.com>
2351
2352 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
2353 (lookup_minimal_symbol_by_pc_section): ... this. Replace
2354 'want_trampoline' parameter by a lookup_msym_prefer parameter.
2355 Handle it.
2356 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
2357 (lookup_minimal_symbol_by_pc): Adjust.
2358 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
2359 (lookup_solib_trampoline_symbol_by_pc): Adjust.
2360 * minsyms.h (lookup_msym_prefer): New enum.
2361 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2362 parameter by a lookup_msym_prefer parameter.
2363
1adeb822
PA
23642018-04-26 Pedro Alves <palves@redhat.com>
2365
2366 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
2367 ends in "@plt" instead of looking at the symbol's section.
2368
a0aca7b0
PA
23692018-04-26 Pedro Alves <palves@redhat.com>
2370
2371 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
2372 all references.
2373 (find_pc_partial_function_gnu_ifunc): Rename to ...
2374 (find_pc_partial_function): ... this, and remove references to
2375 'is_gnu_ifunc_p'.
2376 (find_pc_partial_function): Delete old implementation.
2377 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
2378
76af0f26
PA
23792018-04-26 Pedro Alves <palves@redhat.com>
2380
2381 * linespec.c (struct bound_minimal_symbol_search_key): New.
2382 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
2383 skip first line if we found a GNU ifunc minimal symbol by name.
2384 (compare_msymbols): Change parameters to work with a destructured
2385 lhs minsym.
2386 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
2387 functions.
2388
3467ec66
PA
23892018-04-26 Pedro Alves <palves@redhat.com>
2390
2391 * breakpoint.c (set_breakpoint_location_function): Don't resolve
2392 ifunc targets here. Instead, if we have an ifunc minsym, use its
2393 address/name.
2394 (add_location_to_breakpoint): Store the minsym and the objfile in
2395 the breakpoint location.
2396 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
2397 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
2398 Record the minsym in the sal.
2399 * symtab.h (symtab_and_line) <msymbol>: New field.
2400
28f4fa4d
PA
24012018-04-26 Pedro Alves <palves@redhat.com>
2402
2403 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
2404 unless we actually resolved the ifunc.
2405
ca31ab1d
PA
24062018-04-26 Pedro Alves <palves@redhat.com>
2407
2408 * c-exp.y (variable production): Prefer ifunc minsyms over
2409 regular function symbols.
2410 * symtab.c (find_gnu_ifunc): New function.
2411 * minsyms.h (lookup_msym_prefer): New enum.
2412 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2413 parameter by a lookup_msym_prefer parameter.
2414 * symtab.h (find_gnu_ifunc): New declaration.
2415
8388016d
PA
24162018-04-26 Pedro Alves <palves@redhat.com>
2417
2418 * blockframe.c (find_gnu_ifunc_target_type): New function.
2419 (find_function_type): New.
2420 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
2421 return a value with a memory address.
2422 (eval_call): For calls to GNU ifunc functions, try to find the
2423 type of the target function from the type that the resolver
2424 returns.
2425 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
2426 symbols.
2427 * infcall.c (find_function_return_type): Delete.
2428 (find_function_addr): Add 'function_type' parameter. For calls to
2429 GNU ifunc functions, try to find the type of the target function
2430 from the type that the resolver returns, and return it via
2431 FUNCTION_TYPE.
2432 (call_function_by_hand_dummy): Adjust to use the function type
2433 returned by find_function_addr.
2434 (find_function_addr): Add 'function_type' parameter and move
2435 description here.
2436 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
2437 declarations.
2438
a376e11d
PA
24392018-04-26 Pedro Alves <palves@redhat.com>
2440
2441 * c-exp.y (variable production): Skip finding an alias for ifunc
2442 symbols.
2443
02e169e2
PA
24442018-04-26 Pedro Alves <palves@redhat.com>
2445
2446 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
2447
249b5733
PA
24482018-04-25 Pedro Alves <palves@redhat.com>
2449
2450 * infcmd.c (kill_command): Print the pid as string, not the whole
2451 thread's ptid. Add comment. s/has been killed/killed/ in output
2452 message.
2453 * remote.c (remote_detach_1): Print the pid as string, not the
2454 whole thread's ptid.
2455
f67c0c91
SDJ
24562018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2457 Sergio Durigan Junior <sergiodj@redhat.com>
2458 Pedro Alves <palves@redhat.com>
2459
2460 * infcmd.c (kill_command): Print message when inferior has
2461 been killed.
2462 * inferior.c (print_inferior_events): Remove 'static'. Set as
2463 '1'.
2464 (add_inferior): Improve message printed when
2465 'print_inferior_events' is on.
2466 (exit_inferior): Remove message printed when
2467 'print_inferior_events' is on.
2468 (detach_inferior): Improve message printed when
2469 'print_inferior_events' is on.
2470 (initialize_inferiors): Use 'add_inferior_silent' to set
2471 'current_inferior_'.
2472 * inferior.h (print_inferior_events): Declare here as
2473 'extern'.
2474 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
2475 '[Detaching...]' messages when 'print_inferior_events' is on.
2476 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
2477 as prefix/suffix for messages. Remove periods. Fix erroneous
2478 'Detaching after fork from child...', replace it by '... from
2479 parent...'.
2480 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
2481 prefix/suffix when printing 'Detaching...' messages. Print
2482 them when 'print_inferior_events' is on.
2483 * remote.c (remote_detach_1): Print message when detaching
2484 from inferior and '!is_fork_parent'.
2485
e427af18
TT
24862018-04-24 Tom Tromey <tom@tromey.com>
2487
2488 * cli-out.h: Reindent.
2489
05b1d8d6
TT
24902018-04-24 Tom Tromey <tom@tromey.com>
2491
2492 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
2493 (cli_ui_out::do_field_string): Use fputs_filtered.
2494 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
2495
a95c7dab
TT
24962018-04-23 Tom Tromey <tom@tromey.com>
2497
2498 * guile/scm-frame.c (gdbscm_frame_read_var): Use
2499 gdb::unique_xmalloc_ptr.
2500
458412c3
TT
25012018-04-23 Tom Tromey <tom@tromey.com>
2502
2503 * configure: Rebuild.
2504
db86b02b
RS
25052018-04-22 Rajendra SY <rajendra.sy@gmail.com>
2506
2507 PR gdb/23095
2508 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
2509 prepare_for_testing. Set normal_bp to r_debug_state if target
2510 is bsd.
2511
00aecdcf
PA
25122018-04-21 Pedro Alves <palves@redhat.com>
2513 Rajendra SY <rajendra.sy@gmail.com>
2514
2515 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
2516 * remote.c (extended_remote_attach): In all-stop mode, mark the
2517 thread as executing.
2518
224608c3
PW
25192018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2520
2521 * thread.c (thread_apply_all_command): Fix comment.
2522 (thread_command): Fix comment.
2523
3b74854b
AH
25242018-04-10 Alan Hayward <alan.hayward@arm.com>
2525
2526 * common/tdesc.h (tdesc_create_feature): Remove xml filename
2527 parameter.
2528 * features/aarch64-core.c (create_feature_aarch64_core):
2529 Regenerate.
2530 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
2531 Likewise.
2532 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
2533 Likewise.
2534 * features/i386/32bit-avx512.c
2535 (create_feature_i386_32bit_avx512): Likewise.
2536 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
2537 Likewise.
2538 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
2539 Likewise.
2540 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
2541 Likewise.
2542 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
2543 Likewise.
2544 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
2545 Likewise.
2546 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
2547 Likewise.
2548 * features/i386/64bit-avx512.c
2549 (create_feature_i386_64bit_avx512): Likewise.
2550 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
2551 Likewise.
2552 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
2553 Likewise.
2554 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
2555 Likewise.
2556 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
2557 Likewise.
2558 * features/i386/64bit-segments.c
2559 (create_feature_i386_64bit_segments): Likewise.
2560 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
2561 Likewise.
2562 * features/i386/x32-core.c
2563 (create_feature_i386_x32_core): Likewise.
2564 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
2565 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
2566 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
2567 * target-descriptions.c: In generated code, don't pass xml
2568 filename.
2569
e98577a9
AH
25702018-04-18 Alan Hayward <alan.hayward@arm.com>
2571
2572 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
2573 (print_xml_feature::visit_post): Likewise.
2574 (print_xml_feature::visit): Likewise.
2575 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
2576 (print_xml_feature): Add new class.
2577 * regformats/regdat.sh: Null xmltarget on feature targets.
2578 * target-descriptions.c (struct target_desc): Add xmltarget.
2579 (maintenance_check_tdesc_xml_convert): Add unittest function.
2580 (tdesc_get_features_xml): Add function to get xml.
2581 (maintenance_check_xml_descriptions): Test xml generation.
2582 * xml-tdesc.c (string_read_description_xml): Add function.
2583 * xml-tdesc.h (string_read_description_xml): Add declaration.
2584
ad7fc756
AH
25852018-04-18 Alan Hayward <alan.hayward@arm.com>
2586
2587 * features/Makefile: Add feature marker to targets with new style
2588 target descriptions.
2589 * regformats/aarch64.dat: Regenerate.
2590 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
2591 * regformats/i386/amd64-avx-linux.dat: Likewise.
2592 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
2593 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
2594 * regformats/i386/amd64-linux.dat: Likewise.
2595 * regformats/i386/amd64-mpx-linux.dat: Likewise.
2596 * regformats/i386/amd64.dat: Likewise.
2597 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
2598 * regformats/i386/i386-avx-linux.dat: Likewise.
2599 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
2600 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
2601 * regformats/i386/i386-linux.dat: Likewise.
2602 * regformats/i386/i386-mmx-linux.dat: Likewise.
2603 * regformats/i386/i386-mpx-linux.dat: Likewise.
2604 * regformats/i386/i386.dat: Likewise.
2605 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
2606 * regformats/i386/x32-avx-linux.dat: Likewise.
2607 * regformats/i386/x32-linux.dat: Likewise.
2608 * regformats/tic6x-c62x-linux.dat: Likewise.
2609 * regformats/tic6x-c64x-linux.dat: Likewise.
2610 * regformats/tic6x-c64xp-linux.dat: Likewise.
2611 * regformats/regdat.sh: Parse feature marker.
2612
d278f585
AH
26132018-04-18 Alan Hayward <alan.hayward@arm.com>
2614
2615 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
2616 (tdesc_osabi_name): Likewise.
2617 * target-descriptions.c (tdesc_architecture_name): Add new
2618 function.
2619 (tdesc_osabi_name): Likewise.
2620
eee8a18d
AH
26212018-04-18 Alan Hayward <alan.hayward@arm.com>
2622
2623 * common/tdesc.c (tdesc_predefined_type): Move to here.
2624 (tdesc_named_type): Likewise.
2625 (tdesc_create_vector): Likewise.
2626 (tdesc_create_struct): Likewise.
2627 (tdesc_set_struct_size): Likewise.
2628 (tdesc_create_union): Likewise.
2629 (tdesc_create_flags): Likewise.
2630 (tdesc_create_enum): Likewise.
2631 (tdesc_add_field): Likewise.
2632 (tdesc_add_typed_bitfield): Likewise.
2633 (tdesc_add_bitfield): Likewise.
2634 (tdesc_add_flag): Likewise.
2635 (tdesc_add_enum_value): Likewise.
2636 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
2637 (struct tdesc_type_vector): Likewise.
2638 (struct tdesc_type_field): Likewise.
2639 (struct tdesc_type_with_fields): Likewise.
2640 (tdesc_create_enum): Add declaration.
2641 (tdesc_add_typed_bitfield): Likewise.
2642 (tdesc_add_enum_value): Likewise.
2643 * target-descriptions.c (tdesc_type_field): Move from here.
2644 (tdesc_type_builtin): Likewise.
2645 (tdesc_type_vector): Likewise.
2646 (tdesc_type_with_fields): Likewise.
2647 (tdesc_predefined_types): Likewise.
2648 (tdesc_named_type): Likewise.
2649 (tdesc_create_vector): Likewise.
2650 (tdesc_create_struct): Likewise.
2651 (tdesc_set_struct_size): Likewise.
2652 (tdesc_create_union): Likewise.
2653 (tdesc_create_flags): Likewise.
2654 (tdesc_create_enum): Likewise.
2655 (tdesc_add_field): Likewise.
2656 (tdesc_add_typed_bitfield): Likewise.
2657 (tdesc_add_bitfield): Likewise.
2658 (tdesc_add_flag): Likewise.
2659 (tdesc_add_enum_value): Likewise.
2660 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
2661 (tdesc_add_typed_bitfield): Likewise.
2662 (tdesc_add_enum_value): Likewise.
2663
82ec9bc7
AH
26642018-04-18 Alan Hayward <alan.hayward@arm.com>
2665
2666 * common/tdesc.c (tdesc_feature::accept): Move to here.
2667 (tdesc_feature::operator==): Likewise.
2668 (tdesc_create_reg): Likewise.
2669 * common/tdesc.h (tdesc_type_kind): Likewise.
2670 (struct tdesc_type): Likewise.
2671 (struct tdesc_feature): Likewise.
2672 * regformats/regdat.sh: Create a feature.
2673 * target-descriptions.c (tdesc_type_kind): Move from here.
2674 (tdesc_type): Likewise.
2675 (tdesc_type_up): Likewise.
2676 (tdesc_feature): Likewise.
2677 (tdesc_create_reg): Likewise.
2678
ea3e7d71
AH
26792018-04-18 Alan Hayward <alan.hayward@arm.com>
2680
2681 * Makefile.in: Add arch/tdesc.c
2682 * common/tdesc.c: New file.
2683 * common/tdesc.h (tdesc_element_visitor): Move to here.
2684 (tdesc_element): Likewise.
2685 (tdesc_reg): Likewise.
2686 (tdesc_reg_up): Likewise.
2687 * regformats/regdef.h (reg): Add offset to constructors.
2688 * target-descriptions.c (tdesc_element_visitor): Move from here.
2689 (tdesc_element): Likewise.
2690 (tdesc_reg): Likewise.
2691 (tdesc_reg_up): Likewise.
2692
bedda9ac
TT
26932018-04-17 Tom Tromey <tom@tromey.com>
2694
2695 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
2696 discriminant field.
2697
a037790e
TT
26982018-04-17 Tom Tromey <tom@tromey.com>
2699
2700 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
2701
c7dcbf88
AA
27022018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
2703
2704 * symtab.c (print_symbol_info): Skip printing filename and line
2705 number when `last' is NULL.
2706 (symtab_symbol_info): Use empty string instead of NULL for first
2707 invocation of print_symbol_info.
2708 (rbreak_command): Pass NULL to `last' parameter of
2709 print_symbol_info.
2710
07d28c77
SM
27112018-04-16 Simon Marchi <simon.marchi@ericsson.com>
2712
2713 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
2714 instead of nullptr.
2715
8a3de5e1
PA
27162018-04-16 Pedro Alves <palves@redhat.com>
2717
2718 * MAINTAINERS (sh): Remove.
2719 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
2720 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
2721 (ALLDEPFILES): Remove sh64-tdep.c.
2722 * NEWS: Mentions that support for SH-5/SH64 is removed.
2723 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
2724 (sh*-*-openbsd*): Ditto.
2725 (sh64-*-elf*): Remove.
2726 (sh*): Remove.
2727 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
2728 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
2729 * sh-tdep.c: No longer include "sh64-tdep.h".
2730 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
2731 * sh64-tdep.c, sh64-tdep.h: Remove files.
2732
a2a79012
PA
27332018-04-16 Pedro Alves <palves@redhat.com>
2734
2735 * MAINTAINERS: Remove m88k.
2736 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
2737 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
2738 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
2739 * NEWS: Mention that support for m88k was removed.
2740 * configure.host (m88*-*-*): Remove support.
2741 * configure.nat (m88k-*-*): Remove support.
2742 * configure.tgt (m88*-*-openbsd*): Remove.
2743 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
2744
eda4efb1
SM
27452018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
2746
2747 * configure.tgt (x86_tobjs): New variable.
2748 (amd64_tobjs, i386_tobjs): Use it.
2749
b744723f
AA
27502018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2751
2752 * symtab.c (print_symbol_info): Precede the symbol definition by
2753 the line number when available.
2754 * NEWS: Advertise this enhancement.
2755
4a4495d6
MM
27562018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2757
2758 * NEWS (New options): announce set/show record btrace cpu.
2759 * btrace.c: Include record-btrace.h.
2760 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
2761 the vendor is unknown.
2762 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
2763 Maybe overwrite the btrace configuration's cpu.
2764 (btrace_compute_ftrace): Add cpu parameter. Update callers.
2765 (btrace_fetch): Add cpu parameter. Update callers.
2766 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
2767 Maybe overwrite the btrace configuration's cpu. Skip enabling
2768 errata workarounds if the vendor is unknown.
2769 * python/py-record-btrace.c: Include record-btrace.h.
2770 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
2771 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
2772 * record-btrace.c (record_btrace_cpu_state_kind): New.
2773 (record_btrace_cpu): New.
2774 (set_record_btrace_cpu_cmdlist): New.
2775 (record_btrace_get_cpu): New.
2776 (require_btrace_thread, record_btrace_info)
2777 (record_btrace_resume_thread): Call record_btrace_get_cpu.
2778 (cmd_set_record_btrace_cpu_none): New.
2779 (cmd_set_record_btrace_cpu_auto): New.
2780 (cmd_set_record_btrace_cpu): New.
2781 (cmd_show_record_btrace_cpu): New.
2782 (_initialize_record_btrace): Initialize set/show record btrace cpu
2783 commands.
2784 * record-btrace.h (record_btrace_get_cpu): New.
2785
69f90c75
MM
27862018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2787
2788 * record.c (set_record_command): Fix typo in message.
2789
b85310e1
MM
27902018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2791
2792 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
2793
1d509aa6
MM
27942018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2795
2796 * infrun.c (process_event_stop_test): Call
2797 gdbarch_in_indirect_branch_thunk.
2798 * gdbarch.sh (in_indirect_branch_thunk): New.
2799 * gdbarch.c: Regenerated.
2800 * gdbarch.h: Regenerated.
2801 * x86-tdep.h: New.
2802 * x86-tdep.c: New.
2803 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
2804 (HFILES_NO_SRCDIR): Add x86-tdep.h.
2805 (ALLDEPFILES): Add x86-tdep.c.
2806 * arch-utils.h (default_in_indirect_branch_thunk): New.
2807 * arch-utils.c (default_in_indirect_branch_thunk): New.
2808 * i386-tdep: Include x86-tdep.h.
2809 (i386_in_indirect_branch_thunk): New.
2810 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
2811 function.
2812 * amd64-tdep: Include x86-tdep.h.
2813 (amd64_in_indirect_branch_thunk): New.
2814 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
2815
b4be9bfd
JK
28162018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
2817
2818 PR gdb/23053
2819 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
2820 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
2821 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
2822 regression.
2823
53d7df28
TT
28242018-04-12 Tom Tromey <tom@tromey.com>
2825
2826 * rust-lang.c (rust_print_struct_def): Remove univariant code.
2827 (rust_evaluate_subexp): Likewise.
2828
70b33f19
PA
28292018-04-12 Pedro Alves <palves@redhat.com>
2830
2831 * procfs.c (procfs_detach): Make forward declaration's prototype
2832 match definition's protototype.
2833 (proc_get_LDT_entry): Remove stale do_cleanups call.
2834
436411b1
PA
28352018-04-12 Pedro Alves <palves@redhat.com>
2836
2837 * target.h (target_ops::to_has_exited): Delete.
2838 (target_has_exited): Delete.
2839 * target-delegates.c: Regenerate.
2840
20db9c52
PA
28412018-04-11 Pedro Alves <palves@redhat.com>
2842
2843 * target.c (fileio_fh_t::t): Add comment.
2844 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2845 (target_fileio_close): Handle a NULL target.
2846 (invalidate_fileio_fh): New.
2847 (target_close): Call it.
2848 * remote.c (remote_hostio_send_command): No longer check whether
2849 remote_desc is open.
2850
5ff79300
PA
28512018-04-11 Pedro Alves <palves@redhat.com>
2852
2853 * target.c (fileio_fh_t): Make it a named struct instead of a
2854 typedef.
2855 (fileio_fh_t::is_closed): New method.
2856 (DEF_VEC_O (fileio_fh_t)): Remove.
2857 (fileio_fhandles): Now a std::vector.
2858 (is_closed_fileio_fh): Delete.
2859 (acquire_fileio_fd): Adjust. Rename parameters.
2860 (release_fileio_fd): Adjust.
2861 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
2862 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2863 (target_fileio_close): Adjust.
2864
6e22e10d
SM
28652018-04-10 Simon Marchi <simon.marchi@ericsson.com>
2866
2867 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
2868 index.
2869
731f534f
PA
28702018-04-10 Pedro Alves <palves@redhat.com>
2871
2872 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
2873 (scoped_finish_thread_state): New class.
2874 * infcmd.c (run_command_1): Use it instead of finish_thread_state
2875 cleanup.
2876 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
2877 (fetch_inferior_event, normal_stop): Likewise.
2878 * thread.c (finish_thread_state_cleanup): Delete.
2879
d5f4488f
SM
28802018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2881 Pedro Alves <palves@redhat.com>
2882
2883 * value.c: Include "selftest.h" and "common/array-view.h".
2884 (struct range) <operator ==>: New.
2885 (test_ranges_contain): New.
2886 (check_ranges_vector): New.
2887 (test_insert_into_bit_range_vector): New.
2888 (_initialize_values): Register selftests.
2889 * common/array-view.h (operator==, operator!=): New.
2890
b24531ed
SM
28912018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2892
2893 * common/gdb_vecs.h (unordered_remove): Add overload that takes
2894 an iterator.
2895 * inline-frame.c: Include <algorithm>.
2896 (struct inline_state): Add constructor.
2897 (inline_state_s): Remove.
2898 (DEF_VEC_O(inline_state_s)): Remove.
2899 (inline_states): Change type to std::vector.
2900 (find_inline_frame_state): Adjust to std::vector.
2901 (allocate_inline_frame_state): Remove.
2902 (clear_inline_frame_state): Adjust to std::vector.
2903 (skip_inline_frames): Adjust to std::vector.
2904
c252925c
SM
29052018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2906
2907 * tracepoint.h (struct trace_state_variable): Add constructor.
2908 <name>: Change type to std::string.
2909 * tracepoint.c (tsv_s): Remove.
2910 (DEF_VEC_O(tsv_s)): Remove.
2911 (tvariables): Change to std::vector.
2912 (create_trace_state_variable): Adjust to std::vector.
2913 (find_trace_state_variable): Likewise.
2914 (find_trace_state_variable_by_number): Likewise.
2915 (delete_trace_state_variable): Likewise.
2916 (trace_variable_command): Adjust to std::string.
2917 (delete_trace_variable_command): Likewise.
2918 (tvariables_info_1): Adjust to std::vector.
2919 (save_trace_state_variables): Likewise.
2920 (start_tracing): Likewise.
2921 (merge_uploaded_trace_state_variables): Adjust to std::vector
2922 and std::string.
2923 * target.h (struct target_ops)
2924 <to_download_trace_state_variable>: Pass reference to
2925 trace_state_variable.
2926 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
2927 * target-delegates.c: Re-generate.
2928 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
2929 (mi_tsv_deleted): Likewise.
2930 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
2931 * remote.c (remote_download_trace_state_variable): Change
2932 pointer to reference and adjust.
2933 * make-target-delegates (parse_argtypes): Handle references.
2934 (write_function_header): Likewise.
2935 (munge_type): Likewise.
2936
c9638d26
SM
29372018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2938
2939 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2940 string_view-selftests.c.
2941 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
2942 testsuite.
2943 * unittests/basic_string_view/cons/char/1.cc: Likewise.
2944 * unittests/basic_string_view/cons/char/2.cc: Likewise.
2945 * unittests/basic_string_view/cons/char/3.cc: Likewise.
2946 * unittests/basic_string_view/element_access/char/1.cc:
2947 Likewise.
2948 * unittests/basic_string_view/element_access/char/empty.cc:
2949 Likewise.
2950 * unittests/basic_string_view/element_access/char/front_back.cc:
2951 Likewise.
2952 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
2953 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
2954 Likewise.
2955 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
2956 Likewise.
2957 * unittests/basic_string_view/modifiers/swap/char/1.cc:
2958 Likewise.
2959 * unittests/basic_string_view/operations/compare/char/1.cc:
2960 Likewise.
2961 * unittests/basic_string_view/operations/compare/char/13650.cc:
2962 Likewise.
2963 * unittests/basic_string_view/operations/copy/char/1.cc:
2964 Likewise.
2965 * unittests/basic_string_view/operations/data/char/1.cc:
2966 Likewise.
2967 * unittests/basic_string_view/operations/find/char/1.cc:
2968 Likewise.
2969 * unittests/basic_string_view/operations/find/char/2.cc:
2970 Likewise.
2971 * unittests/basic_string_view/operations/find/char/3.cc:
2972 Likewise.
2973 * unittests/basic_string_view/operations/find/char/4.cc:
2974 Likewise.
2975 * unittests/basic_string_view/operations/rfind/char/1.cc:
2976 Likewise.
2977 * unittests/basic_string_view/operations/rfind/char/2.cc:
2978 Likewise.
2979 * unittests/basic_string_view/operations/rfind/char/3.cc:
2980 Likewise.
2981 * unittests/basic_string_view/operations/substr/char/1.cc:
2982 Likewise.
2983 * unittests/basic_string_view/operators/char/2.cc: Likewise.
2984 * unittests/string_view-selftests.c: New file.
2985
fdc11678
SM
29862018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2987
2988 * unittests/basic_string_view/capacity/1.cc: New file.
2989 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
2990 * unittests/basic_string_view/cons/char/1.cc: New file.
2991 * unittests/basic_string_view/cons/char/2.cc: New file.
2992 * unittests/basic_string_view/cons/char/3.cc: New file.
2993 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
2994 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
2995 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
2996 * unittests/basic_string_view/element_access/char/1.cc: New file.
2997 * unittests/basic_string_view/element_access/char/2.cc: New file.
2998 * unittests/basic_string_view/element_access/char/empty.cc: New file.
2999 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
3000 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
3001 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
3002 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
3003 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
3004 * unittests/basic_string_view/include.cc: New file.
3005 * unittests/basic_string_view/inserters/char/1.cc: New file.
3006 * unittests/basic_string_view/inserters/char/2.cc: New file.
3007 * unittests/basic_string_view/inserters/char/3.cc: New file.
3008 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
3009 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
3010 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
3011 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
3012 * unittests/basic_string_view/literals/types.cc: New file.
3013 * unittests/basic_string_view/literals/values.cc: New file.
3014 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
3015 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
3016 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
3017 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
3018 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
3019 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
3020 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
3021 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
3022 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
3023 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
3024 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
3025 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
3026 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
3027 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
3028 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
3029 * unittests/basic_string_view/operations/data/char/1.cc: New file.
3030 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
3031 * unittests/basic_string_view/operations/find/char/1.cc: New file.
3032 * unittests/basic_string_view/operations/find/char/2.cc: New file.
3033 * unittests/basic_string_view/operations/find/char/3.cc: New file.
3034 * unittests/basic_string_view/operations/find/char/4.cc: New file.
3035 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
3036 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
3037 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
3038 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
3039 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
3040 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
3041 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
3042 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
3043 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
3044 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
3045 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
3046 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
3047 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
3048 * unittests/basic_string_view/operators/char/2.cc: New file.
3049 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
3050 * unittests/basic_string_view/range_access/char/1.cc: New file.
3051 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
3052 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
3053 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
3054 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
3055 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
3056 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
3057 * unittests/basic_string_view/requirements/typedefs.cc: New file.
3058 * unittests/basic_string_view/typedefs.cc: New file.
3059 * unittests/basic_string_view/types/1.cc: New file.
3060
8345c4a2
SM
30612018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3062
3063 * common/gdb_string_view.h: Remove libstdc++ implementation
3064 details, adjust to gdb reality.
3065 * common/gdb_string_view.tcc: Likewise.
3066 * cli/cli-script.c (struct string_view): Remove.
3067 (user_args) <m_args>: Change element type to gdb::string_view.
3068 (user_args::insert_args): Adjust.
3069
7adcdf08
SM
30702018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3071
3072 * common/gdb_string_view.h: New file.
3073 * common/gdb_string_view.tcc: New file.
3074
41260ac2
SM
30752018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3076
3077 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
3078 * configure: Re-generate.
3079
0bee6dd4
PA
30802018-04-09 Pedro Alves <palves@redhat.com>
3081
3082 * gdbarch.sh: Include "observable.h" instead of "observer.h".
3083 (set_target_gdbarch): Call
3084 gdb::observers::architecture_changed.notify instead of
3085 observer_notify_architecture_changed.
3086
6f14adc5
SM
30872018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3088
3089 * tracepoint.c (struct current_traceframe_cleanup): Remove.
3090 (do_restore_current_traceframe_cleanup): Remove.
3091 (restore_current_traceframe_cleanup_dtor): Remove.
3092 (make_cleanup_restore_current_traceframe): Remove.
3093 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
3094 New.
3095 * tracepoint.h (struct scoped_restore_current_traceframe): New.
3096 * infrun.c (fetch_inferior_event): Use
3097 scoped_restore_current_traceframe.
3098
b2bdb8cf
SM
30992018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3100
3101 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
3102 Remove.
3103 <n_allocated_type_units>: Remove.
3104 <all_type_units>: Change to std::vector.
3105 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
3106 to std::vector change.
3107 (dwarf2_per_objfile::get_cutu): Likewise.
3108 (dwarf2_per_objfile::get_tu): Likewise.
3109 (create_signatured_type_table_from_index): Likewise.
3110 (create_signatured_type_table_from_debug_names): Likewise.
3111 (dw2_symtab_iter_next): Likewise.
3112 (dw2_print_stats): Likewise.
3113 (dw2_expand_all_symtabs): Likewise.
3114 (dw2_expand_marked_cus): Likewise.
3115 (dw2_debug_names_iterator::next): Likewise.
3116 (dwarf2_initialize_objfile): Likewise.
3117 (add_signatured_type_cu_to_table): Likewise.
3118 (create_all_type_units): Likewise.
3119 (add_type_unit): Likewise.
3120 (struct tu_abbrev_offset): Add constructor.
3121 (build_type_psymtabs_1): Adjust to std::vector change.
3122 (print_tu_stats): Likewise.
3123 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
3124 (write_debug_names): Likewise.
3125
b76e467d
SM
31262018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3127
3128 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
3129 Make an std::vector.
3130 <n_comp_units>: Remove.
3131 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
3132 to std::vector change.
3133 (dwarf2_per_objfile::get_cutu): Likewise.
3134 (dwarf2_per_objfile::get_cu): Likewise.
3135 (create_cus_from_index): Likewise.
3136 (create_addrmap_from_index): Likewise.
3137 (create_addrmap_from_aranges): Likewise.
3138 (dwarf2_read_index): Likewise.
3139 (dw2_find_last_source_symtab): Likewise.
3140 (dw2_map_symtabs_matching_filename): Likewise.
3141 (dw2_symtab_iter_next): Likewise.
3142 (dw2_print_stats): Likewise.
3143 (dw2_expand_all_symtabs): Likewise.
3144 (dw2_expand_symtabs_with_fullname): Likewise.
3145 (dw2_expand_marked_cus): Likewise.
3146 (dw2_map_symbol_filenames): Likewise.
3147 (create_cus_from_debug_names): Likewise.
3148 (dwarf2_read_debug_names): Likewise.
3149 (dw2_debug_names_iterator::next): Likewise.
3150 (dwarf2_initialize_objfile): Likewise.
3151 (set_partial_user): Likewise.
3152 (dwarf2_build_psymtabs_hard): Likewise.
3153 (read_comp_units_from_section): Remove arguments, adjust to
3154 std::vector change.
3155 (create_all_comp_units): Adjust to std::vector and
3156 read_comp_units_from_section changes.
3157 (dwarf2_find_containing_comp_unit): Adjust to std::vector
3158 change.
3159 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
3160 (psyms_seen_size): Likewise.
3161 (write_gdbindex): Likewise.
3162 (write_debug_names): Likewise.
3163
12359b5e
SM
31642018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3165
3166 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
3167 with dwarf2_per_objfile.
3168 (create_cus_from_index): Likewise.
3169 (create_signatured_type_table_from_index): Likewise.
3170 (dwarf2_read_index): Likewise.
3171 (dwarf2_initialize_objfile): Likewise.
3172 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
3173 per_cu rather than get_dwarf2_per_objfile.
3174
ff4c9fec
SM
31752018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3176
3177 * dwarf2read.h (struct signatured_type): Forward declare.
3178 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
3179 New methods.
3180 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
3181 (dw2_get_cutu): ...this.
3182 (dwarf2_per_objfile::get_cu): Rename from...
3183 (dw2_get_cu): ...this.
3184 (dwarf2_per_objfile::get_tu): New.
3185 (create_addrmap_from_index): Adjust.
3186 (create_addrmap_from_aranges): Adjust.
3187 (dw2_find_last_source_symtab): Adjust.
3188 (dw2_map_symtabs_matching_filename): Adjust.
3189 (dw2_symtab_iter_next): Adjust.
3190 (dw2_print_stats): Adjust.
3191 (dw2_expand_all_symtabs): Adjust.
3192 (dw2_expand_symtabs_with_fullname): Adjust.
3193 (dw2_expand_marked_cus): Adjust.
3194 (dw_expand_symtabs_matching_file_matcher): Adjust.
3195 (dw2_map_symbol_filenames): Adjust.
3196 (dw2_debug_names_iterator::next): Adjust.
3197 (dwarf2_initialize_objfile): Adjust.
3198 (set_partial_user): Adjust.
3199 (dwarf2_build_psymtabs_hard): Adjust.
3200
5ca3fcb6
SM
32012018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3202
3203 * dwarf2read.c (create_signatured_type_table_from_debug_names):
3204 Remove unused variables.
3205 (dw2_map_symtabs_matching_filename): Likewise.
3206 (dwarf2_record_block_ranges): Likewise.
3207 (dwarf2_read_addr_index): Likewise.
3208 (follow_die_offset): Likewise.
3209
b2e586e8
SM
32102018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3211
3212 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
3213 to symbol_file_add_main.
3214
7c4e78cf
SM
32152018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3216
3217 PR mi/22299
3218 * mi/mi-console.c (do_fputc_async_safe): New.
3219 (mi_console_file::write_async_safe): New.
3220 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
3221 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
3222 New.
3223 * ui-file.c (ui_file::putstrn): Adjust call to
3224 fputstrn_unfiltered.
3225 * utils.c (printchar): Replace do_fputs and do_fprintf
3226 parameters by do_fputc.
3227 (fputstr_filtered): Adjust call to printchar.
3228 (fputstr_unfiltered): Likewise.
3229 (fputstrn_filtered): Likewise.
3230 (fputstrn_unfiltered): Add do_fputc parameter, pass to
3231 printchar.
3232 * utils.h (do_fputc_ftype): New typedef.
3233 (fputstrn_unfiltered): Add do_fputc parameter.
3234
5dc026d3
SM
32352018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3236
3237 * regformats/i386/i386-avx.dat: Remove.
3238
c912f608
SM
32392018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3240
3241 PR gdb/22979
3242 * amd64-tdep.c (amd64_none_init_abi): New function.
3243 (amd64_x32_none_init_abi): New function.
3244 (_initialize_amd64_tdep): Register handlers for x86-64 and
3245 x64_32 with GDB_OSABI_NONE.
3246 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
3247 GDB_OSABI_NONE osabi.
3248
26540402
SM
32492018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3250
3251 PR gdb/22980
3252 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
3253 GDB_OSABI_NONE.
3254 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
3255 * osabi.c (gdb_osabi_names): Add "unknown" entry.
3256
9018be22
SM
32572018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3258
3259 * common/byte-vector.h (char_vector): New type.
3260 * target.h (target_read_alloc): Return
3261 gdb::optional<byte_vector>.
3262 (target_read_stralloc): Return gdb::optional<char_vector>.
3263 (target_get_osdata): Return gdb::optional<char_vector>.
3264 * target.c (target_read_alloc_1): Templatize. Replacement
3265 manual memory management with vector.
3266 (target_read_alloc): Change return type, adjust.
3267 (target_read_stralloc): Change return type, adjust.
3268 (target_get_osdata): Change return type, adjust.
3269 * auxv.c (struct auxv_info) <length>: Remove.
3270 <data>: Change type to gdb::optional<byte_vector>.
3271 (auxv_inferior_data_cleanup): Free auxv_info with delete.
3272 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
3273 (target_auxv_search): Adjust.
3274 (fprint_target_auxv): Adjust.
3275 * avr-tdep.c (avr_io_reg_read_command): Adjust.
3276 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
3277 (linux_make_corefile_notes): Adjust.
3278 * osdata.c (get_osdata): Adjust.
3279 * remote.c (remote_get_threads_with_qxfer): Adjust.
3280 (remote_memory_map): Adjust.
3281 (remote_traceframe_info): Adjust.
3282 (btrace_read_config): Adjust.
3283 (remote_read_btrace): Adjust.
3284 (remote_pid_to_exec_file): Adjust.
3285 * solib-aix.c (solib_aix_get_library_list): Adjust.
3286 * solib-dsbt.c (decode_loadmap): Don't free buf.
3287 (dsbt_get_initial_loadmaps): Adjust.
3288 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
3289 * solib-target.c (solib_target_current_sos): Adjust.
3290 * tracepoint.c (sdata_make_value): Adjust.
3291 * xml-support.c (xinclude_start_include): Adjust.
3292 (xml_fetch_content_from_file): Adjust.
3293 * xml-support.h (xml_fetch_another): Change return type.
3294 (xml_fetch_content_from_file): Change return type.
3295 * xml-syscall.c (xml_init_syscalls_info): Adjust.
3296 * xml-tdesc.c (file_read_description_xml): Adjust.
3297 (fetch_available_features_from_target): Change return type.
3298 (target_fetch_description_xml): Adjust.
3299 (target_read_description_xml): Adjust.
3300
14c88955
TT
33012018-04-06 Tom Tromey <tom@tromey.com>
3302
3303 * value.c (~value): Update.
3304 (struct value) <contents>: Now unique_xmalloc_ptr.
3305 (value_contents_bits_eq, allocate_value_contents)
3306 (value_contents_raw, value_contents_all_raw)
3307 (value_contents_for_printing, value_contents_for_printing_const)
3308 (set_value_enclosing_type): Update.
3309
0c7e6dd8
TT
33102018-04-06 Tom Tromey <tom@tromey.com>
3311
3312 * value.c (range_s): Remove typedef, VEC.
3313 (struct range): Add operator<.
3314 (range_lessthan): Remove.
3315 (ranges_contain): Change type.
3316 (~value): Update.
3317 (struct value) <unavailable, optimized_out>: Now std::vector.
3318 (value_entirely_available)
3319 (value_entirely_covered_by_range_vector)
3320 (value_entirely_unavailable, value_entirely_optimized_out):
3321 Update.
3322 (insert_into_bit_range_vector): Change argument type.
3323 (find_first_range_overlap): Likewise.
3324 (struct ranges_and_idx, value_contents_bits_eq)
3325 (require_not_optimized_out, require_available): Update.
3326 (ranges_copy_adjusted): Change argument types.
3327 (value_optimized_out, value_copy, value_fetch_lazy): Update.
3328
2c8331b9
TT
33292018-04-06 Tom Tromey <tom@tromey.com>
3330
3331 * value.c (~value): Update.
3332 (struct value) <parent>: Now a value_ref_ptr.
3333 (value_parent, set_value_parent, value_address, value_copy):
3334 Update.
3335
466ce3ae
TT
33362018-04-06 Tom Tromey <tom@tromey.com>
3337
3338 * value.c (struct value): Add constructor, destructor, and member
3339 initializers.
3340 (allocate_value_lazy, value_decref): Update.
3341
062d818d
TT
33422018-04-06 Tom Tromey <tom@tromey.com>
3343
3344 * value.c (struct value) <released, next>: Remove.
3345 (all_values): Now a std::vector.
3346 (allocate_value_lazy): Update.
3347 (value_next): Remove.
3348 (value_mark, value_free_to_mark, release_value)
3349 (value_release_to_mark): Update.
3350
a6535de1
TT
33512018-04-06 Tom Tromey <tom@tromey.com>
3352
3353 * value.h (fetch_subexp_value, value_release_to_mark): Update.
3354 (free_value_chain): Remove.
3355 * value.c (free_value_chain): Remove.
3356 (value_release_to_mark): Return a std::vector.
3357 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
3358 std::vector.
3359 (check_condition): Update.
3360 * eval.c (fetch_subexp_value): Change "val_chain" to a
3361 std::vector.
3362 * breakpoint.c (update_watchpoint): Update.
3363 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
3364
b5621201
TT
33652018-04-06 Tom Tromey <tom@tromey.com>
3366
3367 * value.h (free_all_values): Remove.
3368 * value.c (free_all_values): Remove.
3369
4d0266a0
TT
33702018-04-06 Tom Tromey <tom@tromey.com>
3371
3372 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
3373 (value_history_chain, value_history_count): Remove.
3374 (value_history): New global.
3375 (record_latest_value, access_value_history, show_values)
3376 (preserve_values): Update.
3377
b4d61099
TT
33782018-04-06 Tom Tromey <tom@tromey.com>
3379
3380 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
3381 * varobj.c (varobj_set_display_format, varobj_set_value)
3382 (install_default_visualizer, construct_visualizer)
3383 (install_new_value, ~varobj, varobj_get_value_type)
3384 (my_value_of_variable, varobj_editable_p): Update.
3385 * c-varobj.c (c_describe_child, c_value_of_variable)
3386 (cplus_number_of_children, cplus_describe_child): Update.
3387 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
3388 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
3389 (ada_value_of_variable, ada_value_is_changeable_p): Update.
3390
9b558729
TT
33912018-04-06 Tom Tromey <tom@tromey.com>
3392
3393 * printcmd.c (last_examine_address): Change type to
3394 value_ref_ptr.
3395 (do_examine, x_command): Update.
3396
850645cf
TT
33972018-04-06 Tom Tromey <tom@tromey.com>
3398
3399 * value.c (release_value): Update.
3400 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
3401 (struct bpstats) <val>: Now a value_ref_ptr.
3402 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3403 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3404 (~watchpoint, print_it_watchpoint, watch_command_1)
3405 (invalidate_bp_value_on_memory_change): Update.
3406
22bc8444
TT
34072018-04-06 Tom Tromey <tom@tromey.com>
3408
3409 * varobj.c (varobj_clear_saved_item)
3410 (update_dynamic_varobj_children, install_new_value, ~varobj):
3411 Update.
3412 * value.h (value_incref): Move declaration earlier.
3413 (value_decref): Rename from value_free.
3414 (struct value_ref_policy): New.
3415 (value_ref_ptr): New typedef.
3416 (struct value_deleter): Remove.
3417 (gdb_value_up): Remove typedef.
3418 (release_value): Change return type.
3419 (release_value_or_incref): Remove.
3420 * value.c (set_value_parent): Update.
3421 (value_incref): Change return type.
3422 (value_decref): Rename from value_free.
3423 (value_free_to_mark, free_all_values, free_value_chain): Update.
3424 (release_value): Return value_ref_ptr.
3425 (release_value_or_incref): Remove.
3426 (record_latest_value, set_internalvar, clear_internalvar):
3427 Update.
3428 * stack.c (info_frame_command): Don't call value_free.
3429 * python/py-value.c (valpy_dealloc, valpy_new)
3430 (value_to_value_object): Update.
3431 * printcmd.c (do_examine): Update.
3432 * opencl-lang.c (lval_func_free_closure): Update.
3433 * mi/mi-main.c (register_changed_p): Don't call value_free.
3434 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
3435 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
3436 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
3437 value_free.
3438 * guile/scm-value.c (vlscm_free_value_smob)
3439 (vlscm_scm_from_value): Update.
3440 * frame.c (frame_register_unwind, frame_unwind_register_signed)
3441 (frame_unwind_register_unsigned, get_frame_register_bytes)
3442 (put_frame_register_bytes): Don't call value_free.
3443 * findvar.c (address_from_register): Don't call value_free.
3444 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
3445 * dwarf2loc.c (entry_data_value_free_closure)
3446 (value_of_dwarf_reg_entry, free_pieced_value_closure)
3447 (dwarf2_evaluate_loc_desc_full): Update.
3448 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3449 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3450 (~watchpoint, watch_command_1)
3451 (invalidate_bp_value_on_memory_change): Update.
3452 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
3453
7f8a5d38
SM
34542018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
3455
3456 PR gdb/23022
3457 * warning.m4: Add -Wno-error=deprecated-register.
3458 * configure: Re-generate.
3459
8a76bd3b
TT
34602018-04-05 Tom Tromey <tom@tromey.com>
3461
3462 * linespec.h: Remove include of "vec.h".
3463
8e8d776e
TT
34642018-04-05 Tom Tromey <tom@tromey.com>
3465
3466 * linespec.c (typep): Remove typedef.
3467 (find_methods, find_superclass_methods): Take a std::vector.
3468 (find_method): Use std::vector.
3469
9b2f8581
TT
34702018-04-05 Tom Tromey <tom@tromey.com>
3471
3472 * utils.c (compare_strings): Remove.
3473 * utils.h (compare_strings): Remove.
3474 * objc-lang.h (find_imps): Update.
3475 * objc-lang.c (find_methods): Take a std::vector.
3476 (uniquify_strings, find_imps): Likewise.
3477 * linespec.c (find_methods): Take a std::vector.
3478 (decode_objc): Use std::vector.
3479 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
3480 a std::vector.
3481 (find_method, find_function_symbols): Use std::vector.
3482
459a2e4c
TT
34832018-04-05 Tom Tromey <tom@tromey.com>
3484
3485 * completer.c (completion_tracker::completion_tracker): Remove
3486 cast.
3487 (completion_tracker::discard_completions): Likewise.
3488 * breakpoint.c (ambiguous_names_p): Remove cast.
3489 * ada-lang.c (_initialize_ada_language): Remove cast.
3490 * utils.h (streq): Update.
3491 (streq_hash): Add new declaration.
3492 * utils.c (streq): Return bool.
3493 (streq_hash): New function.
3494
9be2c17a
TT
34952018-04-05 Tom Tromey <tom@tromey.com>
3496
3497 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
3498 Remove a string copy.
3499
f73c6ece
TT
35002018-04-05 Tom Tromey <tom@tromey.com>
3501
3502 * linespec.c (filter_results): Use std::vector.
3503 (decode_line_2, decode_line_full): Update.
3504
53a0f8a2
TT
35052018-04-05 Tom Tromey <tom@tromey.com>
3506
3507 * linespec.c (canonical_to_fullform): Return std::string.
3508 (filter_results): Update.
3509 (struct decode_line_2_item): Add constructor.
3510 <fullform, displayform>: Now std::string.
3511 (decode_line_2_compare_items): Now a std::sort comparator.
3512 (decode_line_2): Update.
3513
a5b5adf5
TT
35142018-04-05 Tom Tromey <tom@tromey.com>
3515
3516 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
3517 (unexpected_linespec_error): Update.
3518 (linespec_parse_basic, parse_linespec): Update.
3519
6a307fc5
TT
35202018-04-05 Tom Tromey <tom@tromey.com>
3521
3522 * linespec.c (linespec_parse_basic): Reindent.
3523
41c1efc6
TT
35242018-04-05 Tom Tromey <tom@tromey.com>
3525
3526 * minsyms.h (iterate_over_minimal_symbols): Update.
3527 * minsyms.c (iterate_over_minimal_symbols): Take a
3528 gdb::function_view.
3529 * linespec.c (struct collect_minsyms): Remove.
3530 (compare_msyms): Now a std::sort comparator.
3531 (add_minsym): Add parameters.
3532 (search_minsyms_for_name): Update. Use std::vector.
3533
c5edbf3d
TT
35342018-04-03 Tom Tromey <tom@tromey.com>
3535
3536 * mipsread.c (read_alphacoff_dynamic_symtab): Use
3537 gdb::byte_vector.
3538
b39efc48
WP
35392018-04-02 Weimin Pan <weimin.pan@oracle.com>
3540
3541 * MAINTAINERS (Write After Approval): Add Weimin Pan.
3542
121ad66c 35432018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
3544
3545 PR gdb/16959
3546 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
3547 printing static type.
3548
09473be8
TT
35492018-04-01 Tom Tromey <tom@tromey.com>
3550
3551 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
3552 (rs6000_xfer_shared_libraries): Update.
3553
ec1f2d91
SM
35542018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
3555
3556 * common/gdb_vecs.h (char_ptr): Remove.
3557 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
3558
d8611974
SM
35592018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3560
3561 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
3562 with std::vector.
3563 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
3564
a18ba4e4
SM
35652018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3566
3567 * tracepoint.h (struct uploaded_tp): Initialize fields.
3568 <actions, step_actions, cmd_strings>: Change type to
3569 std::vector<char *>.
3570 * tracepoint.c (get_uploaded_tp): Allocate with new.
3571 (free_uploaded_tps): Free with delete.
3572 (parse_tracepoint_definition): Adjust to std::vector change.
3573 * breakpoint.c (read_uploaded_action): Likewise.
3574 (create_tracepoint_from_upload): Likewise.
3575 * ctf.c (ctf_write_uploaded_tp): Likewise.
3576 (SET_ARRAY_FIELD): Likewise.
3577 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
3578
a7961323
TT
35792018-03-30 Tom Tromey <tom@tromey.com>
3580
3581 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
3582 std::unique_ptr.
3583 (svr4_keep_data_in_core): Update.
3584 (svr4_read_so_list): Update.
3585
e83e4e24
TT
35862018-03-30 Tom Tromey <tom@tromey.com>
3587
3588 * windows-nat.c (handle_output_debug_string, handle_exception):
3589 Update.
3590 * target.h (target_read_string): Update.
3591 * target.c (target_read_string): Change "string" to
3592 unique_xmalloc_ptr.
3593 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
3594 Update.
3595 * solib-frv.c (frv_current_sos): Update.
3596 * solib-dsbt.c (dsbt_current_sos): Update.
3597 * solib-darwin.c (darwin_current_sos): Update.
3598 * linux-thread-db.c (inferior_has_bug): Update.
3599 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
3600 Update. Remove alloca.
3601 * ada-lang.c (ada_main_name): Update.
3602
263db9a1
TT
36032018-03-30 Tom Tromey <tom@tromey.com>
3604
3605 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
3606 (struct dwo_file_deleter): New.
3607 (dwo_file_up): New typedef.
3608 (open_and_init_dwo_file): Use dwo_file_up.
3609 (free_dwo_file_cleanup): Remove.
3610
5dafb3d1
TT
36112018-03-30 Tom Tromey <tom@tromey.com>
3612
3613 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
3614 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
3615
11ed8cad
TT
36162018-03-30 Tom Tromey <tom@tromey.com>
3617
3618 * dwarf2read.c (class free_cached_comp_units): New class.
3619 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
3620 (free_cached_comp_units): Remove function.
3621
9ae79dac
TT
36222018-03-30 Tom Tromey <tom@tromey.com>
3623
3624 * utils.h (make_cleanup_unpush_target): Remove.
3625 * inf-ptrace.c (struct target_unpusher): New.
3626 (target_unpush_up) New typedef.
3627 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
3628 target_unpush_up.
3629 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
3630
5aa89276
TT
36312018-03-27 Tom Tromey <tom@tromey.com>
3632
3633 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
3634
1dbeed45
TT
36352018-03-27 Pedro Alves <palves@redhat.com>
3636 Tom Tromey <tom@tromey.com>
3637
3638 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
3639 destructor. Now a class.
3640 (gdb_readline_wrapper_cleanup): Remove function.
3641 (gdb_readline_wrapper): Remove cleanups.
3642
c819b2c0
TT
36432018-03-27 Tom Tromey <tom@tromey.com>
3644
3645 * typeprint.h (struct type_print_options) <local_typedefs,
3646 global_typedefs>: Remove "struct" keyword.
3647 (class typedef_hash_table): New class.
3648 (recursively_update_typedef_hash, add_template_parameters)
3649 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
3650 (find_typedef_in_hash): Don't declare.
3651 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
3652 (typedef_hash_table::recursively_update): Rename from
3653 recursively_update_typedef_hash. Now a member.
3654 (typedef_hash_table::add_template_parameters): Rename from
3655 add_template_parameters. Now a member.
3656 (typedef_hash_table::typedef_hash_table): Now a constructor;
3657 rename from create_typedef_hash.
3658 (typedef_hash_table::~typedef_hash_table): Now a destructor;
3659 rename from free_typedef_hash.
3660 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
3661 (do_free_global_table): Remove.
3662 (typedef_hash_table::typedef_hash_table): New constructor; renamed
3663 from copy_type_recursive.
3664 (create_global_typedef_table): Remove.
3665 (typedef_hash_table::find_global_typedef): Now a member of
3666 typedef_hash_table.
3667 (typedef_hash_table::find_typedef): Rename from
3668 find_typedef_in_hash; now a member.
3669 (whatis_exp): Update.
3670 * extension.h (struct ext_lang_type_printers): Add constructor and
3671 destructor.
3672 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
3673 declare.
3674 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
3675 Now a constructor; rename from start_ext_lang_type_printers.
3676 (ext_lang_type_printers): Now a destructor; rename from
3677 free_ext_lang_type_printers.
3678 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
3679 Update.
3680 (c_type_print_base_struct_union): Update. Remove cleanups.
3681
608219fb
TT
36822018-03-27 Tom Tromey <tom@tromey.com>
3683
3684 * dwarf-index-write.c: Include <cmath>.
3685
3fcded8f
JB
36862018-03-27 Joel Brobecker <brobecker@adacore.com>
3687
3688 * NEWS: Add entry describing new "set|show varsize-limit" command.
3689 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
3690 command.
3691 * printcmd.c (_initialize_printcmd): Add "set var" alias of
3692 "set variable".
3693
cd4fb1b2
SM
36942018-03-27 Simon Marchi <simon.marchi@ericsson.com>
3695
3696 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
3697 dwarf-index-write.c
3698 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
3699 * dwarf-index-common.c: New file.
3700 * dwarf-index-common.h: New file.
3701 * dwarf-index-write.c: New file.
3702 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
3703 (struct dwarf2_section_info): Move from here.
3704 (dwarf2_section_info_def): Likewise.
3705 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
3706 (offset_type): Likewise.
3707 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
3708 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
3709 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
3710 (byte_swap): Likewise.
3711 (MAYBE_SWAP): Likewise.
3712 (dwarf2_per_cu_ptr): Likewise.
3713 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
3714 (struct tu_stats): Likewise.
3715 (struct dwarf2_per_objfile): Likewise.
3716 (struct dwarf2_per_cu_data): Likewise.
3717 (struct signatured_type): Likewise.
3718 (sig_type_ptr): Likewise.
3719 (DEF_VEC_P (sig_type_ptr)): Likewise.
3720 (INDEX4_SUFFIX): Likewise.
3721 (INDEX5_SUFFIX): Likewise.
3722 (DEBUG_STR_SUFFIX): Likewise.
3723 (dwarf2_read_section): Make non-static.
3724 (mapped_index_string_hash): Move from here.
3725 (dwarf5_djb_hash): Likewise.
3726 (file_write): Likewise.
3727 (class data_buf): Likewise.
3728 (struct symtab_index_entry): Likewise.
3729 (struct mapped_symtab): Likewise.
3730 (find_slot): Likewise.
3731 (hash_expand): Likewise.
3732 (add_index_entry): Likewise.
3733 (uniquify_cu_indices): Likewise.
3734 (class c_str_view): Likewise.
3735 (class c_str_view_hasher): Likewise.
3736 (class vector_hasher): Likewise.
3737 (write_hash_table): Likewise.
3738 (psym_index_map): Likewise.
3739 (struct addrmap_index_data): Likewise.
3740 (add_address_entry): Likewise.
3741 (add_address_entry_worker): Likewise.
3742 (write_address_map): Likewise.
3743 (symbol_kind): Likewise.
3744 (write_psymbols): Likewise.
3745 (struct signatured_type_index_data): Likewise.
3746 (write_one_signatured_type): Likewise.
3747 (recursively_count_psymbols): Likewise.
3748 (recursively_write_psymbols): Likewise.
3749 (class debug_names): Likewise.
3750 (check_dwarf64_offsets): Likewise.
3751 (psyms_seen_size): Likewise.
3752 (write_gdbindex): Likewise.
3753 (write_debug_names): Likewise.
3754 (assert_file_size): Likewise.
3755 (write_psymtabs_to_index): Likewise.
3756 (save_gdb_index_command): Likewise.
3757 (_initialize_dwarf2_read): Don't register the "save gdb-index"
3758 command.
3759 * dwarf2read.h: New file.
3760
59cc4834
JB
37612018-03-27 Joel Brobecker <brobecker@adacore.com>
3762
3763 PR gdb/22670
3764 * dwarf2read.c (dwarf2_physname): Do not return the demangled
3765 symbol name if the CU's language stores symbol names in linkage
3766 format.
3767 * language.h (struct language_defn)
3768 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
3769 all instances of this struct.
3770
67501539
TT
37712018-03-26 Tom Tromey <tom@tromey.com>
3772
3773 * stack.c (backtrace_command_1): Remove verbose code.
3774
76c939ac
TT
37752018-03-26 Tom Tromey <tom@tromey.com>
3776
3777 * python/py-framefilter.c (py_print_type): Don't catch
3778 exceptions. Return void.
3779 (py_print_value): Likewise.
3780 (py_print_single_arg): Likewise.
3781 (enumerate_args): Don't catch exceptions.
3782 (py_print_args): Likewise.
3783 (py_print_frame): Likewise.
3784 (gdbpy_apply_frame_filter): Catch exceptions here.
3785
9507b29c
TT
37862018-03-26 Tom Tromey <tom@tromey.com>
3787
3788 * stack.c (_initialize_stack): Remove trailing newlines from help
3789 text. Add "Usage" line to "backtrace" help.
3790
eb68e487
TT
37912018-03-26 Tom Tromey <tom@tromey.com>
3792
3793 PR python/16486:
3794 * python/py-framefilter.c (py_print_args): Call wrap_hint.
3795
1f111921
TT
37962018-03-26 Tom Tromey <tom@tromey.com>
3797
3798 * python/py-framefilter.c (py_print_single_arg): Return
3799 EXT_LANG_BT_ERROR from catch.
3800
fb7eb8b5
TT
38012018-03-26 Tom Tromey <tom@tromey.com>
3802
3803 PR backtrace/15584:
3804 * stack.c (backtrace_command_1): Move some code into no-filters
3805 "if".
3806
4ca59a9f
TT
38072018-03-26 Tom Tromey <tom@tromey.com>
3808
3809 * python/py-framefilter.c (throw_quit_or_print_exception): New
3810 function.
3811 (gdbpy_apply_frame_filter): Use it.
3812
92256134
TT
38132018-03-26 Tom Tromey <tom@tromey.com>
3814
3815 PR cli/17716:
3816 * python/py-framefilter.c (py_print_type, py_print_value)
3817 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
3818 RETURN_MASK_ERROR.
3819
7a630bc2
TT
38202018-03-26 Tom Tromey <tom@tromey.com>
3821
3822 * python/py-framefilter.c (enumerate_args): Use
3823 gdb::unique_xmalloc_ptr.
3824
63283d4a
TT
38252018-03-26 Tom Tromey <tom@tromey.com>
3826
3827 * python/py-framefilter.c (py_print_frame): Return
3828 EXT_LANG_BT_OK.
3829 (gdbpy_apply_frame_filter): Update comment.
3830 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
3831 Remove.
3832 <EXT_LANG_BT_NO_FILTERS>: Change value.
3833
978d6c75
TT
38342018-03-26 Tom Tromey <tom@tromey.com>
3835
3836 PR backtrace/15582:
3837 * stack.c (backtrace_command): Parse "hide" argument.
3838 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
3839 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
3840 constant.
3841
1cf7e640
TT
38422018-03-26 Tom Tromey <tom@tromey.com>
3843
3844 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
3845 add "flags".
3846 (backtrace_command): Remove "fulltrace", add "flags".
3847
ea3b0687
TT
38482018-03-26 Tom Tromey <tom@tromey.com>
3849
3850 * stack.c (backtrace_command): Rewrite command line parsing.
3851
9f034d75
SM
38522018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3853
3854 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
3855
ce1459e5
SM
38562018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3857
3858 * filename-seen-cache.h: Add include guard.
3859
4f7ae6f5
KS
38602018-03-26 Keith Seitz <keiths@redhat.com>
3861
3862 * symfile.c (place_section): Remove "struct" from section_addr_info
3863 in comment.
3864 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
3865 "struct" keyword from section_addr_info.
3866
5cd3e386
AH
38672018-03-26 Alan Hayward <alan.hayward@arm.com>
3868
3869 * regformats/regdef.h (reg): Add constructors.
3870
3e5ef9a4
PA
38712018-03-25 Pedro Alves <palves@redhat.com>
3872
3873 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
3874 if then/else bodies in var_func_name extraction.
3875
c88d2fcc 38762018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
3877
3878 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
3879 lookup_minimal_symbol() to find symbol entry.
3880 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
3881
b7fee5a3
KS
38822018-03-23 Keith Seitz <keiths@redhat.com>
3883
3884 PR c++/22968
3885 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
3886 nested type definitions for C++, too.
3887
2cc9b304
TT
38882018-03-23 Tom Tromey <tom@tromey.com>
3889
3890 * machoread.c (struct oso_el): Add a constructor. Don't define as
3891 a typedef.
3892 (macho_register_oso): Remove.
3893 (macho_symtab_read): Take a std::vector.
3894 (oso_el_compare_name): Now a std::sort comparator.
3895 (macho_symfile_read_all_oso): Take a std::vector.
3896 (macho_symfile_read): Use std::vector. Remove cleanups.
3897
a2b2bc12
TT
38982018-03-22 Tom Tromey <tom@tromey.com>
3899
3900 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
3901 (record_full_goto_bookmark): Use std::string.
3902
7a8f494c
PFC
39032018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3904
3905 PR tdep/18295
3906 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
3907 a single mask.
3908
dd6d677f
PFC
39092018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3910
3911 * rs6000-tdep.c (store_insn_p): New function.
3912 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
3913 and cr_reg to their unshifted values. Use store_insn_p to
3914 match LR saves using either R1 or fdata->alloca_reg. Use
3915 store_insn_p to match CR saves. Set alloca_reg_offset
3916 when alloca_reg and framep are set. Remove lr_reg shift
3917 when assigning to fdata->lr_register.
3918
26d6cec4
AA
39192018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3920
3921 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
3922 command line args instead of emitting a warning.
3923
5d9310c4
SM
39242018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3925
3926 * tracepoint.h (struct static_tracepoint_marker): Initialize
3927 fields, define default constructor, move constructor and move
3928 assignment, disable the rest.
3929 <str_id, extra>: Make std::string.
3930 (release_static_tracepoint_marker): Remove.
3931 (free_current_marker): Remove.
3932 * tracepoint.c (free_current_marker): Remove.
3933 (parse_static_tracepoint_marker_definition): Adjust to
3934 std::string, use new hex2str overload.
3935 (release_static_tracepoint_marker): Remove.
3936 (print_one_static_tracepoint_marker): Get marker by reference
3937 and adjust to std::string.
3938 (info_static_tracepoint_markers_command): Adjust to std::vector
3939 changes
3940 * target.h (static_tracepoint_marker_p): Remove typedef.
3941 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
3942 (struct target_ops) <to_static_tracepoint_marker_at>: Return
3943 bool.
3944 <to_static_tracepoint_markers_by_strid>: Return std::vector.
3945 * target-debug.h
3946 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
3947 (target_debug_print_std_vector_static_tracepoint_marker): New.
3948 (target_debug_print_struct_static_tracepoint_marker_p): Rename
3949 to...
3950 (target_debug_print_static_tracepoint_marker_p): ... this.
3951 * target-delegates.c: Re-generate.
3952 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
3953 Make std::string.
3954 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
3955 (decode_static_tracepoint_spec): Adjust to std::vector.
3956 (tracepoint_print_one_detail): Adjust to std::string.
3957 (strace_marker_decode_location): Adjust to std::string.
3958 (update_static_tracepoint): Adjust to std::string, remove call
3959 to release_static_tracepoint_marker.
3960 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3961 Adjust to std::vector.
3962 * remote.c (remote_static_tracepoint_marker_at): Return bool.
3963 (remote_static_tracepoint_markers_by_strid): Adjust to
3964 std::vector.
3965 * common/rsp-low.h (hex2str): New overload with explicit count
3966 of bytes.
3967 * common/rsp-low.c (hex2str): New overload with explicit count
3968 of bytes.
3969 * unittests/rsp-low-selftests.c (test_hex2str): New function.
3970 (_initialize_rsp_low_selftests): Add test_hex2str test.
3971 * unittests/tracepoint-selftests.c
3972 (test_parse_static_tracepoint_marker_definition): Adjust to
3973 std::string.
3974
62c222b6
SM
39752018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3976
3977 * tracepoint.c (parse_static_tracepoint_marker_definition):
3978 Consider case where the definition is followed by more
3979 definitions.
3980 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3981 tracepoint-selftests.c.
3982 * unittests/tracepoint-selftests.c: New.
3983
7eb2418f
PFC
39842018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3985
3986 * MAINTAINERS (Write After Approval): Add Pedro Franco de
3987 Carvalho.
3988
7cbe16e9
SR
39892018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3990
3d6b3b82 3991 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 3992
4ee89e90
SR
39932018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3994
3d6b3b82 3995 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 3996
92630041
TT
39972018-03-19 Tom Tromey <tom@tromey.com>
3998
3999 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
4000 "IDENT" production.
4001
76727919
TT
40022018-03-19 Pedro Alves <palves@redhat.com>
4003 Tom Tromey <tom@tromey.com>
4004
4005 * unittests/observable-selftests.c: New file.
4006 * common/observable.h: New file.
4007 * observable.h: New file.
4008 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
4009 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
4010 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
4011 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
4012 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
4013 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
4014 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
4015 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
4016 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
4017 python/py-breakpoint.c, python/py-finishbreakpoint.c,
4018 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
4019 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
4020 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
4021 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
4022 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
4023 tui/tui-interp.c, valops.c: Update all users.
4024 * tui/tui-hooks.c (tui_bp_created_observer)
4025 (tui_bp_deleted_observer, tui_bp_modified_observer)
4026 (tui_inferior_exit_observer, tui_before_prompt_observer)
4027 (tui_normal_stop_observer, tui_register_changed_observer):
4028 Remove.
4029 (tui_observers_token): New global.
4030 (attach_or_detach, tui_attach_detach_observers): New functions.
4031 (tui_install_hooks, tui_remove_hooks): Use
4032 tui_attach_detach_observers.
4033 * record-btrace.c (record_btrace_thread_observer): Remove.
4034 (record_btrace_thread_observer_token): New global.
4035 * observer.sh: Remove.
4036 * observer.c: Rename to observable.c.
4037 * observable.c (namespace gdb_observers): Define new objects.
4038 (observer_debug): Move into gdb_observers namespace.
4039 (struct observer, struct observer_list, xalloc_observer_list_node)
4040 (xfree_observer_list_node, generic_observer_attach)
4041 (generic_observer_detach, generic_observer_notify): Remove.
4042 (_initialize_observer): Update.
4043 Don't include observer.inc.
4044 * Makefile.in (generated_files): Remove observer.h, observer.inc.
4045 (clean mostlyclean): Likewise.
4046 (observer.h, observer.inc): Remove targets.
4047 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
4048 (COMMON_SFILES): Use observable.c, not observer.c.
4049 * .gitignore: Remove observer.h.
4050
1cb1f3da
TT
40512018-03-18 Tom Tromey <tom@tromey.com>
4052
4053 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
4054 gdb::def_vector.
4055 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
4056
a06ab151
TT
40572018-03-17 Tom Tromey <tom@tromey.com>
4058
4059 * auto-load.c (auto_load_objfile_script_1): Use std::string.
4060
770623f7
TT
40612018-03-17 Tom Tromey <tom@tromey.com>
4062
4063 * target.c (class scoped_target_fd): New.
4064 (target_fileio_close_cleanup): Remove.
4065 (target_fileio_read_alloc_1): Use scoped_target_fd.
4066
39be3c7e
SM
40672018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
4068
4069 * silent-rules.mk: New.
4070 * Makefile.in: Include silent-rules.mk
4071 (srcdir, VPATH, top_srcdir): Move up.
4072 (COMPILE): Add ECHO_CXX.
4073 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
4074 (init.c): Add ECHO_INIT_C.
4075 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4076 (version.c): Add ECHO_GEN.
4077 (printcmd.o): Add ECHO_CXX.
4078 (target-float.o): Add ECHO_CXX.
4079 (ada-exp.o): Add ECHO_CXX.
4080 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
4081 (insight$(EXEEXT)): Add ECHO_CXXLD.
4082 * gnulib/configure.ac: Add AM_SILENT_RULES.
4083 * gnulib/aclocal.m4: Re-generate.
4084 * gnulib/configure: Re-generate.
4085 * gnulib/import/Makefile.in: Re-generate.
4086
37e136b1
TT
40872018-03-16 Tom Tromey <tom@tromey.com>
4088
4089 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
4090 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
4091 * utils.c (do_free_section_addr_info)
4092 (make_cleanup_free_section_addr_info): Remove.
4093 * symfile.h (struct other_sections): Add constructor.
4094 (struct section_addr_info): Remove.
4095 (section_addr_info): New typedef.
4096 (struct sym_fns) <sym_offsets>: Change type of parameter.
4097 (build_section_addr_info_from_objfile)
4098 (relative_addr_info_to_section_offsets, addr_info_make_relative)
4099 (default_symfile_offsets, symbol_file_add)
4100 (symbol_file_add_from_bfd)
4101 (build_section_addr_info_from_section_table): Update.
4102 (alloc_section_addr_info, free_section_addr_info): Don't declare.
4103 * symfile.c (alloc_section_addr_info): Remove.
4104 (build_section_addr_info_from_section_table): Change return type.
4105 Update.
4106 (build_section_addr_info_from_bfd)
4107 (build_section_addr_info_from_objfile): Likewise.
4108 (free_section_addr_info): Remove.
4109 (relative_addr_info_to_section_offsets): Change type of "addrs".
4110 (addrs_section_compar): Now a std::sort comparator.
4111 (addrs_section_sort): Change return type.
4112 (addr_info_make_relative): Change type of "addrs". Update.
4113 (default_symfile_offsets, syms_from_objfile_1)
4114 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
4115 (symbol_file_add_separate): Update.
4116 (symbol_file_add): Change type of "addrs". Update.
4117 (add_symbol_file_command): Update. Remove cleanups.
4118 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
4119 cleanups.
4120 * symfile-debug.c (debug_sym_offsets): Change type of "info".
4121 * solib.c (solib_read_symbols): Update.
4122 * objfiles.c (objfile_relocate): Update. Remove cleanups.
4123 * machoread.c (macho_symfile_offsets): Update.
4124 * jit.c (jit_bfd_try_read_symtab): Update.
4125
03afa6ef
SM
41262018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
4127
4128 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4129 unittests/utils-selftests.c.
4130 * unittests/utils-selftests.c: New file.
4131
3ae9ce5d
TT
41322018-03-14 Tom Tromey <tom@tromey.com>
4133
4134 PR cli/14977:
4135 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
4136 for NULL.
4137
b8c2339b
TT
41382018-03-14 Tom Tromey <tom@tromey.com>
4139
4140 PR cli/19918:
4141 * printcmd.c (printf_pointer): Allow "-" in format.
4142
80ae639d
TT
41432018-03-14 Tom Tromey <tom@tromey.com>
4144
4145 * printcmd.c (_initialize_printcmd): Add usage to printf.
4146
0d671d99
YQ
41472018-03-14 Yao Qi <qiyao@sourceware.org>
4148
4149 * MAINTAINERS: Update my email address.
4150
b577b6af
TT
41512018-03-13 Tom Tromey <tom@tromey.com>
4152
4153 * machoread.c (macho_check_dsym): Change filenamep to a
4154 std::string*.
4155 (macho_symfile_read): Update.
4156 * symfile.c (load_command): Use std::string.
4157
89a3b63e
AB
41582018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
4159
4160 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
4161 to error message string.
4162 (riscv_register_name): Use xsnprintf instead of sprintf.
4163 (riscv_insn::fetch_instruction): Use gdb_assert instead of
4164 internal_error.
4165 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
4166 error.
4167 (riscv_push_dummy_call): Likewise.
4168
984c7238
TT
41692018-03-12 Tom Tromey <tom@tromey.com>
4170
4171 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
4172 Use gdb::byte_vector.
4173 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
4174
933522d1
YQ
41752018-03-12 Yao Qi <yao.qi@linaro.org>
4176
4177 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
4178 parameter type to readable_regcache.
4179 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
4180 the declaration.
4181
be2daae6
TT
41822018-03-11 Tom Tromey <tom@tromey.com>
4183
4184 * dwarf2read.c (struct nextfield): Add initializers.
4185 (struct nextfnfield): Remove.
4186 (struct fnfieldlist): Add initializers. Remove "length" and
4187 "head", use std::vector.
4188 (struct decl_field_list): Remove.
4189 (struct field_info): Add initializers.
4190 <fields, baseclasses>: Now std::vector.
4191 <nbaseclasses, nfnfields, typedef_field_list_count,
4192 nested_types_list_count>: Remove.
4193 (dwarf2_add_field, dwarf2_add_type_defn)
4194 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
4195 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
4196 (process_structure_scope): Update.
4197
484cf504
TT
41982018-03-11 Tom Tromey <tom@tromey.com>
4199
4200 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
4201 for use by std::sort.
4202 (build_type_psymtabs_1): Use std::vector.
4203
9bd8e0b0
EZ
42042018-03-09 Eli Zaretskii <eliz@gnu.org>
4205
4206 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
4207 and LIBMPFR in the printed configuration.
4208
5dc1a704
TT
42092018-03-08 Tom Tromey <tom@tromey.com>
4210
4211 * source.c (get_filename_and_charpos): Use scoped_fd.
4212 * nto-procfs.c (procfs_open_1): Use scoped_fd.
4213 (procfs_pidlist): Likewise.
4214 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
4215 (iterate_over_mappings): Likewise.
4216
fdf07f3a
TT
42172018-03-08 Tom Tromey <tom@tromey.com>
4218
4219 * infcall.c (struct call_return_meta_info)
4220 <stack_temporaries_enabled>: Remove.
4221 (get_call_return_value, call_function_by_hand_dummy): Update.
4222 * thread.c (disable_thread_stack_temporaries): Remove.
4223 (enable_thread_stack_temporaries): Remove.
4224 (thread_stack_temporaries_enabled_p): Return bool.
4225 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
4226 (get_last_thread_stack_temporary): Update.
4227 * eval.c (evaluate_subexp): Update.
4228 * gdbthread.h (class enable_thread_stack_temporaries): Now a
4229 class, not a function.
4230 (value_ptr, value_vec): Remove typedefs.
4231 (class thread_info) <stack_temporaries_enabled>: Now bool.
4232 <stack_temporaries>: Now a std::vector.
4233 (thread_stack_temporaries_enabled_p)
4234 (value_in_thread_stack_temporaries): Return bool.
4235
567a3e54
SM
42362018-03-08 Simon Marchi <simon.marchi@ericsson.com>
4237
4238 * remote.c (putpkt_binary): Fix omitted bytes reporting.
4239 (getpkt_or_notif_sane_1): Likewise.
4240
00b40057
SM
42412018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4242
4243 * build-id.c (build_id_to_debug_bfd): Use std::string.
4244
a8dbfd58
SM
42452018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4246
4247 * build-id.c (find_separate_debug_file_by_buildid): Return
4248 std::string.
4249 * build-id.h (find_separate_debug_file_by_buildid): Return
4250 std::string.
4251 * coffread.c (coff_symfile_read): Adjust to std::string.
4252 * elfread.c (elf_symfile_read): Adjust to std::string.
4253 * symfile.c (separate_debug_file_exists): Change parameter to
4254 std::string.
4255 (find_separate_debug_file): Return std::string.
4256 (find_separate_debug_file_by_debuglink): Return std::string.
4257 * symfile.h (find_separate_debug_file_by_debuglink): Return
4258 std::string.
4259
e6a58aa8
SM
42602018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4261
4262 * common/xml-utils.c (xml_escape_text): Move code to...
4263 (xml_escape_text_append): ... this new function.
4264 * common/xml-utils.h (xml_escape_text_append): New declaration.
4265 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
4266 New function.
4267 (_initialize_xml_utils): register test_xml_escape_text_append as
4268 a selftest.
4269
4ef0bef6
AH
42702018-03-07 Alan Hayward <alan.hayward@arm.com>
4271
4272 * defs.h: Remove MAX_REGISTER_SIZE.
4273 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
4274 asserts.
4275 * python/py-unwind.c (pyuw_sniffer): Likewise.
4276
e0d3522b
TT
42772018-03-07 Tom Tromey <tom@tromey.com>
4278
4279 * linux-tdep.c (linux_info_proc): Update.
4280 * target.h (struct target_ops) <to_fileio_readlink>: Return
4281 optional<string>.
4282 (target_fileio_readlink): Return optional<string>.
4283 * remote.c (remote_hostio_readlink): Return optional<string>.
4284 * inf-child.c (inf_child_fileio_readlink): Return
4285 optional<string>.
4286 * target.c (target_fileio_readlink): Return optional<string>.
4287
ea005f31
AB
42882018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
4289
4290 * regcache.c (cooked_read_test): Add riscv to the list of
4291 architectures that have a save_reggroup.
4292
e95a97d4
AA
42932018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
4294
4295 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
4296 value is not a dynamic class object.
4297
d8344f3d
TT
42982018-03-06 Tom Tromey <tom@tromey.com>
4299
4300 * rust-exp.y: Formatting fixes.
4301
9add17f2
AB
43022018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4303
4304 * riscv-tdep.c (riscv_register_name): Remove target description
4305 support.
4306 (riscv_gdbarch_init): Remove target description check.
4307
c9486dfe
AB
43082018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4309
4310 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
4311 comment.
4312 * riscv-tdep.h: Likewise.
4313
d74aff3d
AB
43142018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4315
4316 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
4317 (riscv_pseudo_register_write): Delete.
4318 (riscv_gdbarch_init): Remove all use of pseudo registers.
4319
7ea78b59
SM
43202018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4321
4322 * record-btrace.c (btrace_print_lines): Replace cleanup
4323 parameter with RAII equivalents.
4324 (btrace_insn_history): Replace cleanup with RAII equivalents.
4325 * ui-out.h (make_cleanup_ui_out_list_begin_end,
4326 make_cleanup_ui_out_tuple_begin_end): Remove.
4327 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
4328 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
4329 make_cleanup_ui_out_list_begin_end): Remove.
4330
53127008
SM
43312018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4332
4333 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
4334 parameter types to std::vector. Use bool.
4335 (record_btrace_wait): Replace VEC(tp_t) with
4336 std::vector<thread_info *>.
4337 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
4338
228f1508
SM
43392018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4340
4341 * record-btrace.c (record_btrace_disable_callback): Remove.
4342 (struct scoped_btrace_disable): New.
4343 (record_btrace_open): Use scoped_btrace_disable.
4344
b2970c23
AB
43452018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4346
4347 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
4348 reading values from registers.
4349
fb294655
AB
43502018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4351
4352 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
4353 where appropriate.
4354
cab5bb9d
AB
43552018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4356
4357 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
4358 change parameter type. Use GDB's print functions, and use
4359 core_addr_to_string where appropriate.
4360 (riscv_push_dummy_call): Use core_addr_to_string where
4361 appropriate, update call to riscv_print_arg_location, and reindent
4362 a few lines.
4363 (riscv_return_value): Update call to riscv_print_arg_location.
4364
dbbb1059
AB
43652018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4366 Tim Newsome <tim@sifive.com>
4367 Albert Ou <a0u@eecs.berkeley.edu>
4368 Darius Rad <darius@bluespec.com>
4369
4370 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
4371 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
4372 (ALLDEPFILES): Add riscv-tdep.c
4373 * configure.tgt: Add riscv support.
4374 * riscv-tdep.c: New file.
4375 * riscv-tdep.h: New file.
4376 * NEWS: Mention new target.
4377 * MAINTAINERS: Add entry for riscv.
4378
5dc43913
AB
43792018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4380
4381 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
4382 fields within aggregates.
4383
3dea1ef7
SM
43842018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
4385
4386 * record-btrace.c (btrace_print_lines): Change type of flags to
4387 gdb_disassembly_flags.
4388
7efba073
JB
43892018-03-04 John Baldwin <jhb@FreeBSD.org>
4390
4391 * fbsd-nat.c: Include "inf-ptrace.h".
4392 (USE_SIGTRAP_SIGINFO): Conditionally define.
4393 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
4394 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
4395 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
4396 function.
4397 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
4398 Likewise.
4399 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
4400 Likewise.
4401 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
4402 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
4403 "supports_stopped_by_hw_breakpoint" target methods.
4404
386a8676
JB
44052018-03-04 John Baldwin <jhb@FreeBSD.org>
4406
4407 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
4408 * fbsd-nat.c (debug_fbsd_nat): New variable.
4409 (show_fbsd_nat_debug): New function.
4410 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
4411 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
4412
12279366
JB
44132018-03-04 John Baldwin <jhb@FreeBSD.org>
4414
4415 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
4416 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
4417 prototype.
4418 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
4419 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
4420 method.
4421
54693cf5
SM
44222018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4423
4424 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
4425 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
4426
ccb2231c
SM
44272018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4428
4429 * charset.c (struct charset_vector): New.
4430 (charsets): Change type to charset_vector.
4431 (find_charset_names): Adjust.
4432 (add_one): Adjust.
4433 (_initialize_charset): Adjust.
4434
6fb16ce6
SM
44352018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4436
4437 * progspace.h (struct program_space) <deleted_solibs>: Change
4438 type to std::vector<std::string>.
4439 * progspace.c (clear_program_space_solib_cache): Adjust.
4440 * breakpoint.c (print_solib_event): Adjust.
4441 (check_status_catch_solib): Adjust.
4442 * solib.c (update_solib_list): Adjust.
4443 * ui-out.h (class ui_out) <field_string>: New overload.
4444 * ui-out.c (ui_out::field_string): New overload.
4445
564b1e3f
SM
44462018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4447
4448 * progspace.h (struct program_space): Add constructor and
4449 destructor, initialize fields.
4450 (add_program_space): Remove.
4451 * progspace.c (add_program_space): Rename to...
4452 (program_space::program_space): ... this.
4453 (release_program_space): Rename to...
4454 (program_space::~program_space): ... this.
4455 (delete_program_space): Use delete to delete program_space.
4456 (initialize_progspace): Use new to allocate program_space.
4457 * inferior.c (add_inferior_with_spaces): Likewise.
4458 (clone_inferior_command): Likewise.
4459 * infrun.c (follow_fork_inferior): Likewise.
4460 (handle_vfork_child_exec_or_exit): Likewise.
4461
e80aaf61
SM
44622018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4463
4464 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
4465 (delim_string_to_char_ptr_vec): Return std::vector of
4466 gdb::unique_xmalloc_ptr.
4467 (dirnames_to_char_ptr_vec_append): Take std::vector of
4468 gdb::unique_xmalloc_ptr.
4469 (dirnames_to_char_ptr_vec): Return std::vector of
4470 gdb::unique_xmalloc_ptr.
4471 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
4472 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
4473 (delim_string_to_char_ptr_vec): Return an std::vector of
4474 gdb::unique_xmalloc_ptr, adjust the code.
4475 (dirnames_to_char_ptr_vec_append): Take an std::vector of
4476 gdb::unique_xmalloc_ptr, adjust the code.
4477 (dirnames_to_char_ptr_vec): Return an std::vector of
4478 gdb::unique_xmalloc_ptr, adjust the code.
4479 * auto-load.c (auto_load_safe_path_vec): Change type to
4480 std::vector of gdb::unique_xmalloc_ptr.
4481 (auto_load_expand_dir_vars): Return an std::vector of
4482 gdb::unique_xmalloc_ptr, adjust the code.
4483 (auto_load_safe_path_vec_update): Adjust.
4484 (filename_is_in_auto_load_safe_path_vec): Adjust.
4485 (auto_load_objfile_script_1): Adjust.
4486 * build-id.c (build_id_to_debug_bfd): Adjust.
4487 * linux-thread-db.c (thread_db_load_search): Adjust.
4488 * source.c (add_path): Adjust.
4489 (openp): Adjust.
4490 * symfile.c (find_separate_debug_file): Adjust.
4491 * utils.c (do_free_char_ptr_vec): Remove.
4492 (make_cleanup_free_char_ptr_vec): Remove.
4493
ab818ade
SDJ
44942018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
4495
4496 PR gdb/22907
4497 * common/pathstuff.c: Conditionally include "<windows.h>".
4498
e1e6f073
GS
44992018-03-01 Georg Sauthoff <mail@georg.so>
4500
4501 PR gdb/22888
4502 * gcore.in: Quote variables and switch interpreter to bash.
4503
c7b15a66
TT
45042018-03-01 Tom Tromey <tom@tromey.com>
4505
4506 * dwarf2read.c (alloc_discriminant_info): Fix default_index
4507 assertion. Add assertion for discriminant_index.
4508 (quirk_rust_enum): Use correct base type name in univariant case.
4509
0cb7c7b0
SM
45102018-03-01 Simon Marchi <simon.marchi@ericsson.com>
4511
4512 * record.c (get_call_history_modifiers): Return a
4513 record_print_flags.
4514 (cmd_record_call_history): Adjust.
4515 * record-btrace.c (record_btrace_call_history): Adjust.
4516 (record_btrace_call_history_range): Adjust.
4517 (record_btrace_call_history_from): Adjust.
4518 * target-debug.h (target_debug_print_record_print_flags): New.
4519 * target-delegates.c: Re-generate.
4520 * target.c (target_call_history): Change flags type.
4521 (target_call_history_from): Likewise.
4522 (target_call_history_range): Likewise.
4523 * target.h (struct target_ops) <target_call_history>: Likewise.
4524 (target_call_history_from): Likewise.
4525 (target_call_history_range): Likewise.
4526
25e3c82c
SDJ
45272018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4528 Simon Marchi <simon.marchi@polymtl.ca>
4529
4530 * common/common-utils.c: Include "sys/stat.h".
4531 (is_regular_file): Move here from "source.c"; change return
4532 type to "bool".
4533 * common/common-utils.h (is_regular_file): New prototype.
4534 * common/pathstuff.c (contains_dir_separator): New function.
4535 * common/pathstuff.h (contains_dir_separator): New prototype.
4536 * source.c: Don't include "sys/stat.h".
4537 (is_regular_file): Move to "common/common-utils.c".
4538
b4987c95
SDJ
45392018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4540
4541 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
4542 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
4543 * auto-load.c: Include "common/pathstuff.h".
4544 * common/common-def.h (current_directory): Move here.
4545 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
4546 function.
4547 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
4548 prototype.
4549 * common/pathstuff.c: New file.
4550 * common/pathstuff.h: New file.
4551 * compile/compile.c: Include "common/pathstuff.h".
4552 * defs.h (current_directory): Move to "common/common-defs.h".
4553 * dwarf2read.c: Include "common/pathstuff.h".
4554 * exec.c: Likewise.
4555 * guile/scm-safe-call.c: Likewise.
4556 * linux-thread-db.c: Likewise.
4557 * main.c: Likewise.
4558 * nto-tdep.c: Likewise.
4559 * objfiles.c: Likewise.
4560 * source.c: Likewise.
4561 * symtab.c: Likewise.
4562 * utils.c: Include "common/pathstuff.h".
4563 (gdb_realpath): Move to "common/pathstuff.c".
4564 (gdb_realpath_keepfile): Likewise.
4565 (gdb_abspath): Likewise.
4566 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
4567 (gdb_realpath_keepfile): Likewise.
4568 (gdb_abspath): Likewise.
4569
f169cfdc
JB
45702018-02-28 John Baldwin <jhb@FreeBSD.org>
4571
4572 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
4573 wildcard process pid for super_resume for kernels with a
4574 specific bug.
4575
e05cac70
PM
45762018-02-27 Phil Muldoon <pmuldoon@redhat.com>
4577
4578 * compile/compile.c (get_args): Add additional comments
4579 explaining function.
4580
55089490
TT
45812018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
4582 Tom Tromey <tom@tromey.com>
4583
4584 * target.h (memory_write_request_s): Remove typedef. Don't define
4585 VEC.
4586 (target_write_memory_blocks): Change argument to std::vector.
4587 (struct memory_write_request): Add constructor.
4588 * target-memory.c (compare_block_starting_address): Return bool.
4589 Change argument types.
4590 (claim_memory): Change arguments to use std::vector.
4591 (split_regular_and_flash_blocks, blocks_to_erase)
4592 (compute_garbled_blocks): Likewise.
4593 (cleanup_request_data, cleanup_write_requests_vector): Remove.
4594 (target_write_memory_blocks): Change argument to std::vector.
4595 * symfile.c (struct load_section_data): Add constructor and
4596 destructor. Use std::vector for "requests".
4597 (struct load_progress_data): Add initializers.
4598 (load_section_callback): Update. Use "new".
4599 (clear_memory_write_data): Remove.
4600 (generic_load): Update.
4601
0c305b61
AH
46022018-02-27 Alan Hayward <alan.hayward@arm.com>
4603
4604 * arch/aarch64.h: Use common/tdesc.h.
4605
c5196c92
MR
46062018-02-26 Maciej W. Rozycki <macro@mips.com>
4607
4608 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
4609 architecture with a 64-bit ABI.
4610
37c33887
MR
46112018-02-26 Maciej W. Rozycki <macro@mips.com>
4612
4613 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
4614 ahead of target description loading.
4615
d4dd3282
TT
46162018-02-26 Tom Tromey <tom@tromey.com>
4617
4618 * stack.c (backtrace_command_1): Update.
4619 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
4620 of "flags".
4621 * python/py-framefilter.c (py_print_frame)
4622 (gdbpy_apply_frame_filter): Change type of "flags".
4623 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
4624 of "flags".
4625 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
4626 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
4627 * extension.h (enum frame_filter_flag): Rename from
4628 frame_filter_flags.
4629 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
4630 (apply_ext_lang_frame_filter): Change type of "flags".
4631 * extension.c (apply_ext_lang_frame_filter): Change type of
4632 "flags".
4633 * extension-priv.h (struct extension_language_ops)
4634 <apply_frame_filter>: Change type of "flags".
4635
6893c19a
TT
46362018-02-26 Tom Tromey <tom@tromey.com>
4637
4638 PR python/16497:
4639 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
4640 off-by-one in py_end computation.
4641 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
4642 PRINT_MORE_FRAMES.
4643 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
4644 constant.
4645
2ddeaf8a
TT
46462018-02-26 Tom Tromey <tom@tromey.com>
4647
4648 * dwarf2read.c (struct variant_field): New.
4649 (struct nextfield) <variant>: New field.
4650 (dwarf2_add_field): Handle DW_TAG_variant_part.
4651 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
4652 discriminated union.
4653 (read_structure_type): Handle DW_TAG_variant_part.
4654 (handle_struct_member_die): New function, extracted from
4655 process_structure_scope. Handle DW_TAG_variant.
4656 (process_structure_scope): Handle discriminated unions. Call
4657 handle_struct_member_die.
4658
c9317f21
TT
46592018-02-26 Tom Tromey <tom@tromey.com>
4660
4661 * rust-lang.h (rust_last_path_segment): Declare.
4662 * rust-lang.c (rust_last_path_segment): Now public. Change
4663 contract.
4664 (struct disr_info): Remove.
4665 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
4666 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
4667 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
4668 (rust_enum_p, rust_enum_variant): New function.
4669 (rust_underscore_fields): Remove "offset" parameter.
4670 (rust_print_enum): New function.
4671 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
4672 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
4673 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
4674 enums.
4675 (rust_internal_print_type): New function, from rust_print_type.
4676 Remove enum code.
4677 (rust_print_type): Call rust_internal_print_type.
4678 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
4679 Update enum handling.
4680 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
4681 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
4682 (rust_union_quirks): New functions.
4683 (process_full_comp_unit, process_full_type_unit): Call
4684 rust_union_quirks.
4685 (process_structure_scope): Update rust_unions if necessary.
4686
7c22600a
TT
46872018-02-26 Tom Tromey <tom@tromey.com>
4688
4689 * value.h (value_union_variant): Declare.
4690 * valops.c (value_union_variant): New function.
4691 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
4692 (struct discriminant_info): New.
4693 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
4694 enumerator.
4695 (struct main_type) <flag_discriminated_union>: New field.
4696
15ce8941
TT
46972018-02-26 Tom Tromey <tom@tromey.com>
4698
4699 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4700 unittests/unpack-selftests.c.
4701 * unittests/unpack-selftests.c: New file.
4702 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
4703
48fbe735
YQ
47042018-02-26 Yao Qi <yao.qi@linaro.org>
4705
4706 * dwarf2read.c (struct partial_die_info) <read>: New method.
4707 (read_partial_die): Remove the declaration.
4708 (load_partial_dies): Update.
4709 (partial_die_info::partial_die_info):
4710 (read_partial_die): Change it to partial_die_info::read.
4711
52356b79
YQ
47122018-02-26 Yao Qi <yao.qi@linaro.org>
4713
4714 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
4715 (fixup_partial_die): Remove declaration.
4716 (scan_partial_symbols): Update.
4717 (partial_die_parent_scope): Likewise.
4718 (partial_die_full_name): Likewise.
4719 (fixup_partial_die): Change it to partial_die_info::fixup.
4720
35cc7ed7
YQ
47212018-02-26 Yao Qi <yao.qi@linaro.org>
4722
4723 * dwarf2read.c (read_partial_die): Update the declaration.
4724 (load_partial_dies): Caller update.
4725 (read_partial_die): Remove one argument abbrev_len.
4726
6f06d47b
YQ
47272018-02-26 Yao Qi <yao.qi@linaro.org>
4728
4729 * dwarf2read.c (struct partial_die_info): Add ctor, delete
4730 assignment operator.
4731 (load_partial_dies): Use ctor and copy ctor.
4732 (read_partial_die): Update.
4733 (dwarf2_cu::find_partial_die): Use ctor.
4734
d590ff25
YQ
47352018-02-26 Yao Qi <yao.qi@linaro.org>
4736
4737 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
4738 (find_partial_die_in_comp_unit): Change it to
4739 dwarf2_cu::find_partial_die.
4740 (find_partial_die): Update.
4741
fd0a254f
YQ
47422018-02-26 Yao Qi <yao.qi@linaro.org>
4743
4744 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
4745 is NULL.
4746
cd9983dd
YQ
47472018-02-26 Yao Qi <yao.qi@linaro.org>
4748
4749 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
4750
f46cd62a
AH
47512018-02-26 Alan Hayward <alan.hayward@arm.com>
4752
4753 * arch/amd64.h: Use common/tdesc.h.
4754 * arch/i386.c: Likewise.
4755 * arch/i386.h: Likewise.
4756 * arch/tic6x.c: Likewise.
4757 * arch/tdesc.h: Move file from here...
4758 * common/tdesc.h: ...to here.
4759 * features/aarch64-core.c: Regenerate.
4760 * features/aarch64-fpu.c: Regenerate.
4761 * features/i386/32bit-avx.c: Regenerate.
4762 * features/i386/32bit-avx512.c: Regenerate.
4763 * features/i386/32bit-core.c: Regenerate.
4764 * features/i386/32bit-linux.c: Regenerate.
4765 * features/i386/32bit-mpx.c: Regenerate.
4766 * features/i386/32bit-pkeys.c: Regenerate.
4767 * features/i386/32bit-sse.c: Regenerate.
4768 * features/i386/64bit-avx.c: Regenerate.
4769 * features/i386/64bit-avx512.c: Regenerate.
4770 * features/i386/64bit-core.c: Regenerate.
4771 * features/i386/64bit-linux.c: Regenerate.
4772 * features/i386/64bit-mpx.c: Regenerate.
4773 * features/i386/64bit-pkeys.c: Regenerate.
4774 * features/i386/64bit-segments.c: Regenerate.
4775 * features/i386/64bit-sse.c: Regenerate.
4776 * features/i386/x32-core.c: Regenerate.
4777 * features/tic6x-c6xp.c: Regenerate.
4778 * features/tic6x-core.c: Regenerate.
4779 * features/tic6x-gp.c: Regenerate.
4780 * target-descriptions.c: Use common/tdesc.h.
4781 * target-descriptions.h: Likewise.
4782
9b292f68
TT
47832018-02-24 Tom Tromey <tom@tromey.com>
4784
4785 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
4786 (try_thread_db_load_from_dir, thread_db_load_search): Use
4787 std::string.
4788 (info_auto_load_libthread_db_compare): Return bool. Change
4789 argument types.
4790 (info_auto_load_libthread_db): Use std::vector, std::string.
4791 Remove cleanups.
4792
281d762b
TT
47932018-02-24 Tom Tromey <tom@tromey.com>
4794
4795 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
4796 std::string.
4797 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
4798 std::string*.
4799 * gdbarch.c: Rebuild.
4800 * gdbarch.h: Rebuild.
4801 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
4802 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
4803 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
4804 std::string*.
4805
9d8780f0
SM
48062018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
4807
4808 * gdbtypes.h (sect_offset): Change type to uint64_t.
4809 (sect_offset_str): New function.
4810 * dwarf2read.c (create_addrmap_from_aranges): Use
4811 sect_offset_str.
4812 (error_check_comp_unit_head): Likewise.
4813 (create_debug_type_hash_table): Likewise.
4814 (read_cutu_die_from_dwo): Likewise.
4815 (init_cutu_and_read_dies): Likewise.
4816 (init_cutu_and_read_dies_no_follow): Likewise.
4817 (process_psymtab_comp_unit_reader): Likewise.
4818 (partial_die_parent_scope): Likewise.
4819 (peek_die_abbrev): Likewise.
4820 (process_queue): Likewise.
4821 (dwarf2_physname): Likewise.
4822 (read_namespace_alias): Likewise.
4823 (read_import_statement): Likewise.
4824 (create_dwo_cu_reader): Likewise.
4825 (create_cus_hash_table): Likewise.
4826 (lookup_dwo_cutu): Likewise.
4827 (inherit_abstract_dies): Likewise.
4828 (read_func_scope): Likewise.
4829 (read_call_site_scope): Likewise.
4830 (dwarf2_add_member_fn): Likewise.
4831 (read_common_block): Likewise.
4832 (read_module_type): Likewise.
4833 (read_typedef): Likewise.
4834 (read_subrange_type): Likewise.
4835 (load_partial_dies): Likewise.
4836 (read_partial_die): Likewise.
4837 (find_partial_die): Likewise.
4838 (read_str_index): Likewise.
4839 (dwarf2_string_attr): Likewise.
4840 (build_error_marker_type): Likewise.
4841 (lookup_die_type): Likewise.
4842 (dump_die_shallow): Likewise.
4843 (follow_die_ref): Likewise.
4844 (dwarf2_fetch_die_loc_sect_off): Likewise.
4845 (dwarf2_fetch_constant_bytes): Likewise.
4846 (follow_die_sig): Likewise.
4847 (get_signatured_type): Likewise.
4848 (get_DW_AT_signature_type): Likewise.
4849 (dwarf2_find_containing_comp_unit): Likewise.
4850 (set_die_type): Likewise.
4851
8ec57239
JB
48522018-02-21 John Baldwin <jhb@FreeBSD.org>
4853
4854 * arch/aarch64.c: Include "common-defs.h".
4855 * arch/amd64.c: Likewise.
4856 * arch/i386.c: Likewise.
4857
3eac2b65
TT
48582018-02-21 Tom Tromey <tom@tromey.com>
4859
4860 * value.h: (extract_field_op): Update.
4861 * eval.c (extract_field_op): Return a const char *.
4862 * expression.h (parse_expression_for_completion): Update.
4863 * completer.c (complete_expression): Update.
4864 (add_struct_fields): Make fieldname const.
4865 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
4866 (mark_completion_tag, parse_exp_in_context_1): Update.
4867 (parse_expression_for_completion): Change "name" to
4868 unique_xmalloc_ptr*.
4869
6ccb583f
TT
48702018-02-21 Tom Tromey <tom@tromey.com>
4871
4872 * infcall.c (call_function_by_hand_dummy): Use std::vector.
4873
c113ed0c
YQ
48742018-02-21 Yao Qi <yao.qi@linaro.org>
4875
4876 * avr-tdep.c (avr_read_pc): Change parameter type to
4877 readable_regcache.
4878 * gdbarch.sh (read_pc): Likewise.
4879 * gdbarch.c: Re-generated.
4880 * gdbarch.h: Re-generated.
4881 * hppa-tdep.c (hppa_read_pc): Change parameter type to
4882 readable_regcache.
4883 * ia64-tdep.c (ia64_read_pc): Likewise.
4884 * mips-tdep.c (mips_read_pc): Likewise.
4885 * spu-tdep.c (spu_read_pc): Likewise.
4886
4c74fe6b
YQ
48872018-02-21 Yao Qi <yao.qi@linaro.org>
4888
4889 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
4890 * regcache-dump.c: New file.
4891 * regcache.c: Move register_dump to regcache-dump.c.
4892 (maintenance_print_registers): Likewise.
4893 (maintenance_print_raw_registers): Likewise.
4894 (maintenance_print_cooked_registers): Likewise.
4895 (maintenance_print_register_groups): Likewise.
4896 (maintenance_print_remote_registers): Likewise.
4897 (_initialize_regcache): Likewise.
4898 * regcache.h (register_dump): Moved from regcache.c.
4899
796bb026
YQ
49002018-02-21 Yao Qi <yao.qi@linaro.org>
4901
4902 * regcache.c (regcache::regcache): Update.
4903 (regcache::invalidate): Move it to detached_regcache::invalidate.
4904 (get_thread_arch_aspace_regcache): Update.
4905 (regcache::raw_update): Update.
4906 (regcache::cooked_read): Remove some code.
4907 (regcache::cooked_read_value): Likewise.
4908 (regcache::raw_write): Remove assert on m_readonly_p.
4909 (regcache::raw_supply_integer): Move it to
4910 detached_regcache::raw_supply_integer.
4911 (regcache::raw_supply_zeroed): Likewise.
4912 * regcache.h (detached_regcache) <raw_supply_integer>: New
4913 declaration.
4914 <raw_supply_zeroed, invalidate>: Likewise.
4915 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
4916 <invalidate>: Likewise.
4917 <m_readonly_p>: Removed.
4918
215c69dc
YQ
49192018-02-21 Yao Qi <yao.qi@linaro.org>
4920
4921 * infcmd.c (get_return_value): Let stop_regs point to
4922 get_current_regcache.
4923 * regcache.c (regcache::regcache): Remove.
4924 (register_dump_reg_buffer): New class.
4925 (regcache_print): Adjust.
4926 * regcache.h (regcache): Remove constructors.
4927
f3384e66
YQ
49282018-02-21 Yao Qi <yao.qi@linaro.org>
4929
4930 * regcache.c (class register_dump): New class.
4931 (register_dump_regcache, register_dump_none): New class.
4932 (register_dump_remote, register_dump_groups): New class.
4933 (regcache_print): Update.
4934 * regcache.h (regcache_dump_what): Move it to regcache.c.
4935 (regcache) <dump>: Remove.
4936
c8ec2f33
YQ
49372018-02-21 Yao Qi <yao.qi@linaro.org>
4938
4939 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
4940 reg_buffer_rw *.
4941 (jit_unwind_reg_set_impl): Call raw_supply.
4942 (jit_frame_sniffer): Use reg_buffer_rw.
4943 * record-full.c (record_full_core_regbuf): Change its type.
4944 (record_full_core_open_1): Use reg_buffer_rw.
4945 (record_full_close): Likewise.
4946 (record_full_core_fetch_registers): Use regcache->raw_supply.
4947 (record_full_core_store_registers): Likewise.
4948 * regcache.c (regcache::get_register_status): Move it to
4949 reg_buffer.
4950 (regcache_raw_set_cached_value): Remove.
4951 (regcache::raw_set_cached_value): Remove.
4952 (regcache::raw_write): Call raw_supply.
4953 (regcache::raw_supply): Move it to reg_buffer_rw.
4954 * regcache.h (regcache_raw_set_cached_value): Remove.
4955 (reg_buffer_rw): New class.
4956
daf6667d
YQ
49572018-02-21 Yao Qi <yao.qi@linaro.org>
4958
4959 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
4960 readonly_detached_regcache.
4961 (dummy_frame_prev_register): Use regcache->cooked_read.
4962 * frame.c (frame_save_as_regcache): Change return type.
4963 (frame_pop): Update.
4964 * frame.h (frame_save_as_regcache): Update declaration.
4965 * inferior.h (get_infcall_suspend_state_regcache): Update
4966 declaration.
4967 * infrun.c (infcall_suspend_state) <registers>: use
4968 readonly_detached_regcache.
4969 (save_infcall_suspend_state): Don't use regcache_dup.
4970 (get_infcall_suspend_state_regcache): Change return type.
4971 * linux-fork.c (struct fork_info) <savedregs>: Change to
4972 readonly_detached_regcache.
4973 <pc>: New field.
4974 (fork_save_infrun_state): Don't use regcache_dup.
4975 (info_checkpoints_command): Adjust.
4976 * mi/mi-main.c (register_changed_p): Update declaration.
4977 (mi_cmd_data_list_changed_registers): Use
4978 readonly_detached_regcache.
4979 (register_changed_p): Change parameter type to
4980 readonly_detached_regcache.
4981 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
4982 readonly_detached_regcache.
4983 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
4984 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
4985 New.
4986 (regcache::save): Move it to reg_buffer.
4987 (regcache::restore): Change parameter type.
4988 (regcache_dup): Remove.
4989 * regcache.h (reg_buffer) <save>: New method.
4990 (readonly_detached_regcache): New class.
4991 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
4992 readonly_detached_regcache.
4993 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
4994
fc5b8736
YQ
49952018-02-21 Yao Qi <yao.qi@linaro.org>
4996
4997 * frame.c (frame_save_as_regcache): Use regcache method save.
4998 (frame_pop): Use regcache method restore.
4999 * infrun.c (restore_infcall_suspend_state): Likewise.
5000 * linux-fork.c (fork_load_infrun_state): Likewise.
5001 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
5002 save.
5003 * regcache.c (regcache_save): Remove.
5004 (regcache::restore): More asserts.
5005 (regcache_cpy): Remove.
5006 * regcache.h (regcache_save): Remove the declaration.
5007 (regcache::restore): Move from private to public.
5008 Remove the friend declaration of regcache_cpy.
5009 (regcache_cpy): Remove declaration.
5010
849d0ba8
YQ
50112018-02-21 Yao Qi <yao.qi@linaro.org>
5012
5013 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
5014 parameter type to 'readable_regcache *'.
5015 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5016 * arm-tdep.c (arm_neon_quad_read): Likewise.
5017 (arm_pseudo_read): Likewise.
5018 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5019 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5020 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5021 * gdbarch.c: Re-generated.
5022 * gdbarch.h: Re-generated.
5023 * gdbarch.sh (pseudo_register_read): Change parameter type to
5024 'readable_regcache *'.
5025 (pseudo_register_read_value): Likewise.
5026 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
5027 (h8300_pseudo_register_read): Likewise.
5028 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
5029 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5030 (i386_pseudo_register_read_into_value): Likewise.
5031 (i386_pseudo_register_read_value): Likewise.
5032 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
5033 declaration.
5034 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
5035 * m32c-tdep.c (m32c_raw_read): Likewise.
5036 (m32c_read_flg): Likewise.
5037 (m32c_banked_register): Likewise.
5038 (m32c_banked_read): Likewise.
5039 (m32c_sb_read): Likewise.
5040 (m32c_part_read): Likewise.
5041 (m32c_cat_read): Likewise.
5042 (m32c_r3r2r1r0_read): Likewise.
5043 (m32c_pseudo_register_read): Likewise.
5044 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5045 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5046 (mep_pseudo_cr64_read): Likewise.
5047 (mep_pseudo_register_read): Likewise.
5048 * mips-tdep.c (mips_pseudo_register_read): Likewise.
5049 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5050 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5051 * regcache.c (regcache::raw_read): Move it to readable_regcache.
5052 (regcache::cooked_read): Likewise.
5053 (regcache::cooked_read_value): Likewise.
5054 (regcache_cooked_read_signed):
5055 (regcache::cooked_read): Likewise.
5056 * regcache.h (readable_regcache): New class.
5057 (regcache): Inherit readable_regcache. Move some methods to
5058 readable_regcache.
5059 * rl78-tdep.c (rl78_pseudo_register_read): Change
5060 parameter type to 'readable_regcache *'.
5061 * rs6000-tdep.c (do_regcache_raw_read): Remove.
5062 (e500_pseudo_register_read): Change parameter type to
5063 'readable_regcache *'.
5064 (dfp_pseudo_register_read): Likewise.
5065 (vsx_pseudo_register_read): Likewise.
5066 (efpr_pseudo_register_read): Likewise.
5067 * s390-tdep.c (s390_pseudo_register_read): Likewise.
5068 * sh-tdep.c (sh_pseudo_register_read): Likewise.
5069 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
5070 (sh64_pseudo_register_read): Likewise.
5071 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5072 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5073 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5074 (spu_pseudo_register_read): Likewise.
5075 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5076 (xtensa_pseudo_register_read): Likewise.
5077
31716595
YQ
50782018-02-21 Yao Qi <yao.qi@linaro.org>
5079
5080 * regcache.c (regcache::regcache): Call reg_buffer ctor.
5081 (regcache::arch): Move it to reg_buffer::arch.
5082 (regcache::register_buffer): Likewise.
5083 (regcache::assert_regnum): Likewise.
5084 (regcache::num_raw_registers): Likewise.
5085 * regcache.h (reg_buffer): New class.
5086 (regcache): Inherit reg_buffer.
5087
7104e59b
SM
50882018-02-20 Simon Marchi <simon.marchi@ericsson.com>
5089
5090 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
5091 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
5092
2d8adcbd
MM
50932018-02-20 Markus Metzger <markus.t.metzger@intel.com>
5094
5095 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
5096
b5884fa7
AH
50972018-02-19 Alan Hayward <alan.hayward@arm.com>
5098
5099 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
5100 (SFILES): Remove common/*.c files.
5101 (COMMON_OBS): Remove some *.o files built from common/*.c files.
5102 * common/common.host: Add common reference.
5103 * configure.ac: Likewise.
5104 * configure: Regenerate.
5105
fd90ace4
YQ
51062018-02-16 Yao Qi <yao.qi@linaro.org>
5107
5108 * block.c (block_namespace_info): Inherit allocate_on_obstack.
5109 (block_initialize_namespace): Use new.
5110 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
5111 (dwarf2_free_objfile): Use delete.
5112 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
5113 (copy_type_recursive): Use new.
5114 * gdb_obstack.h (allocate_on_obstack): New.
5115
85046ae2
YQ
51162018-02-15 Yao Qi <yao.qi@linaro.org>
5117
5118 PR gdb/22849
5119 * inferior.c (exit_inferior_1): Reset inf->control.
5120
355c559b
JB
51212018-02-15 Joel Brobecker <brobecker@adacore.com>
5122
5123 * ada-lang.c (ada_to_fixed_value_create): Delete advance
5124 declaration.
5125
980548fd
PA
51262018-02-14 Pedro Alves <palves@redhat.com>
5127
5128 * frame-unwind.c (frame_unwind_try_unwinder): Always call
5129 frame_cleanup_after_sniffer on exception.
5130
692d6f97
TT
51312018-02-14 Tom Tromey <tom@tromey.com>
5132
5133 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
5134 const.
5135 (solib_bfd_open): Make pathname const.
5136 * solib.c (solib_bfd_open): Make pathname const.
5137 * solib-spu.c (spu_bfd_fopen): Make name const.
5138 (spu_bfd_open): Make pathname const.
5139 * solib-darwin.c (darwin_bfd_open): Make pathname const.
5140 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
5141
e0cc99a6
TT
51422018-02-14 Tom Tromey <tom@tromey.com>
5143
5144 * symfile.c (symfile_bfd_open): Update.
5145 * source.h (openp, source_full_path_of, find_and_open_source):
5146 Change argument type to unique_xmalloc_ptr.
5147 * source.c (openp): Take a unique_xmalloc_ptr.
5148 (source_full_path_of, find_and_open_source): Likewise.
5149 (open_source_file, symtab_to_fullname): Update.
5150 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
5151 unique_xmalloc_ptr.
5152 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
5153 (exec_file_find): Update.
5154 * psymtab.c (psymtab_to_fullname): Update.
5155 * nto-tdep.h (nto_find_and_open_solib): Update.
5156 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
5157 unique_xmalloc_ptr.
5158 * exec.c (exec_file_attach): Update.
5159 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
5160 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
5161
b46a8d7c
TT
51622018-02-14 Tom Tromey <tom@tromey.com>
5163
5164 * solib.c: Include source.h.
5165 * nto-tdep.c: Include source.h.
5166 * mi/mi-cmd-env.c: Include source.h.
5167 * infcmd.c: Include source.h.
5168 * exec.c: Include source.h.
5169 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
5170 (add_path, directory_switch, source_path, init_source_path): Move
5171 declarations...
5172 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
5173 (add_path, directory_switch, source_path, init_source_path):
5174 ...here.
5175
797bc1cb
TT
51762018-02-14 Tom Tromey <tom@tromey.com>
5177
5178 * solist.h (exec_file_find, solib_find): Return
5179 unique_xmalloc_ptr.
5180 (solib_bfd_fopen): Take a const char *.
5181 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
5182 (exec_file_find, solib_find): Likewise.
5183 (solib_bfd_fopen): Do not take ownership of "pathname".
5184 (solib_bfd_open): Use unique_xmalloc_ptr.
5185 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
5186 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
5187 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
5188 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
5189
f98b2e33
JB
51902018-02-14 Joel Brobecker <brobecker@adacore.com>
5191
5192 * ada-lang.c (name_match_type_from_name): Remove reference to
5193 ada_name_for_lookup in function's documentation.
5194 * ada-lang.h (ada_name_for_lookup): Delete declaration.
5195
24b9144d
SM
51962018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
5197
5198 * defs.h (enum openp_flags): New enum.
5199 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
5200 Move to enum openp_flags.
5201 (openp_flags): New enum flags.
5202 (openp): Change parameter type to openp_flags.
5203 * source.c (openp): Change parameter type to openp_flags.
5204 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
5205 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
5206
387cd15b
SM
52072018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
5208
5209 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
5210 per-command.
5211
b303c6f6
AB
52122018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
5213
5214 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
5215 into...
5216 (class dwarf2_queue_guard): ...the destructor of this new class.
5217 (dw2_do_instantiate_symtab): Create instance of the new class
5218 dwarf2_queue_guard, remove cleanup.
5219
9c3630e9
TT
52202018-02-09 Tom Tromey <tom@tromey.com>
5221
5222 * source.c (find_source_lines): Don't reference past the end of
5223 the vector.
5224
c4e12631
MM
52252018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5226
5227 * remote.c (remote_btrace_maybe_reopen): Change error message.
5228 * btrace.c (btrace_enable): Likewise.
5229 (parse_xml_btrace): Likewise.
5230 (parse_xml_btrace_conf): Likewise.
5231
88711fbf
MM
52322018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5233
5234 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
5235 (linux_enable_pt, linux_enable_bts): Call
5236 diagnose_perf_event_open_fail.
5237
17ad2a4f
MM
52382018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5239
5240 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
5241 Remove parameter and change return type. Update callers. Move it.
5242 (linux_enable_bts, linux_enable_pt): Improve error message.
5243 (linux_enable_pt): Remove zero buffer size check.
5244 (linux_enable_btrace): Improve error messages. Remove NULL return
5245 check.
5246
de6242d3
MM
52472018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5248
5249 * btrace.c (btrace_enable): Remove target_supports_btrace call.
5250 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
5251 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
5252 (linux_supports_pt, linux_supports_btrace): Remove.
5253 (linux_enable_bts): Call cpu_supports_bts.
5254 * nat/linux-btrace.h (linux_supports_btrace): Remove.
5255 * remote.c (remote_supports_btrace): Remove.
5256 (init_remote_ops): Remove remote_supports_btrace.
5257 * target-delegates.c: Regenerated.
5258 * target.c (target_supports_btrace): Remove.
5259 * target.h (target_ops) <to_supports_btrace>: Remove
5260 (target_supports_btrace): Remove.
5261 * x86-linux-nat.c (x86_linux_create_target): Remove
5262 linux_supports_btrace.
5263
9ee23a85
MM
52642018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5265
5266 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
5267 btrace failed.
5268 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
5269 exception and use message in own exception.
5270
5c3284c1
MM
52712018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5272
5273 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
5274 (perf_event_pt_event_type): Use gdb_file_up.
5275 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
5276 scoped_fd, and scoped_mmap.
5277
84696f37
MM
52782018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5279
5280 * common/scoped_mmap.h: New.
5281 * unittests/scoped_mmap-selftest.c: New.
5282 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5283 unittests/scoped_mmap-selftest.c.
5284
ea4a0888
MM
52852018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5286
5287 * common/scoped_fd.h: New.
5288 * unittests/scoped_fd-selftest.c: New.
5289 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5290 unittests/scoped_fd-selftest.c.
5291
869e8290
TT
52922018-02-09 Tom Tromey <tom@tromey.com>
5293
5294 * auto-load.c (auto_load_section_scripts): Use
5295 gdb::unique_xmalloc_ptr.
5296
a37a2ae7
TT
52972018-02-09 Tom Tromey <tom@tromey.com>
5298
5299 * auto-load.c (execute_script_contents): Use std::string.
5300
4e725347
JB
53012018-02-09 Joel Brobecker <brobecker@adacore.com>
5302
5303 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
5304 Python function, rather than a new command.
5305
9a897d43
TT
53062018-02-08 Tom Tromey <tom@tromey.com>
5307
5308 * solib.c (solib_find_1): Use std::string.
5309 (solib_bfd_fopen): Use unique_xmalloc_ptr.
5310
58ef3771
TT
53112018-02-08 Tom Tromey <tom@tromey.com>
5312
5313 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
5314
a9abc434
TT
53152018-02-08 Tom Tromey <tom@tromey.com>
5316
5317 * source.c (find_source_lines): Use gdb::def_vector.
5318
84f27c6f
TT
53192018-02-08 Tom Tromey <tom@tromey.com>
5320
5321 * macrocmd.c (struct temporary_macro_definition): New.
5322 (macro_define_command): Use temporary_macro_definition. Remove
5323 cleanups.
5324 (free_macro_definition_ptr): Remove.
5325
0354904b
TT
53262018-02-08 Tom Tromey <tom@tromey.com>
5327
5328 * macroexp.c (maybe_expand): Use std::string.
5329
1739cf24
TT
53302018-02-08 Tom Tromey <tom@tromey.com>
5331
5332 * macroexp.c (struct macro_buffer): Add initializers for some
5333 members.
5334 (init_buffer, init_shared_buffer, free_buffer)
5335 (free_buffer_return_text): Remove.
5336 (macro_buffer): New constructors.
5337 (~macro_buffer): New destructor.
5338 (macro_buffer::set_shared): New method.
5339 (macro_buffer::resize_buffer, macro_buffer::appendc)
5340 (macro_buffer::appendmem): Now methods, not free functions.
5341 (set_token, append_tokens_without_splicing, stringify)
5342 (macro_stringify): Update.
5343 (gather_arguments): Change return type. Remove argc_p argument,
5344 add args_ptr argument. Use std::vector.
5345 (substitute_args): Remove argc argument. Accept std::vector.
5346 (expand): Update. Use std::vector.
5347 (scan, macro_expand, macro_expand_next): Update.
5348
f6c2623e
TT
53492018-02-08 Tom Tromey <tom@tromey.com>
5350
5351 * symtab.c (default_collect_symbol_completion_matches_break_on):
5352 Use unique_xmalloc_ptr.
5353 * macroscope.h: (sal_macro_scope, user_macro_scope)
5354 (default_macro_scope): Return unique_xmalloc_ptr.
5355 * macroscope.c (sal_macro_scope, user_macro_scope)
5356 (default_macro_scope): Return unique_xmalloc_ptr.
5357 * macroexp.h (macro_expand, macro_expand_once): Return
5358 unique_xmalloc_ptr.
5359 * macroexp.c (macro_expand, macro_expand_once): Return
5360 unique_xmalloc_ptr.
5361 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5362 (info_macro_command, info_macros_command): Use
5363 unique_xmalloc_ptr.
5364 * compile/compile-c-support.c (write_macro_definitions): Use
5365 unique_xmalloc_ptr.
5366 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
5367
c2e0e465
SM
53682018-02-07 Simon Marchi <simon.marchi@ericsson.com>
5369
5370 * value.c (value_static_field): Assign field type instead of
5371 containing type when returning an optimized out value.
5372
3f8c94b4
YQ
53732018-02-06 Yao Qi <yao.qi@linaro.org>
5374
5375 * ft32-tdep.c (ft32_read_pc): Remove.
5376 (ft32_write_pc): Remove.
5377 (ft32_gdbarch_init): Update.
5378 * m32r-tdep.c (m32r_read_pc): Remove.
5379 (m32r_gdbarch_init): Update.
5380 * mep-tdep.c (mep_read_pc): Remove.
5381 (mep_gdbarch_init): Update.
5382 * microblaze-tdep.c (microblaze_write_pc): Remove.
5383 (microblaze_gdbarch_init): Update.
5384 * mn10300-tdep.c (mn10300_read_pc): Remove.
5385 (mn10300_write_pc): Remove.
5386 (mn10300_gdbarch_init): Update.
5387 * moxie-tdep.c (moxie_read_pc): Remove.
5388 (moxie_write_pc): Remove.
5389 (moxie_gdbarch_init): Update.
5390
bca65a23
YQ
53912018-02-06 Yao Qi <yao.qi@linaro.org>
5392
5393 * expprint.c (print_subexp_standard): Handle
5394 OP_F77_UNDETERMINED_ARGLIST.
5395 (dump_subexp_body_standard): Likewise.
5396
583e3f90 53972018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 5398
583e3f90
YQ
5399 * target-descriptions.c (tdesc_element_visitor) Add empty
5400 implementations.
b8df6ca7
AH
5401 (tdesc_type): Move make_gdb_type from here.
5402 (tdesc_type_builtin): Likewise.
5403 (tdesc_type_vector): Likewise.
5404 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
5405 (make_gdb_type_struct): Move from tdesc_type_with_fields.
5406 (make_gdb_type_union): Likewise.
5407 (make_gdb_type_flags): Likewise.
5408 (make_gdb_type_enum): Likewise.
5409 (make_gdb_type): New function.
5410 (tdesc_register_type): Use static make_gdb_type.
5411
e813d34a
RK
54122018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
5413
5414 * infcmd.c (default_print_one_register_info): Align natural-format
5415 column values consistently one under another.
5416 (pad_to_column): New function.
5417
0eb876f5
JB
54182018-02-05 Joel Brobecker <brobecker@adacore.com>
5419
5420 * dwarf2read.c (dwarf2_physname): Move commment.
5421
0625771b
LS
54222018-02-01 Leszek Swirski <leszeks@google.com>
5423
5424 * varobj.c (varobj_formatted_print_options): Allow recursive
5425 pretty printing if pretty printing is enabled.
5426
59498c30
LS
54272018-02-01 Leszek Swirski <leszeks@google.com>
5428
5429 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
5430 names after a structop as a filename.
5431
2d9e6acb
YQ
54322018-02-01 Yao Qi <yao.qi@linaro.org>
5433
5434 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
5435 (arm_record_coproc_data_proc): Likewise.
5436
df95a9cf
YQ
54372018-02-01 Yao Qi <yao.qi@linaro.org>
5438
5439 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
5440
07e5f5cf
NP
54412018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
5442
5443 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
5444 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
5445
3045b475
PA
54462018-01-31 Pedro Alves <palves@redhat.com>
5447
5448 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
5449 * inflow.c (child_terminal_save_inferior): Wrap reference to
5450 tcgetpgrp in HAVE_TERMIOS_H.
5451 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
5452 _WIN32.
5453 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
5454 always iterate over all inferiors.
5455 (gdbsim_cntrl_c): Adjust.
5456 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
5457
929b5ad4
JB
54582018-01-31 Joel Brobecker <brobecker@adacore.com>
5459
5460 * gdbtypes.c (lookup_array_range_type): Make sure the array's
5461 index type is objfile-owned if the element type is as well.
5462
29236ca2
JB
54632018-01-31 Joel Brobecker <brobecker@adacore.com>
5464
5465 GDB 8.1 released.
5466
c81e8879
PR
54672018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
5468
5469 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
5470 "features/s390x-linux64.c".
5471 (_initialize_s390_linux_tdep): Remove initialization of tdescs
5472 s390_linux32 and s390x_linux64.
5473 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
5474 default tdesc.
5475 * s390-tdep.c: Include "features/s390-linux32.c" and
5476 "features/s390x-linux64.c".
5477 (s390_tdesc_valid): Add check for tdesc_has_registers.
5478 (s390_gdbarch_init): Make sure there is always a valid tdesc.
5479 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
5480 tdesc_s390x_linux64.
5481 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
5482 tdesc_s390x_linux64 to...
5483 * s390-tdep.h: ...here.
5484
e671cd59
PA
54852018-01-30 Pedro Alves <palves@redhat.com>
5486
5487 PR gdb/13211
5488 * config.in, configure: Regenerate.
5489 * configure.ac: Check for getpgid.
5490 * go32-nat.c (go32_pass_ctrlc): New.
5491 (go32_target): Install it.
5492 * inf-child.c (inf_child_target): Install
5493 child_terminal_save_inferior, child_pass_ctrlc and
5494 child_interrupt.
5495 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
5496 (inf_ptrace_target): No longer install it.
5497 * infcmd.c (interrupt_target_1): Adjust.
5498 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
5499 (child_interrupt): Declare.
5500 (inferior::terminal_state): New.
5501 * inflow.c (struct terminal_info): Update comments.
5502 (inferior_process_group): Delete.
5503 (terminal_is_ours): Delete.
5504 (gdb_tty_state): New.
5505 (child_terminal_init): Adjust.
5506 (is_gdb_terminal, sharing_input_terminal_1)
5507 (sharing_input_terminal): New functions.
5508 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
5509 Set the process's actual process group in the foreground if
5510 possible. Handle is_ours_for_output/is_ours distinction. Don't
5511 mark terminal as the inferior's if not sharing GDB's terminal.
5512 Don't check attach_flag.
5513 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
5514 pass down a target_terminal_state.
5515 (child_terminal_save_inferior): New, factored out from ...
5516 (child_terminal_ours_1): ... this. Handle
5517 target_terminal_state::is_ours_for_output.
5518 (child_interrupt, child_pass_ctrlc): New.
5519 (inflow_inferior_exit): Clear the inferior's terminal_state.
5520 (copy_terminal_info): Copy the inferior's terminal state.
5521 (_initialize_inflow): Remove reference to terminal_is_ours.
5522 * inflow.h (inferior_process_group): Delete.
5523 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
5524 * procfs.c (procfs_target): Don't install procfs_interrupt.
5525 (procfs_interrupt): Delete.
5526 * remote.c (remote_serial_quit_handler): Adjust.
5527 (remote_interrupt): Remove ptid parameter. Adjust.
5528 * target-delegates.c: Regenerate.
5529 * target.c: Include "terminal.h".
5530 (target_terminal::terminal_state): Rename to ...
5531 (target_terminal::m_terminal_state): ... this.
5532 (target_terminal::init): Adjust.
5533 (target_terminal::inferior): Adjust to per-inferior
5534 terminal_state.
5535 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
5536 (target_terminal::ours, target_terminal::ours_for_output): Use
5537 target_terminal_is_ours_kind.
5538 (target_interrupt): Remove ptid parameter. Adjust.
5539 (default_target_pass_ctrlc): Adjust.
5540 * target.h (target_ops::to_terminal_save_inferior): New field.
5541 (target_ops::to_interrupt): Remove ptid_t parameter.
5542 (target_interrupt): Remove ptid_t parameter. Update comment.
5543 (target_pass_ctrlc): Update comment.
5544 * target/target.h (target_terminal_state): New scoped enum,
5545 factored out of ...
5546 (target_terminal::terminal_state): ... here.
5547 (target_terminal::inferior): Update comments.
5548 (target_terminal::restore_inferior): New.
5549 (target_terminal::is_inferior, target_terminal::is_ours)
5550 (target_terminal::is_ours_for_output): Adjust.
5551 (target_terminal::scoped_restore_terminal_state): Adjust to
5552 rename, and call restore_inferior() instead of inferior().
5553 (target_terminal::scoped_restore_terminal_state::m_state): Change
5554 type.
5555 (target_terminal::terminal_state): Rename to ...
5556 (target_terminal::m_terminal_state): ... this and change type.
5557
9c3a5d93
PA
55582018-01-30 Pedro Alves <palves@redhat.com>
5559
5560 * linux-nat.c (wait_for_signal): New function.
5561 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
5562 directly.
5563 (async_terminal_is_ours)
5564 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
5565 (linux_nat_add_target): Don't override
5566 to_terminal_inferior/to_terminal_ours.
5567
69ab5edb
SDJ
55682018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
5569
5570 * remote.c (remote_follow_fork): Don't call "detach_inferior".
5571
fc8e7e75
SM
55722018-01-28 Simon Marchi <simon.marchi@ericsson.com>
5573
5574 * dwarf2read.c (free_dwo_files): Add forward-declaration.
5575 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
5576 dwarf2_per_objfile_free here.
5577 (dwarf2_per_objfile_free): Remove.
5578 (_initialize_dwarf2_read): Don't register
5579 dwarf2_per_objfile_free as a registry cleanup.
5580
b2a426e2
EZ
55812018-01-27 Eli Zaretskii <eliz@gnu.org>
5582
5583 Avoid compilation errors in MinGW native builds
5584
5585 The error is triggered by including python-internal.h, and the
5586 error message is:
5587
5588 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
5589 from build-gnulib/import/math.h:27,
5590 from d:/usr/Python26/include/pyport.h:235,
5591 from d:/usr/Python26/include/Python.h:58,
5592 from python/python-internal.h:94,
5593 from python/py-arch.c:24:
5594 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
5595 using ::hypot;
5596 ^~~~~
5597
5598 This happens because Python headers define 'hypot' to expand t
5599 '_hypot' in the Windows builds.
5600 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
5601 'hypoth'. This avoids a compilation error.
5602
0bdd8eac
AH
56032018-01-26 Alan Hayward <alan.hayward@arm.com>
5604
5605 * MAINTAINERS (Write After Approval): Fix ordering.
5606
56ae9dc3
AH
56072018-01-26 Alan Hayward <alan.hayward@arm.com>
5608
5609 * MAINTAINERS (Write After Approval): Add Alan Hayward.
5610
7433498b
AM
56112018-01-26 Alan Modra <amodra@gmail.com>
5612
5613 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
5614 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
5615 Remove nop. Make const. Comment.
5616 (powerpc32_plt_stub_so_2): New.
5617 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
5618 Correct count. Update uses.
5619 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
5620 Move common code reading PLT entry word. Correct
5621 powerpc32_plt_stub PLT address calculation.
5622 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
5623 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
5624 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
5625 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
5626 (ppc64_standard_linkage8): Likewise.
5627 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
5628 Correct insns description.
5629 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
5630
0f59d5fc
PA
56312018-01-24 Pedro Alves <palves@redhat.com>
5632
5633 GCC PR libstdc++/83906
5634 * gdbtypes.c (operator==(const dynamic_prop &,
5635 const dynamic_prop &)): New.
5636 (operator==(const range_bounds &, const range_bounds &)): New.
5637 (check_types_equal): Use them instead of memcmp.
5638 * gdbtypes.h (operator==(const dynamic_prop &,
5639 const dynamic_prop &)): Declare.
5640 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
5641 (operator==(const range_bounds &, const range_bounds &)): Declare.
5642 (operator!=(const range_bounds &, const range_bounds &)): Declare.
5643
ef8914a4
PR
56442018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5645
5646 * s390-linux-tdep.c (s390_record_address_mask)
5647 (s390_record_calc_disp_common, s390_record_calc_disp)
5648 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5649 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5650 (s390_process_record): Move to s390-tdep.c.
5651 (s390_linux_init_abi_any): Adjust.
5652 * s390-tdep.c (s390_record_address_mask)
5653 (s390_record_calc_disp_common, s390_record_calc_disp)
5654 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5655 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5656 (s390_process_record): Moved from s390-linux-tdep.c
5657 (s390_gdbarch_init): Adjust.
5658
d6e58945
PR
56592018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5660
5661 * s390-linux-nat.c (s390-tdep.h): New include.
5662 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
5663 (HFILES_NO_SRCDIR): Add s390-tdep.h.
5664 (ALLDEPFILES): Add s390-tdep.c.
5665 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
5666 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
5667 * s390-tdep.h: ...this. New file.
5668 * s390-linux-tdep.c (s390-tdep.h): New include.
5669 (_initialize_s390_tdep): Rename to...
5670 (_initialize_s390_linux_tdep): ...this and adjust.
5671 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
5672 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
5673 s390-tdep.h.
5674 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
5675 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
5676 (s390_is_partial_instruction, s390_software_single_step)
5677 (is_non_branch_ril, s390_displaced_step_copy_insn)
5678 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
5679 (s390_prologue_data, s390_addr, s390_store, s390_load)
5680 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
5681 (s390_register_call_saved, s390_guess_tracepoint_registers)
5682 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
5683 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
5684 (s390_pseudo_register_name, s390_pseudo_register_type)
5685 (s390_pseudo_register_read, s390_pseudo_register_write)
5686 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
5687 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
5688 (s390_addr_bits_remove, s390_address_class_type_flags)
5689 (s390_address_class_type_flags_to_name)
5690 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
5691 (s390_function_arg_float, s390_function_arg_vector)
5692 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
5693 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
5694 (s390_frame_align, s390_register_return_value, s390_return_value)
5695 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
5696 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
5697 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
5698 (s390_trad_frame_prev_register, s390_unwind_cache)
5699 (s390_prologue_frame_unwind_cache)
5700 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
5701 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
5702 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
5703 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
5704 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
5705 (s390_frame_base_address, s390_local_base_address)
5706 (s390_frame_base, s390_gcc_target_options)
5707 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
5708 (s390_validate_reg_range, s390_tdesc_valid)
5709 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
5710 * s390-tdep.c: ...this. New file.
5711
9c0b896e
PR
57122018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5713
5714 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
5715 (s390_process_record, s390_gdbarch_tdep_alloc)
5716 (s390_linux_init_abi_any): Use/set new hook.
5717
7042632b
PR
57182018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5719
5720 * s390-linux-tdep.c (osabi.h): New include.
5721 (s390_linux_init_abi_31, s390_linux_init_abi_64)
5722 (s390_linux_init_abi_any): New functions.
5723 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
5724
650f5e13
PR
57252018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5726
5727 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
5728 tdesc_has_registers check
5729
47c9317e
PR
57302018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5731
5732 * s390-linux-tdep.c (s390_tdesc_valid): New function.
5733 (s390_validate_reg_range): New macro.
5734 (s390_gdbarch_init): Adjust.
5735
095085d8
PR
57362018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5737
5738 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
5739 (s390_gdbarch_tdep_alloc): Adjust.
5740 (s390_gdbarch_init): Adjust.
5741
ab9bcc67
PR
57422018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5743
5744 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
5745 <have_tdb>: Change type to bool.
5746 (s390_gdbarch_tdep_alloc): Adjust.
5747 (s390_gdbarch_init): Adjust.
5748
21f6f5ff
PR
57492018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5750
5751 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
5752 (gdbarch_tdep) <have_upper, have_vx>: New fields.
5753 (s390_gdbarch_tdep_alloc): New function.
5754 (s390_gdbarch_init): Allocate tdep at start and use its fields
5755 instead of separate variables.
5756
0eb97953
PR
57572018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5758
5759 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
5760 when looking for cached gdbarch and add comment for remaining.
5761
5c319bb2
PA
57622018-01-22 Pedro Alves <palves@redhat.com>
5763 Sergio Durigan Junior <sergiodj@redhat.com>
5764
5765 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
5766 case.
5767
d65ce302
MR
57682018-01-22 Maciej W. Rozycki <macro@mips.com>
5769
5770 * MAINTAINERS: Update my company e-mail address.
5771
ec7a5fcb
YQ
57722018-01-22 Yao Qi <yao.qi@linaro.org>
5773
5774 * regcache.c (cooked_write_test): New function.
5775 (_initialize_regcache): Register the test.
5776
11f57cb6
YQ
57772018-01-22 Yao Qi <yao.qi@linaro.org>
5778
5779 * ia64-tdep.c (ia64_pseudo_register_read): Call
5780 regcache->cooked_read instead of regcache_cooked_read_unsigned.
5781 * m32c-tdep.c (m32c_cat_read): Likewise.
5782 (m32c_r3r2r1r0_read): Likewise.
5783 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5784 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5785
03f50fc8
YQ
57862018-01-22 Yao Qi <yao.qi@linaro.org>
5787
5788 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
5789 method raw_read instead of regcache_raw_read.
5790 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5791 * arm-tdep.c (arm_neon_quad_read): Likewise.
5792 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5793 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5794 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5795 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
5796 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5797 (i386_pseudo_register_read_into_value): Likewise.
5798 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5799 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5800 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5801 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
5802 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
5803 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5804 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5805 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5806 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
5807
dc711524
YQ
58082018-01-22 Yao Qi <yao.qi@linaro.org>
5809
5810 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
5811 * configure.tgt: Remove target mt.
5812 * mt-tdep.c: Remove.
5813 * regcache.c (cooked_read_test): Remove the check for mt.
5814
3f5a868b
YQ
58152018-01-22 Yao Qi <yao.qi@linaro.org>
5816
5817 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
5818 instead of gdbarch_pseudo_register_read_value.
5819
de4cb04a
JB
58202018-01-22 Joel Brobecker <brobecker@adacore.com>
5821
5822 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
5823 language is Ada.
5824
a9e40818
JB
58252018-01-22 Joel Brobecker <brobecker@adacore.com>
5826
5827 * linespec.c (create_sals_line_offset): Remove code that preserved
5828 the symtab_and_line's line number.
5829
e707fc44
AB
58302018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5831
5832 * varobj.c (varobj_create): Don't set valid_block when creating a
5833 floating varobj.
5834
03d0bf7b
AB
58352018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5836
5837 * varobj.c (varobj_create): Remove out of date comment.
5838
ae451627
AB
58392018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5840
5841 PR mi/20395
5842 * ada-exp.y (write_var_from_sym): Pass extra parameter when
5843 updating innermost block.
5844 * parse.c (innermost_block_tracker::update): Take extra type
5845 parameter, and check types match before updating innermost block.
5846 (write_dollar_variable): Update innermost block for registers.
5847 * parser-defs.h (enum innermost_block_tracker_type): New enum.
5848 (innermost_block_tracker::innermost_block_tracker): Initialise
5849 m_types member.
5850 (innermost_block_tracker::reset): Take type parameter.
5851 (innermost_block_tracker::update): Take type parameter, and pass
5852 type through as needed.
5853 (innermost_block_tracker::m_types): New member.
5854 * varobj.c (varobj_create): Pass type when reseting innermost
5855 block.
5856
aee1fcdf
AB
58572018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5858
5859 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
5860 * ada-lang.c (resolve_subexp): Likewise.
5861 * breakpoint.c (set_breakpoint_condition) Likewise.
5862 (watch_command_1) Likewise.
5863 * c-exp.y (variable): Likewise.
5864 * d-exp.y (PrimaryExpression): Likewise.
5865 * f-exp.y (variable): Likewise.
5866 * go-exp.y (variable): Likewise.
5867 * m2-exp.y (variable): Likewise.
5868 * objfiles.c (objfile::~objfile): Likewise.
5869 * p-exp.y (variable): Likewise.
5870 * parse.c (innermost_block): Change type.
5871 * parser-defs.h (class innermost_block_tracker): New.
5872 (innermost_block): Change to innermost_block_tracker.
5873 * printcmd.c (display_command): Switch to innermost_block API.
5874 (do_one_display): Likewise.
5875 * rust-exp.y (do_one_display): Likewise.
5876 * symfile.c (clear_symtab_users): Likewise.
5877 * varobj.c (varobj_create): Switch to innermost_block API, replace
5878 use of innermost_block with block stored on varobj object.
5879
396af9a1
AB
58802018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5881
5882 * expression.h (innermost_block): Remove declaration.
5883 * varobj.c: Add 'parser-defs.h' include.
5884
fcfcc376
TT
58852018-01-19 Tom Tromey <tom@tromey.com>
5886
5887 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
5888 symbols in the static and global blocks.
5889
5a6c3296
JC
58902018-01-19 James Clarke <jrtc27@jrtc27.com>
5891
5892 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
5893 gdb_ptrace.h, and move including gdb_wait.h ...
5894 * nat/linux-ptrace.h: ... to here.
5895
bc09b0c1
SM
58962018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5897
5898 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
5899 inf_ptrace_detach_success.
5900 (inf_ptrace_detach_success): Add inferior parameter, use it
5901 instead of inferior_ptid, pass it to detach_inferior.
5902 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
5903 parameter.
5904 * inferior.c (detach_inferior): Add overload that takes an
5905 inferior object.
5906 * inferior.h (detach_inferior): Likewise.
5907 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
5908 use inferior_ptid, adjust call to inf_ptrace_detach_success.
5909 * linux-thread-db.c (thread_db_detach): Use inf parameter.
5910
6e1e1966
SM
59112018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5912
5913 * target.h (struct target_ops) <to_detach>: Add inferior
5914 parameter.
5915 (target_detach): Likewise.
5916 * target.c (dispose_inferior): Pass inferior down.
5917 (target_detach): Pass inferior down. Assert that it is equal to
5918 the current inferior.
5919 * aix-thread.c (aix_thread_detach): Pass inferior down.
5920 * corefile.c (core_file_command): Pass current_inferior() down.
5921 * corelow.c (core_detach): Add inferior parameter.
5922 * darwin-nat.c (darwin_detach): Likewise.
5923 * gnu-nat.c (gnu_detach): Likewise.
5924 * inf-ptrace.c (inf_ptrace_detach): Likewise.
5925 * infcmd.c (detach_command): Pass current_inferior() down to
5926 target_detach.
5927 * infrun.c (follow_fork_inferior): Pass parent_inf to
5928 target_detach.
5929 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
5930 target_detach.
5931 * linux-nat.c (linux_nat_detach): Add inferior parameter.
5932 * linux-thread-db.c (thread_db_detach): Likewise.
5933 * nto-procfs.c (procfs_detach): Likewise.
5934 * procfs.c (procfs_detach): Likewise.
5935 * record.c (record_detach): Likewise.
5936 * record.h (struct inferior): Forward-declare.
5937 (record_detach): Add inferior parameter.
5938 * remote-sim.c (gdbsim_detach): Likewise.
5939 * remote.c (remote_detach_1): Likewise.
5940 (remote_detach): Likewise.
5941 (extended_remote_detach): Likewise.
5942 * sol-thread.c (sol_thread_detach): Likewise.
5943 * target-debug.h (target_debug_print_inferior_p): New macro.
5944 * target-delegates.c: Re-generate.
5945 * top.c (kill_or_detach): Pass inferior down to target_detach.
5946 * windows-nat.c (windows_detach): Add inferior parameter.
5947
6bd6f3b6
SM
59482018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5949
5950 * target.h (struct target_ops) <to_detach>: Remove args
5951 parameter.
5952 (target_detach): Likewise.
5953 * target.c (dispose_inferior): Adjust.
5954 (target_detach): Remove args parameter, adjust.
5955 * aix-thread.c (aix_thread_detach): Adjust.
5956 * corefile.c (core_file_command): Adjust.
5957 * corelow.c (core_detach): Adjust.
5958 * darwin-nat.c (darwin_detach): Adjust.
5959 * gnu-nat.c (gnu_detach): Adjust.
5960 * inf-ptrace.c (inf_ptrace_detach): Adjust.
5961 * infcmd.c (detach_command): Adjust
5962 * infrun.c (follow_fork_inferior): Adjust.
5963 (handle_vfork_child_exec_or_exit): Adjust.
5964 * linux-fork.c (linux_fork_detach): Remove args parameter.
5965 * linux-fork.h (linux_fork_detach): Likewise.
5966 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
5967 * linux-thread-db.c (thread_db_detach): Likewise.
5968 * nto-procfs.c (procfs_detach): Likewise.
5969 * procfs.c (procfs_detach): Likewise.
5970 (do_detach): Remove signo parameter.
5971 * record.c (record_detach): Remove args parameter.
5972 * record.h (record_detach): Likewise.
5973 * remote-sim.c (gdbsim_detach): Likewise.
5974 * remote.c (remote_detach_1): Likewise.
5975 (remote_detach): Likewise.
5976 (extended_remote_detach): Likewise.
5977 * sol-thread.c (sol_thread_detach): Likewise.
5978 * target-delegates.c: Re-generate.
5979 * top.c (struct qt_args) <args>: Remove field.
5980 (kill_or_detach): Don't pass args.
5981 (quit_force): Don't set args.
5982 * windows-nat.c (windows_detach): Remove args parameter.
5983
88af8ea8
YQ
59842018-01-19 Yao Qi <yao.qi@linaro.org>
5985
5986 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
5987 (arm_linux_init_abi): Install it.
5988
dea445b9
YQ
59892018-01-19 Yao Qi <yao.qi@linaro.org>
5990
5991 * osabi.c (gdb_osabi_names): Extend the regexp for
5992 arm-linux-gnueabihf.
5993
4a17f768
YQ
59942018-01-18 Yao Qi <yao.qi@linaro.org>
5995
5996 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
5997 m_abbrevs.
5998 (abbrev_table::add_abbrev): Update.
5999 (abbrev_table::lookup_abbrev): Update.
6000
d679c21a
YQ
60012018-01-18 Yao Qi <yao.qi@linaro.org>
6002
6003 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
6004
7d937cad
SDJ
60052018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
6006
6007 * compile/compile.c (compile_to_object): Convert "triplet_rx"
6008 to "std::string".
6009
9e14690d
TT
60102018-01-17 Tom Tromey <tom@tromey.com>
6011
6012 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
6013
50a82047
TT
60142018-01-17 Tom Tromey <tom@tromey.com>
6015
6016 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
6017 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
6018 (create_array_type_with_stride): Update.
6019 * dwarf2read.c (set_die_type): Update.
6020
c89b44cd
TT
60212018-01-17 Tom Tromey <tom@tromey.com>
6022
6023 * dwarf2read.c (delayed_method_info): Remove typedef.
6024 (dwarf2_cu::method_info): Now a std::vector.
6025 (add_to_method_list): Update.
6026 (free_delayed_list): Remove.
6027 (compute_delayed_physnames): Update.
6028 (process_full_comp_unit, process_full_type_unit): Clear the method
6029 list. Remove cleanups.
6030 (psymtab_include_file_name): Add name_holder parameter. Use
6031 unique_xmalloc_ptr.
6032 (dwarf_decode_lines): Update.
6033
fcd3b13d
SM
60342018-01-17 Tom Tromey <tom@tromey.com>
6035 Simon Marchi <simon.marchi@ericsson.com>
6036
6037 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
6038 (dwarf2_per_objfile::free_cached_comp_units)
6039 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
6040 (init_cutu_and_read_dies_no_follow): Update.
6041 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
6042 (dwarf2_cu::~dwarf2_cu): New.
6043 (free_heap_comp_unit, free_stack_comp_unit): Remove.
6044 (age_cached_comp_units, free_one_cached_comp_unit): Update.
6045
685af9cd
TT
60462018-01-17 Tom Tromey <tom@tromey.com>
6047 Simon Marchi <simon.marchi@ericsson.com>
6048
6049 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
6050 (struct die_reader_specs) <abbrev_table>: New member.
6051 (struct abbrev_table): Add constructor.
6052 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
6053 <abbrev_obstack>: Now an auto_obstack.
6054 (abbrev_table_up): New typedef.
6055 (init_cu_die_reader): Add abbrev_table parameter.
6056 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
6057 Add result_dwo_abbrev_table.
6058 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
6059 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
6060 Update.
6061 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
6062 parameter.
6063 (skip_children): Update.
6064 (abbrev_table::alloc_abbrev): Rename from
6065 abbrev_table_alloc_abbrev.
6066 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
6067 (abbrev_table::lookup_abbrev): Rename from
6068 abbrev_table_lookup_abbrev.
6069 (abbrev_table_read_table): Return abbrev_table_up.
6070 (abbrev_table_free, abbrev_table_free_cleanup)
6071 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
6072 (load_partial_dies): Update.
6073
5e2db402
TT
60742018-01-17 Tom Tromey <tom@tromey.com>
6075
6076 * dwarf2read.c (dwarf2_compute_name): Update comment.
6077 (read_func_scope, read_variable): Update.
6078 (new_symbol): Remove.
6079 (new_symbol_full): Rename to new_symbol.
6080
ee7f689e 60812018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
6082
6083 PR gdb/16577
6084 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
6085 a warning instead of throwing an error, set section size to 0 and return
6086 NULL.
6087 * gdb_bfd.h (gdb_bfd_map_section): Update description.
6088
4d9b86e1
SM
60892018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6090
6091 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
6092 std::string.
6093 (linux_ptrace_attach_fail_reason_string): Likewise.
6094 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
6095 Likewise.
6096 (linux_ptrace_attach_fail_reason_string): Likewise.
6097 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
6098
a7b2d0fb
SM
60992018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6100
6101 * linux-nat.c (linux_nat_attach): Remove xstrdup.
6102
f517c180
EA
61032018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6104
6105 PR gdb/21559
6106 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6107 checking for fs_base/gs_base fields in struct user_regs_struct.
6108 * configure: Regenerate.
6109
7045b1ca
YQ
61102018-01-17 Yao Qi <yao.qi@linaro.org>
6111
6112 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
6113 function.
6114 (aarch64_linux_init_abi): Install it to gdbarch hook
6115 gcc_target_options.
6116
db422fb2
PA
61172018-01-15 Pedro Alves <palves@redhat.com>
6118
6119 * common/signals-state-save-restore.c
6120 (save_original_signals_state): Fix typos.
6121
ba643918
SDJ
61222017-01-12 Tom Tromey <tom@tromey.com>
6123 Sergio Durigan Junior <sergiodj@redhat.com>
6124
6125 * Makefile.in (install-only): Install gdb-add-index.
6126
906b4aac
JB
61272018-01-12 John Baldwin <jhb@FreeBSD.org>
6128
6129 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
6130
bdf2a94a
AA
61312018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6132
6133 * infrun.c (keep_going_pass_signal): Clear step-over info when
6134 insert_breakpoints fails.
6135
71d378ae
PA
61362018-01-11 Pedro Alves <palves@redhat.com>
6137
6138 PR gdb/22583
6139 * infrun.c (resume): Rename to ...
6140 (resume_1): ... this.
6141 (resume): Reimplement as wrapper around resume_1.
6142
3cada740
PA
61432018-01-11 Pedro Alves <palves@redhat.com>
6144
6145 PR remote/22597
6146 * remote.c (remote_parse_stop_reply): Default to the last-set
6147 general thread instead of to 'magic_null_ptid'.
6148
618daa93
PA
61492018-01-10 Pedro Alves <palves@redhat.com>
6150
6151 * language.h (language_get_symbol_name_matcher): Rename ...
6152 (get_symbol_name_matcher): ... this.
6153 * language.c (language_get_symbol_name_matcher): Ditto.
6154 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
6155 callers adjusted.
6156
c63d3e8d
PA
61572018-01-10 Pedro Alves <palves@redhat.com>
6158
6159 PR gdb/22670
6160 * dwarf2read.c
6161 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
6162 Adjust to use language_get_symbol_name_matcher instead of
6163 language_defn::la_get_symbol_name_matcher.
6164 * language.c (language_get_symbol_name_matcher): If in Ada mode
6165 and the lookup name is a verbatim match, return Ada's matcher.
6166 * language.h (language_get_symbol_name_matcher): Adjust comment.
6167 (ada_lookup_name_info::verbatim_p):: New method.
6168
d4c2a405
PA
61692018-01-10 Pedro Alves <palves@redhat.com>
6170
6171 PR gdb/22670
6172 * ada-lang.c (ada_collect_symbol_completion_matches): If the
6173 minsym's language is language_auto or language_cplus, pass down
6174 language_ada instead.
6175 * symtab.c (compare_symbol_name): Don't frob symbol language here.
6176
8825213e
PA
61772018-01-10 Pedro Alves <palves@redhat.com>
6178
6179 PR gdb/22670
6180 * minsyms.c (linkage_name_str): New function.
6181 (iterate_over_minimal_symbols): Use it.
6182
2d97a5d9
JB
61832018-01-09 John Baldwin <jhb@FreeBSD.org>
6184
6185 * NEWS: Document that 'info proc' now works on FreeBSD.
6186
92fce24d
JB
61872018-01-09 John Baldwin <jhb@FreeBSD.org>
6188
6189 * configure.ac: Check for kinfo_getfile in libutil.
6190 * configure: Regenerate.
6191 * config.in: Regenerate.
6192 * fbsd-nat.c: Include "fbsd-tdep.h".
6193 (fbsd_fetch_cmdline): New.
6194 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
6195 rather than calling error.
6196 (fbsd_info_proc): New.
6197 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
6198 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
6199 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
6200
262f62f5
JB
62012018-01-09 John Baldwin <jhb@FreeBSD.org>
6202
6203 * fbsd-nat.c (struct free_deleter): Remove.
6204 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
6205
b999e203
JB
62062018-01-09 John Baldwin <jhb@FreeBSD.org>
6207
6208 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
6209 NULL for an empty pathname.
6210
d2176225
JB
62112018-01-09 John Baldwin <jhb@FreeBSD.org>
6212
6213 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
6214 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
6215 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
6216 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
6217 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
6218 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
6219 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
6220 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
6221 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
6222 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
6223 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
6224 (fbsd_core_fetch_timeval, fbsd_print_sigset)
6225 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
6226 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
6227 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
6228
9c4ac400
ST
62292018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
6230
6231 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
6232 (gnu_xfer_auxv): New function.
6233 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
6234 TARGET_OBJECT_AUXV.
6235
1e5ded6c
YQ
62362018-01-08 Yao Qi <yao.qi@linaro.org>
6237 Simon Marchi <simon.marchi@ericsson.com>
6238
6239 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
6240 common/selftest.c.
6241 (COMMON_OBS): Remove selftest.o.
6242 * configure.ac: Append selftest-arch.c and common/selftest.c to
6243 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
6244 * configure: Re-generated.
6245 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
6246 GDB_SELF_TEST.
6247 (maintenance_info_selftests): Likewise.
6248
04bafb1e
XR
62492018-01-08 Xavier Roirand <roirand@adacore.com>
6250
6251 * ada-valprint.c (val_print_packed_array_elements): Use
6252 proper number of elements when printing an array indexed
6253 by an enumeration type.
6254
518817b3
SM
62552018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6256
6257 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
6258 (dw2_get_file_names_reader): Adjust.
6259 (lookup_dwo_signatured_type): Adjust.
6260 (lookup_dwp_signatured_type): Adjust.
6261 (lookup_signatured_type): Adjust.
6262 (create_type_unit_group): Adjust.
6263 (get_type_unit_group): Adjust.
6264 (process_psymtab_comp_unit_reader): Adjust.
6265 (build_type_psymtabs_reader): Adjust.
6266 (scan_partial_symbols): Adjust.
6267 (add_partial_symbol): Adjust.
6268 (add_partial_subprogram): Adjust.
6269 (peek_die_abbrev): Adjust.
6270 (fixup_go_packaging): Adjust.
6271 (process_imported_unit_die): Adjust.
6272 (dwarf2_compute_name): Adjust.
6273 (dwarf2_physname): Adjust.
6274 (read_import_statement): Adjust.
6275 (handle_DW_AT_stmt_list): Adjust.
6276 (read_file_scope): Adjust.
6277 (read_func_scope): Adjust.
6278 (read_lexical_block_scope): Adjust.
6279 (read_call_site_scope): Adjust.
6280 (read_variable): Adjust.
6281 (dwarf2_rnglists_process): Adjust.
6282 (dwarf2_ranges_process): Adjust.
6283 (dwarf2_ranges_read): Adjust.
6284 (dwarf2_get_pc_bounds): Adjust.
6285 (dwarf2_record_block_ranges): Adjust.
6286 (dwarf2_add_field): Adjust.
6287 (dwarf2_add_member_fn): Adjust.
6288 (read_structure_type): Adjust.
6289 (process_structure_scope): Adjust.
6290 (read_enumeration_type): Adjust.
6291 (read_array_type): Adjust.
6292 (mark_common_block_symbol_computed): Adjust.
6293 (read_common_block): Adjust.
6294 (read_namespace_type): Adjust.
6295 (read_namespace): Adjust.
6296 (read_module_type): Adjust.
6297 (read_tag_pointer_type): Adjust.
6298 (read_tag_ptr_to_member_type): Adjust.
6299 (read_tag_string_type): Adjust.
6300 (read_subroutine_type): Adjust.
6301 (read_typedef): Adjust.
6302 (read_base_type): Adjust.
6303 (attr_to_dynamic_prop): Adjust.
6304 (read_subrange_type): Adjust.
6305 (read_unspecified_type): Adjust.
6306 (dwarf2_read_abbrevs): Adjust.
6307 (load_partial_dies): Adjust.
6308 (read_partial_die): Adjust.
6309 (find_partial_die): Adjust.
6310 (guess_partial_die_structure_name): Adjust.
6311 (fixup_partial_die): Adjust.
6312 (read_attribute_value): Adjust.
6313 (read_addr_index): Adjust.
6314 (read_addr_index_from_leb128): Adjust.
6315 (read_str_index): Adjust.
6316 (dwarf2_string_attr): Adjust.
6317 (get_debug_line_section): Adjust.
6318 (dwarf_decode_line_header): Adjust.
6319 (lnp_state_machine::check_line_address): Adjust.
6320 (dwarf_decode_lines_1): Adjust.
6321 (dwarf_decode_lines): Adjust.
6322 (dwarf2_start_symtab): Adjust.
6323 (var_decode_location): Adjust.
6324 (new_symbol_full): Adjust.
6325 (dwarf2_const_value_data): Adjust.
6326 (dwarf2_const_value_attr): Adjust.
6327 (dwarf2_const_value): Adjust.
6328 (die_type): Adjust.
6329 (die_containing_type): Adjust.
6330 (build_error_marker_type): Adjust.
6331 (lookup_die_type): Adjust.
6332 (guess_full_die_structure_name): Adjust.
6333 (anonymous_struct_prefix): Adjust.
6334 (determine_prefix): Adjust.
6335 (dwarf2_name): Adjust.
6336 (follow_die_ref_or_sig): Adjust.
6337 (follow_die_offset): Adjust.
6338 (follow_die_ref): Adjust.
6339 (follow_die_sig_1): Adjust.
6340 (follow_die_sig): Adjust.
6341 (get_signatured_type): Adjust.
6342 (get_DW_AT_signature_type): Adjust.
6343 (decode_locdesc): Adjust.
6344 (dwarf_decode_macros): Adjust.
6345 (cu_debug_loc_section): Adjust.
6346 (fill_in_loclist_baton): Adjust.
6347 (dwarf2_symbol_mark_computed): Adjust.
6348 (init_one_comp_unit): Don't assign
6349 dwarf2_cu::dwarf2_per_objfile.
6350 (set_die_type): Adjust.
6351
ed2dc618
SM
63522018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6353
6354 * dwarf2read.c (struct mapped_debug_names): Add constructor.
6355 <dwarf2_per_objfile>: New field.
6356 (dwarf2_per_objfile): Remove global.
6357 (get_dwarf2_per_objfile): New function.
6358 (set_dwarf2_per_objfile): New function.
6359 (dwarf2_build_psymtabs_hard): Change objfile parameter to
6360 dwarf2_per_objfile.
6361 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6362 (read_abbrev_offset): Likewise.
6363 (read_indirect_string): Likewise.
6364 (read_indirect_line_string): Likewise.
6365 (read_indirect_string_at_offset): Likewise.
6366 (read_indirect_string_from_dwz): Likewise.
6367 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6368 dwarf2_per_objfile.
6369 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6370 (create_all_comp_units): Change objfile parameter to
6371 dwarf2_per_objfile.
6372 (create_all_type_units): Likewise.
6373 (process_queue): Add dwarf2_per_objfile parameter.
6374 (read_and_check_comp_unit_head): Likewise.
6375 (lookup_dwo_unit_in_dwp): Likewise.
6376 (get_dwp_file): Likewise.
6377 (process_cu_includes): Likewise.
6378 (struct free_dwo_file_cleanup_data): New struct.
6379 (dwarf2_has_info): Use get_dwarf2_per_objfile and
6380 set_dwarf2_per_objfile.
6381 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
6382 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
6383 context, adjust calls.
6384 (dw2_instantiate_symtab): Likewise.
6385 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
6386 (dw2_get_cu): Likewise.
6387 (create_cu_from_index_list): Change objfile parameter to
6388 dwarf2_per_objfile.
6389 (create_cus_from_index_list): Get dwarf2_per_objfile from
6390 context, adjust calls.
6391 (create_cus_from_index): Likewise.
6392 (create_signatured_type_table_from_index): Change objfile
6393 parameter to dwarf2_per_objfile.
6394 (create_signatured_type_table_from_debug_names): Change objfile
6395 parameter to dwarf2_per_objfile.
6396 (create_addrmap_from_index): Likewise.
6397 (create_addrmap_from_aranges): Likewise.
6398 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
6399 (dw2_setup): Remove.
6400 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
6401 context.
6402 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
6403 get_dwarf2_per_objfile.
6404 (dw2_forget_cached_source_info): Likewise.
6405 (dw2_map_symtabs_matching_filename): Likewise.
6406 (struct dw2_symtab_iterator) <index>: Remove.
6407 <dwarf2_per_objfile>: New field.
6408 (dw2_symtab_iter_init): Replace index parameter with
6409 dwarf2_per_objfile.
6410 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
6411 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
6412 (dw2_print_stats): Likewise.
6413 (dw2_dump): Likewise.
6414 (dw2_expand_symtabs_for_function): Likewise.
6415 (dw2_expand_all_symtabs): Likewise.
6416 (dw2_expand_symtabs_with_fullname): Likewise.
6417 (dw2_expand_marked_cus): Replace index and objfile parameters
6418 with dwarf2_per_objfile.
6419 (dw_expand_symtabs_matching_file_matcher): Add
6420 dwarf2_per_objfile parameter and adjust calls.
6421 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
6422 adjust calls.
6423 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
6424 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
6425 adjust calls.
6426 (create_cus_from_debug_names_list): Replace objfile parameter
6427 with dwarf2_per_objfile and adjust calls.
6428 (create_cus_from_debug_names): Likewise.
6429 (dwarf2_read_debug_names): Likewise.
6430 (mapped_debug_names::namei_to_name): Adjust call.
6431 (dw2_debug_names_iterator::next): Likewise.
6432 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
6433 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
6434 (dw2_debug_names_dump): Likewise.
6435 (dw2_debug_names_expand_symtabs_for_function): Likewise.
6436 (dw2_debug_names_expand_symtabs_matching): Likewise.
6437 (dwarf2_initialize_objfile): Likewise.
6438 (dwarf2_build_psymtabs): Likewise.
6439 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
6440 this_cu.
6441 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
6442 (read_and_check_comp_unit_head): Likewise.
6443 (read_abbrev_offset): Likewise.
6444 (create_debug_type_hash_table): Likewise.
6445 (create_debug_types_hash_table): Likewise.
6446 (create_all_type_units): Replace objfile parameter with
6447 dwarf2_per_objfile.
6448 (add_type_unit): Add dwarf2_per_objfile parameter.
6449 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
6450 with dwarf2_per_objfile.
6451 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
6452 (lookup_dwp_signatured_type): Likewise.
6453 (lookup_signatured_type): Likewise.
6454 (read_cutu_die_from_dwo): Likewise.
6455 (init_tu_and_read_dwo_dies): Likewise.
6456 (init_cutu_and_read_dies): Likewise.
6457 (init_cutu_and_read_dies_no_follow): Likewise.
6458 (allocate_type_unit_groups_table): Add objfile parameter.
6459 (create_type_unit_group): Use dwarf2_per_objfile from cu.
6460 (get_type_unit_group): Likewise.
6461 (process_psymtab_comp_unit): Update call.
6462 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
6463 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
6464 (print_tu_stats): Likewise.
6465 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
6466 in void* parameter.
6467 (build_type_psymtabs): Change objfile parameter to
6468 dwarf2_per_objfile.
6469 (process_skeletonless_type_unit): Use dwarf2_per_objfile
6470 passed in void* parameter.
6471 (process_skeletonless_type_units): Change objfile parameter to
6472 dwarf2_per_objfile.
6473 (set_partial_user): Likewise.
6474 (dwarf2_build_psymtabs_hard): Likewise.
6475 (read_comp_units_from_section): Likewise.
6476 (create_all_comp_units): Likewise.
6477 (scan_partial_symbols): Update calls.
6478 (add_partial_symbol): Likewise.
6479 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
6480 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
6481 (process_queue): Add dwarf2_per_objfile parameter.
6482 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
6483 (compute_compunit_symtab_includes): Likewise.
6484 (process_cu_includes): Add dwarf2_per_objfile parameter.
6485 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
6486 (process_full_type_unit): Likewise.
6487 (process_imported_unit_die): Update call.
6488 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
6489 (read_file_scope): Likewise.
6490 (allocate_dwo_file_hash_table): Add objfile parameter.
6491 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
6492 (create_cus_hash_table): Likewise.
6493 (create_dwp_hash_table): Likewise.
6494 (create_dwo_unit_in_dwp_v1): Likewise.
6495 (create_dwp_v2_section): Likewise.
6496 (create_dwo_unit_in_dwp_v2): Likewise.
6497 (lookup_dwo_unit_in_dwp): Likewise.
6498 (try_open_dwop_file): Likewise.
6499 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
6500 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
6501 cleanup to include a reference to dwarf2_per_objfile.
6502 (open_dwp_file): Add dwarf2_per_objfile parameter.
6503 (open_and_init_dwp_file): Likewise.
6504 (get_dwp_file): Likewise.
6505 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
6506 (queue_and_load_all_dwo_tus): Update call.
6507 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
6508 data.
6509 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
6510 (dwarf2_ranges_process): Likewise.
6511 (dwarf2_get_pc_bounds): Likewise.
6512 (mark_common_block_symbol_computed): Likewise.
6513 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6514 (dwarf2_read_abbrevs): Update call.
6515 (read_partial_die): Use dwarf2_per_objfile from cu.
6516 (find_partial_die): Likewise.
6517 (fixup_partial_die): Likewise.
6518 (read_attribute_value): Likewise.
6519 (read_indirect_string_at_offset_from): Add objfile parameter.
6520 (read_indirect_string_at_offset): Add dwarf2_per_objfile
6521 parameter.
6522 (read_indirect_string_from_dwz): Add objfile parameter.
6523 (read_indirect_string): Add objfile parameter.
6524 (read_addr_index_1): Add dwarf2_per_objfile parameter.
6525 (read_addr_index): Use dwarf2_per_objfile from cu.
6526 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
6527 call dw2_setup.
6528 (read_str_index): Use dwarf2_per_objfile from cu.
6529 (get_debug_line_section): Likewise.
6530 (read_formatted_entries): Add dwarf2_per_objfile parameter.
6531 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
6532 (new_symbol_full): Use dwarf2_per_objfile from cu.
6533 (build_error_marker_type): Likewise.
6534 (lookup_die_type): Likewise.
6535 (determine_prefix): Likewise.
6536 (follow_die_offset): Likewise.
6537 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
6538 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
6539 (dwarf2_fetch_die_type_sect_off): Likewise.
6540 (dwarf2_get_die_type): Likewise.
6541 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
6542 (get_signatured_type): Likewise.
6543 (get_DW_AT_signature_type): Likewise.
6544 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
6545 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
6546 (cu_debug_loc_section): Likewise.
6547 (fill_in_loclist_baton): Likewise.
6548 (dwarf2_symbol_mark_computed): Likewise.
6549 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6550 dwarf2_per_objfile.
6551 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
6552 parameter.
6553 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6554 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
6555 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
6556 (set_die_type): Use dwarf2_free_objfile from cu.
6557 (get_die_type_at_offset): Likewise.
6558 (dwarf2_per_objfile_free): Don't assign global variable.
6559 (debug_names) <constructor>: Add dwarf2_per_objfile
6560 parameter, update m_debugstrlookup construction.
6561 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
6562 parameter.
6563 <m_dwarf2_per_objfile>: New field.
6564 <lookup>: Use m_dwarf2_per_objfile.
6565 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
6566 (psyms_seen_size): Likewise.
6567 (write_gdbindex): Replace objfile parameter with
6568 dwarf2_per_objfile.
6569 (write_debug_names): Likewise.
6570 (write_psymtabs_to_index): Likewise.
6571 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
6572 calls.
6573
e3b94546
SM
65742018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6575
6576 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
6577 <dwarf2_per_objfile>: New field.
6578 (struct dwarf2_per_cu_data) <objfile>: Remove.
6579 <dwarf2_per_objfile>: New field.
6580 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
6581 of objfile.
6582 (create_signatured_type_table_from_index): Likewise.
6583 (create_debug_type_hash_table): Likewise.
6584 (fill_in_sig_entry_from_dwo_entry): Likewise.
6585 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
6586 (create_type_unit_group): Assign dwarf2_per_objfile instead of
6587 objfile.
6588 (create_partial_symtab): Access objfile through
6589 dwarf2_per_objfile.
6590 (process_psymtab_comp_unit_reader): Likewise.
6591 (read_comp_units_from_section): Likewise.
6592 (scan_partial_symbols): Likewise.
6593 (add_partial_symbol): Likewise.
6594 (add_partial_subprogram): Likewise.
6595 (peek_die_abbrev): Likewise.
6596 (fixup_go_packaging): Likewise.
6597 (process_full_comp_unit): Likewise.
6598 (process_full_type_unit): Likewise.
6599 (process_imported_unit_die): Likewise.
6600 (dwarf2_compute_name): Likewise.
6601 (dwarf2_physname): Likewise.
6602 (read_import_statement): Likewise.
6603 (create_cus_hash_table): Assign dwarf2_physname instead of
6604 objfile.
6605 (read_func_scope): Access objfile through dwarf2_per_objfile.
6606 (read_lexical_block_scope): Likewise.
6607 (read_call_site_scope): Likewise.
6608 (read_variable): Likewise.
6609 (dwarf2_rnglists_process): Likewise.
6610 (dwarf2_ranges_process): Likewise.
6611 (dwarf2_ranges_read): Likewise.
6612 (dwarf2_record_block_ranges): Likewise.
6613 (dwarf2_add_field): Likewise.
6614 (dwarf2_add_member_fn): Likewise.
6615 (read_structure_type): Likewise.
6616 (process_structure_scope): Likewise.
6617 (read_enumeration_type): Likewise.
6618 (read_array_type): Likewise.
6619 (read_common_block): Likewise.
6620 (read_namespace_type): Likewise.
6621 (read_namespace): Likewise.
6622 (read_module_type): Likewise.
6623 (read_tag_pointer_type): Likewise.
6624 (read_tag_ptr_to_member_type): Likewise.
6625 (read_tag_string_type): Likewise.
6626 (read_subroutine_type): Likewise.
6627 (read_typedef): Likewise.
6628 (read_base_type): Likewise.
6629 (attr_to_dynamic_prop): Likewise.
6630 (read_subrange_type): Likewise.
6631 (read_unspecified_type): Likewise.
6632 (load_partial_dies): Likewise.
6633 (read_partial_die): Likewise.
6634 (find_partial_die): Likewise.
6635 (guess_partial_die_structure_name): Likewise.
6636 (fixup_partial_die): Likewise.
6637 (read_attribute_value): Likewise.
6638 (read_addr_index_from_leb128): Likewise.
6639 (dwarf2_read_addr_index): Likewise.
6640 (dwarf2_string_attr): Likewise.
6641 (lnp_state_machine::check_line_address): Likewise.
6642 (dwarf_decode_lines_1): Likewise.
6643 (dwarf_decode_lines): Likewise.
6644 (dwarf2_start_symtab): Likewise.
6645 (var_decode_location): Likewise.
6646 (new_symbol_full): Likewise.
6647 (dwarf2_const_value_data): Likewise.
6648 (dwarf2_const_value_attr): Likewise.
6649 (dwarf2_const_value): Likewise.
6650 (die_type): Likewise.
6651 (die_containing_type): Likewise.
6652 (lookup_die_type): Likewise.
6653 (guess_full_die_structure_name): Likewise.
6654 (anonymous_struct_prefix): Likewise.
6655 (dwarf2_name): Likewise.
6656 (follow_die_ref_or_sig): Likewise.
6657 (follow_die_offset): Likewise.
6658 (follow_die_ref): Likewise.
6659 (dwarf2_fetch_die_loc_sect_off): Likewise.
6660 (dwarf2_fetch_constant_bytes): Likewise.
6661 (dwarf2_fetch_die_type_sect_off): Likewise.
6662 (dwarf2_get_die_type): Likewise.
6663 (follow_die_sig): Likewise.
6664 (decode_locdesc): Likewise.
6665 (dwarf2_per_cu_objfile): Likewise.
6666 (dwarf2_per_cu_text_offset): Likewise.
6667 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
6668 objfile.
6669 (set_die_type): Access objfile through
6670 dwarf2_per_objfile.
6671
b01ba14d
SM
66722018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6673
6674 * valprint.c (converted_character_d): Remove typedef.
6675 (DEF_VEC_O (converted_character_d)): Remove.
6676 (count_next_character): Use std::vector.
6677 (print_converted_chars_to_obstack): Likewise.
6678 (generic_printstr): Likewise.
6679
4d0fdd9b
SM
66802018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6681
6682 * xml-support.h (struct gdb_xml_value): Add constructor.
6683 <value>: Change type to unique_xmalloc_ptr.
6684 (gdb_xml_value_s): Remove typedef.
6685 (DEF_VEC_O (gdb_xml_value_s)): Remove.
6686 (gdb_xml_element_start_handler): Change parameter type to
6687 std::vector.
6688 (xml_find_attribute): Likewise.
6689 * xml-support.c (xml_find_attribute): Change parameter type to
6690 std::vector and adjust.
6691 (gdb_xml_values_cleanup): Remove.
6692 (gdb_xml_parser::start_element): Adjust to std::vector.
6693 (xinclude_start_include): Change paraeter type to std::vector
6694 and adjust.
6695 * btrace.c (check_xml_btrace_version): Likewise.
6696 (parse_xml_btrace_block): Likewise.
6697 (parse_xml_btrace_pt_config_cpu): Likewise.
6698 (parse_xml_btrace_pt): Likewise.
6699 (parse_xml_btrace_conf_bts): Likewise.
6700 (parse_xml_btrace_conf_pt): Likewise.
6701 * memory-map.c (memory_map_start_memory): Likewise.
6702 (memory_map_start_property): Likewise.
6703 * osdata.c (osdata_start_osdata): Likewise.
6704 (osdata_start_item): Likewise.
6705 (osdata_start_column): Likewise.
6706 * remote.c (start_thread): Likewise.
6707 * solib-aix.c (library_list_start_library): Likewise.
6708 (library_list_start_list): Likewise.
6709 * solib-svr4.c (library_list_start_library): Likewise.
6710 (svr4_library_list_start_list): Likewise.
6711 * solib-target.c (library_list_start_segment): Likewise.
6712 (library_list_start_section): Likewise.
6713 (library_list_start_library): Likewise.
6714 (library_list_start_list): Likewise.
6715 * tracepoint.c (traceframe_info_start_memory): Likewise.
6716 (traceframe_info_start_tvar): Likewise.
6717 * xml-syscall.c (syscall_start_syscall): Likewise.
6718 * xml-tdesc.c (tdesc_start_target): Likewise.
6719 (tdesc_start_feature): Likewise.
6720 (tdesc_start_reg): Likewise.
6721 (tdesc_start_union): Likewise.
6722 (tdesc_start_struct): Likewise.
6723 (tdesc_start_flags): Likewise.
6724 (tdesc_start_enum): Likewise.
6725 (tdesc_start_field): Likewise.
6726 (tdesc_start_enum_value): Likewise.
6727 (tdesc_start_vector): Likewise.
6728
f979c73f
SM
67292018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6730
6731 * extension.h (struct xmethod_worker) <clone>: Remove.
6732 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
6733 Remove.
6734 (python_xmethod_worker::clone): Remove.
6735 * valops.c (find_overload_match): Use std::move instead of
6736 clone.
6737
ba18742c
SM
67382018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6739
6740 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
6741 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
6742 <free_xmethod_worker_data>: Remove.
6743 <get_matching_xmethod_workers>: Chance VEC to std::vector.
6744 <get_xmethod_arg_types>: Remove.
6745 <get_xmethod_result_type>: Remove.
6746 <invoke_xmethod>: Remove.
6747 * extension.c (new_xmethod_worker): Remove.
6748 (clone_xmethod_worker): Remove.
6749 (get_matching_xmethod_workers): Return void, pass std::vector by
6750 pointer.
6751 (get_xmethod_arg_types): Rename to...
6752 (xmethod_worker::get_arg_types): ... this, and adjust.
6753 (get_xmethod_result_type): Rename to...
6754 (xmethod_worker::get_result_type): ... this, and adjust.
6755 (invoke_xmethod): Remove.
6756 (free_xmethod_worker): Remove.
6757 (free_xmethod_worker_vec): Remove.
6758 * extension.h (enum ext_lang_rc): Move here from
6759 extension-priv.h.
6760 (struct xmethod_worker): Add constructor and destructor.
6761 <data>: Remove.
6762 <value>: Remove.
6763 <invoke, clone, do_get_result_type, do_get_arg_types>: New
6764 virtual pure methods.
6765 <get_arg_types, get_result_type>: New methods.
6766 (xmethod_worker_ptr): Remove typedef.
6767 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
6768 (xmethod_worker_vec): Remove typedef.
6769 (xmethod_worker_up): New typedef.
6770 (invoke_xmethod): Remove.
6771 (clone_xmethod_worker): Remove.
6772 (free_xmethod_worker): Remove.
6773 (free_xmethod_worker_vec): Remove.
6774 (get_xmethod_arg_types): Remove.
6775 (get_xmethod_result_type): Remove.
6776 * valops.c (find_method_list): Use std::vector, don't use
6777 intermediate vector.
6778 (value_find_oload_method_list): Use std::vector.
6779 (find_overload_match): Use std::vector.
6780 (find_oload_champ): Use std::vector.
6781 * value.c (value_free): Use operator delete.
6782 (value_of_xmethod): Rename to...
6783 (value_from_xmethod): ... this. Don't assign
6784 xmethod_worker::value, take rvalue-reference.
6785 (result_type_of_xmethod): Adjust.
6786 (call_xmethod): Adjust.
6787 * value.h: Include extension.h.
6788 (struct xmethod_worker): Don't forward-declare.
6789 (value_of_xmethod): Rename to...
6790 (value_from_xmethod): ... this, take rvalue-reference.
6791 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
6792 (struct python_xmethod_worker): ... this, add constructor and
6793 destructor.
6794 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
6795 (gdbpy_free_xmethod_worker_data): Rename to...
6796 (python_xmethod_worker::~python_xmethod_worker): ... this and
6797 adjust.
6798 (gdbpy_clone_xmethod_worker_data): Rename to...
6799 (python_xmethod_worker::clone): ... this and adjust.
6800 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
6801 temporary vector.
6802 (gdbpy_get_xmethod_arg_types): Rename to...
6803 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
6804 (gdbpy_get_xmethod_result_type): Rename to...
6805 (python_xmethod_worker::do_get_result_type): ... this and
6806 adjust.
6807 (gdbpy_invoke_xmethod): Rename to...
6808 (python_xmethod_worker::invoke): ... this and adjust.
6809 (new_python_xmethod_worker): Rename to...
6810 (python_xmethod_worker::python_xmethod_worker): ... this and
6811 adjust.
6812 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
6813 Remove.
6814 (gdbpy_free_xmethod_worker_data): Remove.
6815 (gdbpy_get_matching_xmethod_workers): Use std::vector.
6816 (gdbpy_get_xmethod_arg_types): Remove.
6817 (gdbpy_get_xmethod_result_type): Remove.
6818 (gdbpy_invoke_xmethod): Remove.
6819 * python/python.c (python_extension_ops): Remove obsolete
6820 callbacks.
6821
e379cee6
PA
68222018-01-05 Pedro Alves <palves@redhat.com>
6823
6824 PR gdb/18653
6825 * common/signals-state-save-restore.c
6826 (save_original_signals_state): New parameter 'quiet'. Warn if we
6827 find a custom handler preinstalled, instead of internal erroring.
6828 But only warn if !quiet.
6829 * common/signals-state-save-restore.h
6830 (save_original_signals_state): New parameter 'quiet'.
6831 * main.c (captured_main_1): Move save_original_signals_state call
6832 after option handling, and pass QUIET.
6833
a655456c
PA
68342018-01-05 Pedro Alves <palves@redhat.com>
6835
6836 * spu-tdep.c (spu_catch_start): Pass
6837 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
6838
de63c46b
PA
68392018-01-05 Pedro Alves <palves@redhat.com>
6840
6841 PR gdb/22670
6842 * ada-lang.c (literal_symbol_name_matcher): New function.
6843 (ada_get_symbol_name_matcher): Use it for
6844 symbol_name_match_type::SEARCH_NAME.
6845 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
6846 it down instead of assuming symbol_name_match_type::FULL.
6847 * block.h (block_lookup_symbol): New parameter 'match_type'.
6848 * c-valprint.c (print_unpacked_pointer): Use
6849 lookup_symbol_search_name instead of lookup_symbol.
6850 * compile/compile-object-load.c (get_out_value_type): Pass down
6851 symbol_name_match_type::SEARCH_NAME.
6852 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
6853 symbol_name_match_type::FULL.
6854 * cp-support.c (cp_get_symbol_name_matcher): Handle
6855 symbol_name_match_type::SEARCH_NAME.
6856 * infrun.c (insert_exception_resume_breakpoint): Use
6857 lookup_symbol_search_name.
6858 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
6859 * psymtab.c (maintenance_check_psymtabs): Use
6860 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
6861 * stack.c (print_frame_args): Use lookup_symbol_search_name and
6862 SYMBOL_SEARCH_NAME.
6863 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
6864 if symbol_name_match_type::SEARCH_NAME.
6865 (lookup_symbol_in_language): Pass down
6866 symbol_name_match_type::FULL.
6867 (lookup_symbol_search_name): New.
6868 (lookup_language_this): Pass down
6869 symbol_name_match_type::SEARCH_NAME.
6870 (lookup_symbol_aux, lookup_local_symbol): New parameter
6871 'match_type'. Pass it down.
6872 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
6873 (lookup_symbol_search_name): New declaration.
6874 (lookup_symbol_in_block): New 'match_type' parameter.
6875
f98fc17b
PA
68762018-01-05 Pedro Alves <palves@redhat.com>
6877
6878 PR gdb/22670
6879 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
6880 ada_lookup_symbol.
6881 (ada_lookup_symbol): Reimplement in terms of
6882 ada_lookup_symbol_list, bits factored out from
6883 ada_lookup_encoded_symbol.
6884
342f8240
JB
68852018-01-05 Joel Brobecker <brobecker@adacore.com>
6886
6887 * ada-exp.y (write_object_renaming): When subscripting an array
6888 using a symbol as the index, pass the block in call to
6889 ada_lookup_encoded_symbol when looking that symbol up.
6890
7150d33c
JG
68912018-01-05 Jerome Guitton <guitton@adacore.com>
6892
6893 * ada-lang.c (ada_array_length): Use ada_index_type instead of
6894 TYPE_INDEX_TYPE.
6895
cc0e770c
JB
68962018-01-05 Joel Brobecker <brobecker@adacore.com>
6897
6898 * ada-lang.c (ada_to_fixed_value_create): Add handling of
6899 the case where VALUE_LVAL (val0) is not lval_memory.
6900
f79da888 69012018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
6902
6903 * ada-valprint.c (print_optional_low_bound): Handle
6904 character-indexed array printing like boolean-indexed array
6905 printing.
6906
cd385f94
JB
69072018-01-05 Joel Brobecker <brobecker@adacore.com>
6908
6909 * NEWS: Create a new section for the next release branch.
6910 Rename the section of the current branch, now that it has
6911 been cut.
6912
09aca949
JB
69132018-01-05 Joel Brobecker <brobecker@adacore.com>
6914
6915 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
6916 * version.in: Bump version to 8.1.50.DATE-git.
6917
9f757bf7
XR
69182018-01-03 Xavier Roirand <roirand@adacore.com>
6919
6920 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
6921 Add field.
6922 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
6923 Add field.
6924 (default_exception_support_info) <catch_handlers_sym>: Add field.
6925 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
6926 (ada_exception_name_addr_1): Add "catch handlers" handling.
6927 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
6928 Update all callers.
6929 (create_excep_cond_exprs) <ex>: Add parameter.
6930 (re_set_exception): Update create_excep_cond_exprs call.
6931 (print_it_exception, print_one_exception, print_mention_exception)
6932 (print_recreate_exception): Add "catch handler" handling.
6933 (allocate_location_catch_handlers, re_set_catch_handlers)
6934 (check_status_catch_handlers, print_it_catch_handlers)
6935 (print_one_catch_handlers, print_mention_catch_handlers)
6936 (print_recreate_catch_handlers): New function.
6937 (catch_handlers_breakpoint_ops): New variable.
6938 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
6939 Add parameter. Add "catch handler" handling.
6940 (ada_exception_sym_name, ada_exception_breakpoint_ops):
6941 Add "catch handler" handling.
6942 (ada_exception_catchpoint_cond_string): Add "catch handler"
6943 handling.
6944 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
6945 call.
6946 (catch_ada_handlers_command): New function.
6947 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
6948 operations structure.
6949 (_initialize_ada_language): Add "catch handlers" command entry.
6950 * NEWS: Document "catch handlers" feature.
6951
9fe561ab
JB
69522018-01-02 Joel Brobecker <brobecker@adacore.com>
6953
6954 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
6955 account when creating the array type of the slice.
6956 (ada_value_slice): Likewise.
6957
a405673c
JB
69582018-01-02 Joel Brobecker <brobecker@adacore.com>
6959
6960 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
6961 New enum value.
6962 (create_array_type_with_stride): Add byte_stride_prop parameter.
6963 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
6964 New parameter. Update all callers in this file.
6965 (array_type_has_dynamic_stride): New function.
6966 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
6967 of arrays with dynamic byte strides.
6968 * dwarf2read.c (read_array_type): Add support for dynamic
6969 DW_AT_byte_stride attributes.
6970
74a2f8ff
JB
69712018-01-02 Joel Brobecker <brobecker@adacore.com>
6972
6973 * dwarf2read.c (read_unspecified_type): Treat
6974 DW_TAG_enumeration_type DIEs from Ada units as stubs.
6975
e2882c85
JB
69762018-01-01 Joel Brobecker <brobecker@adacore.com>
6977
6978 Update copyright year range in all GDB files.
6979
1690bb24
JB
69802018-01-01 Joel Brobecker <brobecker@adacore.com>
6981
6982 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
6983 and gdb/testsuite/gdb.base/step-line.c.
6984
0f0c98a8
JB
69852018-01-01 Joel Brobecker <brobecker@adacore.com>
6986
6987 * copyright.py (main): Dump the contents of
6988 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
6989 even if BY_HAND is empty.
6990
82e1e79a
JB
69912018-01-01 Joel Brobecker <brobecker@adacore.com>
6992
6993 * top.c (print_gdb_version): Update Copyright year in version
6994 message.
6995
053f54e5 69962018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 6997
053f54e5 6998 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 6999
053f54e5 7000For older changes see ChangeLog-2017.
c906108c
SS
7001\f
7002Local Variables:
7003mode: change-log
7004left-margin: 8
7005fill-column: 74
7006version-control: never
57da7796 7007coding: utf-8
c906108c 7008End:
This page took 2.533227 seconds and 4 git commands to generate.