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