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