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