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