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