Fix typo in NT_PPC_TM_CVSX note description
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
8a67aaa8
SM
12018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2
3 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4 variable.
5 (libunwind_frame_sniffer): Likewise.
6 (libunwind_frame_prev_register): Likewise.
7 (libunwind_sigtramp_frame_sniffer): Likewise.
8 * ia64-tdep.c (ia64_access_reg): Likewise.
9 (ia64_access_rse_reg): Likewise.
10 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
11 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
12
ec74dcd8
SM
132018-07-16 Simon Marchi <simon.marchi@ericsson.com>
14
15 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
16
a700e753
SM
172018-07-16 Simon Marchi <simon.marchi@ericsson.com>
18
19 * remote-sim.c (gdbsim_target::close,
20 gdbsim_target::mourn_inferior): Remove unused variables.
21
8b411ff8
SM
222018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
23
24 * ia64-tdep.c (ktab_buf): New global.
25 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
26 (get_kernel_table): Adjust.
27
edb0470b
TT
282018-07-16 Tom Tromey <tom@tromey.com>
29
30 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
31 * dwarf2read.c (using_directives, new_symbol): Use
32 outermost_context_p.
33 * dbxread.c (process_one_symbol): Use outermost_context_p.
34 * coffread.c (coff_symtab_read): Use outermost_context_p.
35
6cccc9a8
TT
362018-07-16 Tom Tromey <tom@tromey.com>
37
38 * dwarf2read.c (using_directives, read_func_scope)
39 (read_lexical_block_scope): Update.
40 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
41 * buildsym.h (local_using_directives, global_using_directives):
42 Don't declare.
43 (get_local_using_directives, set_local_using_directives)
44 (get_global_using_directives): Declare.
45 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
46 m_global_using_directives>: New members.
47 (finish_block_internal, prepare_for_building)
48 (reset_symtab_globals, end_symtab_get_static_block)
49 (push_context): Update.
50 (get_local_using_directives, set_local_using_directives)
51 (get_global_using_directives): New functions.
52 (buildsym_init): Update.
53
652788a7
TT
542018-07-16 Tom Tromey <tom@tromey.com>
55
56 * xcoffread.c (xcoff_initial_scan): Don't call
57 free_pending_blocks.
58 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
59 * buildsym.h (class scoped_free_pendings): Add constructor.
60 (free_pending_blocks): Don't declare.
61 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
62 (free_pending_blocks): Now static.
63
8419ee53
TT
642018-07-16 Tom Tromey <tom@tromey.com>
65
66 * buildsym.h (push_subfile, pop_subfile): Update declarations.
67 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
68 member.
69 (struct subfile_stack): Remove.
70 (subfile_stack): Remove.
71 (push_subfile, pop_subfile, buildsym_init): Update.
72
ccdac490
TT
732018-07-16 Tom Tromey <tom@tromey.com>
74
75 * buildsym.c (push_subfile): Use gdb_assert.
76 (pop_subfile): Use gdb_assert.
77
43130d6f
TT
782018-07-16 Tom Tromey <tom@tromey.com>
79
80 * buildsym.h (merge_symbol_lists): Remove.
81 * buildsym.c (merge_symbol_lists): Remove.
82
77d6f1aa
TT
832018-07-16 Tom Tromey <tom@tromey.com>
84
85 * stabsread.c (scan_file_globals): Update comment.
86 * stabsread.h (scan_file_globals): Move from buildsym.h.
87 * buildsym.h (scan_file_globals): Move to stabsread.h.
88
2c722d18
TT
892018-07-16 Tom Tromey <tom@tromey.com>
90
91 * xcoffread.c (xcoff_new_init): Update.
92 * mipsread.c (mipscoff_new_init): Update.
93 * mdebugread.c (mdebug_build_psymtabs): Update.
94 * elfread.c (elf_new_init): Update.
95 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
96 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
97 * buildsym.h (buildsym_new_init): Don't declare.
98 * buildsym.c (buildsym_new_init): Remove.
99
5985ac61
TT
1002018-07-16 Tom Tromey <tom@tromey.com>
101
102 * stabsread.h (within_function): Move from buildsym.h.
103 * stabsread.c (start_stabs): Clear within_function.
104 * coffread.c (coff_start_symtab): Clear within_function.
105 * buildsym.h (within_function): Move to stabsread.h.
106 * buildsym.c (prepare_for_building): Update.
107
6b84eeb2
TT
1082018-07-16 Tom Tromey <tom@tromey.com>
109
110 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
111 * dwarf2read.c (dwarf2_start_symtab): Don't set
112 processing_gcc_compilation.
113 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
114
2150c3ef
TT
1152018-07-16 Tom Tromey <tom@tromey.com>
116
117 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
118 (next_symbol_text_func): Move from buildsym.h.
119 * stabsread.c (hashname): Move from buildsym.c.
120 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
121 (next_symbol_text_func, hashname): Move to stabsread.h.
122 * buildsym.c: Don't include bcache.h
123 (hashname): Move to stasbread.c.
124
0ec44fc0
TT
1252018-07-16 Tom Tromey <tom@tromey.com>
126
127 * buildsym.h (context_stack_size): Don't declare.
128 * buildsym.c (context_stack_size): New global.
129
81cc346d
TT
1302018-07-16 Tom Tromey <tom@tromey.com>
131
132 * dbxread.c (processing_acc_compilation): New global.
133 * buildsym.h (processing_acc_compilation): Don't declare.
134
2c99ee5c
TT
1352018-07-16 Tom Tromey <tom@tromey.com>
136
137 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
138 * dbxread.c (read_ofile_symtab): Update.
139 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
140 * buildsym.h (last_source_start_addr): Remove.
141 (set_last_source_start_addr, get_last_source_start_addr):
142 Declare.
143 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
144 parameter.
145 (struct buildsym_compunit) <m_last_source_start_addr>: New
146 member.
147 (prepare_for_building): Remove start_addr parameter.
148 (start_symtab, restart_symtab, end_symtab_get_static_block)
149 (end_symtab_with_blockvector): Update.
150 (set_last_source_start_addr, get_last_source_start_addr): New
151 functions.
152
530fedbc
TT
1532018-07-16 Tom Tromey <tom@tromey.com>
154
155 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
156 member.
157 (have_line_numbers): Remove.
158 (record_line, prepare_for_building, end_symtab_get_static_block)
159 (augment_type_symtab): Update.
160
6a976300
TT
1612018-07-16 Tom Tromey <tom@tromey.com>
162
163 * buildsym.c (~buildsym_compunit): Free the macro table.
164 (struct buildsym_compunit) <get_macro_table, release_macros>: New
165 methods.
166 <m_pending_macros>: New member.
167 (pending_macros): Remove.
168 (~scoped_free_pendings, get_macro_table, prepare_for_building)
169 (reset_symtab_globals, end_symtab_get_static_block)
170 (end_symtab_with_blockvector, augment_type_symtab)
171 (buildsym_init): Update.
172
c0015d44
TT
1732018-07-16 Tom Tromey <tom@tromey.com>
174
175 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
176 parameter.
177 (buildsym_compunit::set_last_source_file): New method.
178 <m_last_source_file>: New member.
179 (prepare_for_building): Remove "name" parameter.
180 (start_symtab, restart_symtab, reset_symtab_globals): Update.
181 (last_source_file): Remove.
182 (set_last_source_file, get_last_source_file): Update.
183
e62cca7c
TT
1842018-07-16 Tom Tromey <tom@tromey.com>
185
186 * buildsym.c (prepare_for_building): Add assert.
187
905eb0e2
TT
1882018-07-16 Tom Tromey <tom@tromey.com>
189
190 * buildsym.c (~buildsym_compunit): Update.
191 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
192 (start_subfile, patch_subfile_names)
193 (end_symtab_with_blockvector): Update.
194
b248663f
TT
1952018-07-16 Tom Tromey <tom@tromey.com>
196
197 * buildsym.c (struct buildsym_compunit): Add constructor,
198 destructor, initializers.
199 (start_buildsym_compunit): Remove.
200 (free_buildsym_compunit): Use "delete".
201 (start_symtab, restart_symtab): Use "new".
202
ff27d073
SM
2032018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
204
205 * symfile.c (set_objfile_default_section_offset): Remove struct
206 keyword.
207
6a15ecf5
SH
2082018-07-14 Stafford Horne <shorne@gmail.com>
209
210 * (Responsible Maintainers): Add myself as or1k maintainer.
211
027a4c30
TT
2122018-07-13 Tom Tromey <tom@tromey.com>
213
214 * symfile.c (set_objfile_default_section_offset): Use extra braces
215 around initializer.
216
5c1eda30
AA
2172018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
218
219 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
220 non-branching basr.
221
bc7b042b
PW
2222018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
223
224 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
225 unittests/cli-utils-selftests.c
226 * unittests/cli-utils-selftests.c: New file.
227
a14c4daa
PW
2282018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
229
230 * NEWS: Mention new commands. Mention change to 'thread apply'.
231
1fe75df7
PW
2322018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
233
234 * thread.c (thr_try_catch_cmd): New function.
235 (thread_apply_all_command): Handle qcs flags.
236 (thread_apply_command): Handle qcs flags.
237 (taas_command): New function.
238 (tfaas_command): New function.
239 (_initialize_thread): Update to setup the new commands 'taas
240 and 'tfaas'. Change doc string for 'thread apply'.
241
6a70eb7d
PW
2422018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
243
244 * stack.c: (trailing_outermost_frame): New function, mostly
245 extracted from backtrace_command_1.
246 (leading_innermost_frame): New function.
247 (backtrace_command_1): Update to call trailing_outermost_frame.
248 (frame_apply_command_count): New function.
249 (frame_apply_level_command): New function.
250 (frame_apply_all_command): New function.
251 (frame_apply_command): New function.
252 (faas_command): New function.
253 (frame_cmd_list): New variable.
254 (_initialize_stack): Update to setup the new commands 'frame apply'
255 and 'faas'.
256
529c08b2
PW
2572018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
258
259 * cli-utils.c (number_or_range_parser::get_number): Only handle
260 numbers or convenience var as numbers.
261 (parse_flags): New function.
262 (parse_flags_qcs): New function.
263 (number_or_range_parser::finished): Ensure parsing end is detected
264 before end of string.
265 * cli-utils.h (parse_flags): New function.
266 (parse_flags_qcs): New function.
267 (number_or_range_parser): Remove m_finished bool.
268 (number_or_range_parser::skip_range): Set m_in_range to false.
269
64b58472
SDJ
2702018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
271
272 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
273 on Windows.
274
c7ab0aef
SDJ
2752018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
276 Jan Kratochvil <jan.kratochvil@redhat.com>
277 Paul Fertser <fercerpav@gmail.com>
278 Tsutomu Seki <sekiriki@gmail.com>
279 Pedro Alves <palves@redhat.com>
280
281 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
282 'unittests/parse-connection-spec-selftests.c'.
283 (COMMON_SFILES): Add 'common/netstuff.c'.
284 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
285 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
286 * common/netstuff.c: New file.
287 * common/netstuff.h: New file.
288 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
289 (wait_for_connect): Update comment. New parameter
290 'gdb::optional<int> sock' instead of 'struct serial *scb'.
291 Use 'sock' directly instead of 'scb->fd'.
292 (try_connect): New function, with code from 'net_open'.
293 (net_open): Rewrite main loop to deal with multiple
294 sockets/addresses. Handle IPv6-style hostnames; implement
295 support for IPv6 connections.
296 * unittests/parse-connection-spec-selftests.c: New file.
297
4c7333b3
PA
2982018-07-11 Pedro Alves <palves@redhat.com>
299
300 PR gdb/23377
301 * remote.c (remote_target::remote_detach_pid): Call
302 set_current_process.
303
a6f88f6e
PA
3042018-07-11 Pedro Alves <palves@redhat.com>
305
306 * h8300-tdep.c (h8300_gdbarch_init): Remove
307 set_gdbarch_ecoff_reg_to_regnum calls.
308
16ff70dd
SDJ
3092018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
310
311 PR c++/23373
312 * c-typeprint.c (c_type_print_base_struct_union): Don't print
313 offsets/sizes for static members of a class/struct.
314
12863263
AH
3152018-07-11 Alan Hayward <alan.hayward@arm.com>
316
317 * target-descriptions.c (tdesc_register_bitsize): Rename.
318 * target-descriptions.h (tdesc_register_bitsize): Likewise.
319 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
320 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
321
1123588c
TT
3222018-07-10 Tom Tromey <tom@tromey.com>
323
324 * breakpoint.c (moribund_locations): Now static and a
325 std::vector.
326 (breakpoint_init_inferior, moribund_breakpoint_here_p)
327 (build_bpstat_chain, update_global_location_list)
328 (breakpoint_retire_moribund): Update.
329 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
330 VEC.
331
8c49aa89
AB
3322018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
333
334 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
335 (riscv_register_reggroup_p): Use new function, remove unneeded
336 parenthesis.
337 (riscv_push_dummy_call): Extend assert to compare against xlen or
338 flen based on register type.
339
42ecac17
AB
3402018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
341
342 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
343
055303e2
AB
3442018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
345
346 * remote.c (show_hardware_watchpoint_limit): New function.
347 (show_hardware_watchpoint_length_limit): New function.
348 (show_hardware_breakpoint_limit): New function.
349 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
350 where appropriate, update help text.
351
8fd32c1c
TT
3522018-07-09 Tom Tromey <tom@tromey.com>
353
354 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
355 (CLIBS): Don't mention NAT_CLIBS.
356
31278b51
TT
3572018-07-09 Tom Tromey <tom@tromey.com>
358
359 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
360 (LIBGDB_OBS, clean mostlyclean): Update.
361 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
362
e5fd1493
TT
3632018-07-09 Tom Tromey <tom@tromey.com>
364
365 * Makefile.in (%.c: %.y): Use ECHO_YACC.
366 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
367 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
368
981e0c0c
TT
3692018-07-09 Tom Tromey <tom@tromey.com>
370
371 * Makefile.in (ALLDEPFILES): Remove exec.c.
372 (COMMON_OBS): Remove exec.o.
373 (COMMON_SFILES): Add exec.c.
374
14ccceb2
TT
3752018-07-09 Tom Tromey <tom@tromey.com>
376
377 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
378
5d3c3a68
TT
3792018-07-09 Tom Tromey <tom@tromey.com>
380
381 * Makefile.in (clean mostlyclean): Remove stamp-version.
382 (version.c): Depend on stamp-version.
383 (stamp-version): New rule, from version.c rule.
384
1998086d
TT
3852018-07-09 Tom Tromey <tom@tromey.com>
386
387 * Makefile.in (init.c): Depend on stamp-init.
388 (stamp-init): New rule, from init.c rule.
389 (clean mostlyclean): Remove stamp-init.
390
4c754949
TT
3912018-07-09 Tom Tromey <tom@tromey.com>
392
393 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
394 SUBDIR_GCC_COMPILE_SRCS.
395
6497f1dd
TT
3962018-07-09 Tom Tromey <tom@tromey.com>
397
398 * Makefile.in (init.c): Remove some unused sed rules.
399
97a34db9
TT
4002018-07-09 Tom Tromey <tom@tromey.com>
401
402 * Makefile.in (TSOBS): Remove.
403 (INIT_FILES): Update.
404 (LIBGDB_OBS): Update.
405 (COMMON_SFILES): Add inflow.c.
406 (SFILES): Remove inflow.c.
407
25289ac1
JK
4082018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
409
410 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
411
e83f4d97
SM
4122018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
413
4869c585
SM
414 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
415 get_saveloc_name, is_signal_frame_name, step_name,
416 init_remote_name, create_addr_space_name,
417 destroy_addr_space_name, search_unwind_table_name,
418 find_dyn_list_name): Constify.
e83f4d97 419
6821842f
SM
4202018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
421
422 * darwin-nat.c (darwin_pthread_kill): New function.
423 (darwin_resume_thread): Use darwin_pthread_kill.
424
c530603c
TV
4252018-07-05 Tom de Vries <tdevries@suse.de>
426
427 * macroexp.c (macro_buffer) <operator=>: New member function.
428
a7d0f0f0
TT
4292018-07-04 Tom Tromey <tom@tromey.com>
430
431 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
432
6242c6a6
SM
4332018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
434
435 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
436 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
437 * maint.c: Likewise.
438 * top.c: Likewise.
439
4e5b2f89
JB
4402018-07-04 Joel Brobecker <brobecker@adacore.com>
441
442 * NEWS: Create a new section for the next release branch.
443 Rename the section of the current branch, now that it has
444 been cut.
445
538ccc4a
JB
4462018-07-04 Joel Brobecker <brobecker@adacore.com>
447
448 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
449 * version.in: Bump version to 8.2.50.DATE-git.
450
1b919490
VB
4512018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
452 Pedro Alves <palves@redhat.com>
453
454 * linux-nat.c (linux_init_ptrace): Rename to ...
455 (linux_init_ptrace_procfs): ... this. Call
456 linux_proc_init_warnings.
457 (linux_nat_target::post_attach)
458 (linux_nat_target::post_startup_inferior): Adjust.
459 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
460 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
461
1ea5da02
TV
4622018-07-04 Tom de Vries <tdevries@suse.de>
463
464 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
465 check ...
466 (read_comp_unit_head): ... here.
467
f51e0e20
TT
4682018-07-03 Tom Tromey <tom@tromey.com>
469
470 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
471 (stop_tracing, tstatus_command)
472 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
473 (print_one_static_tracepoint_marker): Update.
474 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
475 std::vector.
476 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
477 VEC.
478 (all_tracepoints, static_tracepoints_here): Return std::vector.
479
d7e15655
TT
4802018-07-03 Tom Tromey <tom@tromey.com>
481
482 * common/ptid.c (ptid_equal): Remove.
483 * common/ptid.h (ptid_equal): Don't declare.
484 * ada-tasks.c: Update.
485 * breakpoint.c: Update.
486 * common/agent.c: Update.
487 * corelow.c: Update.
488 * darwin-nat-info.c: Update.
489 * darwin-nat.c: Update.
490 * dcache.c: Update.
491 * dtrace-probe.c: Update.
492 * dummy-frame.c: Update.
493 * fbsd-nat.c: Update.
494 * frame.c: Update.
495 * gdbthread.h: Update.
496 * gnu-nat.c: Update.
497 * go32-nat.c: Update.
498 * inf-loop.c: Update.
499 * inf-ptrace.c: Update.
500 * infcall.c: Update.
501 * infcmd.c: Update.
502 * inflow.c: Update.
503 * infrun.c: Update.
504 * linux-fork.c: Update.
505 * linux-nat.c: Update.
506 * linux-thread-db.c: Update.
507 * mi/mi-cmd-var.c: Update.
508 * mi/mi-interp.c: Update.
509 * mi/mi-main.c: Update.
510 * nto-procfs.c: Update.
511 * ppc-linux-tdep.c: Update.
512 * procfs.c: Update.
513 * python/py-inferior.c: Update.
514 * python/py-record-btrace.c: Update.
515 * python/py-record.c: Update.
516 * ravenscar-thread.c: Update.
517 * regcache.c: Update.
518 * remote-sim.c: Update.
519 * remote.c: Update.
520 * sol-thread.c: Update.
521 * solib.c: Update.
522 * target.c: Update.
523 * tui/tui-stack.c: Update.
524 * varobj.c: Update.
525 * windows-nat.c: Update.
526 * windows-tdep.c: Update.
527
26a57c92
TT
5282018-07-03 Tom Tromey <tom@tromey.com>
529
530 * common/ptid.c (ptid_match): Remove.
531 * common/ptid.h (ptid_match): Don't declare.
532 * fbsd-nat.c: Update.
533 * infcmd.c: Update.
534 * infrun.c: Update.
535 * linux-nat.c: Update.
536 * record-btrace.c: Update.
537 * regcache.c: Update.
538 * remote.c: Update.
539
d2a107e3
TT
5402018-07-03 Tom Tromey <tom@tromey.com>
541
542 * common/ptid.c (ptid_tid_p): Remove.
543 * common/ptid.h (ptid_tid_p): Don't declare.
544 * sol-thread.c: Update.
545
15a9e13e
TT
5462018-07-03 Tom Tromey <tom@tromey.com>
547
548 * common/ptid.c (ptid_lwp_p): Remove.
549 * common/ptid.h (ptid_lwp_p): Don't declare.
550 * fbsd-nat.c: Update.
551 * linux-nat.c: Update.
552 * nat/linux-procfs.c: Update.
553 * nat/x86-linux-dregs.c: Update.
554 * sol-thread.c: Update.
555
0e998d96
TT
5562018-07-03 Tom Tromey <tom@tromey.com>
557
558 * common/ptid.c (ptid_is_pid): Remove.
559 * common/ptid.h (ptid_is_pid): Don't declare.
560 * infrun.c: Update.
561 * linux-nat.c: Update.
562 * mi/mi-interp.c: Update.
563 * remote.c: Update.
564 * thread.c: Update.
565
cc6bcb54
TT
5662018-07-03 Tom Tromey <tom@tromey.com>
567
568 * common/ptid.c (ptid_get_tid): Remove.
569 * common/ptid.h (ptid_get_tid): Don't declare.
570 * ada-tasks.c: Update.
571 * aix-thread.c: Update.
572 * bsd-uthread.c: Update.
573 * darwin-nat.c: Update.
574 * fbsd-nat.c: Update.
575 * i386-darwin-nat.c: Update.
576 * infrun.c: Update.
577 * linux-tdep.c: Update.
578 * nto-procfs.c: Update.
579 * ppc-ravenscar-thread.c: Update.
580 * python/py-infthread.c: Update.
581 * ravenscar-thread.c: Update.
582 * sol-thread.c: Update.
583 * sparc-ravenscar-thread.c: Update.
584 * windows-nat.c: Update.
585
e38504b3
TT
5862018-07-03 Tom Tromey <tom@tromey.com>
587
588 * common/ptid.c (ptid_get_lwp): Remove.
589 * common/ptid.h (ptid_get_lwp): Don't declare.
590 * aarch64-linux-nat.c: Update.
591 * ada-tasks.c: Update.
592 * aix-thread.c: Update.
593 * amd64-linux-nat.c: Update.
594 * arm-linux-nat.c: Update.
595 * corelow.c: Update.
596 * fbsd-nat.c: Update.
597 * fbsd-tdep.c: Update.
598 * gnu-nat.c: Update.
599 * i386-cygwin-tdep.c: Update.
600 * i386-gnu-nat.c: Update.
601 * i386-linux-nat.c: Update.
602 * ia64-linux-nat.c: Update.
603 * inf-ptrace.c: Update.
604 * infrun.c: Update.
605 * linux-fork.c: Update.
606 * linux-nat.c: Update.
607 * linux-tdep.c: Update.
608 * linux-thread-db.c: Update.
609 * mips-linux-nat.c: Update.
610 * nat/aarch64-linux-hw-point.c: Update.
611 * nat/aarch64-linux.c: Update.
612 * nat/linux-btrace.c: Update.
613 * nat/linux-osdata.c: Update.
614 * nat/linux-procfs.c: Update.
615 * nat/x86-linux-dregs.c: Update.
616 * obsd-nat.c: Update.
617 * ppc-fbsd-nat.c: Update.
618 * ppc-linux-nat.c: Update.
619 * procfs.c: Update.
620 * python/py-infthread.c: Update.
621 * ravenscar-thread.c: Update.
622 * remote.c: Update.
623 * s390-linux-nat.c: Update.
624 * sol-thread.c: Update.
625 * sol2-tdep.c: Update.
626 * spu-linux-nat.c: Update.
627 * x86-linux-nat.c: Update.
628 * xtensa-linux-nat.c: Update.
629
e99b03dc
TT
6302018-07-03 Tom Tromey <tom@tromey.com>
631
632 * common/ptid.c (ptid_get_pid): Remove.
633 * common/ptid.h (ptid_get_pid): Don't declare.
634 * aarch64-linux-nat.c: Update.
635 * ada-lang.c: Update.
636 * aix-thread.c: Update.
637 * alpha-bsd-nat.c: Update.
638 * amd64-fbsd-nat.c: Update.
639 * amd64-linux-nat.c: Update.
640 * arm-linux-nat.c: Update.
641 * arm-nbsd-nat.c: Update.
642 * auxv.c: Update.
643 * break-catch-syscall.c: Update.
644 * breakpoint.c: Update.
645 * bsd-uthread.c: Update.
646 * corelow.c: Update.
647 * ctf.c: Update.
648 * darwin-nat.c: Update.
649 * fbsd-nat.c: Update.
650 * fbsd-tdep.c: Update.
651 * gcore.c: Update.
652 * gnu-nat.c: Update.
653 * hppa-nbsd-nat.c: Update.
654 * hppa-obsd-nat.c: Update.
655 * i386-fbsd-nat.c: Update.
656 * ia64-linux-nat.c: Update.
657 * inf-ptrace.c: Update.
658 * infcmd.c: Update.
659 * inferior.c: Update.
660 * inferior.h: Update.
661 * inflow.c: Update.
662 * infrun.c: Update.
663 * linux-fork.c: Update.
664 * linux-nat.c: Update.
665 * linux-tdep.c: Update.
666 * linux-thread-db.c: Update.
667 * m68k-bsd-nat.c: Update.
668 * mi/mi-interp.c: Update.
669 * mi/mi-main.c: Update.
670 * mips-linux-nat.c: Update.
671 * mips-nbsd-nat.c: Update.
672 * mips64-obsd-nat.c: Update.
673 * nat/aarch64-linux-hw-point.c: Update.
674 * nat/aarch64-linux.c: Update.
675 * nat/linux-btrace.c: Update.
676 * nat/linux-osdata.c: Update.
677 * nat/linux-procfs.c: Update.
678 * nat/x86-linux-dregs.c: Update.
679 * nto-procfs.c: Update.
680 * obsd-nat.c: Update.
681 * ppc-linux-nat.c: Update.
682 * ppc-nbsd-nat.c: Update.
683 * ppc-obsd-nat.c: Update.
684 * proc-service.c: Update.
685 * procfs.c: Update.
686 * python/py-inferior.c: Update.
687 * python/py-infthread.c: Update.
688 * ravenscar-thread.c: Update.
689 * record.c: Update.
690 * remote-sim.c: Update.
691 * remote.c: Update.
692 * rs6000-nat.c: Update.
693 * s390-linux-nat.c: Update.
694 * sh-nbsd-nat.c: Update.
695 * sol-thread.c: Update.
696 * sparc-nat.c: Update.
697 * sparc64-tdep.c: Update.
698 * spu-linux-nat.c: Update.
699 * spu-tdep.c: Update.
700 * target-debug.h: Update.
701 * target.c: Update.
702 * thread.c: Update.
703 * tid-parse.c: Update.
704 * tracefile-tfile.c: Update.
705 * vax-bsd-nat.c: Update.
706 * windows-nat.c: Update.
707 * x86-linux-nat.c: Update.
708 * x86-nat.c: Update.
709
f2907e49
TT
7102018-07-03 Tom Tromey <tom@tromey.com>
711
712 * common/ptid.c (pid_to_ptid): Remove.
713 * common/ptid.h (pid_to_ptid): Don't declare.
714 * aix-thread.c: Update.
715 * arm-linux-nat.c: Update.
716 * common/ptid.c: Update.
717 * common/ptid.h: Update.
718 * corelow.c: Update.
719 * ctf.c: Update.
720 * darwin-nat.c: Update.
721 * fbsd-nat.c: Update.
722 * fork-child.c: Update.
723 * gnu-nat.c: Update.
724 * go32-nat.c: Update.
725 * inf-ptrace.c: Update.
726 * infcmd.c: Update.
727 * inferior.c: Update.
728 * infrun.c: Update.
729 * linux-fork.c: Update.
730 * linux-nat.c: Update.
731 * nat/aarch64-linux-hw-point.c: Update.
732 * nat/fork-inferior.c: Update.
733 * nat/x86-linux-dregs.c: Update.
734 * nto-procfs.c: Update.
735 * obsd-nat.c: Update.
736 * procfs.c: Update.
737 * progspace.c: Update.
738 * remote.c: Update.
739 * rs6000-nat.c: Update.
740 * s390-linux-nat.c: Update.
741 * sol-thread.c: Update.
742 * spu-linux-nat.c: Update.
743 * target.c: Update.
744 * top.c: Update.
745 * tracefile-tfile.c: Update.
746 * windows-nat.c: Update.
747
fd79271b
TT
7482018-07-03 Tom Tromey <tom@tromey.com>
749
750 * common/ptid.h (ptid_build): Don't declare.
751 * common/ptid.c (ptid_build): Remove.
752 * aix-thread.c: Update.
753 * bsd-kvm.c: Update.
754 * bsd-uthread.c: Update.
755 * common/agent.c: Update.
756 * common/ptid.c: Update.
757 * common/ptid.h: Update.
758 * corelow.c: Update.
759 * darwin-nat.c: Update.
760 * fbsd-nat.c: Update.
761 * gnu-nat.c: Update.
762 * linux-fork.c: Update.
763 * linux-nat.c: Update.
764 * linux-thread-db.c: Update.
765 * nat/linux-osdata.c: Update.
766 * nat/linux-procfs.c: Update.
767 * nto-procfs.c: Update.
768 * obsd-nat.c: Update.
769 * proc-service.c: Update.
770 * procfs.c: Update.
771 * ravenscar-thread.c: Update.
772 * remote-sim.c: Update.
773 * remote.c: Update.
774 * sol-thread.c: Update.
775 * target.c: Update.
776 * windows-nat.c: Update.
777
057302ce
TT
7782018-07-03 Tom Tromey <tom@tromey.com>
779
780 * infrun.c (follow_exec): Use exit_inferior_silent.
781 * inferior.c (exit_inferior_num_silent): Remove.
782 * inferior.h (exit_inferior_num_silent): Don't declare.
783
a50c11c6
TT
7842018-07-03 Tom Tromey <tom@tromey.com>
785
786 PR cli/23340:
787 * darwin-nat.c (darwin_attach_pid): Reset inferior and
788 inferior_ptid on error.
789
471b9d15
MR
7902018-07-02 Maciej W. Rozycki <macro@mips.com>
791 Simon Marchi <simon.marchi@polymtl.ca>
792
793 PR tdep/8282
794 * disasm.h (gdb_disassembler): Add
795 `m_disassembler_options_holder'. member
796 * disasm.c (get_all_disassembler_options): New function.
797 (gdb_disassembler::gdb_disassembler): Use it.
798 (gdb_buffered_insn_length_init_dis): Likewise.
799 (gdb_buffered_insn_length): Adjust accordingly.
800 (set_disassembler_options): Handle options with arguments.
801 (show_disassembler_options_sfunc): Likewise. Add a leading new
802 line if showing options with descriptions.
803 (disassembler_options_completer): Adapt to using the
804 `disasm_options_and_args_t' structure.
805 * mips-tdep.c (mips_disassembler_options): New variable.
806 (mips_disassembler_options_o32): Likewise.
807 (mips_disassembler_options_n32): Likewise.
808 (mips_disassembler_options_n64): Likewise.
809 (gdb_print_insn_mips): Don't set `disassembler_options'.
810 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
811 functions.
812 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
813 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
814 `gdbarch_disassembler_options_implicit' and
815 `gdbarch_valid_disassembler_options'.
816 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
817 `disasm_options_and_args_t' structure.
818 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
819 method.
820 (valid_disassembler_options): Switch from `disasm_options_t' to
821 the `disasm_options_and_args_t' structure.
822 * NEWS: Document `set disassembler-options' support for the MIPS
823 target.
824 * gdbarch.h: Regenerate.
825 * gdbarch.c: Regenerate.
826
41823f29
SH
8272018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
828
829 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
830
41206e32
JB
8312018-06-29 Joel Brobecker <brobecker@adacore.com>
832
833 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
834 parameter in call to amd64_target_description.
835 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
836 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
837 (amd64fbsd_init_abi): Likewise.
838 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
839 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
840 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
841 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
842
de52b960
PA
8432018-06-29 Pedro Alves <palves@redhat.com>
844
845 * gdb/amd64-tdep.h (amd64_create_target_description): Add
846 "segments" parameter.
847 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
848 (_initialize_amd64_tdep): Update call to
849 amd64_create_target_description.
850 (amd64_target_description): Add "segments" parameter. Adjust
851 the implementation to use it.
852 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
853 call to amd64_create_target_description.
854 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
855 * gdb/arch/amd64.h (amd64_create_target_description): Add
856 "segments" register.
857 * gdb/arch/amd64.c (amd64_create_target_description): Add
858 "segments" parameter. Call create_feature_i386_64bit_segments
859 only if SEGMENTS is true.
860 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
861 call to amd64_create_target_description.
862
75acb486
PA
8632018-06-29 Pedro Alves <palves@redhat.com>
864
865 * thread.c (thread_target_id_str): New, factored out from ...
866 (print_thread_info_1): ... here. Use it to compute the max
867 "Target Id" column width.
868
c76a8ea3
PA
8692018-06-29 Pedro Alves <palves@redhat.com>
870
871 * remote.c (remote_target::extra_thread_info): Delete
872 'display_buf' and 'n' locals. from the cache, regardless of
873 packet mechanims is in use. Use cache for qThreadExtra and qP
874 methods too.
875
cd2bb709
PA
8762018-06-29 Pedro Alves <palves@redhat.com>
877
878 * blockframe.c (find_pc_sect_containing_function): New function.
879 * breakpoint.c (print_breakpoint_location): Don't call
880 find_pc_sect_function.
881 * linespec.c (create_sals_line_offset): Record the location's
882 symbol in the sal.
883 * linespec.c (convert_address_location_to_sals): Fill in sal's
884 symbol with find_pc_sect_containing_function.
885 * symtab.c (find_function_start_sal): Rename to ...
886 (find_function_start_sal_1): ... this.
887 (find_function_start_sal): Reimplement as wrapper around
888 find_function_start_sal_1, and use
889 find_pc_sect_containing_function to fill in the sal's symbol.
890 (find_function_start_sal(symbol*, bool)): Adjust.
891 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
892 comments.
893 (find_pc_sect_containing_function): Declare.
894
991ff292
PA
8952018-06-29 Pedro Alves <palves@redhat.com>
896
897 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
898 true if the the location has no symbol.
899
44cee4fd
TT
9002018-06-28 Tom Tromey <tom@tromey.com>
901
902 * NEWS: Mention --enable-codesign.
903 * silent-rules.mk (ECHO_SIGN): New variable.
904 * configure.ac: Add --enable-codesign.
905 * configure: Rebuild.
906 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
907 (gdb$(EXEEXT)): Optionally invoke codesign.
908
f2ffa92b
PA
9092018-06-28 Pedro Alves <palves@redhat.com>
910
911 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
912 comments.
913 (switch_to_thread_no_regs): Adjust comment.
914 * infcmd.c (stop_pc): Delete.
915 (post_create_inferior, info_program_command): Replace references
916 to stop_pc with references to thread_info->suspend.stop_pc.
917 * inferior.h (stop_pc): Delete declaration.
918 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
919 (handle_inferior_event_1, handle_signal_stop)
920 (process_event_stop_test, keep_going_stepped_thread)
921 (handle_step_into_function, handle_step_into_function_backward)
922 (print_stop_location): Replace references to stop_pc with
923 references to thread_info->suspend.stop_pc.
924 (struct infcall_suspend_state) <stop_pc>: Delete field.
925 (save_infcall_suspend_state, restore_infcall_suspend_state):
926 Remove references to inf_stat->stop_pc.
927 * linux-fork.c (fork_load_infrun_state): Likewise.
928 * record-btrace.c (record_btrace_set_replay): Likewise.
929 * record-full.c (record_full_goto_entry): Likewise.
930 * remote.c (print_one_stopped_thread): Likewise.
931 * target.c (target_resume): Extend comment.
932 * thread.c (set_executing_thread): New.
933 (set_executing): Use it.
934 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
935 Remove references to stop_pc.
936
ecdc3a72
PA
9372018-06-28 Pedro Alves <palves@redhat.com>
938
939 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
940 Moving fetching stop_pc until after ecs->event_thread is refreshed.
941
d95d3aef
TT
9422018-06-28 Tom Tromey <tom@tromey.com>
943
944 * coffread.c (coff_symfile_finish): Update.
945 * xcoffread.c (xcoff_symfile_finish): Update.
946 * elfread.c (elf_symfile_finish): Update.
947 * symfile.h (dwarf2_free_objfile): Don't declare.
948 * dwarf2read.c (_initialize_dwarf2_read): Use
949 register_objfile_data_with_cleanup.
950 (dwarf2_free_objfile): Now static. Change signature.
951
291f9a96
PT
9522018-06-28 Petr Tesarik <ptesarik@suse.cz>
953
954 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
955 option "-o" to add-symbol-file-load to add an offset to each
956 section's load address.
957 * symfile.c (set_objfile_default_section_offset): New function.
958
d81a3eaf
PT
9592018-06-28 Petr Tesarik <ptesarik@suse.cz>
960
961 * symfile.c (add_symbol_file_command): Make sure that sections
962 with the same name are sorted in the same order.
963
ed6dfe51
PT
9642018-06-28 Petr Tesarik <ptesarik@suse.cz>
965
966 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
967 require the second argument. If omitted, load sections at the
968 addresses specified in the file.
969
d4d429d5
PT
9702018-06-28 Petr Tesarik <ptesarik@suse.cz>
971
972 * symfile.c (symbol_file_command, symbol_file_add_main_1)
973 (_initialize_symfile): Add option "-o" to symbol-file to add an
974 offset to each section of the symbol file.
975
39b27ab6
PT
9762018-06-28 Petr Tesarik <ptesarik@suse.cz>
977
978 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
979
41827fc3
TT
9802018-06-27 Tom Tromey <tom@tromey.com>
981
982 * stack.c (_initialize_stack): Update "func" help text.
983
0c6aef22
TT
9842018-06-27 Tom Tromey <tom@tromey.com>
985
986 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
987 std::vector.
988 (unwind_infopy_str, pyuw_create_unwind_info)
989 (unwind_infopy_add_saved_register, pyuw_sniffer)
990 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
991 Update.
992 (struct saved_reg): Add constructor.
993 <value>: Now a gdbpy_ref<>.
994
63177289
TT
9952018-06-27 Tom Tromey <tom@tromey.com>
996
997 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
998
e76f78a0
SM
9992018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1000
1001 * gdb-gdb.py.in: Format using autopep8.
1002
9a14af7b
SM
10032018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1004
1005 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1006 (type_lookup_function): Recognize CORE_ADDR values.
1007
189366cd
SM
10082018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1009
1010 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1011 print tag_name.
1012
68ad5fb9
SM
10132018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1014
1015 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1016 <__lt__>: Add.
1017
141ec9f6
SM
10182018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1019
1020 * gdb-gdb.py: Move to...
1021 * gdb-gdb.py.in: ... here.
1022 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1023 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1024 dependencies.
1025 (distclean): Remove gdb-gdb.py when cleaning.
1026 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1027 * configure: Re-generate.
1028
4c4e7ad4
PA
10292018-06-27 Pedro Alves <palves@redhat.com>
1030
1031 * proc-service.c (get_ps_regcache): New.
1032 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1033 (ps_lsetfpregs): Use it.
1034
7ab6656f
OJ
10352018-06-27 Omair Javaid <omair.javaid@linaro.org>
1036
1037 PR gdb/21695
1038 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1039 (dwarf_decode_lines_1): Adjust.
1040
bd583225
SM
10412018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1042
1043 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1044 override.
1045 <info_proc>: Likewise.
1046
9a325b7b
JB
10472018-06-26 Joel Brobecker <brobecker@adacore.com>
1048
1049 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1050 to windows_fetch_one_register, and only handle the case of
1051 fetching one register. Move the code that reloads the context
1052 and iterates over all registers if R is negative to...
1053 (windows_nat_target::fetch_registers): ... here.
1054 (do_windows_store_inferior_registers): Rename to
1055 windows_store_one_register, and only handle the case of storing
1056 one register. Move the code that handles the case where r is
1057 negative to...
1058 (windows_nat_target::store_registers) ... here.
1059
a33ccfc7
TT
10602018-06-26 Tom Tromey <tom@tromey.com>
1061
1062 PR rust/22574:
1063 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1064 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1065 Update.
1066 (rust_internal_print_type): Add podata parameter.
1067 (rust_print_type): Update.
1068
e0c547d1
TT
10692018-06-26 Tom Tromey <tom@tromey.com>
1070
1071 * typeprint.h (struct print_offset_data) <update, finish,
1072 maybe_print_hole>: New methods.
1073 <indentation>: New constant.
1074 * typeprint.c (print_offset_data::indentation): Define.
1075 (print_offset_data::maybe_print_hole, print_offset_data::update)
1076 (print_offset_data::finish): Move from c-typeprint.c and rename.
1077 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1078 (print_spaces_filtered_with_print_options): Update.
1079 (c_print_type_union_field_offset, maybe_print_hole)
1080 (c_print_type_struct_field_offset): Move to typeprint.c and
1081 rename.
1082 (c_type_print_base_struct_union): Update.
1083
75cbc781
PA
10842018-06-25 Pedro Alves <palves@redhat.com>
1085
1086 * gdbthread.h (thread_info_ref, delete_thread)
1087 (delete_thread_silent, first_thread_of_inferior)
1088 (any_thread_of_inferior, switch_to_thread)
1089 (enable_thread_stack_temporaries)
1090 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1091 (get_last_thread_stack_temporary)
1092 (value_in_thread_stack_temporaries, can_access_registers_thread):
1093 Spell out "struct thread_info" instead of just "thread_info".
1094 * inferior.h (notice_new_inferior): Likewise.
1095
b7a08269
PA
10962018-06-25 Pedro Alves <palves@redhat.com>
1097
1098 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1099 pass thread_info pointer to delete_thread.
1100 (windows_nat_target::detach): Pass inferior pointer to
1101 detach_inferior.
1102 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1103 delete_thread.
1104 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1105 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1106 and pass a thread_info pointer to delete_thread.
1107 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1108 pass thread_info pointer to delete_thread.
1109 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1110 delete_thread_silent call.
1111 * procfs.c (procfs_target::detach): Pass inferior pointer to
1112 detach_inferior.
1113 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1114 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1115 delete_thread_silent call.
1116 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1117 pass thread_info pointer to delete_thread.
1118 (windows_nat_target::detach): Pass inferior pointer to
1119 delete_inferior.
1120
8e7767e3
AH
11212018-06-22 Alan Hayward <alan.hayward@arm.com>
1122
1123 * regcache.c (readable_regcache::read_part): Fix asserts.
1124 (reg_buffer::raw_collect_part): New function.
1125 (regcache::write_part): Fix asserts.
1126 (reg_buffer::raw_supply_part): New function.
1127 (regcache::transfer_regset_register): New helper function.
1128 (regcache::transfer_regset): Call new functions.
1129 (regcache_supply_regset): Use gdb_byte*.
1130 (regcache::supply_regset): Likewise.
1131 (regcache_collect_regset): Likewise.
1132 (regcache::collect_regset): Likewise.
1133 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1134 (reg_buffer::raw_supply_part): Likewise.
1135 (regcache::transfer_regset_register): Likewise.
1136 (regcache::transfer_regset): Use gdb_byte*.
1137
bfd60e34
AH
11382018-06-22 Alan Hayward <alan.hayward@arm.com>
1139
1140 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1141
00431a78
PA
11422018-06-21 Pedro Alves <palves@redhat.com>
1143
1144 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1145 instead of a ptid_t. All callers adjusted.
1146 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1147 adjusted.
1148 (print_ada_task_info, display_current_task_id, task_command_1):
1149 Adjust.
1150 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1151 inferior_thread.
1152 (breakpoint_kind): Adjust.
1153 (remove_breakpoints_pid): Rename to ...
1154 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1155 pointer. All callers adjusted.
1156 (bpstat_clear_actions): Use inferior_thread.
1157 (get_bpstat_thread): New.
1158 (bpstat_do_actions): Use it.
1159 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1160 to take a thread_info pointer. All callers adjusted.
1161 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1162 (breakpoint_re_set_thread): Use inferior_thread.
1163 * breakpoint.h (struct inferior): Forward declare.
1164 (bpstat_stop_status): Update.
1165 (remove_breakpoints_pid): Delete.
1166 (remove_breakpoints_inf): New.
1167 * bsd-uthread.c (bsd_uthread_target::wait)
1168 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1169 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1170 (maint_btrace_packet_history_cmd)
1171 (maint_btrace_clear_packet_history_cmd): Adjust.
1172 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1173 inferior_thread.
1174 * cli/cli-interp.c: Include "inferior.h".
1175 * common/refcounted-object.h (struct
1176 refcounted_object_ref_policy): New.
1177 * compile/compile-object-load.c: Include gdbthread.h.
1178 (store_regs): Use inferior_thread.
1179 * corelow.c (core_target::close): Use current_inferior.
1180 (core_target_open): Adjust to use first_thread_of_inferior and use
1181 the current inferior.
1182 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1183 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1184 <thread>: ... this new field. All references adjusted.
1185 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1186 Take a thread_info pointer instead of a ptid_t.
1187 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1188 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1189 thread_info pointer instead of a ptid_t.
1190 * elfread.c: Include "inferior.h".
1191 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1192 Use inferior_thread.
1193 * eval.c (evaluate_subexp): Likewise.
1194 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1195 inferior_thread.
1196 * gdb_proc_service.h (struct thread_info): Forward declare.
1197 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1198 <thread>: ... this new field. All references adjusted.
1199 * gdbarch.h, gdbarch.c: Regenerate.
1200 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1201 'thread' parameter. All implementations and callers adjusted.
1202 * gdbthread.h (thread_info) <set_running>: New method.
1203 (delete_thread, delete_thread_silent): Take a thread_info pointer
1204 instead of a ptid.
1205 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1206 (first_thread_of_process): Delete, replaced by ...
1207 (first_thread_of_inferior): ... this new function. All callers
1208 adjusted.
1209 (any_live_thread_of_process): Delete, replaced by ...
1210 (any_live_thread_of_inferior): ... this new function. All callers
1211 adjusted.
1212 (switch_to_thread, switch_to_no_thread): Declare.
1213 (is_executing): Delete.
1214 (enable_thread_stack_temporaries): Update comment.
1215 <enable_thread_stack_temporaries>: Take a thread_info pointer
1216 instead of a ptid_t. Incref the thread.
1217 <~enable_thread_stack_temporaries>: Decref the thread.
1218 <m_ptid>: Delete
1219 <m_thr>: New.
1220 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1221 (get_last_thread_stack_temporary)
1222 (value_in_thread_stack_temporaries, can_access_registers_thread):
1223 Take a thread_info pointer instead of a ptid_t. All callers
1224 adjusted.
1225 * infcall.c (get_call_return_value): Use inferior_thread.
1226 (run_inferior_call): Work with thread pointers instead of ptid_t.
1227 (call_function_by_hand_dummy): Work with thread pointers instead
1228 of ptid_t. Use thread_info_ref.
1229 * infcmd.c (proceed_thread_callback): Access thread's state
1230 directly.
1231 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1232 access thread's state directly.
1233 (continue_command): Use inferior_thread.
1234 (info_program_command): Use find_thread_ptid and access thread
1235 state directly.
1236 (proceed_after_attach_callback): Use thread state directly.
1237 (notice_new_inferior): Take a thread_info pointer instead of a
1238 ptid_t. All callers adjusted.
1239 (exit_inferior): Take an inferior pointer instead of a pid. All
1240 callers adjusted.
1241 (exit_inferior_silent): New.
1242 (detach_inferior): Delete.
1243 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1244 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1245 (detach_inferior_command, kill_inferior_command): Use
1246 find_inferior_id instead of valid_gdb_inferior_id and
1247 gdb_inferior_id_to_pid.
1248 (inferior_command): Use inferior and thread pointers.
1249 * inferior.h (struct thread_info): Forward declare.
1250 (notice_new_inferior): Take a thread_info pointer instead of a
1251 ptid_t. All callers adjusted.
1252 (detach_inferior): Delete declaration.
1253 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1254 instead of a pid. All callers adjusted.
1255 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1256 (valid_gdb_inferior_id): Delete.
1257 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1258 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1259 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1260 ...
1261 <inf>: ... this new field.
1262 <step_ptid>: Delete, replaced by ...
1263 <step_thread>: ... this new field.
1264 (get_displaced_stepping_state): Take an inferior pointer instead
1265 of a pid. All callers adjusted.
1266 (displaced_step_in_progress_any_inferior): Adjust.
1267 (displaced_step_in_progress_thread): Take a thread pointer instead
1268 of a ptid_t. All callers adjusted.
1269 (displaced_step_in_progress, add_displaced_stepping_state): Take
1270 an inferior pointer instead of a pid. All callers adjusted.
1271 (get_displaced_step_closure_by_addr): Adjust.
1272 (remove_displaced_stepping_state): Take an inferior pointer
1273 instead of a pid. All callers adjusted.
1274 (displaced_step_prepare_throw, displaced_step_prepare)
1275 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1276 All callers adjusted.
1277 (start_step_over): Adjust.
1278 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1279 displaced step queue.
1280 (do_target_resume): Adjust.
1281 (fetch_inferior_event): Use inferior_thread.
1282 (context_switch, get_inferior_stop_soon): Take an
1283 execution_control_state pointer instead of a ptid_t. All callers
1284 adjusted.
1285 (switch_to_thread_cleanup): Delete.
1286 (stop_all_threads): Use scoped_restore_current_thread.
1287 * inline-frame.c: Include "gdbthread.h".
1288 (inline_state) <inline_state>: Take a thread pointer instead of a
1289 ptid_t. All callers adjusted.
1290 <ptid>: Delete, replaced by ...
1291 <thread>: ... this new field.
1292 (find_inline_frame_state): Take a thread pointer instead of a
1293 ptid_t. All callers adjusted.
1294 (skip_inline_frames, step_into_inline_frame)
1295 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1296 pointer instead of a ptid_t. All callers adjusted.
1297 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1298 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1299 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1300 pointers directly.
1301 * linux-nat.c (get_detach_signal): Likewise.
1302 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1303 (thread_db_notice_clone): Adjust.
1304 (thread_db_find_new_threads_silently)
1305 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1306 a thread pointer instead of a ptid_t. All callers adjusted.
1307 * mi/mi-cmd-var.c: Include "inferior.h".
1308 (mi_cmd_var_update_iter): Update to use thread pointers.
1309 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1310 inferior directly.
1311 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1312 out to ...
1313 (mi_output_running): ... this new function.
1314 (mi_on_resume_1): Adjust to use it.
1315 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1316 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1317 directly.
1318 (interrupt_thread_callback): : Adjust to use thread and inferior
1319 pointers.
1320 * proc-service.c: Include "gdbthread.h".
1321 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1322 * progspace-and-thread.c: Include "inferior.h".
1323 * progspace.c: Include "inferior.h".
1324 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1325 hold a reference to an inferior_object.
1326 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1327 inferior_thread.
1328 * python/py-inferior.c (struct inferior_object): Give the type a
1329 tag name instead of a typedef.
1330 (python_on_normal_stop): No need to check if the current thread is
1331 listed.
1332 (inferior_to_inferior_object): Change return type to
1333 inferior_object. All callers adjusted.
1334 (find_thread_object): Delete, bits factored out to ...
1335 (thread_to_thread_object): ... this new function.
1336 * python/py-infthread.c (create_thread_object): Use
1337 inferior_to_inferior_object.
1338 (thpy_is_stopped): Use thread pointer directly.
1339 (gdbpy_selected_thread): Use inferior_thread.
1340 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1341 field, replaced with ...
1342 <thread>: ... this new field. All users adjusted.
1343 (btpy_insn_or_gap_new): Drop const.
1344 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1345 callers adjusted.
1346 * python/py-record.c: Include "gdbthread.h".
1347 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1348 a ptid_t. All callers adjusted.
1349 (gdbpy_current_recording): Use inferior_thread.
1350 * python/py-record.h (recpy_record_object) <ptid>: Delete
1351 field, replaced with ...
1352 <thread>: ... this new field. All users adjusted.
1353 (recpy_element_object) <ptid>: Delete
1354 field, replaced with ...
1355 <thread>: ... this new field. All users adjusted.
1356 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1357 a ptid_t. All callers adjusted.
1358 * python/py-threadevent.c: Include "gdbthread.h".
1359 (get_event_thread): Use thread_to_thread_object.
1360 * python/python-internal.h (struct inferior_object): Forward
1361 declare.
1362 (find_thread_object, find_inferior_object): Delete declarations.
1363 (thread_to_thread_object, inferior_to_inferior_object): New
1364 declarations.
1365 * record-btrace.c: Include "inferior.h".
1366 (require_btrace_thread): Use inferior_thread.
1367 (record_btrace_frame_sniffer)
1368 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1369 (get_thread_current_frame): Use scoped_restore_current_thread and
1370 switch_to_thread.
1371 (get_thread_current_frame): Use thread pointer directly.
1372 (record_btrace_replay_at_breakpoint): Use thread's inferior
1373 pointer directly.
1374 * record-full.c: Include "inferior.h".
1375 * regcache.c: Include "gdbthread.h".
1376 (get_thread_arch_regcache): Use the inferior's address space
1377 directly.
1378 (get_thread_regcache, registers_changed_thread): New.
1379 * regcache.h (get_thread_regcache(thread_info *thread)): New
1380 overload.
1381 (registers_changed_thread): New.
1382 (remote_target) <remote_detach_1>: Swap order of parameters.
1383 (remote_add_thread): <remote_add_thread>: Return the new thread.
1384 (get_remote_thread_info(ptid_t)): New overload.
1385 (remote_target::remote_notice_new_inferior): Use thread pointers
1386 directly.
1387 (remote_target::process_initial_stop_replies): Use
1388 thread_info::set_running.
1389 (remote_target::remote_detach_1, remote_target::detach)
1390 (extended_remote_target::detach): Adjust.
1391 * stack.c (frame_show_address): Use inferior_thread.
1392 * target-debug.h (target_debug_print_thread_info_pp): New.
1393 * target-delegates.c: Regenerate.
1394 * target.c (default_thread_address_space): Delete.
1395 (memory_xfer_partial_1): Use current_inferior.
1396 (target_detach): Use current_inferior.
1397 (target_thread_address_space): Delete.
1398 (generic_mourn_inferior): Use current_inferior.
1399 * target.h (struct target_ops) <thread_address_space>: Delete.
1400 (target_thread_address_space): Delete.
1401 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1402 pointers directly.
1403 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1404 thread pointer instead of a ptid_t. Adjust all callers.
1405 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1406 (first_thread_of_process): Delete, replaced by ...
1407 (first_thread_of_inferior): ... this new function. All callers
1408 adjusted.
1409 (any_thread_of_process): Rename to ...
1410 (any_thread_of_inferior): ... this, and take an inferior pointer.
1411 (any_live_thread_of_process): Rename to ...
1412 (any_live_thread_of_inferior): ... this, and take an inferior
1413 pointer.
1414 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1415 (value_in_thread_stack_temporaries)
1416 (get_last_thread_stack_temporary): Take a thread pointer instead
1417 of a ptid_t. Adjust all callers.
1418 (thread_info::set_running): New.
1419 (validate_registers_access): Use inferior_thread.
1420 (can_access_registers_ptid): Rename to ...
1421 (can_access_registers_thread): ... this, and take a thread
1422 pointer.
1423 (print_thread_info_1): Adjust to compare thread pointers instead
1424 of ptids.
1425 (switch_to_no_thread, switch_to_thread): Make extern.
1426 (scoped_restore_current_thread::~scoped_restore_current_thread):
1427 Use m_thread pointer directly.
1428 (scoped_restore_current_thread::scoped_restore_current_thread):
1429 Use inferior_thread.
1430 (thread_command): Use thread pointer directly.
1431 (thread_num_make_value_helper): Use inferior_thread.
1432 * top.c (execute_command): Use inferior_thread.
1433 * tui/tui-interp.c: Include "inferior.h".
1434 * varobj.c (varobj_create): Use inferior_thread.
1435 (value_of_root_1): Use find_thread_global_id instead of
1436 global_thread_id_to_ptid.
1437
33bab475
AH
14382018-06-21 Alan Hayward <alan.hayward@arm.com>
1439
1440 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1441 possible.
1442 (regcache::write_part): Likewise.
1443 (readable_regcache::cooked_read_part): Update comment.
1444 (readable_regcache::cooked_write_part): Likewise.
1445 * regcache.h: (readable_regcache::read_part): Likewise.
1446 (regcache::write_part): Likewise.
1447
8363f9d5
RB
14482018-06-21 Richard Bunt <richard.bunt@arm.com>
1449 Dirk Schubert <dirk.schubert@arm.com>
1450
1451 * aarch64-linux-nat.c (post_attach): New.
1452 (aarch64_linux_nat_target::post_attach): Override post_attach to
1453 record the number of hardware debug registers.
1454
0d0b0ea2
TT
14552018-06-20 Tom Tromey <tom@tromey.com>
1456
1457 * python/py-param.c (add_setshow_generic): Make parameters const.
1458 (parmpy_init): Update.
1459
302abd6e
SM
14602018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1461
1462 * regcache.h (regcache_cooked_read_ftype): Rename to...
1463 (register_read_ftype): ...this, change type to function_view.
1464 (class reg_buffer) <save>: Remove src parameter.
1465 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1466 parameter non-const in first overload. Remove src parameter in
1467 second overload.
1468 * regcache.c (do_cooked_read): Remove.
1469 (readonly_detached_regcache::readonly_detached_regcache): Make
1470 parameter non-const, adjust call to other constructor.
1471 (reg_buffer::save): Remove src parameter.
1472 * frame.c (do_frame_register_read): Remove.
1473 (frame_save_as_regcache): Use lambda function.
1474 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1475 parameter to ppu2spu_data *.
1476 (ppu2spu_sniffer): Use lambda function.
1477
19f3f25f
SM
14782018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1479
1480 * record-full.c (record_full_target::insert_breakpoint): Remove
1481 "struct" keyword, add const.
1482
d0ac1c44
SM
14832018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1484
1485 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1486 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1487 * configure.ac: Remove AC_PREREQ, add missing quoting.
1488 * gnulib/configure.ac: Modernize usage of
1489 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1490 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1491 (AUTOMAKE_VERSION): Bump to 1.15.1.
1492 * configure: Re-generate.
1493 * config.in: Re-generate.
1494 * aclocal.m4: Re-generate.
1495 * gnulib/aclocal.m4: Re-generate.
1496 * gnulib/config.in: Re-generate.
1497 * gnulib/configure: Re-generate.
1498 * gnulib/import/Makefile.in: Re-generate.
1499
6ae50267
PA
15002018-06-19 Pedro Alves <palves@redhat.com>
1501
1502 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1503 (lookup_minimal_symbol_by_pc_section): ... here with
1504 gdb_assert_not_reached added.
1505
61b04dd0
PA
15062018-06-19 Pedro Alves <palves@redhat.com>
1507
1508 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1509 parameter with a block parameter. Compare location's block symbol
1510 with the frame's block instead of addresses.
1511 (skip_inline_frames): Pass the current block instead of the
1512 frame's address. Break out as soon as we determine the frame
1513 should not be skipped.
1514
f709fabb
TT
15152018-06-18 Tom Tromey <tom@tromey.com>
1516
1517 * solib-aix.c (solib_aix_get_section_offsets): Return
1518 unique_xmalloc_ptr.
1519 (solib_aix_solib_create_inferior_hook): Update.
1520
668eb2f0
TT
15212018-06-18 Tom Tromey <tom@tromey.com>
1522
1523 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1524
309822ca
TT
15252018-06-18 Tom Tromey <tom@tromey.com>
1526
1527 * solib-frv.c (frv_relocate_main_executable): Use
1528 unique_xmalloc_ptr.
1529 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1530 unique_xmalloc_ptr.
1531
06424eac
TT
15322018-06-18 Tom Tromey <tom@tromey.com>
1533
1534 * objfiles.h (inhibit_section_map_updates): Update.
1535 (resume_section_map_updates, resume_section_map_updates_cleanup):
1536 Remove.
1537 * solib-svr4.c (svr4_handle_solib_event): Update.
1538 * objfiles.c (inhibit_section_map_updates): Return
1539 scoped_restore_tmpl<int>.
1540 (resume_section_map_updates, resume_section_map_updates_cleanup):
1541 Remove.
1542
b4be9fad
TT
15432018-06-18 Tom Tromey <tom@tromey.com>
1544
1545 * valprint.h (read_string): Update.
1546 * valprint.c (read_string): Change type of "buffer".
1547 (val_print_string): Update.
1548 * python/py-value.c (valpy_string): Update.
1549 * language.h (struct language_defn) <la_get_string>: Change
1550 type of "buffer".
1551 (default_get_string, c_get_string): Update.
1552 * language.c (default_get_string): Change type of "buffer".
1553 * guile/scm-value.c (gdbscm_value_to_string): Update.
1554 * c-lang.c (c_get_string): Change type of "buffer".
1555
3f0dbd67
TT
15562018-06-18 Tom Tromey <tom@tromey.com>
1557
1558 * ser-mingw.c (struct pipe_state_destroyer): New.
1559 (pipe_state_up): New typedef.
1560 (cleanup_pipe_state): Remove.
1561 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1562
69d340c6
TT
15632018-06-18 Tom Tromey <tom@tromey.com>
1564
1565 * rust-lang.h (rust_yyerror): Don't declare.
1566 * rust-lang.c (rust_language_defn): Update.
1567 * rust-exp.y (yyerror): Now static.
1568 * parse.c (parse_exp_in_context_1): Update.
1569 * p-lang.h (p_yyerror): Don't declare.
1570 * p-lang.c (p_language_defn): Update.
1571 * p-exp.y (yyerror): Now static.
1572 * opencl-lang.c (opencl_language_defn): Update.
1573 * objc-lang.c (objc_language_defn): Update.
1574 * m2-lang.h (m2_yyerror): Don't declare.
1575 * m2-lang.c (m2_language_defn): Update.
1576 * m2-exp.y (yyerror): Now static.
1577 * language.h (struct language_defn) <la_error>: Remove.
1578 * language.c (unk_lang_error): Remove.
1579 (unknown_language_defn, auto_language_defn): Remove.
1580 * go-lang.h (go_yyerror): Don't declare.
1581 * go-lang.c (go_language_defn): Update.
1582 * go-exp.y (yyerror): Now static.
1583 * f-lang.h (f_yyerror): Don't declare.
1584 * f-lang.c (f_language_defn): Update.
1585 * f-exp.y (yyerror): Now static.
1586 * d-lang.h (d_yyerror): Don't declare.
1587 * d-lang.c (d_language_defn): Update.
1588 * d-exp.y (yyerror): Now static.
1589 * c-lang.h (c_yyerror): Don't declare.
1590 * c-lang.c (c_language_defn, cplus_language_defn)
1591 (asm_language_defn, minimal_language_defn): Update.
1592 * c-exp.y (yyerror): Now static.
1593 * ada-lang.h (ada_yyerror): Don't declare.
1594 * ada-lang.c (ada_language_defn): Update.
1595 * ada-exp.y (yyerror): Now static.
1596
e9902bfc
AH
15972018-06-18 Alan Hayward <alan.hayward@arm.com>
1598
1599 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1600 (store_sveregs_to_thread): Likewise.
1601 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1602 (aarch64_linux_store_inferior_registers): Likewise.
1603 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1604 function.
1605 (aarch64_sve_regs_copy_to_regcache): Likewise.
1606 (aarch64_sve_regs_copy_from_regcache): Likewise.
1607 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1608 declaration.
1609 (aarch64_sve_regs_copy_to_regcache): Likewise.
1610 (aarch64_sve_regs_copy_from_regcache): Likewise.
1611 (sve_context): Structure from Linux headers.
1612 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1613 (SVE_SIG_ZREG_SIZE): Likewise.
1614 (SVE_SIG_PREG_SIZE): Likewise.
1615 (SVE_SIG_FFR_SIZE): Likewise.
1616 (SVE_SIG_REGS_OFFSET): Likewise.
1617 (SVE_SIG_ZREGS_OFFSET): Likewise.
1618 (SVE_SIG_ZREG_OFFSET): Likewise.
1619 (SVE_SIG_ZREGS_SIZE): Likewise.
1620 (SVE_SIG_PREGS_OFFSET): Likewise.
1621 (SVE_SIG_PREG_OFFSET): Likewise.
1622 (SVE_SIG_PREGS_SIZE): Likewise.
1623 (SVE_SIG_FFR_OFFSET): Likewise.
1624 (SVE_SIG_REGS_SIZE): Likewise.
1625 (SVE_SIG_CONTEXT_SIZE): Likewise.
1626 (SVE_PT_REGS_MASK): Likewise.
1627 (SVE_PT_REGS_FPSIMD): Likewise.
1628 (SVE_PT_REGS_SVE): Likewise.
1629 (SVE_PT_VL_INHERIT): Likewise.
1630 (SVE_PT_VL_ONEXEC): Likewise.
1631 (SVE_PT_REGS_OFFSET): Likewise.
1632 (SVE_PT_FPSIMD_OFFSET): Likewise.
1633 (SVE_PT_FPSIMD_SIZE): Likewise.
1634 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1635 (SVE_PT_SVE_PREG_SIZE): Likewise.
1636 (SVE_PT_SVE_FFR_SIZE): Likewise.
1637 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1638 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1639 (__SVE_SIG_TO_PT): Likewise.
1640 (SVE_PT_SVE_OFFSET): Likewise.
1641 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1642 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1643 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1644 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1645 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1646 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1647 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1648 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1649 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1650 (SVE_PT_SVE_SIZE): Likewise.
1651 (SVE_PT_SIZE): Likewise.
1652 (HAS_SVE_STATE): New define.
1653
17a1cc89
AH
16542018-06-18 Alan Hayward <alan.hayward@arm.com>
1655
1656 * nat/aarch64-sve-linux-sigcontext.h: New file.
1657 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1658 new files.
1659 (SVE_VQ_MIN): Likewise.
1660 (SVE_VQ_MAX): Likewise.
1661 (SVE_VL_MIN): Likewise.
1662 (SVE_VL_MAX): Likewise.
1663 (SVE_NUM_ZREGS): Likewise.
1664 (SVE_NUM_PREGS): Likewise.
1665 (sve_vl_valid): Likewise.
1666 (struct user_sve_header): Likewise.
1667
7010835a
AB
16682018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1669 Richard Bunt <Richard.Bunt@arm.com>
1670
1671 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1672 was requested by GDB.
1673
479b3ef4
TV
16742018-06-15 Tom de Vries <tdevries@suse.de>
1675
1676 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1677
8199b8f4
SM
16782018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1679
1680 * gnulib/update-gnulib.sh: Print expected versions of
1681 autoconf/aclocal.
1682
55c748a1
SM
16832018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1684
1685 * arch-utils.c (default_type_align): Use type_length_units.
1686 * gdbtypes.c (type_align): Use type_length_units.
1687
87a8eca7
PW
16882018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1689
1690 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1691 of 'define' command.
1692
5d9a0608
TV
16932018-06-14 Tom de Vries <tdevries@suse.de>
1694
1695 PR cli/22573
1696 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1697 get_no_prettyformat_print_options.
1698
ab89b5a5
SM
16992018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1700
1701 * sparc-nat.h: Include target.h.
1702 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1703 <fetch_registers>: Remove this argument in function call.
1704 <store_registers>: Remove this argument in function call, remove
1705 extra semicolon.
1706 <low_forget_process>: Call sparc64_forget_process instead of
1707 sparc_forget_process.
1708
62c808ae
RO
17092018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1710
1711 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1712 (procfs_target::make_corefile_notes): Adjust to new
1713 target_read_alloc return type.
1714
1840d81a
AB
17152018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1716 Stephen Roberts <stephen.roberts@arm.com>
1717
1718 PR gdb/22882
1719 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1720 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1721 Move should_notify_stop local into more inner scope.
1722
9516f85a
AB
17232018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1724 Stephen Roberts <stephen.roberts@arm.com>
1725
1726 PR gdb/22882
1727 * infrun.c (resume_1): Add call to mark_async_event_handler.
1728
defd2172
AB
17292018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1730
1731 * infrun.c (do_target_wait): Change old version of $pc printed.
1732
7b23e087
SM
17332018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1734
1735 * dwarf2read.c (read_index_from_section): Rename to...
1736 (read_gdb_index_from_section): ... this, update all callers.
1737 (dwarf2_read_index): Rename to...
1738 (dwarf2_read_gdb_index): ... this, update all callers.
1739
69c67a0b
JDA
17402018-06-11 John David Anglin <danglin@gcc.gnu.org>
1741
1742 * gdb/hppa-linux-nat.c
1743 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1744 hppa_linux_nat_target::fetch_registers.
1745
65d4cada
AH
17462018-06-11 Alan Hayward <alan.hayward@arm.com>
1747
1748 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1749 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1750 (AARCH64_DWARF_SVE_FFR): Likewise.
1751 (AARCH64_DWARF_SVE_P0): Likewise.
1752 (AARCH64_DWARF_SVE_Z0): Likewise.
1753
f868386e
AH
17542018-06-11 Alan Hayward <alan.hayward@arm.com>
1755
1756 * common/common-regcache.h (raw_compare): New function.
1757 * regcache.c (regcache::raw_compare): Likewise.
1758 * regcache.h (regcache::raw_compare): New declaration.
1759
9c861883
AH
17602018-06-11 Alan Hayward <alan.hayward@arm.com>
1761
1762 * common/common-regcache.h (reg_buffer_common): New structure.
1763 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1764 (reg_buffer::raw_supply): Likewise.
1765 (reg_buffer::raw_supply_integer): Likewise.
1766 (reg_buffer::raw_supply_zeroed): Likewise.
1767 (reg_buffer::raw_collect): Likewise.
1768 (reg_buffer::raw_collect_integer): Likewise.
1769 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1770 (reg_buffer::raw_supply): Likewise.
1771 (reg_buffer::raw_supply_integer): Likewise.
1772 (reg_buffer::raw_supply_zeroed): Likewise.
1773 (reg_buffer::raw_collect): Likewise.
1774 (reg_buffer::raw_collect_integer): Likewise.
1775
953edf2b
TT
17762018-06-10 Tom Tromey <tom@tromey.com>
1777
1778 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1779 (class remote_state) <stop_reply_queue>: Now std::vector.
1780 (remote_state::~remote_state)
1781 (remote_target::stop_reply_queue_length): Update.
1782 (struct queue_iter_param, remove_child_of_pending_fork)
1783 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1784 (check_pending_event_prevents_wildcard_vcont_callback)
1785 (remove_stop_reply_for_inferior)
1786 (remove_stop_reply_of_remote_state)
1787 (remote_notif_remove_once_on_match)
1788 (stop_reply_match_ptid_and_ws)
1789 (remote_kill_child_of_pending_fork): Remove.
1790 (remote_target::remove_new_fork_children)
1791 (remote_target::check_pending_events_prevent_wildcard_vcont)
1792 (remote_target::discard_pending_stop_replies)
1793 (remote_target::discard_pending_stop_replies_in_queue)
1794 (remote_target::remote_notif_remove_queued_reply)
1795 (remote_target::queued_stop_reply)
1796 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1797 (remote_target::wait, remote_target::kill_new_fork_children)
1798 (remote_target::async): Update.
1799
1ddbba9d
TT
18002018-06-10 Tom Tromey <tom@tromey.com>
1801
1802 * record-full.c (record_full_arch_list_cleanups): Remove.
1803 (record_full_message): Use try/catch.
1804 (record_full_wait_cleanups): Remove.
1805 (record_full_wait_1): Use try/catch.
1806 (record_full_restore): Likewise.
1807
219605fd
TT
18082018-06-10 Tom Tromey <tom@tromey.com>
1809
1810 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1811 declare VEC. Add constructor.
1812 <in_target_beneath>: Now bool.
1813 (record_full_breakpoints): Now a std::vector, static.
1814 (record_full_sync_record_breakpoints)
1815 (record_full_init_record_breakpoints)
1816 (record_full_target::insert_breakpoint)
1817 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1818
71b73764
SM
18192018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1820
1821 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1822 * serial.c (serial_interface_lookup): Remove struct keyword.
1823
4360561f
TT
18242018-06-10 Tom Tromey <tom@tromey.com>
1825
1826 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1827 method.
1828 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1829 a method.
1830 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1831 method.
1832 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1833 "beneath" as a method.
1834 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1835 Use "beneath" as a method.
1836
d14b92bf
TT
18372018-06-10 Tom Tromey <tom@tromey.com>
1838
1839 * tracefile.c (struct trace_file_writer_deleter): New.
1840 <operator()>: Rename from trace_file_writer_xfree.
1841 (trace_file_writer_up): New typedef.
1842 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1843
835dcf92
SM
18442018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1845
1846 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1847 <m_registers, m_register_status>: Change type to
1848 std::unique_ptr.
1849 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1850 XCNEWVEC.
1851
aac0d564
SM
18522018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1853
1854 * common/common-regcache.h (enum register_status): Add
1855 underlying type "signed char".
1856 * regcache.h (reg_buffer) <m_register_status>: Change type to
1857 register_status *.
1858 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1859 register_status instead of signed char.
1860 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1861 (reg_buffer::get_register_status): Remove cast.
1862 (readable_regcache::raw_read): Remove cast.
1863 (readable_regcache::cooked_read): Remove cast.
1864
77ad7394
TT
18652018-06-09 Tom Tromey <tom@tromey.com>
1866
1867 * source.c (reverse_search_command, forward_search_command): Use
1868 scoped_fd.
1869
191cca63
TT
18702018-06-09 Tom Tromey <tom@tromey.com>
1871
1872 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1873 (serial_ops_list): Now static, std::vector.
1874 (serial_interface_lookup, serial_add_interface): Update.
1875
c5d0225d
TT
18762018-06-09 Tom Tromey <tom@tromey.com>
1877
1878 * dwarf2read.c (process_cu_includes): Update.
1879 (process_full_comp_unit): Update.
1880 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1881 std::vector.
1882
aeab5128
PK
18832018-06-08 Paul Koning <paul_koning@dell.com>
1884
1885 PR gdb/23252
1886
1887 * python/python.c (do_start_initialization):
1888 Avoid call to internal Python API.
1889 (init__gdb_module): New function.
1890
5045b3d7
GB
18912018-06-08 Gary Benson <gbenson@redhat.com>
1892
1893 * linux-thread-db.c (valprint.h): New include.
1894 (struct check_thread_db_info): New structure.
1895 (check_thread_db_on_load, tdb_testinfo): New static globals.
1896 (check_thread_db, check_thread_db_callback): New functions.
1897 (try_thread_db_load_1): Run integrity checks if requested.
1898 (maintenance_check_libthread_db): New function.
1899 (_initialize_thread_db): Register "maint check libthread-db"
1900 and "maint set/show check-libthread-db".
1901 * NEWS: Mention the above new commands.
1902
2f4f025f
TT
19032018-06-08 Tom Tromey <tom@tromey.com>
1904
1905 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1906 now a method.
1907
343b0027
TT
19082018-06-08 Tom Tromey <tom@tromey.com>
1909
1910 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1911
8dcc53b3
TT
19122018-06-08 Tom Tromey <tom@tromey.com>
1913
1914 * common/btrace-common.h (struct btrace_data): Add constructor,
1915 destructor, move assignment operator.
1916 <empty, clear, fini>: New methods.
1917 <format>: Initialize.
1918 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1919 (btrace_data_empty): Don't declare.
1920 * common/btrace-common.c (btrace_data_init): Remove.
1921 (btrace_data::fini): Rename from btrace_data_fini.
1922 (btrace_data::empty): Rename from btrace_data_empty.
1923 (btrace_data::clear): Rename from btrace_data_clear. Return
1924 bool.
1925 * btrace.h (make_cleanup_btrace_data): Don't declare.
1926 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1927 (parse_xml_btrace): Update.
1928 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1929 (maint_btrace_clear_packet_history_cmd): Update.
1930
a1740ee1
PA
19312018-06-07 Pedro Alves <palves@redhat.com>
1932
1933 * target.h (target_ops) <beneath>: Now a method. All references
1934 updated.
1935 (class target_stack): New.
1936 * target.c (g_target_stack): New.
1937 (g_current_top_target): Delete.
1938 (current_top_target): Get the top target out of g_target_stack.
1939 (target_stack::push, target_stack::unpush): New.
1940 (push_target, unpush_target): Reimplement.
1941 (target_is_pushed): Reimplement in terms of g_target_stack.
1942 (target_ops::beneath, target_stack::find_beneath): New.
1943
d6ca69cd
PA
19442018-06-07 Pedro Alves <palves@redhat.com>
1945
1946 * target.h (find_target_beneath): Delete declaration.
1947 * target.c (find_target_beneath): Delete definition.
1948 * aix-thread.c: All callers of find_target_beneath adjusted to
1949 call target_ops::beneath instead.
1950 * bsd-uthread.c: Likewise.
1951 * linux-thread-db.c: Likewise.
1952 * ravenscar-thread.c: Likewise.
1953 * sol-thread.c: Likewise.
1954 * spu-multiarch.c: Likewise.
1955
b6a8c27b
PA
19562018-06-07 Pedro Alves <palves@redhat.com>
1957
1958 * target.h (target_ops) <beneath>: Now a method. All references
1959 updated.
1960 (target_ops) <m_beneath>: New.
1961 * target.c (target_ops::beneath): New.
1962 * corelow.c: Adjust all references to target_ops::beneath.
1963 * linux-thread-db.c: Likewise.
1964 * make-target-delegates: Likewise.
1965 * record-btrace.c: Likewise.
1966 * record-full.c: Likewise.
1967 * remote.c: Likewise.
1968 * target.c: Likewise.
1969 * target-delegates.c: Regenerate.
1970
8b88a78e
PA
19712018-06-07 Pedro Alves <palves@redhat.com>
1972
1973 * target.h (target_stack): Delete.
1974 (current_top_target): Declare function.
1975 * target.c (target_stack): Delete.
1976 (g_current_top_target): New.
1977 (current_top_target): New function.
1978 * auxv.c: Use current_top_target instead of target_stack
1979 throughout.
1980 * avr-tdep.c: Likewise.
1981 * breakpoint.c: Likewise.
1982 * corefile.c: Likewise.
1983 * elfread.c: Likewise.
1984 * eval.c: Likewise.
1985 * exceptions.c: Likewise.
1986 * frame.c: Likewise.
1987 * gdbarch-selftests.c: Likewise.
1988 * gnu-v3-abi.c: Likewise.
1989 * ia64-tdep.c: Likewise.
1990 * ia64-vms-tdep.c: Likewise.
1991 * infcall.c: Likewise.
1992 * infcmd.c: Likewise.
1993 * infrun.c: Likewise.
1994 * linespec.c: Likewise.
1995 * linux-tdep.c: Likewise.
1996 * minsyms.c: Likewise.
1997 * ppc-linux-nat.c: Likewise.
1998 * ppc-linux-tdep.c: Likewise.
1999 * procfs.c: Likewise.
2000 * regcache.c: Likewise.
2001 * remote.c: Likewise.
2002 * rs6000-tdep.c: Likewise.
2003 * s390-linux-nat.c: Likewise.
2004 * s390-tdep.c: Likewise.
2005 * solib-aix.c: Likewise.
2006 * solib-darwin.c: Likewise.
2007 * solib-dsbt.c: Likewise.
2008 * solib-spu.c: Likewise.
2009 * solib-svr4.c: Likewise.
2010 * solib-target.c: Likewise.
2011 * sparc-tdep.c: Likewise.
2012 * sparc64-tdep.c: Likewise.
2013 * spu-tdep.c: Likewise.
2014 * symfile.c: Likewise.
2015 * symtab.c: Likewise.
2016 * target-descriptions.c: Likewise.
2017 * target-memory.c: Likewise.
2018 * target.c: Likewise.
2019 * target.h: Likewise.
2020 * tracefile-tfile.c: Likewise.
2021 * tracepoint.c: Likewise.
2022 * valops.c: Likewise.
2023 * valprint.c: Likewise.
2024 * value.c: Likewise.
2025 * windows-tdep.c: Likewise.
2026 * mi/mi-main.c: Likewise.
2027
c7110220
TT
20282018-06-07 Tom Tromey <tom@tromey.com>
2029
2030 * valprint.h (build_address_symbolic): Declare.
2031 * printcmd.c (print_address_symbolic): Update.
2032 (build_address_symbolic): Change "name" and "filename" to
2033 std::string.
2034 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2035 Update.
2036 * defs.h (build_address_symbolic): Remove declaration.
2037
63bad7b6
AH
20382018-06-07 Alan Hayward <alan.hayward@arm.com>
2039
2040 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2041 (aarch64_vnv_type): Add function.
2042 (aarch64_pseudo_register_name): Add V regs for SVE.
2043 (aarch64_pseudo_register_type): Likewise.
2044 (aarch64_pseudo_register_reggroup_p): Likewise.
2045 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2046 (aarch64_pseudo_read_value): Add V regs for SVE.
2047 (aarch64_pseudo_write_2): Use V0 offset for SVE
2048 (aarch64_pseudo_write): Add V regs for SVE.
2049 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2050
13e3c608
SDJ
20512018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2052
2053 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2054 (sve_vl_from_vq): Likewise.
2055
c61b06a1
TT
20562018-06-05 Tom Tromey <tom@tromey.com>
2057
2058 * cli/cli-cmds.c (show_version): Update.
2059 * top.c (print_gdb_version): Add "interactive" parameter.
2060 Update.
2061 * main.c (captured_main_1): Update.
2062 * top.h (print_gdb_version): Add "interactive" parameter and a
2063 comment.
2064
115f7325
DM
20652018-06-05 David Malcolm <dmalcolm@redhat.com>
2066
2067 * common/enum-flags.h: Add trailing semicolon to example in
2068 comment.
2069
eb6af809
TT
20702018-06-05 Tom Tromey <tom@tromey.com>
2071
2072 PR cli/12326:
2073 * NEWS: Add entry about pager.
2074 * utils.c (pagination_disabled_for_command): New global.
2075 (prompt_for_continue): Allow "c" response to prompt.
2076 (reinitialize_more_filter): Clear
2077 pagination_disabled_for_command.
2078 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2079
54d343a2
TT
20802018-06-04 Tom Tromey <tom@tromey.com>
2081
2082 * ada-lang.h (ada_lookup_symbol_list): Update.
2083 * ada-lang.c (resolve_subexp): Update.
2084 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2085 parameter.
2086 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2087 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2088 results parameter to std::vector.
2089 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2090 Update.
2091 * ada-exp.y (block_lookup): Update.
2092 (select_possible_type_sym): Change type of syms. Remove nsyms
2093 parameter.
2094 (write_var_or_type, write_name_assoc): Update.
2095
178d6a63
JB
20962018-06-04 Joel Brobecker <brobecker@adacore.com>
2097
2098 * windows-nat.c (windows_nat_target::xfer_partial): Return
2099 TARGET_XFER_E_IO if we need to delegate to the target beneath
2100 but BENEATH is NULL.
2101
baf00c2d
SM
21022018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2103
2104 * Makefile.in (config.status): Add configure.nat as a
2105 dependency.
2106
214b073c
TT
21072018-06-04 Tom Tromey <tom@tromey.com>
2108
2109 * cp-name-parser.y (cpname_state): Add method declarations.
2110 (HANDLE_QUAL): Update.
2111 (cpname_state::d_grab, cpname_state::fill_comp)
2112 (cpname_state::make_operator, cpname_state::make_dtor)
2113 (cpname_state::make_builtin_type, cpname_state::make_name)
2114 (cpname_state::d_qualify, cpname_state::d_int_type)
2115 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2116 (%union): Move earlier.
2117
62b74cb8
AH
21182018-06-04 Alan Hayward <alan.hayward@arm.com>
2119
2120 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2121
3c5cd5c3
AH
21222018-06-04 Alan Hayward <alan.hayward@arm.com>
2123
2124 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2125 (aarch64_pseudo_write_1): Likewise.
2126 (aarch64_pseudo_read_value): Use helper.
2127 (aarch64_pseudo_write): Likewise.
2128
59f413d5
PA
21292018-06-04 Pedro Alves <palves@redhat.com>
2130
2131 * darwin-nat.c (darwin_ops): Delete.
2132 (darwin_attach_pid): Use get_native_target.
2133
1332a140
AH
21342018-06-04 Alan Hayward <alan.hayward@arm.com>
2135
2136 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2137 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2138
ba2d2bb2
AH
21392018-06-04 Alan Hayward <alan.hayward@arm.com>
2140
2141 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2142 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2143 (aarch64_gdbarch_init): Check for SVE.
2144 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2145
21462018-06-04 Alan Hayward <alan.hayward@arm.com>
39bfb937
AH
2147
2148 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2149 * aarch64-tdep.h (aarch64_read_description): Likewise.
2150 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2151 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2152 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2153 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2154 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2155
41c60b4b
SM
21562018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2157
2158 * value.c (value_fetch_lazy_bitfield): New.
2159 (value_fetch_lazy_memory): New.
2160 (value_fetch_lazy_register): New.
2161 (value_fetch_lazy): Factor out to smaller functions.
2162
7b640f72
TT
21632018-06-01 Tom Tromey <tom@tromey.com>
2164
2165 * cp-name-parser.y (backslashable, represented): Now const.
2166
98e69eb3
TT
21672018-06-01 Tom Tromey <tom@tromey.com>
2168
2169 * cp-name-parser.y: Include parser-defs.h.
2170 (parser_fprintf): Remove declaration.
2171
49265499
TT
21722018-06-01 Tom Tromey <tom@tromey.com>
2173
2174 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2175 %parse-param.
2176 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2177 (global_result): Remove globals.
2178 (struct cpname_state): New.
2179 (yyparse): Don't declare.
2180 (yylex, yyerror): Move declarations after %union.
2181 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2182 (make_name): Add state parameter.
2183 Update all callers.
2184 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2185 parameter.
2186 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2187 Update.
2188 (yylex): Add lvalp, state parameters.
2189 (yyerror): Add state parameter.
2190 (cp_demangled_name_to_comp): Update.
2191
55b6c984
TT
21922018-06-01 Tom Tromey <tom@tromey.com>
2193
2194 * cp-name-parser.y (parser_fprintf): Declare.
2195 (GDB_YY_REMAP_PREFIX): Define.
2196 Include yy-remap.h. Don't redefine yy* identifiers.
2197
3513a6bb
TT
21982018-06-01 Tom Tromey <tom@tromey.com>
2199
2200 * python/py-type.c (typy_legacy_template_argument): Update.
2201 * cp-support.h (cp_demangled_name_to_comp): Update.
2202 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2203 parameter to be a "std::string *".
2204 (main): Update.
2205
e9cb46ab
L
22062018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2207
2208 * ada-lex.l: Include "diagnostics.h" instead of
2209 "common/diagnostics.h".
2210 * unittests/environ-selftests.c: Likewise.
2211 * common/diagnostics.h: Moved to ../include.
2212
8e817061
JB
22132018-06-01 Joel Brobecker <brobecker@adacore.com>
2214
2215 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2216 to language_mode_manual while calling breakpoint_re_set_one.
2217
a737d952
TT
22182018-06-01 Tom Tromey <tom@tromey.com>
2219
2220 * valops.c (value_cast_structs, destructor_name_p): Update.
2221 * symtab.c (gdb_mangle_name): Update.
2222 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2223 Update.
2224 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2225 (pascal_object_print_value_fields, pascal_object_print_value):
2226 Update.
2227 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2228 * linespec.c (find_methods): Update.
2229 * gdbtypes.h (type_name_no_tag): Remove.
2230 (type_name_or_error): Rename from type_name_no_tag_or_error.
2231 * gdbtypes.c (type_name_no_tag): Remove.
2232 (type_name_or_error): Rename from type_name_no_tag_or_error.
2233 (lookup_struct_elt_type, check_typedef): Update.
2234 * expprint.c (print_subexp_standard): Update.
2235 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2236 * d-namespace.c (d_lookup_nested_symbol): Update.
2237 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2238 (cp_print_class_member): Update.
2239 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2240 * completer.c (add_struct_fields): Update.
2241 * c-typeprint.c (cp_type_print_derivation_info)
2242 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2243 Update.
2244 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2245 (ada_prefer_type, ada_is_exception_sym): Update.
2246
e86ca25f
TT
22472018-06-01 Tom Tromey <tom@tromey.com>
2248
2249 * valops.c (enum_constant_from_type, value_namespace_elt)
2250 (value_maybe_namespace_elt): Update.
2251 * valarith.c (find_size_for_pointer_math): Update.
2252 * target-descriptions.c (make_gdb_type): Update.
2253 * symmisc.c (print_symbol): Update.
2254 * stabsread.c (define_symbol, read_type)
2255 (complain_about_struct_wipeout, add_undefined_type)
2256 (cleanup_undefined_types_1): Update.
2257 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2258 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2259 (rust_internal_print_type, rust_composite_type)
2260 (rust_evaluate_funcall, rust_evaluate_subexp)
2261 (rust_inclusive_range_type_p): Update.
2262 * python/py-type.c (typy_get_tag): Update.
2263 * p-typeprint.c (pascal_type_print_base): Update.
2264 * mdebugread.c (parse_symbol, parse_type): Update.
2265 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2266 Update.
2267 * guile/scm-type.c (gdbscm_type_tag): Update.
2268 * go-lang.c (sixg_string_p): Update.
2269 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2270 Update.
2271 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2272 (TYPE_TAG_NAME): Remove.
2273 * gdbtypes.c (type_name_no_tag): Simplify.
2274 (check_typedef, check_types_equal, recursive_dump_type)
2275 (copy_type_recursive, arch_composite_type): Update.
2276 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2277 in summary mode when needed.
2278 * eval.c (evaluate_funcall): Update.
2279 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2280 (process_structure_scope, read_enumeration_type)
2281 (read_namespace_type, read_module_type, determine_prefix): Update.
2282 * cp-support.c (inspect_type): Update.
2283 * coffread.c (process_coff_symbol, decode_base_type): Update.
2284 * c-varobj.c (c_is_path_expr_parent): Update.
2285 * c-typeprint.c (c_type_print_base_struct_union): Update.
2286 (c_type_print_base_1): Update. Print struct/class/union/enum in
2287 summary when using C language.
2288 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2289 (gen_maybe_namespace_elt): Update.
2290 * ada-lang.c (ada_type_name): Simplify.
2291 (empty_record, ada_template_to_fixed_record_type_1)
2292 (template_to_static_fixed_type)
2293 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2294
c1ec8cea
TT
22952018-06-01 Tom Tromey <tom@tromey.com>
2296
2297 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2298 c_print_type.
2299 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2300 (c_print_type): Update.
2301 (c_print_type): New overload.
2302 (c_type_print_varspec_prefix, c_type_print_args)
2303 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2304 (c_type_print_base_struct_union, c_type_print_base_1)
2305 (cp_type_print_method_args): Add "language" parameter.
2306 (c_type_print_base): Update.
2307 * c-lang.h (c_print_type): Add new overload.
2308
bc8453a7
TT
23092018-06-01 Tom Tromey <tom@tromey.com>
2310
2311 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2312 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2313
739e8682
AH
23142018-06-01 Alan Hayward <alan.hayward@arm.com>
2315
2316 * aarch64-tdep.c (aarch64_sve_register_names): New const
2317 var.
2318 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2319 (AARCH64_SVE_Z_REGS_NUM): New define.
2320 (AARCH64_SVE_P_REGS_NUM): Likewise.
2321 (AARCH64_SVE_NUM_REGS): Likewise.
2322
8a60efe7
UB
23232018-05-31 Uros Bizjak <ubizjak@gmail.com>
2324
2325 * nat/linux-ptrace.h [__alpha__]
2326 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2327 definitions.
2328
4b2dfa9d
MR
23292018-05-31 Maciej W. Rozycki <macro@mips.com>
2330
2331 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2332 the endianness selected.
2333 * NEWS: Document `set endian auto' mode operation update.
2334
122394f1
AH
23352018-05-31 Alan Hayward <alan.hayward@arm.com>
2336
2337 * Makefile.in: Add new header.
2338 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2339 (sve_vl_from_vg): Likewise.
2340 (sve_vq_from_vl): Likewise.
2341 (sve_vl_from_vq): Likewise.
2342 (sve_vq_from_vg): Likewise.
2343 (sve_vg_from_vq): Likewise.
2344 * configure.nat: Add new c file.
2345 * nat/aarch64-sve-linux-ptrace.c: New file.
2346 * nat/aarch64-sve-linux-ptrace.h: New file.
2347
95228a0d
AH
23482018-05-31 Alan Hayward <alan.hayward@arm.com>
2349
2350 * aarch64-linux-nat.c (aarch64_linux_read_description):
2351 Add parmeter zero.
2352 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2353 Likewise.
2354 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2355 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2356 (aarch64_gdbarch_init): Add parmeter zero.
2357 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2358 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2359 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2360 parmeter.
2361 * doc/gdb.texinfo: Describe SVE feature
2362 * features/aarch64-sve.c: New file.
2363
5969f0db
OJ
23642018-05-31 Omair Javaid <omair.javaid@linaro.org>
2365
2366 PR gdb/23210
2367 * gdbarch.sh (significant_addr_bit): Default to zero when
2368 not set by target architecture.
2369 * gdbarch.c: Re-generated.
2370 * utils.c (address_significant): Update.
2371
61367c61
JB
23722018-05-30 Joel Brobecker <brobecker@adacore.com>
2373
2374 * stack.c (func_command): Remove trailing newline in call to error.
2375
34a79281
SM
23762018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2377
2378 * regcache.h (regcache_raw_collect): Remove, update callers to
2379 use regcache::raw_collect.
2380 * regcache.c (regcache_raw_collect): Remove.
2381
73e1c03f
SM
23822018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2383
2384 * regcache.h (regcache_raw_supply): Remove, update callers to
2385 use detached_regcache::raw_supply.
2386 * regcache.c (regcache_raw_supply): Remove.
2387
e4c4a59b
SM
23882018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2389
2390 * regcache.h (regcache_cooked_write_part): Remove, update
2391 callers to use regcache::cooked_write_part.
2392 * regcache.c (regcache_cooked_write_part): Remove.
2393
73bb0000
SM
23942018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2395
2396 * regcache.h (regcache_cooked_read_part): Remove, update callers
2397 to use readable_regcache::cooked_read_part.
2398 * regcache.c (regcache_cooked_read_part): Remove.
2399
46a45e9d
SM
24002018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2401
2402 * regcache.h (regcache_cooked_read_value): Remove, update
2403 callers to use readable_regcache::cooked_read_value.
2404 * regcache.c (regcache_cooked_read_value): Remove.
2405
b66f5587
SM
24062018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2407
2408 * regcache.h (regcache_cooked_write): Remove, update callers to
2409 use regcache::cooked_write.
2410 * regcache.c (regcache_cooked_write): Remove.
2411
6aa7d724
SM
24122018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2413
2414 * regcache.h (regcache_invalidate): Remove, update callers to
2415 use detached_regcache::invalidate instead.
2416 * regcache.c (regcache_invalidate): Remove.
2417
4f0420fd
SM
24182018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2419
2420 * regcache.h (regcache_raw_write_part): Remove, update callers
2421 to use regcache::raw_write_part instead.
2422 * regcache.c (regcache_raw_write_part): Remove.
2423
502fe83e
SM
24242018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2425
2426 * regcache.h (regcache_raw_read_part): Remove, update callers to
2427 use readable_regcache::raw_read_part instead.
2428 * regcache.c (regcache_raw_read_part): Remove.
2429
dca08e1f
SM
24302018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2431
2432 * regcache.h (regcache_cooked_read): Remove, update callers to
2433 use readable_regcache::cooked_read instead.
2434 * regcache.c (regcache_cooked_read): Remove.
2435
10eaee5f
SM
24362018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2437
2438 * regcache.h (regcache_raw_write): Remove, update callers to use
2439 regcache::raw_write instead.
2440 * regcache.c (regcache_raw_write): Remove.
2441
0b883586
SM
24422018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2443
2444 * regcache.h (regcache_raw_read): Remove, update callers to use
2445 readable_regcache::raw_read instead.
2446 * regcache.c (regcache_raw_read): Remove.
2447
0b47d985
SM
24482018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2449
2450 * regcache.h (regcache_raw_update): Remove, update callers to
2451 use readable_regcache::raw_update instead.
2452 * regcache.c (regcache_raw_update): Remove.
2453
0ec9f114
SM
24542018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2455
2456 * regcache.h (regcache_register_status): Remove, update callers
2457 to use reg_buffer::get_register_status directly instead.
2458 * regcache.c (regcache_register_status): Remove.
2459
222312d3
SM
24602018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2461
2462 * regcache.h (regcache_get_ptid): Remove, update all callers to
2463 call regcache::ptid instead.
2464 * regcache.c (regcache_get_ptid): Remove.
2465
fdbe37e3
SM
24662018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2467
2468 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2469
f7c6f423
PA
24702018-05-30 Pedro Alves <palves@redhat.com>
2471
2472 * common/common-exceptions.h (exception_rethrow): Use
2473 ATTRIBUTE_NORETURN.
2474
52941706
SM
24752018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2476
2477 * breakpoint.c (print_solib_event, check_status_catch_solib):
2478 Remove struct keyword in range-based for loops.
2479 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2480 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2481 Likewise.
2482 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2483 Likewise.
2484 * symfile.c (addr_info_make_relative): Likewise.
2485 * thread.c (value_in_thread_stack_temporaries): Likewise.
2486
bf2977b5
WP
24872018-06-12 Weimin Pan <weimin.pan@oracle.com>
2488
2489 PR gdb/16841
2490 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2491 aggregate type to get its real type before accessing it.
2492
64cc34d8
WP
24932018-05-29 Weimin Pan <weimin.pan@oracle.com>
2494
2495 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2496 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2497 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2498 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2499 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2500 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2501 * printcmd.c (info_address_command): Likewise.
2502
e7ec8713
TT
25032018-05-29 Tom Tromey <tom@tromey.com>
2504
2505 * windows-nat.c (handle_exception): Update fall-through comment.
2506
bcb430e4
TT
25072018-05-29 Tom Tromey <tom@tromey.com>
2508
2509 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2510 (struct program_space) <added_solibs>: Now a std::vector.
2511 * breakpoint.c (print_solib_event): Update.
2512 (check_status_catch_solib): Update.
2513 * progspace.c (clear_program_space_solib_cache): Update.
2514 * solib.c (update_solib_list): Update.
2515
894882e3
TT
25162018-05-29 Tom Tromey <tom@tromey.com>
2517
2518 * python/py-type.c (typy_richcompare): Update.
2519 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2520 * gdbtypes.h (types_deeply_equal): Return bool.
2521 (types_equal): Likewise.
2522 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2523 declare VEC.
2524 (check_types_equal): Change worklist to std::vector. Return
2525 bool.
2526 (struct type_equality_entry): Add constructor.
2527 (compare_maybe_null_strings): Return bool.
2528 (check_types_worklist): Return bool. Change worklist to
2529 std::vector.
2530 (types_deeply_equal): Use std::vector.
2531 (types_equal): Return bool.
2532 (compare_maybe_null_strings): Simplify.
2533
10b2ded4
TT
25342018-05-29 Tom Tromey <tom@tromey.com>
2535
2536 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2537
4f7deebe
TT
25382018-05-29 Tom Tromey <tom@tromey.com>
2539
2540 * objc-lang.h: Don't include cp-support.h.
2541 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2542 declare VEC.
2543
b8283aea
TT
25442018-05-27 Tom Tromey <tom@tromey.com>
2545
2546 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2547
41a883c8
TT
25482018-05-25 Tom Tromey <tom@tromey.com>
2549
2550 * value.c (value::location): Initialize.
2551
bf259e25
TT
25522018-05-25 Tom Tromey <tom@tromey.com>
2553
2554 * dbxread.c (init_bincl_list): Remove.
2555 (bincl_list): Now a std::vector.
2556 (bincls_allocated, next_bincl): Remove.
2557 (free_bincl_list, do_free_bincl_list_cleanup)
2558 (make_cleanup_free_bincl_list): Remove.
2559 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2560 unique_xmalloc_ptr.
2561 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2562 (struct header_file_location): Add constructor.
2563 (add_bincl_to_list): Remove.
2564
d525a99b
TT
25652018-05-25 Tom Tromey <tom@tromey.com>
2566
2567 * tui/tui.c (tui_enable): Update.
2568 * mi/mi-interp.c (mi_interp::init): Update.
2569 * interps.h (class interp) <name>: New method.
2570 <m_name>: Rename from name.
2571 (~scoped_restore_interp): Update.
2572 * interps.c (interp::interp): Update.
2573 (interp_add, interp_set, interp_lookup_existing)
2574 (current_interp_named_p): Update.
2575
da505cff
TT
25762018-05-25 Tom Tromey <tom@tromey.com>
2577
2578 * interps.c (interp_name): Remove.
2579 * mi/mi-interp.c (mi_interp::init): Update.
2580 * interps.h (interp_name): Remove.
2581 (~scoped_restore_interp): Update.
2582 * tui/tui.c (tui_enable): Update.
2583
29f94340
TT
25842018-05-25 Tom Tromey <tom@tromey.com>
2585
2586 * utils.c (fputs_maybe_filtered): Update.
2587 * linespec.c (decode_line_full): Update.
2588 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2589 (mi_print_breakpoint_for_event, mi_solib_loaded)
2590 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2591 (mi_user_selected_context_changed): Update.
2592 * mi/mi-main.c (mi_execute_command): Update.
2593 * cli/cli-script.c (execute_control_command): Update.
2594 * python/python.c (execute_gdb_command): Update.
2595 * solib.c (info_sharedlibrary_command): Update.
2596 * interps.c (interp_ui_out): Remove.
2597 * interps.h (interp_ui_out): Remove.
2598
716b8bc5
TT
25992018-05-25 Tom Tromey <tom@tromey.com>
2600
2601 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2602 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2603 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2604
753ff9bd
TT
26052018-05-25 Tom Tromey <tom@tromey.com>
2606
2607 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2608 * interps.c (interp_exec): Use scoped_restore.
2609
5ca3b260
TT
26102018-05-25 Tom Tromey <tom@tromey.com>
2611
2612 * remote.c (remote_target::remote_file_get): Use
2613 gdb::byte_vector.
2614 (remote_target::remote_file_put): Likewise.
2615
3173aa2f
TT
26162018-05-25 Tom Tromey <tom@tromey.com>
2617
2618 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2619 a std::string.
2620 (get_pe_section_index, add_pe_exported_sym): Update.
2621 (read_pe_exported_syms): Use gdb::def_vector.
2622
09a5e1b5
TT
26232018-05-25 Tom Tromey <tom@tromey.com>
2624
2625 * frame.c (remove_prev_frame): Remove.
2626 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2627
d8dab6c3
MR
26282018-05-25 Maciej W. Rozycki <macro@mips.com>
2629
2630 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2631 Remove prototypes.
2632 * mips-linux-nat.c (supply_fpregset): Always call
2633 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2634 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2635 `mips_fill_fpregset'.
2636 * mips-linux-tdep.c (mips_supply_fpregset)
2637 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2638 (mips_fill_fpregset_wrapper): Remove functions.
2639 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2640 (mips_linux_fpregset): Remove variable.
2641 (mips_linux_iterate_over_regset_sections): Use
2642 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2643 (mips_linux_o32_sigframe_init): Remove comment.
2644
3c69da40
PA
26452018-05-25 Pedro Alves <palves@redhat.com>
2646
2647 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2648 (struct readahead_cache, struct packet_reg, struct
2649 remote_arch_state, class remote_state): Move higher up in the
2650 file.
2651 (remote_target::m_remote_state): Now an object instead of a pointer.
2652 (remote_target::get_remote_state): Adjust.
2653
39f0c204
AB
26542018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2655
2656 * stack.c (select_and_print_frame): Delete.
2657 (struct function_bounds): Move struct within function.
2658 (func_command): Most content moved into new function
2659 find_frame_for_function, use new function, print result, add
2660 function comment.
2661 (find_frame_for_function): New function, now returns a result.
2662
d392224a
PW
26632018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2664
2665 * stack.c (iterate_over_block_arg_vars): Fix comment.
2666 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2667
45f25d6c
AB
26682018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2669
2670 PR gdb/23203
2671 * frame.c
2672 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2673 Define.
2674 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2675 Define.
2676 * frame.h (class scoped_restore_selected_frame): New class.
2677 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2678 of any exception, use scoped_restore_selected_frame to restore the
2679 frame instead.
2680
da05d921
PA
26812018-05-24 Pedro Alves <palves@redhat.com>
2682
2683 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2684 override.
2685
a8be540e
TT
26862018-05-23 Tom Tromey <tom@tromey.com>
2687
2688 * complaints.c (struct complaints): Remove.
2689 (symfile_complaint_book): Remove.
2690 (series): New global.
2691 (complaint_internal): Update.
2692 (clear_complaints): Update.
2693
ff1cf532
TT
26942018-05-23 Tom Tromey <tom@tromey.com>
2695
2696 * complaints.c (counters): New global.
2697 (struct complain): Remove.
2698 (struct complaints) <root>: Remove.
2699 (complaint_sentinel): Remove.
2700 (symfile_complaint_book): Update.
2701 (find_complaint) Remove.
2702 (complaint_internal, clear_complaints): Update.
2703
7ff88174
TT
27042018-05-23 Tom Tromey <tom@tromey.com>
2705
2706 * complaints.c (struct complain) <file, line>: Remove.
2707 (find_complaint): Remove file, line parameters.
2708 (complaint_internal): Update.
2709
de54e1a5
TT
27102018-05-23 Tom Tromey <tom@tromey.com>
2711
2712 * complaints.c (vcomplaint): Remove.
2713 (complaint_internal) Merge in contents of vcomplaint.
2714
2ac237e5
TT
27152018-05-23 Tom Tromey <tom@tromey.com>
2716
2717 * complaints.c (struct complaints) <explanation>: Remove.
2718 (symfile_explanations): Remove.
2719 (symfile_complaint_book): Update.
2720 (vcomplaint): Update.
2721 (struct explanation): Remove.
2722
b98664d3
TT
27232018-05-23 Tom Tromey <tom@tromey.com>
2724
2725 * complaints.c (symfile_complaints): Remove.
2726 (complaint_internal): Remove "complaints" parameter.
2727 (clear_complaints, vcomplaint): Remove "c" parameter.
2728 (get_complaints): Remove.
2729 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2730 (dwarf2_debug_line_missing_file_complaint)
2731 (dwarf2_debug_line_missing_end_sequence_complaint)
2732 (dwarf2_complex_location_expr_complaint)
2733 (dwarf2_const_value_length_mismatch_complaint)
2734 (dwarf2_section_buffer_overflow_complaint)
2735 (dwarf2_macro_malformed_definition_complaint)
2736 (dwarf2_invalid_attrib_class_complaint)
2737 (create_addrmap_from_index, dw2_symtab_iter_next)
2738 (dw2_expand_marked_cus)
2739 (dw2_debug_names_iterator::find_vec_in_debug_names)
2740 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2741 (create_debug_type_hash_table, init_cutu_and_read_dies)
2742 (partial_die_parent_scope, add_partial_enumeration)
2743 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2744 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2745 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2746 (create_cus_hash_table, create_dwp_hash_table)
2747 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2748 (dwarf2_rnglists_process, dwarf2_ranges_process)
2749 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2750 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2751 (handle_struct_member_die, process_structure_scope)
2752 (read_array_type, read_common_block, read_module_type)
2753 (read_tag_pointer_type, read_typedef, read_base_type)
2754 (read_subrange_type, load_partial_dies, partial_die_info::read)
2755 (partial_die_info::read, partial_die_info::read)
2756 (partial_die_info::read, read_checked_initial_length_and_offset)
2757 (dwarf2_string_attr, read_formatted_entries)
2758 (dwarf_decode_line_header)
2759 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2760 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2761 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2762 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2763 (get_signatured_type, get_DW_AT_signature_type)
2764 (decode_locdesc, file_file_name, consume_improper_spaces)
2765 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2766 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2767 (dwarf2_symbol_mark_computed, set_die_type)
2768 (read_attribute_value): Update.
2769 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2770 Update.
2771 * dbxread.c (unknown_symtype_complaint)
2772 (lbrac_mismatch_complaint, repeated_header_complaint)
2773 (set_namestring, function_outside_compilation_unit_complaint)
2774 (read_dbx_symtab, process_one_symbol): Update.
2775 * gdbtypes.c (stub_noname_complaint): Update.
2776 * windows-nat.c (handle_unload_dll): Update.
2777 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2778 (decode_base_type): Update.
2779 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2780 (eb_complaint, record_include_begin, record_include_end)
2781 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2782 (process_xcoff_symbol, read_symbol)
2783 (function_outside_compilation_unit_complaint)
2784 (scan_xcoff_symtab): Update.
2785 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2786 * buildsym.c (finish_block_internal, make_blockvector)
2787 (end_symtab_get_static_block, augment_type_symtab): Update.
2788 * dtrace-probe.c (dtrace_process_dof)
2789 (dtrace_static_probe_ops::get_probes): Update.
2790 * complaints.h (struct complaint): Don't declare.
2791 (symfile_complaints): Remove.
2792 (complaint_internal): Remove "complaints" parameter.
2793 (complaint): Likewise.
2794 (clear_complaints): Likewise.
2795 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2796 (reread_symbols): Update.
2797 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2798 (dwarf2_frame_cache, decode_frame_entry): Update.
2799 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2800 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2801 (info_selectors_command): Update.
2802 * macrotab.c (macro_include, check_for_redefinition)
2803 (macro_undef): Update.
2804 * objfiles.c (filter_overlapping_sections): Update.
2805 * stabsread.c (invalid_cpp_abbrev_complaint)
2806 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2807 (define_symbol, error_type, read_type, rs6000_builtin_type)
2808 (stabs_method_name_from_physname, read_member_functions)
2809 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2810 (attach_fields_to_type, complain_about_struct_wipeout)
2811 (read_range_type, read_args, common_block_start)
2812 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2813 Update.
2814 * mdebugread.c (index_complaint, unknown_ext_complaint)
2815 (basic_type_complaint, bad_tag_guess_complaint)
2816 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2817 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2818 (parse_procedure, parse_lines)
2819 (function_outside_compilation_unit_complaint)
2820 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2821 (bad_tag_guess_complaint, reg_value_complaint): Update.
2822 * cp-support.c (demangled_name_complaint): Update.
2823 * macroscope.c (sal_macro_scope): Update.
2824 * dwarf-index-write.c (class debug_names): Update.
2825
4e9668d0
TT
28262018-05-23 Tom Tromey <tom@tromey.com>
2827
2828 * complaints.c (clear_complaints): Remove "noisy" parameter.
2829 * complaints.h (clear_complaints): Update.
2830 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2831 (reread_symbols): Update.
2832
43ba33c7
TT
28332018-05-23 Tom Tromey <tom@tromey.com>
2834
2835 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2836 SUBSEQUENT_MESSAGE.
2837 (vcomplaint, clear_complaints): Update.
2838 (symfile_explanations): Remove some messages.
2839
2b9496b2
TT
28402018-05-23 Tom Tromey <tom@tromey.com>
2841
2842 * complaints.c (internal_complaint): Remove.
2843 * complaints.h (internal_complaint): Remove.
2844
35f1fea3
MR
28452018-05-22 Maciej W. Rozycki <macro@mips.com>
2846
2847 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2848
6b8edb51
PA
28492018-05-22 Pedro Alves <palves@redhat.com>
2850
2851 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2852 (remote_fileio_badfd, remote_fileio_return_errno)
2853 (remote_fileio_return_success, remote_fileio_func_open)
2854 (remote_fileio_func_open, remote_fileio_func_close)
2855 (remote_fileio_func_read, remote_fileio_func_write)
2856 (remote_fileio_func_lseek, remote_fileio_func_rename)
2857 (remote_fileio_func_unlink, remote_fileio_func_stat)
2858 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2859 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2860 remote_target parameter.
2861 (remote_fio_func_map) <func>: Add remote_target parameter.
2862 (do_remote_fileio_request, remote_fileio_request):
2863 * remote-fileio.h (remote_fileio_request):
2864 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2865 remote_target parameter.
2866 (remote_notif_process, handle_notification): Adjust to pass down
2867 the remote.
2868 (remote_notif_state_allocate): Add remote_target parameter. Save
2869 it.
2870 * remote-notif.h (struct remote_target): Forward declare.
2871 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2872 remote_target parameter.
2873 (struct remote_notif_state) <remote>: New field.
2874 (remote_notif_ack, remote_notif_parse): Add remote_target
2875 parameter.
2876 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2877 remote_target parameter.
2878 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2879 (threads_listing_context, rmt_thread_action, protocol_feature)
2880 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2881 (packet_result, struct threads_listing_context, remote_state):
2882 Move definitions and declarations higher up.
2883 (remote_target) <~remote_target>: Declare.
2884 (remote_download_command_source, remote_file_put, remote_file_get)
2885 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2886 (remote_hostio_pread_vFile, remote_hostio_send_command)
2887 (remote_hostio_set_filesystem, remote_hostio_open)
2888 (remote_hostio_close, remote_hostio_unlink, remote_state)
2889 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2890 (get_memory_write_packet_size, get_memory_read_packet_size)
2891 (append_pending_thread_resumptions, remote_detach_1)
2892 (append_resumption, remote_resume_with_vcont)
2893 (add_current_inferior_and_thread, wait_ns, wait_as)
2894 (process_stop_reply, remote_notice_new_inferior)
2895 (process_initial_stop_replies, remote_add_thread)
2896 (btrace_sync_conf, remote_btrace_maybe_reopen)
2897 (remove_new_fork_children, kill_new_fork_children)
2898 (discard_pending_stop_replies, stop_reply_queue_length)
2899 (check_pending_events_prevent_wildcard_vcont)
2900 (discard_pending_stop_replies_in_queue, stop_reply)
2901 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2902 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2903 (remote_interrupt_as, remote_interrupt_ns)
2904 (remote_get_noisy_reply, remote_query_attached)
2905 (remote_add_inferior, remote_current_thread, get_current_thread)
2906 (set_thread, set_general_thread, set_continue_thread)
2907 (set_general_process, write_ptid)
2908 (remote_unpack_thread_info_response, remote_get_threadinfo)
2909 (parse_threadlist_response, remote_get_threadlist)
2910 (remote_threadlist_iterator, remote_get_threads_with_ql)
2911 (remote_get_threads_with_qxfer)
2912 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2913 (get_offsets, remote_check_symbols, remote_supported_packet)
2914 (remote_query_supported, remote_packet_size)
2915 (remote_serial_quit_handler, remote_detach_pid)
2916 (remote_vcont_probe, remote_resume_with_hc)
2917 (send_interrupt_sequence, interrupt_query)
2918 (remote_notif_get_pending_events, fetch_register_using_p)
2919 (send_g_packet, process_g_packet, fetch_registers_using_g)
2920 (store_register_using_P, store_registers_using_G)
2921 (set_remote_traceframe, check_binary_download)
2922 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2923 (remote_xfer_live_readonly_partial, remote_read_bytes)
2924 (remote_send_printf, remote_flash_write, readchar)
2925 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2926 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2927 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2928 (extended_remote_disable_randomization, extended_remote_run)
2929 (send_environment_packet, extended_remote_environment_support)
2930 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2931 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2932 (packet_command): Now methods of ...
2933 (remote_target): ... this class.
2934 (m_remote_state) <remote_target>: New field.
2935 (struct remote_state) <stop_reply_queue,
2936 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2937 fields.
2938 (remote_state::remote_state): Allocate stop_reply_queue.
2939 (remote_state): Delete global.
2940 (get_remote_state_raw): Delete.
2941 (remote_target::get_remote_state): Allocate m_remote_state on
2942 demand.
2943 (get_current_remote_target): New.
2944 (remote_ops, extended_remote_ops): Delete.
2945 (wait_forever_enabled_p, remote_async_inferior_event_token):
2946 Delete, moved to struct remote_state.
2947 (remote_target::close): Delete self. Destruction bits split to
2948 ...
2949 (remote_target::~remote_target): ... this.
2950 (show_memory_packet_size): Adjust to use
2951 get_current_remote_target.
2952 (struct protocol_feature) <func>: Add remote_target parameter.
2953 All callers adjusted.
2954 (curr_quit_handler_target): New.
2955 (remote_serial_quit_handler): Reimplement.
2956 (remote_target::open_1): Adjust to use get_current_remote_target.
2957 Heap-allocate remote_target/extended_remote_target instances.
2958 (vcont_builder::vcont_builder): Add remote_target parameter, and
2959 save it in m_remote. All callers adjusted.
2960 (vcont_builder::m_remote): New field.
2961 (vcont_builder::restart, vcont_builder::flush)
2962 (vcont_builder::push_action): Use it.
2963 (remote_target::commit_resume): Use it.
2964 (struct queue_iter_param) <remote>: New field.
2965 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2966 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2967 (check_pending_event_prevents_wildcard_vcont_callback)
2968 (remote_target::check_pending_events_prevent_wildcard_vcont)
2969 (remote_target::discard_pending_stop_replies)
2970 (remote_target::discard_pending_stop_replies_in_queue)
2971 (remote_target::remote_notif_remove_queued_reply): Fill in
2972 'remote' field.
2973 (remote_notif_get_pending_events): New.
2974 (remote_target::readchar, remote_target::remote_serial_write):
2975 Save/restore curr_quit_handler_target.
2976 (putpkt): New.
2977 (kill_new_fork_children): Fill in 'remote' field.
2978 (packet_command): Use get_current_remote_target, defer to
2979 remote_target method of same name.
2980 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2981 parameter, and save it in m_remote. All callers adjusted.
2982 (scoped_remote_fd::release): Use m_remote.
2983 (scoped_remote_fd::m_remote): New field.
2984 (remote_file_put, remote_file_get, remote_file_delete): Use
2985 get_current_remote_target, defer to remote_target method of same
2986 name.
2987 (remote_btrace_reset): Add remote_state paremeter. Update all
2988 callers.
2989 (remote_async_inferior_event_handler). Pass down 'data'.
2990 (remote_new_objfile): Use get_current_remote_target.
2991 (remote_target::vcont_r_supported): New.
2992 (set_range_stepping): Use get_current_remote_target and
2993 remote_target::vcont_r_supported.
2994 (_initialize_remote): Don't allocate 'remote_state' and
2995 'stop_reply_queue' globals.
2996 * remote.h (struct remote_target): Forward declare.
2997 (getpkt, putpkt, remote_notif_get_pending_events): Add
2998 'remote_target' parameter.
2999
f5db4863
PA
30002018-05-22 Pedro Alves <palves@redhat.com>
3001
3002 * remote.c (vcont_builder): Now a class. Make all data members
3003 private.
3004 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3005 Declare methods.
3006 (vcont_builder_restart): Rename to ...
3007 (vcont_builder::restart): ... this.
3008 (vcont_builder_flush): Rename to ...
3009 (vcont_builder::flush): ... this.
3010 (vcont_builder_push_action): Rename to ...
3011 (vcont_builder::push_action): ... this.
3012 (remote_target::commit_resume): Adjust.
3013
cc0be08f
PA
30142018-05-22 Pedro Alves <palves@redhat.com>
3015
3016 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3017 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3018 (get_fixed_memory_packet_size): New.
3019 (get_memory_packet_size): Use it.
3020 (set_memory_packet_size): Don't override the config size with
3021 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3022 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3023 Don't refer to get_memory_packet_size if not connected to a remote
3024 target. Show "(default)" if configured size is 0.
3025
9607784a
PA
30262018-05-22 Pedro Alves <palves@redhat.com>
3027
3028 * remote.c (remote_target::mourn_inferior): Move
3029 discard_pending_stop_replies call here from ...
3030 (_initialize_remote): ... here.
3031
0e9a6b2f
PA
30322018-05-22 Pedro Alves <palves@redhat.com>
3033
3034 * remote.c (compare_section_command): Remove set_general_process
3035 call.
3036
43c3a0e4
PA
30372018-05-22 Pedro Alves <palves@redhat.com>
3038
3039 * remote.c (struct packet_reg, struct remote_arch_state):
3040 Move higher up in the file.
3041 (remote_state) <m_arch_states>: Store remote_arch_state values
3042 instead of remote_arch_state pointers.
3043 (remote_state::get_remote_arch_state): Adjust.
3044
9d6eea31
PA
30452018-05-22 Pedro Alves <palves@redhat.com>
3046
3047 * remote.c: Include <unordered_map>.
3048 (remote_state): Now a class.
3049 (remote_state) <get_remote_arch_state>: Declare method.
3050 <get_remote_arch_state>: New field.
3051 (remote_arch_state) <remote_arch_state>: Declare ctor.
3052 <regs>: Now a unique_ptr.
3053 (remote_gdbarch_data_handle): Delete.
3054 (get_remote_arch_state): Delete.
3055 (remote_state::get_remote_arch_state): New.
3056 (get_remote_state): Adjust to call remote_state's
3057 get_remote_arch_state method.
3058 (init_remote_state): Delete, bits factored out to ...
3059 (remote_arch_state::remote_arch_state): ... this new method.
3060 (get_remote_packet_size, get_memory_packet_size)
3061 (process_g_packet, remote_target::fetch_registers)
3062 (remote_target::prepare_to_store, store_registers_using_G)
3063 (remote_target::store_registers, remote_target::get_trace_status):
3064 Adjust to call remote_state's method.
3065 (_initialize_remote): Remove reference to
3066 remote_gdbarch_data_handle.
3067
dd194f6b
PA
30682018-05-22 Pedro Alves <palves@redhat.com>
3069
3070 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3071 pread>: New method declarations.
3072 (remote_target::open_1): Adjust.
3073 (readahead_cache_invalidate): Rename to ...
3074 (readahead_cache::invalidate): ... this, and adjust to be a class
3075 method.
3076 (readahead_cache_invalidate_fd): Rename to ...
3077 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3078 class method.
3079 (remote_hostio_pwrite): Adjust.
3080 (remote_hostio_pread_from_cache): Rename to ...
3081 (readahead_cache::pread): ... this, and adjust to be a class
3082 method.
3083 (remote_hostio_close): Adjust.
3084
440b7aec
PA
30852018-05-22 Pedro Alves <palves@redhat.com>
3086
3087 * remote.c (remote_hostio_close_cleanup): Delete.
3088 (class scoped_remote_fd): New.
3089 (remote_file_put, remote_file_get): Use it.
3090
de44f5a7
PA
30912018-05-22 Pedro Alves <palves@redhat.com>
3092
3093 (struct vCont_action_support): Use bool and initialize all fields.
3094 (struct readahead_cache): Initialize all fields.
3095 (remote_state): Use bool and initialize all fields.
3096 (remote_state::remote_state, remote_state::~remote_state): New.
3097 (new_remote_state): Delete.
3098 (_initialize_remote): Use new to allocate remote_state.
3099
b1b60145
PA
31002018-05-22 Pedro Alves <palves@redhat.com>
3101 張俊芝 <zjz@zjz.name>
3102
3103 PR gdb/22973
3104 * c-exp.y: Include "c-support.h".
3105 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3106 of tolower. Use c_ident_is_alpha to scan names.
3107 * c-lang.c: Include "c-support.h".
3108 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3109 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3110 * c-support.h: New file, with bits factored out from ...
3111 * cp-name-parser.y: ... this file.
3112 Include "c-support.h".
3113 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3114 c-support.h and renamed.
3115 (symbol_end, yylex): Adjust.
3116
0ec848ad
PFC
31172018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3118
3119 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3120 parameter type to CORE_ADDR.
3121 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3122 parameter type in declaration to CORE_ADDR.
3123 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3124 target_auxv_search to get AT_HWCAP and use the result to get the
3125 target description.
3126 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3127 to CORE_ADDR. Remove the cast of the return value to unsigned
3128 long. Fix error predicate of target_auxv_search.
3129 (ppc_linux_nat_target::read_description): Change the type of the
3130 hwcap variable to CORE_ADDR.
3131
0fb2aaa1
PFC
31322018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3133
3134 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3135 if the size of fpscr is larger than 32 bits.
3136
2c3305f6
PFC
31372018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3138
3139 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3140 (ppc32_linux_vsxregmap): New global.
3141 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3142 regcache_supply_regset, and regcache_collect_regset.
3143 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3144 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3145 (fetch_vsx_register, store_vsx_register): Remove.
3146 (fetch_vsx_registers): Add regno parameter. Get regset using
3147 ppc_linux_vsxregset. Use regset to supply registers.
3148 (store_vsx_registers): Add regno parameter. Get regset using
3149 ppc_linux_vsxregset. Use regset to collect registers.
3150 (fetch_register): Call fetch_vsx_registers instead of
3151 fetch_vsx_register.
3152 (store_register): Call store_vsx_registers instead of
3153 store_vsx_register.
3154 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3155 new regno parameter.
3156 (store_ppc_registers): Call store_vsx_registers with -1 for the
3157 new regno parameter.
3158 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3159 (ppc_collect_vsxregset): Remove.
3160
1d75a658
PFC
31612018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3162
3163 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3164 offset fields.
3165 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3166 for vector register offset fields.
3167 (ppc64_fbsd_reg_offsets): Likewise.
3168 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3169 to vector register offset fields.
3170 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3171 to vector register offset fields.
3172 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3173 vector register offset fields.
3174 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3175 initializers for vector register offset fields.
3176 (rs6000_aix64_reg_offsets): Likewise.
3177 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3178 (ppc_supply_vrregset): Remove.
3179 (ppc_collect_vrregset): Remove.
3180 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3181 (ppc_linux_vrregset) : New function.
3182 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3183 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3184 (ppc32_linux_vrregset): Remove.
3185 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3186 and use result instead of ppc32_linux_vrregset.
3187 (ppc32_linux_reg_offsets): Remove initializers for vector register
3188 offset fields.
3189 (ppc64_linux_reg_offsets): Likewise.
3190 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3191 * ppc-linux-nat.c: Include regset.h.
3192 (gdb_vrregset_t): Adjust comment to account for little-endian
3193 mode.
3194 (supply_vrregset, fill_vrregset): Remove.
3195 (fetch_altivec_register, store_altivec_register): Remove.
3196 (fetch_altivec_registers): Add regno parameter. Get regset using
3197 ppc_linux_vrregset. Use regset to supply registers.
3198 (store_altivec_registers): Add regno parameter. Get regset using
3199 ppc_linux_vrregset. Use regset to collect registers.
3200 (fetch_register): Call fetch_altivec_registers instead of
3201 fetch_altivec_register.
3202 (store_register): Call store_altivec_registers instead of
3203 store_altivec_register.
3204 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3205 the new regno parameter.
3206 (store_ppc_registers): Call store_altivec_registers with -1 for
3207 the new regno parameter.
3208
d078308a
PFC
32092018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3210
3211 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3212 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3213 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3214 (gdb_vrregset_t): Change array type size to
3215 PPC_LINUX_SIZEOF_VRREGSET.
3216 (gdb_vsxregset_t): Change array type size to
3217 PPC_LINUX_SIZEOF_VSXREGSET.
3218 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3219 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3220 PPC_LINUX_SIZEOF_VSXREGSET.
3221
2e077f5e
PFC
32222018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3223
3224 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3225 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3226 nat/ppc-linux.c.
3227 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3228 ppc_linux_target_wordsize with tid.
3229 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3230 wordsize with tid.
3231 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3232 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3233 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3234 tid parameter. Remove static specifier.
3235 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3236 (ppc_linux_target_wordsize): New declaration.
3237
bd64614e
PFC
32382018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3239
3240 * arch/ppc-linux-common.c: New file.
3241 * arch/ppc-linux-common.h: New file.
3242 * arch/ppc-linux-tdesc.h: New file.
3243 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3244 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3245 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3246 arch/ppc-linux-tdesc.h.
3247 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3248 arch/ppc-linux-tdesc.h.
3249 (ppc_linux_nat_target::read_description): Remove target
3250 description matching code. Fill a ppc_linux_features struct and
3251 call ppc_linux_match_description with it. Move comment about ISA
3252 2.05 to ppc-linux-common.c.
3253 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3254 arch/ppc-linux-tdesc.h.
3255 (ppc_linux_core_read_description): Remove target description
3256 matching code. Fill a ppc_linux_features struct and call
3257 ppc_linux_match_description with it.
3258 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3259 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3260 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3261 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3262 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3263 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3264 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3265 (tdesc_powerpc_e500l): Remove.
3266
241db429
JB
32672018-05-22 Joel Brobecker <brobecker@adacore.com>
3268
3269 * ada-lang.c (catch_assert_command): Pass empty string instead
3270 of NULL for excep_string argument.
3271
75d74cca
MR
32722018-05-22 Maciej W. Rozycki <macro@mips.com>
3273
3274 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3275 the width of the requested register exceeds the width of the
3276 `ptrace' data type.
3277
122b53ea
TT
32782018-05-21 Tom Tromey <tom@tromey.com>
3279
3280 * printcmd.c (output_command): Remove.
3281 (output_command_const): Rename to output_command.
3282 * valprint.h (output_command): Rename from output_command_const.
3283 * tracepoint.c (trace_dump_actions): Call output_command.
3284
bc18fbb5
TT
32852018-05-21 Tom Tromey <tom@tromey.com>
3286
3287 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3288 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3289 * ada-lang.h (create_ada_exception_catchpoint): Update.
3290 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3291 std::string.
3292 (create_excep_cond_exprs, ~ada_catchpoint)
3293 (should_stop_exception, print_one_exception)
3294 (print_mention_exception, print_recreate_exception): Update.
3295 (ada_get_next_arg): Remove.
3296 (catch_ada_exception_command_split): Use std::string. Change type
3297 of "excep_string", "cond_string".
3298 (catch_ada_exception_command): Update.
3299 (create_ada_exception_catchpoint): Change type of excep_string.
3300 (ada_exception_sal): Remove excep_string parameter.
3301 (~ada_catchpoint): Remove.
3302
790217f6
TT
33032018-05-21 Tom Tromey <tom@tromey.com>
3304
3305 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3306 cleanup.
3307
6f46ac85
TT
33082018-05-21 Tom Tromey <tom@tromey.com>
3309
3310 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3311 Return unique_xmalloc_ptr.
3312 (print_it_exception): Update.
3313
15b6611c
TT
33142018-05-21 Tom Tromey <tom@tromey.com>
3315
3316 * tracepoint.c (trace_dump_actions): Use std::string.
3317
c0c9f665
TT
33182018-05-21 Tom Tromey <tom@tromey.com>
3319
3320 * symfile.c (reread_symbols): Use std::string for original_name.
3321
22ca247e
TT
33222018-05-21 Tom Tromey <tom@tromey.com>
3323
3324 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3325 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3326 constructor.
3327
184cde75
SM
33282018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3329
3330 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3331 instance to...
3332 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3333 * objfiles.c (get_objfile_bfd_data): Allocate
3334 objfile_per_bfd_storage with obstack_new when allocating on
3335 obstack.
3336
e39db4db
SM
33372018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3338
3339 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3340 OBSTACK_ZALLOC.
3341 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3342 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3343 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3344 (add_pending): Likewise.
3345 (parse_symbol): Likewise.
3346 (parse_partial_symbols): Likewise.
3347 (psymtab_to_symtab_1): Likewise.
3348 (new_psymtab): Likewise.
3349 (elfmdebug_build_psymtabs): Likewise.
3350 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3351 * objfiles.c (get_objfile_bfd_data): Likewise.
3352 (objfile_register_static_link): Likewise.
3353 * psymtab.c (allocate_psymtab): Likewise.
3354 * stabsread.c (read_member_functions): Likewise.
3355 * xcoffread.c (xcoff_end_psymtab): Likewise.
3356
284a0e3c
SM
33572018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3358
3359 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3360 compiler supports std::is_trivially_constructible.
3361 * common/poison.h: Include obstack.h.
3362 (IsMallocable): Define to is_trivially_constructible if the
3363 compiler supports it, define to true_type otherwise.
3364 (xobnew): New.
3365 (XOBNEW): Redefine.
3366 (xobnewvec): New.
3367 (XOBNEWVEC): Redefine.
3368 * gdb_obstack.h (obstack_zalloc): New.
3369 (OBSTACK_ZALLOC): Redefine.
3370 (obstack_calloc): New.
3371 (OBSTACK_CALLOC): Redefine.
3372 (obstack_new): New.
3373 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3374 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3375 gdbarch.c.
3376 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3377 obstack_calloc/obstack_zalloc.
3378 (gdbarch_obstack_zalloc): Remove.
3379 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3380
59f66be3
PW
33812018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3382
3383 * stack.c (backtrace_command_1): Remove useless variable int i.
3384
50c65c2d
PW
33852018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3386
3387 * stack.c (print_frame_info): Fix comment.
3388
7ff8cb8c
TT
33892018-05-18 Tom Tromey <tom@tromey.com>
3390
3391 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3392 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3393 (~dwarf2_per_objfile): Update
3394 (dwarf2_get_dwz_file): Use new.
3395 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3396 unique_ptr.
3397
400174b1
TT
33982018-05-18 Tom Tromey <tom@tromey.com>
3399
3400 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3401 unique_ptr.
3402 * dwarf2read.c (struct dwp_file): Add constructor and
3403 initializers.
3404 (open_and_init_dwp_file): Return a unique_ptr.
3405 (dwarf2_per_objfile, create_dwp_hash_table)
3406 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3407 (lookup_dwo_unit_in_dwp): Update.
3408 (open_and_init_dwp_file, get_dwp_file): Update.
3409
3063847f
TT
34102018-05-18 Tom Tromey <tom@tromey.com>
3411
3412 * dwarf2read.c (dwarf2_per_objfile): Update.
3413 (struct mapped_index): Add initializers.
3414 (dwarf2_read_index): Use new.
3415 (dw2_symtab_iter_init): Update.
3416 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3417 unique_ptr.
3418
d3d02dee
SM
34192018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3420
3421 * dwarf2read.c (mapped_index) <total_size>: Remove.
3422
1d143c36
SM
34232018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3424
3425 * unittests/format_pieces-selftests.c (test_format_specifier):
3426 Add ARI comments.
3427
ce1e8424
TT
34282018-05-18 Tom Tromey <tom@tromey.com>
3429
3430 * c-typeprint.c (maybe_print_hole): New function.
3431 (c_print_type_struct_field_offset): Update.
3432 (c_type_print_base_struct_union): Call maybe_print_hole.
3433
ddfe970e
KS
34342018-05-17 Keith Seitz <keiths@redhat.com>
3435
3436 * breakpoint.c (build_bpstat_chain): New function, moved from
3437 bpstat_stop_status.
3438 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3439 If no stop chain is passed, call build_bpstat_chain to build it.
3440 * breakpoint.h (build_bpstat_chain): Declare.
3441 (bpstat_stop_status): Move documentation here from breakpoint.c.
3442 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3443 build the stop chain and pass it to skip_inline_frames.
3444 Pass this stop chain to bpstat_stop_status.
3445 * inline-frame.c: Include breakpoint.h.
3446 (stopped_by_user_bp_inline_frame): New function.
3447 (skip_inline_frames): Add parameter `stop_chain'.
3448 Move documention to inline-frame.h.
3449 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3450 whether the frame should be elided.
3451 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3452 Add moved documentation and update for new parameter.
3453
b17992c1
SM
34542018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3455
3456 PR cli/14975
3457 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3458 unittests/format_pieces-selftests.c.
3459 * common/format.h (format_piece) <operator==>: New.
3460 (format_pieces) <operator[]>: Remove.
3461 * common/format.c (format_pieces::format_pieces): Handle \e.
3462 * unittests/format_pieces-selftests.c: New.
3463
58f0c718
TT
34642018-05-17 Tom Tromey <tom@tromey.com>
3465
3466 PR symtab/23010:
3467 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3468 (dw2_instantiate_symtab): Add skip_partial parameter.
3469 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3470 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3471 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3472 (dw2_expand_symtabs_matching_one)
3473 (dw2_find_pc_sect_compunit_symtab)
3474 (dw2_debug_names_lookup_symbol)
3475 (dw2_debug_names_expand_symtabs_for_function): Update.
3476 (init_cutu_and_read_dies): Add skip_partial parameter.
3477 (process_psymtab_comp_unit, build_type_psymtabs_1)
3478 (process_skeletonless_type_unit, load_partial_comp_unit)
3479 (psymtab_to_symtab_1): Update.
3480 (load_full_comp_unit): Add skip_partial parameter.
3481 (process_imported_unit_die, dwarf2_read_addr_index)
3482 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3483 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3484 (read_signatured_type): Update.
3485
3e618834
SM
34862018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3487
3488 * value.c (release_value): Remove unused variable.
3489 (record_latest_value): Likewise.
3490 (access_value_history): Likewise.
3491 (preserve_values): Likewise.
3492
fe10fe31
TT
34932018-05-17 Tom Tromey <tom@tromey.com>
3494
3495 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3496 Initialize.
3497
1d761124
MR
34982018-05-16 Maciej W. Rozycki <macro@mips.com>
3499
3500 PR gdb/22286
3501 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3502 Also handle registers whose width is not a multiple of
3503 PTRACE_TYPE_RET.
3504 (linux_nat_trad_target::store_register): Likewise.
3505
06333fea
TT
35062018-05-16 Tom Tromey <tom@tromey.com>
3507
3508 * gdbcore.h (core_bfd): Redefine.
3509 * corelow.c (core_target::close): Update.
3510 (core_target_open): Update.
3511 * progspace.h (struct program_space) <cbfd>: Now a
3512 gdb_bfd_ref_ptr.
3513
921222e2
TT
35142018-05-16 Tom Tromey <tom@tromey.com>
3515
3516 PR cli/19551:
3517 * symfile-add-flags.h (enum symfile_add_flags)
3518 <SYMFILE_NOT_FILENAME>: New constant.
3519 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3520 objfile name from BFD.
3521 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3522 * minidebug.c (find_separate_debug_file_in_section): Put
3523 ".gnu_debugdata" into BFD's file name.
3524
3acb7083
SM
35252018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3526
3527 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3528 Remove.
3529
561a72d4
TC
35302018-05-15 Tamar Christina <tamar.christina@arm.com>
3531
3532 PR binutils/21446
3533 * aarch64-tdep.c (aarch64_analyze_prologue,
3534 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3535 Indicate not interested in errors.
3536
4e6ff0e1
MR
35372018-05-15 Maciej W. Rozycki <macro@mips.com>
3538
3539 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3540 Supply the MIPS_ZERO_REGNUM register.
3541
ea33cd92
MR
35422018-05-15 Maciej W. Rozycki <macro@mips.com>
3543
3544 * mips-tdep.c (mask_address_var): Make variable static.
3545
2d79090e
TT
35462018-05-14 Tom Tromey <tom@tromey.com>
3547
3548 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3549
cf4912ae
AB
35502018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3551
3552 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3553 FXSAVE_ADDR for the mxcsr register.
3554
67e6f569
MF
35552018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3556
3557 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3558
15244507
PA
35592018-05-11 Pedro Alves <palves@redhat.com>
3560
3561 * corelow.c (core_target) <core_target>: No longer inline.
3562 Initialize m_core_gdbarch, m_core_vec and build the section table
3563 here.
3564 <~core_target>: New.
3565 <core_gdbarch, get_core_register_section>: New methods.
3566 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3567 factored out from ...
3568 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3569 (core_ops): Delete.
3570 (sniff_core_bfd): Add gdbarch parameter.
3571 (core_close): Delete, merged into ...
3572 (core_target::close): ... here. Delete self.
3573 (core_close_cleanup): Delete.
3574 (core_target_open): Allocate a core_target on the heap. Use a
3575 unique_ptr instead of a cleanup. Bits moved into the core_target
3576 ctor. Adjust to use core_target methods instead of globals.
3577 (get_core_register_section): Rename to ...
3578 (core_target::get_core_register_section): ... this and adjust.
3579 (struct get_core_registers_cb_data): New.
3580 (get_core_registers_cb): Use it. Use bool.
3581 (core_target::fetch_registers, core_target::files_info)
3582 (core_target::xfer_partial, core_target::read_description)
3583 (core_target::pid_to, core_target::thread_name): Adjust to
3584 reference class fields instead of globals.
3585 * target.h (struct target_ops_deleter, target_ops_up): New.
3586
451953fa
PA
35872018-05-11 Pedro Alves <palves@redhat.com>
3588
3589 * corefile.c (core_file_command): Move to corelow.c.
3590 * corelow.c (the_core_target): Delete.
3591 (core_file_command): Moved from corefile.c. Check exec_bfd
3592 instead of the_core_target. Use target_detach instead of calling
3593 into the_core_target directly.
3594 (maybe_say_no_core_file_now): New.
3595 (core_target::detach): Use it.
3596 (_initialize_corelow): Remove references to the_core_target.
3597 * gdbcore.h (the_core_target): Delete.
3598
e540a5a2 35992018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 3600 Pedro Alves <palves@redhat.com>
e540a5a2
TT
3601
3602 * corefile.c (core_bfd): Remove.
3603 * gdbcore.h (core_bfd): Now a macro.
3604 * progspace.h (struct program_space) <cbfd>: New field.
3605
633cf254
TT
36062018-05-11 Tom Tromey <tom@tromey.com>
3607
3608 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3609 gdb::def_vector.
3610
1a34f210
TT
36112018-05-10 Tom Tromey <tom@tromey.com>
3612
3613 * configure: Rebuild.
3614 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3615
190852c8
JB
36162018-05-10 Joel Brobecker <brobecker@adacore.com>
3617
3618 PR server/23158:
3619 * regformats/regdat.sh: Adjust script, following the addition
3620 of the new expedite_regs parameter to init_target_desc.
3621
8727de56
OJ
36222018-05-10 Omair Javaid <omair.javaid@linaro.org>
3623
3624 PR gdb/23127
3625 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3626 set_gdbarch_significant_addr_bit.
3627 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3628 set_gdbarch_significant_addr_bit.
3629 * utils.c (address_significant): Update to sign extend addr.
3630
37d9e062
MF
36312018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3632
3633 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3634 (xtensa_linux_init_abi): Limit tdep->num_regs by
3635 tdep->num_nopriv_regs.
3636 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3637 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3638 not initialized.
3639
7402fbca
SM
36402018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3641
3642 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3643
8ee22052
AB
36442018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3645
3646 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3647 (I387_MXCSR_INIT_VAL): New constant.
3648 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3649 buffer if it was supplied by the inferior.
3650 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3651 (i387_xsave_get_clear_bv): New function.
3652 (i387_supply_xsave): Only read x87 control registers from the
3653 xsave buffer if the feature is enabled, and the state will have
3654 been written, otherwise, provide a suitable default.
3655 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3656 including x87 control registers. Update control registers if they
3657 have changed from the default value, and mark features as enabled
3658 as required.
3659 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3660
968ae51b
UW
36612018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3662
3663 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3664
aff689d3
TT
36652018-05-07 Tom Tromey <tom@tromey.com>
3666
3667 * configure: Rebuild.
3668 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3669
ce887586
TT
36702018-05-07 Tom Tromey <tom@tromey.com>
3671
3672 PR tdep/20362:
3673 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3674 bit. Use correct value for VDIV.
3675
85e26832
TT
36762018-05-04 Tom Tromey <tom@tromey.com>
3677
3678 * configure: Rebuild.
3679 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3680
449b1ac7
TT
36812018-05-04 Tom Tromey <tom@tromey.com>
3682
3683 * linux-record.c (record_linux_system_call) <case
3684 RECORD_SYS_RECVFROM>: Add "break".
3685
15c9ffd6
TT
36862018-05-04 Tom Tromey <tom@tromey.com>
3687
3688 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3689 Add missing "break".
3690 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3691 Add missing "break".
3692
e3829d13
TT
36932018-05-04 Tom Tromey <tom@tromey.com>
3694
3695 * rs6000-tdep.c (ppc_process_record_op4)
3696 (ppc_process_record_op63): Add fall-through comment.
3697
da0e1563
TT
36982018-05-04 Tom Tromey <tom@tromey.com>
3699
3700 * i386-tdep.c (i386_process_record): Add fall-through comment.
3701
0019cd49
TT
37022018-05-04 Tom Tromey <tom@tromey.com>
3703
3704 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3705 comment.
3706
565e0eda
TT
37072018-05-04 Tom Tromey <tom@tromey.com>
3708
3709 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3710 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3711 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3712 comment.
3713 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3714 comment.
3715 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3716 comment.
3717
621846f4
TT
37182018-05-04 Tom Tromey <tom@tromey.com>
3719
3720 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3721
86a73007
TT
37222018-05-04 Tom Tromey <tom@tromey.com>
3723
3724 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3725 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3726 * symfile.c (section_is_mapped): Fix fall-through comment.
3727 * stabsread.c (define_symbol, read_member_functions): Fix
3728 fall-through comment.
3729 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3730 comment.
3731 * remote.c (remote_wait_as): Fix fall-through comment.
3732 * p-exp.y (yylex): Fix fall-through comment.
3733 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3734 comment.
3735 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3736 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3737 * jv-exp.y (yylex): Fix fall-through comment.
3738 * go-exp.y (lex_one_token): Fix fall-through comment.
3739 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3740 fall-through comment.
3741 * f-exp.y (yylex): Fix fall-through comment.
3742 * dwarf2read.c (process_die): Fix fall-through comments.
3743 * dbxread.c (process_one_symbol): Fix fall-through comment.
3744 * d-exp.y (lex_one_token): Fix fall-through comment.
3745 * cp-name-parser.y (yylex): Fix fall-through comment.
3746 * coffread.c (coff_symtab_read): Fix fall-through comment.
3747 * c-exp.y (lex_one_token): Fix fall-through comment.
3748 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3749 comment.
3750 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3751 comment.
3752
56bcdbea
TT
37532018-05-04 Tom Tromey <tom@tromey.com>
3754
3755 PR python/22730:
3756 * NEWS: Mention gdb.execute change.
3757 * gdbcmd.h (execute_control_command): Don't declare.
3758 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3759 execute_control_commands, execute_control_commands_to_string.
3760 * cli/cli-script.h (execute_control_commands)
3761 (execute_control_commands_to_string): Declare.
3762 (execute_control_command): Add from_tty parameter.
3763 * cli/cli-script.c (execute_control_commands)
3764 (execute_control_commands_to_string): New functions.
3765 (execute_user_command): Use execute_control_commands.
3766 (execute_control_command_1): Add "from_tty" parameter. Update.
3767 (execute_control_command): Likewise.
3768
a913fffb
TT
37692018-05-04 Tom Tromey <tom@tromey.com>
3770
3771 PR python/22731:
3772 * NEWS: Mention that breakpoint commands are writable.
3773 * python/py-breakpoint.c (bppy_set_commands): New function.
3774 (breakpoint_object_getset) <"commands">: Use it.
3775
60b3cef2
TT
37762018-05-04 Tom Tromey <tom@tromey.com>
3777
3778 * tracepoint.c (actions_command): Update.
3779 * mi/mi-cmd-break.c (mi_command_line_array)
3780 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3781 (mi_read_next_line): Remove.
3782 (mi_cmd_break_commands): Update.
3783 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3784 function_view.
3785 * cli/cli-script.c (get_command_line): Update.
3786 (process_next_line): Use function_view. Constify.
3787 (recurse_read_control_structure, read_command_lines)
3788 (read_command_lines_1): Change argument types to function_view.
3789 (do_define_command, document_command): Update.
3790 * breakpoint.h (check_tracepoint_command): Don't declare.
3791 * breakpoint.c (check_tracepoint_command): Remove.
3792 (commands_command_1, create_tracepoint_from_upload): Update.
3793
7a2c85f2
TT
37942018-05-04 Tom Tromey <tom@tromey.com>
3795
3796 PR gdb/11750:
3797 * cli/cli-script.h (enum command_control_type) <define_control>:
3798 New constant.
3799 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3800 (build_command_line, execute_control_command_1)
3801 (process_next_line): Likewise.
3802 (do_define_command): New function, extracted from define_command.
3803 (define_command): Use it.
3804
295dc222
TT
38052018-05-04 Tom Tromey <tom@tromey.com>
3806
3807 * tracepoint.c (actions_command): Update.
3808 * cli/cli-script.h (read_command_lines): Update.
3809 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3810 (MAX_TMPBUF): Remove define.
3811 (define_command): Use string_printf.
3812 (document_command): Likewise.
3813 * breakpoint.c (commands_command_1): Update.
3814
1263a9d5
TT
38152018-05-04 Tom Tromey <tom@tromey.com>
3816
3817 * top.c (execute_command): Update.
3818 * cli/cli-script.h (print_command_lines): Now varargs.
3819 * cli/cli-script.c (print_command_lines): Now varargs.
3820 (execute_control_command_1) <case while_control, case if_control>:
3821 Update.
3822
12973681
TT
38232018-05-04 Tom Tromey <tom@tromey.com>
3824
3825 * tracepoint.c (all_tracepoint_actions): Rename from
3826 all_tracepoint_actions_and_cleanup. Change return type.
3827 (actions_command, encode_actions_1, encode_actions)
3828 (trace_dump_actions, tdump_command): Update.
3829 * remote.c (remote_download_command_source): Update.
3830 * python/python.c (gdbpy_eval_from_control_command)
3831 (python_command, python_interactive_command): Update.
3832 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3833 * guile/guile.c (guile_command)
3834 (gdbscm_eval_from_control_command, guile_command): Update.
3835 * compile/compile.c (compile_code_command)
3836 (compile_print_command, compile_to_object): Update.
3837 * cli/cli-script.h (struct command_lines_deleter): New.
3838 (counted_command_line): New typedef.
3839 (struct command_line): Add constructor, destructor.
3840 <body_list>: Remove.
3841 <body_list_0, body_list_1>: New members.
3842 (command_line_up): Remove typedef.
3843 (read_command_lines, read_command_lines_1, get_command_line):
3844 Update.
3845 (copy_command_lines): Don't declare.
3846 * cli/cli-script.c (build_command_line): Use "new".
3847 (get_command_line): Return counted_command_line.
3848 (print_command_lines, execute_user_command)
3849 (execute_control_command_1, while_command, if_command): Update.
3850 (realloc_body_list): Remove.
3851 (process_next_line, recurse_read_control_structure): Update.
3852 (read_command_lines, read_command_lines_1): Return counted_command_line.
3853 (free_command_lines): Use "delete".
3854 (copy_command_lines): Remove.
3855 (define_command, document_command, show_user_1): Update.
3856 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3857 a counted_command_line.
3858 * breakpoint.h (counted_command_line): Remove typedef.
3859 (breakpoint_set_commands): Update.
3860 * breakpoint.c (check_no_tracepoint_commands)
3861 (validate_commands_for_breakpoint): Update.
3862 (breakpoint_set_commands): Change commands to be a
3863 counted_command_line.
3864 (commands_command_1, update_dprintf_command_list)
3865 (create_tracepoint_from_upload): Update.
3866
e2fc72e2
TT
38672018-05-04 Tom Tromey <tom@tromey.com>
3868
3869 * cli/cli-decode.h (cmd_list_element): New constructor.
3870 (~cmd_list_element): New destructor.
3871 (struct cmd_list_element): Add initializers.
3872 * cli/cli-decode.c (do_add_cmd): Use "new".
3873 (delete_cmd): Use "delete".
3874
a3b60e45
JK
38752018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3876 Pedro Alves <palves@redhat.com>
3877
3878 PR breakpoints/19806 and support for PR external/20207.
3879 * NEWS: Mention Aarch64 watchpoint improvements.
3880 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3881 watchpoints and PR external/20207 watchpoints.
3882 * nat/aarch64-linux-hw-point.c
3883 (kernel_supports_any_contiguous_range): New.
3884 (aarch64_watchpoint_offset): New.
3885 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3886 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3887 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3888 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3889 next_addr_orig_p. Support PR external/20207 watchpoints.
3890 (aarch64_downgrade_regs): New.
3891 (aarch64_dr_state_insert_one_point): New parameters offset and
3892 addr_orig.
3893 (aarch64_dr_state_remove_one_point): Likewise.
3894 (aarch64_handle_breakpoint): Update caller.
3895 (aarch64_handle_aligned_watchpoint): Likewise.
3896 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3897 aligned_offset.
3898 (aarch64_linux_set_debug_regs): Remove const from state. Call
3899 aarch64_downgrade_regs.
3900 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3901 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3902 (DR_CONTROL_MASK): ... this.
3903 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3904 (unsigned int aarch64_watchpoint_offset): New prototype.
3905 (aarch64_linux_set_debug_regs): Remove const from state.
3906 * utils.c (align_up, align_down): Move to ...
3907 * common/common-utils.c (align_up, align_down): ... here.
3908 * utils.h (align_up, align_down): Move to ...
3909 * common/common-utils.h (align_up, align_down): ... here.
3910
05bc7456
JB
39112018-05-04 Joel Brobecker <brobecker@adacore.com>
3912
3913 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3914 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3915 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3916 Re-implement to match the ABI as summarized in GCC's
3917 gcc/config/sparc/sparc.c. All callers updated.
3918 (sparc32_store_arguments): Remove assertion.
3919
2f433492
TT
39202018-05-04 Tom Tromey <tom@tromey.com>
3921
3922 * printcmd.c: Don't include tui.h.
3923 (decode_format): Use skip_spaces.
3924
9be2ae8f
TT
39252018-05-04 Tom Tromey <tom@tromey.com>
3926
3927 PR gdb/22619:
3928 * printcmd.c (last_count): New global.
3929 (x_command): Use saved count when repeating.
3930
f0b3976b
TT
39312018-05-04 Tom Tromey <tom@tromey.com>
3932
3933 * nto-procfs.c (do_closedir_cleanup): Remove.
3934 (procfs_pidlist): Use gdb_dir_up.
3935 * procfs.c (do_closedir_cleanup): Remove.
3936 (proc_update_threads): Use gdb_dir_up.
3937 * common/filestuff.h (struct gdb_dir_deleter): New.
3938 (gdb_dir_up): New typedef.
3939
862d101a
TT
39402018-05-04 Tom Tromey <tom@tromey.com>
3941
3942 * ada-lang.c (print_mention_exception): Use std::string.
3943
cb7de75e
TT
39442018-05-04 Tom Tromey <tom@tromey.com>
3945
3946 * ada-lang.c (create_excep_cond_exprs): Update.
3947 (ada_exception_catchpoint_cond_string): Use std::string.
3948
49d83361
TT
39492018-05-04 Tom Tromey <tom@tromey.com>
3950
3951 * ada-lang.c (xget_renaming_scope): Return std::string.
3952 (old_renaming_is_invisible): Update.
3953
ade72a34
TT
39542018-05-04 Tom Tromey <tom@tromey.com>
3955
3956 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3957 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3958
2be4d7f0
UW
39592018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3960
3961 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3962
69b6ecb0
TT
39632018-05-04 Tom Tromey <tom@tromey.com>
3964
3965 * remote.c (remote_query_supported_append): Change type.
3966 (remote_check_symbols): Update.
3967
bf27f0e2
PP
39682018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3969
3970 PR gdb/11420
3971 * configure.ac: Prepend libpython.
3972 * python/python-config.py: Likewise.
3973 * configure: Regenerate.
3974
4ea17de8
SM
39752018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3976
3977 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3978
bd732259
PA
39792018-05-03 Pedro Alves <palves@redhat.com>
3980
3981 * s390-linux-nat.c
3982 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3983 override. Write 'true' instead of '1'.
3984 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3985 declaration.
3986
d9f719f1
PA
39872018-05-02 Pedro Alves <palves@redhat.com>
3988
3989 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3990 add_inf_child_target.
3991 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3992 add_inf_child_target.
3993 * aix-thread.c (aix_thread_target_info): New.
3994 (aix_thread_target) <shortname, longname, doc>: Delete.
3995 <info>: New.
3996 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3997 add_inf_child_target.
3998 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3999 add_inf_child_target.
4000 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4001 add_inf_child_target.
4002 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4003 add_inf_child_target.
4004 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4005 add_inf_child_target.
4006 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4007 add_inf_child_target.
4008 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4009 add_inf_child_target.
4010 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4011 add_inf_child_target.
4012 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4013 add_inf_child_target.
4014 * bfd-target.c (target_bfd_target_info): New.
4015 (target_bfd) <shortname, longname, doc>: Delete.
4016 <info>: New.
4017 * bsd-kvm.c (bsd_kvm_target_info): New.
4018 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4019 <info>: New.
4020 (bsd_kvm_target::open): Rename to ...
4021 (bsd_kvm_target_open): ... this. Adjust.
4022 * bsd-uthread.c (bsd_uthread_target_info): New.
4023 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4024 <info>: New.
4025 * corefile.c (core_file_command): Adjust.
4026 * corelow.c (core_target_info): New.
4027 (core_target) <shortname, longname, doc>: Delete.
4028 <info>: New.
4029 (core_target::open): Rename to ...
4030 (core_target_open): ... this. Adjust.
4031 * ctf.c (ctf_target_info): New.
4032 (ctf_target) <shortname, longname, doc>: Delete.
4033 <info>: New.
4034 (ctf_target::open): Rename to ...
4035 (ctf_target_open): ... this.
4036 (_initialize_ctf): Adjust.
4037 * exec.c (exec_target_info): New.
4038 (exec_target) <shortname, longname, doc>: Delete.
4039 <info>: New.
4040 (exec_target::open): Rename to ...
4041 (exec_target_open): ... this.
4042 * gdbcore.h (core_target_open): Declare.
4043 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4044 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4045 add_inf_child_target.
4046 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4047 add_inf_child_target.
4048 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4049 add_inf_child_target.
4050 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4051 add_inf_child_target.
4052 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4053 add_inf_child_target.
4054 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4055 add_inf_child_target.
4056 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4057 add_inf_child_target.
4058 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4059 add_inf_child_target.
4060 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4061 add_inf_child_target.
4062 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4063 add_inf_child_target.
4064 * inf-child.c (inf_child_target_info): New.
4065 (inf_child_target::info): New.
4066 (inf_child_open_target): Remove 'target' parameter. Use
4067 get_native_target instead.
4068 (inf_child_target::open): Delete.
4069 (add_inf_child_target): New.
4070 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4071 Delete.
4072 <info>: New.
4073 (add_inf_child_target): Declare.
4074 (inf_child_open_target): Declare.
4075 * linux-thread-db.c (thread_db_target_info): New.
4076 (thread_db_target) <shortname, longname, doc>: Delete.
4077 <info>: New.
4078 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4079 add_inf_child_target.
4080 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4081 add_inf_child_target.
4082 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4083 add_inf_child_target.
4084 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4085 add_inf_child_target.
4086 * make-target-delegates (print_class): Adjust.
4087 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4088 add_inf_child_target.
4089 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4090 add_inf_child_target.
4091 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4092 add_inf_child_target.
4093 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4094 add_inf_child_target.
4095 * nto-procfs.c (nto_native_target_info): New.
4096 (nto_procfs_target_native) <shortname, longname, doc>:
4097 Delete.
4098 <info>: New.
4099 (nto_procfs_target_info): New.
4100 (nto_procfs_target_procfs) <shortname, longname, doc>:
4101 Delete.
4102 <info>: New.
4103 (init_procfs_targets): Adjust.
4104 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4105 add_inf_child_target.
4106 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4107 add_inf_child_target.
4108 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4109 add_inf_child_target.
4110 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4111 add_inf_child_target.
4112 * ravenscar-thread.c (ravenscar_target_info): New.
4113 (ravenscar_thread_target) <shortname, longname, doc>:
4114 Delete.
4115 <info>: New.
4116 * record-btrace.c (record_btrace_target_info):
4117 (record_btrace_target) <shortname, longname, doc>: Delete.
4118 <info>: New.
4119 (record_btrace_target::open): Rename to ...
4120 (record_btrace_target_open): ... this. Adjust.
4121 * record-full.c (record_longname, record_doc): New.
4122 (record_full_base_target) <shortname, longname, doc>: Delete.
4123 <info>: New.
4124 (record_full_target_info): New.
4125 (record_full_target): <shortname>: Delete.
4126 <info>: New.
4127 (record_full_core_open_1, record_full_open_1): Update comments.
4128 (record_full_base_target::open): Rename to ...
4129 (record_full_open): ... this.
4130 (cmd_record_full_restore): Update.
4131 (_initialize_record_full): Update.
4132 * remote-sim.c (remote_sim_target_info): New.
4133 (gdbsim_target) <shortname, longname, doc>: Delete.
4134 <info>: New.
4135 (gdbsim_target::open): Rename to ...
4136 (gdbsim_target_open): ... this.
4137 (_initialize_remote_sim): Adjust.
4138 * remote.c (remote_doc): New.
4139 (remote_target_info): New.
4140 (remote_target) <shortname, longname, doc>: Delete.
4141 <info>: New.
4142 (extended_remote_target_info): New.
4143 (extended_remote_target) <shortname, longname, doc>: Delete.
4144 <info>: New.
4145 (remote_target::open_1): Make static. Adjust.
4146 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4147 * s390-linux-nat.c (_initialize_s390_nat): Use
4148 add_inf_child_target.
4149 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4150 add_inf_child_target.
4151 * sol-thread.c (thread_db_target_info): New.
4152 (sol_thread_target) <shortname, longname, doc>: Delete.
4153 <info>: New.
4154 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4155 add_inf_child_target.
4156 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4157 add_inf_child_target.
4158 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4159 add_inf_child_target.
4160 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4161 add_inf_child_target.
4162 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4163 add_inf_child_target.
4164 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4165 add_inf_child_target.
4166 * spu-linux-nat.c (_initialize_spu_nat): Use
4167 add_inf_child_target.
4168 * spu-multiarch.c (spu_multiarch_target_info): New.
4169 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4170 <info>: New.
4171 * target-delegates.c: Regenerate.
4172 * target.c: Include <unordered_map>.
4173 (target_ops_p): Delete.
4174 (DEF_VEC_P(target_ops_p)): Delete.
4175 (target_factories): New.
4176 (test_target_info): New.
4177 (test_target_ops::info): New.
4178 (open_target): Adjust to use target_factories.
4179 (add_target_with_completer): Rename to ...
4180 (add_target): ... this. Change prototype. Register target_info
4181 and open callback in target_factories. Register target_info in
4182 command context instead of target_ops.
4183 (add_target): Delete old implementation.
4184 (add_deprecated_target_alias): Change prototype. Adjust.
4185 (the_native_target): New.
4186 (set_native_target, get_native_target): New.
4187 (find_default_run_target): Use the_native_target.
4188 (find_attach_target, find_run_target): Simplify.
4189 (target_ops::open): Delete.
4190 (dummy_target_info): New.
4191 (dummy_target::shortname, dummy_target::longname)
4192 (dummy_target::doc): Delete.
4193 (dummy_target::info): New.
4194 (debug_target::shortname, debug_target::longname)
4195 (debug_target::doc): Delete.
4196 (debug_target::info): New.
4197 * target.h (struct target_info): New.
4198 (target_ops::~target_ops): Add comment.
4199 (target_ops::info): New.
4200 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4201 longer virtual. Implement in terms of target_info.
4202 (set_native_target, get_native_target): Declare.
4203 (target_open_ftype): New.
4204 (add_target, add_target_with_completer)
4205 (add_deprecated_target_alias): Change prototype.
4206 (test_target) <shortname, longname, doc>: Delete.
4207 <info>: New.
4208 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4209 add_inf_child_target.
4210 * tracefile-tfile.c (tfile_target_info): New.
4211 (tfile_target) <shortname, longname, doc>: Delete.
4212 <info>: New.
4213 (tfile_target::open): Rename to ...
4214 (tfile_target_open): ... this.
4215 (_initialize_tracefile_tfile): Adjust.
4216 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4217 add_inf_child_target.
4218 * windows-nat.c (_initialize_windows_nat): Use
4219 add_inf_child_target.
4220 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4221 add_inf_child_target.
4222
135340af
PA
42232018-05-02 Pedro Alves <palves@redhat.com>
4224
4225 * linux-nat.h (linux_nat_target) <low_new_thread,
4226 low_delete_thread, low_new_fork, low_forget_process,
4227 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4228 New virtual methods.
4229 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4230 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4231 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4232 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4233 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4234 Delete.
4235 * linux-fork.c (delete_fork): Adjust to call low method.
4236 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4237 (linux_nat_new_fork, linux_nat_forget_process_hook)
4238 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4239 (linux_nat_status_is_event):
4240 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4241 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4242 to call low method.
4243 (sigtrap_is_event): Rename to ...
4244 (linux_nat_target::low_status_is_event): ... this.
4245 (linux_nat_set_status_is_event): Delete.
4246 (save_stop_reason, linux_nat_wait_1)
4247 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4248 low methods.
4249 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4250 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4251 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4252 (linux_nat_set_prepare_to_resume): Delete.
4253 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4254 low virtual methods.
4255 * amd64-linux-nat.c: Likewise.
4256 * arm-linux-nat.c: Likewise.
4257 * i386-linux-nat.c: Likewise.
4258 * ia64-linux-nat.c: Likewise.
4259 * mips-linux-nat.c: Likewise.
4260 * ppc-linux-nat.c: Likewise.
4261 * s390-linux-nat.c: Likewise.
4262 * sparc64-linux-nat.c: Likewise.
4263 * x86-linux-nat.c: Likewise.
4264 * x86-linux-nat.h: Include "nat/x86-linux.h".
4265 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4266 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4267 Override methods.
4268
57810aa7
PA
42692018-05-02 Pedro Alves <palves@redhat.com>
4270
4271 * target.h (target_ops)
4272 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4273 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4274 stopped_by_watchpoint, have_continuable_watchpoint,
4275 stopped_data_address, watchpoint_addr_within_range,
4276 can_accel_watchpoint_condition, can_run, thread_alive,
4277 has_all_memory, has_memory, has_stack, has_registers,
4278 has_execution, can_async_p, is_async_p, supports_non_stop,
4279 always_non_stop_p, can_execute_reverse, supports_multi_process,
4280 supports_enable_disable_tracepoint,
4281 supports_disable_randomization, supports_string_tracing,
4282 supports_evaluation_of_breakpoint_conditions,
4283 can_run_breakpoint_commands, filesystem_is_local,
4284 can_download_tracepoint, get_trace_state_variable_value,
4285 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4286 record_is_replaying, record_will_replay,
4287 augmented_libraries_svr4_read>: Adjust to return bool.
4288 * aarch64-linux-nat.c: All implementations adjusted.
4289 * aix-thread.c: All implementations adjusted.
4290 * arm-linux-nat.c: All implementations adjusted.
4291 * breakpoint.c: All implementations adjusted.
4292 * bsd-kvm.c: All implementations adjusted.
4293 * bsd-uthread.c: All implementations adjusted.
4294 * corelow.c: All implementations adjusted.
4295 * ctf.c: All implementations adjusted.
4296 * darwin-nat.c: All implementations adjusted.
4297 * darwin-nat.h: All implementations adjusted.
4298 * exec.c: All implementations adjusted.
4299 * fbsd-nat.c: All implementations adjusted.
4300 * fbsd-nat.h: All implementations adjusted.
4301 * gnu-nat.c: All implementations adjusted.
4302 * gnu-nat.h: All implementations adjusted.
4303 * go32-nat.c: All implementations adjusted.
4304 * ia64-linux-nat.c: All implementations adjusted.
4305 * inf-child.c: All implementations adjusted.
4306 * inf-child.h: All implementations adjusted.
4307 * inf-ptrace.c: All implementations adjusted.
4308 * inf-ptrace.h: All implementations adjusted.
4309 * linux-nat.c: All implementations adjusted.
4310 * linux-nat.h: All implementations adjusted.
4311 * mips-linux-nat.c: All implementations adjusted.
4312 * nto-procfs.c: All implementations adjusted.
4313 * ppc-linux-nat.c: All implementations adjusted.
4314 * procfs.c: All implementations adjusted.
4315 * ravenscar-thread.c: All implementations adjusted.
4316 * record-btrace.c: All implementations adjusted.
4317 * record-full.c: All implementations adjusted.
4318 * remote-sim.c: All implementations adjusted.
4319 * remote.c: All implementations adjusted.
4320 * s390-linux-nat.c: All implementations adjusted.
4321 * sol-thread.c: All implementations adjusted.
4322 * spu-multiarch.c: All implementations adjusted.
4323 * target-delegates.c: All implementations adjusted.
4324 * target.c: All implementations adjusted.
4325 * target.h: All implementations adjusted.
4326 * tracefile-tfile.c: All implementations adjusted.
4327 * tracefile.c: All implementations adjusted.
4328 * tracefile.h: All implementations adjusted.
4329 * windows-nat.c: All implementations adjusted.
4330 * x86-linux-nat.h: All implementations adjusted.
4331 * x86-nat.h: All implementations adjusted.
4332
ad6a4e2d
PA
43332018-05-02 Pedro Alves <palves@redhat.com>
4334
4335 * make-target-delegates (scan_target_h): Don't trim lines here.
4336 Replace sequences of tabs and/or whitespace with a single
4337 whitespace.
4338 (top level, parsing methods): Trim each line before processing it
4339 here.
4340
f6ac5f3d
PA
43412018-05-02 Pedro Alves <palves@redhat.com>
4342 John Baldwin <jhb@freebsd.org>
4343
4344 * target.h (enum strata) <debug_stratum>: New.
4345 (struct target_ops) <all delegation methods>: Replace by C++
4346 virtual methods, and drop "to_" prefix. All references updated
4347 throughout.
4348 <to_shortname, to_longname, to_doc, to_data,
4349 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4350 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4351 virtual methods. All references updated throughout.
4352 <can_attach, supports_terminal_ours, can_create_inferior,
4353 get_thread_control_capabilities, attach_no_wait>: New
4354 virtual methods.
4355 <insert_breakpoint, remove_breakpoint>: Now
4356 TARGET_DEFAULT_NORETURN methods.
4357 <info_proc>: Now returns bool.
4358 <to_magic>: Delete.
4359 (OPS_MAGIC): Delete.
4360 (current_target): Delete. All references replaced by references
4361 to ...
4362 (target_stack): ... this. New.
4363 (target_shortname, target_longname): Adjust.
4364 (target_can_run): Now a function declaration.
4365 (default_child_has_all_memory, default_child_has_memory)
4366 (default_child_has_stack, default_child_has_registers)
4367 (default_child_has_execution): Remove target_ops parameter.
4368 (complete_target_initialization): Delete.
4369 (memory_breakpoint_target): New template class.
4370 (test_target_ops): Refactor as a C++ class with virtual methods.
4371 * make-target-delegates (NAME_PART): Tighten.
4372 (POINTER_PART, CP_SYMBOL): New.
4373 (SIMPLE_RETURN_PART): Reimplement.
4374 (VEC_RETURN_PART): Expect less.
4375 (RETURN_PART, VIRTUAL_PART): New.
4376 (METHOD): Adjust to C++ virtual methods.
4377 (scan_target_h): Remove reference to C99.
4378 (dname): Output "target_ops::" prefix.
4379 (write_function_header): Adjust to output a C++ class method.
4380 (write_declaration): New.
4381 (write_delegator): Adjust to output a C++ class method.
4382 (tdname): Output "dummy_target::" prefix.
4383 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4384 method.
4385 (tdefault_names, debug_names): Delete.
4386 (return_types, tdefaults, styles, argtypes_array): New.
4387 (top level): All methods are delegators.
4388 (print_class): New.
4389 (top level): Print dummy_target and debug_target classes.
4390 * target-delegates.c: Regenerate.
4391 * target-debug.h (target_debug_print_enum_info_proc_what)
4392 (target_debug_print_thread_control_capabilities)
4393 (target_debug_print_thread_info_p): New.
4394 * target.c (dummy_target): Delete.
4395 (the_dummy_target, the_debug_target): New.
4396 (target_stack): Now extern.
4397 (set_targetdebug): Push/unpush debug target.
4398 (default_child_has_all_memory, default_child_has_memory)
4399 (default_child_has_stack, default_child_has_registers)
4400 (default_child_has_execution): Remove target_ops parameter.
4401 (complete_target_initialization): Delete.
4402 (add_target_with_completer): No longer call
4403 complete_target_initialization.
4404 (target_supports_terminal_ours): Use regular delegation.
4405 (update_current_target): Delete.
4406 (push_target): No longer check magic number. Don't call
4407 update_current_target.
4408 (unpush_target): Don't call update_current_target.
4409 (target_is_pushed): No longer check magic number.
4410 (target_require_runnable): Skip for all stratums over
4411 process_stratum.
4412 (target_ops::info_proc): New.
4413 (target_info_proc): Use find_target_at and
4414 find_default_run_target.
4415 (target_supports_disable_randomization): Use regular delegation.
4416 (target_get_osdata): Use find_target_at.
4417 (target_ops::open, target_ops::close, target_ops::can_attach)
4418 (target_ops::attach, target_ops::can_create_inferior)
4419 (target_ops::create_inferior, target_ops::can_run)
4420 (target_can_run): New.
4421 (default_fileio_target): Use regular delegation.
4422 (target_ops::fileio_open, target_ops::fileio_pwrite)
4423 (target_ops::fileio_pread, target_ops::fileio_fstat)
4424 (target_ops::fileio_close, target_ops::fileio_unlink)
4425 (target_ops::fileio_readlink): New.
4426 (target_fileio_open_1, target_fileio_unlink)
4427 (target_fileio_readlink): Always call the target method. Handle
4428 FILEIO_ENOSYS.
4429 (return_zero, return_zero_has_execution): Delete.
4430 (init_dummy_target): Delete.
4431 (dummy_target::dummy_target, dummy_target::shortname)
4432 (dummy_target::longname, dummy_target::doc)
4433 (debug_target::debug_target, debug_target::shortname)
4434 (debug_target::longname, debug_target::doc): New.
4435 (target_supports_delete_record): Use regular delegation.
4436 (setup_target_debug): Delete.
4437 (maintenance_print_target_stack): Skip debug_stratum.
4438 (initialize_targets): Instantiate the_dummy_target and
4439 the_debug_target.
4440 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4441 use target_stack.
4442 (target_auxv_search, fprint_target_auxv): Adjust.
4443 (info_auxv_command): Adjust to use target_stack.
4444 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4445 * exceptions.c (print_flush): Handle a NULL target_stack.
4446 * regcache.c (target_ops_no_register): Refactor as class with
4447 virtual methods.
4448
4449 * exec.c (exec_target): New class.
4450 (exec_ops): Now an exec_target.
4451 (exec_open, exec_close_1, exec_get_section_table)
4452 (exec_xfer_partial, exec_files_info, exec_has_memory)
4453 (exec_make_note_section): Refactor as exec_target methods.
4454 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4455 Delete.
4456 (exec_target::find_memory_regions): New.
4457 (_initialize_exec): Don't call init_exec_ops.
4458 * gdbcore.h (exec_file_clear): Delete.
4459
4460 * corefile.c (core_target): Delete.
4461 (core_file_command): Adjust.
4462 * corelow.c (core_target): New class.
4463 (the_core_target): New.
4464 (core_close): Remove target_ops parameter.
4465 (core_close_cleanup): Adjust.
4466 (core_target::close): New.
4467 (core_open, core_detach, get_core_registers, core_files_info)
4468 (core_xfer_partial, core_thread_alive, core_read_description)
4469 (core_pid_to_str, core_thread_name, core_has_memory)
4470 (core_has_stack, core_has_registers, core_info_proc): Rework as
4471 core_target methods.
4472 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4473 (_initialize_corelow): Initialize the_core_target.
4474 * gdbcore.h (core_target): Delete.
4475 (the_core_target): New.
4476
4477 * ctf.c: (ctf_target): New class.
4478 (ctf_ops): Now a ctf_target.
4479 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4480 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4481 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4482 methods.
4483 (init_ctf_ops): Delete.
4484 (_initialize_ctf): Don't call it.
4485 * tracefile-tfile.c (tfile_target): New class.
4486 (tfile_ops): Now a tfile_target.
4487 (tfile_open, tfile_close, tfile_files_info)
4488 (tfile_get_tracepoint_status, tfile_trace_find)
4489 (tfile_fetch_registers, tfile_xfer_partial)
4490 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4491 Refactor as tfile_target methods.
4492 (tfile_xfer_partial_features): Remove target_ops parameter.
4493 (init_tfile_ops): Delete.
4494 (_initialize_tracefile_tfile): Don't call it.
4495 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4496 (tracefile_has_stack, tracefile_has_registers)
4497 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4498 tracefile_target methods.
4499 (init_tracefile_ops): Delete.
4500 (tracefile_target::tracefile_target): New.
4501 * tracefile.h: Include "target.h".
4502 (tracefile_target): New class.
4503 (init_tracefile_ops): Delete.
4504
4505 * spu-multiarch.c (spu_multiarch_target): New class.
4506 (spu_ops): Now a spu_multiarch_target.
4507 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4508 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4509 (spu_search_memory, spu_mourn_inferior): Refactor as
4510 spu_multiarch_target methods.
4511 (init_spu_ops): Delete.
4512 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4513 complete_target_initialization.
4514
4515 * ravenscar-thread.c (ravenscar_thread_target): New class.
4516 (ravenscar_ops): Now a ravenscar_thread_target.
4517 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4518 (ravenscar_thread_alive, ravenscar_pid_to_str)
4519 (ravenscar_fetch_registers, ravenscar_store_registers)
4520 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4521 (ravenscar_stopped_by_hw_breakpoint)
4522 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4523 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4524 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4525 methods.
4526 (init_ravenscar_thread_ops): Delete.
4527 (_initialize_ravenscar): Remove references to
4528 init_ravenscar_thread_ops and complete_target_initialization.
4529
4530 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4531 (bsd_uthread_target): New class.
4532 (bsd_uthread_ops): Now a bsd_uthread_target.
4533 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4534 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4535 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4536 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4537 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4538 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4539 (bsd_uthread_target): Delete function.
4540 (_initialize_bsd_uthread): Remove reference to
4541 complete_target_initialization.
4542
4543 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4544 (target_bfd): ... this new class.
4545 (target_bfd_xfer_partial, target_bfd_get_section_table)
4546 (target_bfd_close): Refactor as target_bfd methods.
4547 (target_bfd::~target_bfd): New.
4548 (target_bfd_reopen): Adjust.
4549 (target_bfd::close): New.
4550
4551 * record-btrace.c (record_btrace_target): New class.
4552 (record_btrace_ops): Now a record_btrace_target.
4553 (record_btrace_open, record_btrace_stop_recording)
4554 (record_btrace_disconnect, record_btrace_close)
4555 (record_btrace_async, record_btrace_info)
4556 (record_btrace_insn_history, record_btrace_insn_history_range)
4557 (record_btrace_insn_history_from, record_btrace_call_history)
4558 (record_btrace_call_history_range)
4559 (record_btrace_call_history_from, record_btrace_record_method)
4560 (record_btrace_is_replaying, record_btrace_will_replay)
4561 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4562 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4563 (record_btrace_store_registers, record_btrace_prepare_to_store)
4564 (record_btrace_to_get_unwinder)
4565 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4566 (record_btrace_commit_resume, record_btrace_wait)
4567 (record_btrace_stop, record_btrace_can_execute_reverse)
4568 (record_btrace_stopped_by_sw_breakpoint)
4569 (record_btrace_supports_stopped_by_sw_breakpoint)
4570 (record_btrace_stopped_by_hw_breakpoint)
4571 (record_btrace_supports_stopped_by_hw_breakpoint)
4572 (record_btrace_update_thread_list, record_btrace_thread_alive)
4573 (record_btrace_goto_begin, record_btrace_goto_end)
4574 (record_btrace_goto, record_btrace_stop_replaying_all)
4575 (record_btrace_execution_direction)
4576 (record_btrace_prepare_to_generate_core)
4577 (record_btrace_done_generating_core): Refactor as
4578 record_btrace_target methods.
4579 (init_record_btrace_ops): Delete.
4580 (_initialize_record_btrace): Remove reference to
4581 init_record_btrace_ops.
4582 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4583 the execution_direction global.
4584 (record_full_base_target, record_full_target)
4585 (record_full_core_target): New classes.
4586 (record_full_ops): Now a record_full_target.
4587 (record_full_core_ops): Now a record_full_core_target.
4588 (record_full_target::detach, record_full_target::disconnect)
4589 (record_full_core_target::disconnect)
4590 (record_full_target::mourn_inferior, record_full_target::kill):
4591 New.
4592 (record_full_open, record_full_close, record_full_async): Refactor
4593 as methods of the record_full_base_target class.
4594 (record_full_resume, record_full_commit_resume): Refactor
4595 as methods of the record_full_target class.
4596 (record_full_wait, record_full_stopped_by_watchpoint)
4597 (record_full_stopped_data_address)
4598 (record_full_stopped_by_sw_breakpoint)
4599 (record_full_supports_stopped_by_sw_breakpoint)
4600 (record_full_stopped_by_hw_breakpoint)
4601 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4602 methods of the record_full_base_target class.
4603 (record_full_store_registers, record_full_xfer_partial)
4604 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4605 Refactor as methods of the record_full_target class.
4606 (record_full_can_execute_reverse, record_full_get_bookmark)
4607 (record_full_goto_bookmark, record_full_execution_direction)
4608 (record_full_record_method, record_full_info, record_full_delete)
4609 (record_full_is_replaying, record_full_will_replay)
4610 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4611 (record_full_stop_replaying): Refactor as methods of the
4612 record_full_base_target class.
4613 (record_full_core_resume, record_full_core_kill)
4614 (record_full_core_fetch_registers)
4615 (record_full_core_prepare_to_store)
4616 (record_full_core_store_registers, record_full_core_xfer_partial)
4617 (record_full_core_insert_breakpoint)
4618 (record_full_core_remove_breakpoint)
4619 (record_full_core_has_execution): Refactor
4620 as methods of the record_full_core_target class.
4621 (record_full_base_target::supports_delete_record): New.
4622 (init_record_full_ops): Delete.
4623 (init_record_full_core_ops): Delete.
4624 (record_full_save): Refactor as method of the
4625 record_full_base_target class.
4626 (_initialize_record_full): Remove references to
4627 init_record_full_ops and init_record_full_core_ops.
4628
4629 * remote.c (remote_target, extended_remote_target): New classes.
4630 (remote_ops): Now a remote_target.
4631 (extended_remote_ops): Now an extended_remote_target.
4632 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4633 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4634 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4635 (remote_pass_signals, remote_set_syscall_catchpoint)
4636 (remote_program_signals, )
4637 (remote_thread_always_alive): Remove target_ops parameter.
4638 (remote_thread_alive, remote_thread_name)
4639 (remote_update_thread_list, remote_threads_extra_info)
4640 (remote_static_tracepoint_marker_at)
4641 (remote_static_tracepoint_markers_by_strid)
4642 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4643 (remote_open): Refactor as methods of remote_target.
4644 (extended_remote_open, extended_remote_detach)
4645 (extended_remote_attach, extended_remote_post_attach):
4646 (extended_remote_supports_disable_randomization)
4647 (extended_remote_create_inferior): : Refactor as method of
4648 extended_remote_target.
4649 (remote_set_permissions, remote_open_1, remote_detach)
4650 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4651 (remote_resume, remote_commit_resume, remote_stop)
4652 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4653 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4654 (remote_prepare_to_store, remote_store_registers)
4655 (remote_flash_erase, remote_flash_done, remote_files_info)
4656 (remote_kill, remote_mourn, remote_insert_breakpoint)
4657 (remote_remove_breakpoint, remote_insert_watchpoint)
4658 (remote_watchpoint_addr_within_range)
4659 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4660 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4661 (remote_supports_stopped_by_sw_breakpoint)
4662 (remote_stopped_by_hw_breakpoint)
4663 (remote_supports_stopped_by_hw_breakpoint)
4664 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4665 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4666 (remote_verify_memory): Refactor as methods of remote_target.
4667 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4668 parameter.
4669 (remote_xfer_partial, remote_get_memory_xfer_limit)
4670 (remote_search_memory, remote_rcmd, remote_memory_map)
4671 (remote_pid_to_str, remote_get_thread_local_address)
4672 (remote_get_tib_address, remote_read_description): Refactor as
4673 methods of remote_target.
4674 (remote_target::fileio_open, remote_target::fileio_pwrite)
4675 (remote_target::fileio_pread, remote_target::fileio_close): New.
4676 (remote_hostio_readlink, remote_hostio_fstat)
4677 (remote_filesystem_is_local, remote_can_execute_reverse)
4678 (remote_supports_non_stop, remote_supports_disable_randomization)
4679 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4680 (remote_supports_enable_disable_tracepoint)
4681 (remote_supports_string_tracing)
4682 (remote_can_run_breakpoint_commands, remote_trace_init)
4683 (remote_download_tracepoint, remote_can_download_tracepoint)
4684 (remote_download_trace_state_variable, remote_enable_tracepoint)
4685 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4686 (remote_trace_start, remote_get_trace_status)
4687 (remote_get_tracepoint_status, remote_trace_stop)
4688 (remote_trace_find, remote_get_trace_state_variable_value)
4689 (remote_save_trace_data, remote_get_raw_trace_data)
4690 (remote_set_disconnected_tracing, remote_core_of_thread)
4691 (remote_set_circular_trace_buffer, remote_traceframe_info)
4692 (remote_get_min_fast_tracepoint_insn_len)
4693 (remote_set_trace_buffer_size, remote_set_trace_notes)
4694 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4695 (remote_disable_btrace, remote_teardown_btrace)
4696 (remote_read_btrace, remote_btrace_conf)
4697 (remote_augmented_libraries_svr4_read, remote_load)
4698 (remote_pid_to_exec_file, remote_can_do_single_step)
4699 (remote_execution_direction, remote_thread_handle_to_thread_info):
4700 Refactor as methods of remote_target.
4701 (init_remote_ops, init_extended_remote_ops): Delete.
4702 (remote_can_async_p, remote_is_async_p, remote_async)
4703 (remote_thread_events, remote_upload_tracepoints)
4704 (remote_upload_trace_state_variables): Refactor as methods of
4705 remote_target.
4706 (_initialize_remote): Remove references to init_remote_ops and
4707 init_extended_remote_ops.
4708
4709 * remote-sim.c (gdbsim_target): New class.
4710 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4711 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4712 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4713 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4714 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4715 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4716 Refactor as methods of gdbsim_target.
4717 (gdbsim_ops): Now a gdbsim_target.
4718 (init_gdbsim_ops): Delete.
4719 (gdbsim_cntrl_c): Adjust.
4720 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4721
4722 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4723 (the_amd64_linux_nat_target): New.
4724 (amd64_linux_fetch_inferior_registers)
4725 (amd64_linux_store_inferior_registers): Refactor as methods of
4726 amd64_linux_nat_target.
4727 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4728 * i386-linux-nat.c: Don't include "linux-nat.h".
4729 (i386_linux_nat_target): New class.
4730 (the_i386_linux_nat_target): New.
4731 (i386_linux_fetch_inferior_registers)
4732 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4733 as methods of i386_linux_nat_target.
4734 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4735 * inf-child.c (inf_child_ops): Delete.
4736 (inf_child_fetch_inferior_registers)
4737 (inf_child_store_inferior_registers): Delete.
4738 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4739 methods of inf_child_target.
4740 (inf_child_target::supports_terminal_ours)
4741 (inf_child_target::terminal_init)
4742 (inf_child_target::terminal_inferior)
4743 (inf_child_target::terminal_ours_for_output)
4744 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4745 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4746 New.
4747 (inf_child_open, inf_child_disconnect, inf_child_close)
4748 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4749 (inf_child_post_startup_inferior, inf_child_can_run)
4750 (inf_child_pid_to_exec_file): Refactor as methods of
4751 inf_child_target.
4752 (inf_child_follow_fork): Delete.
4753 (inf_child_target::can_create_inferior)
4754 (inf_child_target::can_attach): New.
4755 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4756 (inf_child_target::has_stack, inf_child_target::has_registers)
4757 (inf_child_target::has_execution): New.
4758 (inf_child_fileio_open, inf_child_fileio_pwrite)
4759 (inf_child_fileio_pread, inf_child_fileio_fstat)
4760 (inf_child_fileio_close, inf_child_fileio_unlink)
4761 (inf_child_fileio_readlink, inf_child_use_agent)
4762 (inf_child_can_use_agent): Refactor as methods of
4763 inf_child_target.
4764 (return_zero, inf_child_target): Delete.
4765 (inf_child_target::inf_child_target): New.
4766 * inf-child.h: Include "target.h".
4767 (inf_child_target): Delete function prototype.
4768 (inf_child_target): New class.
4769 (inf_child_open_target, inf_child_mourn_inferior)
4770 (inf_child_maybe_unpush_target): Delete.
4771 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4772 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4773 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4774 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4775 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4776 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4777 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4778 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4779 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4780 methods of inf_ptrace_target.
4781 (inf_ptrace_target): Delete function.
4782 * inf-ptrace.h: Include "inf-child.h".
4783 (inf_ptrace_target): Delete function declaration.
4784 (inf_ptrace_target): New class.
4785 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4786 * linux-nat.c (linux_target): New.
4787 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4788 (linux_nat_target::~linux_nat_target): New.
4789 (linux_child_post_attach, linux_child_post_startup_inferior)
4790 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4791 (linux_child_remove_fork_catchpoint)
4792 (linux_child_insert_vfork_catchpoint)
4793 (linux_child_remove_vfork_catchpoint)
4794 (linux_child_insert_exec_catchpoint)
4795 (linux_child_remove_exec_catchpoint)
4796 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4797 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4798 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4799 (linux_nat_stopped_data_address)
4800 (linux_nat_stopped_by_sw_breakpoint)
4801 (linux_nat_supports_stopped_by_sw_breakpoint)
4802 (linux_nat_stopped_by_hw_breakpoint)
4803 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4804 (linux_nat_kill, linux_nat_mourn_inferior)
4805 (linux_nat_xfer_partial, linux_nat_thread_alive)
4806 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4807 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4808 (linux_child_static_tracepoint_markers_by_strid)
4809 (linux_nat_is_async_p, linux_nat_can_async_p)
4810 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4811 (linux_nat_supports_multi_process)
4812 (linux_nat_supports_disable_randomization, linux_nat_async)
4813 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4814 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4815 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4816 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4817 methods of linux_nat_target.
4818 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4819 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4820 parameter.
4821 (check_stopped_by_watchpoint): Adjust.
4822 (linux_xfer_partial): Delete.
4823 (linux_target_install_ops, linux_target, linux_nat_add_target):
4824 Delete.
4825 (linux_nat_target::linux_nat_target): New.
4826 * linux-nat.h: Include "inf-ptrace.h".
4827 (linux_nat_target): New.
4828 (linux_target, linux_target_install_ops, linux_nat_add_target):
4829 Delete function declarations.
4830 (linux_target): Declare global.
4831 * linux-thread-db.c (thread_db_target): New.
4832 (thread_db_target::thread_db_target): New.
4833 (thread_db_ops): Delete.
4834 (the_thread_db_target): New.
4835 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4836 (thread_db_update_thread_list, thread_db_pid_to_str)
4837 (thread_db_extra_thread_info)
4838 (thread_db_thread_handle_to_thread_info)
4839 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4840 (thread_db_resume): Refactor as methods of thread_db_target.
4841 (init_thread_db_ops): Delete.
4842 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4843 * x86-linux-nat.c: Don't include "linux-nat.h".
4844 (super_post_startup_inferior): Delete.
4845 (x86_linux_nat_target::~x86_linux_nat_target): New.
4846 (x86_linux_child_post_startup_inferior)
4847 (x86_linux_read_description, x86_linux_enable_btrace)
4848 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4849 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4850 methods of x86_linux_nat_target.
4851 (x86_linux_create_target): Delete. Bits folded ...
4852 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4853 pointer.
4854 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4855 (x86_linux_nat_target): New class.
4856 (x86_linux_create_target): Delete.
4857 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4858 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4859 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4860 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4861 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4862 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4863 make extern.
4864 (x86_use_watchpoints): Delete.
4865 * x86-nat.h: Include "breakpoint.h" and "target.h".
4866 (x86_use_watchpoints): Delete.
4867 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4868 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4869 (x86_insert_watchpoint, x86_remove_watchpoint)
4870 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4871 (x86_stopped_by_hw_breakpoint): New declarations.
4872 (x86_nat_target): New template class.
4873
4874 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4875 (the_ppc_linux_nat_target): New.
4876 (ppc_linux_fetch_inferior_registers)
4877 (ppc_linux_can_use_hw_breakpoint)
4878 (ppc_linux_region_ok_for_hw_watchpoint)
4879 (ppc_linux_ranged_break_num_registers)
4880 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4881 (ppc_linux_insert_mask_watchpoint)
4882 (ppc_linux_remove_mask_watchpoint)
4883 (ppc_linux_can_accel_watchpoint_condition)
4884 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4885 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4886 (ppc_linux_watchpoint_addr_within_range)
4887 (ppc_linux_masked_watch_num_registers)
4888 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4889 (ppc_linux_read_description): Refactor as methods of
4890 ppc_linux_nat_target.
4891 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4892
4893 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4894 (procfs_target): New class.
4895 (the_procfs_target): New.
4896 (procfs_target): Delete function.
4897 (procfs_auxv_parse, procfs_attach, procfs_detach)
4898 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4899 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4900 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4901 (procfs_create_inferior, procfs_update_thread_list)
4902 (procfs_thread_alive, procfs_pid_to_str)
4903 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4904 (procfs_stopped_data_address, procfs_insert_watchpoint)
4905 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4906 (proc_find_memory_regions, procfs_info_proc)
4907 (procfs_make_note_section): Refactor as methods of procfs_target.
4908 (_initialize_procfs): Adjust.
4909 * sol-thread.c (sol_thread_target): New class.
4910 (sol_thread_ops): Now a sol_thread_target.
4911 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4912 (sol_thread_fetch_registers, sol_thread_store_registers)
4913 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4914 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4915 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4916 (init_sol_thread_ops): Delete.
4917 (_initialize_sol_thread): Adjust. Remove references to
4918 init_sol_thread_ops and complete_target_initialization.
4919
4920 * windows-nat.c (windows_nat_target): New class.
4921 (windows_fetch_inferior_registers)
4922 (windows_store_inferior_registers, windows_resume, windows_wait)
4923 (windows_attach, windows_detach, windows_pid_to_exec_file)
4924 (windows_files_info, windows_create_inferior)
4925 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4926 (windows_close, windows_pid_to_str, windows_xfer_partial)
4927 (windows_get_tib_address, windows_get_ada_task_ptid)
4928 (windows_thread_name, windows_thread_alive): Refactor as
4929 windows_nat_target methods.
4930 (do_initial_windows_stuff): Adjust.
4931 (windows_target): Delete function.
4932 (_initialize_windows_nat): Adjust.
4933
4934 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4935 (darwin_mourn_inferior, darwin_kill_inferior)
4936 (darwin_create_inferior, darwin_attach, darwin_detach)
4937 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4938 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4939 (darwin_supports_multi_process): Refactor as darwin_nat_target
4940 methods.
4941 (darwin_resume_to, darwin_files_info): Delete.
4942 (_initialize_darwin_inferior): Rename to ...
4943 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4944 * darwin-nat.h: Include "inf-child.h".
4945 (darwin_nat_target): New class.
4946 (darwin_complete_target): Delete.
4947 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4948 (darwin_target): New.
4949 (i386_darwin_fetch_inferior_registers)
4950 (i386_darwin_store_inferior_registers): Refactor as methods of
4951 darwin_nat_target.
4952 (darwin_complete_target): Delete, with ...
4953 (_initialize_i386_darwin_nat): ... bits factored out here.
4954
4955 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4956 (the_alpha_linux_nat_target): New.
4957 (alpha_linux_register_u_offset): Refactor as
4958 alpha_linux_nat_target method.
4959 (_initialize_alpha_linux_nat): Adjust.
4960 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4961 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4962 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4963 methods of linux_nat_trad_target.
4964 (linux_trad_target): Delete.
4965 * linux-nat-trad.h (linux_trad_target): Delete function.
4966 (linux_nat_trad_target): New class.
4967 * mips-linux-nat.c (mips_linux_nat_target): New class.
4968 (super_fetch_registers, super_store_registers, super_close):
4969 Delete.
4970 (the_mips_linux_nat_target): New.
4971 (mips64_linux_regsets_fetch_registers)
4972 (mips64_linux_regsets_store_registers)
4973 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4974 (mips_linux_register_u_offset, mips_linux_read_description)
4975 (mips_linux_can_use_hw_breakpoint)
4976 (mips_linux_stopped_by_watchpoint)
4977 (mips_linux_stopped_data_address)
4978 (mips_linux_region_ok_for_hw_watchpoint)
4979 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4980 (mips_linux_close): Refactor as methods of mips_linux_nat.
4981 (_initialize_mips_linux_nat): Adjust to C++ification.
4982
4983 * aix-thread.c (aix_thread_target): New class.
4984 (aix_thread_ops): Now an aix_thread_target.
4985 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4986 (aix_thread_fetch_registers, aix_thread_store_registers)
4987 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4988 (aix_thread_thread_alive, aix_thread_pid_to_str)
4989 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4990 Refactor as methods of aix_thread_target.
4991 (init_aix_thread_ops): Delete.
4992 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4993 and complete_target_initialization.
4994 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4995 (rs6000_nat_target): New class.
4996 (the_rs6000_nat_target): New.
4997 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4998 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4999 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5000 (super_create_inferior): Delete.
5001 (_initialize_rs6000_nat): Adjust to C++ification.
5002
5003 * arm-linux-nat.c (arm_linux_nat_target): New class.
5004 (the_arm_linux_nat_target): New.
5005 (arm_linux_fetch_inferior_registers)
5006 (arm_linux_store_inferior_registers, arm_linux_read_description)
5007 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5008 (arm_linux_remove_hw_breakpoint)
5009 (arm_linux_region_ok_for_hw_watchpoint)
5010 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5011 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5012 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5013 arm_linux_nat_target.
5014 (_initialize_arm_linux_nat): Adjust to C++ification.
5015
5016 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5017 (the_aarch64_linux_nat_target): New.
5018 (aarch64_linux_fetch_inferior_registers)
5019 (aarch64_linux_store_inferior_registers)
5020 (aarch64_linux_child_post_startup_inferior)
5021 (aarch64_linux_read_description)
5022 (aarch64_linux_can_use_hw_breakpoint)
5023 (aarch64_linux_insert_hw_breakpoint)
5024 (aarch64_linux_remove_hw_breakpoint)
5025 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5026 (aarch64_linux_region_ok_for_hw_watchpoint)
5027 (aarch64_linux_stopped_data_address)
5028 (aarch64_linux_stopped_by_watchpoint)
5029 (aarch64_linux_watchpoint_addr_within_range)
5030 (aarch64_linux_can_do_single_step): Refactor as methods of
5031 aarch64_linux_nat_target.
5032 (super_post_startup_inferior): Delete.
5033 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5034
5035 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5036 (the_hppa_linux_nat_target): New.
5037 (hppa_linux_fetch_inferior_registers)
5038 (hppa_linux_store_inferior_registers): Refactor as methods of
5039 hppa_linux_nat_target.
5040 (_initialize_hppa_linux_nat): Adjust to C++ification.
5041
5042 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5043 (the_ia64_linux_nat_target): New.
5044 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5045 (ia64_linux_stopped_data_address)
5046 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5047 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5048 ia64_linux_nat_target methods.
5049 (super_xfer_partial): Delete.
5050 (_initialize_ia64_linux_nat): Adjust to C++ification.
5051
5052 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5053 (the_m32r_linux_nat_target): New.
5054 (m32r_linux_fetch_inferior_registers)
5055 (m32r_linux_store_inferior_registers): Refactor as
5056 m32r_linux_nat_target methods.
5057 (_initialize_m32r_linux_nat): Adjust to C++ification.
5058
5059 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5060 (the_m68k_linux_nat_target): New.
5061 (m68k_linux_fetch_inferior_registers)
5062 (m68k_linux_store_inferior_registers): Refactor as
5063 m68k_linux_nat_target methods.
5064 (_initialize_m68k_linux_nat): Adjust to C++ification.
5065
5066 * s390-linux-nat.c (s390_linux_nat_target): New class.
5067 (the_s390_linux_nat_target): New.
5068 (s390_linux_fetch_inferior_registers)
5069 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5070 (s390_insert_watchpoint, s390_remove_watchpoint)
5071 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5072 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5073 (s390_auxv_parse, s390_read_description): Refactor as methods of
5074 s390_linux_nat_target.
5075 (_initialize_s390_nat): Adjust to C++ification.
5076
5077 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5078 (the_sparc_linux_nat_target): New.
5079 (_initialize_sparc_linux_nat): Adjust to C++ification.
5080 * sparc-nat.c (sparc_fetch_inferior_registers)
5081 (sparc_store_inferior_registers): Remove target_ops parameter.
5082 * sparc-nat.h (sparc_fetch_inferior_registers)
5083 (sparc_store_inferior_registers): Remove target_ops parameter.
5084 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5085 (the_sparc64_linux_nat_target): New.
5086 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5087
5088 * spu-linux-nat.c (spu_linux_nat_target): New class.
5089 (the_spu_linux_nat_target): New.
5090 (spu_child_post_startup_inferior, spu_child_post_attach)
5091 (spu_child_wait, spu_fetch_inferior_registers)
5092 (spu_store_inferior_registers, spu_xfer_partial)
5093 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5094 methods.
5095 (_initialize_spu_nat): Adjust to C++ification.
5096
5097 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5098 (the_tilegx_linux_nat_target): New.
5099 (fetch_inferior_registers, store_inferior_registers):
5100 Refactor as methods.
5101 (_initialize_tile_linux_nat): Adjust to C++ification.
5102
5103 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5104 (the_xtensa_linux_nat_target): New.
5105 (xtensa_linux_fetch_inferior_registers)
5106 (xtensa_linux_store_inferior_registers): Refactor as
5107 xtensa_linux_nat_target methods.
5108 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5109
5110 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5111 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5112 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5113 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5114 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5115 (fbsd_stopped_by_sw_breakpoint)
5116 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5117 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5118 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5119 (fbsd_post_startup_inferior, fbsd_post_attach)
5120 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5121 (fbsd_set_syscall_catchpoint)
5122 (super_xfer_partial, super_resume, super_wait)
5123 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5124 (fbsd_handle_debug_trap): Remove target_ops parameter.
5125 (fbsd_nat_add_target): Delete.
5126 * fbsd-nat.h: Include "inf-ptrace.h".
5127 (fbsd_nat_add_target): Delete.
5128 (USE_SIGTRAP_SIGINFO): Define.
5129 (fbsd_nat_target): New class.
5130
5131 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5132 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5133 (amd64bsd_target): Delete.
5134 * amd64-bsd-nat.h: New file.
5135 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5136 "x86-bsd-nat.h".
5137 (amd64_fbsd_nat_target): New class.
5138 (the_amd64_fbsd_nat_target): New.
5139 (amd64fbsd_read_description): Refactor as method of
5140 amd64_fbsd_nat_target.
5141 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5142 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5143 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5144 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5145 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5146 (i386bsd_target): Delete.
5147 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5148 (i386bsd_fetch_inferior_registers)
5149 (i386bsd_store_inferior_registers): Declare.
5150 (i386_bsd_nat_target): New class.
5151 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5152 (the_i386_fbsd_nat_target): New.
5153 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5154 i386_fbsd_nat_target methods.
5155 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5156 (_initialize_i386fbsd_nat): Adjust to C++ification.
5157 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5158 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5159 (_initialize_x86_bsd_nat): Adjust to C++ification.
5160 * x86-bsd-nat.h: Include "x86-nat.h".
5161 (x86bsd_target): Delete declaration.
5162 (x86bsd_nat_target): New class.
5163
5164 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5165 (the_aarch64_fbsd_nat_target): New.
5166 (aarch64_fbsd_fetch_inferior_registers)
5167 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5168 aarch64_fbsd_nat_target.
5169 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5170 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5171 (the_alpha_bsd_nat_target): New.
5172 (alphabsd_fetch_inferior_registers)
5173 (alphabsd_store_inferior_registers): Refactor as
5174 alpha_bsd_nat_target methods.
5175 (_initialize_alphabsd_nat): Refactor as methods of
5176 alpha_bsd_nat_target.
5177 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5178 (the_amd64_nbsd_nat_target): New.
5179 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5180 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5181 (the_amd64_obsd_nat_target): New.
5182 (_initialize_amd64obsd_nat): Adjust to C++ification.
5183 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5184 (the_arm_fbsd_nat_target): New.
5185 (arm_fbsd_fetch_inferior_registers)
5186 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5187 (_initialize_arm_fbsd_nat): Refactor as methods of
5188 arm_fbsd_nat_target.
5189 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5190 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5191 (the_arm_netbsd_nat_target): New.
5192 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5193 arm_netbsd_nat_target.
5194 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5195 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5196 (the_hppa_nbsd_nat_target): New.
5197 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5198 hppa_nbsd_nat_target methods.
5199 (_initialize_hppanbsd_nat): Adjust to C++ification.
5200 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5201 (the_hppa_obsd_nat_target): New.
5202 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5203 methods of hppa_obsd_nat_target.
5204 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5205 add_target.
5206 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5207 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5208 add_target.
5209 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5210 (_initialize_i386obsd_nat): Use add_target.
5211 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5212 (the_m68k_bsd_nat_target): New.
5213 (m68kbsd_fetch_inferior_registers)
5214 (m68kbsd_store_inferior_registers): Refactor as methods of
5215 m68k_bsd_nat_target.
5216 (_initialize_m68kbsd_nat): Adjust to C++ification.
5217 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5218 (the_mips_fbsd_nat_target): New.
5219 (mips_fbsd_fetch_inferior_registers)
5220 (mips_fbsd_store_inferior_registers): Refactor as methods of
5221 mips_fbsd_nat_target.
5222 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5223 add_target.
5224 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5225 (the_mips_nbsd_nat_target): New.
5226 (mipsnbsd_fetch_inferior_registers)
5227 (mipsnbsd_store_inferior_registers): Refactor as methods of
5228 mips_nbsd_nat_target.
5229 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5230 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5231 (the_mips64_obsd_nat_target): New.
5232 (mips64obsd_fetch_inferior_registers)
5233 (mips64obsd_store_inferior_registers): Refactor as methods of
5234 mips64_obsd_nat_target.
5235 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5236 add_target.
5237 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5238 nbsd_nat_target.
5239 * nbsd-nat.h: Include "inf-ptrace.h".
5240 (nbsd_nat_target): New class.
5241 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5242 (obsd_wait): Refactor as methods of obsd_nat_target.
5243 (obsd_add_target): Delete.
5244 * obsd-nat.h: Include "inf-ptrace.h".
5245 (obsd_nat_target): New class.
5246 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5247 (the_ppc_fbsd_nat_target): New.
5248 (ppcfbsd_fetch_inferior_registers)
5249 (ppcfbsd_store_inferior_registers): Refactor as methods of
5250 ppc_fbsd_nat_target.
5251 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5252 add_target.
5253 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5254 (the_ppc_nbsd_nat_target): New.
5255 (ppcnbsd_fetch_inferior_registers)
5256 (ppcnbsd_store_inferior_registers): Refactor as methods of
5257 ppc_nbsd_nat_target.
5258 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5259 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5260 (the_ppc_obsd_nat_target): New.
5261 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5262 methods of ppc_obsd_nat_target.
5263 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5264 add_target.
5265 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5266 (the_sh_nbsd_nat_target): New.
5267 (shnbsd_fetch_inferior_registers)
5268 (shnbsd_store_inferior_registers): Refactor as methods of
5269 sh_nbsd_nat_target.
5270 (_initialize_shnbsd_nat): Adjust to C++ification.
5271 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5272 (inf_ptrace_xfer_partial): Delete.
5273 (sparc_xfer_partial, sparc_target): Delete.
5274 * sparc-nat.h (sparc_fetch_inferior_registers)
5275 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5276 (sparc_target): Delete function declaration.
5277 (sparc_target): New template class.
5278 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5279 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5280 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5281 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5282 add_target.
5283 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5284 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5285 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5286 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5287 add_target.
5288 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5289 (the_vax_bsd_nat_target): New.
5290 (vaxbsd_fetch_inferior_registers)
5291 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5292 methods.
5293 (_initialize_vaxbsd_nat): Adjust to C++ification.
5294
5295 * bsd-kvm.c (bsd_kvm_target): New class.
5296 (bsd_kvm_ops): Now a bsd_kvm_target.
5297 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5298 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5299 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5300 bsd_kvm_target.
5301 (bsd_kvm_return_one): Delete.
5302 (bsd_kvm_add_target): Adjust to C++ification.
5303
5304 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5305 (nto_procfs_target_procfs): New classes.
5306 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5307 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5308 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5309 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5310 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5311 (procfs_remove_hw_breakpoint, procfs_resume)
5312 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5313 (procfs_kill_inferior, procfs_store_registers)
5314 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5315 as methods of nto_procfs_target.
5316 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5317 (nto_native_ops): Delete.
5318 (procfs_open, procfs_native_open): Delete.
5319 (nto_native_ops): Now an nto_procfs_target_native.
5320 (init_procfs_targets): Adjust to C++ification.
5321 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5322 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5323 Refactor as methods of nto_procfs_target.
5324
5325 * go32-nat.c (go32_nat_target): New class.
5326 (the_go32_nat_target): New.
5327 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5328 (go32_store_registers, go32_xfer_partial, go32_files_info)
5329 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5330 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5331 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5332 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5333 (go32_target): Delete.
5334 (_initialize_go32_nat): Adjust to C++ification.
5335
5336 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5337 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5338 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5339 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5340 gnu_nat_target.
5341 (gnu_target): Delete.
5342 * gnu-nat.h (gnu_target): Delete.
5343 (gnu_nat_target): New class.
5344 * i386-gnu-nat.c (gnu_base_target): New.
5345 (i386_gnu_nat_target): New class.
5346 (the_i386_gnu_nat_target): New.
5347 (_initialize_i386gnu_nat): Adjust to C++ification.
5348
3fffc070
PA
53492018-05-02 Pedro Alves <palves@redhat.com>
5350
5351 * bfd-target.c (target_bfd_xclose): Rename to ...
5352 (target_bfd_close): ... this.
5353 (target_bfd_reopen): Adjust.
5354 * target.c (target_close): Remove references to to_xclose.
5355 * target.h (target_ops::to_xclose): Delete.
5356 (target_ops::to_close): Update comments.
5357
6798487f
PA
53582018-05-02 Pedro Alves <palves@redhat.com>
5359
5360 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5361 "linux-nat.h".
5362 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5363 * inf-ptrace.c (inf_ptrace_register_u_offset)
5364 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5365 (inf_ptrace_store_register, inf_ptrace_store_registers)
5366 (inf_ptrace_trad_target): Move to ...
5367 * linux-nat-trad.c: ... this new file.
5368 * linux-nat-trad.h: New file.
5369 * linux-nat.c (linux_target_install_ops): Make extern.
5370 (linux_trad_target): Delete.
5371 * linux-nat.h (linux_trad_target): Delete declaration.
5372 (linux_target_install_ops): Declare.
5373 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5374 "linux-nat.h".
5375
c1955e17
PA
53762018-05-02 Pedro Alves <palves@redhat.com>
5377
5378 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5379 procfs_target/add_target here.
5380 * procfs.c (procfs_target): Make static.
5381 (_initialize_procfs): Call add_target here.
5382 * procfs.h (struct target_ops): Remove forward declaration.
5383 (procfs_target): Remove declaration.
5384 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5385
b5c8fcb1
PA
53862018-05-02 Pedro Alves <palves@redhat.com>
5387
5388 * procfs.c (procfs_stopped_by_watchpoint)
5389 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5390 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5391 Forward declare.
5392 (procfs_use_watchpoints): Delete, move contents...
5393 (procfs_target): ... here.
5394 * procfs.h (procfs_use_watchpoints): Delete declaration.
5395 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5396 procfs_use_watchpoints.
5397 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5398 procfs_use_watchpoints.
5399
0489430a
TT
54002018-05-02 Tom Tromey <tom@tromey.com>
5401
5402 PR python/20084:
5403 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5404 and var_zuinteger_unlimited.
5405 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5406 and PARAM_ZUINTEGER_UNLIMITED.
5407 (set_parameter_value): Handle var_zuinteger and
5408 var_zuinteger_unlimited.
5409 (add_setshow_generic): Likewise.
5410 (parmpy_init): Likewise.
5411
1632f8ba
DR
54122018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5413
5414 PR rust/23124
5415 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5416 pointer is not null before dereferencing it.
5417
76761936
TT
54182018-04-30 Tom Tromey <tom@tromey.com>
5419
5420 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5421 is_mi_like_p.
5422
2d33446d
TT
54232018-04-30 Tom Tromey <tom@tromey.com>
5424
5425 * breakpoint.c (mention): Remove use of is_mi_like_p.
5426 (print_mention_ranged_breakpoint): Likewise.
5427 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5428 of is_mi_like_p.
5429
f3c6abab
TT
54302018-04-30 Tom Tromey <tom@tromey.com>
5431
5432 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5433
40c03530
TT
54342018-04-30 Tom Tromey <tom@tromey.com>
5435
5436 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5437 (info_spu_event_command): Remove some uses of is_mi_like_p.
5438
2038b7fd
TT
54392018-04-30 Tom Tromey <tom@tromey.com>
5440
5441 * python/py-framefilter.c (py_print_single_arg)
5442 (enumerate_locals, py_print_args, py_print_frame): Remove some
5443 uses of is_mi_like_p.
5444
4904c3c6
TT
54452018-04-30 Tom Tromey <tom@tromey.com>
5446
5447 * ui-out.c: Update.
5448 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5449 * ui-out.h (ui_out::is_mi_like_p): Now const.
5450 (ui_out::do_is_mi_like_p): Now const.
5451 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5452
7c66fffc
TT
54532018-04-30 Tom Tromey <tom@tromey.com>
5454
5455 * varobj.c (varobj_set_visualizer): Use new_reference.
5456 * python/python.c (gdbpy_decode_line): Use new_reference.
5457 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5458 new_reference.
5459
bbfa6f00
TT
54602018-04-30 Tom Tromey <tom@tromey.com>
5461
5462 * varobj.c (install_new_value): Use new_reference.
5463 * value.h (value_incref): Return void. Swap intro comment with
5464 value_decref.
5465 * value.c (set_value_parent): Use new_reference.
5466 (value_incref): Return void. Update intro comment.
5467 (release_value): Use new_reference.
5468 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5469
1831a9f9
TT
54702018-04-30 Tom Tromey <tom@tromey.com>
5471
5472 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5473 * gdb_bfd.h (new_bfd_ref): Remove.
5474 (gdb_bfd_open): Update comment.
5475 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5476 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5477 (gdb_bfd_fdopenr): Use new_reference.
5478 * exec.c (exec_file_attach): Use new_reference.
5479
7c1b5f3d
TT
54802018-04-30 Tom Tromey <tom@tromey.com>
5481
5482 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5483 method.
5484
e11fb955
TT
54852018-04-30 Tom Tromey <tom@tromey.com>
5486
5487 * jit.c (jit_read_code_entry): Use type_align.
5488 * i386-tdep.c (i386_gdbarch_init): Don't call
5489 set_gdbarch_long_long_align_bit.
5490 * gdbarch.sh: Remove long_long_align_bit.
5491 * gdbarch.c, gdbarch.h: Rebuild.
5492 * arc-tdep.c (arc_type_align): New function.
5493 (arc_gdbarch_init): Use arc_type_align. Don't call
5494 set_gdbarch_long_long_align_bit.
5495
2fff16dd
TT
54962018-04-30 Tom Tromey <tom@tromey.com>
5497
5498 * rust-lang.c (rust_type_alignment): Remove.
5499 (rust_composite_type): Use type_align.
5500
6d7bb824
TT
55012018-04-30 Tom Tromey <tom@tromey.com>
5502
5503 * NEWS: Mention Type.align.
5504 * python/py-type.c (typy_get_alignof): New function.
5505 (type_object_getset): Add "alignof".
5506
007e1530
TT
55072018-04-30 Tom Tromey <tom@tromey.com>
5508
5509 PR exp/17095:
5510 * NEWS: Update.
5511 * std-operator.def (UNOP_ALIGNOF): New operator.
5512 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5513 New.
5514 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5515 * c-lang.c (c_op_print_tab): Add alignof.
5516 * c-exp.y (ALIGNOF): New token.
5517 (exp): Add "ALIGNOF" production.
5518 (ident_tokens): Add _Alignof and alignof.
5519
2b4424c3
TT
55202018-04-30 Tom Tromey <tom@tromey.com>
5521
5522 * i386-tdep.c (i386_type_align): New function.
5523 (i386_gdbarch_init): Update.
5524 * gdbarch.sh (type_align): New method.
5525 * gdbarch.c, gdbarch.h: Rebuild.
5526 * arch-utils.h (default_type_align): Declare.
5527 * arch-utils.c (default_type_align): New function.
5528 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5529 (struct type) <align_log2>: New field.
5530 <instance_flags>: Now a bitfield.
5531 (TYPE_RAW_ALIGN): New macro.
5532 (type_align, type_raw_align, set_type_align): Declare.
5533 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5534 functions.
5535 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5536 (get_alignment, maybe_set_alignment): New functions.
5537 (read_structure_type, read_enumeration_type, read_array_type)
5538 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5539 (read_subrange_type, read_base_type): Set type alignment.
5540
d33bc52e
SM
55412018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5542
5543 * dwarf2read.c (read_index_from_section): Use bool.
5544
e28b63a9
FG
55452018-04-29 Fabian Groffen <grobian@gentoo.org>
5546
5547 PR gdb/22950
5548 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5549 with #ifdef.
5550
cd8c76e4
JR
55512018-04-29 John Reiser <jreiser@BitWagon.com>
5552
5553 PR build/22873
5554 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5555 last step, and do it atomically.
5556
476d250e
AO
55572018-04-27 Alexandre Oliva <aoliva@redhat.com>
5558
5559 * compile/compile-c-types.c (convert_int, convert_float):
5560 Update for C FE v1.
5561
6873858b
TT
55622018-04-27 Tom Tromey <tom@tromey.com>
5563
5564 PR rust/22545:
5565 * rust-lang.c (rust_inclusive_range_type_p): New function.
5566 (rust_range): Handle inclusive ranges.
5567 (rust_compute_range): Likewise.
5568 * rust-exp.y (struct rust_op) <inclusive>: New field.
5569 (DOTDOTEQ): New constant.
5570 (range_expr): Add "..=" productions.
5571 (operator_tokens): Add "..=" token.
5572 (ast_range): Add "inclusive" parameter.
5573 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5574 ranges.
5575 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5576 bounds values.
5577 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5578 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5579 Update comments.
5580 * expprint.c (print_subexp_standard): Handle new bounds values.
5581 (dump_subexp_body_standard): Likewise.
5582
632e107b
TT
55832018-04-27 Tom Tromey <tom@tromey.com>
5584
5585 * configure: Rebuild.
5586 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5587 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5588 "OVERRIDE".
5589 (class symbol_needs_eval_context): Likewise.
5590 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5591 (mock_mapped_index::symbol_name_at): Use "override". Remove
5592 "virtual".
5593 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5594 "override".
5595 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5596 * aarch64-tdep.c (instruction_reader::read): Use "override".
5597 (instruction_reader_test::read): Likewise.
5598 * arm-tdep.c (instruction_reader::read): Use "override".
5599 (instruction_reader_thumb::read): Likewise.
5600
b75abf5b
AK
56012018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5602
5603 PR remote/9665
5604 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5605 instead of remote_send.
5606 (remote_send): Remove.
5607
79188d8d
PA
56082018-04-26 Pedro Alves <palves@redhat.com>
5609
5610 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5611 find_function_start_sal instead of find_pc_line.
5612
f50776aa
PA
56132018-04-26 Pedro Alves <palves@redhat.com>
5614
5615 * breakpoint.c (set_breakpoint_location_function): Handle
5616 mst_data_gnu_ifunc.
5617 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5618 * elfread.c (elf_symtab_read): Give data symbols with
5619 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5620 (elf_rel_plt_read): Update comment.
5621 * linespec.c (convert_linespec_to_sals): Handle
5622 mst_data_gnu_ifunc.
5623 (minsym_found): Handle mst_data_gnu_ifunc.
5624 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5625 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5626 * parse.c (find_minsym_type_and_address): Handle
5627 mst_data_gnu_ifunc.
5628 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5629 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5630 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5631 comment.
5632 <mst_data_gnu_ifunc>: New enumerator.
5633
20944a6e
PA
56342018-04-26 Pedro Alves <palves@redhat.com>
5635
5636 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5637 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5638 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5639 Handle it.
5640 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5641 (lookup_minimal_symbol_by_pc): Adjust.
5642 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5643 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5644 * minsyms.h (lookup_msym_prefer): New enum.
5645 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5646 parameter by a lookup_msym_prefer parameter.
5647
1adeb822
PA
56482018-04-26 Pedro Alves <palves@redhat.com>
5649
5650 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5651 ends in "@plt" instead of looking at the symbol's section.
5652
a0aca7b0
PA
56532018-04-26 Pedro Alves <palves@redhat.com>
5654
5655 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5656 all references.
5657 (find_pc_partial_function_gnu_ifunc): Rename to ...
5658 (find_pc_partial_function): ... this, and remove references to
5659 'is_gnu_ifunc_p'.
5660 (find_pc_partial_function): Delete old implementation.
5661 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5662
76af0f26
PA
56632018-04-26 Pedro Alves <palves@redhat.com>
5664
5665 * linespec.c (struct bound_minimal_symbol_search_key): New.
5666 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5667 skip first line if we found a GNU ifunc minimal symbol by name.
5668 (compare_msymbols): Change parameters to work with a destructured
5669 lhs minsym.
5670 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5671 functions.
5672
3467ec66
PA
56732018-04-26 Pedro Alves <palves@redhat.com>
5674
5675 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5676 ifunc targets here. Instead, if we have an ifunc minsym, use its
5677 address/name.
5678 (add_location_to_breakpoint): Store the minsym and the objfile in
5679 the breakpoint location.
5680 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5681 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5682 Record the minsym in the sal.
5683 * symtab.h (symtab_and_line) <msymbol>: New field.
5684
28f4fa4d
PA
56852018-04-26 Pedro Alves <palves@redhat.com>
5686
5687 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5688 unless we actually resolved the ifunc.
5689
ca31ab1d
PA
56902018-04-26 Pedro Alves <palves@redhat.com>
5691
5692 * c-exp.y (variable production): Prefer ifunc minsyms over
5693 regular function symbols.
5694 * symtab.c (find_gnu_ifunc): New function.
5695 * minsyms.h (lookup_msym_prefer): New enum.
5696 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5697 parameter by a lookup_msym_prefer parameter.
5698 * symtab.h (find_gnu_ifunc): New declaration.
5699
8388016d
PA
57002018-04-26 Pedro Alves <palves@redhat.com>
5701
5702 * blockframe.c (find_gnu_ifunc_target_type): New function.
5703 (find_function_type): New.
5704 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5705 return a value with a memory address.
5706 (eval_call): For calls to GNU ifunc functions, try to find the
5707 type of the target function from the type that the resolver
5708 returns.
5709 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5710 symbols.
5711 * infcall.c (find_function_return_type): Delete.
5712 (find_function_addr): Add 'function_type' parameter. For calls to
5713 GNU ifunc functions, try to find the type of the target function
5714 from the type that the resolver returns, and return it via
5715 FUNCTION_TYPE.
5716 (call_function_by_hand_dummy): Adjust to use the function type
5717 returned by find_function_addr.
5718 (find_function_addr): Add 'function_type' parameter and move
5719 description here.
5720 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5721 declarations.
5722
a376e11d
PA
57232018-04-26 Pedro Alves <palves@redhat.com>
5724
5725 * c-exp.y (variable production): Skip finding an alias for ifunc
5726 symbols.
5727
02e169e2
PA
57282018-04-26 Pedro Alves <palves@redhat.com>
5729
5730 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5731
249b5733
PA
57322018-04-25 Pedro Alves <palves@redhat.com>
5733
5734 * infcmd.c (kill_command): Print the pid as string, not the whole
5735 thread's ptid. Add comment. s/has been killed/killed/ in output
5736 message.
5737 * remote.c (remote_detach_1): Print the pid as string, not the
5738 whole thread's ptid.
5739
f67c0c91
SDJ
57402018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5741 Sergio Durigan Junior <sergiodj@redhat.com>
5742 Pedro Alves <palves@redhat.com>
5743
5744 * infcmd.c (kill_command): Print message when inferior has
5745 been killed.
5746 * inferior.c (print_inferior_events): Remove 'static'. Set as
5747 '1'.
5748 (add_inferior): Improve message printed when
5749 'print_inferior_events' is on.
5750 (exit_inferior): Remove message printed when
5751 'print_inferior_events' is on.
5752 (detach_inferior): Improve message printed when
5753 'print_inferior_events' is on.
5754 (initialize_inferiors): Use 'add_inferior_silent' to set
5755 'current_inferior_'.
5756 * inferior.h (print_inferior_events): Declare here as
5757 'extern'.
5758 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5759 '[Detaching...]' messages when 'print_inferior_events' is on.
5760 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5761 as prefix/suffix for messages. Remove periods. Fix erroneous
5762 'Detaching after fork from child...', replace it by '... from
5763 parent...'.
5764 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5765 prefix/suffix when printing 'Detaching...' messages. Print
5766 them when 'print_inferior_events' is on.
5767 * remote.c (remote_detach_1): Print message when detaching
5768 from inferior and '!is_fork_parent'.
5769
e427af18
TT
57702018-04-24 Tom Tromey <tom@tromey.com>
5771
5772 * cli-out.h: Reindent.
5773
05b1d8d6
TT
57742018-04-24 Tom Tromey <tom@tromey.com>
5775
5776 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5777 (cli_ui_out::do_field_string): Use fputs_filtered.
5778 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5779
a95c7dab
TT
57802018-04-23 Tom Tromey <tom@tromey.com>
5781
5782 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5783 gdb::unique_xmalloc_ptr.
5784
458412c3
TT
57852018-04-23 Tom Tromey <tom@tromey.com>
5786
5787 * configure: Rebuild.
5788
db86b02b
RS
57892018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5790
5791 PR gdb/23095
5792 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5793 prepare_for_testing. Set normal_bp to r_debug_state if target
5794 is bsd.
5795
00aecdcf
PA
57962018-04-21 Pedro Alves <palves@redhat.com>
5797 Rajendra SY <rajendra.sy@gmail.com>
5798
5799 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5800 * remote.c (extended_remote_attach): In all-stop mode, mark the
5801 thread as executing.
5802
224608c3
PW
58032018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5804
5805 * thread.c (thread_apply_all_command): Fix comment.
5806 (thread_command): Fix comment.
5807
3b74854b
AH
58082018-04-10 Alan Hayward <alan.hayward@arm.com>
5809
5810 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5811 parameter.
5812 * features/aarch64-core.c (create_feature_aarch64_core):
5813 Regenerate.
5814 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5815 Likewise.
5816 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5817 Likewise.
5818 * features/i386/32bit-avx512.c
5819 (create_feature_i386_32bit_avx512): Likewise.
5820 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5821 Likewise.
5822 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5823 Likewise.
5824 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5825 Likewise.
5826 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5827 Likewise.
5828 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5829 Likewise.
5830 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5831 Likewise.
5832 * features/i386/64bit-avx512.c
5833 (create_feature_i386_64bit_avx512): Likewise.
5834 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5835 Likewise.
5836 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5837 Likewise.
5838 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5839 Likewise.
5840 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5841 Likewise.
5842 * features/i386/64bit-segments.c
5843 (create_feature_i386_64bit_segments): Likewise.
5844 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5845 Likewise.
5846 * features/i386/x32-core.c
5847 (create_feature_i386_x32_core): Likewise.
5848 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5849 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5850 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5851 * target-descriptions.c: In generated code, don't pass xml
5852 filename.
5853
e98577a9
AH
58542018-04-18 Alan Hayward <alan.hayward@arm.com>
5855
5856 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5857 (print_xml_feature::visit_post): Likewise.
5858 (print_xml_feature::visit): Likewise.
5859 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5860 (print_xml_feature): Add new class.
5861 * regformats/regdat.sh: Null xmltarget on feature targets.
5862 * target-descriptions.c (struct target_desc): Add xmltarget.
5863 (maintenance_check_tdesc_xml_convert): Add unittest function.
5864 (tdesc_get_features_xml): Add function to get xml.
5865 (maintenance_check_xml_descriptions): Test xml generation.
5866 * xml-tdesc.c (string_read_description_xml): Add function.
5867 * xml-tdesc.h (string_read_description_xml): Add declaration.
5868
ad7fc756
AH
58692018-04-18 Alan Hayward <alan.hayward@arm.com>
5870
5871 * features/Makefile: Add feature marker to targets with new style
5872 target descriptions.
5873 * regformats/aarch64.dat: Regenerate.
5874 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5875 * regformats/i386/amd64-avx-linux.dat: Likewise.
5876 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5877 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5878 * regformats/i386/amd64-linux.dat: Likewise.
5879 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5880 * regformats/i386/amd64.dat: Likewise.
5881 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5882 * regformats/i386/i386-avx-linux.dat: Likewise.
5883 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5884 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5885 * regformats/i386/i386-linux.dat: Likewise.
5886 * regformats/i386/i386-mmx-linux.dat: Likewise.
5887 * regformats/i386/i386-mpx-linux.dat: Likewise.
5888 * regformats/i386/i386.dat: Likewise.
5889 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5890 * regformats/i386/x32-avx-linux.dat: Likewise.
5891 * regformats/i386/x32-linux.dat: Likewise.
5892 * regformats/tic6x-c62x-linux.dat: Likewise.
5893 * regformats/tic6x-c64x-linux.dat: Likewise.
5894 * regformats/tic6x-c64xp-linux.dat: Likewise.
5895 * regformats/regdat.sh: Parse feature marker.
5896
d278f585
AH
58972018-04-18 Alan Hayward <alan.hayward@arm.com>
5898
5899 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5900 (tdesc_osabi_name): Likewise.
5901 * target-descriptions.c (tdesc_architecture_name): Add new
5902 function.
5903 (tdesc_osabi_name): Likewise.
5904
eee8a18d
AH
59052018-04-18 Alan Hayward <alan.hayward@arm.com>
5906
5907 * common/tdesc.c (tdesc_predefined_type): Move to here.
5908 (tdesc_named_type): Likewise.
5909 (tdesc_create_vector): Likewise.
5910 (tdesc_create_struct): Likewise.
5911 (tdesc_set_struct_size): Likewise.
5912 (tdesc_create_union): Likewise.
5913 (tdesc_create_flags): Likewise.
5914 (tdesc_create_enum): Likewise.
5915 (tdesc_add_field): Likewise.
5916 (tdesc_add_typed_bitfield): Likewise.
5917 (tdesc_add_bitfield): Likewise.
5918 (tdesc_add_flag): Likewise.
5919 (tdesc_add_enum_value): Likewise.
5920 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5921 (struct tdesc_type_vector): Likewise.
5922 (struct tdesc_type_field): Likewise.
5923 (struct tdesc_type_with_fields): Likewise.
5924 (tdesc_create_enum): Add declaration.
5925 (tdesc_add_typed_bitfield): Likewise.
5926 (tdesc_add_enum_value): Likewise.
5927 * target-descriptions.c (tdesc_type_field): Move from here.
5928 (tdesc_type_builtin): Likewise.
5929 (tdesc_type_vector): Likewise.
5930 (tdesc_type_with_fields): Likewise.
5931 (tdesc_predefined_types): Likewise.
5932 (tdesc_named_type): Likewise.
5933 (tdesc_create_vector): Likewise.
5934 (tdesc_create_struct): Likewise.
5935 (tdesc_set_struct_size): Likewise.
5936 (tdesc_create_union): Likewise.
5937 (tdesc_create_flags): Likewise.
5938 (tdesc_create_enum): Likewise.
5939 (tdesc_add_field): Likewise.
5940 (tdesc_add_typed_bitfield): Likewise.
5941 (tdesc_add_bitfield): Likewise.
5942 (tdesc_add_flag): Likewise.
5943 (tdesc_add_enum_value): Likewise.
5944 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5945 (tdesc_add_typed_bitfield): Likewise.
5946 (tdesc_add_enum_value): Likewise.
5947
82ec9bc7
AH
59482018-04-18 Alan Hayward <alan.hayward@arm.com>
5949
5950 * common/tdesc.c (tdesc_feature::accept): Move to here.
5951 (tdesc_feature::operator==): Likewise.
5952 (tdesc_create_reg): Likewise.
5953 * common/tdesc.h (tdesc_type_kind): Likewise.
5954 (struct tdesc_type): Likewise.
5955 (struct tdesc_feature): Likewise.
5956 * regformats/regdat.sh: Create a feature.
5957 * target-descriptions.c (tdesc_type_kind): Move from here.
5958 (tdesc_type): Likewise.
5959 (tdesc_type_up): Likewise.
5960 (tdesc_feature): Likewise.
5961 (tdesc_create_reg): Likewise.
5962
ea3e7d71
AH
59632018-04-18 Alan Hayward <alan.hayward@arm.com>
5964
5965 * Makefile.in: Add arch/tdesc.c
5966 * common/tdesc.c: New file.
5967 * common/tdesc.h (tdesc_element_visitor): Move to here.
5968 (tdesc_element): Likewise.
5969 (tdesc_reg): Likewise.
5970 (tdesc_reg_up): Likewise.
5971 * regformats/regdef.h (reg): Add offset to constructors.
5972 * target-descriptions.c (tdesc_element_visitor): Move from here.
5973 (tdesc_element): Likewise.
5974 (tdesc_reg): Likewise.
5975 (tdesc_reg_up): Likewise.
5976
bedda9ac
TT
59772018-04-17 Tom Tromey <tom@tromey.com>
5978
5979 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5980 discriminant field.
5981
a037790e
TT
59822018-04-17 Tom Tromey <tom@tromey.com>
5983
5984 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5985
c7dcbf88
AA
59862018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5987
5988 * symtab.c (print_symbol_info): Skip printing filename and line
5989 number when `last' is NULL.
5990 (symtab_symbol_info): Use empty string instead of NULL for first
5991 invocation of print_symbol_info.
5992 (rbreak_command): Pass NULL to `last' parameter of
5993 print_symbol_info.
5994
07d28c77
SM
59952018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5996
5997 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5998 instead of nullptr.
5999
8a3de5e1
PA
60002018-04-16 Pedro Alves <palves@redhat.com>
6001
6002 * MAINTAINERS (sh): Remove.
6003 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6004 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6005 (ALLDEPFILES): Remove sh64-tdep.c.
6006 * NEWS: Mentions that support for SH-5/SH64 is removed.
6007 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6008 (sh*-*-openbsd*): Ditto.
6009 (sh64-*-elf*): Remove.
6010 (sh*): Remove.
6011 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6012 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6013 * sh-tdep.c: No longer include "sh64-tdep.h".
6014 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6015 * sh64-tdep.c, sh64-tdep.h: Remove files.
6016
a2a79012
PA
60172018-04-16 Pedro Alves <palves@redhat.com>
6018
6019 * MAINTAINERS: Remove m88k.
6020 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6021 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6022 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6023 * NEWS: Mention that support for m88k was removed.
6024 * configure.host (m88*-*-*): Remove support.
6025 * configure.nat (m88k-*-*): Remove support.
6026 * configure.tgt (m88*-*-openbsd*): Remove.
6027 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6028
eda4efb1
SM
60292018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6030
6031 * configure.tgt (x86_tobjs): New variable.
6032 (amd64_tobjs, i386_tobjs): Use it.
6033
b744723f
AA
60342018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6035
6036 * symtab.c (print_symbol_info): Precede the symbol definition by
6037 the line number when available.
6038 * NEWS: Advertise this enhancement.
6039
4a4495d6
MM
60402018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6041
6042 * NEWS (New options): announce set/show record btrace cpu.
6043 * btrace.c: Include record-btrace.h.
6044 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6045 the vendor is unknown.
6046 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6047 Maybe overwrite the btrace configuration's cpu.
6048 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6049 (btrace_fetch): Add cpu parameter. Update callers.
6050 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6051 Maybe overwrite the btrace configuration's cpu. Skip enabling
6052 errata workarounds if the vendor is unknown.
6053 * python/py-record-btrace.c: Include record-btrace.h.
6054 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6055 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6056 * record-btrace.c (record_btrace_cpu_state_kind): New.
6057 (record_btrace_cpu): New.
6058 (set_record_btrace_cpu_cmdlist): New.
6059 (record_btrace_get_cpu): New.
6060 (require_btrace_thread, record_btrace_info)
6061 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6062 (cmd_set_record_btrace_cpu_none): New.
6063 (cmd_set_record_btrace_cpu_auto): New.
6064 (cmd_set_record_btrace_cpu): New.
6065 (cmd_show_record_btrace_cpu): New.
6066 (_initialize_record_btrace): Initialize set/show record btrace cpu
6067 commands.
6068 * record-btrace.h (record_btrace_get_cpu): New.
6069
69f90c75
MM
60702018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6071
6072 * record.c (set_record_command): Fix typo in message.
6073
b85310e1
MM
60742018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6075
6076 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6077
1d509aa6
MM
60782018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6079
6080 * infrun.c (process_event_stop_test): Call
6081 gdbarch_in_indirect_branch_thunk.
6082 * gdbarch.sh (in_indirect_branch_thunk): New.
6083 * gdbarch.c: Regenerated.
6084 * gdbarch.h: Regenerated.
6085 * x86-tdep.h: New.
6086 * x86-tdep.c: New.
6087 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6088 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6089 (ALLDEPFILES): Add x86-tdep.c.
6090 * arch-utils.h (default_in_indirect_branch_thunk): New.
6091 * arch-utils.c (default_in_indirect_branch_thunk): New.
6092 * i386-tdep: Include x86-tdep.h.
6093 (i386_in_indirect_branch_thunk): New.
6094 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6095 function.
6096 * amd64-tdep: Include x86-tdep.h.
6097 (amd64_in_indirect_branch_thunk): New.
6098 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6099
b4be9bfd
JK
61002018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6101
6102 PR gdb/23053
6103 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6104 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6105 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6106 regression.
6107
53d7df28
TT
61082018-04-12 Tom Tromey <tom@tromey.com>
6109
6110 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6111 (rust_evaluate_subexp): Likewise.
6112
70b33f19
PA
61132018-04-12 Pedro Alves <palves@redhat.com>
6114
6115 * procfs.c (procfs_detach): Make forward declaration's prototype
6116 match definition's protototype.
6117 (proc_get_LDT_entry): Remove stale do_cleanups call.
6118
436411b1
PA
61192018-04-12 Pedro Alves <palves@redhat.com>
6120
6121 * target.h (target_ops::to_has_exited): Delete.
6122 (target_has_exited): Delete.
6123 * target-delegates.c: Regenerate.
6124
20db9c52
PA
61252018-04-11 Pedro Alves <palves@redhat.com>
6126
6127 * target.c (fileio_fh_t::t): Add comment.
6128 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6129 (target_fileio_close): Handle a NULL target.
6130 (invalidate_fileio_fh): New.
6131 (target_close): Call it.
6132 * remote.c (remote_hostio_send_command): No longer check whether
6133 remote_desc is open.
6134
5ff79300
PA
61352018-04-11 Pedro Alves <palves@redhat.com>
6136
6137 * target.c (fileio_fh_t): Make it a named struct instead of a
6138 typedef.
6139 (fileio_fh_t::is_closed): New method.
6140 (DEF_VEC_O (fileio_fh_t)): Remove.
6141 (fileio_fhandles): Now a std::vector.
6142 (is_closed_fileio_fh): Delete.
6143 (acquire_fileio_fd): Adjust. Rename parameters.
6144 (release_fileio_fd): Adjust.
6145 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6146 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6147 (target_fileio_close): Adjust.
6148
6e22e10d
SM
61492018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6150
6151 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6152 index.
6153
731f534f
PA
61542018-04-10 Pedro Alves <palves@redhat.com>
6155
6156 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6157 (scoped_finish_thread_state): New class.
6158 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6159 cleanup.
6160 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6161 (fetch_inferior_event, normal_stop): Likewise.
6162 * thread.c (finish_thread_state_cleanup): Delete.
6163
d5f4488f
SM
61642018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6165 Pedro Alves <palves@redhat.com>
6166
6167 * value.c: Include "selftest.h" and "common/array-view.h".
6168 (struct range) <operator ==>: New.
6169 (test_ranges_contain): New.
6170 (check_ranges_vector): New.
6171 (test_insert_into_bit_range_vector): New.
6172 (_initialize_values): Register selftests.
6173 * common/array-view.h (operator==, operator!=): New.
6174
b24531ed
SM
61752018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6176
6177 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6178 an iterator.
6179 * inline-frame.c: Include <algorithm>.
6180 (struct inline_state): Add constructor.
6181 (inline_state_s): Remove.
6182 (DEF_VEC_O(inline_state_s)): Remove.
6183 (inline_states): Change type to std::vector.
6184 (find_inline_frame_state): Adjust to std::vector.
6185 (allocate_inline_frame_state): Remove.
6186 (clear_inline_frame_state): Adjust to std::vector.
6187 (skip_inline_frames): Adjust to std::vector.
6188
c252925c
SM
61892018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6190
6191 * tracepoint.h (struct trace_state_variable): Add constructor.
6192 <name>: Change type to std::string.
6193 * tracepoint.c (tsv_s): Remove.
6194 (DEF_VEC_O(tsv_s)): Remove.
6195 (tvariables): Change to std::vector.
6196 (create_trace_state_variable): Adjust to std::vector.
6197 (find_trace_state_variable): Likewise.
6198 (find_trace_state_variable_by_number): Likewise.
6199 (delete_trace_state_variable): Likewise.
6200 (trace_variable_command): Adjust to std::string.
6201 (delete_trace_variable_command): Likewise.
6202 (tvariables_info_1): Adjust to std::vector.
6203 (save_trace_state_variables): Likewise.
6204 (start_tracing): Likewise.
6205 (merge_uploaded_trace_state_variables): Adjust to std::vector
6206 and std::string.
6207 * target.h (struct target_ops)
6208 <to_download_trace_state_variable>: Pass reference to
6209 trace_state_variable.
6210 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6211 * target-delegates.c: Re-generate.
6212 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6213 (mi_tsv_deleted): Likewise.
6214 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6215 * remote.c (remote_download_trace_state_variable): Change
6216 pointer to reference and adjust.
6217 * make-target-delegates (parse_argtypes): Handle references.
6218 (write_function_header): Likewise.
6219 (munge_type): Likewise.
6220
c9638d26
SM
62212018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6222
6223 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6224 string_view-selftests.c.
6225 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6226 testsuite.
6227 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6228 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6229 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6230 * unittests/basic_string_view/element_access/char/1.cc:
6231 Likewise.
6232 * unittests/basic_string_view/element_access/char/empty.cc:
6233 Likewise.
6234 * unittests/basic_string_view/element_access/char/front_back.cc:
6235 Likewise.
6236 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6237 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6238 Likewise.
6239 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6240 Likewise.
6241 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6242 Likewise.
6243 * unittests/basic_string_view/operations/compare/char/1.cc:
6244 Likewise.
6245 * unittests/basic_string_view/operations/compare/char/13650.cc:
6246 Likewise.
6247 * unittests/basic_string_view/operations/copy/char/1.cc:
6248 Likewise.
6249 * unittests/basic_string_view/operations/data/char/1.cc:
6250 Likewise.
6251 * unittests/basic_string_view/operations/find/char/1.cc:
6252 Likewise.
6253 * unittests/basic_string_view/operations/find/char/2.cc:
6254 Likewise.
6255 * unittests/basic_string_view/operations/find/char/3.cc:
6256 Likewise.
6257 * unittests/basic_string_view/operations/find/char/4.cc:
6258 Likewise.
6259 * unittests/basic_string_view/operations/rfind/char/1.cc:
6260 Likewise.
6261 * unittests/basic_string_view/operations/rfind/char/2.cc:
6262 Likewise.
6263 * unittests/basic_string_view/operations/rfind/char/3.cc:
6264 Likewise.
6265 * unittests/basic_string_view/operations/substr/char/1.cc:
6266 Likewise.
6267 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6268 * unittests/string_view-selftests.c: New file.
6269
fdc11678
SM
62702018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6271
6272 * unittests/basic_string_view/capacity/1.cc: New file.
6273 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6274 * unittests/basic_string_view/cons/char/1.cc: New file.
6275 * unittests/basic_string_view/cons/char/2.cc: New file.
6276 * unittests/basic_string_view/cons/char/3.cc: New file.
6277 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6278 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6279 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6280 * unittests/basic_string_view/element_access/char/1.cc: New file.
6281 * unittests/basic_string_view/element_access/char/2.cc: New file.
6282 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6283 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6284 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6285 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6286 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6287 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6288 * unittests/basic_string_view/include.cc: New file.
6289 * unittests/basic_string_view/inserters/char/1.cc: New file.
6290 * unittests/basic_string_view/inserters/char/2.cc: New file.
6291 * unittests/basic_string_view/inserters/char/3.cc: New file.
6292 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6293 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6294 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6295 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6296 * unittests/basic_string_view/literals/types.cc: New file.
6297 * unittests/basic_string_view/literals/values.cc: New file.
6298 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6299 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6300 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6301 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6302 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6303 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6304 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6305 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6306 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6307 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6308 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6309 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6310 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6311 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6312 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6313 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6314 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6315 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6316 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6317 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6318 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6319 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6320 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6321 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6322 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6323 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6324 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6325 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6326 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6327 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6328 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6329 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6330 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6331 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6332 * unittests/basic_string_view/operators/char/2.cc: New file.
6333 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6334 * unittests/basic_string_view/range_access/char/1.cc: New file.
6335 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6336 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6337 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6338 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6339 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6340 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6341 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6342 * unittests/basic_string_view/typedefs.cc: New file.
6343 * unittests/basic_string_view/types/1.cc: New file.
6344
8345c4a2
SM
63452018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6346
6347 * common/gdb_string_view.h: Remove libstdc++ implementation
6348 details, adjust to gdb reality.
6349 * common/gdb_string_view.tcc: Likewise.
6350 * cli/cli-script.c (struct string_view): Remove.
6351 (user_args) <m_args>: Change element type to gdb::string_view.
6352 (user_args::insert_args): Adjust.
6353
7adcdf08
SM
63542018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6355
6356 * common/gdb_string_view.h: New file.
6357 * common/gdb_string_view.tcc: New file.
6358
41260ac2
SM
63592018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6360
6361 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6362 * configure: Re-generate.
6363
0bee6dd4
PA
63642018-04-09 Pedro Alves <palves@redhat.com>
6365
6366 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6367 (set_target_gdbarch): Call
6368 gdb::observers::architecture_changed.notify instead of
6369 observer_notify_architecture_changed.
6370
6f14adc5
SM
63712018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6372
6373 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6374 (do_restore_current_traceframe_cleanup): Remove.
6375 (restore_current_traceframe_cleanup_dtor): Remove.
6376 (make_cleanup_restore_current_traceframe): Remove.
6377 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6378 New.
6379 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6380 * infrun.c (fetch_inferior_event): Use
6381 scoped_restore_current_traceframe.
6382
b2bdb8cf
SM
63832018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6384
6385 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6386 Remove.
6387 <n_allocated_type_units>: Remove.
6388 <all_type_units>: Change to std::vector.
6389 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6390 to std::vector change.
6391 (dwarf2_per_objfile::get_cutu): Likewise.
6392 (dwarf2_per_objfile::get_tu): Likewise.
6393 (create_signatured_type_table_from_index): Likewise.
6394 (create_signatured_type_table_from_debug_names): Likewise.
6395 (dw2_symtab_iter_next): Likewise.
6396 (dw2_print_stats): Likewise.
6397 (dw2_expand_all_symtabs): Likewise.
6398 (dw2_expand_marked_cus): Likewise.
6399 (dw2_debug_names_iterator::next): Likewise.
6400 (dwarf2_initialize_objfile): Likewise.
6401 (add_signatured_type_cu_to_table): Likewise.
6402 (create_all_type_units): Likewise.
6403 (add_type_unit): Likewise.
6404 (struct tu_abbrev_offset): Add constructor.
6405 (build_type_psymtabs_1): Adjust to std::vector change.
6406 (print_tu_stats): Likewise.
6407 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6408 (write_debug_names): Likewise.
6409
b76e467d
SM
64102018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6411
6412 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6413 Make an std::vector.
6414 <n_comp_units>: Remove.
6415 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6416 to std::vector change.
6417 (dwarf2_per_objfile::get_cutu): Likewise.
6418 (dwarf2_per_objfile::get_cu): Likewise.
6419 (create_cus_from_index): Likewise.
6420 (create_addrmap_from_index): Likewise.
6421 (create_addrmap_from_aranges): Likewise.
6422 (dwarf2_read_index): Likewise.
6423 (dw2_find_last_source_symtab): Likewise.
6424 (dw2_map_symtabs_matching_filename): Likewise.
6425 (dw2_symtab_iter_next): Likewise.
6426 (dw2_print_stats): Likewise.
6427 (dw2_expand_all_symtabs): Likewise.
6428 (dw2_expand_symtabs_with_fullname): Likewise.
6429 (dw2_expand_marked_cus): Likewise.
6430 (dw2_map_symbol_filenames): Likewise.
6431 (create_cus_from_debug_names): Likewise.
6432 (dwarf2_read_debug_names): Likewise.
6433 (dw2_debug_names_iterator::next): Likewise.
6434 (dwarf2_initialize_objfile): Likewise.
6435 (set_partial_user): Likewise.
6436 (dwarf2_build_psymtabs_hard): Likewise.
6437 (read_comp_units_from_section): Remove arguments, adjust to
6438 std::vector change.
6439 (create_all_comp_units): Adjust to std::vector and
6440 read_comp_units_from_section changes.
6441 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6442 change.
6443 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6444 (psyms_seen_size): Likewise.
6445 (write_gdbindex): Likewise.
6446 (write_debug_names): Likewise.
6447
12359b5e
SM
64482018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6449
6450 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6451 with dwarf2_per_objfile.
6452 (create_cus_from_index): Likewise.
6453 (create_signatured_type_table_from_index): Likewise.
6454 (dwarf2_read_index): Likewise.
6455 (dwarf2_initialize_objfile): Likewise.
6456 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6457 per_cu rather than get_dwarf2_per_objfile.
6458
ff4c9fec
SM
64592018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6460
6461 * dwarf2read.h (struct signatured_type): Forward declare.
6462 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6463 New methods.
6464 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6465 (dw2_get_cutu): ...this.
6466 (dwarf2_per_objfile::get_cu): Rename from...
6467 (dw2_get_cu): ...this.
6468 (dwarf2_per_objfile::get_tu): New.
6469 (create_addrmap_from_index): Adjust.
6470 (create_addrmap_from_aranges): Adjust.
6471 (dw2_find_last_source_symtab): Adjust.
6472 (dw2_map_symtabs_matching_filename): Adjust.
6473 (dw2_symtab_iter_next): Adjust.
6474 (dw2_print_stats): Adjust.
6475 (dw2_expand_all_symtabs): Adjust.
6476 (dw2_expand_symtabs_with_fullname): Adjust.
6477 (dw2_expand_marked_cus): Adjust.
6478 (dw_expand_symtabs_matching_file_matcher): Adjust.
6479 (dw2_map_symbol_filenames): Adjust.
6480 (dw2_debug_names_iterator::next): Adjust.
6481 (dwarf2_initialize_objfile): Adjust.
6482 (set_partial_user): Adjust.
6483 (dwarf2_build_psymtabs_hard): Adjust.
6484
5ca3fcb6
SM
64852018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6486
6487 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6488 Remove unused variables.
6489 (dw2_map_symtabs_matching_filename): Likewise.
6490 (dwarf2_record_block_ranges): Likewise.
6491 (dwarf2_read_addr_index): Likewise.
6492 (follow_die_offset): Likewise.
6493
b2e586e8
SM
64942018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6495
6496 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6497 to symbol_file_add_main.
6498
7c4e78cf
SM
64992018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6500
6501 PR mi/22299
6502 * mi/mi-console.c (do_fputc_async_safe): New.
6503 (mi_console_file::write_async_safe): New.
6504 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6505 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6506 New.
6507 * ui-file.c (ui_file::putstrn): Adjust call to
6508 fputstrn_unfiltered.
6509 * utils.c (printchar): Replace do_fputs and do_fprintf
6510 parameters by do_fputc.
6511 (fputstr_filtered): Adjust call to printchar.
6512 (fputstr_unfiltered): Likewise.
6513 (fputstrn_filtered): Likewise.
6514 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6515 printchar.
6516 * utils.h (do_fputc_ftype): New typedef.
6517 (fputstrn_unfiltered): Add do_fputc parameter.
6518
5dc026d3
SM
65192018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6520
6521 * regformats/i386/i386-avx.dat: Remove.
6522
c912f608
SM
65232018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6524
6525 PR gdb/22979
6526 * amd64-tdep.c (amd64_none_init_abi): New function.
6527 (amd64_x32_none_init_abi): New function.
6528 (_initialize_amd64_tdep): Register handlers for x86-64 and
6529 x64_32 with GDB_OSABI_NONE.
6530 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6531 GDB_OSABI_NONE osabi.
6532
26540402
SM
65332018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6534
6535 PR gdb/22980
6536 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6537 GDB_OSABI_NONE.
6538 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6539 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6540
9018be22
SM
65412018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6542
6543 * common/byte-vector.h (char_vector): New type.
6544 * target.h (target_read_alloc): Return
6545 gdb::optional<byte_vector>.
6546 (target_read_stralloc): Return gdb::optional<char_vector>.
6547 (target_get_osdata): Return gdb::optional<char_vector>.
6548 * target.c (target_read_alloc_1): Templatize. Replacement
6549 manual memory management with vector.
6550 (target_read_alloc): Change return type, adjust.
6551 (target_read_stralloc): Change return type, adjust.
6552 (target_get_osdata): Change return type, adjust.
6553 * auxv.c (struct auxv_info) <length>: Remove.
6554 <data>: Change type to gdb::optional<byte_vector>.
6555 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6556 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6557 (target_auxv_search): Adjust.
6558 (fprint_target_auxv): Adjust.
6559 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6560 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6561 (linux_make_corefile_notes): Adjust.
6562 * osdata.c (get_osdata): Adjust.
6563 * remote.c (remote_get_threads_with_qxfer): Adjust.
6564 (remote_memory_map): Adjust.
6565 (remote_traceframe_info): Adjust.
6566 (btrace_read_config): Adjust.
6567 (remote_read_btrace): Adjust.
6568 (remote_pid_to_exec_file): Adjust.
6569 * solib-aix.c (solib_aix_get_library_list): Adjust.
6570 * solib-dsbt.c (decode_loadmap): Don't free buf.
6571 (dsbt_get_initial_loadmaps): Adjust.
6572 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6573 * solib-target.c (solib_target_current_sos): Adjust.
6574 * tracepoint.c (sdata_make_value): Adjust.
6575 * xml-support.c (xinclude_start_include): Adjust.
6576 (xml_fetch_content_from_file): Adjust.
6577 * xml-support.h (xml_fetch_another): Change return type.
6578 (xml_fetch_content_from_file): Change return type.
6579 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6580 * xml-tdesc.c (file_read_description_xml): Adjust.
6581 (fetch_available_features_from_target): Change return type.
6582 (target_fetch_description_xml): Adjust.
6583 (target_read_description_xml): Adjust.
6584
14c88955
TT
65852018-04-06 Tom Tromey <tom@tromey.com>
6586
6587 * value.c (~value): Update.
6588 (struct value) <contents>: Now unique_xmalloc_ptr.
6589 (value_contents_bits_eq, allocate_value_contents)
6590 (value_contents_raw, value_contents_all_raw)
6591 (value_contents_for_printing, value_contents_for_printing_const)
6592 (set_value_enclosing_type): Update.
6593
0c7e6dd8
TT
65942018-04-06 Tom Tromey <tom@tromey.com>
6595
6596 * value.c (range_s): Remove typedef, VEC.
6597 (struct range): Add operator<.
6598 (range_lessthan): Remove.
6599 (ranges_contain): Change type.
6600 (~value): Update.
6601 (struct value) <unavailable, optimized_out>: Now std::vector.
6602 (value_entirely_available)
6603 (value_entirely_covered_by_range_vector)
6604 (value_entirely_unavailable, value_entirely_optimized_out):
6605 Update.
6606 (insert_into_bit_range_vector): Change argument type.
6607 (find_first_range_overlap): Likewise.
6608 (struct ranges_and_idx, value_contents_bits_eq)
6609 (require_not_optimized_out, require_available): Update.
6610 (ranges_copy_adjusted): Change argument types.
6611 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6612
2c8331b9
TT
66132018-04-06 Tom Tromey <tom@tromey.com>
6614
6615 * value.c (~value): Update.
6616 (struct value) <parent>: Now a value_ref_ptr.
6617 (value_parent, set_value_parent, value_address, value_copy):
6618 Update.
6619
466ce3ae
TT
66202018-04-06 Tom Tromey <tom@tromey.com>
6621
6622 * value.c (struct value): Add constructor, destructor, and member
6623 initializers.
6624 (allocate_value_lazy, value_decref): Update.
6625
062d818d
TT
66262018-04-06 Tom Tromey <tom@tromey.com>
6627
6628 * value.c (struct value) <released, next>: Remove.
6629 (all_values): Now a std::vector.
6630 (allocate_value_lazy): Update.
6631 (value_next): Remove.
6632 (value_mark, value_free_to_mark, release_value)
6633 (value_release_to_mark): Update.
6634
a6535de1
TT
66352018-04-06 Tom Tromey <tom@tromey.com>
6636
6637 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6638 (free_value_chain): Remove.
6639 * value.c (free_value_chain): Remove.
6640 (value_release_to_mark): Return a std::vector.
6641 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6642 std::vector.
6643 (check_condition): Update.
6644 * eval.c (fetch_subexp_value): Change "val_chain" to a
6645 std::vector.
6646 * breakpoint.c (update_watchpoint): Update.
6647 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6648
b5621201
TT
66492018-04-06 Tom Tromey <tom@tromey.com>
6650
6651 * value.h (free_all_values): Remove.
6652 * value.c (free_all_values): Remove.
6653
4d0266a0
TT
66542018-04-06 Tom Tromey <tom@tromey.com>
6655
6656 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6657 (value_history_chain, value_history_count): Remove.
6658 (value_history): New global.
6659 (record_latest_value, access_value_history, show_values)
6660 (preserve_values): Update.
6661
b4d61099
TT
66622018-04-06 Tom Tromey <tom@tromey.com>
6663
6664 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6665 * varobj.c (varobj_set_display_format, varobj_set_value)
6666 (install_default_visualizer, construct_visualizer)
6667 (install_new_value, ~varobj, varobj_get_value_type)
6668 (my_value_of_variable, varobj_editable_p): Update.
6669 * c-varobj.c (c_describe_child, c_value_of_variable)
6670 (cplus_number_of_children, cplus_describe_child): Update.
6671 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6672 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6673 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6674
9b558729
TT
66752018-04-06 Tom Tromey <tom@tromey.com>
6676
6677 * printcmd.c (last_examine_address): Change type to
6678 value_ref_ptr.
6679 (do_examine, x_command): Update.
6680
850645cf
TT
66812018-04-06 Tom Tromey <tom@tromey.com>
6682
6683 * value.c (release_value): Update.
6684 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6685 (struct bpstats) <val>: Now a value_ref_ptr.
6686 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6687 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6688 (~watchpoint, print_it_watchpoint, watch_command_1)
6689 (invalidate_bp_value_on_memory_change): Update.
6690
22bc8444
TT
66912018-04-06 Tom Tromey <tom@tromey.com>
6692
6693 * varobj.c (varobj_clear_saved_item)
6694 (update_dynamic_varobj_children, install_new_value, ~varobj):
6695 Update.
6696 * value.h (value_incref): Move declaration earlier.
6697 (value_decref): Rename from value_free.
6698 (struct value_ref_policy): New.
6699 (value_ref_ptr): New typedef.
6700 (struct value_deleter): Remove.
6701 (gdb_value_up): Remove typedef.
6702 (release_value): Change return type.
6703 (release_value_or_incref): Remove.
6704 * value.c (set_value_parent): Update.
6705 (value_incref): Change return type.
6706 (value_decref): Rename from value_free.
6707 (value_free_to_mark, free_all_values, free_value_chain): Update.
6708 (release_value): Return value_ref_ptr.
6709 (release_value_or_incref): Remove.
6710 (record_latest_value, set_internalvar, clear_internalvar):
6711 Update.
6712 * stack.c (info_frame_command): Don't call value_free.
6713 * python/py-value.c (valpy_dealloc, valpy_new)
6714 (value_to_value_object): Update.
6715 * printcmd.c (do_examine): Update.
6716 * opencl-lang.c (lval_func_free_closure): Update.
6717 * mi/mi-main.c (register_changed_p): Don't call value_free.
6718 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6719 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6720 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6721 value_free.
6722 * guile/scm-value.c (vlscm_free_value_smob)
6723 (vlscm_scm_from_value): Update.
6724 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6725 (frame_unwind_register_unsigned, get_frame_register_bytes)
6726 (put_frame_register_bytes): Don't call value_free.
6727 * findvar.c (address_from_register): Don't call value_free.
6728 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6729 * dwarf2loc.c (entry_data_value_free_closure)
6730 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6731 (dwarf2_evaluate_loc_desc_full): Update.
6732 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6733 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6734 (~watchpoint, watch_command_1)
6735 (invalidate_bp_value_on_memory_change): Update.
6736 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6737
7f8a5d38
SM
67382018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6739
6740 PR gdb/23022
6741 * warning.m4: Add -Wno-error=deprecated-register.
6742 * configure: Re-generate.
6743
8a76bd3b
TT
67442018-04-05 Tom Tromey <tom@tromey.com>
6745
6746 * linespec.h: Remove include of "vec.h".
6747
8e8d776e
TT
67482018-04-05 Tom Tromey <tom@tromey.com>
6749
6750 * linespec.c (typep): Remove typedef.
6751 (find_methods, find_superclass_methods): Take a std::vector.
6752 (find_method): Use std::vector.
6753
9b2f8581
TT
67542018-04-05 Tom Tromey <tom@tromey.com>
6755
6756 * utils.c (compare_strings): Remove.
6757 * utils.h (compare_strings): Remove.
6758 * objc-lang.h (find_imps): Update.
6759 * objc-lang.c (find_methods): Take a std::vector.
6760 (uniquify_strings, find_imps): Likewise.
6761 * linespec.c (find_methods): Take a std::vector.
6762 (decode_objc): Use std::vector.
6763 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6764 a std::vector.
6765 (find_method, find_function_symbols): Use std::vector.
6766
459a2e4c
TT
67672018-04-05 Tom Tromey <tom@tromey.com>
6768
6769 * completer.c (completion_tracker::completion_tracker): Remove
6770 cast.
6771 (completion_tracker::discard_completions): Likewise.
6772 * breakpoint.c (ambiguous_names_p): Remove cast.
6773 * ada-lang.c (_initialize_ada_language): Remove cast.
6774 * utils.h (streq): Update.
6775 (streq_hash): Add new declaration.
6776 * utils.c (streq): Return bool.
6777 (streq_hash): New function.
6778
9be2c17a
TT
67792018-04-05 Tom Tromey <tom@tromey.com>
6780
6781 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6782 Remove a string copy.
6783
f73c6ece
TT
67842018-04-05 Tom Tromey <tom@tromey.com>
6785
6786 * linespec.c (filter_results): Use std::vector.
6787 (decode_line_2, decode_line_full): Update.
6788
53a0f8a2
TT
67892018-04-05 Tom Tromey <tom@tromey.com>
6790
6791 * linespec.c (canonical_to_fullform): Return std::string.
6792 (filter_results): Update.
6793 (struct decode_line_2_item): Add constructor.
6794 <fullform, displayform>: Now std::string.
6795 (decode_line_2_compare_items): Now a std::sort comparator.
6796 (decode_line_2): Update.
6797
a5b5adf5
TT
67982018-04-05 Tom Tromey <tom@tromey.com>
6799
6800 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6801 (unexpected_linespec_error): Update.
6802 (linespec_parse_basic, parse_linespec): Update.
6803
6a307fc5
TT
68042018-04-05 Tom Tromey <tom@tromey.com>
6805
6806 * linespec.c (linespec_parse_basic): Reindent.
6807
41c1efc6
TT
68082018-04-05 Tom Tromey <tom@tromey.com>
6809
6810 * minsyms.h (iterate_over_minimal_symbols): Update.
6811 * minsyms.c (iterate_over_minimal_symbols): Take a
6812 gdb::function_view.
6813 * linespec.c (struct collect_minsyms): Remove.
6814 (compare_msyms): Now a std::sort comparator.
6815 (add_minsym): Add parameters.
6816 (search_minsyms_for_name): Update. Use std::vector.
6817
c5edbf3d
TT
68182018-04-03 Tom Tromey <tom@tromey.com>
6819
6820 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6821 gdb::byte_vector.
6822
b39efc48
WP
68232018-04-02 Weimin Pan <weimin.pan@oracle.com>
6824
6825 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6826
121ad66c 68272018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
6828
6829 PR gdb/16959
6830 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6831 printing static type.
6832
09473be8
TT
68332018-04-01 Tom Tromey <tom@tromey.com>
6834
6835 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6836 (rs6000_xfer_shared_libraries): Update.
6837
ec1f2d91
SM
68382018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6839
6840 * common/gdb_vecs.h (char_ptr): Remove.
6841 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6842
d8611974
SM
68432018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6844
6845 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6846 with std::vector.
6847 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6848
a18ba4e4
SM
68492018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6850
6851 * tracepoint.h (struct uploaded_tp): Initialize fields.
6852 <actions, step_actions, cmd_strings>: Change type to
6853 std::vector<char *>.
6854 * tracepoint.c (get_uploaded_tp): Allocate with new.
6855 (free_uploaded_tps): Free with delete.
6856 (parse_tracepoint_definition): Adjust to std::vector change.
6857 * breakpoint.c (read_uploaded_action): Likewise.
6858 (create_tracepoint_from_upload): Likewise.
6859 * ctf.c (ctf_write_uploaded_tp): Likewise.
6860 (SET_ARRAY_FIELD): Likewise.
6861 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6862
a7961323
TT
68632018-03-30 Tom Tromey <tom@tromey.com>
6864
6865 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6866 std::unique_ptr.
6867 (svr4_keep_data_in_core): Update.
6868 (svr4_read_so_list): Update.
6869
e83e4e24
TT
68702018-03-30 Tom Tromey <tom@tromey.com>
6871
6872 * windows-nat.c (handle_output_debug_string, handle_exception):
6873 Update.
6874 * target.h (target_read_string): Update.
6875 * target.c (target_read_string): Change "string" to
6876 unique_xmalloc_ptr.
6877 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6878 Update.
6879 * solib-frv.c (frv_current_sos): Update.
6880 * solib-dsbt.c (dsbt_current_sos): Update.
6881 * solib-darwin.c (darwin_current_sos): Update.
6882 * linux-thread-db.c (inferior_has_bug): Update.
6883 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6884 Update. Remove alloca.
6885 * ada-lang.c (ada_main_name): Update.
6886
263db9a1
TT
68872018-03-30 Tom Tromey <tom@tromey.com>
6888
6889 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6890 (struct dwo_file_deleter): New.
6891 (dwo_file_up): New typedef.
6892 (open_and_init_dwo_file): Use dwo_file_up.
6893 (free_dwo_file_cleanup): Remove.
6894
5dafb3d1
TT
68952018-03-30 Tom Tromey <tom@tromey.com>
6896
6897 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6898 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6899
11ed8cad
TT
69002018-03-30 Tom Tromey <tom@tromey.com>
6901
6902 * dwarf2read.c (class free_cached_comp_units): New class.
6903 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6904 (free_cached_comp_units): Remove function.
6905
9ae79dac
TT
69062018-03-30 Tom Tromey <tom@tromey.com>
6907
6908 * utils.h (make_cleanup_unpush_target): Remove.
6909 * inf-ptrace.c (struct target_unpusher): New.
6910 (target_unpush_up) New typedef.
6911 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6912 target_unpush_up.
6913 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6914
5aa89276
TT
69152018-03-27 Tom Tromey <tom@tromey.com>
6916
6917 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6918
1dbeed45
TT
69192018-03-27 Pedro Alves <palves@redhat.com>
6920 Tom Tromey <tom@tromey.com>
6921
6922 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6923 destructor. Now a class.
6924 (gdb_readline_wrapper_cleanup): Remove function.
6925 (gdb_readline_wrapper): Remove cleanups.
6926
c819b2c0
TT
69272018-03-27 Tom Tromey <tom@tromey.com>
6928
6929 * typeprint.h (struct type_print_options) <local_typedefs,
6930 global_typedefs>: Remove "struct" keyword.
6931 (class typedef_hash_table): New class.
6932 (recursively_update_typedef_hash, add_template_parameters)
6933 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6934 (find_typedef_in_hash): Don't declare.
6935 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6936 (typedef_hash_table::recursively_update): Rename from
6937 recursively_update_typedef_hash. Now a member.
6938 (typedef_hash_table::add_template_parameters): Rename from
6939 add_template_parameters. Now a member.
6940 (typedef_hash_table::typedef_hash_table): Now a constructor;
6941 rename from create_typedef_hash.
6942 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6943 rename from free_typedef_hash.
6944 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6945 (do_free_global_table): Remove.
6946 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6947 from copy_type_recursive.
6948 (create_global_typedef_table): Remove.
6949 (typedef_hash_table::find_global_typedef): Now a member of
6950 typedef_hash_table.
6951 (typedef_hash_table::find_typedef): Rename from
6952 find_typedef_in_hash; now a member.
6953 (whatis_exp): Update.
6954 * extension.h (struct ext_lang_type_printers): Add constructor and
6955 destructor.
6956 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6957 declare.
6958 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6959 Now a constructor; rename from start_ext_lang_type_printers.
6960 (ext_lang_type_printers): Now a destructor; rename from
6961 free_ext_lang_type_printers.
6962 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6963 Update.
6964 (c_type_print_base_struct_union): Update. Remove cleanups.
6965
608219fb
TT
69662018-03-27 Tom Tromey <tom@tromey.com>
6967
6968 * dwarf-index-write.c: Include <cmath>.
6969
3fcded8f
JB
69702018-03-27 Joel Brobecker <brobecker@adacore.com>
6971
6972 * NEWS: Add entry describing new "set|show varsize-limit" command.
6973 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6974 command.
6975 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6976 "set variable".
6977
cd4fb1b2
SM
69782018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6979
6980 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6981 dwarf-index-write.c
6982 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6983 * dwarf-index-common.c: New file.
6984 * dwarf-index-common.h: New file.
6985 * dwarf-index-write.c: New file.
6986 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6987 (struct dwarf2_section_info): Move from here.
6988 (dwarf2_section_info_def): Likewise.
6989 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6990 (offset_type): Likewise.
6991 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6992 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6993 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6994 (byte_swap): Likewise.
6995 (MAYBE_SWAP): Likewise.
6996 (dwarf2_per_cu_ptr): Likewise.
6997 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6998 (struct tu_stats): Likewise.
6999 (struct dwarf2_per_objfile): Likewise.
7000 (struct dwarf2_per_cu_data): Likewise.
7001 (struct signatured_type): Likewise.
7002 (sig_type_ptr): Likewise.
7003 (DEF_VEC_P (sig_type_ptr)): Likewise.
7004 (INDEX4_SUFFIX): Likewise.
7005 (INDEX5_SUFFIX): Likewise.
7006 (DEBUG_STR_SUFFIX): Likewise.
7007 (dwarf2_read_section): Make non-static.
7008 (mapped_index_string_hash): Move from here.
7009 (dwarf5_djb_hash): Likewise.
7010 (file_write): Likewise.
7011 (class data_buf): Likewise.
7012 (struct symtab_index_entry): Likewise.
7013 (struct mapped_symtab): Likewise.
7014 (find_slot): Likewise.
7015 (hash_expand): Likewise.
7016 (add_index_entry): Likewise.
7017 (uniquify_cu_indices): Likewise.
7018 (class c_str_view): Likewise.
7019 (class c_str_view_hasher): Likewise.
7020 (class vector_hasher): Likewise.
7021 (write_hash_table): Likewise.
7022 (psym_index_map): Likewise.
7023 (struct addrmap_index_data): Likewise.
7024 (add_address_entry): Likewise.
7025 (add_address_entry_worker): Likewise.
7026 (write_address_map): Likewise.
7027 (symbol_kind): Likewise.
7028 (write_psymbols): Likewise.
7029 (struct signatured_type_index_data): Likewise.
7030 (write_one_signatured_type): Likewise.
7031 (recursively_count_psymbols): Likewise.
7032 (recursively_write_psymbols): Likewise.
7033 (class debug_names): Likewise.
7034 (check_dwarf64_offsets): Likewise.
7035 (psyms_seen_size): Likewise.
7036 (write_gdbindex): Likewise.
7037 (write_debug_names): Likewise.
7038 (assert_file_size): Likewise.
7039 (write_psymtabs_to_index): Likewise.
7040 (save_gdb_index_command): Likewise.
7041 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7042 command.
7043 * dwarf2read.h: New file.
7044
59cc4834
JB
70452018-03-27 Joel Brobecker <brobecker@adacore.com>
7046
7047 PR gdb/22670
7048 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7049 symbol name if the CU's language stores symbol names in linkage
7050 format.
7051 * language.h (struct language_defn)
7052 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7053 all instances of this struct.
7054
67501539
TT
70552018-03-26 Tom Tromey <tom@tromey.com>
7056
7057 * stack.c (backtrace_command_1): Remove verbose code.
7058
76c939ac
TT
70592018-03-26 Tom Tromey <tom@tromey.com>
7060
7061 * python/py-framefilter.c (py_print_type): Don't catch
7062 exceptions. Return void.
7063 (py_print_value): Likewise.
7064 (py_print_single_arg): Likewise.
7065 (enumerate_args): Don't catch exceptions.
7066 (py_print_args): Likewise.
7067 (py_print_frame): Likewise.
7068 (gdbpy_apply_frame_filter): Catch exceptions here.
7069
9507b29c
TT
70702018-03-26 Tom Tromey <tom@tromey.com>
7071
7072 * stack.c (_initialize_stack): Remove trailing newlines from help
7073 text. Add "Usage" line to "backtrace" help.
7074
eb68e487
TT
70752018-03-26 Tom Tromey <tom@tromey.com>
7076
7077 PR python/16486:
7078 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7079
1f111921
TT
70802018-03-26 Tom Tromey <tom@tromey.com>
7081
7082 * python/py-framefilter.c (py_print_single_arg): Return
7083 EXT_LANG_BT_ERROR from catch.
7084
fb7eb8b5
TT
70852018-03-26 Tom Tromey <tom@tromey.com>
7086
7087 PR backtrace/15584:
7088 * stack.c (backtrace_command_1): Move some code into no-filters
7089 "if".
7090
4ca59a9f
TT
70912018-03-26 Tom Tromey <tom@tromey.com>
7092
7093 * python/py-framefilter.c (throw_quit_or_print_exception): New
7094 function.
7095 (gdbpy_apply_frame_filter): Use it.
7096
92256134
TT
70972018-03-26 Tom Tromey <tom@tromey.com>
7098
7099 PR cli/17716:
7100 * python/py-framefilter.c (py_print_type, py_print_value)
7101 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7102 RETURN_MASK_ERROR.
7103
7a630bc2
TT
71042018-03-26 Tom Tromey <tom@tromey.com>
7105
7106 * python/py-framefilter.c (enumerate_args): Use
7107 gdb::unique_xmalloc_ptr.
7108
63283d4a
TT
71092018-03-26 Tom Tromey <tom@tromey.com>
7110
7111 * python/py-framefilter.c (py_print_frame): Return
7112 EXT_LANG_BT_OK.
7113 (gdbpy_apply_frame_filter): Update comment.
7114 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7115 Remove.
7116 <EXT_LANG_BT_NO_FILTERS>: Change value.
7117
978d6c75
TT
71182018-03-26 Tom Tromey <tom@tromey.com>
7119
7120 PR backtrace/15582:
7121 * stack.c (backtrace_command): Parse "hide" argument.
7122 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7123 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7124 constant.
7125
1cf7e640
TT
71262018-03-26 Tom Tromey <tom@tromey.com>
7127
7128 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7129 add "flags".
7130 (backtrace_command): Remove "fulltrace", add "flags".
7131
ea3b0687
TT
71322018-03-26 Tom Tromey <tom@tromey.com>
7133
7134 * stack.c (backtrace_command): Rewrite command line parsing.
7135
9f034d75
SM
71362018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7137
7138 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7139
ce1459e5
SM
71402018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7141
7142 * filename-seen-cache.h: Add include guard.
7143
4f7ae6f5
KS
71442018-03-26 Keith Seitz <keiths@redhat.com>
7145
7146 * symfile.c (place_section): Remove "struct" from section_addr_info
7147 in comment.
7148 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7149 "struct" keyword from section_addr_info.
7150
5cd3e386
AH
71512018-03-26 Alan Hayward <alan.hayward@arm.com>
7152
7153 * regformats/regdef.h (reg): Add constructors.
7154
3e5ef9a4
PA
71552018-03-25 Pedro Alves <palves@redhat.com>
7156
7157 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7158 if then/else bodies in var_func_name extraction.
7159
c88d2fcc 71602018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
7161
7162 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7163 lookup_minimal_symbol() to find symbol entry.
7164 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7165
b7fee5a3
KS
71662018-03-23 Keith Seitz <keiths@redhat.com>
7167
7168 PR c++/22968
7169 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7170 nested type definitions for C++, too.
7171
2cc9b304
TT
71722018-03-23 Tom Tromey <tom@tromey.com>
7173
7174 * machoread.c (struct oso_el): Add a constructor. Don't define as
7175 a typedef.
7176 (macho_register_oso): Remove.
7177 (macho_symtab_read): Take a std::vector.
7178 (oso_el_compare_name): Now a std::sort comparator.
7179 (macho_symfile_read_all_oso): Take a std::vector.
7180 (macho_symfile_read): Use std::vector. Remove cleanups.
7181
a2b2bc12
TT
71822018-03-22 Tom Tromey <tom@tromey.com>
7183
7184 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7185 (record_full_goto_bookmark): Use std::string.
7186
7a8f494c
PFC
71872018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7188
7189 PR tdep/18295
7190 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7191 a single mask.
7192
dd6d677f
PFC
71932018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7194
7195 * rs6000-tdep.c (store_insn_p): New function.
7196 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7197 and cr_reg to their unshifted values. Use store_insn_p to
7198 match LR saves using either R1 or fdata->alloca_reg. Use
7199 store_insn_p to match CR saves. Set alloca_reg_offset
7200 when alloca_reg and framep are set. Remove lr_reg shift
7201 when assigning to fdata->lr_register.
7202
26d6cec4
AA
72032018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7204
7205 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7206 command line args instead of emitting a warning.
7207
5d9310c4
SM
72082018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7209
7210 * tracepoint.h (struct static_tracepoint_marker): Initialize
7211 fields, define default constructor, move constructor and move
7212 assignment, disable the rest.
7213 <str_id, extra>: Make std::string.
7214 (release_static_tracepoint_marker): Remove.
7215 (free_current_marker): Remove.
7216 * tracepoint.c (free_current_marker): Remove.
7217 (parse_static_tracepoint_marker_definition): Adjust to
7218 std::string, use new hex2str overload.
7219 (release_static_tracepoint_marker): Remove.
7220 (print_one_static_tracepoint_marker): Get marker by reference
7221 and adjust to std::string.
7222 (info_static_tracepoint_markers_command): Adjust to std::vector
7223 changes
7224 * target.h (static_tracepoint_marker_p): Remove typedef.
7225 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7226 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7227 bool.
7228 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7229 * target-debug.h
7230 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7231 (target_debug_print_std_vector_static_tracepoint_marker): New.
7232 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7233 to...
7234 (target_debug_print_static_tracepoint_marker_p): ... this.
7235 * target-delegates.c: Re-generate.
7236 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7237 Make std::string.
7238 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7239 (decode_static_tracepoint_spec): Adjust to std::vector.
7240 (tracepoint_print_one_detail): Adjust to std::string.
7241 (strace_marker_decode_location): Adjust to std::string.
7242 (update_static_tracepoint): Adjust to std::string, remove call
7243 to release_static_tracepoint_marker.
7244 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7245 Adjust to std::vector.
7246 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7247 (remote_static_tracepoint_markers_by_strid): Adjust to
7248 std::vector.
7249 * common/rsp-low.h (hex2str): New overload with explicit count
7250 of bytes.
7251 * common/rsp-low.c (hex2str): New overload with explicit count
7252 of bytes.
7253 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7254 (_initialize_rsp_low_selftests): Add test_hex2str test.
7255 * unittests/tracepoint-selftests.c
7256 (test_parse_static_tracepoint_marker_definition): Adjust to
7257 std::string.
7258
62c222b6
SM
72592018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7260
7261 * tracepoint.c (parse_static_tracepoint_marker_definition):
7262 Consider case where the definition is followed by more
7263 definitions.
7264 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7265 tracepoint-selftests.c.
7266 * unittests/tracepoint-selftests.c: New.
7267
7eb2418f
PFC
72682018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7269
7270 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7271 Carvalho.
7272
7cbe16e9
SR
72732018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7274
3d6b3b82 7275 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 7276
4ee89e90
SR
72772018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7278
3d6b3b82 7279 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 7280
92630041
TT
72812018-03-19 Tom Tromey <tom@tromey.com>
7282
7283 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7284 "IDENT" production.
7285
76727919
TT
72862018-03-19 Pedro Alves <palves@redhat.com>
7287 Tom Tromey <tom@tromey.com>
7288
7289 * unittests/observable-selftests.c: New file.
7290 * common/observable.h: New file.
7291 * observable.h: New file.
7292 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7293 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7294 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7295 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7296 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7297 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7298 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7299 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7300 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7301 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7302 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7303 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7304 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7305 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7306 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7307 tui/tui-interp.c, valops.c: Update all users.
7308 * tui/tui-hooks.c (tui_bp_created_observer)
7309 (tui_bp_deleted_observer, tui_bp_modified_observer)
7310 (tui_inferior_exit_observer, tui_before_prompt_observer)
7311 (tui_normal_stop_observer, tui_register_changed_observer):
7312 Remove.
7313 (tui_observers_token): New global.
7314 (attach_or_detach, tui_attach_detach_observers): New functions.
7315 (tui_install_hooks, tui_remove_hooks): Use
7316 tui_attach_detach_observers.
7317 * record-btrace.c (record_btrace_thread_observer): Remove.
7318 (record_btrace_thread_observer_token): New global.
7319 * observer.sh: Remove.
7320 * observer.c: Rename to observable.c.
7321 * observable.c (namespace gdb_observers): Define new objects.
7322 (observer_debug): Move into gdb_observers namespace.
7323 (struct observer, struct observer_list, xalloc_observer_list_node)
7324 (xfree_observer_list_node, generic_observer_attach)
7325 (generic_observer_detach, generic_observer_notify): Remove.
7326 (_initialize_observer): Update.
7327 Don't include observer.inc.
7328 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7329 (clean mostlyclean): Likewise.
7330 (observer.h, observer.inc): Remove targets.
7331 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7332 (COMMON_SFILES): Use observable.c, not observer.c.
7333 * .gitignore: Remove observer.h.
7334
1cb1f3da
TT
73352018-03-18 Tom Tromey <tom@tromey.com>
7336
7337 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7338 gdb::def_vector.
7339 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7340
a06ab151
TT
73412018-03-17 Tom Tromey <tom@tromey.com>
7342
7343 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7344
770623f7
TT
73452018-03-17 Tom Tromey <tom@tromey.com>
7346
7347 * target.c (class scoped_target_fd): New.
7348 (target_fileio_close_cleanup): Remove.
7349 (target_fileio_read_alloc_1): Use scoped_target_fd.
7350
39be3c7e
SM
73512018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7352
7353 * silent-rules.mk: New.
7354 * Makefile.in: Include silent-rules.mk
7355 (srcdir, VPATH, top_srcdir): Move up.
7356 (COMPILE): Add ECHO_CXX.
7357 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7358 (init.c): Add ECHO_INIT_C.
7359 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7360 (version.c): Add ECHO_GEN.
7361 (printcmd.o): Add ECHO_CXX.
7362 (target-float.o): Add ECHO_CXX.
7363 (ada-exp.o): Add ECHO_CXX.
7364 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7365 (insight$(EXEEXT)): Add ECHO_CXXLD.
7366 * gnulib/configure.ac: Add AM_SILENT_RULES.
7367 * gnulib/aclocal.m4: Re-generate.
7368 * gnulib/configure: Re-generate.
7369 * gnulib/import/Makefile.in: Re-generate.
7370
37e136b1
TT
73712018-03-16 Tom Tromey <tom@tromey.com>
7372
7373 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7374 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7375 * utils.c (do_free_section_addr_info)
7376 (make_cleanup_free_section_addr_info): Remove.
7377 * symfile.h (struct other_sections): Add constructor.
7378 (struct section_addr_info): Remove.
7379 (section_addr_info): New typedef.
7380 (struct sym_fns) <sym_offsets>: Change type of parameter.
7381 (build_section_addr_info_from_objfile)
7382 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7383 (default_symfile_offsets, symbol_file_add)
7384 (symbol_file_add_from_bfd)
7385 (build_section_addr_info_from_section_table): Update.
7386 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7387 * symfile.c (alloc_section_addr_info): Remove.
7388 (build_section_addr_info_from_section_table): Change return type.
7389 Update.
7390 (build_section_addr_info_from_bfd)
7391 (build_section_addr_info_from_objfile): Likewise.
7392 (free_section_addr_info): Remove.
7393 (relative_addr_info_to_section_offsets): Change type of "addrs".
7394 (addrs_section_compar): Now a std::sort comparator.
7395 (addrs_section_sort): Change return type.
7396 (addr_info_make_relative): Change type of "addrs". Update.
7397 (default_symfile_offsets, syms_from_objfile_1)
7398 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7399 (symbol_file_add_separate): Update.
7400 (symbol_file_add): Change type of "addrs". Update.
7401 (add_symbol_file_command): Update. Remove cleanups.
7402 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7403 cleanups.
7404 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7405 * solib.c (solib_read_symbols): Update.
7406 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7407 * machoread.c (macho_symfile_offsets): Update.
7408 * jit.c (jit_bfd_try_read_symtab): Update.
7409
03afa6ef
SM
74102018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7411
7412 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7413 unittests/utils-selftests.c.
7414 * unittests/utils-selftests.c: New file.
7415
3ae9ce5d
TT
74162018-03-14 Tom Tromey <tom@tromey.com>
7417
7418 PR cli/14977:
7419 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7420 for NULL.
7421
b8c2339b
TT
74222018-03-14 Tom Tromey <tom@tromey.com>
7423
7424 PR cli/19918:
7425 * printcmd.c (printf_pointer): Allow "-" in format.
7426
80ae639d
TT
74272018-03-14 Tom Tromey <tom@tromey.com>
7428
7429 * printcmd.c (_initialize_printcmd): Add usage to printf.
7430
0d671d99
YQ
74312018-03-14 Yao Qi <qiyao@sourceware.org>
7432
7433 * MAINTAINERS: Update my email address.
7434
b577b6af
TT
74352018-03-13 Tom Tromey <tom@tromey.com>
7436
7437 * machoread.c (macho_check_dsym): Change filenamep to a
7438 std::string*.
7439 (macho_symfile_read): Update.
7440 * symfile.c (load_command): Use std::string.
7441
89a3b63e
AB
74422018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7443
7444 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7445 to error message string.
7446 (riscv_register_name): Use xsnprintf instead of sprintf.
7447 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7448 internal_error.
7449 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7450 error.
7451 (riscv_push_dummy_call): Likewise.
7452
984c7238
TT
74532018-03-12 Tom Tromey <tom@tromey.com>
7454
7455 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7456 Use gdb::byte_vector.
7457 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7458
933522d1
YQ
74592018-03-12 Yao Qi <yao.qi@linaro.org>
7460
7461 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7462 parameter type to readable_regcache.
7463 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7464 the declaration.
7465
be2daae6
TT
74662018-03-11 Tom Tromey <tom@tromey.com>
7467
7468 * dwarf2read.c (struct nextfield): Add initializers.
7469 (struct nextfnfield): Remove.
7470 (struct fnfieldlist): Add initializers. Remove "length" and
7471 "head", use std::vector.
7472 (struct decl_field_list): Remove.
7473 (struct field_info): Add initializers.
7474 <fields, baseclasses>: Now std::vector.
7475 <nbaseclasses, nfnfields, typedef_field_list_count,
7476 nested_types_list_count>: Remove.
7477 (dwarf2_add_field, dwarf2_add_type_defn)
7478 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7479 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7480 (process_structure_scope): Update.
7481
484cf504
TT
74822018-03-11 Tom Tromey <tom@tromey.com>
7483
7484 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7485 for use by std::sort.
7486 (build_type_psymtabs_1): Use std::vector.
7487
9bd8e0b0
EZ
74882018-03-09 Eli Zaretskii <eliz@gnu.org>
7489
7490 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7491 and LIBMPFR in the printed configuration.
7492
5dc1a704
TT
74932018-03-08 Tom Tromey <tom@tromey.com>
7494
7495 * source.c (get_filename_and_charpos): Use scoped_fd.
7496 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7497 (procfs_pidlist): Likewise.
7498 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7499 (iterate_over_mappings): Likewise.
7500
fdf07f3a
TT
75012018-03-08 Tom Tromey <tom@tromey.com>
7502
7503 * infcall.c (struct call_return_meta_info)
7504 <stack_temporaries_enabled>: Remove.
7505 (get_call_return_value, call_function_by_hand_dummy): Update.
7506 * thread.c (disable_thread_stack_temporaries): Remove.
7507 (enable_thread_stack_temporaries): Remove.
7508 (thread_stack_temporaries_enabled_p): Return bool.
7509 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7510 (get_last_thread_stack_temporary): Update.
7511 * eval.c (evaluate_subexp): Update.
7512 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7513 class, not a function.
7514 (value_ptr, value_vec): Remove typedefs.
7515 (class thread_info) <stack_temporaries_enabled>: Now bool.
7516 <stack_temporaries>: Now a std::vector.
7517 (thread_stack_temporaries_enabled_p)
7518 (value_in_thread_stack_temporaries): Return bool.
7519
567a3e54
SM
75202018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7521
7522 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7523 (getpkt_or_notif_sane_1): Likewise.
7524
00b40057
SM
75252018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7526
7527 * build-id.c (build_id_to_debug_bfd): Use std::string.
7528
a8dbfd58
SM
75292018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7530
7531 * build-id.c (find_separate_debug_file_by_buildid): Return
7532 std::string.
7533 * build-id.h (find_separate_debug_file_by_buildid): Return
7534 std::string.
7535 * coffread.c (coff_symfile_read): Adjust to std::string.
7536 * elfread.c (elf_symfile_read): Adjust to std::string.
7537 * symfile.c (separate_debug_file_exists): Change parameter to
7538 std::string.
7539 (find_separate_debug_file): Return std::string.
7540 (find_separate_debug_file_by_debuglink): Return std::string.
7541 * symfile.h (find_separate_debug_file_by_debuglink): Return
7542 std::string.
7543
e6a58aa8
SM
75442018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7545
7546 * common/xml-utils.c (xml_escape_text): Move code to...
7547 (xml_escape_text_append): ... this new function.
7548 * common/xml-utils.h (xml_escape_text_append): New declaration.
7549 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7550 New function.
7551 (_initialize_xml_utils): register test_xml_escape_text_append as
7552 a selftest.
7553
4ef0bef6
AH
75542018-03-07 Alan Hayward <alan.hayward@arm.com>
7555
7556 * defs.h: Remove MAX_REGISTER_SIZE.
7557 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7558 asserts.
7559 * python/py-unwind.c (pyuw_sniffer): Likewise.
7560
e0d3522b
TT
75612018-03-07 Tom Tromey <tom@tromey.com>
7562
7563 * linux-tdep.c (linux_info_proc): Update.
7564 * target.h (struct target_ops) <to_fileio_readlink>: Return
7565 optional<string>.
7566 (target_fileio_readlink): Return optional<string>.
7567 * remote.c (remote_hostio_readlink): Return optional<string>.
7568 * inf-child.c (inf_child_fileio_readlink): Return
7569 optional<string>.
7570 * target.c (target_fileio_readlink): Return optional<string>.
7571
ea005f31
AB
75722018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7573
7574 * regcache.c (cooked_read_test): Add riscv to the list of
7575 architectures that have a save_reggroup.
7576
e95a97d4
AA
75772018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7578
7579 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7580 value is not a dynamic class object.
7581
d8344f3d
TT
75822018-03-06 Tom Tromey <tom@tromey.com>
7583
7584 * rust-exp.y: Formatting fixes.
7585
9add17f2
AB
75862018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7587
7588 * riscv-tdep.c (riscv_register_name): Remove target description
7589 support.
7590 (riscv_gdbarch_init): Remove target description check.
7591
c9486dfe
AB
75922018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7593
7594 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7595 comment.
7596 * riscv-tdep.h: Likewise.
7597
d74aff3d
AB
75982018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7599
7600 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7601 (riscv_pseudo_register_write): Delete.
7602 (riscv_gdbarch_init): Remove all use of pseudo registers.
7603
7ea78b59
SM
76042018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7605
7606 * record-btrace.c (btrace_print_lines): Replace cleanup
7607 parameter with RAII equivalents.
7608 (btrace_insn_history): Replace cleanup with RAII equivalents.
7609 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7610 make_cleanup_ui_out_tuple_begin_end): Remove.
7611 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7612 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7613 make_cleanup_ui_out_list_begin_end): Remove.
7614
53127008
SM
76152018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7616
7617 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7618 parameter types to std::vector. Use bool.
7619 (record_btrace_wait): Replace VEC(tp_t) with
7620 std::vector<thread_info *>.
7621 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7622
228f1508
SM
76232018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7624
7625 * record-btrace.c (record_btrace_disable_callback): Remove.
7626 (struct scoped_btrace_disable): New.
7627 (record_btrace_open): Use scoped_btrace_disable.
7628
b2970c23
AB
76292018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7630
7631 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7632 reading values from registers.
7633
fb294655
AB
76342018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7635
7636 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7637 where appropriate.
7638
cab5bb9d
AB
76392018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7640
7641 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7642 change parameter type. Use GDB's print functions, and use
7643 core_addr_to_string where appropriate.
7644 (riscv_push_dummy_call): Use core_addr_to_string where
7645 appropriate, update call to riscv_print_arg_location, and reindent
7646 a few lines.
7647 (riscv_return_value): Update call to riscv_print_arg_location.
7648
dbbb1059
AB
76492018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7650 Tim Newsome <tim@sifive.com>
7651 Albert Ou <a0u@eecs.berkeley.edu>
7652 Darius Rad <darius@bluespec.com>
7653
7654 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7655 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7656 (ALLDEPFILES): Add riscv-tdep.c
7657 * configure.tgt: Add riscv support.
7658 * riscv-tdep.c: New file.
7659 * riscv-tdep.h: New file.
7660 * NEWS: Mention new target.
7661 * MAINTAINERS: Add entry for riscv.
7662
5dc43913
AB
76632018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7664
7665 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7666 fields within aggregates.
7667
3dea1ef7
SM
76682018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7669
7670 * record-btrace.c (btrace_print_lines): Change type of flags to
7671 gdb_disassembly_flags.
7672
7efba073
JB
76732018-03-04 John Baldwin <jhb@FreeBSD.org>
7674
7675 * fbsd-nat.c: Include "inf-ptrace.h".
7676 (USE_SIGTRAP_SIGINFO): Conditionally define.
7677 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7678 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7679 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7680 function.
7681 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7682 Likewise.
7683 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7684 Likewise.
7685 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7686 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7687 "supports_stopped_by_hw_breakpoint" target methods.
7688
386a8676
JB
76892018-03-04 John Baldwin <jhb@FreeBSD.org>
7690
7691 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7692 * fbsd-nat.c (debug_fbsd_nat): New variable.
7693 (show_fbsd_nat_debug): New function.
7694 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7695 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7696
12279366
JB
76972018-03-04 John Baldwin <jhb@FreeBSD.org>
7698
7699 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7700 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7701 prototype.
7702 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7703 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7704 method.
7705
54693cf5
SM
77062018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7707
7708 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7709 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7710
ccb2231c
SM
77112018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7712
7713 * charset.c (struct charset_vector): New.
7714 (charsets): Change type to charset_vector.
7715 (find_charset_names): Adjust.
7716 (add_one): Adjust.
7717 (_initialize_charset): Adjust.
7718
6fb16ce6
SM
77192018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7720
7721 * progspace.h (struct program_space) <deleted_solibs>: Change
7722 type to std::vector<std::string>.
7723 * progspace.c (clear_program_space_solib_cache): Adjust.
7724 * breakpoint.c (print_solib_event): Adjust.
7725 (check_status_catch_solib): Adjust.
7726 * solib.c (update_solib_list): Adjust.
7727 * ui-out.h (class ui_out) <field_string>: New overload.
7728 * ui-out.c (ui_out::field_string): New overload.
7729
564b1e3f
SM
77302018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7731
7732 * progspace.h (struct program_space): Add constructor and
7733 destructor, initialize fields.
7734 (add_program_space): Remove.
7735 * progspace.c (add_program_space): Rename to...
7736 (program_space::program_space): ... this.
7737 (release_program_space): Rename to...
7738 (program_space::~program_space): ... this.
7739 (delete_program_space): Use delete to delete program_space.
7740 (initialize_progspace): Use new to allocate program_space.
7741 * inferior.c (add_inferior_with_spaces): Likewise.
7742 (clone_inferior_command): Likewise.
7743 * infrun.c (follow_fork_inferior): Likewise.
7744 (handle_vfork_child_exec_or_exit): Likewise.
7745
e80aaf61
SM
77462018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7747
7748 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7749 (delim_string_to_char_ptr_vec): Return std::vector of
7750 gdb::unique_xmalloc_ptr.
7751 (dirnames_to_char_ptr_vec_append): Take std::vector of
7752 gdb::unique_xmalloc_ptr.
7753 (dirnames_to_char_ptr_vec): Return std::vector of
7754 gdb::unique_xmalloc_ptr.
7755 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7756 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7757 (delim_string_to_char_ptr_vec): Return an std::vector of
7758 gdb::unique_xmalloc_ptr, adjust the code.
7759 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7760 gdb::unique_xmalloc_ptr, adjust the code.
7761 (dirnames_to_char_ptr_vec): Return an std::vector of
7762 gdb::unique_xmalloc_ptr, adjust the code.
7763 * auto-load.c (auto_load_safe_path_vec): Change type to
7764 std::vector of gdb::unique_xmalloc_ptr.
7765 (auto_load_expand_dir_vars): Return an std::vector of
7766 gdb::unique_xmalloc_ptr, adjust the code.
7767 (auto_load_safe_path_vec_update): Adjust.
7768 (filename_is_in_auto_load_safe_path_vec): Adjust.
7769 (auto_load_objfile_script_1): Adjust.
7770 * build-id.c (build_id_to_debug_bfd): Adjust.
7771 * linux-thread-db.c (thread_db_load_search): Adjust.
7772 * source.c (add_path): Adjust.
7773 (openp): Adjust.
7774 * symfile.c (find_separate_debug_file): Adjust.
7775 * utils.c (do_free_char_ptr_vec): Remove.
7776 (make_cleanup_free_char_ptr_vec): Remove.
7777
ab818ade
SDJ
77782018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7779
7780 PR gdb/22907
7781 * common/pathstuff.c: Conditionally include "<windows.h>".
7782
e1e6f073
GS
77832018-03-01 Georg Sauthoff <mail@georg.so>
7784
7785 PR gdb/22888
7786 * gcore.in: Quote variables and switch interpreter to bash.
7787
c7b15a66
TT
77882018-03-01 Tom Tromey <tom@tromey.com>
7789
7790 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7791 assertion. Add assertion for discriminant_index.
7792 (quirk_rust_enum): Use correct base type name in univariant case.
7793
0cb7c7b0
SM
77942018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7795
7796 * record.c (get_call_history_modifiers): Return a
7797 record_print_flags.
7798 (cmd_record_call_history): Adjust.
7799 * record-btrace.c (record_btrace_call_history): Adjust.
7800 (record_btrace_call_history_range): Adjust.
7801 (record_btrace_call_history_from): Adjust.
7802 * target-debug.h (target_debug_print_record_print_flags): New.
7803 * target-delegates.c: Re-generate.
7804 * target.c (target_call_history): Change flags type.
7805 (target_call_history_from): Likewise.
7806 (target_call_history_range): Likewise.
7807 * target.h (struct target_ops) <target_call_history>: Likewise.
7808 (target_call_history_from): Likewise.
7809 (target_call_history_range): Likewise.
7810
25e3c82c
SDJ
78112018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7812 Simon Marchi <simon.marchi@polymtl.ca>
7813
7814 * common/common-utils.c: Include "sys/stat.h".
7815 (is_regular_file): Move here from "source.c"; change return
7816 type to "bool".
7817 * common/common-utils.h (is_regular_file): New prototype.
7818 * common/pathstuff.c (contains_dir_separator): New function.
7819 * common/pathstuff.h (contains_dir_separator): New prototype.
7820 * source.c: Don't include "sys/stat.h".
7821 (is_regular_file): Move to "common/common-utils.c".
7822
b4987c95
SDJ
78232018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7824
7825 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7826 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7827 * auto-load.c: Include "common/pathstuff.h".
7828 * common/common-def.h (current_directory): Move here.
7829 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7830 function.
7831 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7832 prototype.
7833 * common/pathstuff.c: New file.
7834 * common/pathstuff.h: New file.
7835 * compile/compile.c: Include "common/pathstuff.h".
7836 * defs.h (current_directory): Move to "common/common-defs.h".
7837 * dwarf2read.c: Include "common/pathstuff.h".
7838 * exec.c: Likewise.
7839 * guile/scm-safe-call.c: Likewise.
7840 * linux-thread-db.c: Likewise.
7841 * main.c: Likewise.
7842 * nto-tdep.c: Likewise.
7843 * objfiles.c: Likewise.
7844 * source.c: Likewise.
7845 * symtab.c: Likewise.
7846 * utils.c: Include "common/pathstuff.h".
7847 (gdb_realpath): Move to "common/pathstuff.c".
7848 (gdb_realpath_keepfile): Likewise.
7849 (gdb_abspath): Likewise.
7850 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7851 (gdb_realpath_keepfile): Likewise.
7852 (gdb_abspath): Likewise.
7853
f169cfdc
JB
78542018-02-28 John Baldwin <jhb@FreeBSD.org>
7855
7856 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7857 wildcard process pid for super_resume for kernels with a
7858 specific bug.
7859
e05cac70
PM
78602018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7861
7862 * compile/compile.c (get_args): Add additional comments
7863 explaining function.
7864
55089490
TT
78652018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7866 Tom Tromey <tom@tromey.com>
7867
7868 * target.h (memory_write_request_s): Remove typedef. Don't define
7869 VEC.
7870 (target_write_memory_blocks): Change argument to std::vector.
7871 (struct memory_write_request): Add constructor.
7872 * target-memory.c (compare_block_starting_address): Return bool.
7873 Change argument types.
7874 (claim_memory): Change arguments to use std::vector.
7875 (split_regular_and_flash_blocks, blocks_to_erase)
7876 (compute_garbled_blocks): Likewise.
7877 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7878 (target_write_memory_blocks): Change argument to std::vector.
7879 * symfile.c (struct load_section_data): Add constructor and
7880 destructor. Use std::vector for "requests".
7881 (struct load_progress_data): Add initializers.
7882 (load_section_callback): Update. Use "new".
7883 (clear_memory_write_data): Remove.
7884 (generic_load): Update.
7885
0c305b61
AH
78862018-02-27 Alan Hayward <alan.hayward@arm.com>
7887
7888 * arch/aarch64.h: Use common/tdesc.h.
7889
c5196c92
MR
78902018-02-26 Maciej W. Rozycki <macro@mips.com>
7891
7892 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7893 architecture with a 64-bit ABI.
7894
37c33887
MR
78952018-02-26 Maciej W. Rozycki <macro@mips.com>
7896
7897 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7898 ahead of target description loading.
7899
d4dd3282
TT
79002018-02-26 Tom Tromey <tom@tromey.com>
7901
7902 * stack.c (backtrace_command_1): Update.
7903 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7904 of "flags".
7905 * python/py-framefilter.c (py_print_frame)
7906 (gdbpy_apply_frame_filter): Change type of "flags".
7907 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7908 of "flags".
7909 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7910 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7911 * extension.h (enum frame_filter_flag): Rename from
7912 frame_filter_flags.
7913 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7914 (apply_ext_lang_frame_filter): Change type of "flags".
7915 * extension.c (apply_ext_lang_frame_filter): Change type of
7916 "flags".
7917 * extension-priv.h (struct extension_language_ops)
7918 <apply_frame_filter>: Change type of "flags".
7919
6893c19a
TT
79202018-02-26 Tom Tromey <tom@tromey.com>
7921
7922 PR python/16497:
7923 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7924 off-by-one in py_end computation.
7925 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7926 PRINT_MORE_FRAMES.
7927 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7928 constant.
7929
2ddeaf8a
TT
79302018-02-26 Tom Tromey <tom@tromey.com>
7931
7932 * dwarf2read.c (struct variant_field): New.
7933 (struct nextfield) <variant>: New field.
7934 (dwarf2_add_field): Handle DW_TAG_variant_part.
7935 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7936 discriminated union.
7937 (read_structure_type): Handle DW_TAG_variant_part.
7938 (handle_struct_member_die): New function, extracted from
7939 process_structure_scope. Handle DW_TAG_variant.
7940 (process_structure_scope): Handle discriminated unions. Call
7941 handle_struct_member_die.
7942
c9317f21
TT
79432018-02-26 Tom Tromey <tom@tromey.com>
7944
7945 * rust-lang.h (rust_last_path_segment): Declare.
7946 * rust-lang.c (rust_last_path_segment): Now public. Change
7947 contract.
7948 (struct disr_info): Remove.
7949 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7950 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7951 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7952 (rust_enum_p, rust_enum_variant): New function.
7953 (rust_underscore_fields): Remove "offset" parameter.
7954 (rust_print_enum): New function.
7955 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7956 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7957 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7958 enums.
7959 (rust_internal_print_type): New function, from rust_print_type.
7960 Remove enum code.
7961 (rust_print_type): Call rust_internal_print_type.
7962 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7963 Update enum handling.
7964 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7965 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7966 (rust_union_quirks): New functions.
7967 (process_full_comp_unit, process_full_type_unit): Call
7968 rust_union_quirks.
7969 (process_structure_scope): Update rust_unions if necessary.
7970
7c22600a
TT
79712018-02-26 Tom Tromey <tom@tromey.com>
7972
7973 * value.h (value_union_variant): Declare.
7974 * valops.c (value_union_variant): New function.
7975 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7976 (struct discriminant_info): New.
7977 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7978 enumerator.
7979 (struct main_type) <flag_discriminated_union>: New field.
7980
15ce8941
TT
79812018-02-26 Tom Tromey <tom@tromey.com>
7982
7983 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7984 unittests/unpack-selftests.c.
7985 * unittests/unpack-selftests.c: New file.
7986 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7987
48fbe735
YQ
79882018-02-26 Yao Qi <yao.qi@linaro.org>
7989
7990 * dwarf2read.c (struct partial_die_info) <read>: New method.
7991 (read_partial_die): Remove the declaration.
7992 (load_partial_dies): Update.
7993 (partial_die_info::partial_die_info):
7994 (read_partial_die): Change it to partial_die_info::read.
7995
52356b79
YQ
79962018-02-26 Yao Qi <yao.qi@linaro.org>
7997
7998 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7999 (fixup_partial_die): Remove declaration.
8000 (scan_partial_symbols): Update.
8001 (partial_die_parent_scope): Likewise.
8002 (partial_die_full_name): Likewise.
8003 (fixup_partial_die): Change it to partial_die_info::fixup.
8004
35cc7ed7
YQ
80052018-02-26 Yao Qi <yao.qi@linaro.org>
8006
8007 * dwarf2read.c (read_partial_die): Update the declaration.
8008 (load_partial_dies): Caller update.
8009 (read_partial_die): Remove one argument abbrev_len.
8010
6f06d47b
YQ
80112018-02-26 Yao Qi <yao.qi@linaro.org>
8012
8013 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8014 assignment operator.
8015 (load_partial_dies): Use ctor and copy ctor.
8016 (read_partial_die): Update.
8017 (dwarf2_cu::find_partial_die): Use ctor.
8018
d590ff25
YQ
80192018-02-26 Yao Qi <yao.qi@linaro.org>
8020
8021 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8022 (find_partial_die_in_comp_unit): Change it to
8023 dwarf2_cu::find_partial_die.
8024 (find_partial_die): Update.
8025
fd0a254f
YQ
80262018-02-26 Yao Qi <yao.qi@linaro.org>
8027
8028 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8029 is NULL.
8030
cd9983dd
YQ
80312018-02-26 Yao Qi <yao.qi@linaro.org>
8032
8033 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8034
f46cd62a
AH
80352018-02-26 Alan Hayward <alan.hayward@arm.com>
8036
8037 * arch/amd64.h: Use common/tdesc.h.
8038 * arch/i386.c: Likewise.
8039 * arch/i386.h: Likewise.
8040 * arch/tic6x.c: Likewise.
8041 * arch/tdesc.h: Move file from here...
8042 * common/tdesc.h: ...to here.
8043 * features/aarch64-core.c: Regenerate.
8044 * features/aarch64-fpu.c: Regenerate.
8045 * features/i386/32bit-avx.c: Regenerate.
8046 * features/i386/32bit-avx512.c: Regenerate.
8047 * features/i386/32bit-core.c: Regenerate.
8048 * features/i386/32bit-linux.c: Regenerate.
8049 * features/i386/32bit-mpx.c: Regenerate.
8050 * features/i386/32bit-pkeys.c: Regenerate.
8051 * features/i386/32bit-sse.c: Regenerate.
8052 * features/i386/64bit-avx.c: Regenerate.
8053 * features/i386/64bit-avx512.c: Regenerate.
8054 * features/i386/64bit-core.c: Regenerate.
8055 * features/i386/64bit-linux.c: Regenerate.
8056 * features/i386/64bit-mpx.c: Regenerate.
8057 * features/i386/64bit-pkeys.c: Regenerate.
8058 * features/i386/64bit-segments.c: Regenerate.
8059 * features/i386/64bit-sse.c: Regenerate.
8060 * features/i386/x32-core.c: Regenerate.
8061 * features/tic6x-c6xp.c: Regenerate.
8062 * features/tic6x-core.c: Regenerate.
8063 * features/tic6x-gp.c: Regenerate.
8064 * target-descriptions.c: Use common/tdesc.h.
8065 * target-descriptions.h: Likewise.
8066
9b292f68
TT
80672018-02-24 Tom Tromey <tom@tromey.com>
8068
8069 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8070 (try_thread_db_load_from_dir, thread_db_load_search): Use
8071 std::string.
8072 (info_auto_load_libthread_db_compare): Return bool. Change
8073 argument types.
8074 (info_auto_load_libthread_db): Use std::vector, std::string.
8075 Remove cleanups.
8076
281d762b
TT
80772018-02-24 Tom Tromey <tom@tromey.com>
8078
8079 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8080 std::string.
8081 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8082 std::string*.
8083 * gdbarch.c: Rebuild.
8084 * gdbarch.h: Rebuild.
8085 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8086 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8087 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8088 std::string*.
8089
9d8780f0
SM
80902018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8091
8092 * gdbtypes.h (sect_offset): Change type to uint64_t.
8093 (sect_offset_str): New function.
8094 * dwarf2read.c (create_addrmap_from_aranges): Use
8095 sect_offset_str.
8096 (error_check_comp_unit_head): Likewise.
8097 (create_debug_type_hash_table): Likewise.
8098 (read_cutu_die_from_dwo): Likewise.
8099 (init_cutu_and_read_dies): Likewise.
8100 (init_cutu_and_read_dies_no_follow): Likewise.
8101 (process_psymtab_comp_unit_reader): Likewise.
8102 (partial_die_parent_scope): Likewise.
8103 (peek_die_abbrev): Likewise.
8104 (process_queue): Likewise.
8105 (dwarf2_physname): Likewise.
8106 (read_namespace_alias): Likewise.
8107 (read_import_statement): Likewise.
8108 (create_dwo_cu_reader): Likewise.
8109 (create_cus_hash_table): Likewise.
8110 (lookup_dwo_cutu): Likewise.
8111 (inherit_abstract_dies): Likewise.
8112 (read_func_scope): Likewise.
8113 (read_call_site_scope): Likewise.
8114 (dwarf2_add_member_fn): Likewise.
8115 (read_common_block): Likewise.
8116 (read_module_type): Likewise.
8117 (read_typedef): Likewise.
8118 (read_subrange_type): Likewise.
8119 (load_partial_dies): Likewise.
8120 (read_partial_die): Likewise.
8121 (find_partial_die): Likewise.
8122 (read_str_index): Likewise.
8123 (dwarf2_string_attr): Likewise.
8124 (build_error_marker_type): Likewise.
8125 (lookup_die_type): Likewise.
8126 (dump_die_shallow): Likewise.
8127 (follow_die_ref): Likewise.
8128 (dwarf2_fetch_die_loc_sect_off): Likewise.
8129 (dwarf2_fetch_constant_bytes): Likewise.
8130 (follow_die_sig): Likewise.
8131 (get_signatured_type): Likewise.
8132 (get_DW_AT_signature_type): Likewise.
8133 (dwarf2_find_containing_comp_unit): Likewise.
8134 (set_die_type): Likewise.
8135
8ec57239
JB
81362018-02-21 John Baldwin <jhb@FreeBSD.org>
8137
8138 * arch/aarch64.c: Include "common-defs.h".
8139 * arch/amd64.c: Likewise.
8140 * arch/i386.c: Likewise.
8141
3eac2b65
TT
81422018-02-21 Tom Tromey <tom@tromey.com>
8143
8144 * value.h: (extract_field_op): Update.
8145 * eval.c (extract_field_op): Return a const char *.
8146 * expression.h (parse_expression_for_completion): Update.
8147 * completer.c (complete_expression): Update.
8148 (add_struct_fields): Make fieldname const.
8149 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8150 (mark_completion_tag, parse_exp_in_context_1): Update.
8151 (parse_expression_for_completion): Change "name" to
8152 unique_xmalloc_ptr*.
8153
6ccb583f
TT
81542018-02-21 Tom Tromey <tom@tromey.com>
8155
8156 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8157
c113ed0c
YQ
81582018-02-21 Yao Qi <yao.qi@linaro.org>
8159
8160 * avr-tdep.c (avr_read_pc): Change parameter type to
8161 readable_regcache.
8162 * gdbarch.sh (read_pc): Likewise.
8163 * gdbarch.c: Re-generated.
8164 * gdbarch.h: Re-generated.
8165 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8166 readable_regcache.
8167 * ia64-tdep.c (ia64_read_pc): Likewise.
8168 * mips-tdep.c (mips_read_pc): Likewise.
8169 * spu-tdep.c (spu_read_pc): Likewise.
8170
4c74fe6b
YQ
81712018-02-21 Yao Qi <yao.qi@linaro.org>
8172
8173 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8174 * regcache-dump.c: New file.
8175 * regcache.c: Move register_dump to regcache-dump.c.
8176 (maintenance_print_registers): Likewise.
8177 (maintenance_print_raw_registers): Likewise.
8178 (maintenance_print_cooked_registers): Likewise.
8179 (maintenance_print_register_groups): Likewise.
8180 (maintenance_print_remote_registers): Likewise.
8181 (_initialize_regcache): Likewise.
8182 * regcache.h (register_dump): Moved from regcache.c.
8183
796bb026
YQ
81842018-02-21 Yao Qi <yao.qi@linaro.org>
8185
8186 * regcache.c (regcache::regcache): Update.
8187 (regcache::invalidate): Move it to detached_regcache::invalidate.
8188 (get_thread_arch_aspace_regcache): Update.
8189 (regcache::raw_update): Update.
8190 (regcache::cooked_read): Remove some code.
8191 (regcache::cooked_read_value): Likewise.
8192 (regcache::raw_write): Remove assert on m_readonly_p.
8193 (regcache::raw_supply_integer): Move it to
8194 detached_regcache::raw_supply_integer.
8195 (regcache::raw_supply_zeroed): Likewise.
8196 * regcache.h (detached_regcache) <raw_supply_integer>: New
8197 declaration.
8198 <raw_supply_zeroed, invalidate>: Likewise.
8199 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8200 <invalidate>: Likewise.
8201 <m_readonly_p>: Removed.
8202
215c69dc
YQ
82032018-02-21 Yao Qi <yao.qi@linaro.org>
8204
8205 * infcmd.c (get_return_value): Let stop_regs point to
8206 get_current_regcache.
8207 * regcache.c (regcache::regcache): Remove.
8208 (register_dump_reg_buffer): New class.
8209 (regcache_print): Adjust.
8210 * regcache.h (regcache): Remove constructors.
8211
f3384e66
YQ
82122018-02-21 Yao Qi <yao.qi@linaro.org>
8213
8214 * regcache.c (class register_dump): New class.
8215 (register_dump_regcache, register_dump_none): New class.
8216 (register_dump_remote, register_dump_groups): New class.
8217 (regcache_print): Update.
8218 * regcache.h (regcache_dump_what): Move it to regcache.c.
8219 (regcache) <dump>: Remove.
8220
c8ec2f33
YQ
82212018-02-21 Yao Qi <yao.qi@linaro.org>
8222
8223 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8224 reg_buffer_rw *.
8225 (jit_unwind_reg_set_impl): Call raw_supply.
8226 (jit_frame_sniffer): Use reg_buffer_rw.
8227 * record-full.c (record_full_core_regbuf): Change its type.
8228 (record_full_core_open_1): Use reg_buffer_rw.
8229 (record_full_close): Likewise.
8230 (record_full_core_fetch_registers): Use regcache->raw_supply.
8231 (record_full_core_store_registers): Likewise.
8232 * regcache.c (regcache::get_register_status): Move it to
8233 reg_buffer.
8234 (regcache_raw_set_cached_value): Remove.
8235 (regcache::raw_set_cached_value): Remove.
8236 (regcache::raw_write): Call raw_supply.
8237 (regcache::raw_supply): Move it to reg_buffer_rw.
8238 * regcache.h (regcache_raw_set_cached_value): Remove.
8239 (reg_buffer_rw): New class.
8240
daf6667d
YQ
82412018-02-21 Yao Qi <yao.qi@linaro.org>
8242
8243 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8244 readonly_detached_regcache.
8245 (dummy_frame_prev_register): Use regcache->cooked_read.
8246 * frame.c (frame_save_as_regcache): Change return type.
8247 (frame_pop): Update.
8248 * frame.h (frame_save_as_regcache): Update declaration.
8249 * inferior.h (get_infcall_suspend_state_regcache): Update
8250 declaration.
8251 * infrun.c (infcall_suspend_state) <registers>: use
8252 readonly_detached_regcache.
8253 (save_infcall_suspend_state): Don't use regcache_dup.
8254 (get_infcall_suspend_state_regcache): Change return type.
8255 * linux-fork.c (struct fork_info) <savedregs>: Change to
8256 readonly_detached_regcache.
8257 <pc>: New field.
8258 (fork_save_infrun_state): Don't use regcache_dup.
8259 (info_checkpoints_command): Adjust.
8260 * mi/mi-main.c (register_changed_p): Update declaration.
8261 (mi_cmd_data_list_changed_registers): Use
8262 readonly_detached_regcache.
8263 (register_changed_p): Change parameter type to
8264 readonly_detached_regcache.
8265 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8266 readonly_detached_regcache.
8267 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8268 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8269 New.
8270 (regcache::save): Move it to reg_buffer.
8271 (regcache::restore): Change parameter type.
8272 (regcache_dup): Remove.
8273 * regcache.h (reg_buffer) <save>: New method.
8274 (readonly_detached_regcache): New class.
8275 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8276 readonly_detached_regcache.
8277 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8278
fc5b8736
YQ
82792018-02-21 Yao Qi <yao.qi@linaro.org>
8280
8281 * frame.c (frame_save_as_regcache): Use regcache method save.
8282 (frame_pop): Use regcache method restore.
8283 * infrun.c (restore_infcall_suspend_state): Likewise.
8284 * linux-fork.c (fork_load_infrun_state): Likewise.
8285 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8286 save.
8287 * regcache.c (regcache_save): Remove.
8288 (regcache::restore): More asserts.
8289 (regcache_cpy): Remove.
8290 * regcache.h (regcache_save): Remove the declaration.
8291 (regcache::restore): Move from private to public.
8292 Remove the friend declaration of regcache_cpy.
8293 (regcache_cpy): Remove declaration.
8294
849d0ba8
YQ
82952018-02-21 Yao Qi <yao.qi@linaro.org>
8296
8297 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8298 parameter type to 'readable_regcache *'.
8299 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8300 * arm-tdep.c (arm_neon_quad_read): Likewise.
8301 (arm_pseudo_read): Likewise.
8302 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8303 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8304 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8305 * gdbarch.c: Re-generated.
8306 * gdbarch.h: Re-generated.
8307 * gdbarch.sh (pseudo_register_read): Change parameter type to
8308 'readable_regcache *'.
8309 (pseudo_register_read_value): Likewise.
8310 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8311 (h8300_pseudo_register_read): Likewise.
8312 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8313 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8314 (i386_pseudo_register_read_into_value): Likewise.
8315 (i386_pseudo_register_read_value): Likewise.
8316 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8317 declaration.
8318 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8319 * m32c-tdep.c (m32c_raw_read): Likewise.
8320 (m32c_read_flg): Likewise.
8321 (m32c_banked_register): Likewise.
8322 (m32c_banked_read): Likewise.
8323 (m32c_sb_read): Likewise.
8324 (m32c_part_read): Likewise.
8325 (m32c_cat_read): Likewise.
8326 (m32c_r3r2r1r0_read): Likewise.
8327 (m32c_pseudo_register_read): Likewise.
8328 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8329 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8330 (mep_pseudo_cr64_read): Likewise.
8331 (mep_pseudo_register_read): Likewise.
8332 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8333 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8334 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8335 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8336 (regcache::cooked_read): Likewise.
8337 (regcache::cooked_read_value): Likewise.
8338 (regcache_cooked_read_signed):
8339 (regcache::cooked_read): Likewise.
8340 * regcache.h (readable_regcache): New class.
8341 (regcache): Inherit readable_regcache. Move some methods to
8342 readable_regcache.
8343 * rl78-tdep.c (rl78_pseudo_register_read): Change
8344 parameter type to 'readable_regcache *'.
8345 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8346 (e500_pseudo_register_read): Change parameter type to
8347 'readable_regcache *'.
8348 (dfp_pseudo_register_read): Likewise.
8349 (vsx_pseudo_register_read): Likewise.
8350 (efpr_pseudo_register_read): Likewise.
8351 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8352 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8353 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8354 (sh64_pseudo_register_read): Likewise.
8355 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8356 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8357 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8358 (spu_pseudo_register_read): Likewise.
8359 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8360 (xtensa_pseudo_register_read): Likewise.
8361
31716595
YQ
83622018-02-21 Yao Qi <yao.qi@linaro.org>
8363
8364 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8365 (regcache::arch): Move it to reg_buffer::arch.
8366 (regcache::register_buffer): Likewise.
8367 (regcache::assert_regnum): Likewise.
8368 (regcache::num_raw_registers): Likewise.
8369 * regcache.h (reg_buffer): New class.
8370 (regcache): Inherit reg_buffer.
8371
7104e59b
SM
83722018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8373
8374 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8375 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8376
2d8adcbd
MM
83772018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8378
8379 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8380
b5884fa7
AH
83812018-02-19 Alan Hayward <alan.hayward@arm.com>
8382
8383 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8384 (SFILES): Remove common/*.c files.
8385 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8386 * common/common.host: Add common reference.
8387 * configure.ac: Likewise.
8388 * configure: Regenerate.
8389
fd90ace4
YQ
83902018-02-16 Yao Qi <yao.qi@linaro.org>
8391
8392 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8393 (block_initialize_namespace): Use new.
8394 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8395 (dwarf2_free_objfile): Use delete.
8396 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8397 (copy_type_recursive): Use new.
8398 * gdb_obstack.h (allocate_on_obstack): New.
8399
85046ae2
YQ
84002018-02-15 Yao Qi <yao.qi@linaro.org>
8401
8402 PR gdb/22849
8403 * inferior.c (exit_inferior_1): Reset inf->control.
8404
355c559b
JB
84052018-02-15 Joel Brobecker <brobecker@adacore.com>
8406
8407 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8408 declaration.
8409
980548fd
PA
84102018-02-14 Pedro Alves <palves@redhat.com>
8411
8412 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8413 frame_cleanup_after_sniffer on exception.
8414
692d6f97
TT
84152018-02-14 Tom Tromey <tom@tromey.com>
8416
8417 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8418 const.
8419 (solib_bfd_open): Make pathname const.
8420 * solib.c (solib_bfd_open): Make pathname const.
8421 * solib-spu.c (spu_bfd_fopen): Make name const.
8422 (spu_bfd_open): Make pathname const.
8423 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8424 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8425
e0cc99a6
TT
84262018-02-14 Tom Tromey <tom@tromey.com>
8427
8428 * symfile.c (symfile_bfd_open): Update.
8429 * source.h (openp, source_full_path_of, find_and_open_source):
8430 Change argument type to unique_xmalloc_ptr.
8431 * source.c (openp): Take a unique_xmalloc_ptr.
8432 (source_full_path_of, find_and_open_source): Likewise.
8433 (open_source_file, symtab_to_fullname): Update.
8434 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8435 unique_xmalloc_ptr.
8436 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8437 (exec_file_find): Update.
8438 * psymtab.c (psymtab_to_fullname): Update.
8439 * nto-tdep.h (nto_find_and_open_solib): Update.
8440 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8441 unique_xmalloc_ptr.
8442 * exec.c (exec_file_attach): Update.
8443 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8444 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8445
b46a8d7c
TT
84462018-02-14 Tom Tromey <tom@tromey.com>
8447
8448 * solib.c: Include source.h.
8449 * nto-tdep.c: Include source.h.
8450 * mi/mi-cmd-env.c: Include source.h.
8451 * infcmd.c: Include source.h.
8452 * exec.c: Include source.h.
8453 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8454 (add_path, directory_switch, source_path, init_source_path): Move
8455 declarations...
8456 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8457 (add_path, directory_switch, source_path, init_source_path):
8458 ...here.
8459
797bc1cb
TT
84602018-02-14 Tom Tromey <tom@tromey.com>
8461
8462 * solist.h (exec_file_find, solib_find): Return
8463 unique_xmalloc_ptr.
8464 (solib_bfd_fopen): Take a const char *.
8465 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8466 (exec_file_find, solib_find): Likewise.
8467 (solib_bfd_fopen): Do not take ownership of "pathname".
8468 (solib_bfd_open): Use unique_xmalloc_ptr.
8469 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8470 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8471 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8472 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8473
f98b2e33
JB
84742018-02-14 Joel Brobecker <brobecker@adacore.com>
8475
8476 * ada-lang.c (name_match_type_from_name): Remove reference to
8477 ada_name_for_lookup in function's documentation.
8478 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8479
24b9144d
SM
84802018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8481
8482 * defs.h (enum openp_flags): New enum.
8483 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8484 Move to enum openp_flags.
8485 (openp_flags): New enum flags.
8486 (openp): Change parameter type to openp_flags.
8487 * source.c (openp): Change parameter type to openp_flags.
8488 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8489 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8490
387cd15b
SM
84912018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8492
8493 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8494 per-command.
8495
b303c6f6
AB
84962018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8497
8498 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8499 into...
8500 (class dwarf2_queue_guard): ...the destructor of this new class.
8501 (dw2_do_instantiate_symtab): Create instance of the new class
8502 dwarf2_queue_guard, remove cleanup.
8503
9c3630e9
TT
85042018-02-09 Tom Tromey <tom@tromey.com>
8505
8506 * source.c (find_source_lines): Don't reference past the end of
8507 the vector.
8508
c4e12631
MM
85092018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8510
8511 * remote.c (remote_btrace_maybe_reopen): Change error message.
8512 * btrace.c (btrace_enable): Likewise.
8513 (parse_xml_btrace): Likewise.
8514 (parse_xml_btrace_conf): Likewise.
8515
88711fbf
MM
85162018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8517
8518 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8519 (linux_enable_pt, linux_enable_bts): Call
8520 diagnose_perf_event_open_fail.
8521
17ad2a4f
MM
85222018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8523
8524 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8525 Remove parameter and change return type. Update callers. Move it.
8526 (linux_enable_bts, linux_enable_pt): Improve error message.
8527 (linux_enable_pt): Remove zero buffer size check.
8528 (linux_enable_btrace): Improve error messages. Remove NULL return
8529 check.
8530
de6242d3
MM
85312018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8532
8533 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8534 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8535 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8536 (linux_supports_pt, linux_supports_btrace): Remove.
8537 (linux_enable_bts): Call cpu_supports_bts.
8538 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8539 * remote.c (remote_supports_btrace): Remove.
8540 (init_remote_ops): Remove remote_supports_btrace.
8541 * target-delegates.c: Regenerated.
8542 * target.c (target_supports_btrace): Remove.
8543 * target.h (target_ops) <to_supports_btrace>: Remove
8544 (target_supports_btrace): Remove.
8545 * x86-linux-nat.c (x86_linux_create_target): Remove
8546 linux_supports_btrace.
8547
9ee23a85
MM
85482018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8549
8550 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8551 btrace failed.
8552 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8553 exception and use message in own exception.
8554
5c3284c1
MM
85552018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8556
8557 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8558 (perf_event_pt_event_type): Use gdb_file_up.
8559 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8560 scoped_fd, and scoped_mmap.
8561
84696f37
MM
85622018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8563
8564 * common/scoped_mmap.h: New.
8565 * unittests/scoped_mmap-selftest.c: New.
8566 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8567 unittests/scoped_mmap-selftest.c.
8568
ea4a0888
MM
85692018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8570
8571 * common/scoped_fd.h: New.
8572 * unittests/scoped_fd-selftest.c: New.
8573 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8574 unittests/scoped_fd-selftest.c.
8575
869e8290
TT
85762018-02-09 Tom Tromey <tom@tromey.com>
8577
8578 * auto-load.c (auto_load_section_scripts): Use
8579 gdb::unique_xmalloc_ptr.
8580
a37a2ae7
TT
85812018-02-09 Tom Tromey <tom@tromey.com>
8582
8583 * auto-load.c (execute_script_contents): Use std::string.
8584
4e725347
JB
85852018-02-09 Joel Brobecker <brobecker@adacore.com>
8586
8587 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8588 Python function, rather than a new command.
8589
9a897d43
TT
85902018-02-08 Tom Tromey <tom@tromey.com>
8591
8592 * solib.c (solib_find_1): Use std::string.
8593 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8594
58ef3771
TT
85952018-02-08 Tom Tromey <tom@tromey.com>
8596
8597 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8598
a9abc434
TT
85992018-02-08 Tom Tromey <tom@tromey.com>
8600
8601 * source.c (find_source_lines): Use gdb::def_vector.
8602
84f27c6f
TT
86032018-02-08 Tom Tromey <tom@tromey.com>
8604
8605 * macrocmd.c (struct temporary_macro_definition): New.
8606 (macro_define_command): Use temporary_macro_definition. Remove
8607 cleanups.
8608 (free_macro_definition_ptr): Remove.
8609
0354904b
TT
86102018-02-08 Tom Tromey <tom@tromey.com>
8611
8612 * macroexp.c (maybe_expand): Use std::string.
8613
1739cf24
TT
86142018-02-08 Tom Tromey <tom@tromey.com>
8615
8616 * macroexp.c (struct macro_buffer): Add initializers for some
8617 members.
8618 (init_buffer, init_shared_buffer, free_buffer)
8619 (free_buffer_return_text): Remove.
8620 (macro_buffer): New constructors.
8621 (~macro_buffer): New destructor.
8622 (macro_buffer::set_shared): New method.
8623 (macro_buffer::resize_buffer, macro_buffer::appendc)
8624 (macro_buffer::appendmem): Now methods, not free functions.
8625 (set_token, append_tokens_without_splicing, stringify)
8626 (macro_stringify): Update.
8627 (gather_arguments): Change return type. Remove argc_p argument,
8628 add args_ptr argument. Use std::vector.
8629 (substitute_args): Remove argc argument. Accept std::vector.
8630 (expand): Update. Use std::vector.
8631 (scan, macro_expand, macro_expand_next): Update.
8632
f6c2623e
TT
86332018-02-08 Tom Tromey <tom@tromey.com>
8634
8635 * symtab.c (default_collect_symbol_completion_matches_break_on):
8636 Use unique_xmalloc_ptr.
8637 * macroscope.h: (sal_macro_scope, user_macro_scope)
8638 (default_macro_scope): Return unique_xmalloc_ptr.
8639 * macroscope.c (sal_macro_scope, user_macro_scope)
8640 (default_macro_scope): Return unique_xmalloc_ptr.
8641 * macroexp.h (macro_expand, macro_expand_once): Return
8642 unique_xmalloc_ptr.
8643 * macroexp.c (macro_expand, macro_expand_once): Return
8644 unique_xmalloc_ptr.
8645 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8646 (info_macro_command, info_macros_command): Use
8647 unique_xmalloc_ptr.
8648 * compile/compile-c-support.c (write_macro_definitions): Use
8649 unique_xmalloc_ptr.
8650 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8651
c2e0e465
SM
86522018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8653
8654 * value.c (value_static_field): Assign field type instead of
8655 containing type when returning an optimized out value.
8656
3f8c94b4
YQ
86572018-02-06 Yao Qi <yao.qi@linaro.org>
8658
8659 * ft32-tdep.c (ft32_read_pc): Remove.
8660 (ft32_write_pc): Remove.
8661 (ft32_gdbarch_init): Update.
8662 * m32r-tdep.c (m32r_read_pc): Remove.
8663 (m32r_gdbarch_init): Update.
8664 * mep-tdep.c (mep_read_pc): Remove.
8665 (mep_gdbarch_init): Update.
8666 * microblaze-tdep.c (microblaze_write_pc): Remove.
8667 (microblaze_gdbarch_init): Update.
8668 * mn10300-tdep.c (mn10300_read_pc): Remove.
8669 (mn10300_write_pc): Remove.
8670 (mn10300_gdbarch_init): Update.
8671 * moxie-tdep.c (moxie_read_pc): Remove.
8672 (moxie_write_pc): Remove.
8673 (moxie_gdbarch_init): Update.
8674
bca65a23
YQ
86752018-02-06 Yao Qi <yao.qi@linaro.org>
8676
8677 * expprint.c (print_subexp_standard): Handle
8678 OP_F77_UNDETERMINED_ARGLIST.
8679 (dump_subexp_body_standard): Likewise.
8680
583e3f90 86812018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 8682
583e3f90
YQ
8683 * target-descriptions.c (tdesc_element_visitor) Add empty
8684 implementations.
b8df6ca7
AH
8685 (tdesc_type): Move make_gdb_type from here.
8686 (tdesc_type_builtin): Likewise.
8687 (tdesc_type_vector): Likewise.
8688 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8689 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8690 (make_gdb_type_union): Likewise.
8691 (make_gdb_type_flags): Likewise.
8692 (make_gdb_type_enum): Likewise.
8693 (make_gdb_type): New function.
8694 (tdesc_register_type): Use static make_gdb_type.
8695
e813d34a
RK
86962018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8697
8698 * infcmd.c (default_print_one_register_info): Align natural-format
8699 column values consistently one under another.
8700 (pad_to_column): New function.
8701
0eb876f5
JB
87022018-02-05 Joel Brobecker <brobecker@adacore.com>
8703
8704 * dwarf2read.c (dwarf2_physname): Move commment.
8705
0625771b
LS
87062018-02-01 Leszek Swirski <leszeks@google.com>
8707
8708 * varobj.c (varobj_formatted_print_options): Allow recursive
8709 pretty printing if pretty printing is enabled.
8710
59498c30
LS
87112018-02-01 Leszek Swirski <leszeks@google.com>
8712
8713 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8714 names after a structop as a filename.
8715
2d9e6acb
YQ
87162018-02-01 Yao Qi <yao.qi@linaro.org>
8717
8718 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8719 (arm_record_coproc_data_proc): Likewise.
8720
df95a9cf
YQ
87212018-02-01 Yao Qi <yao.qi@linaro.org>
8722
8723 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8724
07e5f5cf
NP
87252018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8726
8727 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8728 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8729
3045b475
PA
87302018-01-31 Pedro Alves <palves@redhat.com>
8731
8732 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8733 * inflow.c (child_terminal_save_inferior): Wrap reference to
8734 tcgetpgrp in HAVE_TERMIOS_H.
8735 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8736 _WIN32.
8737 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8738 always iterate over all inferiors.
8739 (gdbsim_cntrl_c): Adjust.
8740 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8741
929b5ad4
JB
87422018-01-31 Joel Brobecker <brobecker@adacore.com>
8743
8744 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8745 index type is objfile-owned if the element type is as well.
8746
29236ca2
JB
87472018-01-31 Joel Brobecker <brobecker@adacore.com>
8748
8749 GDB 8.1 released.
8750
c81e8879
PR
87512018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8752
8753 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8754 "features/s390x-linux64.c".
8755 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8756 s390_linux32 and s390x_linux64.
8757 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8758 default tdesc.
8759 * s390-tdep.c: Include "features/s390-linux32.c" and
8760 "features/s390x-linux64.c".
8761 (s390_tdesc_valid): Add check for tdesc_has_registers.
8762 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8763 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8764 tdesc_s390x_linux64.
8765 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8766 tdesc_s390x_linux64 to...
8767 * s390-tdep.h: ...here.
8768
e671cd59
PA
87692018-01-30 Pedro Alves <palves@redhat.com>
8770
8771 PR gdb/13211
8772 * config.in, configure: Regenerate.
8773 * configure.ac: Check for getpgid.
8774 * go32-nat.c (go32_pass_ctrlc): New.
8775 (go32_target): Install it.
8776 * inf-child.c (inf_child_target): Install
8777 child_terminal_save_inferior, child_pass_ctrlc and
8778 child_interrupt.
8779 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8780 (inf_ptrace_target): No longer install it.
8781 * infcmd.c (interrupt_target_1): Adjust.
8782 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8783 (child_interrupt): Declare.
8784 (inferior::terminal_state): New.
8785 * inflow.c (struct terminal_info): Update comments.
8786 (inferior_process_group): Delete.
8787 (terminal_is_ours): Delete.
8788 (gdb_tty_state): New.
8789 (child_terminal_init): Adjust.
8790 (is_gdb_terminal, sharing_input_terminal_1)
8791 (sharing_input_terminal): New functions.
8792 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8793 Set the process's actual process group in the foreground if
8794 possible. Handle is_ours_for_output/is_ours distinction. Don't
8795 mark terminal as the inferior's if not sharing GDB's terminal.
8796 Don't check attach_flag.
8797 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8798 pass down a target_terminal_state.
8799 (child_terminal_save_inferior): New, factored out from ...
8800 (child_terminal_ours_1): ... this. Handle
8801 target_terminal_state::is_ours_for_output.
8802 (child_interrupt, child_pass_ctrlc): New.
8803 (inflow_inferior_exit): Clear the inferior's terminal_state.
8804 (copy_terminal_info): Copy the inferior's terminal state.
8805 (_initialize_inflow): Remove reference to terminal_is_ours.
8806 * inflow.h (inferior_process_group): Delete.
8807 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8808 * procfs.c (procfs_target): Don't install procfs_interrupt.
8809 (procfs_interrupt): Delete.
8810 * remote.c (remote_serial_quit_handler): Adjust.
8811 (remote_interrupt): Remove ptid parameter. Adjust.
8812 * target-delegates.c: Regenerate.
8813 * target.c: Include "terminal.h".
8814 (target_terminal::terminal_state): Rename to ...
8815 (target_terminal::m_terminal_state): ... this.
8816 (target_terminal::init): Adjust.
8817 (target_terminal::inferior): Adjust to per-inferior
8818 terminal_state.
8819 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8820 (target_terminal::ours, target_terminal::ours_for_output): Use
8821 target_terminal_is_ours_kind.
8822 (target_interrupt): Remove ptid parameter. Adjust.
8823 (default_target_pass_ctrlc): Adjust.
8824 * target.h (target_ops::to_terminal_save_inferior): New field.
8825 (target_ops::to_interrupt): Remove ptid_t parameter.
8826 (target_interrupt): Remove ptid_t parameter. Update comment.
8827 (target_pass_ctrlc): Update comment.
8828 * target/target.h (target_terminal_state): New scoped enum,
8829 factored out of ...
8830 (target_terminal::terminal_state): ... here.
8831 (target_terminal::inferior): Update comments.
8832 (target_terminal::restore_inferior): New.
8833 (target_terminal::is_inferior, target_terminal::is_ours)
8834 (target_terminal::is_ours_for_output): Adjust.
8835 (target_terminal::scoped_restore_terminal_state): Adjust to
8836 rename, and call restore_inferior() instead of inferior().
8837 (target_terminal::scoped_restore_terminal_state::m_state): Change
8838 type.
8839 (target_terminal::terminal_state): Rename to ...
8840 (target_terminal::m_terminal_state): ... this and change type.
8841
9c3a5d93
PA
88422018-01-30 Pedro Alves <palves@redhat.com>
8843
8844 * linux-nat.c (wait_for_signal): New function.
8845 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8846 directly.
8847 (async_terminal_is_ours)
8848 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8849 (linux_nat_add_target): Don't override
8850 to_terminal_inferior/to_terminal_ours.
8851
69ab5edb
SDJ
88522018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8853
8854 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8855
fc8e7e75
SM
88562018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8857
8858 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8859 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8860 dwarf2_per_objfile_free here.
8861 (dwarf2_per_objfile_free): Remove.
8862 (_initialize_dwarf2_read): Don't register
8863 dwarf2_per_objfile_free as a registry cleanup.
8864
b2a426e2
EZ
88652018-01-27 Eli Zaretskii <eliz@gnu.org>
8866
8867 Avoid compilation errors in MinGW native builds
8868
8869 The error is triggered by including python-internal.h, and the
8870 error message is:
8871
8872 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8873 from build-gnulib/import/math.h:27,
8874 from d:/usr/Python26/include/pyport.h:235,
8875 from d:/usr/Python26/include/Python.h:58,
8876 from python/python-internal.h:94,
8877 from python/py-arch.c:24:
8878 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8879 using ::hypot;
8880 ^~~~~
8881
8882 This happens because Python headers define 'hypot' to expand t
8883 '_hypot' in the Windows builds.
8884 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8885 'hypoth'. This avoids a compilation error.
8886
0bdd8eac
AH
88872018-01-26 Alan Hayward <alan.hayward@arm.com>
8888
8889 * MAINTAINERS (Write After Approval): Fix ordering.
8890
56ae9dc3
AH
88912018-01-26 Alan Hayward <alan.hayward@arm.com>
8892
8893 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8894
7433498b
AM
88952018-01-26 Alan Modra <amodra@gmail.com>
8896
8897 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8898 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8899 Remove nop. Make const. Comment.
8900 (powerpc32_plt_stub_so_2): New.
8901 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8902 Correct count. Update uses.
8903 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8904 Move common code reading PLT entry word. Correct
8905 powerpc32_plt_stub PLT address calculation.
8906 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8907 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8908 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8909 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8910 (ppc64_standard_linkage8): Likewise.
8911 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8912 Correct insns description.
8913 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8914
0f59d5fc
PA
89152018-01-24 Pedro Alves <palves@redhat.com>
8916
8917 GCC PR libstdc++/83906
8918 * gdbtypes.c (operator==(const dynamic_prop &,
8919 const dynamic_prop &)): New.
8920 (operator==(const range_bounds &, const range_bounds &)): New.
8921 (check_types_equal): Use them instead of memcmp.
8922 * gdbtypes.h (operator==(const dynamic_prop &,
8923 const dynamic_prop &)): Declare.
8924 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8925 (operator==(const range_bounds &, const range_bounds &)): Declare.
8926 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8927
ef8914a4
PR
89282018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8929
8930 * s390-linux-tdep.c (s390_record_address_mask)
8931 (s390_record_calc_disp_common, s390_record_calc_disp)
8932 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8933 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8934 (s390_process_record): Move to s390-tdep.c.
8935 (s390_linux_init_abi_any): Adjust.
8936 * s390-tdep.c (s390_record_address_mask)
8937 (s390_record_calc_disp_common, s390_record_calc_disp)
8938 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8939 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8940 (s390_process_record): Moved from s390-linux-tdep.c
8941 (s390_gdbarch_init): Adjust.
8942
d6e58945
PR
89432018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8944
8945 * s390-linux-nat.c (s390-tdep.h): New include.
8946 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8947 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8948 (ALLDEPFILES): Add s390-tdep.c.
8949 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8950 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8951 * s390-tdep.h: ...this. New file.
8952 * s390-linux-tdep.c (s390-tdep.h): New include.
8953 (_initialize_s390_tdep): Rename to...
8954 (_initialize_s390_linux_tdep): ...this and adjust.
8955 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8956 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8957 s390-tdep.h.
8958 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8959 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8960 (s390_is_partial_instruction, s390_software_single_step)
8961 (is_non_branch_ril, s390_displaced_step_copy_insn)
8962 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8963 (s390_prologue_data, s390_addr, s390_store, s390_load)
8964 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8965 (s390_register_call_saved, s390_guess_tracepoint_registers)
8966 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8967 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8968 (s390_pseudo_register_name, s390_pseudo_register_type)
8969 (s390_pseudo_register_read, s390_pseudo_register_write)
8970 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8971 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8972 (s390_addr_bits_remove, s390_address_class_type_flags)
8973 (s390_address_class_type_flags_to_name)
8974 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8975 (s390_function_arg_float, s390_function_arg_vector)
8976 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8977 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8978 (s390_frame_align, s390_register_return_value, s390_return_value)
8979 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8980 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8981 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8982 (s390_trad_frame_prev_register, s390_unwind_cache)
8983 (s390_prologue_frame_unwind_cache)
8984 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8985 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8986 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8987 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8988 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8989 (s390_frame_base_address, s390_local_base_address)
8990 (s390_frame_base, s390_gcc_target_options)
8991 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8992 (s390_validate_reg_range, s390_tdesc_valid)
8993 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8994 * s390-tdep.c: ...this. New file.
8995
9c0b896e
PR
89962018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8997
8998 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8999 (s390_process_record, s390_gdbarch_tdep_alloc)
9000 (s390_linux_init_abi_any): Use/set new hook.
9001
7042632b
PR
90022018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9003
9004 * s390-linux-tdep.c (osabi.h): New include.
9005 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9006 (s390_linux_init_abi_any): New functions.
9007 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9008
650f5e13
PR
90092018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9010
9011 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9012 tdesc_has_registers check
9013
47c9317e
PR
90142018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9015
9016 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9017 (s390_validate_reg_range): New macro.
9018 (s390_gdbarch_init): Adjust.
9019
095085d8
PR
90202018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9021
9022 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9023 (s390_gdbarch_tdep_alloc): Adjust.
9024 (s390_gdbarch_init): Adjust.
9025
ab9bcc67
PR
90262018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9027
9028 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9029 <have_tdb>: Change type to bool.
9030 (s390_gdbarch_tdep_alloc): Adjust.
9031 (s390_gdbarch_init): Adjust.
9032
21f6f5ff
PR
90332018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9034
9035 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9036 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9037 (s390_gdbarch_tdep_alloc): New function.
9038 (s390_gdbarch_init): Allocate tdep at start and use its fields
9039 instead of separate variables.
9040
0eb97953
PR
90412018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9042
9043 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9044 when looking for cached gdbarch and add comment for remaining.
9045
5c319bb2
PA
90462018-01-22 Pedro Alves <palves@redhat.com>
9047 Sergio Durigan Junior <sergiodj@redhat.com>
9048
9049 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9050 case.
9051
d65ce302
MR
90522018-01-22 Maciej W. Rozycki <macro@mips.com>
9053
9054 * MAINTAINERS: Update my company e-mail address.
9055
ec7a5fcb
YQ
90562018-01-22 Yao Qi <yao.qi@linaro.org>
9057
9058 * regcache.c (cooked_write_test): New function.
9059 (_initialize_regcache): Register the test.
9060
11f57cb6
YQ
90612018-01-22 Yao Qi <yao.qi@linaro.org>
9062
9063 * ia64-tdep.c (ia64_pseudo_register_read): Call
9064 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9065 * m32c-tdep.c (m32c_cat_read): Likewise.
9066 (m32c_r3r2r1r0_read): Likewise.
9067 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9068 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9069
03f50fc8
YQ
90702018-01-22 Yao Qi <yao.qi@linaro.org>
9071
9072 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9073 method raw_read instead of regcache_raw_read.
9074 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9075 * arm-tdep.c (arm_neon_quad_read): Likewise.
9076 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9077 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9078 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9079 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9080 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9081 (i386_pseudo_register_read_into_value): Likewise.
9082 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9083 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9084 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9085 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9086 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9087 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9088 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9089 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9090 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9091
dc711524
YQ
90922018-01-22 Yao Qi <yao.qi@linaro.org>
9093
9094 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9095 * configure.tgt: Remove target mt.
9096 * mt-tdep.c: Remove.
9097 * regcache.c (cooked_read_test): Remove the check for mt.
9098
3f5a868b
YQ
90992018-01-22 Yao Qi <yao.qi@linaro.org>
9100
9101 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9102 instead of gdbarch_pseudo_register_read_value.
9103
de4cb04a
JB
91042018-01-22 Joel Brobecker <brobecker@adacore.com>
9105
9106 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9107 language is Ada.
9108
a9e40818
JB
91092018-01-22 Joel Brobecker <brobecker@adacore.com>
9110
9111 * linespec.c (create_sals_line_offset): Remove code that preserved
9112 the symtab_and_line's line number.
9113
e707fc44
AB
91142018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9115
9116 * varobj.c (varobj_create): Don't set valid_block when creating a
9117 floating varobj.
9118
03d0bf7b
AB
91192018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9120
9121 * varobj.c (varobj_create): Remove out of date comment.
9122
ae451627
AB
91232018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9124
9125 PR mi/20395
9126 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9127 updating innermost block.
9128 * parse.c (innermost_block_tracker::update): Take extra type
9129 parameter, and check types match before updating innermost block.
9130 (write_dollar_variable): Update innermost block for registers.
9131 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9132 (innermost_block_tracker::innermost_block_tracker): Initialise
9133 m_types member.
9134 (innermost_block_tracker::reset): Take type parameter.
9135 (innermost_block_tracker::update): Take type parameter, and pass
9136 type through as needed.
9137 (innermost_block_tracker::m_types): New member.
9138 * varobj.c (varobj_create): Pass type when reseting innermost
9139 block.
9140
aee1fcdf
AB
91412018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9142
9143 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9144 * ada-lang.c (resolve_subexp): Likewise.
9145 * breakpoint.c (set_breakpoint_condition) Likewise.
9146 (watch_command_1) Likewise.
9147 * c-exp.y (variable): Likewise.
9148 * d-exp.y (PrimaryExpression): Likewise.
9149 * f-exp.y (variable): Likewise.
9150 * go-exp.y (variable): Likewise.
9151 * m2-exp.y (variable): Likewise.
9152 * objfiles.c (objfile::~objfile): Likewise.
9153 * p-exp.y (variable): Likewise.
9154 * parse.c (innermost_block): Change type.
9155 * parser-defs.h (class innermost_block_tracker): New.
9156 (innermost_block): Change to innermost_block_tracker.
9157 * printcmd.c (display_command): Switch to innermost_block API.
9158 (do_one_display): Likewise.
9159 * rust-exp.y (do_one_display): Likewise.
9160 * symfile.c (clear_symtab_users): Likewise.
9161 * varobj.c (varobj_create): Switch to innermost_block API, replace
9162 use of innermost_block with block stored on varobj object.
9163
396af9a1
AB
91642018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9165
9166 * expression.h (innermost_block): Remove declaration.
9167 * varobj.c: Add 'parser-defs.h' include.
9168
fcfcc376
TT
91692018-01-19 Tom Tromey <tom@tromey.com>
9170
9171 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9172 symbols in the static and global blocks.
9173
5a6c3296
JC
91742018-01-19 James Clarke <jrtc27@jrtc27.com>
9175
9176 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9177 gdb_ptrace.h, and move including gdb_wait.h ...
9178 * nat/linux-ptrace.h: ... to here.
9179
bc09b0c1
SM
91802018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9181
9182 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9183 inf_ptrace_detach_success.
9184 (inf_ptrace_detach_success): Add inferior parameter, use it
9185 instead of inferior_ptid, pass it to detach_inferior.
9186 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9187 parameter.
9188 * inferior.c (detach_inferior): Add overload that takes an
9189 inferior object.
9190 * inferior.h (detach_inferior): Likewise.
9191 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9192 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9193 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9194
6e1e1966
SM
91952018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9196
9197 * target.h (struct target_ops) <to_detach>: Add inferior
9198 parameter.
9199 (target_detach): Likewise.
9200 * target.c (dispose_inferior): Pass inferior down.
9201 (target_detach): Pass inferior down. Assert that it is equal to
9202 the current inferior.
9203 * aix-thread.c (aix_thread_detach): Pass inferior down.
9204 * corefile.c (core_file_command): Pass current_inferior() down.
9205 * corelow.c (core_detach): Add inferior parameter.
9206 * darwin-nat.c (darwin_detach): Likewise.
9207 * gnu-nat.c (gnu_detach): Likewise.
9208 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9209 * infcmd.c (detach_command): Pass current_inferior() down to
9210 target_detach.
9211 * infrun.c (follow_fork_inferior): Pass parent_inf to
9212 target_detach.
9213 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9214 target_detach.
9215 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9216 * linux-thread-db.c (thread_db_detach): Likewise.
9217 * nto-procfs.c (procfs_detach): Likewise.
9218 * procfs.c (procfs_detach): Likewise.
9219 * record.c (record_detach): Likewise.
9220 * record.h (struct inferior): Forward-declare.
9221 (record_detach): Add inferior parameter.
9222 * remote-sim.c (gdbsim_detach): Likewise.
9223 * remote.c (remote_detach_1): Likewise.
9224 (remote_detach): Likewise.
9225 (extended_remote_detach): Likewise.
9226 * sol-thread.c (sol_thread_detach): Likewise.
9227 * target-debug.h (target_debug_print_inferior_p): New macro.
9228 * target-delegates.c: Re-generate.
9229 * top.c (kill_or_detach): Pass inferior down to target_detach.
9230 * windows-nat.c (windows_detach): Add inferior parameter.
9231
6bd6f3b6
SM
92322018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9233
9234 * target.h (struct target_ops) <to_detach>: Remove args
9235 parameter.
9236 (target_detach): Likewise.
9237 * target.c (dispose_inferior): Adjust.
9238 (target_detach): Remove args parameter, adjust.
9239 * aix-thread.c (aix_thread_detach): Adjust.
9240 * corefile.c (core_file_command): Adjust.
9241 * corelow.c (core_detach): Adjust.
9242 * darwin-nat.c (darwin_detach): Adjust.
9243 * gnu-nat.c (gnu_detach): Adjust.
9244 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9245 * infcmd.c (detach_command): Adjust
9246 * infrun.c (follow_fork_inferior): Adjust.
9247 (handle_vfork_child_exec_or_exit): Adjust.
9248 * linux-fork.c (linux_fork_detach): Remove args parameter.
9249 * linux-fork.h (linux_fork_detach): Likewise.
9250 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9251 * linux-thread-db.c (thread_db_detach): Likewise.
9252 * nto-procfs.c (procfs_detach): Likewise.
9253 * procfs.c (procfs_detach): Likewise.
9254 (do_detach): Remove signo parameter.
9255 * record.c (record_detach): Remove args parameter.
9256 * record.h (record_detach): Likewise.
9257 * remote-sim.c (gdbsim_detach): Likewise.
9258 * remote.c (remote_detach_1): Likewise.
9259 (remote_detach): Likewise.
9260 (extended_remote_detach): Likewise.
9261 * sol-thread.c (sol_thread_detach): Likewise.
9262 * target-delegates.c: Re-generate.
9263 * top.c (struct qt_args) <args>: Remove field.
9264 (kill_or_detach): Don't pass args.
9265 (quit_force): Don't set args.
9266 * windows-nat.c (windows_detach): Remove args parameter.
9267
88af8ea8
YQ
92682018-01-19 Yao Qi <yao.qi@linaro.org>
9269
9270 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9271 (arm_linux_init_abi): Install it.
9272
dea445b9
YQ
92732018-01-19 Yao Qi <yao.qi@linaro.org>
9274
9275 * osabi.c (gdb_osabi_names): Extend the regexp for
9276 arm-linux-gnueabihf.
9277
4a17f768
YQ
92782018-01-18 Yao Qi <yao.qi@linaro.org>
9279
9280 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9281 m_abbrevs.
9282 (abbrev_table::add_abbrev): Update.
9283 (abbrev_table::lookup_abbrev): Update.
9284
d679c21a
YQ
92852018-01-18 Yao Qi <yao.qi@linaro.org>
9286
9287 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9288
7d937cad
SDJ
92892018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9290
9291 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9292 to "std::string".
9293
9e14690d
TT
92942018-01-17 Tom Tromey <tom@tromey.com>
9295
9296 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9297
50a82047
TT
92982018-01-17 Tom Tromey <tom@tromey.com>
9299
9300 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9301 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9302 (create_array_type_with_stride): Update.
9303 * dwarf2read.c (set_die_type): Update.
9304
c89b44cd
TT
93052018-01-17 Tom Tromey <tom@tromey.com>
9306
9307 * dwarf2read.c (delayed_method_info): Remove typedef.
9308 (dwarf2_cu::method_info): Now a std::vector.
9309 (add_to_method_list): Update.
9310 (free_delayed_list): Remove.
9311 (compute_delayed_physnames): Update.
9312 (process_full_comp_unit, process_full_type_unit): Clear the method
9313 list. Remove cleanups.
9314 (psymtab_include_file_name): Add name_holder parameter. Use
9315 unique_xmalloc_ptr.
9316 (dwarf_decode_lines): Update.
9317
fcd3b13d
SM
93182018-01-17 Tom Tromey <tom@tromey.com>
9319 Simon Marchi <simon.marchi@ericsson.com>
9320
9321 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9322 (dwarf2_per_objfile::free_cached_comp_units)
9323 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9324 (init_cutu_and_read_dies_no_follow): Update.
9325 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9326 (dwarf2_cu::~dwarf2_cu): New.
9327 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9328 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9329
685af9cd
TT
93302018-01-17 Tom Tromey <tom@tromey.com>
9331 Simon Marchi <simon.marchi@ericsson.com>
9332
9333 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9334 (struct die_reader_specs) <abbrev_table>: New member.
9335 (struct abbrev_table): Add constructor.
9336 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9337 <abbrev_obstack>: Now an auto_obstack.
9338 (abbrev_table_up): New typedef.
9339 (init_cu_die_reader): Add abbrev_table parameter.
9340 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9341 Add result_dwo_abbrev_table.
9342 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9343 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9344 Update.
9345 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9346 parameter.
9347 (skip_children): Update.
9348 (abbrev_table::alloc_abbrev): Rename from
9349 abbrev_table_alloc_abbrev.
9350 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9351 (abbrev_table::lookup_abbrev): Rename from
9352 abbrev_table_lookup_abbrev.
9353 (abbrev_table_read_table): Return abbrev_table_up.
9354 (abbrev_table_free, abbrev_table_free_cleanup)
9355 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9356 (load_partial_dies): Update.
9357
5e2db402
TT
93582018-01-17 Tom Tromey <tom@tromey.com>
9359
9360 * dwarf2read.c (dwarf2_compute_name): Update comment.
9361 (read_func_scope, read_variable): Update.
9362 (new_symbol): Remove.
9363 (new_symbol_full): Rename to new_symbol.
9364
ee7f689e 93652018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
9366
9367 PR gdb/16577
9368 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9369 a warning instead of throwing an error, set section size to 0 and return
9370 NULL.
9371 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9372
4d9b86e1
SM
93732018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9374
9375 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9376 std::string.
9377 (linux_ptrace_attach_fail_reason_string): Likewise.
9378 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9379 Likewise.
9380 (linux_ptrace_attach_fail_reason_string): Likewise.
9381 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9382
a7b2d0fb
SM
93832018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9384
9385 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9386
f517c180
EA
93872018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9388
9389 PR gdb/21559
9390 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9391 checking for fs_base/gs_base fields in struct user_regs_struct.
9392 * configure: Regenerate.
9393
7045b1ca
YQ
93942018-01-17 Yao Qi <yao.qi@linaro.org>
9395
9396 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9397 function.
9398 (aarch64_linux_init_abi): Install it to gdbarch hook
9399 gcc_target_options.
9400
db422fb2
PA
94012018-01-15 Pedro Alves <palves@redhat.com>
9402
9403 * common/signals-state-save-restore.c
9404 (save_original_signals_state): Fix typos.
9405
ba643918
SDJ
94062017-01-12 Tom Tromey <tom@tromey.com>
9407 Sergio Durigan Junior <sergiodj@redhat.com>
9408
9409 * Makefile.in (install-only): Install gdb-add-index.
9410
906b4aac
JB
94112018-01-12 John Baldwin <jhb@FreeBSD.org>
9412
9413 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9414
bdf2a94a
AA
94152018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9416
9417 * infrun.c (keep_going_pass_signal): Clear step-over info when
9418 insert_breakpoints fails.
9419
71d378ae
PA
94202018-01-11 Pedro Alves <palves@redhat.com>
9421
9422 PR gdb/22583
9423 * infrun.c (resume): Rename to ...
9424 (resume_1): ... this.
9425 (resume): Reimplement as wrapper around resume_1.
9426
3cada740
PA
94272018-01-11 Pedro Alves <palves@redhat.com>
9428
9429 PR remote/22597
9430 * remote.c (remote_parse_stop_reply): Default to the last-set
9431 general thread instead of to 'magic_null_ptid'.
9432
618daa93
PA
94332018-01-10 Pedro Alves <palves@redhat.com>
9434
9435 * language.h (language_get_symbol_name_matcher): Rename ...
9436 (get_symbol_name_matcher): ... this.
9437 * language.c (language_get_symbol_name_matcher): Ditto.
9438 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9439 callers adjusted.
9440
c63d3e8d
PA
94412018-01-10 Pedro Alves <palves@redhat.com>
9442
9443 PR gdb/22670
9444 * dwarf2read.c
9445 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9446 Adjust to use language_get_symbol_name_matcher instead of
9447 language_defn::la_get_symbol_name_matcher.
9448 * language.c (language_get_symbol_name_matcher): If in Ada mode
9449 and the lookup name is a verbatim match, return Ada's matcher.
9450 * language.h (language_get_symbol_name_matcher): Adjust comment.
9451 (ada_lookup_name_info::verbatim_p):: New method.
9452
d4c2a405
PA
94532018-01-10 Pedro Alves <palves@redhat.com>
9454
9455 PR gdb/22670
9456 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9457 minsym's language is language_auto or language_cplus, pass down
9458 language_ada instead.
9459 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9460
8825213e
PA
94612018-01-10 Pedro Alves <palves@redhat.com>
9462
9463 PR gdb/22670
9464 * minsyms.c (linkage_name_str): New function.
9465 (iterate_over_minimal_symbols): Use it.
9466
2d97a5d9
JB
94672018-01-09 John Baldwin <jhb@FreeBSD.org>
9468
9469 * NEWS: Document that 'info proc' now works on FreeBSD.
9470
92fce24d
JB
94712018-01-09 John Baldwin <jhb@FreeBSD.org>
9472
9473 * configure.ac: Check for kinfo_getfile in libutil.
9474 * configure: Regenerate.
9475 * config.in: Regenerate.
9476 * fbsd-nat.c: Include "fbsd-tdep.h".
9477 (fbsd_fetch_cmdline): New.
9478 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9479 rather than calling error.
9480 (fbsd_info_proc): New.
9481 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9482 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9483 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9484
262f62f5
JB
94852018-01-09 John Baldwin <jhb@FreeBSD.org>
9486
9487 * fbsd-nat.c (struct free_deleter): Remove.
9488 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9489
b999e203
JB
94902018-01-09 John Baldwin <jhb@FreeBSD.org>
9491
9492 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9493 NULL for an empty pathname.
9494
d2176225
JB
94952018-01-09 John Baldwin <jhb@FreeBSD.org>
9496
9497 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9498 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9499 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9500 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9501 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9502 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9503 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9504 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9505 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9506 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9507 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9508 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9509 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9510 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9511 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9512
9c4ac400
ST
95132018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9514
9515 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9516 (gnu_xfer_auxv): New function.
9517 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9518 TARGET_OBJECT_AUXV.
9519
1e5ded6c
YQ
95202018-01-08 Yao Qi <yao.qi@linaro.org>
9521 Simon Marchi <simon.marchi@ericsson.com>
9522
9523 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9524 common/selftest.c.
9525 (COMMON_OBS): Remove selftest.o.
9526 * configure.ac: Append selftest-arch.c and common/selftest.c to
9527 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9528 * configure: Re-generated.
9529 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9530 GDB_SELF_TEST.
9531 (maintenance_info_selftests): Likewise.
9532
04bafb1e
XR
95332018-01-08 Xavier Roirand <roirand@adacore.com>
9534
9535 * ada-valprint.c (val_print_packed_array_elements): Use
9536 proper number of elements when printing an array indexed
9537 by an enumeration type.
9538
518817b3
SM
95392018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9540
9541 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9542 (dw2_get_file_names_reader): Adjust.
9543 (lookup_dwo_signatured_type): Adjust.
9544 (lookup_dwp_signatured_type): Adjust.
9545 (lookup_signatured_type): Adjust.
9546 (create_type_unit_group): Adjust.
9547 (get_type_unit_group): Adjust.
9548 (process_psymtab_comp_unit_reader): Adjust.
9549 (build_type_psymtabs_reader): Adjust.
9550 (scan_partial_symbols): Adjust.
9551 (add_partial_symbol): Adjust.
9552 (add_partial_subprogram): Adjust.
9553 (peek_die_abbrev): Adjust.
9554 (fixup_go_packaging): Adjust.
9555 (process_imported_unit_die): Adjust.
9556 (dwarf2_compute_name): Adjust.
9557 (dwarf2_physname): Adjust.
9558 (read_import_statement): Adjust.
9559 (handle_DW_AT_stmt_list): Adjust.
9560 (read_file_scope): Adjust.
9561 (read_func_scope): Adjust.
9562 (read_lexical_block_scope): Adjust.
9563 (read_call_site_scope): Adjust.
9564 (read_variable): Adjust.
9565 (dwarf2_rnglists_process): Adjust.
9566 (dwarf2_ranges_process): Adjust.
9567 (dwarf2_ranges_read): Adjust.
9568 (dwarf2_get_pc_bounds): Adjust.
9569 (dwarf2_record_block_ranges): Adjust.
9570 (dwarf2_add_field): Adjust.
9571 (dwarf2_add_member_fn): Adjust.
9572 (read_structure_type): Adjust.
9573 (process_structure_scope): Adjust.
9574 (read_enumeration_type): Adjust.
9575 (read_array_type): Adjust.
9576 (mark_common_block_symbol_computed): Adjust.
9577 (read_common_block): Adjust.
9578 (read_namespace_type): Adjust.
9579 (read_namespace): Adjust.
9580 (read_module_type): Adjust.
9581 (read_tag_pointer_type): Adjust.
9582 (read_tag_ptr_to_member_type): Adjust.
9583 (read_tag_string_type): Adjust.
9584 (read_subroutine_type): Adjust.
9585 (read_typedef): Adjust.
9586 (read_base_type): Adjust.
9587 (attr_to_dynamic_prop): Adjust.
9588 (read_subrange_type): Adjust.
9589 (read_unspecified_type): Adjust.
9590 (dwarf2_read_abbrevs): Adjust.
9591 (load_partial_dies): Adjust.
9592 (read_partial_die): Adjust.
9593 (find_partial_die): Adjust.
9594 (guess_partial_die_structure_name): Adjust.
9595 (fixup_partial_die): Adjust.
9596 (read_attribute_value): Adjust.
9597 (read_addr_index): Adjust.
9598 (read_addr_index_from_leb128): Adjust.
9599 (read_str_index): Adjust.
9600 (dwarf2_string_attr): Adjust.
9601 (get_debug_line_section): Adjust.
9602 (dwarf_decode_line_header): Adjust.
9603 (lnp_state_machine::check_line_address): Adjust.
9604 (dwarf_decode_lines_1): Adjust.
9605 (dwarf_decode_lines): Adjust.
9606 (dwarf2_start_symtab): Adjust.
9607 (var_decode_location): Adjust.
9608 (new_symbol_full): Adjust.
9609 (dwarf2_const_value_data): Adjust.
9610 (dwarf2_const_value_attr): Adjust.
9611 (dwarf2_const_value): Adjust.
9612 (die_type): Adjust.
9613 (die_containing_type): Adjust.
9614 (build_error_marker_type): Adjust.
9615 (lookup_die_type): Adjust.
9616 (guess_full_die_structure_name): Adjust.
9617 (anonymous_struct_prefix): Adjust.
9618 (determine_prefix): Adjust.
9619 (dwarf2_name): Adjust.
9620 (follow_die_ref_or_sig): Adjust.
9621 (follow_die_offset): Adjust.
9622 (follow_die_ref): Adjust.
9623 (follow_die_sig_1): Adjust.
9624 (follow_die_sig): Adjust.
9625 (get_signatured_type): Adjust.
9626 (get_DW_AT_signature_type): Adjust.
9627 (decode_locdesc): Adjust.
9628 (dwarf_decode_macros): Adjust.
9629 (cu_debug_loc_section): Adjust.
9630 (fill_in_loclist_baton): Adjust.
9631 (dwarf2_symbol_mark_computed): Adjust.
9632 (init_one_comp_unit): Don't assign
9633 dwarf2_cu::dwarf2_per_objfile.
9634 (set_die_type): Adjust.
9635
ed2dc618
SM
96362018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9637
9638 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9639 <dwarf2_per_objfile>: New field.
9640 (dwarf2_per_objfile): Remove global.
9641 (get_dwarf2_per_objfile): New function.
9642 (set_dwarf2_per_objfile): New function.
9643 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9644 dwarf2_per_objfile.
9645 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9646 (read_abbrev_offset): Likewise.
9647 (read_indirect_string): Likewise.
9648 (read_indirect_line_string): Likewise.
9649 (read_indirect_string_at_offset): Likewise.
9650 (read_indirect_string_from_dwz): Likewise.
9651 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9652 dwarf2_per_objfile.
9653 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9654 (create_all_comp_units): Change objfile parameter to
9655 dwarf2_per_objfile.
9656 (create_all_type_units): Likewise.
9657 (process_queue): Add dwarf2_per_objfile parameter.
9658 (read_and_check_comp_unit_head): Likewise.
9659 (lookup_dwo_unit_in_dwp): Likewise.
9660 (get_dwp_file): Likewise.
9661 (process_cu_includes): Likewise.
9662 (struct free_dwo_file_cleanup_data): New struct.
9663 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9664 set_dwarf2_per_objfile.
9665 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9666 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9667 context, adjust calls.
9668 (dw2_instantiate_symtab): Likewise.
9669 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9670 (dw2_get_cu): Likewise.
9671 (create_cu_from_index_list): Change objfile parameter to
9672 dwarf2_per_objfile.
9673 (create_cus_from_index_list): Get dwarf2_per_objfile from
9674 context, adjust calls.
9675 (create_cus_from_index): Likewise.
9676 (create_signatured_type_table_from_index): Change objfile
9677 parameter to dwarf2_per_objfile.
9678 (create_signatured_type_table_from_debug_names): Change objfile
9679 parameter to dwarf2_per_objfile.
9680 (create_addrmap_from_index): Likewise.
9681 (create_addrmap_from_aranges): Likewise.
9682 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9683 (dw2_setup): Remove.
9684 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9685 context.
9686 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9687 get_dwarf2_per_objfile.
9688 (dw2_forget_cached_source_info): Likewise.
9689 (dw2_map_symtabs_matching_filename): Likewise.
9690 (struct dw2_symtab_iterator) <index>: Remove.
9691 <dwarf2_per_objfile>: New field.
9692 (dw2_symtab_iter_init): Replace index parameter with
9693 dwarf2_per_objfile.
9694 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9695 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9696 (dw2_print_stats): Likewise.
9697 (dw2_dump): Likewise.
9698 (dw2_expand_symtabs_for_function): Likewise.
9699 (dw2_expand_all_symtabs): Likewise.
9700 (dw2_expand_symtabs_with_fullname): Likewise.
9701 (dw2_expand_marked_cus): Replace index and objfile parameters
9702 with dwarf2_per_objfile.
9703 (dw_expand_symtabs_matching_file_matcher): Add
9704 dwarf2_per_objfile parameter and adjust calls.
9705 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9706 adjust calls.
9707 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9708 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9709 adjust calls.
9710 (create_cus_from_debug_names_list): Replace objfile parameter
9711 with dwarf2_per_objfile and adjust calls.
9712 (create_cus_from_debug_names): Likewise.
9713 (dwarf2_read_debug_names): Likewise.
9714 (mapped_debug_names::namei_to_name): Adjust call.
9715 (dw2_debug_names_iterator::next): Likewise.
9716 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9717 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9718 (dw2_debug_names_dump): Likewise.
9719 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9720 (dw2_debug_names_expand_symtabs_matching): Likewise.
9721 (dwarf2_initialize_objfile): Likewise.
9722 (dwarf2_build_psymtabs): Likewise.
9723 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9724 this_cu.
9725 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9726 (read_and_check_comp_unit_head): Likewise.
9727 (read_abbrev_offset): Likewise.
9728 (create_debug_type_hash_table): Likewise.
9729 (create_debug_types_hash_table): Likewise.
9730 (create_all_type_units): Replace objfile parameter with
9731 dwarf2_per_objfile.
9732 (add_type_unit): Add dwarf2_per_objfile parameter.
9733 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9734 with dwarf2_per_objfile.
9735 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9736 (lookup_dwp_signatured_type): Likewise.
9737 (lookup_signatured_type): Likewise.
9738 (read_cutu_die_from_dwo): Likewise.
9739 (init_tu_and_read_dwo_dies): Likewise.
9740 (init_cutu_and_read_dies): Likewise.
9741 (init_cutu_and_read_dies_no_follow): Likewise.
9742 (allocate_type_unit_groups_table): Add objfile parameter.
9743 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9744 (get_type_unit_group): Likewise.
9745 (process_psymtab_comp_unit): Update call.
9746 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9747 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9748 (print_tu_stats): Likewise.
9749 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9750 in void* parameter.
9751 (build_type_psymtabs): Change objfile parameter to
9752 dwarf2_per_objfile.
9753 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9754 passed in void* parameter.
9755 (process_skeletonless_type_units): Change objfile parameter to
9756 dwarf2_per_objfile.
9757 (set_partial_user): Likewise.
9758 (dwarf2_build_psymtabs_hard): Likewise.
9759 (read_comp_units_from_section): Likewise.
9760 (create_all_comp_units): Likewise.
9761 (scan_partial_symbols): Update calls.
9762 (add_partial_symbol): Likewise.
9763 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9764 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9765 (process_queue): Add dwarf2_per_objfile parameter.
9766 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9767 (compute_compunit_symtab_includes): Likewise.
9768 (process_cu_includes): Add dwarf2_per_objfile parameter.
9769 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9770 (process_full_type_unit): Likewise.
9771 (process_imported_unit_die): Update call.
9772 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9773 (read_file_scope): Likewise.
9774 (allocate_dwo_file_hash_table): Add objfile parameter.
9775 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9776 (create_cus_hash_table): Likewise.
9777 (create_dwp_hash_table): Likewise.
9778 (create_dwo_unit_in_dwp_v1): Likewise.
9779 (create_dwp_v2_section): Likewise.
9780 (create_dwo_unit_in_dwp_v2): Likewise.
9781 (lookup_dwo_unit_in_dwp): Likewise.
9782 (try_open_dwop_file): Likewise.
9783 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9784 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9785 cleanup to include a reference to dwarf2_per_objfile.
9786 (open_dwp_file): Add dwarf2_per_objfile parameter.
9787 (open_and_init_dwp_file): Likewise.
9788 (get_dwp_file): Likewise.
9789 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9790 (queue_and_load_all_dwo_tus): Update call.
9791 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9792 data.
9793 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9794 (dwarf2_ranges_process): Likewise.
9795 (dwarf2_get_pc_bounds): Likewise.
9796 (mark_common_block_symbol_computed): Likewise.
9797 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9798 (dwarf2_read_abbrevs): Update call.
9799 (read_partial_die): Use dwarf2_per_objfile from cu.
9800 (find_partial_die): Likewise.
9801 (fixup_partial_die): Likewise.
9802 (read_attribute_value): Likewise.
9803 (read_indirect_string_at_offset_from): Add objfile parameter.
9804 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9805 parameter.
9806 (read_indirect_string_from_dwz): Add objfile parameter.
9807 (read_indirect_string): Add objfile parameter.
9808 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9809 (read_addr_index): Use dwarf2_per_objfile from cu.
9810 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9811 call dw2_setup.
9812 (read_str_index): Use dwarf2_per_objfile from cu.
9813 (get_debug_line_section): Likewise.
9814 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9815 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9816 (new_symbol_full): Use dwarf2_per_objfile from cu.
9817 (build_error_marker_type): Likewise.
9818 (lookup_die_type): Likewise.
9819 (determine_prefix): Likewise.
9820 (follow_die_offset): Likewise.
9821 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9822 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9823 (dwarf2_fetch_die_type_sect_off): Likewise.
9824 (dwarf2_get_die_type): Likewise.
9825 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9826 (get_signatured_type): Likewise.
9827 (get_DW_AT_signature_type): Likewise.
9828 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9829 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9830 (cu_debug_loc_section): Likewise.
9831 (fill_in_loclist_baton): Likewise.
9832 (dwarf2_symbol_mark_computed): Likewise.
9833 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9834 dwarf2_per_objfile.
9835 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9836 parameter.
9837 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9838 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9839 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9840 (set_die_type): Use dwarf2_free_objfile from cu.
9841 (get_die_type_at_offset): Likewise.
9842 (dwarf2_per_objfile_free): Don't assign global variable.
9843 (debug_names) <constructor>: Add dwarf2_per_objfile
9844 parameter, update m_debugstrlookup construction.
9845 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9846 parameter.
9847 <m_dwarf2_per_objfile>: New field.
9848 <lookup>: Use m_dwarf2_per_objfile.
9849 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9850 (psyms_seen_size): Likewise.
9851 (write_gdbindex): Replace objfile parameter with
9852 dwarf2_per_objfile.
9853 (write_debug_names): Likewise.
9854 (write_psymtabs_to_index): Likewise.
9855 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9856 calls.
9857
e3b94546
SM
98582018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9859
9860 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9861 <dwarf2_per_objfile>: New field.
9862 (struct dwarf2_per_cu_data) <objfile>: Remove.
9863 <dwarf2_per_objfile>: New field.
9864 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9865 of objfile.
9866 (create_signatured_type_table_from_index): Likewise.
9867 (create_debug_type_hash_table): Likewise.
9868 (fill_in_sig_entry_from_dwo_entry): Likewise.
9869 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9870 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9871 objfile.
9872 (create_partial_symtab): Access objfile through
9873 dwarf2_per_objfile.
9874 (process_psymtab_comp_unit_reader): Likewise.
9875 (read_comp_units_from_section): Likewise.
9876 (scan_partial_symbols): Likewise.
9877 (add_partial_symbol): Likewise.
9878 (add_partial_subprogram): Likewise.
9879 (peek_die_abbrev): Likewise.
9880 (fixup_go_packaging): Likewise.
9881 (process_full_comp_unit): Likewise.
9882 (process_full_type_unit): Likewise.
9883 (process_imported_unit_die): Likewise.
9884 (dwarf2_compute_name): Likewise.
9885 (dwarf2_physname): Likewise.
9886 (read_import_statement): Likewise.
9887 (create_cus_hash_table): Assign dwarf2_physname instead of
9888 objfile.
9889 (read_func_scope): Access objfile through dwarf2_per_objfile.
9890 (read_lexical_block_scope): Likewise.
9891 (read_call_site_scope): Likewise.
9892 (read_variable): Likewise.
9893 (dwarf2_rnglists_process): Likewise.
9894 (dwarf2_ranges_process): Likewise.
9895 (dwarf2_ranges_read): Likewise.
9896 (dwarf2_record_block_ranges): Likewise.
9897 (dwarf2_add_field): Likewise.
9898 (dwarf2_add_member_fn): Likewise.
9899 (read_structure_type): Likewise.
9900 (process_structure_scope): Likewise.
9901 (read_enumeration_type): Likewise.
9902 (read_array_type): Likewise.
9903 (read_common_block): Likewise.
9904 (read_namespace_type): Likewise.
9905 (read_namespace): Likewise.
9906 (read_module_type): Likewise.
9907 (read_tag_pointer_type): Likewise.
9908 (read_tag_ptr_to_member_type): Likewise.
9909 (read_tag_string_type): Likewise.
9910 (read_subroutine_type): Likewise.
9911 (read_typedef): Likewise.
9912 (read_base_type): Likewise.
9913 (attr_to_dynamic_prop): Likewise.
9914 (read_subrange_type): Likewise.
9915 (read_unspecified_type): Likewise.
9916 (load_partial_dies): Likewise.
9917 (read_partial_die): Likewise.
9918 (find_partial_die): Likewise.
9919 (guess_partial_die_structure_name): Likewise.
9920 (fixup_partial_die): Likewise.
9921 (read_attribute_value): Likewise.
9922 (read_addr_index_from_leb128): Likewise.
9923 (dwarf2_read_addr_index): Likewise.
9924 (dwarf2_string_attr): Likewise.
9925 (lnp_state_machine::check_line_address): Likewise.
9926 (dwarf_decode_lines_1): Likewise.
9927 (dwarf_decode_lines): Likewise.
9928 (dwarf2_start_symtab): Likewise.
9929 (var_decode_location): Likewise.
9930 (new_symbol_full): Likewise.
9931 (dwarf2_const_value_data): Likewise.
9932 (dwarf2_const_value_attr): Likewise.
9933 (dwarf2_const_value): Likewise.
9934 (die_type): Likewise.
9935 (die_containing_type): Likewise.
9936 (lookup_die_type): Likewise.
9937 (guess_full_die_structure_name): Likewise.
9938 (anonymous_struct_prefix): Likewise.
9939 (dwarf2_name): Likewise.
9940 (follow_die_ref_or_sig): Likewise.
9941 (follow_die_offset): Likewise.
9942 (follow_die_ref): Likewise.
9943 (dwarf2_fetch_die_loc_sect_off): Likewise.
9944 (dwarf2_fetch_constant_bytes): Likewise.
9945 (dwarf2_fetch_die_type_sect_off): Likewise.
9946 (dwarf2_get_die_type): Likewise.
9947 (follow_die_sig): Likewise.
9948 (decode_locdesc): Likewise.
9949 (dwarf2_per_cu_objfile): Likewise.
9950 (dwarf2_per_cu_text_offset): Likewise.
9951 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9952 objfile.
9953 (set_die_type): Access objfile through
9954 dwarf2_per_objfile.
9955
b01ba14d
SM
99562018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9957
9958 * valprint.c (converted_character_d): Remove typedef.
9959 (DEF_VEC_O (converted_character_d)): Remove.
9960 (count_next_character): Use std::vector.
9961 (print_converted_chars_to_obstack): Likewise.
9962 (generic_printstr): Likewise.
9963
4d0fdd9b
SM
99642018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9965
9966 * xml-support.h (struct gdb_xml_value): Add constructor.
9967 <value>: Change type to unique_xmalloc_ptr.
9968 (gdb_xml_value_s): Remove typedef.
9969 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9970 (gdb_xml_element_start_handler): Change parameter type to
9971 std::vector.
9972 (xml_find_attribute): Likewise.
9973 * xml-support.c (xml_find_attribute): Change parameter type to
9974 std::vector and adjust.
9975 (gdb_xml_values_cleanup): Remove.
9976 (gdb_xml_parser::start_element): Adjust to std::vector.
9977 (xinclude_start_include): Change paraeter type to std::vector
9978 and adjust.
9979 * btrace.c (check_xml_btrace_version): Likewise.
9980 (parse_xml_btrace_block): Likewise.
9981 (parse_xml_btrace_pt_config_cpu): Likewise.
9982 (parse_xml_btrace_pt): Likewise.
9983 (parse_xml_btrace_conf_bts): Likewise.
9984 (parse_xml_btrace_conf_pt): Likewise.
9985 * memory-map.c (memory_map_start_memory): Likewise.
9986 (memory_map_start_property): Likewise.
9987 * osdata.c (osdata_start_osdata): Likewise.
9988 (osdata_start_item): Likewise.
9989 (osdata_start_column): Likewise.
9990 * remote.c (start_thread): Likewise.
9991 * solib-aix.c (library_list_start_library): Likewise.
9992 (library_list_start_list): Likewise.
9993 * solib-svr4.c (library_list_start_library): Likewise.
9994 (svr4_library_list_start_list): Likewise.
9995 * solib-target.c (library_list_start_segment): Likewise.
9996 (library_list_start_section): Likewise.
9997 (library_list_start_library): Likewise.
9998 (library_list_start_list): Likewise.
9999 * tracepoint.c (traceframe_info_start_memory): Likewise.
10000 (traceframe_info_start_tvar): Likewise.
10001 * xml-syscall.c (syscall_start_syscall): Likewise.
10002 * xml-tdesc.c (tdesc_start_target): Likewise.
10003 (tdesc_start_feature): Likewise.
10004 (tdesc_start_reg): Likewise.
10005 (tdesc_start_union): Likewise.
10006 (tdesc_start_struct): Likewise.
10007 (tdesc_start_flags): Likewise.
10008 (tdesc_start_enum): Likewise.
10009 (tdesc_start_field): Likewise.
10010 (tdesc_start_enum_value): Likewise.
10011 (tdesc_start_vector): Likewise.
10012
f979c73f
SM
100132018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10014
10015 * extension.h (struct xmethod_worker) <clone>: Remove.
10016 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10017 Remove.
10018 (python_xmethod_worker::clone): Remove.
10019 * valops.c (find_overload_match): Use std::move instead of
10020 clone.
10021
ba18742c
SM
100222018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10023
10024 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10025 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10026 <free_xmethod_worker_data>: Remove.
10027 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10028 <get_xmethod_arg_types>: Remove.
10029 <get_xmethod_result_type>: Remove.
10030 <invoke_xmethod>: Remove.
10031 * extension.c (new_xmethod_worker): Remove.
10032 (clone_xmethod_worker): Remove.
10033 (get_matching_xmethod_workers): Return void, pass std::vector by
10034 pointer.
10035 (get_xmethod_arg_types): Rename to...
10036 (xmethod_worker::get_arg_types): ... this, and adjust.
10037 (get_xmethod_result_type): Rename to...
10038 (xmethod_worker::get_result_type): ... this, and adjust.
10039 (invoke_xmethod): Remove.
10040 (free_xmethod_worker): Remove.
10041 (free_xmethod_worker_vec): Remove.
10042 * extension.h (enum ext_lang_rc): Move here from
10043 extension-priv.h.
10044 (struct xmethod_worker): Add constructor and destructor.
10045 <data>: Remove.
10046 <value>: Remove.
10047 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10048 virtual pure methods.
10049 <get_arg_types, get_result_type>: New methods.
10050 (xmethod_worker_ptr): Remove typedef.
10051 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10052 (xmethod_worker_vec): Remove typedef.
10053 (xmethod_worker_up): New typedef.
10054 (invoke_xmethod): Remove.
10055 (clone_xmethod_worker): Remove.
10056 (free_xmethod_worker): Remove.
10057 (free_xmethod_worker_vec): Remove.
10058 (get_xmethod_arg_types): Remove.
10059 (get_xmethod_result_type): Remove.
10060 * valops.c (find_method_list): Use std::vector, don't use
10061 intermediate vector.
10062 (value_find_oload_method_list): Use std::vector.
10063 (find_overload_match): Use std::vector.
10064 (find_oload_champ): Use std::vector.
10065 * value.c (value_free): Use operator delete.
10066 (value_of_xmethod): Rename to...
10067 (value_from_xmethod): ... this. Don't assign
10068 xmethod_worker::value, take rvalue-reference.
10069 (result_type_of_xmethod): Adjust.
10070 (call_xmethod): Adjust.
10071 * value.h: Include extension.h.
10072 (struct xmethod_worker): Don't forward-declare.
10073 (value_of_xmethod): Rename to...
10074 (value_from_xmethod): ... this, take rvalue-reference.
10075 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10076 (struct python_xmethod_worker): ... this, add constructor and
10077 destructor.
10078 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10079 (gdbpy_free_xmethod_worker_data): Rename to...
10080 (python_xmethod_worker::~python_xmethod_worker): ... this and
10081 adjust.
10082 (gdbpy_clone_xmethod_worker_data): Rename to...
10083 (python_xmethod_worker::clone): ... this and adjust.
10084 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10085 temporary vector.
10086 (gdbpy_get_xmethod_arg_types): Rename to...
10087 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10088 (gdbpy_get_xmethod_result_type): Rename to...
10089 (python_xmethod_worker::do_get_result_type): ... this and
10090 adjust.
10091 (gdbpy_invoke_xmethod): Rename to...
10092 (python_xmethod_worker::invoke): ... this and adjust.
10093 (new_python_xmethod_worker): Rename to...
10094 (python_xmethod_worker::python_xmethod_worker): ... this and
10095 adjust.
10096 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10097 Remove.
10098 (gdbpy_free_xmethod_worker_data): Remove.
10099 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10100 (gdbpy_get_xmethod_arg_types): Remove.
10101 (gdbpy_get_xmethod_result_type): Remove.
10102 (gdbpy_invoke_xmethod): Remove.
10103 * python/python.c (python_extension_ops): Remove obsolete
10104 callbacks.
10105
e379cee6
PA
101062018-01-05 Pedro Alves <palves@redhat.com>
10107
10108 PR gdb/18653
10109 * common/signals-state-save-restore.c
10110 (save_original_signals_state): New parameter 'quiet'. Warn if we
10111 find a custom handler preinstalled, instead of internal erroring.
10112 But only warn if !quiet.
10113 * common/signals-state-save-restore.h
10114 (save_original_signals_state): New parameter 'quiet'.
10115 * main.c (captured_main_1): Move save_original_signals_state call
10116 after option handling, and pass QUIET.
10117
a655456c
PA
101182018-01-05 Pedro Alves <palves@redhat.com>
10119
10120 * spu-tdep.c (spu_catch_start): Pass
10121 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10122
de63c46b
PA
101232018-01-05 Pedro Alves <palves@redhat.com>
10124
10125 PR gdb/22670
10126 * ada-lang.c (literal_symbol_name_matcher): New function.
10127 (ada_get_symbol_name_matcher): Use it for
10128 symbol_name_match_type::SEARCH_NAME.
10129 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10130 it down instead of assuming symbol_name_match_type::FULL.
10131 * block.h (block_lookup_symbol): New parameter 'match_type'.
10132 * c-valprint.c (print_unpacked_pointer): Use
10133 lookup_symbol_search_name instead of lookup_symbol.
10134 * compile/compile-object-load.c (get_out_value_type): Pass down
10135 symbol_name_match_type::SEARCH_NAME.
10136 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10137 symbol_name_match_type::FULL.
10138 * cp-support.c (cp_get_symbol_name_matcher): Handle
10139 symbol_name_match_type::SEARCH_NAME.
10140 * infrun.c (insert_exception_resume_breakpoint): Use
10141 lookup_symbol_search_name.
10142 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10143 * psymtab.c (maintenance_check_psymtabs): Use
10144 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10145 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10146 SYMBOL_SEARCH_NAME.
10147 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10148 if symbol_name_match_type::SEARCH_NAME.
10149 (lookup_symbol_in_language): Pass down
10150 symbol_name_match_type::FULL.
10151 (lookup_symbol_search_name): New.
10152 (lookup_language_this): Pass down
10153 symbol_name_match_type::SEARCH_NAME.
10154 (lookup_symbol_aux, lookup_local_symbol): New parameter
10155 'match_type'. Pass it down.
10156 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10157 (lookup_symbol_search_name): New declaration.
10158 (lookup_symbol_in_block): New 'match_type' parameter.
10159
f98fc17b
PA
101602018-01-05 Pedro Alves <palves@redhat.com>
10161
10162 PR gdb/22670
10163 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10164 ada_lookup_symbol.
10165 (ada_lookup_symbol): Reimplement in terms of
10166 ada_lookup_symbol_list, bits factored out from
10167 ada_lookup_encoded_symbol.
10168
342f8240
JB
101692018-01-05 Joel Brobecker <brobecker@adacore.com>
10170
10171 * ada-exp.y (write_object_renaming): When subscripting an array
10172 using a symbol as the index, pass the block in call to
10173 ada_lookup_encoded_symbol when looking that symbol up.
10174
7150d33c
JG
101752018-01-05 Jerome Guitton <guitton@adacore.com>
10176
10177 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10178 TYPE_INDEX_TYPE.
10179
cc0e770c
JB
101802018-01-05 Joel Brobecker <brobecker@adacore.com>
10181
10182 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10183 the case where VALUE_LVAL (val0) is not lval_memory.
10184
f79da888 101852018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
10186
10187 * ada-valprint.c (print_optional_low_bound): Handle
10188 character-indexed array printing like boolean-indexed array
10189 printing.
10190
cd385f94
JB
101912018-01-05 Joel Brobecker <brobecker@adacore.com>
10192
10193 * NEWS: Create a new section for the next release branch.
10194 Rename the section of the current branch, now that it has
10195 been cut.
10196
09aca949
JB
101972018-01-05 Joel Brobecker <brobecker@adacore.com>
10198
10199 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10200 * version.in: Bump version to 8.1.50.DATE-git.
10201
9f757bf7
XR
102022018-01-03 Xavier Roirand <roirand@adacore.com>
10203
10204 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10205 Add field.
10206 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10207 Add field.
10208 (default_exception_support_info) <catch_handlers_sym>: Add field.
10209 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10210 (ada_exception_name_addr_1): Add "catch handlers" handling.
10211 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10212 Update all callers.
10213 (create_excep_cond_exprs) <ex>: Add parameter.
10214 (re_set_exception): Update create_excep_cond_exprs call.
10215 (print_it_exception, print_one_exception, print_mention_exception)
10216 (print_recreate_exception): Add "catch handler" handling.
10217 (allocate_location_catch_handlers, re_set_catch_handlers)
10218 (check_status_catch_handlers, print_it_catch_handlers)
10219 (print_one_catch_handlers, print_mention_catch_handlers)
10220 (print_recreate_catch_handlers): New function.
10221 (catch_handlers_breakpoint_ops): New variable.
10222 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10223 Add parameter. Add "catch handler" handling.
10224 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10225 Add "catch handler" handling.
10226 (ada_exception_catchpoint_cond_string): Add "catch handler"
10227 handling.
10228 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10229 call.
10230 (catch_ada_handlers_command): New function.
10231 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10232 operations structure.
10233 (_initialize_ada_language): Add "catch handlers" command entry.
10234 * NEWS: Document "catch handlers" feature.
10235
9fe561ab
JB
102362018-01-02 Joel Brobecker <brobecker@adacore.com>
10237
10238 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10239 account when creating the array type of the slice.
10240 (ada_value_slice): Likewise.
10241
a405673c
JB
102422018-01-02 Joel Brobecker <brobecker@adacore.com>
10243
10244 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10245 New enum value.
10246 (create_array_type_with_stride): Add byte_stride_prop parameter.
10247 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10248 New parameter. Update all callers in this file.
10249 (array_type_has_dynamic_stride): New function.
10250 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10251 of arrays with dynamic byte strides.
10252 * dwarf2read.c (read_array_type): Add support for dynamic
10253 DW_AT_byte_stride attributes.
10254
74a2f8ff
JB
102552018-01-02 Joel Brobecker <brobecker@adacore.com>
10256
10257 * dwarf2read.c (read_unspecified_type): Treat
10258 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10259
e2882c85
JB
102602018-01-01 Joel Brobecker <brobecker@adacore.com>
10261
10262 Update copyright year range in all GDB files.
10263
1690bb24
JB
102642018-01-01 Joel Brobecker <brobecker@adacore.com>
10265
10266 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10267 and gdb/testsuite/gdb.base/step-line.c.
10268
0f0c98a8
JB
102692018-01-01 Joel Brobecker <brobecker@adacore.com>
10270
10271 * copyright.py (main): Dump the contents of
10272 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10273 even if BY_HAND is empty.
10274
82e1e79a
JB
102752018-01-01 Joel Brobecker <brobecker@adacore.com>
10276
10277 * top.c (print_gdb_version): Update Copyright year in version
10278 message.
10279
053f54e5 102802018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 10281
053f54e5 10282 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 10283
053f54e5 10284For older changes see ChangeLog-2017.
c906108c
SS
10285\f
10286Local Variables:
10287mode: change-log
10288left-margin: 8
10289fill-column: 74
10290version-control: never
57da7796 10291coding: utf-8
c906108c 10292End:
This page took 2.483776 seconds and 4 git commands to generate.