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