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