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