gdb: Allow struct fields named double
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * c-exp.y (field_name): Allow DOUBLE_KEYWORD, INT_KEYWORD, LONG,
4 SHORT, SIGNED_KEYWORD, and UNSIGNED tokens to act as a field
5 names.
6 (typename_stoken): New function.
7
8 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
9
10 * c-exp.y (field_name): New %token, and new rule.
11 (exp): Replace uses of 'name' with 'field_name' where appropriate.
12
13 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
14
15 PR gdb/13368
16 * c-exp.y (typebase): Extend the comment.
17 (ident_tokens): Likewise.
18
19 2018-12-18 Tom Tromey <tom@tromey.com>
20
21 * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take
22 address of sect_off.
23
24 2018-12-23 Joel Brobecker <brobecker@adacore.com>
25
26 GDB 8.2.1 released.
27
28 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
29
30 * riscv-tdep.c (riscv_call_arg_struct): Don't adjust size before
31 assigning locations.
32 (riscv_return_value): Take more care not to read/write outside of
33 argument buffer. Cast return value between the declared type and
34 the abi type.
35
36 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
37
38 * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
39 fflags, and frm registers.
40
41 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
42
43 * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
44 (riscv_gdbarch_init): Register new function with gdbarch.
45 * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
46
47 2018-12-21 Simon Marchi <simon.marchi@ericsson.com>
48
49 * minsyms.c (mst_str): New.
50 (minimal_symbol_reader::record_full): Add debug output.
51
52 2018-12-21 John Baldwin <jhb@FreeBSD.org>
53
54 * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
55 equal PL_FLAG_SI.
56 (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
57
58 2018-12-21 Paul Marechal <paul.marechal@ericsson.com>
59
60 PR gdb/23974
61 * target.c (target_read_stralloc): Check for empty vector.
62
63 2018-12-21 Дилян Палаузов <dilyan.palauzov@aegee.org>
64
65 * top.c (print_gdb_configuration): Print "--without-python"
66 if GDB was configured without Python.
67
68 2018-12-21 Andrew Burgess <andrew.burgess@embecosm.com>
69
70 * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
71 a signed offset as a string.
72
73 2018-12-21 Dave Murphy <davem@devkitpro.org>
74
75 * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
76 initialise.
77 * probe.c (any_static_probe_ops): Ditto.
78 * record-btrace.c (record_btrace_thread_observer_token): Ditto.
79 * stap-probe.c (stap_static_probe_ops): Ditto.
80 * tui/tui-hooks.c (tui_observers_token): Ditto.
81 * unittests/observable-selftests.c (token1, token2, token3): Ditto.
82
83 2018-12-19 Andrew Burgess <andrew.burgess@embecosm.com>
84
85 * gdb/dummy-frame.c (default_dummy_id): Defined new function.
86 * gdb/dummy-frame.h (default_dummy_id): Declare new function.
87 * gdb/frame-unwind.c (default_unwind_pc): Define new function.
88 (default_unwind_sp): Define new function.
89 * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
90 (default_unwind_sp): Declare new function.
91 * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
92 available.
93 (get_frame_sp): Assume that gdbarch_unwind_sp is available.
94 * gdb/gdbarch.c: Regenerate.
95 * gdb/gdbarch.h: Regenerate.
96 * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
97 unwind_sp. Add additional header files to be included in
98 generated file.
99
100 2018-12-19 Dimitar Dimitrov <dimitar@dinux.eu>
101
102 * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
103 sp clobbers.
104
105 2018-12-17 Andrew Burgess <andrew.burgess@embecosm.com>
106
107 * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
108 'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
109 'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
110 'processing_has_namespace_info' from unsigned int to bool. Update
111 comments.
112 (producer_is_icc_lt_14): Update return type.
113 (producer_is_gcc_lt_4_3): Likewise.
114 (producer_is_gxx_lt_4_6): Likewise.
115 (process_die): Write true instead of 1 into predicate fields.
116 (dwarf2_start_symtab): Likewise.
117 (var_decode_location): Likewise.
118 (dwarf2_mark_helper): Likewise.
119 (dwarf2_mark): Likewise.
120 (dwarf2_clear_marks): Write false instead of 0 into predicate
121 field.
122 (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
123 0.
124
125 2018-12-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
126
127 * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
128 asm/sigcontext.h.
129
130 2018-12-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
131
132 * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
133 warning trailing new line.
134
135 2018-12-16 Philippe Waroquiers <philippe.waroquiers@skynet.be>
136
137 * nat/linux-ptrace.c (kill_child): New function.
138 (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
139 Add a call to kill_child in case of early return after fork.
140 (linux_check_ptrace_features): Use kill_child instead of local code.
141 (linux_test_for_tracefork): Likewise.
142
143 2018-12-14 Tom Tromey <tom@tromey.com>
144
145 * Makefile.in: Remove "alloca" comment.
146 (INFOFILES): Remove.
147 (local-maintainer-clean): Don't use INFOFILES.
148
149 2018-12-13 John Baldwin <jhb@FreeBSD.org>
150
151 * syscalls/update-freebsd.sh: New file.
152 * syscalls/freebsd.xml: Regenerate.
153
154 2018-12-13 John Baldwin <jhb@FreeBSD.org>
155
156 * NEWS: Add entry documenting system call aliases.
157 * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
158 to get_syscalls_by_name.
159 * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
160 * gdbarch.h: Regenerate.
161 * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
162 * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
163 from get_syscall_by_name. Now accepts a pointer to a vector of
164 integers and returns a bool.
165 [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
166 (syscall_create_syscall_desc): Add alias parameter and pass it to
167 syscall_desc constructor.
168 (syscall_start_syscall): Handle alias attribute.
169 (syscall_attr): Add alias attribute.
170 (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
171 Now accepts a pointer to a vector of integers and returns a
172 bool. Add syscalls whose alias or name matches the requested
173 name.
174 (get_syscalls_by_name): Rename from get_syscall_by_name. Now
175 accepts a pointer to a vector of integers and returns a bool.
176 * xml-syscall.h (get_syscalls_by_name): Likewise.
177
178 2018-12-13 John Baldwin <jhb@FreeBSD.org>
179
180 * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
181 to get_syscalls_by_group.
182 * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
183 false.
184 [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
185 numbers to an existing vector of integers and return a bool.
186 (get_syscalls_by_group): Accept pointer to vector of integers
187 and change return type to bool.
188 * xml-syscall.h (get_syscalls_by_group): Likewise.
189
190 2018-12-13 Jim Wilson <jimw@sifive.com>
191
192 * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
193 comment for SD field, and correct xlen calculation. For MISA, add
194 comment for MXL field, add call to register_size, and correct base
195 calculation.
196
197 2018-12-13 Stafford Horne <shorne@gmail.com>
198
199 * NEWS(New targets): Add or1k*-*-linux*.
200
201 2018-12-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
202
203 * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
204 declare on one line to fix ARI warning.
205
206 2018-12-12 Andrew Burgess <andrew.burgess@embecosm.com>
207
208 * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
209 (infcall_suspend_state::registers): New.
210 (infcall_suspend_state::restore): New.
211 (infcall_suspend_state::thread_suspend): Rename to...
212 (infcall_suspend_state::m_thread_suspend): ...this.
213 (infcall_suspend_state::registers): Rename to...
214 (infcall_suspend_state::m_registers): ...this.
215 (infcall_suspend_state::siginfo_gdbarch): Rename to...
216 (infcall_suspend_state::m_siginfo_gdbarch): ...this.
217 (infcall_suspend_state::siginfo_data): Rename to...
218 (infcall_suspend_state::m_siginfo_data): ...this.
219 (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
220 constructor.
221 (restore_infcall_suspend_state): Rewrite to use
222 infcall_suspend_state::restore method.
223 (get_infcall_suspend_state_regcache): Use
224 infcall_suspend_state::registers method.
225
226 2018-12-12 Andrew Burgess <andrew.burgess@embecosm.com>
227
228 * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
229 arguments are passed in integer registers.
230 (riscv_call_arg_complex_float): Likewise.
231
232 2018-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
233
234 * nat/linux-osdata.c (common_getter): New function.
235 (struct osdata_type): Change getter to take_snapshot.
236 Add LONGEST len_avail and struct buffer buffer.
237 Change all elements in the initializer.
238 Add an element for the list of types.
239 (linux_xfer_osdata_info_os_types): New function.
240 (linux_common_xfer_osdata): Use common_getter for the list of types.
241 Replace getter call by common_getter.
242 (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
243 Add arg BUFFER. Only keep the code that adds data in BUFFER.
244 (linux_xfer_osdata_fds): Likewise.
245 (linux_xfer_osdata_modules): Likewise.
246 (linux_xfer_osdata_msg): Likewise.
247 (linux_xfer_osdata_processes): Likewise.
248 (linux_xfer_osdata_processgroups): Likewise.
249 (linux_xfer_osdata_sem): Likewise.
250 (linux_xfer_osdata_shm): Likewise.
251 (linux_xfer_osdata_isockets): Likewise.
252 (linux_xfer_osdata_threads): Likewise.
253
254 2018-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
255
256 * nat/linux-osdata.c: Removed various trailing spaces.
257
258 2018-12-10 Andrew Burgess <andrew.burgess@embecosm.com>
259
260 * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
261 leading whitespace before #include line.
262
263 2018-12-08 Simon Marchi <simon.marchi@ericsson.com>
264 Дилян Палаузов <dilyan.palauzov@aegee.org>
265
266 PR gdb/23950
267 * configure.ac: Search for tgetent in libtinfow.
268 * configure: Re-generate.
269
270 2018-12-08 Philippe Waroquiers <philippe.waroquiers@skynet.be>
271
272 * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
273 (thread_db_err_str): Forward declare.
274 (delete_thread_db_info): Call td_ta_delete_p if available.
275 (try_thread_db_load_1): Acquire td_ta_delete address.
276 * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
277
278 2018-12-08 Pedro Alves <palves@redhat.com>
279
280 * source.c (forward_search_command): Rename to ...
281 (search_command_helper): ... this. Add 'forward' parameter.
282 Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
283 buffer. Handle backward searches too.
284 (forward_search_command, reverse_search_command): Reimplement by
285 calling search_command_helper.
286
287 2018-12-07 Andrew Burgess <andrew.burgess@embecosm.com>
288
289 * .dir-locals.el: Copy most of the settings from c-mode over to
290 c++-mode.
291
292 2018-12-08 Stafford Horne <shorne@gmail.com>
293
294 * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
295 * configure.tgt: Add or1k*-*-linux*.
296 * or1k-linux-tdep.c: New file.
297 * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
298
299 2018-12-07 Pedro Alves <palves@redhat.com>
300
301 * dwarf2read.c (get_gdb_index_contents_from_section): Use
302 gdb::make_array_view.
303
304 2018-12-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
305
306 * language.c (_initialize_language): Fix leak by assigning
307 a static string to language. Same for range and case_sensitive,
308 even if no leak is detected for these variables.
309
310 2018-12-05 John Baldwin <jhb@FreeBSD.org>
311
312 * configure: Re-generate.
313 * configure.ac: Use separate sed expressions to escape variables
314 in auto-load directories.
315
316 2018-12-05 Andrew Burgess <andrew.burgess@embecosm.com>
317
318 * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
319 (riscv_find_default_target_description): Use new function to
320 extract feature from gdbarch_info.
321 (riscv_gdbarch_init): Add error checks for xlen and flen between
322 target description and bfd headers. Be smarter about when we
323 think the hardware floating point abi should be used.
324
325 2018-12-05 Alan Hayward <alan.hayward@arm.com>
326
327 * nat/aarch64-linux-hw-point.c
328 (aarch64_linux_any_set_debug_regs_state): New function.
329 * nat/aarch64-linux-hw-point.h
330 (aarch64_linux_any_set_debug_regs_state): New declaration.
331 * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
332 BPs or WPs are set.
333
334 2018-11-30 John Baldwin <jhb@FreeBSD.org>
335
336 * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
337 (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
338
339 2018-11-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
340 Simon Marchi <simon.marchi@ericsson.com>
341
342 * linespec.c (symtab_vector_up): Remove.
343 (symtabs_from_filename): Change return type to std::vector.
344 (collect_symtabs_from_filename): Likewise.
345 (create_sals_line_offset): Assign return value of
346 collect_symtabs_from_filename to *ls->file_symtabs.
347 (convert_explicit_location_to_linespec): Remove call to release.
348 (parse_linespec): Likewise.
349 (symtab_collector) <symtab_collector>: Remove initialization of
350 m_symtabs.
351 <release_symtabs>: Change return type to std::vector<symtab *>.
352 <operator ()>: Adjust.
353
354 2018-11-30 John Baldwin <jhb@FreeBSD.org>
355
356 * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
357 defined.
358 (union sigval32, struct siginfo32, fbsd_siginfo_size)
359 (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
360 of KERN_PROC_AUXV and PT_LWPINFO.
361 (fbsd_nat_target::xfer_partial): Define method unconditionally.
362 Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
363 Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
364 Make TARGET_OBJECT_FREEBSD_VMMAP and
365 TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
366 and KERN_PROC_PS_STRINGS.
367 * fbsd-nat.h: Include <sys/proc.h>.
368 (fbsd_nat_target::xfer_partial): Declare method unconditionally.
369
370 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
371
372 * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
373 header files.
374 (riscv_linux_nat_target::read_description): New method.
375
376 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
377
378 * arch/riscv.h (riscv_gdbarch_features::hash): New method.
379 * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
380 (riscv_tdesc_cache): New global.
381 (riscv_create_target_description): Look in the cache before
382 creating a new target description.
383
384 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
385
386 * arch/riscv.h (riscv_gdb_features::operator==): New.
387 (riscv_gdb_features::operator!=): New.
388 * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
389 operator.
390
391 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
392
393 * arch/riscv.h (riscv_create_target_description): Make return type
394 const.
395 * arch/riscv.c (riscv_create_target_description): Likewise.
396 * riscv-tdep.c (riscv_find_default_target_description): Likewise.
397
398 2018-11-30 Jan Kratochvil <jan.kratochvil@redhat.com>
399 Keith Seitz <keiths@redhat.com>
400 Tom Tromey <tom@tromey.com>
401 Sergio Durigan Junior <sergiodj@redhat.com>
402
403 https://bugzilla.redhat.com/show_bug.cgi?id=1613614
404 * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
405 'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
406 inside the CU.
407
408 2018-11-30 Pedro Alves <palves@redhat.com>
409
410 * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
411 <stratum>: New override.
412 * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
413 <stratum>: New override.
414 * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
415 <stratum>: New override.
416 * exec.c (exec_target) <exec_target>: Delete.
417 <stratum>: New override.
418 * gdbarch-selftests.c (register_to_value_test): Adjust to use the
419 stratum method instead of the to_stratum field.
420 * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
421 <stratum>: New override.
422 (thread_db_target::thread_db_target): Delete.
423 * make-target-delegates (print_class): Don't print a ctor
424 declaration. Print a stratum method override declaration.
425 * process-stratum-target.h (process_stratum_target)
426 <process_stratum_target>: Delete.
427 <stratum>: New override.
428 * ravenscar-thread.c (ravenscar_thread_target)
429 <ravenscar_thread_target>: Delete.
430 <stratum>: New override.
431 * record-btrace.c (record_btrace_target)
432 <record_btrace_target>: Delete.
433 <stratum>: New override.
434 * record-full.c (record_full_base_target)
435 <record_full_base_target>: Delete.
436 <stratum>: New override.
437 * record.c (record_disconnect, record_detach)
438 (record_mourn_inferior, record_kill): Adjust to use the stratum
439 method instead of the to_stratum field.
440 * regcache.c (cooked_read_test, cooked_write_test): Likewise.
441 * sol-thread.c (sol_thread_target)
442 <sol_thread_target>: Delete.
443 <stratum>: New override.
444 * spu-multiarch.c (spu_multiarch_target)
445 <spu_multiarch_target>: Delete.
446 <stratum>: New override.
447 * target-delegates.c: Regenerate.
448 * target.c (target_stack::push, target_stack::unpush)
449 (pop_all_targets_above, pop_all_targets_at_and_above)
450 (info_target_command, target_require_runnable)
451 (target_stack::find_beneath): Adjust to use the stratum method
452 instead of the to_stratum field.
453 (dummy_target::dummy_target): Delete.
454 (dummy_target::stratum): New.
455 (debug_target::debug_target): Delete.
456 (debug_target::stratum): New.
457 (maintenance_print_target_stack): Adjust to use the stratum method
458 instead of the to_stratum field.
459 * target.h (struct target_ops) <stratum>: New method.
460 <to_stratum>: Delete.
461 <is_pushed>: Adjust to use the stratum method
462 instead of the to_stratum field.
463
464 2018-11-30 Pedro Alves <palves@redhat.com>
465
466 * corelow.c (core_target) <has_all_memory, has_execution>: New
467 overrides.
468 * inf-child.c (inf_child_target::has_all_memory)
469 (inf_child_target::has_memory, inf_child_target::has_stack)
470 (inf_child_target::has_registers)
471 (inf_child_target::has_execution): Delete.
472 * inf-child.h (inf_child_target) <has_all_memory, has_memory,
473 has_stack, has_registers, has_execution>: Delete.
474 * process-stratum-target.c
475 (process_stratum_target::has_all_memory)
476 (process_stratum_target::has_memory)
477 (process_stratum_target::has_stack)
478 (process_stratum_target::has_registers)
479 (process_stratum_target::has_execution): New.
480 * process-stratum-target.h (process_stratum_target)
481 <has_all_memory, has_memory, has_stack, has_registers,
482 has_execution>: New method overrides.
483 * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
484 has_memory, has_stack, has_registers, has_execution>: Delete.
485 * remote-sim.c (gdbsim_target) <has_stack, has_registers,
486 has_execution>: Delete.
487 * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
488 has_registers, has_execution>: Delete.
489 * target.c (default_child_has_all_memory)
490 (default_child_has_memory, default_child_has_stack)
491 (default_child_has_registers, default_child_has_execution):
492 Delete.
493 * target.h (default_child_has_all_memory)
494 (default_child_has_memory, default_child_has_stack)
495 (default_child_has_registers, default_child_has_execution):
496 Delete.
497 * tracefile.h (tracefile_target) <has_execution>: New override.
498
499 2018-11-30 Pedro Alves <palves@redhat.com>
500
501 * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
502 * bsd-kvm.c: Include "process-stratum-target.h".
503 (bsd_kvm_target): Now inherits from process_stratum_target.
504 (bsd_kvm_target::bsd_kvm_target): Default it.
505 * corelow.c: Include "process-stratum-target.h".
506 (core_target): Now inherits from process_stratum_target.
507 (core_target::core_target): Don't set to_stratum here.
508 * inf-child.c (inf_child_target::inf_child_target): Delete.
509 * inf-child.h: Include "process-stratum-target.h".
510 (inf_child_target): Inherit from process_stratum_target.
511 (inf_child_target) <inf_child_target>: Default it.
512 <can_async_p, supports_non_stop, supports_disable_randomization>:
513 Delete overrides.
514 * process-stratum-target.c: New file.
515 * process-stratum-target.h: New file.
516 * remote-sim.c: Include "process-stratum-target.h".
517 (gdbsim_target): Inherit from process_stratum_target.
518 <gdbsim_target>: Default it.
519 * remote.c: Include "process-stratum-target.h".
520 (remote_target): Inherit from process_stratum_target.
521 <remote_target>: Default it.
522 * target.c (default_thread_address_space)
523 (default_thread_architecture): Delete.
524 * target.h (target_ops) <thread_architecture>: Now returns NULL by
525 default.
526 <thread_address_space>: Ditto.
527 * test-target.h: Include "process-stratum-target.h" instead of
528 "target.h".
529 (test_target_ops): Inherit from process_stratum_target.
530 <test_target_ops>: Default it.
531 * tracefile.c (tracefile_target::tracefile_target): Delete.
532 * tracefile.h: Include "process-stratum-target.h".
533 (tracefile_target): Inherit from process_stratum_target.
534 <tracefile_target>: Default it.
535 * target-delegates.c: Regenerate.
536
537 2018-11-30 Pedro Alves <palves@redhat.com>
538
539 * Makefile.in (COMMON_SFILES): Add test-target.c.
540 * gdbarch-selftests.c: Include "test-target.h".
541 * regcache.c: Include "test-target.h".
542 * target.c (test_target_info, test_target_ops::info): Move to ...
543 * test-target.c: ... this new file.
544 * target.h (test_target_ops): Move to ...
545 * test-target.h: ... this new file.
546
547 2018-11-29 Philippe Waroquiers <philippe.waroquiers@skynet.be>
548
549 * source.c (forward_search_command): Fix leak by using
550 xrealloc even for the first allocation in the loop, as buf
551 is static.
552
553 2018-11-29 Rajendra SY <rajendra.sy@gmail.com>
554
555 PR gdb/23093
556 * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
557 (fbsd_gdb_signal_to_target): New.
558 (fbsd_init_abi): Install gdbarch "signal_from_target" and
559 "signal_to_target" methods.
560
561 2018-11-29 Tom Tromey <tom@tromey.com>
562
563 * valarith.c (value_x_unop): Don't set argvec[3].
564
565 2018-11-26 Simon Marchi <simon.marchi@ericsson.com>
566
567 PR gdb/23917
568 * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
569 semicolon.
570
571 2018-11-26 Pedro Alves <palves@redhat.com>
572
573 * procfs.c (procfs_notice_thread): Replace uses of
574 in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
575 * sol-thread.c (sol_thread_target::wait)
576 (sol_update_thread_list_callback): Likewise.
577
578 2018-11-25 Tom Tromey <tom@tromey.com>
579
580 * ui-out.c (ui_out::field_fmt): Remove comment.
581 * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
582 * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
583
584 2018-11-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
585
586 * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
587 leak in open_source_file' has been partially undone by '2179fbc36d23
588 Return scoped_fd from open_source_file'. Re-add the transfer of
589 current s->fullname to the unique_xmalloc_ptr fullname given
590 to find_and_open_source.
591
592 2018-11-23 Pedro Alves <palves@redhat.com>
593
594 * gdbthread.h (enum thread_state): Move comments here.
595 (is_running, is_stopped, is_exited): Remove declarations.
596
597 2018-11-22 Pedro Alves <palves@redhat.com>
598
599 * Makefile.in (COMMON_SFILES): Add thread-iter.c.
600 * breakpoint.c (breakpoints_should_be_inserted_now): Replace
601 ALL_NON_EXITED_THREADS with all_non_exited_threads.
602 (print_one_breakpoint_location): Replace ALL_INFERIORS with
603 all_inferiors.
604 * bsd-kvm.c: Include inferior.h.
605 * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
606 with all_non_exited_threads.
607 * common/filtered-iterator.h: New.
608 * common/safe-iterator.h: New.
609 * corelow.c (core_target_open): Don't call init_thread_list here.
610 * darwin-nat.c (thread_info_from_private_thread_info): Replace
611 ALL_THREADS with all_threads.
612 * fbsd-nat.c (fbsd_nat_target::resume): Replace
613 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
614 * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
615 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
616 * fork-child.c (postfork_hook): Don't call init_thread_list here.
617 * gdbarch-selftests.c (register_to_value_test): Adjust.
618 * gdbthread.h: Don't include "inferior.h" here.
619 (struct inferior): Forward declare.
620 (enum step_over_calls_kind): Moved here from inferior.h.
621 (thread_info::deletable): Definition moved to thread.c.
622 (find_thread_ptid (inferior *, ptid_t)): Declare.
623 (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
624 Include "thread-iter.h".
625 (all_threads, all_non_exited_threads, all_threads_safe): New.
626 (any_thread_p): Declare.
627 (thread_list): Delete.
628 * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
629 all_non_exited_threads.
630 (proceed_after_attach_callback): Delete.
631 (proceed_after_attach): Take an inferior pointer instead of an
632 integer PID. Adjust to use range-for.
633 (attach_post_wait): Pass down inferior pointer instead of pid.
634 Use range-for instead of ALL_NON_EXITED_THREADS.
635 (detach_command): Remove init_thread_list call.
636 * inferior-iter.h: New.
637 * inferior.c (struct delete_thread_of_inferior_arg): Delete.
638 (delete_thread_of_inferior): Delete.
639 (delete_inferior, exit_inferior_1): Use range-for with
640 inf->threads_safe() instead of iterate_over_threads.
641 (inferior_appeared): Call init_thread_list here.
642 (discard_all_inferiors): Use all_non_exited_inferiors.
643 (find_inferior_id, find_inferior_pid): Use all_inferiors.
644 (iterate_over_inferiors): Use all_inferiors_safe.
645 (have_inferiors, number_of_live_inferiors): Use
646 all_non_exited_inferiors.
647 (number_of_inferiors): Use all_inferiors and std::distance.
648 (print_inferior): Use all_inferiors.
649 * inferior.h: Include gdbthread.h.
650 (enum step_over_calls_kind): Moved to gdbthread.h.
651 (struct inferior) <thread_list>: New field.
652 <threads, non_exited_threads, threads_safe>: New methods.
653 (ALL_INFERIORS): Delete.
654 Include "inferior-iter.h".
655 (ALL_NON_EXITED_INFERIORS): Delete.
656 (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
657 functions.
658 * inflow.c (child_interrupt, child_pass_ctrlc): Replace
659 ALL_NON_EXITED_THREADS with all_non_exited_threads.
660 * infrun.c (follow_exec): Use all_threads_safe.
661 (clear_proceed_status, proceed): Use all_non_exited_threads.
662 (init_wait_for_inferior): Don't clear inline frame state here.
663 (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
664 all_threads instead of ALL_NON_EXITED_THREADS.
665 (random_pending_event_thread): Use all_non_exited_threads instead
666 of ALL_NON_EXITED_THREADS. Use a lambda for repeated code.
667 (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
668 instead of ALL_NON_EXITED_THREADS.
669 (handle_no_resumed): Use all_non_exited_threads instead of
670 ALL_NON_EXITED_THREADS. Use all_inferiors instead of
671 ALL_INFERIORS.
672 (restart_threads, switch_back_to_stepped_thread): Use
673 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
674 * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
675 all_inferiors.
676 (kill_unfollowed_fork_children): Use inf->non_exited_threads
677 instead of ALL_NON_EXITED_THREADS.
678 * linux-tdep.c (linux_make_corefile_notes): Use
679 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
680 * linux-thread-db.c (thread_db_target::update_thread_list):
681 Replace ALL_INFERIORS with all_inferiors.
682 (thread_db_target::thread_handle_to_thread_info): Use
683 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
684 * mi/mi-interp.c (multiple_inferiors_p): New.
685 (mi_on_resume_1): Simplify using all_non_exited_threads and
686 multiple_inferiors_p.
687 * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
688 instead of ALL_NON_EXITED_THREADS.
689 * nto-procfs.c (nto_procfs_target::open): Don't call
690 init_thread_list here.
691 * record-btrace.c (record_btrace_target_open)
692 (record_btrace_target::stop_recording)
693 (record_btrace_target::close)
694 (record_btrace_target::record_is_replaying)
695 (record_btrace_target::resume, record_btrace_target::wait)
696 (record_btrace_target::record_stop_replaying): Use
697 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
698 * record-full.c (record_full_wait_1): Use all_non_exited_threads
699 instead of ALL_NON_EXITED_THREADS.
700 * regcache.c (cooked_read_test): Remove reference to global
701 thread_list.
702 * remote-sim.c (gdbsim_target::create_inferior): Don't call
703 init_thread_list here.
704 * remote.c (remote_target::update_thread_list): Use
705 all_threads_safe instead of ALL_NON_EXITED_THREADS.
706 (remote_target::process_initial_stop_replies): Replace
707 ALL_INFERIORS with all_non_exited_inferiors and use
708 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
709 (remote_target::open_1): Don't call init_thread_list here.
710 (remote_target::append_pending_thread_resumptions)
711 (remote_target::remote_resume_with_hc): Use all_non_exited_threads
712 instead of ALL_NON_EXITED_THREADS.
713 (remote_target::commit_resume)
714 (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
715 with all_non_exited_inferiors and use all_non_exited_threads
716 instead of ALL_NON_EXITED_THREADS.
717 (remote_target::kill_new_fork_children): Use
718 all_non_exited_threads instead of ALL_NON_EXITED_THREADS. Remove
719 init_thread_list and init_wait_for_inferior calls.
720 (remote_target::remote_btrace_maybe_reopen)
721 (remote_target::thread_handle_to_thread_info): Use
722 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
723 * target.c (target_terminal::restore_inferior)
724 (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
725 all_non_exited_inferiors.
726 * thread-iter.c: New file.
727 * thread-iter.h: New file.
728 * thread.c: Include "inline-frame.h".
729 (thread_list): Delete.
730 (clear_thread_inferior_resources): Call clear_inline_frame_state.
731 (init_thread_list): Use all_threads_safe instead of
732 ALL_THREADS_SAFE. Adjust to per-inferior thread lists.
733 (new_thread): Adjust to per-inferior thread lists.
734 (add_thread_silent): Pass inferior to find_thread_ptid.
735 (thread_info::deletable): New, moved from the header.
736 (delete_thread_1): Adjust to per-inferior thread lists.
737 (find_thread_global_id): Use inf->threads().
738 (find_thread_ptid): Use find_inferior_ptid and pass inferior to
739 find_thread_ptid.
740 (find_thread_ptid(inferior*, ptid_t)): New overload.
741 (iterate_over_threads): Use all_threads_safe.
742 (any_thread_p): New.
743 (thread_count): Use all_threads and std::distance.
744 (live_threads_count): Use all_non_exited_threads and
745 std::distance.
746 (valid_global_thread_id): Use all_threads.
747 (in_thread_list): Use find_thread_ptid.
748 (first_thread_of_inferior): Adjust to per-inferior thread lists.
749 (any_thread_of_inferior, any_live_thread_of_inferior): Use
750 inf->non_exited_threads().
751 (prune_threads, delete_exited_threads): Use all_threads_safe.
752 (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
753 (set_resumed, set_running): Use all_non_exited_threads.
754 (is_thread_state, is_stopped, is_exited, is_running)
755 (is_executing): Delete.
756 (set_executing, set_stop_requested, finish_thread_state): Use
757 all_non_exited_threads.
758 (print_thread_info_1): Use all_inferiors and all_threads.
759 (thread_apply_all_command): Use all_non_exited_threads.
760 (thread_find_command): Use all_threads.
761 (update_threads_executing): Use all_non_exited_threads.
762 * tid-parse.c (parse_thread_id): Use inf->threads.
763 * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
764
765 2018-11-22 Pedro Alves <palves@redhat.com>
766
767 * infrun.c (follow_exec) <set follow-exec new>: Add thread and
768 switch to it before calling into try_open_exec_file.
769
770 2018-11-22 Pedro Alves <palves@redhat.com>
771
772 * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
773 inferior_thread instead of find_thread_ptid, and only when
774 inferior_ptid is not null_ptid.
775 * inferior.c (add_inferior): Don't include target_pid_to_str
776 output when the inferior is not started.
777 * python/py-inferior.c (python_on_normal_stop): Don't use
778 find_thread_ptid.
779 (tui_on_user_selected_context_changed): Use inferior_thread
780 instead of find_thread_ptid, and only when inferior_ptid is not
781 null_ptid.
782
783 2018-11-21 Benno Fünfstück <benno.fuenfstueck@gmail.com>
784
785 PR python/23714
786 * gdb/python/python.c (execute_gdb_command): Call
787 prevent_dont_repeat earlier to avoid affecting dont_repeat.
788
789 2018-11-21 Andrew Burgess <andrew.burgess@embecosm.com>
790
791 * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
792 (HFILES_NO_SRCDIR): Add arch/riscv.h.
793 * arch/riscv.c: New file.
794 * arch/riscv.h: New file.
795 * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
796 this list, and add arch/riscv.o.
797 * features/Makefile: Add riscv features.
798 * features/riscv/32bit-cpu.c: New file.
799 * features/riscv/32bit-cpu.xml: New file.
800 * features/riscv/32bit-csr.c: New file.
801 * features/riscv/32bit-csr.xml: New file.
802 * features/riscv/32bit-fpu.c: New file.
803 * features/riscv/32bit-fpu.xml: New file.
804 * features/riscv/64bit-cpu.c: New file.
805 * features/riscv/64bit-cpu.xml: New file.
806 * features/riscv/64bit-csr.c: New file.
807 * features/riscv/64bit-csr.xml: New file.
808 * features/riscv/64bit-fpu.c: New file.
809 * features/riscv/64bit-fpu.xml: New file.
810 * features/riscv/rebuild-csr-xml.sh: New file.
811 * riscv-tdep.c: Add 'arch/riscv.h' include.
812 (riscv_gdb_reg_names): Delete.
813 (csr_reggroup): New global.
814 (struct riscv_register_alias): Delete.
815 (struct riscv_register_feature): New structure.
816 (riscv_register_aliases): Delete.
817 (riscv_xreg_feature): New global.
818 (riscv_freg_feature): New global.
819 (riscv_virtual_feature): New global.
820 (riscv_csr_feature): New global.
821 (riscv_create_csr_aliases): New function.
822 (riscv_read_misa_reg): Delete.
823 (riscv_has_feature): Delete.
824 (riscv_isa_xlen): Simplify, just return cached xlen.
825 (riscv_isa_flen): Simplify, just return cached flen.
826 (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
827 (riscv_register_name): Update to make use of tdesc_register_name.
828 Look up xreg and freg names in the new globals riscv_xreg_feature
829 and riscv_freg_feature. Don't supply csr aliases here.
830 (riscv_fpreg_q_type): Delete.
831 (riscv_register_type): Use tdesc_register_type in almost all
832 cases, override the returned type in a few specific cases only.
833 (riscv_print_one_register_info): Handle errors reading registers.
834 (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
835 registers that are otherwise unknown to GDB. Also check the
836 csr_reggroup.
837 (riscv_print_registers_info): Remove assert about upper register
838 number, and use gdbarch_register_reggroup_p instead of
839 short-cutting.
840 (riscv_find_default_target_description): New function.
841 (riscv_check_tdesc_feature): New function.
842 (riscv_add_reggroups): New function.
843 (riscv_setup_register_aliases): New function.
844 (riscv_init_reggroups): New function.
845 (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
846 setup register groups. Register new riscv debug variable.
847 * riscv-tdep.h: Add 'arch/riscv.h' include.
848 (struct gdbarch_tdep): Remove abi union, and add
849 riscv_gdbarch_features field. Remove cached quad floating point
850 type, and provide initialisation for double type field.
851 * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
852 the list of targets using the feature based target descriptions.
853 * NEWS: Mention target description support.
854
855 2018-11-21 Pedro Alves <palves@redhat.com>
856
857 * valops.c (find_method_list, value_find_oload_method_list)
858 (find_overload_match, find_oload_champ): Rename parameters and
859 locals.
860
861 2018-11-21 Pedro Alves <palves@redhat.com>
862
863 * valops.c (find_method_list): Replace pointer and length
864 parameters with an gdb::array_view. Adjust.
865 (value_find_oload_method_list): Likewise.
866 (find_overload_match): Use gdb::array_view for methods list.
867 Adjust to find_oload_champ interface change.
868 (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
869 'num_fns' parameter now a size_t. Eliminate 'fn_count' local.
870
871 2018-11-21 Pedro Alves <palves@redhat.com>
872
873 * gdbtypes.c (compare_badness): Change type of parameters to const
874 reference. Adjust to badness_vector being a std::vector now.
875 (rank_function): Adjust to badness_vector being a std::vector now.
876 * gdbtypes.h (badness_vector): Now a typedef to std::vector.
877 (LENGTH_MATCH): Delete.
878 (compare_badness): Change type of parameters to const reference.
879 (rank_function): Return a badness_vector by value now.
880 (find_overload_match): Adjust to badness_vector being a
881 std::vector now. Remove cleanups.
882 (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
883 badness_vector pointer.
884 (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
885 a badness_vector pointer. Adjust to badness_vector being a
886 std::vector now. Remove cleanups.
887 (find_oload_champ): 'oload_champ_bv' parameter now
888 a badness_vector pointer. Adjust to badness_vector being a
889 std::vector now. Remove cleanups.
890
891 2018-11-21 Pedro Alves <palves@redhat.com>
892
893 * cp-support.c (sym_return_val_size, sym_return_val_index)
894 (sym_return_val): Delete.
895 (overload_list_add_symbol): Add std::vector parameter. Adjust to
896 add to the vector.
897 (make_symbol_overload_list): Adjust to return a std::vector
898 instead of maintaining a global open coded vector.
899 (make_symbol_overload_list_block): Add std::vector parameter.
900 (make_symbol_overload_list_block): Rename to ...
901 (add_symbol_overload_list_block): ... this and add std::vector
902 parameter.
903 (make_symbol_overload_list_namespace): Rename to ...
904 (add_symbol_overload_list_namespace): ... this and add std::vector
905 parameter.
906 (make_symbol_overload_list_adl_namespace): Rename to ...
907 (add_symbol_overload_list_adl_namespace): ... this and add
908 std::vector parameter.
909 (make_symbol_overload_list_adl): Delete.
910 (add_symbol_overload_list_adl): New.
911 (make_symbol_overload_list_using): Rename to ...
912 (add_symbol_overload_list_using): ... this and add std::vector
913 parameter.
914 (make_symbol_overload_list_qualified): Rename to ...
915 (add_symbol_overload_list_qualified): ... this and add std::vector
916 parameter.
917 * cp-support.h: Include "common/array-view.h" and <vector>.
918 (make_symbol_overload_list): Change return type to std::vector.
919 (make_symbol_overload_list_adl): Delete declaration.
920 (add_symbol_overload_list_adl): New declaration.
921 * valops.c (find_overload_match): Local 'oload_syms' now a
922 std::vector.
923 (find_oload_champ_namespace): 'oload_syms' parameter now a
924 std::vector pointer.
925 (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
926 std::vector pointer. Adjust to new make_symbol_overload_list
927 interface.
928
929 2018-11-21 Pedro Alves <palves@redhat.com>
930
931 * common/array-view.h (array_view::splice(size_type, size_t)): New.
932 (array_view::splice(size_type)): New.
933 * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
934 * extension.c (xmethod_worker::get_arg_types): Adjust to return an
935 std::vector.
936 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
937 * extension.h: Include "common/array-view.h".
938 (xmethod_worker::invoke): Adjust to use gdb::array_view.
939 (xmethod_worker::get_arg_types): Adjust to return an std::vector.
940 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
941 (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
942 (xmethod_worker::do_get_result_type): Adjust to use
943 gdb::array_view.
944 * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
945 * gdbtypes.h: Include "common/array-view.h".
946 (rank_function): Adjust to use gdb::array_view.
947 * python/py-xmethods.c (python_xmethod_worker::invoke)
948 (python_xmethod_worker::do_get_arg_types)
949 (python_xmethod_worker::do_get_result_type)
950 (python_xmethod_worker::invoke): Adjust to new interfaces.
951 * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
952 (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
953 * valops.c (find_overload_match, find_oload_champ_namespace)
954 (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
955 gdb:array_view and the new xmethod_worker interfaces.
956 * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
957 gdb::array_view.
958 * value.h (find_overload_match, result_type_of_xmethod)
959 (call_xmethod): Adjust to use gdb::array_view.
960 * unittests/array-view-selftests.c: Add slicing tests.
961
962 2018-11-21 Pedro Alves <palves@redhat.com>
963
964 * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
965 * common/array-view.h (make_array_view): New.
966 * compile/compile-object-run.c (compile_object_run): Adjust to
967 pass an array_view.
968 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
969 * eval.c (eval_call): Adjust to pass an array_view.
970 (evaluate_subexp_standard): Adjust to pass an array_view.
971 * gcore.c (call_target_sbrk): Adjust to pass an array_view.
972 * guile/scm-value.c (gdbscm_value_call): Likewise.
973 * infcall.c (push_dummy_code): Replace pointer + size parameters
974 with an array_view parameter.
975 (call_function_by_hand, call_function_by_hand_dummy): Likewise and
976 adjust.
977 * infcall.h: Include "common/array-view.h".
978 (call_function_by_hand, call_function_by_hand_dummy): Replace
979 pointer + size parameters with an array_view parameter.
980 * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
981 * linux-tdep.c (linux_infcall_mmap): Likewise.
982 * objc-lang.c (lookup_objc_class, lookup_child_selector)
983 (value_nsstring, print_object_command): Likewise.
984 * python/py-value.c (valpy_call): Likewise.
985 * rust-lang.c (rust_evaluate_funcall): Likewise.
986 * spu-tdep.c (flush_ea_cache): Likewise.
987 * valarith.c (value_x_binop, value_x_unop): Likewise.
988 * valops.c (value_allocate_space_in_inferior): Likewise.
989 * unittests/array-view-selftests.c (run_tests): Add
990 gdb::make_array_view test.
991
992 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
993
994 * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
995 than a fixed size buffer.
996
997 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
998
999 * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
1000 and remove insertion of extra spaces in GDB's output.
1001 * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
1002 Layout field into a temporary buffer, and then output it as a
1003 string field.
1004
1005 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1006
1007 * NEWS: Document the language choice done by
1008 'info [types|functions|variables]|rbreak'.
1009
1010 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1011
1012 * symtab.c (treg_matches_sym_type_name): Use
1013 scoped_switch_to_sym_language_if_auto instead of local logic.
1014 (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
1015 to switch to SYM language when language mode is auto.
1016
1017 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1018
1019 * language.h (scoped_switch_to_sym_language_if_auto): New class.
1020
1021 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1022
1023 * symtab.c (search_symbols): Properly check absence of type regexp
1024 before entering the loop scanning the minimal symbols.
1025
1026 2018-11-20 John Darrington <john@darrington.wattle.id.au>
1027
1028 * s12z-tdep.c (s12z_extract_return_value): New function.
1029 (inv_reg_perm) New array.
1030 (s12z_return_value): Populate readbuf if non-null.
1031
1032 2018-11-20 Eli Zaretskii <eliz@gnu.org>
1033
1034 * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
1035 with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
1036 to MinGW fixed by Gnulib.
1037 (O_NOINHERIT): Define if not defined.
1038
1039 2018-11-19 John Darrington <john@darrington.wattle.id.au>
1040
1041 * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1042
1043 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
1044
1045 * infrun.c (displaced_step_inferior_state) <next>: Remove.
1046
1047 2018-11-19 Tom Tromey <tom@tromey.com>
1048
1049 * source.c (get_filename_and_charpos): Return void.
1050
1051 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
1052
1053 * skip.c (_initialize_step_skip): Fix "info skip" help.
1054
1055 2018-11-16 Tom Tromey <tom@tromey.com>
1056
1057 PR rust/23625:
1058 * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1059
1060 2018-11-19 Simon Marchi <simon.marchi@ericsson.com>
1061
1062 * infrun.c (displaced_step_inferior_states): Change type to
1063 std::forward_list.
1064 (get_displaced_stepping_state): Adjust.
1065 (displaced_step_in_progress_any_inferior): Adjust.
1066 (add_displaced_stepping_state): Adjust.
1067 (remove_displaced_stepping_state): Adjust.
1068
1069 2018-11-18 Tom Tromey <tom@tromey.com>
1070
1071 PR build/23814:
1072 * target-delegates.c: Rebuild.
1073 * ia64-linux-nat.c (class ia64_linux_nat_target)
1074 <have_steppable_watchpoint>: Use override. Return true, not 1.
1075 (ia64_linux_nat_target::can_use_hw_breakpoint): Rename. Remove
1076 "self" argument.
1077 (ia64_linux_nat_target::low_new_thread): Rename.
1078 (class ia64_linux_nat_target) <read_description>: Don't declare.
1079 * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1080 bool.
1081
1082 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1083
1084 PR gdb/22736:
1085 * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1086 lang_struct_return code.
1087
1088 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1089
1090 * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1091 return_method.
1092 * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1093 * amd64-tdep.c (amd64_push_arguments): Likewise.
1094 (amd64_push_dummy_call): Likewise.
1095 * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1096 * arc-tdep.c (arc_push_dummy_call): Likewise.
1097 * arm-tdep.c (arm_push_dummy_call): Likewise.
1098 * avr-tdep.c (avr_push_dummy_call): Likewise.
1099 * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1100 * cris-tdep.c (cris_push_dummy_call): Likewise.
1101 * csky-tdep.c (csky_push_dummy_call): Likewise.
1102 * frv-tdep.c (frv_push_dummy_call): Likewise.
1103 * gdbarch.c: Regenerate.
1104 * gdbarch.h: Regenerate.
1105 * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1106 return_method.
1107 * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1108 * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1109 (hppa64_push_dummy_call): Likewise.
1110 * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1111 * i386-tdep.c (i386_push_dummy_call): Likewise.
1112 * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1113 * infcall.c (call_function_by_hand_dummy): Likewise.
1114 * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1115 * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1116 * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1117 * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1118 * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1119 * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1120 * mep-tdep.c (mep_push_dummy_call): Likewise.
1121 * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1122 (mips_n32n64_push_dummy_call): Likewise.
1123 (mips_o32_push_dummy_call): Likewise.
1124 (mips_o64_push_dummy_call): Likewise.
1125 * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1126 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1127 * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1128 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1129 * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1130 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1131 (ppc64_sysv_abi_push_dummy_call): Likewise.
1132 * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1133 (ppc64_sysv_abi_push_dummy_call): Likewise.
1134 * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1135 * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1136 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1137 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1138 * rx-tdep.c (rx_push_dummy_call): Likewise.
1139 * s390-tdep.c (s390_push_dummy_call): Likewise.
1140 * score-tdep.c (score_push_dummy_call): Likewise.
1141 * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1142 (sh_push_dummy_call_nofpu): Likewise.
1143 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1144 (sparc32_push_dummy_call): Likewise.
1145 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1146 (sparc64_push_dummy_call): Likewise.
1147 * spu-tdep.c (spu_push_dummy_call): Likewise.
1148 * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1149 * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1150 * v850-tdep.c (v850_push_dummy_call): Likewise.
1151 * vax-tdep.c (vax_push_dummy_call): Likewise.
1152 * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1153 * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1154
1155 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1156
1157 * gdbarch.sh (enum function_call_return_method): Add enum.
1158 * gdbarch.h: Regenerate.
1159 * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1160
1161 2018-11-15 Joel Brobecker <brobecker@adacore.com>
1162
1163 * unittests/copy_bitwise-selftests.c: New file.
1164 * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1165 (selftests::copy_bitwise_tests): Delete, moving this code to
1166 unittests/copy_bitwise-selftests.c instead.
1167 (_initialize_utils): Do not register copy_bitwise tests.
1168 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1169 unittests/copy_bitwise-selftests.c.
1170
1171 2018-11-14 Joel Brobecker <brobecker@adacore.com>
1172
1173 * ada-lang.c (move_bits): Delete. Update all callers to use
1174 copy_bitwise instead.
1175 * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1176 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1177 Move from here to utils.c.
1178 (_initialize_dwarf2loc): Remove call to register copy_bitwise
1179 selftests.
1180 * utils.h (copy_bitwise): Add declaration.
1181 * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1182 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1183 Moved here from dwarf2loc.c.
1184 (_initialize_utils): Register copy_bitwise selftests.
1185
1186 2018-11-14 Jim Wilson <jimw@sifive.com>
1187
1188 * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1189 (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1190 then increment next_regnum if odd.
1191 (riscv_arg_location): New arg is_unnamed. Set ainfo->is_unnamed.
1192 (riscv_push_dummy_call): New local ftype. Call check_typedef to set
1193 function type. Pass new arg to riscv_arg_location based on function
1194 type.
1195 (riscv_return_value): Pass new arg to riscv_arg_location.
1196
1197 * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1198 (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1199 of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1200
1201 * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1202 setting len. New local align, set to max of arg align and xlen,
1203 and pass to first riscv_assign_stack_location call.
1204
1205 2018-11-12 Simon Marchi <simon.marchi@polymtl.ca>
1206
1207 * skip.c (complete_skip_number): New function.
1208 (_initialize_step_skip): Add completers to some skip commands.
1209
1210 2018-11-09 Tom Tromey <tom@tromey.com>
1211
1212 * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1213 (struct remote_g_packet_data): Derive from allocate_on_obstack.
1214 <guesses>: Now a std::vector.
1215 (remote_g_packet_data_init, register_remote_g_packet_guess):
1216 Update.
1217 (remote_read_description_p): Update. Return bool.
1218 (remote_target::read_description): Update.
1219 (struct remote_g_packet_guess): Add constructor.
1220
1221 2018-11-09 Tom Tromey <tom@tromey.com>
1222
1223 * common/scoped_fd.h (class scoped_fd): Add move constructor and
1224 move assignment operator.
1225 * psymtab.c (psymtab_to_fullname): Update.
1226 * source.h (open_source_file): Return scoped_fd.
1227 (find_and_open_source): Likewise.
1228 * source.c (open_source_file): Return scoped_fd.
1229 (get_filename_and_charpos): Update.
1230 (print_source_lines_base): Update. Use scoped_fd::to_file.
1231 (forward_search_command): Likewise.
1232 (reverse_search_command): Likewise.
1233 (find_and_open_source): Return scoped_fd.
1234 * tui/tui-source.c (tui_set_source_content): Update. Use
1235 gdb_file_up.
1236
1237 2018-11-09 John Baldwin <jhb@FreeBSD.org>
1238
1239 * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1240 overflow.
1241
1242 2018-11-09 Hafiz Abid Qadeer <abidh@codesourcery.com>
1243
1244 * configure: Regenerate.
1245
1246 2018-11-09 Tom de Vries <tdevries@suse.de>
1247
1248 * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1249 unconditionally, to set the language of the symbol. Manage freeing
1250 returned pointer using gdb::unique_xmalloc_ptr.
1251
1252 2018-11-08 Tom Tromey <tom@tromey.com>
1253
1254 * record.c (require_record_target): Upper-case "<TAB>".
1255
1256 2018-11-08 Tom Tromey <tom@tromey.com>
1257
1258 * python/lib/gdb/command/pretty_printers.py
1259 (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1260
1261 2018-11-08 Tom Tromey <tom@tromey.com>
1262
1263 PR gdb/23555:
1264 PR gdb/23838:
1265 * target.h (target_supports_terminal_ours): Return bool.
1266 * target.c (target_supports_terminal_ours): Handle case where
1267 current_top_target returns nullptr. Return bool.
1268
1269 2018-11-08 Joel Brobecker <brobecker@adacore.com>
1270
1271 * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1272 return the correct count for potential HFAs.
1273
1274 2018-11-08 Jan Beulich <jbeulich@suse.com>
1275
1276 * i387-tdep.c (i387_supply_xsave): Split handling of
1277 X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1278 (i387_collect_xsave): Likewise.
1279
1280 2018-11-08 Andrew Burgess <andrew.burgess@embecosm.com>
1281
1282 * riscv-tdep.c (riscv_insn::decode): Update header comment.
1283 (riscv_frame_this_id): Catch errors thrown while building the
1284 frame cache, leave the frame id as the default, which is the outer
1285 frame id.
1286
1287 2018-11-07 Joel Brobecker <brobecker@adacore.com>
1288
1289 * ada-lang.c (read_atcb): Only set task_info->called_task if
1290 task_info->state == Entry_Caller_Sleep.
1291 (print_ada_task_info): Do not check task_info->state before
1292 checking task_info->called_task.
1293 (info_task): Likewise.
1294
1295 2018-11-07 Joel Brobecker <brobecker@adacore.com>
1296
1297 * ada-tasks.c (read_atcb): Clear task_info before computing
1298 the value of each of its fields.
1299
1300 2018-11-07 Andrew Burgess <andrew.burgess@embecosm.com>
1301
1302 * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1303 NULL before dereferencing it.
1304
1305 2018-11-06 Tom de Vries <tdevries@suse.de>
1306
1307 * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1308 program headers.
1309
1310 2018-11-06 Max Filippov <jcmvbkbc@gmail.com>
1311
1312 * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1313 so that it applies to uclinux as well.
1314
1315 2018-11-06 Marius Muench <marius.muench@eurecom.fr>
1316
1317 * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1318 when on AAPCS.
1319
1320 2018-11-06 John Baldwin <jhb@FreeBSD.org>
1321
1322 * riscv-fbsd-nat.c (getregs_supplies): Return true for
1323 RISCV_CSR_SSTATUS_REGNUM.
1324
1325 2018-11-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1326
1327 * source.c (open_source_file): Fix leak by transferring the
1328 current s->fullname to the unique_xmalloc_ptr fullname given
1329 to find_and_open_source.
1330
1331 2018-11-04 Tom Tromey <tom@tromey.com>
1332
1333 * varobj.c (install_default_visualizer): Update.
1334 * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1335 Return gdbpy_ref.
1336 * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1337 (find_pretty_printer_from_progspace)
1338 (find_pretty_printer_from_gdb, find_pretty_printer)
1339 (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1340 (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1341 Update.
1342
1343 2018-11-04 Tom Tromey <tom@tromey.com>
1344
1345 * python/python.c (gdbpy_parameter_value): Update.
1346 * python/python-internal.h (python_string_to_unicode)
1347 (python_string_to_target_python_string)
1348 (host_string_to_python_string): Return gdbpy_ref.
1349 * python/py-utils.c (python_string_to_unicode)
1350 (unicode_to_encoded_python_string)
1351 (unicode_to_target_python_string)
1352 (python_string_to_target_string)
1353 (python_string_to_target_python_string): Return gdbpy_ref.
1354 (python_string_to_host_string): Update.
1355 (host_string_to_python_string): Return gdbpy_ref.
1356 * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1357 (stpy_fullname): Update.
1358 * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1359 Update.
1360 * python/py-prettyprint.c (print_string_repr): Update.
1361 * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1362 (objfpy_get_build_id): Update.
1363 * python/py-breakpoint.c (bppy_get_location)
1364 (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1365 Update.
1366
1367 2018-11-04 Tom Tromey <tom@tromey.com>
1368
1369 * python/python-internal.h (gdb_py_object_from_longest)
1370 (gdb_py_object_from_ulongest): Return gdbpy_ref.
1371 * python/py-value.c (valpy_int): Update.
1372 * python/py-utils.c (gdb_py_object_from_longest): Return
1373 gdbpy_ref.
1374 (gdb_py_object_from_ulongest): Likewise.
1375 * python/py-type.c (typy_get_alignof): Update.
1376 * python/py-linetable.c (ltpy_get_all_source_lines)
1377 (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1378 * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1379
1380 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1381
1382 * ada-lang.c (_initialize_ada_language): Fix typo.
1383
1384 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1385
1386 * language.c (type): Remove.
1387 (_initialize_language): Remove assignment to type.
1388
1389 2018-11-02 Joel Brobecker <brobecker@adacore.com>
1390
1391 * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1392 * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1393 (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1394 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1395 (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1396 (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1397 * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1398 and aarch64-ravenscar-thread.o.
1399 * NEWS: Add entry documenting Ravenscar tasking support
1400 on AArch64 ELF.
1401
1402 2018-11-02 Matthew Malcomson <matthew.malcomson@arm.com>
1403
1404 * symtab.c (info_functions_command): Initialize quiet flag.
1405 * stack.c (info_args_command): Likewise.
1406
1407 2018-11-01 Jim Wilson <jimw@sifive.com>
1408
1409 * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1410 Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
1411 debugging messages.
1412
1413 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1414
1415 * ada-lang.c (ada_watch_location_expression): New function.
1416 (ada_language_defn): Set la_watch_location_expression to
1417 ada_watch_location_expression.
1418
1419 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1420
1421 * print-utils.c (int_string): Remove unnecessary trailing spaces.
1422
1423 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1424
1425 * rs6000-tdep.c (skip_prologue): Fix potential negative left
1426 shifting.
1427
1428 2018-11-01 Jerome Guitton <guitton@adacore.com>
1429 Joel Brobecker <brobecker@adacore.com>
1430
1431 * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1432 * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1433 * arm-pikeos-tdep.c: New file.
1434 * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1435 embedded system.
1436 * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1437
1438 2018-11-01 Simon Marchi <simon.marchi@ericsson.com>
1439
1440 * common/pathstuff.c (get_standard_temp_dir): New.
1441 * common/pathstuff.h (get_standard_temp_dir): New.
1442 * config.in: Re-generate.
1443 * configure: Re-generate.
1444 * configure.ac: Don't check for mkdtemp.
1445 * gnulib/aclocal-m4-deps.mk: Re-generate.
1446 * gnulib/aclocal.m4: Re-generate.
1447 * gnulib/config.in: Re-generate.
1448 * gnulib/configure: Re-generate.
1449 * gnulib/import/Makefile.am: Re-generate.
1450 * gnulib/import/Makefile.in: Re-generate.
1451 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1452 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1453 * gnulib/import/m4/mkdtemp.m4: New file.
1454 * gnulib/import/mkdtemp.c: New file.
1455 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1456 Add mkdtemp module.
1457 * unittests/mkdir-recursive-selftests.c (test): Use
1458 get_standard_temp_dir.
1459 (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1460 ifdef.
1461 * compile/compile.c (get_compile_file_tempdir): Likewise.
1462
1463 2018-11-01 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1464
1465 * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1466 (SIG_FRAME_LR_OFFSET64): New define.
1467 (SIG_FRAME_FP_OFFSET64): New define.
1468 (aix_sighandle_frame_cache): New Function.
1469 (aix_sighandle_frame_this_id): New Function.
1470 (aix_sighandle_frame_prev_register): New Function.
1471 (aix_sighandle_frame_sniffer): New Function.
1472 (aix_sighandle_frame_unwind): New global variable.
1473 (rs6000_aix_init_osabi): Install new frame unwinder.
1474
1475 2018-10-31 Sergio Durigan Junior <sergiodj@redhat.com>
1476
1477 PR gdb/23835
1478 * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1479 already defined.
1480
1481 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1482
1483 * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1484
1485 2018-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
1486
1487 * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1488 (producer_is_icc): New function.
1489 (check_producer): Set producer_is_icc field on dwarf2_cu.
1490 (dwarf2_init_integer_type): New function.
1491 (read_base_type): Call dwarf2_init_integer_type instead of
1492 init_integer_type in all cases.
1493 (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1494 * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1495 LEN is greater than 0.
1496
1497 2018-10-30 Tom Tromey <tom@tromey.com>
1498
1499 * main.c (captured_main_1): Check return value of bfd_init.
1500
1501 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
1502
1503 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1504 Adjust comments.
1505
1506 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1507
1508 * procfs.c: Include common/pathstuff.h.
1509
1510 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
1511
1512 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1513 Add missing braces. No functional change.
1514
1515 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1516
1517 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1518 to report a bad option and fix indentation.
1519 * demangle.c (demangle_command): Use report_unrecognized_option_error
1520 to report a bad option and correctly report the bad option.
1521
1522 2018-10-27 Tom Tromey <tom@tromey.com>
1523
1524 PR cli/23364:
1525 * darwin-nat.c (copied_shell): New global.
1526 (may_have_sip): Rename from should_disable_startup_with_shell.
1527 (copy_shell_to_cache, maybe_cache_shell): New functions.
1528 (darwin_nat_target::create_inferior): Update. Use
1529 copied_shell.
1530
1531 2018-10-27 Tom Tromey <tom@tromey.com>
1532
1533 * unittests/scoped_fd-selftests.c (test_to_file): New function.
1534 (run_tests): Call test_to_file.
1535 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1536 temporary files.
1537 * common/scoped_fd.h (scoped_fd::to_file): New method.
1538
1539 2018-10-27 Tom Tromey <tom@tromey.com>
1540
1541 * unittests/scoped_mmap-selftests.c (test_normal): Use
1542 gdb_mkostemp_cloexec.
1543 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1544 Use gdb_mkostemp_cloexec.
1545 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1546 gnulib/config.in, gnulib/configure,
1547 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1548 gnulib/import/m4/gnulib-cache.m4,
1549 gnulib/import/m4/gnulib-comp.m4: Update.
1550 * gnulib/import/m4/mkostemp.m4: New file.
1551 * gnulib/import/m4/mkstemp.m4: Remove.
1552 * gnulib/import/mkostemp.c: New file.
1553 * gnulib/import/mkstemp.m4: Remove.
1554 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1555 mkstemp, add mkostemp. Apply new patch.
1556 * gnulib/import/stdlib.in.h: Apply patch.
1557 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1558 New file.
1559 * dwarf-index-write.c (write_psymtabs_to_index): Use
1560 gdb_mkostemp_cloexec.
1561 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1562
1563 2018-10-27 Tom Tromey <tom@tromey.com>
1564
1565 * unittests/mkdir-recursive-selftests.c: New file.
1566 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1567 unittests/mkdir-recursive-selftests.c.
1568 * dwarf-index-cache.c (mkdir_recursive): Move to
1569 common/filestuff.c.
1570 (index_cache::store): Check return value of mkdir_recursive.
1571 (create_dir_and_check, test_mkdir_recursive): Move to new file.
1572 (_initialize_index_cache): Don't register test.
1573 * common/filestuff.h (mkdir_recursive): Declare.
1574 * common/filestuff.c (mkdir_recursive): Move from
1575 dwarf-index-cache.c. Return bool.
1576
1577 2018-10-27 Tom Tromey <tom@tromey.com>
1578
1579 * dwarf-index-write.c (write_psymtabs_to_index): Move
1580 make_temp_filename to common/pathstuff.c.
1581 * common/pathstuff.h (make_temp_filename): Declare.
1582 * common/pathstuff.c (make_temp_filename): New function, moved
1583 from dwarf-index-write.c.
1584
1585 2018-10-27 Tom Tromey <tom@tromey.com>
1586
1587 * procfs.c (procfs_target::create_inferior): Use get_shell.
1588 * cli/cli-cmds.c (shell_escape): Use get_shell.
1589 * windows-nat.c (windows_nat_target::create_inferior): Use
1590 get_shell.
1591 * common/pathstuff.c (get_shell): New function.
1592 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1593 (fork_inferior): Use get_shell.
1594 * common/pathstuff.h (get_shell): Declare.
1595
1596 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1597
1598 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1599
1600 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1601
1602 * stack.c (print_variable_and_value_data): Add preg and treg.
1603 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1604 and update callers.
1605 (print_frame_arg_vars): Likewise.
1606 (prepare_reg): New function.
1607 (info_locals_command): Extract info print args and use them.
1608 (info_args_command): Likewise.
1609 (_initialize_stack): Modify on-line help.
1610 * symtab.c (treg_matches_sym_type_name): New function.
1611 (search_symbols): New arg t_regexp.
1612 (symtab_symbol_info): New args quiet, regexp, t_regexp.
1613 (info_variables_command): Extract info print args and use them.
1614 (info_functions_command): Likewise.
1615 (info_types_command): Update call to symtab_symbol_info.
1616 (_initialize_symtab): Modify on-line help.
1617 * symtab.h (treg_matches_sym_type_name): New function.
1618 (search_symbols): New t_regexp arg.
1619
1620 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1621
1622 * cli-utils.c (extract_arg_maybe_quoted): New function.
1623 (extract_info_print_args): New function.
1624 (info_print_args_help): New function.
1625 (report_unrecognized_option_error): New function.
1626 * cli-utils.h (extract_arg_maybe_quoted): New function.
1627 (extract_info_print_args): New function.
1628 (info_print_args_help): New function.
1629 (report_unrecognized_option_error): New function.
1630
1631 2018-10-26 Tom Tromey <tom@tromey.com>
1632
1633 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1634 (compute_compunit_symtab_includes): Update.
1635 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
1636 (compunit_symtab_ptr): Likewise.
1637
1638 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1639
1640 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1641 default_print_auxv_entry for specific tag values.
1642
1643 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1644
1645 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1646
1647 2018-10-26 Jim Wilson <jimw@sifive.com>
1648
1649 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1650 (riscv_linux_sigframe_init): Declare.
1651 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1652 (riscv_linux_sigframe): New.
1653 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1654 (riscv_linux_sigframe_init): Define.
1655 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1656
1657 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1658 (riscv_isa_flen): Likewise. Drop static.
1659 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1660 (riscv_isa_flen): Likewise. Declare.
1661
1662 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1663 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1664
1665 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1666 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1667 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1668 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1669 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1670 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1671 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1672 Define.
1673 (struct ppc_linux_features) <htm>: New field.
1674 (ppc_linux_no_features): Add initializer for htm field.
1675 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1676 new tdescs.
1677 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1678 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1679 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1680 Define if not already defined.
1681 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1682 and rs6000/powerpc-isa207-htm-vsx64l.
1683 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1684 rs6000/powerpc-isa207-htm-vsx64l.xml.
1685 * features/rs6000/power-htm-spr.xml: New file.
1686 * features/rs6000/power-htm-core.xml: New file.
1687 * features/rs6000/power64-htm-core.xml: New file.
1688 * features/rs6000/power-htm-fpu.xml: New file.
1689 * features/rs6000/power-htm-altivec.xml: New file.
1690 * features/rs6000/power-htm-vsx.xml: New file.
1691 * features/rs6000/power-htm-ppr.xml: New file.
1692 * features/rs6000/power-htm-dscr.xml: New file.
1693 * features/rs6000/power-htm-tar.xml: New file.
1694 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1695 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1696 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1697 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1698 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1699 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1700 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1701 fetch_regset with HTM regsets.
1702 (store_register, store_ppc_registers): Call store_regset with HTM
1703 regsets.
1704 (ppc_linux_nat_target::read_description): Set htm field in the
1705 features struct if needed.
1706 * ppc-linux-tdep.c: Include
1707 features/rs6000/powerpc-isa207-htm-vsx32l.c and
1708 features/rs6000/powerpc-isa207-htm-vsx64l.c.
1709 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1710 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1711 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1712 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1713 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1714 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1715 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1716 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1717 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1718 (ppc32_linux_ctarregset): New globals.
1719 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1720 (ppc_linux_collect_core_cpgrregset): New function.
1721 (ppc_linux_iterate_over_regset_sections): Call back with the htm
1722 regsets.
1723 (ppc_linux_core_read_description): Check if the tm spr section is
1724 present and set htm in the features struct.
1725 (_initialize_ppc_linux_tdep): Call
1726 initialize_tdesc_powerpc_isa207_htm_vsx32l and
1727 initialize_tdesc_powerpc_isa207_htm_vsx64l.
1728 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1729 Declare.
1730 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1731 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1732 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1733 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1734 New fields.
1735 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1736 Likewise.
1737 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1738 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1739 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1740 New enum fields.
1741 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1742 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1743 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1744 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1745 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1746 <PPC_CTAR_REGNUM>: Likewise.
1747 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1748 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1749 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1750 (IS_CEFP_PSEUDOREG): Define.
1751 (rs6000_register_name): Hide the upper halves of checkpointed VSX
1752 registers. Return names for the checkpointed DFP, VSX, and EFP
1753 pseudo registers.
1754 (rs6000_pseudo_register_type): Remove initial assert and raise an
1755 internal error in the else clause instead. Return types for the
1756 checkpointed DFP, VSX, and EFP pseudo registers.
1757 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1758 checkpointed DFP pseudo registers.
1759 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1760 checkpointed VSX pseudo registers.
1761 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1762 from efpr_pseudo_register_read and
1763 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
1764 registers.
1765 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1766 Handle checkpointed DFP, VSX, and EFP registers.
1767 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1768 (efp_ax_pseudo_register_collect): New functions.
1769 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1770 register logic to new functions. Handle checkpointed DFP, VSX,
1771 and EFP pseudo registers.
1772 (rs6000_gdbarch_init): Look for and validate the htm features.
1773 Include checkpointed DFP, VSX and EFP pseudo-registers.
1774 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1775 HTM registers.
1776
1777 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1778
1779 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1780 without altivec or fpu.
1781
1782 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1783 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1784
1785 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1786 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1787 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1788 Define if not already defined.
1789 * features/rs6000/power-ebb.xml: New file.
1790 * features/rs6000/power-linux-pmu.xml: New file.
1791 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1792 features.
1793 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1794 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1795 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1796 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1797 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1798 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1799 fetch_regset with ebb and pmu regsets.
1800 (store_register, store_ppc_registers): Call store_regset with ebb
1801 and pmu regsets.
1802 (ppc_linux_nat_target::read_description): Set isa207 field in the
1803 features struct if ebb and pmu are avaiable.
1804 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1805 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1806 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1807 and pmu regsets.
1808 (ppc_linux_core_read_description): Check if the pmu section is
1809 present and set isa207 in the features struct.
1810 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1811 (ppc32_linux_pmuregset): Declare.
1812 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1813 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1814 <ppc_sier_regnum>: New field.
1815 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1816 New enum values.
1817 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1818 values.
1819 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1820 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1821 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1822 ebb and pmu features.
1823
1824 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1825 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1826
1827 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1828 (tdesc_powerpc_isa207_vsx64l): Declare.
1829 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1830 (struct ppc_linux_features) <isa207>: New field.
1831 (ppc_linux_no_features): Add initializer for isa207 field.
1832 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1833 new tdescs.
1834 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1835 (NT_PPC_TAR): Define if not already defined.
1836 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1837 rs6000/powerpc-isa207-vsx64l.
1838 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1839 rs6000/powerpc-isa207-vsx64l.xml.
1840 * features/rs6000/power-tar.xml: New file.
1841 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1842 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1843 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1844 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1845 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1846 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1847 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1848 fetch_regset with the TAR regset.
1849 (store_register, store_ppc_registers): Call store_regset with the
1850 TAR regset.
1851 (ppc_linux_nat_target::read_description): Set isa207 field in the
1852 features struct if needed.
1853 * ppc-linux-tdep.c: Include
1854 features/rs6000/powerpc-isa207-vsx32l.c and
1855 features/rs6000/powerpc-isa207-vsx64l.c.
1856 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1857 (ppc_linux_iterate_over_regset_sections): Call back with the tar
1858 regset.
1859 (ppc_linux_core_read_description): Check if the tar section is
1860 present and set isa207 in the features struct.
1861 (_initialize_ppc_linux_tdep): Call
1862 initialize_tdesc_powerpc_isa207_vsx32l and
1863 initialize_tdesc_powerpc_isa207_vsx64l.
1864 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1865 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1866 (enum) <PPC_TAR_REGNUM>: New enum value.
1867 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1868 feature.
1869 (ppc_process_record_op31): Record changes to TAR.
1870
1871 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1872 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1873
1874 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1875 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1876 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1877 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1878 (struct ppc_linux_features) <ppr_dscr>: New field.
1879 (ppc_linux_no_features): Add initializer for ppr_dscr field.
1880 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1881 new tdescs.
1882 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1883 Define if not already defined.
1884 * features/Makefile (WHICH): Add
1885 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1886 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1887 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1888 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1889 * features/rs6000/power-dscr.xml: New file.
1890 * features/rs6000/power-ppr.xml: New file.
1891 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1892 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1893 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1894 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1895 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1896 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1897 * ppc-linux-nat.c: Include <sys/uio.h>.
1898 (fetch_regset, store_regset, check_regset): New functions.
1899 (fetch_register, fetch_ppc_registers): Call fetch_regset with
1900 DSCR and PPR regsets.
1901 (store_register, store_ppc_registers): Call store_regset with
1902 DSCR and PPR regsets.
1903 (ppc_linux_get_hwcap2): New function.
1904 (ppc_linux_nat_target::read_description): Call
1905 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1906 features struct if needed.
1907 * ppc-linux-tdep.c: Include
1908 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1909 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1910 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1911 (ppc32_linux_dscrregset): New globals.
1912 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1913 and dscr regsets.
1914 (ppc_linux_core_read_description): Check if the ppr and dscr
1915 sections are present and set ppr_dscr in the features struct.
1916 (_initialize_ppc_linux_tdep): Call
1917 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1918 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1919 * ppc-linux-tdep.h (ppc32_linux_pprregset)
1920 (ppc32_linux_dscrregset): Declare.
1921 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1922 <ppc_dscr_regnum>: New field.
1923 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1924 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1925 and dscr features.
1926 (ppc_process_record_op31): Record changes to PPR and DSCR.
1927
1928 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1929
1930 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1931 second initializer line for the have_* variables. Initialize
1932 have_fpu to 0 instead of 1.
1933
1934 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1935
1936 * arch/ppc-linux-common.c (ppc_linux_match_description):
1937 Parenthesize tdesc assignements and indent them properly.
1938
1939 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1940
1941 * ppc-linux-nat.c (fetch_register): Change if statement to else
1942 if.
1943 (store_register): Likewise.
1944
1945 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1946
1947 * rs6000-tdep.c: Remove reggroups.h include.
1948 (rs6000_pseudo_register_reggroup_p): Remove.
1949 (rs6000_gdbarch_init): Remove call to
1950 set_tdesc_pseudo_register_reggroup_p.
1951
1952 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1953
1954 * reggroups.c (default_register_reggroup_p): Return true for
1955 decfloat registers and float_reggroup.
1956
1957 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1958
1959 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1960 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1961 ppc_linux_collect_vrregset by regcache_collect_regset.
1962
1963 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1964
1965 * linux-tdep.c (linux_collect_regset_section_cb): Use
1966 std::vector<gdb_byte> instead of char * and malloc for buf.
1967 Remove xfree.
1968
1969 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1970
1971 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1972 symtab_start instead of always using language_unknown.
1973
1974 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
1975
1976 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1977 READ_P parameter, catch and ignore register access errors from
1978 either the old or new MISA location.
1979 (riscv_has_feature): Update call to riscv_read_misa_reg.
1980
1981 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
1982
1983 * python/py-function.c (convert_values_to_python): Return
1984 gdbpy_ref<>. Add header comment.
1985 (fnpy_call): Adjust.
1986
1987 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
1988
1989 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1990 (cmdpy_completer_handle_brkchars): Adjust.
1991 (cmdpy_completer): Adjust.
1992
1993 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
1994
1995 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1996 Pass correct regnum to raw_supply_zeroed.
1997
1998 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
1999
2000 * regcache.c (cooked_read_test): Add CSKY to the list of
2001 architectures with a save_reggroup
2002
2003 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
2004
2005 PR gdb/23368
2006 * infrun.c (follow_exec): In the follow_exec_mode_new case,
2007 transfer terminal state from old new new inferior.
2008 * terminal.h (swap_terminal_info): New function.
2009 * inflow.c (swap_terminal_info): New function.
2010
2011 2018-10-23 Tom Tromey <tom@tromey.com>
2012
2013 * record-btrace.c (get_thread_current_frame_id): Rename from
2014 get_thread_current_frame. Return a frame_id.
2015 (record_btrace_start_replaying): Update.
2016
2017 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
2018
2019 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
2020 for CSRs.
2021
2022 2018-10-23 Joel Brobecker <brobecker@adacore.com>
2023
2024 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
2025 have_nonsteppable_watchpoint attribute to 1.
2026
2027 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
2028
2029 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
2030 register names.
2031 (struct register_alias): Rename to...
2032 (struct riscv_register_alias): ...this, and update comment.
2033 (riscv_register_aliases): Update type, and alias names. Remove
2034 CSR names from this list.
2035 (riscv_register_name): Use riscv_gdb_reg_names for int and float
2036 register names. Add an extra assertion.
2037 (riscv_is_regnum_a_named_csr): New function.
2038 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
2039
2040 2018-10-23 John Darrington <john@darrington.wattle.id.au>
2041
2042 * configure.tgt: Add configuration for s12z.
2043 * s12z-tdep.c: New file.
2044 * NEWS: Mention new target.
2045
2046 2018-10-22 Jim Wilson <jimw@sifive.com>
2047
2048 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2049 FP reg smaller than FP reg size, and fill with -1 instead of 0.
2050
2051 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2052 (riscv_register_type): Use them.
2053 (riscv_print_one_register_info): Handle union of floats same as float.
2054 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2055 riscv_fpreg_q_type fields.
2056
2057 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
2058
2059 * gdbarch.sh (gdbarch_num_cooked_regs): New.
2060 * gdbarch.h: Re-generate.
2061 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2062 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2063 * eval.c (evaluate_subexp_standard): Likewise.
2064 * findvar.c (value_of_register): Likewise.
2065 (value_of_register_lazy): Likewise.
2066 (address_from_register): Likewise.
2067 * frame.c (get_frame_register_bytes): Likewise.
2068 * gdbarch-selftests.c (register_to_value_test): Likewise.
2069 * h8300-tdep.c (h8300_register_type): Likewise.
2070 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2071 (i386_svr4_reg_to_regnum): Likewise.
2072 * infcmd.c (default_print_registers_info): Likewise.
2073 (registers_info): Likewise.
2074 (print_vector_info): Likewise.
2075 (default_print_float_info): Likewise.
2076 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2077 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2078 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2079 (mi_cmd_data_list_changed_registers): Likewise.
2080 (mi_cmd_data_list_register_values): Likewise.
2081 (mi_cmd_data_write_register_values): Likewise.
2082 (mi_cmd_trace_frame_collected): Likewise.
2083 * mips-tdep.c (print_gp_register_row): Likewise.
2084 (mips_print_registers_info): Likewise.
2085 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2086 * regcache.c (init_regcache_descr): Likewise.
2087 (register_size): Likewise.
2088 (register_dump::dump): Likewise.
2089 (cooked_read_test): Likewise.
2090 (cooked_write_test): Likewise.
2091 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2092 (rs6000_gdbarch_init): Likewise.
2093 * stabsread.c (stab_reg_to_regnum): Likewise.
2094 * stack.c (info_frame_command): Likewise.
2095 * target-descriptions.c (tdesc_register_name): Likewise.
2096 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2097 * tui/tui-regs.c (tui_show_register_group): Likewise.
2098 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2099 (user_reg_map_regnum_to_name): Likewise.
2100 (value_of_user_reg): Likewise.
2101 (maintenance_print_user_registers): Likewise.
2102 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2103 (xtensa_register_name): Likewise.
2104 (xtensa_register_type): Likewise.
2105 (xtensa_reg_to_regnum): Likewise.
2106 (xtensa_pseudo_register_read): Likewise.
2107 (xtensa_pseudo_register_write): Likewise.
2108
2109 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2110
2111 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2112 correctly-sized buffer with raw_read.
2113 (amd64_pseudo_register_write): Use correctly-sized buffer for
2114 raw_read/raw_write.
2115
2116 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2117
2118 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2119 in add_prefix_cmd of set print type.
2120
2121 2018-10-19 Tom Tromey <tom@tromey.com>
2122
2123 PR tui/18388:
2124 * NEWS: Mention tabset deprecation.
2125 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2126 (update_tab_width): New function.
2127 (tui_set_tab_width, tui_show_tab_width): New functions.
2128 (tui_set_tab_width_command): Use update_tab_width.
2129 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
2130 Add new "set tui tab-width" command.
2131 * tui/tui-source.c (tui_set_source_content): Update.
2132 * tui/tui-disasm.c (tui_set_disassem_content): Update.
2133 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2134 Don't declare.
2135 (tui_tab_width): Declare.
2136 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2137 (tui_set_default_tab_len): Remove.
2138
2139 2018-10-19 Tom Tromey <tom@tromey.com>
2140
2141 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2142 (key_is_backspace, tui_getc): Don't declare.
2143 * tui/tui-io.c (key_is_start_sequence): Now static.
2144 (key_is_end_sequence, key_is_backspace): Remove.
2145 (tui_getc): Now static.
2146
2147 2018-10-19 Tom Tromey <tom@tromey.com>
2148
2149 * symfile.c (reread_symbols): Clear "static_links".
2150
2151 2018-10-19 Alan Hayward <alan.hayward@arm.com>
2152
2153 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2154 define.
2155 (aarch64_linux_sigframe_init): Extra boundary checks.
2156
2157 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
2158
2159 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2160 the possibly non-existent tdesc type 'vec128', but the type of raw
2161 register v16 instead.
2162
2163 2018-10-19 Gary Benson <gbenson@redhat.com>
2164
2165 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2166
2167 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
2168
2169 PR cli/23785
2170 * cli/cli-dump.c (restore_binary_file): Check if "file" is
2171 NULL.
2172
2173 2018-10-17 Paul Koning <paul_koning@dell.com>
2174
2175 * charset.c (convert_between_encodings): Fix unsigned overflow.
2176
2177 2018-10-17 John Baldwin <jhb@FreeBSD.org>
2178
2179 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2180 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2181 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2182 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2183 New functions.
2184 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2185 and fbsd_info_proc_mappings_header.
2186 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2187 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2188 New.
2189
2190 2018-10-17 Joel Brobecker <brobecker@adacore.com>
2191
2192 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2193 Solaris Maintainer.
2194
2195 2018-10-15 Tom Tromey <tom@tromey.com>
2196
2197 * tui/tui.c (strcat_to_buf): Remove casts.
2198 * tui/tui-winsource.c (tui_show_source_line)
2199 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2200 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2201 * tui/tui-windata.c (tui_first_data_item_displayed)
2202 (tui_delete_data_content_windows, tui_erase_data_content)
2203 (tui_display_all_data, tui_display_data_from)
2204 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2205 * tui/tui-win.c (tui_set_win_height)
2206 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2207 casts.
2208 * tui/tui-win.c (tui_resize_all): Remove casts.
2209 (tui_scroll_backward_command, tui_set_focus)
2210 (tui_set_tab_width_command): Likewise.
2211 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2212 * tui/tui-regs.c (tui_show_register_group): Remove cast.
2213 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2214 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2215 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2216 Remove casts.
2217
2218 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
2219
2220 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2221 AArch64/ARM maintainer.
2222
2223 2018-10-11 Gary Benson <gbenson@redhat.com>
2224
2225 * interps.h (interp::m_name): Make private and mutable.
2226 * interps.c (interp::~interp): Free m_name.
2227
2228 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2229 Simon Marchi <simark@simark.ca>
2230
2231 * README (`configure' options): Add documentation for new
2232 "--enable-unit-tests" option.
2233 * acinclude.m4: Include "selftest.m4".
2234 * configure: Regenerate.
2235 * configure.ac: Use "GDB_AC_SELFTEST".
2236 * maint.c (maintenance_selftest): Update message informing
2237 that selftests have been disabled.
2238 (maintenance_info_selftests): Likewise.
2239 * selftest.m4: New file.
2240
2241 2018-10-10 Gary Benson <gbenson@redhat.com>
2242
2243 * remote.c (remote_target::remote_send_printf): Add
2244 missing va_end found by Coverity.
2245
2246 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
2247
2248 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2249
2250 2018-10-09 Tom Tromey <tom@tromey.com>
2251
2252 * configure: Rebuild.
2253 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2254 * NEWS: Update --enable-ubsan documentation.
2255
2256 2018-10-09 Gary Benson <gbenson@redhat.com>
2257
2258 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2259 found by Coverity.
2260
2261 2018-10-08 Tom Tromey <tom@tromey.com>
2262
2263 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2264 variable.
2265 (riscv_fbsd_init_abi): Likewise.
2266
2267 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
2268 * valops.c (value_struct_elt_for_reference): Rename local variable
2269 to work around the shadowing a previous local warning.
2270
2271 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2272
2273 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2274 * NEWS: Mention new FreeBSD/riscv native configuration.
2275 * configure.host: Add riscv*-*-freebsd*.
2276 * configure.nat: Likewise.
2277 * riscv-fbsd-nat.c: New file.
2278
2279 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2280
2281 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2282 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2283 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2284 * NEWS: Mention new FreeBSD/riscv target.
2285 * configure.tgt: Add riscv*-*-freebsd*.
2286 * riscv-fbsd-tdep.c: New file.
2287 * riscv-fbsd-tdep.h: New file.
2288
2289 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2290
2291 * regcache.h (struct regcache_map_entry): Note that this type can
2292 be used with traditional frame caches.
2293 * trad-frame.c (trad_frame_set_reg_regmap): New.
2294 * trad-frame.h (trad_frame_set_reg_regmap): New.
2295
2296 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
2297
2298 PR c++/16841
2299 * valops.c (get_virtual_base_offset): New function.
2300 (value_struct_elt_for_reference): Use it to get virtual base offset
2301 and add it in calculating class member address.
2302
2303 2018-10-08 John Darrington <john@darrington.wattle.id.au>
2304
2305 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2306 (check_producer): Check if the producer is codewarrior.
2307 (producer_is_codewarrior): New function.
2308 (lnp_state_machine::record_line): Ignore is_stmt flag for records
2309 produced by codewarrior.
2310 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2311
2312 2018-10-06 Tom Tromey <tom@tromey.com>
2313
2314 PR python/19399:
2315 * python/py-inferior.c: Add "architecture" entry.
2316 (infpy_architecture): New function.
2317
2318 2018-10-06 Tom Tromey <tom@tromey.com>
2319
2320 PR python/21765:
2321 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2322 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2323 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
2324 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2325
2326 2018-10-06 Tom Tromey <tom@tromey.com>
2327
2328 PR build/17077:
2329 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2330 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2331 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2332 #include.
2333
2334 2018-10-06 Tom Tromey <tom@tromey.com>
2335
2336 * python/py-breakpoint.c (bppy_get_location): Handle a
2337 bp_breakpoint without a location.
2338
2339 2018-10-06 Tom Tromey <tom@tromey.com>
2340
2341 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2342 (_RegEx): Reformat help text.
2343 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2344 (AnyCallerIs, AnyCallerMatches): Reformat help text.
2345 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2346 text.
2347 * python/lib/gdb/command/xmethods.py (InfoXMethod)
2348 (EnableXMethod, DisableXMethod): Remove help indentation.
2349 Capitalize meta-syntactic variables.
2350 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2351 (EnableUnwinder, DisableUnwinder): Remove help indentation.
2352 Capitalize meta-syntactic variables.
2353 * python/lib/gdb/command/explore.py (ExploreCommand)
2354 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2355 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2356 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2357 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2358 Remove help indentation.
2359 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2360 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2361 (DisableFrameFilter, SetFrameFilterPriority)
2362 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2363
2364 2018-10-06 Tom Tromey <tom@tromey.com>
2365
2366 PR tui/28819:
2367 * tui/tui-io.c (gdb_wgetch): New function.
2368 (tui_mld_getc, tui_getc): Use it.
2369
2370 2018-10-05 Tom Tromey <tom@tromey.com>
2371
2372 * sol-thread.c (sol_thread_target::wait): Rename inner
2373 "save_ptid".
2374
2375 2018-10-04 Tom Tromey <tom@tromey.com>
2376
2377 * configure: Rebuild.
2378 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2379
2380 2018-10-04 Tom Tromey <tom@tromey.com>
2381
2382 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2383 declaration of "block".
2384
2385 2018-10-04 Tom Tromey <tom@tromey.com>
2386
2387 * common/filestuff.c (fdwalk): Remove inner declaration of
2388 "result".
2389
2390 2018-10-04 Tom Tromey <tom@tromey.com>
2391
2392 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2393 "structs_addr" and hoist declaration.
2394
2395 2018-10-04 Tom Tromey <tom@tromey.com>
2396
2397 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2398 variable "size".
2399
2400 2018-10-04 Tom Tromey <tom@tromey.com>
2401
2402 * mdebugread.c (parse_partial_symbols): Use std::string.
2403
2404 2018-10-04 Tom Tromey <tom@tromey.com>
2405
2406 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2407 * p-valprint.c (pascal_val_print): Split inner "i" variable.
2408 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2409 header.
2410 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2411 more inner scope.
2412 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2413 * varobj.c (varobj_update): Rename inner "newobj",
2414 "type_changed".
2415 * valprint.c (generic_emit_char): Rename inner "buf".
2416 * valops.c (find_overload_match): Rename inner "temp".
2417 (value_struct_elt_for_reference): Declare "v" in more inner
2418 scope.
2419 * v850-tdep.c (v850_push_dummy_call): Rename "len".
2420 * unittests/array-view-selftests.c (run_tests): Rename inner
2421 "vec".
2422 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2423 header.
2424 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2425 "tsv" in more inner scope.
2426 (print_one_static_tracepoint_marker): Rename inner
2427 "tuple_emitter".
2428 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2429 (tic6x_push_dummy_call): Don't redeclare "addr".
2430 * target-float.c: Declare "dto" lower.
2431 * symtab.c (lookup_local_symbol): Rename inner "sym".
2432 (find_pc_sect_line): Rename inner "pc".
2433 * stack.c (print_frame): Don't redeclare "gdbarch".
2434 (return_command): Rename inner "gdbarch".
2435 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2436 "sp".
2437 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2438 header.
2439 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2440 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2441 scope.
2442 * remote.c (remote_target::update_thread_list): Don't redeclare
2443 "tp".
2444 (remote_target::process_initial_stop_replies): Rename inner
2445 "thread".
2446 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2447 (remote_target::wait_as): Don't redeclare "stop_reply".
2448 (remote_target::get_thread_local_address): Rename inner
2449 "result".
2450 (remote_target::get_tib_address): Likewise.
2451
2452 * regcache.c (cooked_read_test): Rename "regnum".
2453 * record-btrace.c (cmd_record_btrace_start): Rename inner
2454 "exception".
2455 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2456 loop header.
2457 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2458 header.
2459 (ppu2spu_sniffer): Rename inner "buf".
2460 * parse.c (operator_check_standard): Rename inner "type",
2461 "objfile".
2462 * p-valprint.c (pascal_val_print): Introduce new scope for
2463 "low_bound", "high_bound".
2464 * p-exp.y (yylex): Declare "i" in loop header.
2465 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2466 Lower declaration of "s".
2467 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2468 header.
2469 (nios2_push_dummy_call): Rename "len".
2470 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2471 "buf".
2472 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2473 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2474 (linux_xfer_osdata_modules): Likewise.
2475 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2476 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2477 (mips_o64_push_dummy_call): Likewise.
2478 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2479 "op".
2480 * mi/mi-main.c (list_available_thread_groups): Rename inner
2481 "tuple_emitter".
2482 (mi_cmd_data_read_memory): Rename inner "opts".
2483 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2484 "tuple_emitter".
2485 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2486 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
2487 more inner scope.
2488 (parse_partial_symbols): Rename inner "pst", "p", "name"
2489 * main.c (captured_main_1): Rename inner "i"s.
2490 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2491 "oso2".
2492 * linux-tdep.c (linux_info_proc): Rename inner "filename".
2493 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2494 * infrun.c (handle_no_resumed): Don't redeclare "thread".
2495 (handle_signal_stop): Rename inner "gdbarch".
2496 (handle_command): Declare "signum" in loop header.
2497 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2498 "status".
2499 (examine_prologue): Rename inner "sol" and "sof".
2500 (ia64_extract_return_value): Rename inner "val". Declare another
2501 "val" in a more inner scope.
2502 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2503 inner scope.
2504 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2505 "except".
2506 * findvar.c (default_read_var_value): Don't redeclare "addr".
2507 * f-exp.y (yylex): Declare "i" in loop header.
2508 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2509 Rename inner "type", "expect_type".
2510 (evaluate_subexp_for_sizeof): Rename inner "pc".
2511 * elfread.c (elf_symfile_read): Rename inner "abfd".
2512 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2513 "bytes_read".
2514 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2515 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2516 (dwarf_decode_line_header): Rename inner "lh".
2517 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2518 "offset". Declare "i" in loop header.
2519 (disassemble_dwarf_expression): Rename inner "addr_size".
2520 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2521 inner "result".
2522 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2523 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2524 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2525 "inner_list_emitter".
2526 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2527 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2528 declaration in a block.
2529 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2530 * cp-valprint.c (cp_print_value_fields): Don't redeclare
2531 "obstack_final_size".
2532 * cp-support.c (inspect_type): Declare "i" in loop header.
2533 * compile/compile.c (compile_instance::insert_symbol_error):
2534 Rename inner "e".
2535 * common/agent.c (agent_run_command): Remove inner "ret"
2536 declaration.
2537 * coffread.c (coff_symfile_read): Rename inner "name".
2538 (coff_symfile_read): Rename inner "abfd".
2539 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2540 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2541 "high".
2542 * c-exp.y (lex_one_token): Move "len" declaration lower.
2543 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2544 "gdbarch".
2545 (create_exception_master_breakpoint): Likewise. Don't redeclare
2546 "b".
2547 (watch_command_1): Declare "mark" later.
2548 (clear_command): Don't shadow "a" or "b".
2549 (delete_command): Rename inner "b".
2550 (delete_trace_command): Likewise.
2551 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2552 "op".
2553 (arm_gdbarch_init): Remove inner "e_flags".
2554 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2555 "offset" in inner blocks.
2556
2557 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
2558
2559 * dwarf-index-write.c (file_write): Don't write if the vector is
2560 empty.
2561
2562 2018-10-05 Tom de Vries <tdevries@suse.de>
2563
2564 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2565 PyArg_ParseTuple call.
2566
2567 2018-10-05 Tom de Vries <tdevries@suse.de>
2568
2569 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2570 PyArg_ParseTuple call.
2571
2572 2018-10-04 Joel Brobecker <brobecker@adacore.com>
2573
2574 * psymtab.c (recursively_search_psymtabs): Reformat parameters
2575 to avoid exceeding 80 characters per line limit.
2576
2577 2018-10-04 Tom Tromey <tom@tromey.com>
2578
2579 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2580 (reread_symbols): Update.
2581 * complaints.h (clear_complaints): Remove argument.
2582 * complaints.c (enum complaint_series): Remove.
2583 (series): Remove global.
2584 (complaint_internal): Update.
2585 (clear_complaints): Remove argument.
2586
2587 2018-10-04 Tom Tromey <tom@tromey.com>
2588
2589 * symfile.c (symbol_file_add_with_addrs): Do not print "no
2590 debugging symbols" message if there is a separate debug objfile.
2591
2592 2018-10-04 Tom Tromey <tom@tromey.com>
2593
2594 PR cli/19551:
2595 * symfile.c (symbol_file_add_with_addrs): Update output.
2596 * psymtab.c (require_partial_symbols): Update output.
2597
2598 2018-10-04 Tom Tromey <tom@tromey.com>
2599
2600 PR cli/22234:
2601 * complaints.c: Emit \n.
2602
2603 2018-10-04 Tom Tromey <tom@tromey.com>
2604
2605 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2606 (separate_debug_file_exists, find_separate_debug_file)
2607 (add_symbol_file_command, reread_symbols, allocate_symtab)
2608 (allocate_compunit_symtab): Use filtered printing, not
2609 unfiltered.
2610 * psymtab.c (require_partial_symbols, dump_psymtab)
2611 (allocate_psymtab): Use filtered printing, not unfiltered.
2612
2613 2018-10-04 Tom Tromey <tom@tromey.com>
2614
2615 * complaints.c (complaint_internal): Correctly check complaint
2616 count.
2617
2618 2018-10-04 Tom Tromey <tom@tromey.com>
2619
2620 * complaints.h (struct complaints): Remove declaration.
2621 * complaints.c (clear_complaints): Remove an unused variable.
2622
2623 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2624
2625 * MAINTAINERS (Write After Approval): Add self.
2626
2627 2018-10-03 Tom Tromey <tom@tromey.com>
2628
2629 * guile/scm-value.c (gdbscm_value_to_string): Initialize
2630 "buffer_contents".
2631 * coffread.c (coff_symtab_read): Initialize "newobj".
2632
2633 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
2634
2635 * dwarf2read.c (read_func_scope): Remove struct keyword in
2636 range-based for.
2637
2638 2018-10-03 Tom Tromey <tom@tromey.com>
2639
2640 * README: Mention --enable-ubsan.
2641 * NEWS: Mention --enable-ubsan.
2642 * acinclude.m4: Include sanitize.m4.
2643 * configure: Rebuild.
2644 * configure.ac: Call AM_GDB_UBSAN.
2645 * sanitize.m4: New file.
2646
2647 2018-10-03 Tom Tromey <tom@tromey.com>
2648
2649 * expression.h (enum exp_opcode): Use uint8_t as base type.
2650 * expprint.c (op_name): Handle invalid opcodes.
2651
2652 2018-10-03 Tom Tromey <tom@tromey.com>
2653
2654 * parse.c (prefixify_expression): Add assert.
2655 (parse_exp_in_context_1): Throw exception if the expression is
2656 empty.
2657
2658 2018-10-03 Tom Tromey <tom@tromey.com>
2659
2660 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2661
2662 2018-10-03 Tom Tromey <tom@tromey.com>
2663
2664 * c-exp.y (parse_number): Work in unsigned. Remove casts.
2665
2666 2018-10-03 Tom Tromey <tom@tromey.com>
2667
2668 * dwarf2read.c (read_subrange_type): Make "negative_mask"
2669 unsigned.
2670
2671 2018-10-03 Tom Tromey <tom@tromey.com>
2672
2673 * findvar.c (extract_integer): Do work in an unsigned type.
2674
2675 2018-10-03 Tom Tromey <tom@tromey.com>
2676
2677 * common/enum-flags.h (enum_flags::operator~): Add static assert.
2678 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2679 base type.
2680 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2681 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2682 type.
2683 * c-lang.h (enum c_string_type_values): Use unsigned as base
2684 type.
2685 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2686
2687 2018-10-03 Tom Tromey <tom@tromey.com>
2688
2689 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2690 <~dwarf2_frame_state_reg_info>: Update.
2691 <dwarf2_frame_state_reg_info>: Update.
2692 <alloc_regs>: Add assertion. Update.
2693 <reg>: Now a std::vector.
2694 <num_regs>: Remove.
2695 <swap>: Update.
2696 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2697 (execute_cfa_program_test, dwarf2_frame_cache): Update.
2698
2699 2018-10-03 Tom Tromey <tom@tromey.com>
2700
2701 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2702
2703 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2704
2705 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2706
2707 2018-10-02 Tom Tromey <tom@tromey.com>
2708
2709 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2710
2711 2018-10-02 John Darrington <john@darrington.wattle.id.au>
2712
2713 * NEWS: Mention changed commands.
2714 * ser-uds.c: New file.
2715 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2716 * configure: Regenerate.
2717 * Makefile.in: Add new file.
2718 * serial.c (serial_open): Check if filename is a socket
2719 and lookup the appropriate interface accordingly.
2720
2721 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2722
2723 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2724 define.
2725 (AARCH64_EXTRA_MAGIC): Likewise.
2726 (AARCH64_FPSIMD_MAGIC): Likewise.
2727 (AARCH64_SVE_MAGIC): Likewise.
2728 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2729 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2730 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2731 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2732 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2733 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2734 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2735 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2736 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2737 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2738 (read_aarch64_ctx): Add function.
2739 (aarch64_linux_sigframe_init): Detect FP registers.
2740
2741 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2742
2743 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2744 (AARCH64_D0_REGNUM): Likewise.
2745 (AARCH64_S0_REGNUM): Likewise.
2746 (AARCH64_H0_REGNUM): Likewise.
2747 (AARCH64_B0_REGNUM): Likewise.
2748 (AARCH64_SVE_V0_REGNUM): Likewise.
2749 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2750 (AARCH64_D0_REGNUM): Likewise.
2751 (AARCH64_S0_REGNUM): Likewise.
2752 (AARCH64_H0_REGNUM): Likewise.
2753 (AARCH64_B0_REGNUM): Likewise.
2754 (AARCH64_SVE_V0_REGNUM): Likewise.
2755
2756 2018-10-01 Gary Benson <gbenson@redhat.com>
2757
2758 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2759 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2760 prfpregset_t instead of gdb_prfpregset_t.
2761 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2762 * configure, config.in: Rebuild.
2763
2764 2018-10-01 Gary Benson <gbenson@redhat.com>
2765
2766 * common/gdb_proc_service.h: New file, factored out from...
2767 * gdb_proc_service.h: Moved common code to the above file.
2768 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2769
2770 2018-10-01 Gary Benson <gbenson@redhat.com>
2771
2772 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2773 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
2774
2775 2018-10-01 Gary Benson <gbenson@redhat.com>
2776
2777 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2778 (AC_CHECK_HEADERS): Check for linux/elf.h.
2779 * configure, config.in: Rebuild.
2780 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2781 doesn't define elf_fpregset_t.
2782
2783 2018-10-01 Gary Benson <gbenson@redhat.com>
2784
2785 * gdb_proc_service.h: Whitespace change.
2786
2787 2018-10-01 Tom Tromey <tom@tromey.com>
2788
2789 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2790 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2791 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2792
2793 2018-10-01 Tom Tromey <tom@tromey.com>
2794
2795 * README: Minor change.
2796
2797 2018-09-30 Pedro Alves <palves@redhat.com>
2798
2799 * darwin-nat-info.c (darwin_debug_regions_recurse)
2800 (info_mach_exceptions_command): Remove unused local variables.
2801 * darwin-nat.c (darwin_decode_notify_message)
2802 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2803 (darwin_stop_inferior, darwin_setup_exceptions)
2804 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2805 (darwin_nat_target::attach, darwin_nat_target::detach)
2806 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2807 local variables.
2808 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2809 variables.
2810
2811 2018-09-29 Tom Tromey <tom@tromey.com>
2812
2813 * README: Remove some leftover text.
2814
2815 2018-09-29 Tom Tromey <tom@tromey.com>
2816
2817 * PROBLEMS: Rewrite.
2818 * README: Update.
2819
2820 2018-09-28 John Baldwin <jhb@FreeBSD.org>
2821
2822 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2823 case with explicit breakpoint kind.
2824 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2825 'additional_info' and related logic.
2826 (riscv_debug_breakpoints): New variable.
2827 (riscv_breakpoint_kind_from_pc): Use the length of the existing
2828 instruction to determine the breakpoint kind.
2829 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2830 flag. Update description of 'set/show riscv
2831 use-compressed-breakpoints' flag.
2832
2833 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
2834
2835 (NEWS): Mention changes to frame related commands.
2836 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2837 (add_prefix_cmd_suppress_notification): New function.
2838 (add_com_suppress_notification): Call
2839 add_cmd_suppress_notification.
2840 * command.h (add_cmd_suppress_notification): Declare.
2841 (add_prefix_cmd_suppress_notification): Declare.
2842 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2843 (parse_frame_specification): Moved from stack.c, with
2844 simplification to handle a single argument.
2845 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2846 switch to the selected frame. Add a header comment.
2847 * stack.c: Remove 'safe-ctype.h' include.
2848 (find_frame_for_function): Add declaration.
2849 (find_frame_for_address): New function.
2850 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2851 (frame_selection_by_function_completer): New function.
2852 (info_frame_command): Rename to...
2853 (info_frame_command_core): ...this, and update parameter types.
2854 (select_frame_command): Rename to...
2855 (select_frame_command_core): ...this, and update parameter types.
2856 (frame_command): Rename to...
2857 (frame_command_core): ...this, and update parameter types.
2858 (class frame_command_helper): New class to wrap implementations of
2859 frame related sub-commands.
2860 (frame_apply_cmd_list): New static global.
2861 (frame_cmd_list): Make static.
2862 (select_frame_cmd_list): New global for sub-commands.
2863 (info_frame_cmd_list): New global for sub-commands.
2864 (_initialize_stack): Register sub-commands for 'frame',
2865 'select-frame', and 'info frame'. Update 'frame apply' commands
2866 to use frame_apply_cmd_list. Move function local static
2867 frame_apply_list to file static frame_apply_cmd_list for
2868 consistency.
2869 * stack.h (select_frame_command): Delete declarationn.
2870 (select_frame_for_mi): Declare new function.
2871
2872 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
2873
2874 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2875 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2876 and NOP.
2877
2878 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
2879
2880 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2881
2882 2018-09-26 Tom Tromey <tom@tromey.com>
2883
2884 * valops.c (auto_abandon): Remove dead code.
2885
2886 2018-09-26 Tom Tromey <tom@tromey.com>
2887
2888 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2889
2890 2018-09-24 Tom Tromey <tom@tromey.com>
2891
2892 * common/pathstuff.c (get_standard_cache_dir): Make
2893 "xdg_cache_home" and "home" const.
2894 * top.c (init_history): Make "tmpenv" const.
2895 * main.c (get_init_files): Make "homedir" const.
2896
2897 2018-09-23 Tom Tromey <tom@tromey.com>
2898
2899 PR python/18852:
2900 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2901
2902 2018-09-23 Tom Tromey <tom@tromey.com>
2903
2904 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2905 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2906 * python/python-internal.h (gdbpy_handle_exception): Declare.
2907 * python/py-utils.c (gdbpy_handle_exception): New function.
2908
2909 2018-09-23 Tom Tromey <tom@tromey.com>
2910
2911 PR python/17284:
2912 * python/py-type.c (typy_template_argument): Check for negative
2913 argument number.
2914
2915 2018-09-23 Tom Tromey <tom@tromey.com>
2916
2917 PR python/14062:
2918 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2919
2920 2018-09-23 Tom Tromey <tom@tromey.com>
2921
2922 PR python/18170:
2923 * python/py-value.c (valpy_int): Allow conversion from pointer
2924 type.
2925
2926 2018-09-23 Tom Tromey <tom@tromey.com>
2927
2928 PR python/20126:
2929 * python/py-value.c (valpy_int): Respect type sign.
2930
2931 2018-09-23 Tom Tromey <tom@tromey.com>
2932
2933 PR python/18352;
2934 * python/py-value.c (valpy_float): Allow conversions from int or
2935 char.
2936 (valpy_int, valpy_long): Allow conversions from float.
2937
2938 2018-09-23 Tom Tromey <tom@tromey.com>
2939
2940 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2941 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2942
2943 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2944
2945 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2946 __sighndlr.
2947 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2948
2949 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
2950
2951 * windows-nat.c (windows_nat_target::wait): Remove a spurious
2952 target_terminal::ours().
2953
2954 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
2955
2956 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2957 of vl to ULONGEST.
2958
2959 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
2960
2961 * breakpoint.c (update_inserted_breakpoint_locations): Remove
2962 redundant condition.
2963
2964 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2965
2966 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2967
2968 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2969 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
2970 * sol-thread.c (ps_pdmodel): Don't guard definition.
2971
2972 * procfs.c: Fix formatting.
2973
2974 * procfs.c (sysset_t_alloc): Remove.
2975 (create_procinfo): Use XNEW instead of sysset_t_alloc.
2976 (procfs_debug_inferior): Likewise.
2977 (procfs_set_exec_trap): Likewise.
2978 (proc_set_traced_sysentry): Don't allocate argp dynamically.
2979 (proc_set_traced_sysexit): Likewise.
2980
2981 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2982 (dead_procinfo): Likewise.
2983 (proc_warn): Likewise.
2984 (proc_error): Likewise.
2985 (proc_get_LDT_entry): Likewise.
2986 (do_attach): Likewise.
2987 (procfs_target::pid_to_str): Likewise.
2988 (iterate_over_mappings): Likewise.
2989
2990 * procfs.c (create_procinfo): Fix ARI warning.
2991 (proc_get_status): Likewise.
2992 (proc_stop_process): Likewise.
2993 (proc_run_process): Likewise.
2994 (proc_kill): Likewise.
2995 (proc_get_LDT_entry): Likewise.
2996 (procfs_find_LDT_entry): Likewise.
2997 (proc_update_threads): Likewise.
2998 (proc_iterate_over_threads): Likewise.
2999 (do_attach): Likewise.
3000 (procfs_xfer_memory): Likewise.
3001 (invalidate_cache): Likewise.
3002 (procfs_target::resume): Likewise.
3003 (procfs_init_inferior): Likewise.
3004 (procfs_set_exec_trap): Likewise.
3005 (procfs_target::thread_alive): Likewise.
3006 (procfs_target::pid_to_exec_file): Likewise.
3007 (iterate_over_mappings): Likewise.
3008 (procfs_target::make_corefile_notes): Likewise.
3009 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
3010
3011 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
3012 (procfs_find_LDT_entry): Likewise.
3013 * sol-thread.c (ps_lgetLDT): Likewise.
3014
3015 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3016
3017 PR tdep/17903
3018 * procfs.c (procfs_target): Declare pid_to_exec_file.
3019 (procfs_target::pid_to_exec_file): New.
3020
3021 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3022
3023 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
3024 renaming.
3025 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
3026 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
3027
3028 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3029
3030 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
3031 (supply_fpregset, fill_fpregset): Move ...
3032 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
3033 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
3034 Remove references to ioctl-based procfs.
3035 Include <sys/reg.h>.
3036 Remove PR_MODEL_NATIVE guards.
3037 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
3038 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
3039
3040 2018-09-19 Xavier Roirand <roirand@adacore.com>
3041
3042 PR gdb/20981:
3043 * solib-darwin.c (darwin_get_dyld_bfd): New function.
3044 (darwin_solib_get_all_image_info_addr_at_init): Update call.
3045 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3046
3047 2018-09-19 John Baldwin <jhb@FreeBSD.org>
3048
3049 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3050 (fbsd_print_sockaddr_in6): Likewise.
3051
3052 2018-09-19 Richard Bunt <richard.bunt@arm.com>
3053 Chris January <chris.january@arm.com>
3054
3055 * eval.c (skip_undetermined_arglist): Skip argument list helper.
3056 (evaluate_subexp_standard): Return a dummy type when
3057 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3058 OP_F77_UNDETERMINED_ARGLIST case.
3059 * expression.h (enum noside): Update comment.
3060
3061 2018-09-19 George Vasick <george.vasick@oracle.com>
3062
3063 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3064
3065 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
3066 April Chin <april.chin@oracle.com>
3067 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3068
3069 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3070 uint_t lwpid_t.
3071 (create_procinfo): Print pids in /proc without leading zeros.
3072
3073 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
3074
3075 * nios2-tdep.c (nios2_gcc_target_options): New.
3076 (nios2_gdb_arch_init): Install new hook.
3077
3078 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
3079
3080 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3081 New file.
3082 * update-gnulib.sh: Apply patch.
3083 * configure: Re-generate.
3084
3085 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3086
3087 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3088 description. Make "info proc" command descriptions more
3089 consistent.
3090
3091 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3092
3093 * NEWS: Mention 'info proc files' command.
3094
3095 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3096
3097 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3098 descriptors for IP_FILES and IP_ALL.
3099
3100 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3101
3102 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3103 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3104 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3105 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3106 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3107 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3108 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3109 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3110 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3111 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3112 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3113 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3114 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3115 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3116 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3117 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3118 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3119 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3120 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3121 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3122 (struct fbsd_sockaddr_un): New types.
3123 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3124 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3125 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3126 (fbsd_core_info_proc_files): New functions.
3127 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3128 IP_ALL.
3129 * fbsd-tdep.h (fbsd_info_proc_files_header)
3130 (fbsd_info_proc_files_entry): New.
3131
3132 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3133
3134 * defs.h (enum info_proc_what) [IP_FILES]: New value.
3135 * infcmd.c (info_proc_cmd_files): New function.
3136 (_initialize_infcmd): Register 'info proc files' command.
3137
3138 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3139
3140 * gnulib/aclocal-m4-deps.mk: Re-generate.
3141 * gnulib/aclocal.m4: Re-generate.
3142 * gnulib/config.in: Re-generate.
3143 * gnulib/configure: Re-generate.
3144 * gnulib/import/Makefile.am: Re-generate.
3145 * gnulib/import/Makefile.in: Re-generate.
3146 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3147 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3148 * gnulib/import/arpa_inet.in.h: New file.
3149 * gnulib/import/inet_ntop.c: New file.
3150 * gnulib/import/m4/arpa_inet_h.m4: New file.
3151 * gnulib/import/m4/inet_ntop.m4: New file.
3152 * gnulib/import/m4/netinet_in_h.m4: New file.
3153 * gnulib/import/m4/socklen.m4: New file.
3154 * gnulib/import/m4/sockpfaf.m4: New file.
3155 * gnulib/import/m4/stdalign.m4: New file.
3156 * gnulib/import/m4/sys_uio_h.m4: New file.
3157 * gnulib/import/netinet_in.in.h: New file.
3158 * gnulib/import/stdalign.in.h: New file.
3159 * gnulib/import/sys_socket.c: New file.
3160 * gnulib/import/sys_socket.in.h: New file.
3161 * gnulib/import/sys_uio.in.h: New file.
3162 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3163 module.
3164
3165 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3166
3167 * gnulib/aclocal-m4-deps.mk: New file.
3168 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3169 deterministically.
3170
3171 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3172
3173 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3174 KVE_PATH.
3175
3176 2018-09-18 Tom Tromey <tom@tromey.com>
3177
3178 * compile/compile-object-load.c (struct
3179 link_hash_table_cleanup_data): Add constructor and destructor.
3180 Use DISABLE_COPY_AND_ASSIGN.
3181 (~link_hash_table_cleanup_data): Rename from
3182 link_hash_table_free. Now a destructor.
3183 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
3184
3185 2018-09-18 Tom Tromey <tom@tromey.com>
3186
3187 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3188 * compile/compile-object-load.c (struct munmap_list): Move to
3189 header file.
3190 (munmap_list::add): Rename from munmap_list_add; rewrite.
3191 (munmap_list::~munmap_list): Rename from munmap_list_free.
3192 (munmap_listp_free_cleanup): Remove.
3193 (compile_object_load): Update.
3194 * compile/compile-object-load.h (struct munmap_list): Move from
3195 compile-object-load.c. Rewrite.
3196
3197 2018-09-18 Alan Hayward <alan.hayward@arm.com>
3198
3199 * aarch64-tdep.c (pass_in_v): Use register size.
3200 (aarch64_extract_return_value): Likewise.
3201 (aarch64_store_return_value): Likewise.
3202
3203 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3204
3205 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3206 rlim_t.
3207
3208 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3209
3210 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3211 Fix short help line.
3212
3213 2018-09-17 Tom Tromey <tom@tromey.com>
3214
3215 PR python/20445:
3216 * configure: Rebuild.
3217 * configure.ac: Conditionally use -DNDEBUG for Python.
3218
3219 2018-09-17 Tom Tromey <tom@tromey.com>
3220
3221 * configure: Rebuild.
3222 * configure.ac: Use gmp as a library dependency when checking for
3223 mpfr.
3224
3225 2018-09-17 Pedro Alves <palves@redhat.com>
3226
3227 * python/py-inferior.c (find_inferior_object): Delete.
3228
3229 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
3230
3231 * compile/compile-cplus-types.c
3232 (compile_cplus_instance::enter_scope): Don't use new_scope after
3233 std::move.
3234
3235 2018-09-17 Tom Tromey <tom@tromey.com>
3236
3237 * common/pathstuff.c (get_standard_cache_dir): Use
3238 ~/Library/Caches on macOS.
3239 * common/pathstuff.h (get_standard_cache_dir): Update comment.
3240
3241 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
3242
3243 PR python/23669
3244 * breakpoint.c (commands_cmd_element): New.
3245 (_initialize_breakpoint): Assign commands_cmd_element.
3246 * breakpoint.h (commands_cmd_element): New.
3247 * cli/cli-script.c (while_cmd_element, if_command,
3248 define_cmd_element): New.
3249 (command_name_equals): Remove.
3250 (process_next_line): Compare commands by pointer, not by name.
3251 (_initialize_cli_script): Assign the various cmd_list_element
3252 variables.
3253 * compile/compile.c (compile_cmd_element): New.
3254 (_initialize_compile): Assign compile_cmd_element.
3255 * compile/compile.h (compile_cmd_element): New.
3256 * guile/guile.c (guile_cmd_element): New.
3257 (install_gdb_commands): Assign guile_cmd_element.
3258 * guile/guile.h (guile_cmd_element): New.
3259 * python/python.c (python_cmd_element): New.
3260 (_initialize_python): Assign python_cmd_element.
3261 * python/python.h (python_cmd_element): New.
3262 * tracepoint.c (while_stepping_cmd_element): New.
3263 (_initialize_tracepoint): Assign while_stepping_cmd_element.
3264 * tracepoint.h (while_stepping_cmd_element): New.
3265
3266 2018-09-17 Tom Tromey <tom@tromey.com>
3267
3268 * infrun.c (save_infcall_suspend_state): Return
3269 infcall_suspend_state_up.
3270 (save_infcall_control_state): Return infcall_control_state_up.
3271 * inferior.h (save_infcall_suspend_state)
3272 (save_infcall_control_state): Declare later. Return unique
3273 pointers.
3274
3275 2018-09-17 Tom Tromey <tom@tromey.com>
3276
3277 * infrun.c (struct stop_context): Declare constructor,
3278 destructor, "changed" method.
3279 (stop_context::stop_context): Rename from save_stop_context.
3280 (stop_context::~stop_context): Rename from
3281 release_stop_context_cleanup.
3282 (normal_stop): Update.
3283 (stop_context::changed): Rename from stop_context_changed. Return
3284 bool.
3285
3286 2018-09-17 Tom Tromey <tom@tromey.com>
3287
3288 * inferior.h (struct infcall_suspend_state_deleter): New.
3289 (infcall_suspend_state_up): New typedef.
3290 (struct infcall_control_state_deleter): New.
3291 (infcall_control_state_up): New typedef.
3292 (make_cleanup_restore_infcall_suspend_state)
3293 (make_cleanup_restore_infcall_control_state): Don't declare.
3294 * infcall.c (call_function_by_hand_dummy): Update.
3295 * infrun.c (do_restore_infcall_suspend_state_cleanup)
3296 (make_cleanup_restore_infcall_suspend_state): Remove.
3297 (do_restore_infcall_control_state_cleanup)
3298 (make_cleanup_restore_infcall_control_state): Remove.
3299
3300 2018-09-17 Tom Tromey <tom@tromey.com>
3301
3302 * gdbthread.h (struct thread_control_state): Add initializer.
3303 (class thread_info) <control>: Remove initializer.
3304 * inferior.h (struct inferior_control_state): Add initializer.
3305 (class inferior) <control>: Remove initializer.
3306 (exit_inferior_1): Update.
3307 * infrun.c (struct infcall_control_state): Add constructors.
3308 (save_infcall_control_state): Use new.
3309 (restore_infcall_control_state, discard_infcall_control_state):
3310 Use delete.
3311
3312 2018-09-17 Tom Tromey <tom@tromey.com>
3313
3314 * infrun.c (struct infcall_suspend_state) <registers>: Now a
3315 unique_ptr.
3316 <siginfo_data>: Now a unique_xmalloc_ptr.
3317 (save_infcall_suspend_state, restore_infcall_suspend_state)
3318 (discard_infcall_suspend_state)
3319 (get_infcall_suspend_state_regcache): Update.
3320
3321 2018-09-17 Tom Tromey <tom@tromey.com>
3322
3323 * gdbthread.h (struct thread_suspend_state): Add initializers.
3324 (class thread_info) <suspend>: Remove initializer.
3325 * infrun.c (struct infcall_suspend_state): Add initializers.
3326 (save_infcall_suspend_state): Use new.
3327 (discard_infcall_suspend_state): Use delete.
3328
3329 2018-09-16 Tom Tromey <tom@tromey.com>
3330
3331 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3332 Remove.
3333 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3334 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3335 (py_varobj_iter_new): Likewise.
3336 (py_varobj_get_iterator): Use gdbpy_ref.
3337
3338 2018-09-16 Tom Tromey <tom@tromey.com>
3339
3340 * python/py-threadevent.c (py_get_event_thread): Simplify.
3341 * python/py-inferior.c (infpy_thread_from_thread_handle):
3342 Return immediately after calling thread_to_thread_object. Use
3343 Py_RETURN_NONE.
3344 (thread_to_thread_object): Set the exception on a NULL return.
3345
3346 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
3347
3348 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3349
3350 2018-09-16 Tom Tromey <tom@tromey.com>
3351
3352 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3353 Remove.
3354
3355 2018-09-16 Tom Tromey <tom@tromey.com>
3356
3357 * python/python-internal.h (thread_to_thread_object): Change
3358 return type.
3359 * python/py-inferior.c (thread_to_thread_object): Return a new
3360 reference.
3361 (infpy_thread_from_thread_handle): Update.
3362 * python/py-infthread.c (gdbpy_selected_thread): Update.
3363 * python/py-stopevent.c (create_stop_event_object): Update.
3364 * python/py-threadevent.c (py_get_event_thread): Return a new
3365 reference.
3366 (py_get_event_thread): Update.
3367 * python/py-event.h (py_get_event_thread): Change return type.
3368 * python/py-continueevent.c (create_continue_event_object):
3369 Update.
3370
3371 2018-09-16 Tom Tromey <tom@tromey.com>
3372
3373 * python/py-progspace.c (pspy_get_objfiles): Update.
3374 * python/python-internal.h (objfile_to_objfile_object): Change
3375 return type.
3376 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3377 Update.
3378 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3379 Update.
3380 * python/python.c (gdbpy_get_current_objfile): Update.
3381 (gdbpy_objfiles): Update.
3382 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3383 Update.
3384 (objfile_to_objfile_object): Return a new reference.
3385 * python/py-symtab.c (stpy_get_objfile): Update.
3386 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3387 Update.
3388
3389 2018-09-16 Tom Tromey <tom@tromey.com>
3390
3391 * python/py-inferior.c (infpy_get_progspace): Update.
3392 * python/python-internal.h (pspace_to_pspace_object): Change
3393 return type.
3394 * python/py-newobjfileevent.c
3395 (create_clear_objfiles_event_object): Update.
3396 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3397 Update.
3398 * python/python.c (gdbpy_get_current_progspace): Update.
3399 (gdbpy_progspaces): Update.
3400 * python/py-progspace.c (pspace_to_pspace_object): Return a new
3401 reference.
3402 * python/py-objfile.c (objfpy_get_progspace): Update.
3403 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3404 Update.
3405
3406 2018-09-16 Tom Tromey <tom@tromey.com>
3407
3408 * python/lib/gdb/__init__.py (current_progspace, objfiles)
3409 (solib_name, block_for_pc, find_pc_line): New functions.
3410 (execute_unwinders): Update.
3411 * python/py-block.c (gdbpy_block_for_pc): Remove.
3412 * python/py-inferior.c (infpy_get_progspace): New function.
3413 (inferior_object_getset) <progspace>: Add.
3414 * python/py-progspace.c (pspy_objfiles): Rewrite.
3415 (pspy_solib_name, pspy_block_for_pc)
3416 (pspy_find_pc_line, pspy_is_valid): New functions.
3417 (progspace_object_methods): Add entries for solib_name,
3418 block_for_pc, find_pc_line, is_valid.
3419 * python/python-internal.h (gdbpy_block_for_pc)
3420 (build_objfiles_list): Don't declare.
3421 * python/python.c: Don't include solib.h.
3422 (gdbpy_solib_name, gdbpy_find_pc_line)
3423 (gdbpy_get_current_progspace, build_objfiles_list)
3424 (gdbpy_objfiles): Remove.
3425 (GdbMethods) <current_progspace, objfiles, block_for_pc,
3426 solib_name, find_pc_line>: Remove entries.
3427
3428 2018-09-16 Tom Tromey <tom@tromey.com>
3429
3430 * top.c (new_ui_command): Use GNU style for metasyntactic
3431 variables.
3432 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3433 variables.
3434 * maint.c (maintenance_translate_address): Remove "<>" around
3435 text.
3436 * interps.c (interpreter_exec_cmd): Use GNU style for
3437 metasyntactic variables.
3438 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3439 metasyntactic variables.
3440 * tracepoint.c (tfind_range_command): Use GNU style for
3441 metasyntactic variables.
3442 (tfind_outside_command): Likewise.
3443 (_initialize_tracepoint): Likewise.
3444 * remote.c (extended_remote_target::create_inferior): Use GNU
3445 style for metasyntactic variables.
3446 * sparc64-tdep.c (adi_examine_command): Use GNU style for
3447 metasyntactic variables.
3448 (adi_assign_command): Likewise.
3449
3450 2018-09-16 Tom Tromey <tom@tromey.com>
3451
3452 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3453 metasyntactic variables. Print message if no disassembler options
3454 are available.
3455
3456 2018-09-15 Tom Tromey <tom@tromey.com>
3457
3458 * infcmd.c (get_inferior_args): Return const char *.
3459 * inferior.h (get_inferior_args): Return type now const.
3460 * linux-tdep.c (linux_fill_prpsinfo): Update.
3461 * procfs.c (procfs_target::make_corefile_notes): Update.
3462
3463 2018-09-07 Tom Tromey <tom@tromey.com>
3464
3465 * python/python.c (execute_gdb_command): Call bpstat_do_actions
3466 inside the TRY.
3467
3468 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
3469
3470 * nios2-tdep.c (nios2_type_align): New.
3471 (nios2_gdb_arch_init): Install type_align hook.
3472
3473 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3474
3475 * eval.c (fake_method::fake_method): Call xzalloc directly for a
3476 type that is neither object file owned, nor gdbarch owned.
3477 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3478 gdbarch is non-NULL.
3479 (alloc_type_instance): Allocate non-objfile owned types on the
3480 gdbarch obstack.
3481 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3482 using TYPE_ALLOC to ensure memory is allocated on the correct
3483 obstack.
3484 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3485 obstack, or the gdbarch obstack.
3486 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3487
3488 2018-09-14 Tom Tromey <tom@tromey.com>
3489
3490 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3491 block.
3492
3493 2018-09-14 Tom Tromey <tom@tromey.com>
3494
3495 * nat/fork-inferior.c (get_startup_shell): Remove "static".
3496
3497 2018-09-13 Tom Tromey <tom@tromey.com>
3498
3499 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3500 static.
3501
3502 2018-09-13 Tom Tromey <tom@tromey.com>
3503
3504 * exec.c (try_open_exec_file): Use std::string.
3505
3506 2018-09-13 Tom Tromey <tom@tromey.com>
3507
3508 * utils.h (gdb_bfd_errmsg): Return std::string.
3509 * exec.c (exec_file_attach): Update.
3510 * compile/compile-object-load.c (compile_object_load): Update.
3511 * utils.c (gdb_bfd_errmsg): Return std::string.
3512
3513 2018-09-13 Tom Tromey <tom@tromey.com>
3514
3515 * procfs.c (struct procinfo_deleter): New.
3516 (procinfo_up): New typedef.
3517 (do_destroy_procinfo_cleanup): Remove.
3518 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
3519
3520 2018-09-13 Tom Tromey <tom@tromey.com>
3521
3522 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3523
3524 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3525 2018-09-13 Tom Tromey <tom@tromey.com>
3526
3527 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3528 (pspy_get_objfiles): New function.
3529 (progspace_object_methods): New.
3530 (pspace_object_type): Add tp_methods callback.
3531 * python/python-internal.h (build_objfiles_list): New
3532 declaration.
3533 * python/python.c (build_objfiles_list): New function.
3534 (gdbpy_objfiles): Implement using build_objfiles_list.
3535 * NEWS: Mention the Progspace.objfiles method.
3536
3537 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3538
3539 * python/py-inferior.c (infpy_get_progspace): New function.
3540 (inferior_object_getset): Add progspace property.
3541 * NEWS: Mention the new property.
3542
3543 2018-09-13 Tom Tromey <tom@tromey.com>
3544
3545 PR rust/23650:
3546 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3547
3548 2018-09-13 Tom Tromey <tom@tromey.com>
3549
3550 PR rust/23626:
3551 * rust-lang.c (rust_enum_variant): Now static.
3552 (rust_empty_enum_p): New function.
3553 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3554 Handle empty enum.
3555
3556 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3557
3558 * python/py-inferior.c (infpy_repr): New.
3559 (inferior_object_type): Register infpy_repr.
3560 * python/py-objfile.c (objfpy_repr): New.
3561 (objfile_object_type): Register objfpy_repr.
3562
3563 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3564
3565 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3566
3567 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3568
3569 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3570 typo.
3571
3572 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
3573
3574 * common/common-utils.c: Don't include '<sys/stat.h>'.
3575 (is_regular_file): Move to...
3576 * common/filestuff.c (is_regular_file): ... here.
3577 * common/common-utils.h (is_regular_file): Move to...
3578 * common/filestuff.h (is_regular_file): ... here.
3579
3580 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
3581
3582 * skip.c (debug_skip): New variable.
3583 (skiplist_entry::do_skip_file_p): Add debug output.
3584 (skiplist_entry::do_skip_gfile_p): Likewise.
3585 (skiplist_entry::skip_function_p): Likewise.
3586 (_initialize_step_skip): Create debug command.
3587 * NEWS: Mention set/show debug skip.
3588
3589 2018-09-11 Xavier Roirand <roirand@adacore.com>
3590
3591 * darwin-nat.c (should_disable_startup_with_shell):
3592 New function.
3593 (darwin_nat_target::create_inferior): Add call.
3594
3595 2018-09-11 Xavier Roirand <roirand@adacore.com>
3596
3597 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3598 inf_port, msg_state>: Initialize.
3599 (struct darwin_thread_info) <signaled, single_step>: Change
3600 type and initialize.
3601 (struct darwin_thread_info) <event>: Initialize.
3602
3603 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3604
3605 PR gdb/23555
3606 PR gdb/23558
3607 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3608 guesses.
3609
3610 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3611
3612 Revert:
3613 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
3614
3615 PR gdb/23555
3616 PR gdb/23558
3617 * gnulib/aclocal.m4: Regenerate.
3618 * gnulib/config.in: Regenerate.
3619 * gnulib/configure: Regenerate.
3620 * gnulib/import/Makefile.am: Update.
3621 * gnulib/import/Makefile.in: Update.
3622 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3623 * gnulib/import/_Noreturn.h: ... this.
3624 * gnulib/import/alloca.in.h: Update.
3625 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3626 * gnulib/import/arg-nonnull.h: ... this.
3627 * gnulib/import/assure.h: Update.
3628 * gnulib/import/at-func.c: Update.
3629 * gnulib/import/basename-lgpl.c: Update.
3630 * gnulib/import/extra/snippet/c++defs.h: Rename to...
3631 * gnulib/import/c++defs.h: ... this.
3632 * gnulib/import/canonicalize-lgpl.c: Update.
3633 * gnulib/import/cdefs.h: Update.
3634 * gnulib/import/chdir-long.c: Update.
3635 * gnulib/import/chdir-long.h: Update.
3636 * gnulib/import/cloexec.c: Update.
3637 * gnulib/import/cloexec.h: Update.
3638 * gnulib/import/close.c: Update.
3639 * gnulib/import/closedir.c: Update.
3640 * gnulib/import/config.charset: Update.
3641 * gnulib/import/dirent-private.h: Update.
3642 * gnulib/import/dirent.in.h: Update.
3643 * gnulib/import/dirfd.c: Update.
3644 * gnulib/import/dirname-lgpl.c: Update.
3645 * gnulib/import/dirname.h: Update.
3646 * gnulib/import/dosname.h: Update.
3647 * gnulib/import/dup-safer-flag.c: Update.
3648 * gnulib/import/dup-safer.c: Update.
3649 * gnulib/import/dup.c: Update.
3650 * gnulib/import/dup2.c: Update.
3651 * gnulib/import/errno.in.h: Update.
3652 * gnulib/import/error.c: Update.
3653 * gnulib/import/error.h: Update.
3654 * gnulib/import/exitfail.c: Update.
3655 * gnulib/import/exitfail.h: Update.
3656 * gnulib/import/extra/update-copyright: Update.
3657 * gnulib/import/fchdir.c: Update.
3658 * gnulib/import/fcntl.c: Update.
3659 * gnulib/import/fcntl.in.h: Update.
3660 * gnulib/import/fd-hook.c: Update.
3661 * gnulib/import/fd-hook.h: Update.
3662 * gnulib/import/fd-safer-flag.c: Update.
3663 * gnulib/import/fd-safer.c: Update.
3664 * gnulib/import/fdopendir.c: Update.
3665 * gnulib/import/filename.h: Update.
3666 * gnulib/import/filenamecat-lgpl.c: Update.
3667 * gnulib/import/filenamecat.h: Update.
3668 * gnulib/import/flexmember.h: Update.
3669 * gnulib/import/float+.h: Update.
3670 * gnulib/import/float.c: Update.
3671 * gnulib/import/float.in.h: Update.
3672 * gnulib/import/fnmatch.c: Update.
3673 * gnulib/import/fnmatch.in.h: Update.
3674 * gnulib/import/fnmatch_loop.c: Update.
3675 * gnulib/import/fpucw.h: Update.
3676 * gnulib/import/frexp.c: Update.
3677 * gnulib/import/frexpl.c: Update.
3678 * gnulib/import/fstat.c: Update.
3679 * gnulib/import/fstatat.c: Update.
3680 * gnulib/import/getcwd-lgpl.c: Update.
3681 * gnulib/import/getcwd.c: Update.
3682 * gnulib/import/getdtablesize.c: Update.
3683 * gnulib/import/getlogin_r.c: Update.
3684 * gnulib/import/getprogname.c: Update.
3685 * gnulib/import/getprogname.h: Update.
3686 * gnulib/import/gettext.h: Update.
3687 * gnulib/import/gettimeofday.c: Update.
3688 * gnulib/import/glob-libc.h: Update.
3689 * gnulib/import/glob.c: Update.
3690 * gnulib/import/glob.in.h: Update.
3691 * gnulib/import/glob_internal.h: Update.
3692 * gnulib/import/glob_pattern_p.c: Update.
3693 * gnulib/import/globfree.c: Update.
3694 * gnulib/import/hard-locale.c: Update.
3695 * gnulib/import/hard-locale.h: Update.
3696 * gnulib/import/intprops.h: Update.
3697 * gnulib/import/inttypes.in.h: Update.
3698 * gnulib/import/isnan.c: Update.
3699 * gnulib/import/isnand-nolibm.h: Update.
3700 * gnulib/import/isnand.c: Update.
3701 * gnulib/import/isnanl-nolibm.h: Update.
3702 * gnulib/import/isnanl.c: Update.
3703 * gnulib/import/itold.c: Update.
3704 * gnulib/import/libc-config.h: Update.
3705 * gnulib/import/limits.in.h: Update.
3706 * gnulib/import/localcharset.c: Update.
3707 * gnulib/import/localcharset.h: Update.
3708 * gnulib/import/localtime-buffer.c: Update.
3709 * gnulib/import/localtime-buffer.h: Update.
3710 * gnulib/import/lstat.c: Update.
3711 * gnulib/import/m4/00gnulib.m4: Update.
3712 * gnulib/import/m4/__inline.m4: Update.
3713 * gnulib/import/m4/absolute-header.m4: Update.
3714 * gnulib/import/m4/alloca.m4: Update.
3715 * gnulib/import/m4/builtin-expect.m4: Update.
3716 * gnulib/import/m4/canonicalize.m4: Update.
3717 * gnulib/import/m4/chdir-long.m4: Update.
3718 * gnulib/import/m4/close.m4: Update.
3719 * gnulib/import/m4/closedir.m4: Update.
3720 * gnulib/import/m4/configmake.m4: Update.
3721 * gnulib/import/m4/d-ino.m4: Update.
3722 * gnulib/import/m4/d-type.m4: Update.
3723 * gnulib/import/m4/dirent_h.m4: Update.
3724 * gnulib/import/m4/dirfd.m4: Update.
3725 * gnulib/import/m4/dirname.m4: Update.
3726 * gnulib/import/m4/double-slash-root.m4: Update.
3727 * gnulib/import/m4/dup.m4: Update.
3728 * gnulib/import/m4/dup2.m4: Update.
3729 * gnulib/import/m4/eealloc.m4: Update.
3730 * gnulib/import/m4/environ.m4: Update.
3731 * gnulib/import/m4/errno_h.m4: Update.
3732 * gnulib/import/m4/error.m4: Update.
3733 * gnulib/import/m4/exponentd.m4: Update.
3734 * gnulib/import/m4/exponentl.m4: Update.
3735 * gnulib/import/m4/extensions.m4: Update.
3736 * gnulib/import/m4/extern-inline.m4: Update.
3737 * gnulib/import/m4/fchdir.m4: Update.
3738 * gnulib/import/m4/fcntl-o.m4: Update.
3739 * gnulib/import/m4/fcntl.m4: Update.
3740 * gnulib/import/m4/fcntl_h.m4: Update.
3741 * gnulib/import/m4/fdopendir.m4: Update.
3742 * gnulib/import/m4/filenamecat.m4: Update.
3743 * gnulib/import/m4/flexmember.m4: Update.
3744 * gnulib/import/m4/float_h.m4: Update.
3745 * gnulib/import/m4/fnmatch.m4: Update.
3746 * gnulib/import/m4/fnmatch_h.m4: Update.
3747 * gnulib/import/m4/fpieee.m4: Update.
3748 * gnulib/import/m4/frexp.m4: Update.
3749 * gnulib/import/m4/frexpl.m4: Update.
3750 * gnulib/import/m4/fstat.m4: Update.
3751 * gnulib/import/m4/fstatat.m4: Update.
3752 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3753 * gnulib/import/m4/getcwd-path-max.m4: Update.
3754 * gnulib/import/m4/getcwd.m4: Update.
3755 * gnulib/import/m4/getdtablesize.m4: Update.
3756 * gnulib/import/m4/getlogin.m4: Update.
3757 * gnulib/import/m4/getlogin_r.m4: Update.
3758 * gnulib/import/m4/getpagesize.m4: Update.
3759 * gnulib/import/m4/getprogname.m4: Update.
3760 * gnulib/import/m4/gettimeofday.m4: Update.
3761 * gnulib/import/m4/glibc21.m4: Update.
3762 * gnulib/import/m4/glob.m4: Update.
3763 * gnulib/import/m4/glob_h.m4: Update.
3764 * gnulib/import/m4/gnulib-cache.m4: Update.
3765 * gnulib/import/m4/gnulib-common.m4: Update.
3766 * gnulib/import/m4/gnulib-comp.m4: Update.
3767 * gnulib/import/m4/gnulib-tool.m4: Update.
3768 * gnulib/import/m4/hard-locale.m4: Update.
3769 * gnulib/import/m4/include_next.m4: Update.
3770 * gnulib/import/m4/inttypes-pri.m4: Update.
3771 * gnulib/import/m4/inttypes.m4: Update.
3772 * gnulib/import/m4/isnand.m4: Update.
3773 * gnulib/import/m4/isnanl.m4: Update.
3774 * gnulib/import/m4/largefile.m4: Update.
3775 * gnulib/import/m4/limits-h.m4: Update.
3776 * gnulib/import/m4/localcharset.m4: Update.
3777 * gnulib/import/m4/locale-fr.m4: Update.
3778 * gnulib/import/m4/locale-ja.m4: Update.
3779 * gnulib/import/m4/locale-zh.m4: Update.
3780 * gnulib/import/m4/localtime-buffer.m4: Update.
3781 * gnulib/import/m4/longlong.m4: Update.
3782 * gnulib/import/m4/lstat.m4: Update.
3783 * gnulib/import/m4/malloc.m4: Update.
3784 * gnulib/import/m4/malloca.m4: Update.
3785 * gnulib/import/m4/math_h.m4: Update.
3786 * gnulib/import/m4/mbrtowc.m4: Update.
3787 * gnulib/import/m4/mbsinit.m4: Update.
3788 * gnulib/import/m4/mbsrtowcs.m4: Update.
3789 * gnulib/import/m4/mbstate_t.m4: Update.
3790 * gnulib/import/m4/memchr.m4: Update.
3791 * gnulib/import/m4/memmem.m4: Update.
3792 * gnulib/import/m4/mempcpy.m4: Update.
3793 * gnulib/import/m4/memrchr.m4: Update.
3794 * gnulib/import/m4/mkdir.m4: Update.
3795 * gnulib/import/m4/mkstemp.m4: Update.
3796 * gnulib/import/m4/mmap-anon.m4: Update.
3797 * gnulib/import/m4/mode_t.m4: Update.
3798 * gnulib/import/m4/msvc-inval.m4: Update.
3799 * gnulib/import/m4/msvc-nothrow.m4: Update.
3800 * gnulib/import/m4/multiarch.m4: Update.
3801 * gnulib/import/m4/nocrash.m4: Update.
3802 * gnulib/import/m4/off_t.m4: Update.
3803 * gnulib/import/m4/onceonly.m4: Update.
3804 * gnulib/import/m4/open-cloexec.m4: Update.
3805 * gnulib/import/m4/open.m4: Update.
3806 * gnulib/import/m4/openat.m4: Update.
3807 * gnulib/import/m4/opendir.m4: Update.
3808 * gnulib/import/m4/pathmax.m4: Update.
3809 * gnulib/import/m4/rawmemchr.m4: Update.
3810 * gnulib/import/m4/readdir.m4: Update.
3811 * gnulib/import/m4/readlink.m4: Update.
3812 * gnulib/import/m4/realloc.m4: Update.
3813 * gnulib/import/m4/rename.m4: Update.
3814 * gnulib/import/m4/rewinddir.m4: Update.
3815 * gnulib/import/m4/rmdir.m4: Update.
3816 * gnulib/import/m4/save-cwd.m4: Update.
3817 * gnulib/import/m4/secure_getenv.m4: Update.
3818 * gnulib/import/m4/setenv.m4: Update.
3819 * gnulib/import/m4/signal_h.m4: Update.
3820 * gnulib/import/m4/ssize_t.m4: Update.
3821 * gnulib/import/m4/stat-time.m4: Update.
3822 * gnulib/import/m4/stat.m4: Update.
3823 * gnulib/import/m4/std-gnu11.m4: Update.
3824 * gnulib/import/m4/stdbool.m4: Update.
3825 * gnulib/import/m4/stddef_h.m4: Update.
3826 * gnulib/import/m4/stdint.m4: Update.
3827 * gnulib/import/m4/stdio_h.m4: Update.
3828 * gnulib/import/m4/stdlib_h.m4: Update.
3829 * gnulib/import/m4/strchrnul.m4: Update.
3830 * gnulib/import/m4/strdup.m4: Update.
3831 * gnulib/import/m4/strerror.m4: Update.
3832 * gnulib/import/m4/string_h.m4: Update.
3833 * gnulib/import/m4/strstr.m4: Update.
3834 * gnulib/import/m4/strtok_r.m4: Update.
3835 * gnulib/import/m4/sys_socket_h.m4: Update.
3836 * gnulib/import/m4/sys_stat_h.m4: Update.
3837 * gnulib/import/m4/sys_time_h.m4: Update.
3838 * gnulib/import/m4/sys_types_h.m4: Update.
3839 * gnulib/import/m4/tempname.m4: Update.
3840 * gnulib/import/m4/time_h.m4: Update.
3841 * gnulib/import/m4/unistd-safer.m4: Update.
3842 * gnulib/import/m4/unistd_h.m4: Update.
3843 * gnulib/import/m4/warn-on-use.m4: Update.
3844 * gnulib/import/m4/wchar_h.m4: Update.
3845 * gnulib/import/m4/wchar_t.m4: Update.
3846 * gnulib/import/m4/wctype_h.m4: Update.
3847 * gnulib/import/m4/wint_t.m4: Update.
3848 * gnulib/import/malloc.c: Update.
3849 * gnulib/import/malloc/scratch_buffer.h: Update.
3850 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3851 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3852 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3853 * gnulib/import/malloca.c: Update.
3854 * gnulib/import/malloca.h: Update.
3855 * gnulib/import/malloca.valgrind: Update.
3856 * gnulib/import/math.in.h: Update.
3857 * gnulib/import/mbrtowc.c: Update.
3858 * gnulib/import/mbsinit.c: Update.
3859 * gnulib/import/mbsrtowcs-impl.h: Update.
3860 * gnulib/import/mbsrtowcs-state.c: Update.
3861 * gnulib/import/mbsrtowcs.c: Update.
3862 * gnulib/import/memchr.c: Update.
3863 * gnulib/import/memmem.c: Update.
3864 * gnulib/import/mempcpy.c: Update.
3865 * gnulib/import/memrchr.c: Update.
3866 * gnulib/import/mkdir.c: Update.
3867 * gnulib/import/mkstemp.c: Update.
3868 * gnulib/import/msvc-inval.c: Update.
3869 * gnulib/import/msvc-inval.h: Update.
3870 * gnulib/import/msvc-nothrow.c: Update.
3871 * gnulib/import/msvc-nothrow.h: Update.
3872 * gnulib/import/open.c: Update.
3873 * gnulib/import/openat-die.c: Update.
3874 * gnulib/import/openat-priv.h: Update.
3875 * gnulib/import/openat-proc.c: Update.
3876 * gnulib/import/openat.c: Update.
3877 * gnulib/import/openat.h: Update.
3878 * gnulib/import/opendir.c: Update.
3879 * gnulib/import/pathmax.h: Update.
3880 * gnulib/import/pipe-safer.c: Update.
3881 * gnulib/import/rawmemchr.c: Update.
3882 * gnulib/import/readdir.c: Update.
3883 * gnulib/import/readlink.c: Update.
3884 * gnulib/import/realloc.c: Update.
3885 * gnulib/import/ref-add.sin: Update.
3886 * gnulib/import/ref-del.sin: Update.
3887 * gnulib/import/rename.c: Update.
3888 * gnulib/import/rewinddir.c: Update.
3889 * gnulib/import/rmdir.c: Update.
3890 * gnulib/import/same-inode.h: Update.
3891 * gnulib/import/save-cwd.c: Update.
3892 * gnulib/import/save-cwd.h: Update.
3893 * gnulib/import/scratch_buffer.h: Update.
3894 * gnulib/import/secure_getenv.c: Update.
3895 * gnulib/import/setenv.c: Update.
3896 * gnulib/import/signal.in.h: Update.
3897 * gnulib/import/stat-time.c: Update.
3898 * gnulib/import/stat-time.h: Update.
3899 * gnulib/import/stat-w32.c: Update.
3900 * gnulib/import/stat-w32.h: Update.
3901 * gnulib/import/stat.c: Update.
3902 * gnulib/import/stdbool.in.h: Update.
3903 * gnulib/import/stddef.in.h: Update.
3904 * gnulib/import/stdint.in.h: Update.
3905 * gnulib/import/stdio.in.h: Update.
3906 * gnulib/import/stdlib.in.h: Update.
3907 * gnulib/import/str-two-way.h: Update.
3908 * gnulib/import/strchrnul.c: Update.
3909 * gnulib/import/strdup.c: Update.
3910 * gnulib/import/streq.h: Update.
3911 * gnulib/import/strerror-override.c: Update.
3912 * gnulib/import/strerror-override.h: Update.
3913 * gnulib/import/strerror.c: Update.
3914 * gnulib/import/string.in.h: Update.
3915 * gnulib/import/stripslash.c: Update.
3916 * gnulib/import/strnlen1.c: Update.
3917 * gnulib/import/strnlen1.h: Update.
3918 * gnulib/import/strstr.c: Update.
3919 * gnulib/import/strtok_r.c: Update.
3920 * gnulib/import/sys_stat.in.h: Update.
3921 * gnulib/import/sys_time.in.h: Update.
3922 * gnulib/import/sys_types.in.h: Update.
3923 * gnulib/import/tempname.c: Update.
3924 * gnulib/import/tempname.h: Update.
3925 * gnulib/import/time.in.h: Update.
3926 * gnulib/import/unistd--.h: Update.
3927 * gnulib/import/unistd-safer.h: Update.
3928 * gnulib/import/unistd.in.h: Update.
3929 * gnulib/import/unsetenv.c: Update.
3930 * gnulib/import/verify.h: Update.
3931 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3932 * gnulib/import/wchar.in.h: Update.
3933 * gnulib/import/wctype.in.h: Update.
3934 * gnulib/import/xalloc-oversized.h: Update.
3935 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3936 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3937
3938 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
3939
3940 * record-btrace.c (get_thread_current_frame): Remove
3941 old_inferior_ptid.
3942
3943 2018-09-10 Jerome Guitton <guitton@adacore.com>
3944
3945 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3946 with check_tag to 1 if and only if the type is tagged and the
3947 component being searched cannot been found in the current
3948 view. Otherwise, always call ada_to_fixed_type with
3949 check_tag to 0.
3950
3951 2018-09-10 Xavier Roirand <roirand@adacore.com>
3952
3953 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3954 declaration.
3955 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3956 * ada-varobj.c (ada_varobj_get_number_of_children,
3957 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3958
3959 2018-09-10 Xavier Roirand <roirand@adacore.com>
3960
3961 * ada-valprint.c (ada_value_print): Use type instead of
3962 enclosing type.
3963
3964 2018-09-10 Xavier Roirand <roirand@adacore.com>
3965
3966 * ada-lang.c (ada_value_subscript): Handle case when parameter is
3967 an array of access to unconstrained array.
3968
3969 2018-09-10 Xavier Roirand <roirand@adacore.com>
3970
3971 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3972 (ada_check_typedef): Use it.
3973
3974 2018-09-10 Xavier Roirand <roirand@adacore.com>
3975
3976 * ada-varobj.c (ada_varobj_describe_struct_child)
3977 (ada_varobj_describe_child): Handle union case like struct one.
3978
3979 2018-09-10 Tom Tromey <tom@tromey.com>
3980
3981 PR python/18380:
3982 * python/python.c (_initialize_python): Make example in "python"
3983 help work in Python 3.
3984
3985 2018-09-10 Eli Zaretskii <eliz@gnu.org>
3986
3987 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3988 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
3989 $(EXEEXT) to the script, as it is not a program.
3990
3991 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
3992
3993 * python/py-prettyprint.c (pretty_print_one_value): Return
3994 gdbpy_ref<>.
3995 (print_string_repr): Adjust.
3996 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3997 * python/python-internal.h (apply_varobj_pretty_printer): Return
3998 gdbpy_ref<>.
3999 * varobj.c (varobj_value_get_print_value): Adjust.
4000
4001 2018-09-08 Tom Tromey <tom@tromey.com>
4002
4003 PR python/16047:
4004 * python/py-prettyprint.c (pretty_print_one_value): Check for
4005 to_string method.
4006
4007 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4008
4009 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
4010 replace_operator_with_call.
4011
4012 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4013
4014 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
4015
4016 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4017
4018 * ada-typeprint.c (print_range): Print the bounds using TYPE
4019 rather than its TYPE_TARGET_TYPE.
4020
4021 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4022
4023 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4024 call to ada_to_fixed_value_create.
4025
4026 2018-09-08 Jerome Guitton <guitton@adacore.com>
4027
4028 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
4029
4030 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4031
4032 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
4033 by calls to error.
4034
4035 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4036
4037 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
4038 Move update of loop variable "fi".
4039
4040 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4041
4042 * ada-lang.c (value_assign_to_component): In the case of
4043 big-endian targets, extract the bits of the given VAL
4044 using an src_offset of zero if container is not a scalar.
4045
4046 2018-09-06 Simon Ser <contact@emersion.fr>
4047
4048 PR gdb/23105
4049 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4050 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4051 * fbsd-tdep.c (fbsd_make_note_desc): New.
4052 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4053 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4054 * target.h (enum target_object) Add FreeBSD-specific
4055 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4056
4057 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4058
4059 * compile/compile-c.h (generate_c_for_variable_locations):
4060 Change reference to pointer.
4061 * compile/compile-c-support.c (compile_program) <compute>:
4062 Likewise.
4063 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4064 (generate_c_for_for_one_variable): Likewise
4065 (generate_c_for_variable_locations): Likewise
4066 * compile/compile-c-types.c (compile_c_instance::convert_type):
4067 Likewise
4068 * compile/compile-cplus-symbols.c (convert_one_symbol):
4069 std::move the scope passed to enter_scope.
4070 * compile/compile-cplus-types.c
4071 (compile_cplus_instance::enter_scope): Make parameter
4072 rvalue-reference.
4073 (compile_cplus_instance::new_scope): Change reference to
4074 pointer.
4075 (compile_cplus_instance::convert_type): Likewise
4076 (compile_cplus_convert_typedef): std::move the scope passed to
4077 enter_scope.
4078 (compile_cplus_convert_struct_or_union): Likewise.
4079 (compile_cplus_convert_enum): Likewise.
4080 (compile_cplus_convert_namespace): Likewise.
4081 * compile/compile-cplus.h (compile_cplus_instance)
4082 <enter_scope>: Make parameter rvalue-reference.
4083 * compile/compile-internal.h (compile_instance)
4084 <get_cached_type>: Likewise
4085 * compile/compile-loc2c.c (push): Likewise
4086 (pushf): Likewise
4087 (unary): Likewise
4088 (binary): Likewise
4089 (print_label): Likewise
4090 (pushf_register_address): Likewise
4091 (pushf_register): Likewise
4092 (do_compile_dwarf_expr_to_c): Likewise
4093 (compile_dwarf_expr_to_c): Likewise
4094 (compile_dwarf_bounds_to_c): Likewise
4095 * compile/compile.c (compile_instance::get_cached_type):
4096 Likewise
4097 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4098 (compile_dwarf_bounds_to_c): Likewise
4099 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4100 (dwarf2_compile_property_to_c): Likewise
4101 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4102 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4103 Likewise
4104
4105 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4106
4107 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4108 * tui/tui-data.c (init_content_element): Don't initialize it.
4109
4110 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4111
4112 * tui/tui-data.h (struct tui_win_info)
4113 <detail::opaque>: Remove.
4114 * tui/tui-data.c (init_win_info): Remove assignment.
4115
4116 2018-09-05 Tom Tromey <tom@tromey.com>
4117
4118 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4119 -Wformat-nonliteral.
4120 * target-float.c (host_float_ops<T>::to_string)
4121 (host_float_ops<T>::from_string): Use
4122 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4123 * configure: Rebuild.
4124
4125 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
4126
4127 * printcmd.c (printf_c_string): Use
4128 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4129 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4130
4131 2018-09-05 Tom Tromey <tom@tromey.com>
4132
4133 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4134
4135 2018-09-05 Tom de Vries <tdevries@suse.de>
4136
4137 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4138 with resolve_abstract_p == true.
4139 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4140 defaulting to false. Propagate resolve_abstract_p to
4141 dwarf2_fetch_die_loc_sect_off.
4142 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4143 parameter, defaulting to false.
4144 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4145 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4146 parameter.
4147 * dwarf2read.h (struct die_info): Forward-declare.
4148 (die_info_ptr): New typedef.
4149 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4150
4151 2018-09-05 Joel Brobecker <brobecker@adacore.com>
4152
4153 GDB 8.2 released.
4154
4155 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
4156 Pedro Alves <palves@redhat.com>
4157
4158 * gnulib/Makefile.in (aclocal_m4_deps): Move to
4159 "aclocal-m4-deps.mk". Include file here.
4160 $(srcdir)/aclocal.m4: Add "configure.ac".
4161 * gnulib/aclocal-m4-deps.mk: New file.
4162 * gnulib/update-gnulib.sh: Automatically update
4163 "aclocal-m4-deps.mk".
4164
4165 2018-09-04 Tom Tromey <tom@tromey.com>
4166
4167 * configure: Rebuild.
4168 * configure.ac: Remove multi-ice code.
4169
4170 2018-09-04 Tom Tromey <tom@tromey.com>
4171
4172 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4173 (ada-exp.o): Update.
4174
4175 2018-09-04 Tom Tromey <tom@tromey.com>
4176
4177 * Makefile.in (printcmd.o, target-float.o): Remove.
4178 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4179
4180 2018-09-04 Tom Tromey <tom@tromey.com>
4181
4182 * gnulib/Makefile.in: Remove obsolete comment.
4183 * Makefile.in: Remove obsolete comment.
4184
4185 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
4186
4187 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4188 line with '+'.
4189
4190 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
4191
4192 * riscv-tdep.c: Add 'prologue-value.h' include.
4193 (struct riscv_unwind_cache): New struct.
4194 (riscv_debug_unwinder): New global.
4195 (riscv_scan_prologue): Update arguments, capture register details
4196 from prologue scan.
4197 (riscv_skip_prologue): Reformat arguments line, move end of
4198 prologue calculation into riscv_scan_prologue.
4199 (riscv_frame_cache): Update return type, create
4200 riscv_unwind_cache, scan the prologue, and fill in remaining cache
4201 details.
4202 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4203 (riscv_frame_prev_register): Use the trad_frame within the
4204 riscv_unwind_cache.
4205 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4206 flag.
4207
4208 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
4209
4210 * trad-frame.h (trad_frame_set_realreg): Declare.
4211 (trad_frame_set_addr): Declare.
4212 * trad-frame.c (trad_frame_set_realreg): Define new function.
4213 (trad_frame_set_addr): Define new function.
4214 (trad_frame_set_reg_realreg): Use new function.
4215 (trad_frame_set_reg_addr): Use new function.
4216
4217 2018-09-01 Keith Seitz <keiths@redhat.com>
4218
4219 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4220 pulongest instead of "%lld".
4221 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4222 ATTRIBUTE_UNUSED.
4223
4224 2018-08-31 Tom Tromey <tom@tromey.com>
4225
4226 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4227 variant part type.
4228
4229 2018-08-31 Pedro Alves <palves@redhat.com>
4230
4231 * gdbarch.h: Regenerate.
4232
4233 2018-08-31 Pedro Alves <palves@redhat.com>
4234
4235 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4236 * target.h (Hardware watchpoint interfaces): Describe
4237 continuable/steppable/non-steppable watchpoints.
4238 * gdbarch.h, gdbarch.c: Regenerate.
4239
4240 2018-08-31 Pedro Alves <palves@redhat.com>
4241
4242 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4243 Delete.
4244 * s390-linux-nat.c
4245 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4246 * target.h (target_ops::have_continuable_watchpoint): Delete.
4247 (target_have_continuable_watchpoint): Delete.
4248 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4249 * target-delegates.c: Regenerate.
4250
4251 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4252
4253 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4254 the files present in "gnulib/import/m4/".
4255
4256 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
4257
4258 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4259 c.sw, c.swsp, and c.sdsp.
4260
4261 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
4262
4263 * riscv-tdep.c (struct riscv_inferior_data): Delete.
4264 (riscv_read_misa_reg): Don't cache value read into inferior data.
4265 (riscv_new_inferior_data): Delete.
4266 (riscv_inferior_data_cleanup): Delete.
4267 (riscv_inferior_data): Delete.
4268 (riscv_invalidate_inferior_data): Delete.
4269 (_initialize_riscv_tdep): Remove initialisation of inferior data.
4270
4271 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
4272
4273 * compile/compile-cplus-types.c
4274 (compile_cplus_instance::leave_scope): Take the address of scope
4275 object.
4276 (compile_cplus_instance::convert_qualified_base): Compare quals
4277 to 0.
4278
4279 2018-08-30 Keith Seitz <keiths@redhat.com>
4280
4281 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4282 Use "%s" and host_address_to_string instead of "%p" in printf.
4283
4284 2018-08-29 Keith Seitz <keiths@redhat.com>
4285
4286 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4287 and compile-cplus-types.c.
4288 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4289 * c-lang.c (cplus_language_defn): Set C++ compile functions.
4290 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4291 Declare.
4292 * compile/compile-c-support.c: Include compile-cplus.h.
4293 (load_libcompile): Templatize.
4294 (get_compile_context): "New" function.
4295 (c_get_compile_context): Use get_compile_context.
4296 (cplus_get_compile_context): New function.
4297 (cplus_push_user_expression, cplus_pop_user_expression)
4298 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4299 (cplus_compute_program): Define new structs/functions.
4300 * compile/compile-cplus-symmbols.c: New file.
4301 * compile/compile-cplus-types.c: New file.
4302 * compile/compile-cplus.h: New file.
4303 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4304 Declare.
4305 * compile/compile-object-load.c (get_out_value_type): Use
4306 strncmp_iw when comparing symbol names.
4307 (compile_object_load): Add mst_bss and mst_data.
4308 * compile/compile.c (_initialize_compile): Remove
4309 -Wno-implicit-function-declaration from `compile_args'.
4310 * compile/gcc-cp-plugin.h: New file.
4311 * NEWS: Mention C++ compile support and new debug options.
4312
4313 2018-08-29 Keith Seitz <keiths@redhat.com>
4314
4315 * linespec.c (collect_info::add_symbol): Make virtual.
4316 (struct symbol_searcher_collect_info): New struct.
4317 (symbol_searcher::find_all_symbols): New method.
4318 * symtab.h (class symbol_searcher): New class.
4319
4320 2018-08-29 Keith Seitz <keiths@redhat.com>
4321
4322 * linespec.c (struct linespec) <function_symbols, label_symbols>:
4323 Change to vector of block_symbol. Update all users.
4324 (struct collect_info) <symbols>: Likewise.
4325 (collect_info::add_symbol): Take block_symbol as argument.
4326 Update all callers.
4327 (decode_compound_collector) <m_symbols>: Change type to vector
4328 of block_symbol. Update all users.
4329 (decode_compound_collector::operator ()): Change parameter type
4330 to block_symbol.
4331 (find_method, find_function_symbols, find_linespec_symbols)
4332 (find_label_symbols_in_block, find_label_symbols): Change symbol
4333 vectors to block_symbol vectors.
4334 * symtab.h (symbol_found_callback_ftype): Change parameter type to
4335 block_symbol.
4336
4337 2018-08-29 Keith Seitz <keiths@redhat.com>
4338
4339 * linespec.c (symbolp): Remove typedef and VEC definitions.
4340 (bound_minimal_symbol_d): Likewise.
4341
4342 2018-08-29 Keith Seitz <keiths@redhat.com>
4343
4344 * linespec.c (decode_compound_collector::decode_compound_collector):
4345 Remove initialization for `m_symtabs'.
4346 (decode_compound_collector::release_symbols): Change return type
4347 to std::vector. Update all callers.
4348 (class decode_compound_collector) <m_symbols>: Change type to
4349 std::vector.
4350 (lookup_prefix_sym): Change return type to std::vector. Update all
4351 callers.
4352 (compare_symbols): Remove.
4353 (std_compare_symbols): Rename to `compare_symbols'.
4354 (find_method): Change `sym_classes' parameter to std::vector.
4355 Update all callers. Use std::sort to sort sym_classes.
4356 (find_linespec_symbols): Remove cleanup.
4357
4358 2018-08-29 Keith Seitz <keiths@redhat.com>
4359
4360 * linespec.c (struct linespec) <minimal_symbols>: Change type to
4361 std::vector. Update all users.
4362 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4363 (struct collect_info) <minimal_symbols>: Likewise.
4364 (compare_msymbols): Return bool. Change parameters to const
4365 bound_minimal_symbol references.
4366 (find_method, find_function_symbols, find_linespec_symbols): Change
4367 `minsyms' parameter to std::vector. Update all callers.
4368
4369 2018-08-29 Keith Seitz <keiths@redhat.com>
4370
4371 * linespec.c (struct linespec) <label_symbols>: Change type to
4372 std::vector. Update all users.
4373 (find_label_symbols_in_block): Change `result' parameter to
4374 std::vector. Update all callers.
4375 (find_label_symbols): Return std::vector. Update all callers.
4376
4377 2018-08-29 Keith Seitz <keiths@redhat.com>
4378
4379 * linespec.c (struct linespec) <function_symbols>: Change type to
4380 std::vector. Update all users.
4381 (struct collect_info) <function_symbols>: Likewise.
4382 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4383 (std_compare_symbols): New function.
4384 (find_method, find_function_symbols, find_linespec_symbols)
4385 (find_label_symbols_in_block): Change `symbols' parameter to
4386 std::vector. Update all callers.
4387 (find_label_symbols): Likewise for `function_symbols' and
4388 `label_funcs_ret'.
4389
4390 2018-08-29 Keith Seitz <keiths@redhat.com>
4391
4392 * linespec.c (symtab_vector_up): Define.
4393 (struct linespec) <file_symtabs>: Change type to std::vector *.
4394 Update all uses.
4395 (struct collect_info) <file_symtabs>: Likewise.
4396 (collect_symtabs_from_filename): Return symtab_vector_up.
4397 Update all callers.
4398 (decode_objc): Remove cleanup.
4399 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4400 (symtab_collector::release_symtabs): Return symtab_vector_up.
4401 Update all callers.
4402 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4403 Update all users.
4404 (collect_symtabs_from_filename, symtabs_from_filename): Return
4405 symtab_vector_up. Update all callers.
4406
4407 2018-08-29 Tom Tromey <tom@tromey.com>
4408
4409 * csky-tdep.c (csky_analyze_prologue): Use
4410 core_addr_to_string_nz.
4411
4412 2018-08-29 Tom Tromey <tom@tromey.com>
4413
4414 * windows-nat.c (struct xlate_exception) <them>: Change type to
4415 DWORD.
4416 (xlate): Fix formatting. Remove last entry.
4417 (struct xlate_exception, xlate): Comment out.
4418 (windows_nat_target::resume): Use ranged for.
4419
4420 2018-08-29 Jim Wilson <jimw@sifive.com>
4421
4422 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4423 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4424 of NT_PRFPREG.
4425 (riscv_linux_nat_target::store_registers): Likewise.
4426
4427 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
4428
4429 PR gdb/23555
4430 PR gdb/23558
4431 * gnulib/aclocal.m4: Regenerate.
4432 * gnulib/config.in: Regenerate.
4433 * gnulib/configure: Regenerate.
4434 * gnulib/import/Makefile.am: Update.
4435 * gnulib/import/Makefile.in: Update.
4436 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4437 * gnulib/import/_Noreturn.h: ... this.
4438 * gnulib/import/alloca.in.h: Update.
4439 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4440 * gnulib/import/arg-nonnull.h: ... this.
4441 * gnulib/import/assure.h: Update.
4442 * gnulib/import/at-func.c: Update.
4443 * gnulib/import/basename-lgpl.c: Update.
4444 * gnulib/import/extra/snippet/c++defs.h: Rename to...
4445 * gnulib/import/c++defs.h: ... this.
4446 * gnulib/import/canonicalize-lgpl.c: Update.
4447 * gnulib/import/cdefs.h: Update.
4448 * gnulib/import/chdir-long.c: Update.
4449 * gnulib/import/chdir-long.h: Update.
4450 * gnulib/import/cloexec.c: Update.
4451 * gnulib/import/cloexec.h: Update.
4452 * gnulib/import/close.c: Update.
4453 * gnulib/import/closedir.c: Update.
4454 * gnulib/import/config.charset: Update.
4455 * gnulib/import/dirent-private.h: Update.
4456 * gnulib/import/dirent.in.h: Update.
4457 * gnulib/import/dirfd.c: Update.
4458 * gnulib/import/dirname-lgpl.c: Update.
4459 * gnulib/import/dirname.h: Update.
4460 * gnulib/import/dosname.h: Update.
4461 * gnulib/import/dup-safer-flag.c: Update.
4462 * gnulib/import/dup-safer.c: Update.
4463 * gnulib/import/dup.c: Update.
4464 * gnulib/import/dup2.c: Update.
4465 * gnulib/import/errno.in.h: Update.
4466 * gnulib/import/error.c: Update.
4467 * gnulib/import/error.h: Update.
4468 * gnulib/import/exitfail.c: Update.
4469 * gnulib/import/exitfail.h: Update.
4470 * gnulib/import/extra/update-copyright: Update.
4471 * gnulib/import/fchdir.c: Update.
4472 * gnulib/import/fcntl.c: Update.
4473 * gnulib/import/fcntl.in.h: Update.
4474 * gnulib/import/fd-hook.c: Update.
4475 * gnulib/import/fd-hook.h: Update.
4476 * gnulib/import/fd-safer-flag.c: Update.
4477 * gnulib/import/fd-safer.c: Update.
4478 * gnulib/import/fdopendir.c: Update.
4479 * gnulib/import/filename.h: Update.
4480 * gnulib/import/filenamecat-lgpl.c: Update.
4481 * gnulib/import/filenamecat.h: Update.
4482 * gnulib/import/flexmember.h: Update.
4483 * gnulib/import/float+.h: Update.
4484 * gnulib/import/float.c: Update.
4485 * gnulib/import/float.in.h: Update.
4486 * gnulib/import/fnmatch.c: Update.
4487 * gnulib/import/fnmatch.in.h: Update.
4488 * gnulib/import/fnmatch_loop.c: Update.
4489 * gnulib/import/fpucw.h: Update.
4490 * gnulib/import/frexp.c: Update.
4491 * gnulib/import/frexpl.c: Update.
4492 * gnulib/import/fstat.c: Update.
4493 * gnulib/import/fstatat.c: Update.
4494 * gnulib/import/getcwd-lgpl.c: Update.
4495 * gnulib/import/getcwd.c: Update.
4496 * gnulib/import/getdtablesize.c: Update.
4497 * gnulib/import/getlogin_r.c: Update.
4498 * gnulib/import/getprogname.c: Update.
4499 * gnulib/import/getprogname.h: Update.
4500 * gnulib/import/gettext.h: Update.
4501 * gnulib/import/gettimeofday.c: Update.
4502 * gnulib/import/glob-libc.h: Update.
4503 * gnulib/import/glob.c: Update.
4504 * gnulib/import/glob.in.h: Update.
4505 * gnulib/import/glob_internal.h: Update.
4506 * gnulib/import/glob_pattern_p.c: Update.
4507 * gnulib/import/globfree.c: Update.
4508 * gnulib/import/hard-locale.c: Update.
4509 * gnulib/import/hard-locale.h: Update.
4510 * gnulib/import/intprops.h: Update.
4511 * gnulib/import/inttypes.in.h: Update.
4512 * gnulib/import/isnan.c: Update.
4513 * gnulib/import/isnand-nolibm.h: Update.
4514 * gnulib/import/isnand.c: Update.
4515 * gnulib/import/isnanl-nolibm.h: Update.
4516 * gnulib/import/isnanl.c: Update.
4517 * gnulib/import/itold.c: Update.
4518 * gnulib/import/libc-config.h: Update.
4519 * gnulib/import/limits.in.h: Update.
4520 * gnulib/import/localcharset.c: Update.
4521 * gnulib/import/localcharset.h: Update.
4522 * gnulib/import/localtime-buffer.c: Update.
4523 * gnulib/import/localtime-buffer.h: Update.
4524 * gnulib/import/lstat.c: Update.
4525 * gnulib/import/m4/00gnulib.m4: Update.
4526 * gnulib/import/m4/__inline.m4: Update.
4527 * gnulib/import/m4/absolute-header.m4: Update.
4528 * gnulib/import/m4/alloca.m4: Update.
4529 * gnulib/import/m4/builtin-expect.m4: Update.
4530 * gnulib/import/m4/canonicalize.m4: Update.
4531 * gnulib/import/m4/chdir-long.m4: Update.
4532 * gnulib/import/m4/close.m4: Update.
4533 * gnulib/import/m4/closedir.m4: Update.
4534 * gnulib/import/m4/configmake.m4: Update.
4535 * gnulib/import/m4/d-ino.m4: Update.
4536 * gnulib/import/m4/d-type.m4: Update.
4537 * gnulib/import/m4/dirent_h.m4: Update.
4538 * gnulib/import/m4/dirfd.m4: Update.
4539 * gnulib/import/m4/dirname.m4: Update.
4540 * gnulib/import/m4/double-slash-root.m4: Update.
4541 * gnulib/import/m4/dup.m4: Update.
4542 * gnulib/import/m4/dup2.m4: Update.
4543 * gnulib/import/m4/eealloc.m4: Update.
4544 * gnulib/import/m4/environ.m4: Update.
4545 * gnulib/import/m4/errno_h.m4: Update.
4546 * gnulib/import/m4/error.m4: Update.
4547 * gnulib/import/m4/exponentd.m4: Update.
4548 * gnulib/import/m4/exponentl.m4: Update.
4549 * gnulib/import/m4/extensions.m4: Update.
4550 * gnulib/import/m4/extern-inline.m4: Update.
4551 * gnulib/import/m4/fchdir.m4: Update.
4552 * gnulib/import/m4/fcntl-o.m4: Update.
4553 * gnulib/import/m4/fcntl.m4: Update.
4554 * gnulib/import/m4/fcntl_h.m4: Update.
4555 * gnulib/import/m4/fdopendir.m4: Update.
4556 * gnulib/import/m4/filenamecat.m4: Update.
4557 * gnulib/import/m4/flexmember.m4: Update.
4558 * gnulib/import/m4/float_h.m4: Update.
4559 * gnulib/import/m4/fnmatch.m4: Update.
4560 * gnulib/import/m4/fnmatch_h.m4: Update.
4561 * gnulib/import/m4/fpieee.m4: Update.
4562 * gnulib/import/m4/frexp.m4: Update.
4563 * gnulib/import/m4/frexpl.m4: Update.
4564 * gnulib/import/m4/fstat.m4: Update.
4565 * gnulib/import/m4/fstatat.m4: Update.
4566 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4567 * gnulib/import/m4/getcwd-path-max.m4: Update.
4568 * gnulib/import/m4/getcwd.m4: Update.
4569 * gnulib/import/m4/getdtablesize.m4: Update.
4570 * gnulib/import/m4/getlogin.m4: Update.
4571 * gnulib/import/m4/getlogin_r.m4: Update.
4572 * gnulib/import/m4/getpagesize.m4: Update.
4573 * gnulib/import/m4/getprogname.m4: Update.
4574 * gnulib/import/m4/gettimeofday.m4: Update.
4575 * gnulib/import/m4/glibc21.m4: Update.
4576 * gnulib/import/m4/glob.m4: Update.
4577 * gnulib/import/m4/glob_h.m4: Update.
4578 * gnulib/import/m4/gnulib-cache.m4: Update.
4579 * gnulib/import/m4/gnulib-common.m4: Update.
4580 * gnulib/import/m4/gnulib-comp.m4: Update.
4581 * gnulib/import/m4/gnulib-tool.m4: Update.
4582 * gnulib/import/m4/hard-locale.m4: Update.
4583 * gnulib/import/m4/include_next.m4: Update.
4584 * gnulib/import/m4/inttypes-pri.m4: Update.
4585 * gnulib/import/m4/inttypes.m4: Update.
4586 * gnulib/import/m4/isnand.m4: Update.
4587 * gnulib/import/m4/isnanl.m4: Update.
4588 * gnulib/import/m4/largefile.m4: Update.
4589 * gnulib/import/m4/limits-h.m4: Update.
4590 * gnulib/import/m4/localcharset.m4: Update.
4591 * gnulib/import/m4/locale-fr.m4: Update.
4592 * gnulib/import/m4/locale-ja.m4: Update.
4593 * gnulib/import/m4/locale-zh.m4: Update.
4594 * gnulib/import/m4/localtime-buffer.m4: Update.
4595 * gnulib/import/m4/longlong.m4: Update.
4596 * gnulib/import/m4/lstat.m4: Update.
4597 * gnulib/import/m4/malloc.m4: Update.
4598 * gnulib/import/m4/malloca.m4: Update.
4599 * gnulib/import/m4/math_h.m4: Update.
4600 * gnulib/import/m4/mbrtowc.m4: Update.
4601 * gnulib/import/m4/mbsinit.m4: Update.
4602 * gnulib/import/m4/mbsrtowcs.m4: Update.
4603 * gnulib/import/m4/mbstate_t.m4: Update.
4604 * gnulib/import/m4/memchr.m4: Update.
4605 * gnulib/import/m4/memmem.m4: Update.
4606 * gnulib/import/m4/mempcpy.m4: Update.
4607 * gnulib/import/m4/memrchr.m4: Update.
4608 * gnulib/import/m4/mkdir.m4: Update.
4609 * gnulib/import/m4/mkstemp.m4: Update.
4610 * gnulib/import/m4/mmap-anon.m4: Update.
4611 * gnulib/import/m4/mode_t.m4: Update.
4612 * gnulib/import/m4/msvc-inval.m4: Update.
4613 * gnulib/import/m4/msvc-nothrow.m4: Update.
4614 * gnulib/import/m4/multiarch.m4: Update.
4615 * gnulib/import/m4/nocrash.m4: Update.
4616 * gnulib/import/m4/off_t.m4: Update.
4617 * gnulib/import/m4/onceonly.m4: Update.
4618 * gnulib/import/m4/open-cloexec.m4: Update.
4619 * gnulib/import/m4/open.m4: Update.
4620 * gnulib/import/m4/openat.m4: Update.
4621 * gnulib/import/m4/opendir.m4: Update.
4622 * gnulib/import/m4/pathmax.m4: Update.
4623 * gnulib/import/m4/rawmemchr.m4: Update.
4624 * gnulib/import/m4/readdir.m4: Update.
4625 * gnulib/import/m4/readlink.m4: Update.
4626 * gnulib/import/m4/realloc.m4: Update.
4627 * gnulib/import/m4/rename.m4: Update.
4628 * gnulib/import/m4/rewinddir.m4: Update.
4629 * gnulib/import/m4/rmdir.m4: Update.
4630 * gnulib/import/m4/save-cwd.m4: Update.
4631 * gnulib/import/m4/secure_getenv.m4: Update.
4632 * gnulib/import/m4/setenv.m4: Update.
4633 * gnulib/import/m4/signal_h.m4: Update.
4634 * gnulib/import/m4/ssize_t.m4: Update.
4635 * gnulib/import/m4/stat-time.m4: Update.
4636 * gnulib/import/m4/stat.m4: Update.
4637 * gnulib/import/m4/std-gnu11.m4: Update.
4638 * gnulib/import/m4/stdbool.m4: Update.
4639 * gnulib/import/m4/stddef_h.m4: Update.
4640 * gnulib/import/m4/stdint.m4: Update.
4641 * gnulib/import/m4/stdio_h.m4: Update.
4642 * gnulib/import/m4/stdlib_h.m4: Update.
4643 * gnulib/import/m4/strchrnul.m4: Update.
4644 * gnulib/import/m4/strdup.m4: Update.
4645 * gnulib/import/m4/strerror.m4: Update.
4646 * gnulib/import/m4/string_h.m4: Update.
4647 * gnulib/import/m4/strstr.m4: Update.
4648 * gnulib/import/m4/strtok_r.m4: Update.
4649 * gnulib/import/m4/sys_socket_h.m4: Update.
4650 * gnulib/import/m4/sys_stat_h.m4: Update.
4651 * gnulib/import/m4/sys_time_h.m4: Update.
4652 * gnulib/import/m4/sys_types_h.m4: Update.
4653 * gnulib/import/m4/tempname.m4: Update.
4654 * gnulib/import/m4/time_h.m4: Update.
4655 * gnulib/import/m4/unistd-safer.m4: Update.
4656 * gnulib/import/m4/unistd_h.m4: Update.
4657 * gnulib/import/m4/warn-on-use.m4: Update.
4658 * gnulib/import/m4/wchar_h.m4: Update.
4659 * gnulib/import/m4/wchar_t.m4: Update.
4660 * gnulib/import/m4/wctype_h.m4: Update.
4661 * gnulib/import/m4/wint_t.m4: Update.
4662 * gnulib/import/malloc.c: Update.
4663 * gnulib/import/malloc/scratch_buffer.h: Update.
4664 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4665 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4666 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4667 * gnulib/import/malloca.c: Update.
4668 * gnulib/import/malloca.h: Update.
4669 * gnulib/import/malloca.valgrind: Update.
4670 * gnulib/import/math.in.h: Update.
4671 * gnulib/import/mbrtowc.c: Update.
4672 * gnulib/import/mbsinit.c: Update.
4673 * gnulib/import/mbsrtowcs-impl.h: Update.
4674 * gnulib/import/mbsrtowcs-state.c: Update.
4675 * gnulib/import/mbsrtowcs.c: Update.
4676 * gnulib/import/memchr.c: Update.
4677 * gnulib/import/memmem.c: Update.
4678 * gnulib/import/mempcpy.c: Update.
4679 * gnulib/import/memrchr.c: Update.
4680 * gnulib/import/mkdir.c: Update.
4681 * gnulib/import/mkstemp.c: Update.
4682 * gnulib/import/msvc-inval.c: Update.
4683 * gnulib/import/msvc-inval.h: Update.
4684 * gnulib/import/msvc-nothrow.c: Update.
4685 * gnulib/import/msvc-nothrow.h: Update.
4686 * gnulib/import/open.c: Update.
4687 * gnulib/import/openat-die.c: Update.
4688 * gnulib/import/openat-priv.h: Update.
4689 * gnulib/import/openat-proc.c: Update.
4690 * gnulib/import/openat.c: Update.
4691 * gnulib/import/openat.h: Update.
4692 * gnulib/import/opendir.c: Update.
4693 * gnulib/import/pathmax.h: Update.
4694 * gnulib/import/pipe-safer.c: Update.
4695 * gnulib/import/rawmemchr.c: Update.
4696 * gnulib/import/readdir.c: Update.
4697 * gnulib/import/readlink.c: Update.
4698 * gnulib/import/realloc.c: Update.
4699 * gnulib/import/ref-add.sin: Update.
4700 * gnulib/import/ref-del.sin: Update.
4701 * gnulib/import/rename.c: Update.
4702 * gnulib/import/rewinddir.c: Update.
4703 * gnulib/import/rmdir.c: Update.
4704 * gnulib/import/same-inode.h: Update.
4705 * gnulib/import/save-cwd.c: Update.
4706 * gnulib/import/save-cwd.h: Update.
4707 * gnulib/import/scratch_buffer.h: Update.
4708 * gnulib/import/secure_getenv.c: Update.
4709 * gnulib/import/setenv.c: Update.
4710 * gnulib/import/signal.in.h: Update.
4711 * gnulib/import/stat-time.c: Update.
4712 * gnulib/import/stat-time.h: Update.
4713 * gnulib/import/stat-w32.c: Update.
4714 * gnulib/import/stat-w32.h: Update.
4715 * gnulib/import/stat.c: Update.
4716 * gnulib/import/stdbool.in.h: Update.
4717 * gnulib/import/stddef.in.h: Update.
4718 * gnulib/import/stdint.in.h: Update.
4719 * gnulib/import/stdio.in.h: Update.
4720 * gnulib/import/stdlib.in.h: Update.
4721 * gnulib/import/str-two-way.h: Update.
4722 * gnulib/import/strchrnul.c: Update.
4723 * gnulib/import/strdup.c: Update.
4724 * gnulib/import/streq.h: Update.
4725 * gnulib/import/strerror-override.c: Update.
4726 * gnulib/import/strerror-override.h: Update.
4727 * gnulib/import/strerror.c: Update.
4728 * gnulib/import/string.in.h: Update.
4729 * gnulib/import/stripslash.c: Update.
4730 * gnulib/import/strnlen1.c: Update.
4731 * gnulib/import/strnlen1.h: Update.
4732 * gnulib/import/strstr.c: Update.
4733 * gnulib/import/strtok_r.c: Update.
4734 * gnulib/import/sys_stat.in.h: Update.
4735 * gnulib/import/sys_time.in.h: Update.
4736 * gnulib/import/sys_types.in.h: Update.
4737 * gnulib/import/tempname.c: Update.
4738 * gnulib/import/tempname.h: Update.
4739 * gnulib/import/time.in.h: Update.
4740 * gnulib/import/unistd--.h: Update.
4741 * gnulib/import/unistd-safer.h: Update.
4742 * gnulib/import/unistd.in.h: Update.
4743 * gnulib/import/unsetenv.c: Update.
4744 * gnulib/import/verify.h: Update.
4745 * gnulib/import/extra/snippet/warn-on-use.h: Update.
4746 * gnulib/import/wchar.in.h: Update.
4747 * gnulib/import/wctype.in.h: Update.
4748 * gnulib/import/xalloc-oversized.h: Update.
4749 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4750 "53e2c179f26a890fa6685af4b6c1397ee370433b".
4751
4752 2018-08-16 Gary Benson <gbenson@redhat.com>
4753
4754 PR gdb/13000:
4755 * gdb/main.c (captured_main_1): Exit with nonzero status
4756 in batch mode if the last command to be executed failed.
4757 * NEWS: Mention the above.
4758
4759 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
4760
4761 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4762 end of warning message.
4763
4764 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4765
4766 PR gdb/22943:
4767 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4768 (aarch64_extract_return_value): Use
4769 aapcs_is_vfp_call_or_return_candidate.
4770 (aarch64_return_in_memory): Likewise.
4771 (aarch64_store_return_value): Likewise.
4772
4773 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4774
4775 * aarch64-tdep.c
4776 (aapcs_is_vfp_call_or_return_candidate): Make static
4777 (pass_in_v_or_stack): Remove function.
4778 (pass_in_v_vfp_candidate): New function.
4779 (aarch64_push_dummy_call): Check for float register candidates.
4780
4781 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4782
4783 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4784 (aapcs_is_vfp_call_or_return_candidate_1): New function.
4785 (aapcs_is_vfp_call_or_return_candidate): Likewise.
4786
4787 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4788
4789 PR build/23399
4790 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4791 (struct ipa_sym_addresses): Rename to...
4792 (struct ipa_sym_addresses_common): ... this.
4793 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4794
4795 2018-08-28 Tom Tromey <tom@tromey.com>
4796
4797 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4798 (token_fifo): Now a std::vector.
4799 (yylex, c_parse): Update.
4800 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4801 (token_fifo): Now a std::vector.
4802 (yylex, d_parse): Update.
4803 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4804 (token_fifo): Now a std::vector.
4805 (yylex, go_parse): Update.
4806
4807 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
4808
4809 * parser-defs.h (struct type_stack) <elements>: Change type to
4810 std::vector<union type_stack_elt>.
4811 <depth, size>: Remove.
4812 * parse.c (parse_exp_in_context_1): Adjust.
4813 (type_stack_reserve): Remove.
4814 (check_type_stack_depth): Remove.
4815 (insert_into_type_stack): Adjust to std::vector.
4816 (insert_type): Likewise.
4817 (push_type): Likewise.
4818 (push_type_int): Likewise.
4819 (insert_type_address_space): Likewise.
4820 (pop_type): Likewise.
4821 (pop_type_int): Likewise.
4822 (pop_typelist): Likewise.
4823 (pop_type_stack): Likewise.
4824 (append_type_stack): Likewise.
4825 (push_type_stack): Likewise.
4826 (get_type_stack): Likewise.
4827 (type_stack_cleanup): Likewise.
4828 (push_typelist): Likewise.
4829 (follow_types): Likewise.
4830 (_initialize_parse): Likewise.
4831
4832 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
4833
4834 * NEWS: Mention csky target.
4835
4836 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
4837 Hafiz Abid Qadeer <abidh@codesourcery.com>
4838 Don Breazeal <donb@codesourcery.com>
4839
4840 * csky-linux-tdep.c: New file.
4841 * csky-tdep.c: Likewise.
4842 * csky-tdep.h: Likewise.
4843 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4844 csky-tdep.o.
4845 (HFILES_NO_SRCDIR): Add csky-tdep.h.
4846 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4847 * configure.tgt: Add csky support.
4848
4849 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
4850
4851 * python/py-framefilter.c (py_print_frame): Print frame architecture
4852 when printing on an MI output.
4853
4854 2018-08-27 Tom Tromey <tom@tromey.com>
4855
4856 PR build/23087:
4857 * configure: Rebuild.
4858 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4859
4860 2018-08-27 Tom Tromey <tom@tromey.com>
4861
4862 * aarch64-linux-tdep.c
4863 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4864 casts to int.
4865
4866 2018-08-27 Tom Tromey <tom@tromey.com>
4867
4868 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4869 unsigned.
4870 (ppc64_standard_linkage1, ppc64_standard_linkage2)
4871 (ppc64_standard_linkage3, ppc64_standard_linkage4)
4872 (ppc64_standard_linkage5, ppc64_standard_linkage6)
4873 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4874 unsigned.
4875
4876 2018-08-27 Tom Tromey <tom@tromey.com>
4877
4878 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4879 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4880
4881 2018-08-27 Tom Tromey <tom@tromey.com>
4882
4883 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4884 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4885 ULONGEST_MAX.
4886 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4887 ULONGEST_MAX.
4888 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4889 ULONGEST_MAX.
4890 * sparc-linux-tdep.c (sparc32_linux_sigframe)
4891 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4892 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4893 ULONGEST_MAX.
4894 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4895 (ppc64_linux_sigaction_tramp_frame)
4896 (ppc32_linux_sighandler_tramp_frame)
4897 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4898 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4899 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4900 * mn10300-linux-tdep.c (am33_linux_sigframe)
4901 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4902 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4903 * mips-linux-tdep.c (mips_linux_o32_sigframe)
4904 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4905 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4906 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4907 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4908 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4909 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4910 * microblaze-linux-tdep.c
4911 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4912 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4913 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4914 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4915 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4916 * common/common-types.h (ULONGEST_MAX): New define.
4917 (CORE_ADDR_MAX): Fix formatting.
4918 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4919 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4920 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4921 (arm_linux_rt_sigreturn_tramp_frame)
4922 (arm_eabi_linux_sigreturn_tramp_frame)
4923 (arm_eabi_linux_rt_sigreturn_tramp_frame)
4924 (thumb2_eabi_linux_sigreturn_tramp_frame)
4925 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4926 (arm_linux_restart_syscall_tramp_frame)
4927 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4928 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4929 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4930 ULONGEST_MAX.
4931 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4932
4933 2018-08-27 Tom Tromey <tom@tromey.com>
4934
4935 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4936 CORE_ADDR_MAX.
4937 * mips-tdep.c (mips_deal_with_atomic_sequence)
4938 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4939 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4940 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4941 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4942 CORE_ADDR_MAX.
4943 * aarch64-tdep.c (aarch64_software_single_step): Use
4944 CORE_ADDR_MAX.
4945
4946 2018-08-27 Tom Tromey <tom@tromey.com>
4947
4948 * linespec.c (complete_linespec_component): Add cast to "char".
4949 * completer.c (completion_tracker::build_completion_result): Add
4950 cast to "char".
4951
4952 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4953
4954 * solist.h (struct solist, struct target_so_ops): Fix
4955 indentation.
4956
4957 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4958
4959 * ada-tasks.c (ada_task_info_s): Remove typedef.
4960 (DEF_VEC_O(ada_task_info_s)): Remove.
4961 (struct ada_tasks_inferior_data): Initialize fields.
4962 <task_list>: Make an std::vector.
4963 (get_ada_tasks_inferior_data): Allocate with new.
4964 (ada_get_task_number): Adjust.
4965 (get_task_number_from_id): Likewise.
4966 (valid_task_id): Likewise.
4967 (ada_get_task_info_from_ptid): Likewise.
4968 (iterate_over_live_ada_tasks): Likewise.
4969 (add_ada_task): Likewise.
4970 (read_known_tasks): Likewise.
4971 (ada_build_task_list): Likewise.
4972 (print_ada_task_info): Likewise.
4973 (info_task): Likewise.
4974 (task_command_1): Likewise.
4975
4976 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4977
4978 * ada-lang.c (add_angle_brackets): Return std::string.
4979
4980 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
4981
4982 * python/py-threadevent.c (py_get_event_thread): Initialize
4983 pythread.
4984
4985 2018-08-24 Pedro Alves <palves@redhat.com>
4986
4987 * python/py-bpevent.c (create_breakpoint_event_object): Use
4988 copy-initialization.
4989 * python/py-continueevent.c (emit_continue_event): Use
4990 copy-initialization.
4991 * python/py-exitedevent.c (create_exited_event_object): Return a
4992 gdbpy_ref<>.
4993 (emit_exited_event): Use copy-initialization.
4994 * python/py-inferior.c (python_new_inferior)
4995 (python_inferior_deleted, add_thread_object): Use
4996 copy-initialization.
4997 * python/py-infevents.c (create_inferior_call_event_object)
4998 (create_register_changed_event_object)
4999 (create_memory_changed_event_object): Return a gdbpy_ref<>.
5000 (emit_inferior_call_event, emit_memory_changed_event)
5001 (emit_register_changed_event): Use copy-initialization.
5002 * python/py-newobjfileevent.c (create_new_objfile_event_object):
5003 Return a gdbpy_ref<>.
5004 (emit_new_objfile_event): Use copy-initialization.
5005 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
5006 (emit_clear_objfiles_event): Use copy-initialization.
5007 * python/py-signalevent.c (create_signal_event_object): Use
5008 copy-initialization.
5009 * python/py-threadevent.c (create_thread_event_object): Use
5010 copy-initialization.
5011
5012 2018-08-24 Pedro Alves <palves@redhat.com>
5013 Simon Marchi <simon.marchi@ericsson.com>
5014
5015 PR gdb/23379
5016 * python/py-continueevent.c: Include "gdbthread.h".
5017 (create_continue_event_object): Add intro comment. Add 'ptid'
5018 parameter. Use it to find thread to pass to
5019 create_thread_event_object.
5020 (emit_continue_event): Pass PTID down to
5021 create_continue_event_object.
5022 * python/py-event.h (py_get_event_thread): Declare.
5023 (create_thread_event_object): Remove default from 'thread'
5024 parameter.
5025 * python/py-stopevent.c (create_stop_event_object): Use
5026 py_get_event_thread.
5027 * python/py-threadevent.c (get_event_thread): Rename to ...
5028 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
5029 and use it to find the thread.
5030 (create_thread_event_object): Assert that THREAD isn't null.
5031 Don't find the event thread here.
5032
5033 2018-08-23 Kevin Buettner <kevinb@redhat.com>
5034
5035 * block.h (blockrange, blockranges): New struct declarations.
5036 (struct block): Add new field named `ranges'.
5037 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
5038 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
5039 macros for accessing ranges in struct block.
5040 (make_blockranges): New declaration.
5041 block.c (make_blockranges): New function.
5042 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5043 for block.
5044 * symtab.h (find_pc_partial_function): Add new parameter `block'.
5045 * blockframe.c (cache_pc_function_block): New static global.
5046 (clear_pc_function_cache): Clear cache_pc_function_block.
5047 (find_pc_partial_function): Move comment to symtab.h. Add
5048 support for non-contiguous blocks.
5049 * cli/cli-cmds.c (block.h): Include.
5050 (print_disassembly): Handle printing of non-contiguous blocks.
5051 (disassemble_current_function): Likewise.
5052 (disassemble_command): Likewise.
5053
5054 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5055 BLOCK_START.
5056 * blockframe.c (get_pc_function_start): Likewise.
5057 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5058 (gcc_symbol_address): Likewise.
5059 * compile/compile-object-run.c (compile_object_run): Likewise.
5060 * compile/compile.c (get_expr_block_and_pc): Likewise.
5061 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5062 (func_addr_to_tail_call_list): Likewise.
5063 * findvar.c (default_read_var_value): Likewise.
5064 * inline-frame.c (inline_frame_this_id): Likewise.
5065 (skip-inline_frames): Likewise.
5066 * infcmd.c (until_next_command): Likewise.
5067 * linespec.c (convert_linespec_to_sals): Likewise.
5068 * parse.c (parse_exp_in_context_1): Likewise.
5069 * printcmd.c (build_address_symbolic): likewise.
5070 (info_address_command): Likewise.
5071 symtab.c (find_function_start_sal): Likewise.
5072 (skip_prologue_sal): Likewise.
5073 (find_function_alias_target): Likewise.
5074 (find_gnu_ifunc): Likewise.
5075 * stack.c (find_frame_funname): Likewise.
5076 * symtab.c (fixup_symbol_section): Likewise.
5077 (find_function_start_sal): Likewise.
5078 (skip_prologue_sal): Likewsie.
5079 (find_function_alias_target): Likewise.
5080 (find_gnu_ifunc): Likewise.
5081 * tracepoint.c (info_scope_command): Likewise.
5082 * value.c (value_fn_field): Likewise.
5083
5084 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5085 in place of find_pc_partial_function.
5086 * blockframe.c (find_function_entry_range_from_pc): New function.
5087 * symtab.h (find_function_entry_range_from_pc): Declare and document.
5088 * objfiles.c (objfile_relocate1): Relocate start and end addresses
5089 for each range in a block.
5090
5091
5092 2018-08-23 Xavier Roirand <roirand@adacore.com>
5093
5094 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5095 incrementation.
5096
5097 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5098
5099 * solib-svr4.c (read_program_headers_from_bfd): Return
5100 gdb::optional<gdb::byte_vector>.
5101 (svr4_exec_displacement): Adjust.
5102
5103 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5104
5105 * solib-svr4.c (read_program_header): Return
5106 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5107 (find_program_interpreter): Return
5108 gdb::optional<gdb::byte_vector>.
5109 (scan_dyntag_auxv): Adjust.
5110 (enable_break): Adjust.
5111 (svr4_exec_displacement): Adjust.
5112
5113 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5114
5115 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5116 * inf-child.c (inf_child_target::terminal_save_inferior): New.
5117
5118 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5119
5120 * guile/scm-string.c (gdbscm_scm_from_printf): Use
5121 string_vprintf.
5122 * guile/scm-utils.c (gdbscm_printf): Likewise.
5123 * serial.c (serial_printf): Likewise.
5124 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5125
5126 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
5127
5128 * stack.c (print_frame): Print frame architecture when printing on
5129 an MI output.
5130 * NEWS: Mention new "arch" attribute in frame output.
5131
5132 2018-08-21 Alan Hayward <alan.hayward@arm.com>
5133
5134 * arch/aarch64.h (aarch64_regnum): Update comment.
5135
5136 2018-08-21 Alan Hayward <alan.hayward@arm.com>
5137
5138 * NEWS: Add SVE to 8.2 section.
5139
5140 2018-08-21 Pedro Alves <palves@redhat.com>
5141
5142 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5143 out from gdbscm_parse_function_args.
5144 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5145 gdbscm_parse_function_args_1.
5146
5147 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
5148
5149 PR gdb/17816
5150 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5151 operator.
5152
5153 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
5154
5155 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5156
5157 2018-08-19 Michael Spang <spang@google.com>
5158
5159 PR gdb/11786
5160 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5161 for PT_TLS segments.
5162
5163 2018-08-18 Kevin Buettner <kevinb@redhat.com>
5164
5165 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5166 dwarf_variable_value.
5167 * dwarf2-frame.c (class dwarf_expr_executor):
5168 Add override for dwarf_variable_value.
5169 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5170 (class symbol_needs_eval_context): Likewise.
5171 (indirect_synthetic_pointer): Add forward declaration.
5172 (sect_variable_value): New function.
5173 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5174 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5175 for DW_OP_GNU_variable_value.
5176
5177 2018-08-16 Tom Tromey <tom@tromey.com>
5178
5179 * top.c (read_command_file): Update.
5180 (command_line_input): Remove "repeat" argument.
5181 * ada-lang.c (get_selections): Update.
5182 * linespec.c (decode_line_2): Update.
5183 * defs.h (command_line_input): Remove argument.
5184 * cli/cli-script.c (read_next_line): Update.
5185 * python/py-gdb-readline.c: Update.
5186
5187 2018-08-17 Tom Tromey <tom@tromey.com>
5188
5189 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5190 command_line_input.
5191
5192 2018-08-15 Tom Tromey <tom@tromey.com>
5193
5194 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5195
5196 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
5197
5198 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5199 If used, use find_pc_partial_function to find address range
5200 to disassemble.
5201 * mi/mi-main.c (mi_cmd_list_features): Report
5202 "data-disassemble-a-option" feature.
5203 * NEWS: Mention new -data-disassemble option -a.
5204
5205 2018-08-13 Tom Tromey <tom@tromey.com>
5206
5207 * common/common-defs.h (_FORTIFY_SOURCE): Define.
5208
5209 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5210
5211 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5212 (aarch64_linux_collect_sve_regset): Likewise.
5213 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5214 * regcache.h (regcache_map_entry_size): New function.
5215
5216 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5217
5218 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5219 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5220 (SVE_HEADER_VL_LENGTH): Likewise.
5221 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5222 (SVE_HEADER_FLAGS_LENGTH): Likewise.
5223 (SVE_HEADER_RESERVED_LENGTH): Likewise.
5224 (SVE_HEADER_SIZE_OFFSET): Likewise.
5225 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5226 (SVE_HEADER_VL_OFFSET): Likewise.
5227 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5228 (SVE_HEADER_FLAGS_OFFSET): Likewise.
5229 (SVE_HEADER_RESERVED_OFFSET): Likewise.
5230 (SVE_HEADER_SIZE): Likewise.
5231 (aarch64_linux_core_read_vq): Add function.
5232 (aarch64_linux_core_read_description): Check for SVE section.
5233
5234 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5235
5236 * aarch64-fbsd-tdep.c
5237 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5238 collect_size.
5239 * aarch64-linux-tdep.c
5240 (aarch64_linux_iterate_over_regset_sections): Likewise.
5241 * alpha-linux-tdep.c
5242 (alpha_linux_iterate_over_regset_sections):
5243 * alpha-nbsd-tdep.c
5244 (alphanbsd_iterate_over_regset_sections): Likewise.
5245 * amd64-fbsd-tdep.c
5246 (amd64fbsd_iterate_over_regset_sections): Likewise.
5247 * amd64-linux-tdep.c
5248 (amd64_linux_iterate_over_regset_sections): Likewise.
5249 * arm-bsd-tdep.c
5250 (armbsd_iterate_over_regset_sections): Likewise.
5251 * arm-fbsd-tdep.c
5252 (arm_fbsd_iterate_over_regset_sections): Likewise.
5253 * arm-linux-tdep.c
5254 (arm_linux_iterate_over_regset_sections): Likewise.
5255 * corelow.c (get_core_registers_cb): Likewise.
5256 (core_target::fetch_registers): Likewise.
5257 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5258 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5259 * gdbarch.h (void): Regenerate.
5260 * gdbarch.sh: Add supply_size and collect_size.
5261 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5262 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5263 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5264 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5265 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5266 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5267 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5268 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5269 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5270 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5271 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5272 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5273 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5274 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5275 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5276 Likewise.
5277 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5278 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5279 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5280 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5281 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5282 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5283 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5284 Likewise.
5285 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5286 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5287 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5288 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5289 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5290 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5291 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5292 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5293
5294 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
5295
5296 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5297 with string_printf.
5298
5299 2018-08-10 Keith Seitz <keiths@redhat.com>
5300
5301 * compile/compile-c-support.c (add_code_header, add_code_footer):
5302 Move into policy class.
5303 (c_push_user_expression, pop_user_expression_nop)
5304 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5305 (compile_program): New host class.
5306 (c_compile_program): New typedef.
5307 (c_compute_porgram): Use c_compile_program.
5308
5309 2018-08-10 Keith Seitz <keiths@redhat.com>
5310
5311 * compile/compile-internal.h (compile_instance::~compile_instance):
5312 Remove calls to htab_delete.
5313 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5314 * compile.c (compile_instance::compile_instance): Initialize
5315 htab unique pointers.
5316 (compile_instance::get_cached_type, compile_instance::insert_type)
5317 (compile_instance::error_symbol_once): Update for unique_ptr.
5318
5319 2018-08-10 Keith Seitz <keiths@redhat.com>
5320
5321 * compile/compile-c-symbols.c (struct symbol_error)
5322 (hash_symbol_error, eq_symbol_error, del_symbol_error)
5323 (compile_instance::insert_symbol_error)
5324 (compile_instance::error_symbol_once): Move to ...
5325 * compile/compile.c: ... here.
5326
5327 2018-08-10 Keith Seitz <keiths@redhat.com>
5328
5329 * compile/compile-c-support.c (c_get_compile_context): Use `new'
5330 instead of `new_compile_instance'.
5331 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5332 Update description.
5333 If the symbol error map is not initialized, create it.
5334 (generate_c_for_for_one_symbol): Do not check/initialize
5335 the symbol error map.
5336 * compile/compile-c-types.c (compile_c_instance): Make a class.
5337 Update all callers.
5338 (compile_instance::compile_instance): Initialize the type cache.
5339 (get_cached_type): New function.
5340 (insert_type): Update description.
5341 (compile_c_instance::m_default_cflags): Define.
5342 (convert_type): Update description. Use get_cached_type.
5343 (delete_instance): Moved to destructor.
5344 (new_compile_instance): Moved to constructor.
5345 * compile/compile-c.h (compile_c_instance): Make class inheriting
5346 from compile_instance.
5347 <base>: Remove field.
5348 <type_map, symbol_err_map>: Move to base class.
5349 <c_plugin>: Rename to `m_plugin' and remove pointer type.
5350 * compile/compile-internal.h (compile_instance): Make class.
5351 <type_map_t, symbol_err_map_t>: Define.
5352 <fe>: Rename to `m_gcc_fe'.
5353 <scope, block, gcc_target_options>: Add `m_' prefix.
5354 <m_type_map, m_symbol_err_map>: New fields, moved from
5355 compile_c_instance.
5356 <destroy>: Remove.
5357 (convert_type, new_compile_instance): Remove.
5358 * compile/compile.c (cleanup_compile_instance): Remove.
5359 (compile_to_object): Use unique_ptr to eliminate cleanups.
5360 (compile_instance::set_print_callback, compile_instance::version)
5361 (compile_instance::set_verbose)
5362 (compile_instance::set_driver_filename)
5363 (compile_instance::set_triplet_regexp)
5364 (compile_instance::set_arguments)
5365 (compile_instance::set_source_file)
5366 (compile_instance::compile): Define.
5367
5368 2018-08-10 Keith Seitz <keiths@redhat.com>
5369
5370 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5371 * compile/compile-c-types.c: Define GCC_METHODN macros and include
5372 gcc-c-fe.def to define C plugin.
5373 (delete_instance): Delete `c_plugin'.
5374 (new_compile_instance): Initialize `c_plugin'.
5375 * compile/compile-c.h: Include gcc_c_plugin.h.
5376 (struct compile_c_instance) <c_plugin>: New member.
5377 * gcc-c-plugin.h: New file.
5378 Update all callers with API change.
5379
5380 2018-08-10 Keith Seitz <keiths@redhat.com>
5381
5382 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5383 (HFILES_NO_SRCDIR): ... to here.
5384 Add compile-internal.h and compile-c.h.
5385 * compile/compile-c-support.c: Include compile-c.h.
5386 * compile/compile-c-symbols.c: Include compile-c.h.
5387 (generate_c_for_variable_locations): Update comment.
5388 * compile/compile-c-types.c: Include compile-c.h.
5389 * compile/compile-c.h: New file -- moved C language declarations
5390 from other files here.
5391 * compile/compile-internal.h: Do not include hashtab.h or
5392 common/enum-flags.h.
5393 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5394 (gcc_convert_symbol, gcc_symbol_address)
5395 (generate_c_for_variable_locations, c_get_mode_for_size)
5396 (c_get_range_decl_name): Definitions moved to compile-c.h.
5397 * compile/compile-loc2c.c: Include compile-c.h.
5398
5399 2018-08-10 Keith Seitz <keiths@redhat.com>
5400
5401 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5402 (c_symbol_substitution_name): ... this.
5403 Update all callers.
5404
5405 2018-08-10 Keith Seitz <keiths@redhat.com>
5406
5407 * compile/compile-c-support.c (c_compute_program): Use
5408 unique_xmalloc_ptr to eliminate cleanup.
5409 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5410 Return a unique_xmalloc_ptr and eliminate cleanup.
5411 * compile/compile-internal.h (generate_c_for_variable_locations):
5412 Return unique_xmalloc_ptr and update description.
5413
5414 2018-08-10 Alan Hayward <alan.hayward@arm.com>
5415
5416 * corelow.c (core_target::get_core_register_section): Rename
5417 min_size to section_min_size.
5418
5419 2018-08-09 Jim Wilson <jimw@sifive.com>
5420
5421 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5422 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5423 * NEWS: Mention new GNU/Linux RISC-V target.
5424 * configure.host: Add riscv*-*-linux*.
5425 * configure.nat: Add riscv*.
5426 * configure.tgt: Add riscv*-*-linux*.
5427 * riscv-linux-nat.c: New file.
5428 * riscv-linux-tdep.c: New file.
5429
5430 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5431
5432 * infrun.c (resume): Make static, add forward declaration.
5433 (proceed): Update header comment.
5434 * infrun.h (resume): Delete declaration.
5435
5436 2018-08-09 Tom Tromey <tom@tromey.com>
5437
5438 * riscv-tdep.h: Minor formatting fixes.
5439
5440 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
5441
5442 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5443 * dwarf-index-cache.c (create_dir_and_check): Likewise.
5444 (test_mkdir_recursive): Likewise.
5445 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5446
5447 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5448
5449 * valarith.c (value_subscripted_rvalue): If an array is not in
5450 memory, and we don't know the upper bound, then we can't know that
5451 the requested element exists or not.
5452
5453 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
5454
5455 * target.c (str_comma_list_concat_elem): Fix typo in comment.
5456 (target_options_to_string): Add comment.
5457
5458 2018-08-08 Tom Tromey <tom@tromey.com>
5459
5460 * unittests/scoped_mmap-selftests.c: Check result of "write".
5461
5462 2018-08-08 Jim Wilson <jimw@sifive.com>
5463
5464 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5465 (decode_register_index_short): New.
5466 (decode_j_type_insn, decode_cj_type_insn): New.
5467 (decode_b_type_insn, decode_cb_type_insn): New.
5468 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
5469 local xlen. Check xlen when decoding ambiguous compressed insns. In
5470 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5471 is_c_sw_insn instead of is_sw_insn.
5472 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5473 (riscv_software_single_step): New.
5474 * riscv-tdep.h (riscv_software_single_step): Declare.
5475
5476 * riscv-tdep.c (riscv_isa_xlen): Drop static.
5477 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5478
5479 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
5480
5481 PR gdb/18050:
5482 * target.c (dispose_inferior): Don't dispose of inferiors that are
5483 already killed.
5484
5485 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
5486
5487 * remote.c (remote_target::download_tracepoint): Change char* to
5488 const char*.
5489
5490 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
5491
5492 * target.h (target_options_to_string): Return an std::string.
5493 * target.c (str_comma_list_concat_elem): Return void, use
5494 std::string.
5495 (do_option): Likewise.
5496 (target_options_to_string): Return an std::string.
5497 * linux-nat.c (linux_nat_target::wait): Adjust.
5498 * target-debug.h (target_debug_print_options): Adjust.
5499
5500 2018-08-07 Tom Tromey <tom@tromey.com>
5501
5502 * Makefile.in (CPPFLAGS): New variable.
5503 (INTERNAL_CPPFLAGS): Use it.
5504
5505 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5506
5507 * NEWS: Mention the index cache.
5508
5509 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5510
5511 * common/pathstuff.h (get_standard_cache_dir): New.
5512 * common/pathstuff.c (get_standard_cache_dir): New.
5513 * build-id.h (build_id_to_string): New.
5514 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5515 DEBUG_STR_SUFFIX): Move to here.
5516 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5517 DEBUG_STR_SUFFIX): Move from there.
5518 (write_psymtabs_to_index): Make non-static, add basename
5519 parameter. Write to temporary files, rename when done.
5520 (save_gdb_index_command): Adjust call to
5521 write_psymtabs_to_index.
5522 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5523 field.
5524 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5525 (get_gdb_index_contents_from_cache): New.
5526 (get_gdb_index_contents_from_cache_dwz): New.
5527 (dwarf2_initialize_objfile): Read index from cache.
5528 (dwarf2_build_psymtabs): Save to index.
5529 * dwarf-index-cache.h: New file.
5530 * dwarf-index-cache.c: New file.
5531 * dwarf-index-write.h: New file.
5532
5533 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5534
5535 * gnulib/aclocal.m4: Re-generate.
5536 * gnulib/config.in: Re-generate.
5537 * gnulib/configure: Re-generate.
5538 * gnulib/import/Makefile.am: Re-generate.
5539 * gnulib/import/Makefile.in: Re-generate.
5540 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5541 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5542 * gnulib/import/m4/mkdir.m4: New file.
5543 * gnulib/import/mkdir.c: New file.
5544 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5545 module.
5546
5547 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5548
5549 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5550 * common/scoped_mmap.c: New file.
5551 * common/scoped_mmap.h (destroy): New method.
5552 (~scoped_mmap, reset): Use destroy.
5553 (scoped_mmap): New move constructor.
5554 (mmap_file): New declaration.
5555 * unittests/scoped_mmap-selftests.c (test_normal,
5556 test_invalid_filename, run_tests): New functions.
5557 (_initialize_scoped_mmap_selftests): Register selftest.
5558
5559 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5560
5561 * dwarf2read.c (read_gdb_index_from_section): Rename to...
5562 (read_gdb_index_from_buffer): ... this. Remove section
5563 parameter, add buffer parameter.
5564 (get_gdb_index_contents_ftype,
5565 get_gdb_index_contents_dwz_ftype): New typedefs.
5566 (dwarf2_read_gdb_index): Add callback parameters to get the
5567 index contents.
5568 (get_gdb_index_contents_from_section): New.
5569 (dwarf2_initialize_objfile): Update call to
5570 dwarf2_read_gdb_index.
5571
5572 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5573
5574 * common/filestuff.h (gdb_fopen_cloexec): New overload.
5575 (gdb_open_cloexec): Likewise.
5576 * nat/linux-osdata.c (command_from_pid): Use string_printf.
5577 (commandline_from_pid): Likewise.
5578 (linux_xfer_osdata_threads): Likewise.
5579 (linux_xfer_osdata_fds): Likewise.
5580 * ada-lang.c (is_package_name): Likewise.
5581 * auxv.c (procfs_xfer_auxv): Likewise.
5582 * breakpoint.c (print_one_breakpoint_location): Use
5583 uiout::field_fmt.
5584 (print_one_catch_solib): Use string_printf.
5585 * coff-pe-read.c (add_pe_exported_sym): Likewise.
5586 (add_pe_forwarded_sym): Likewise.
5587 * dwarf2read.c (create_type_unit_group): Likewise.
5588 (build_error_marker_type): Likewise.
5589 * infcall.c (get_function_name): Likewise.
5590 * valprint.c (print_converted_chars_to_obstack): Likewise.
5591 * xtensa-tdep.c (xtensa_register_type): Likewise.
5592
5593 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
5594
5595 * remote.c (remote_target::download_tracepoint): Fix format
5596 string errors.
5597
5598 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5599
5600 * tracefile.c: Include common/byte-vector.h.
5601 (trace_save): Change type of buf to gdb::byte_vector. Initialize
5602 with trace_regblock_size if needed. Update uses of buf.
5603
5604 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5605
5606 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5607 std::vector<unsigned char>.
5608 * tracepoint.c (collection_list::collection_list): Remove
5609 m_regs_mask initializer from initializer list. Resize
5610 m_regs_mask using the largest remote register number.
5611 (collection_list::add_remote_register): Remove size check on
5612 m_regs_mask. Use at to access element.
5613 (collection_list::stringify): Change type of temp_buf to
5614 gdb::char_vector. Update uses of temp_buf. Resize if needed to
5615 stringify the register mask. Use pack_hex_byte for the register
5616 mask.
5617
5618 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5619
5620 * tracepoint.h (class collection_list) <add_register>: Remove.
5621 <add_remote_register, add_ax_registers, add_local_register>:
5622 Declare.
5623 <add_memrange>: Add scope parameter.
5624 * tracepoint.c (encode_actions_1): Likewise.
5625 (collection_list::add_register): Rename to ...
5626 (collection_list::add_remote_register): ... this. Update
5627 comment.
5628 (collection_list::add_ax_registers, add_local_register): New
5629 methods.
5630 (collection_list::add_memrange): Add scope parameter. Call
5631 add_local_register instead of add_register.
5632 (finalize_tracepoint_aexpr): New function.
5633 (collection_list::collect_symbol): Update calls to add_memrange.
5634 Call add_local_register instead of add_register. Call
5635 add_ax_registers. Call finalize_tracepoint_aexpr.
5636 (encode_actions_1): Get remote regnos for $reg action. Call
5637 add_remote_register, add_ax_registers, and add_local_register.
5638 Update call to add_memrange. Call finalize_tracepoint_aexpr.
5639 (validate_actionline): Call finalize_tracepoint_aexpr.
5640
5641 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5642
5643 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5644 Replace array buf with gdb::char_vector buf, of size
5645 get_remote_packet_size (). Replace references to buf and
5646 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
5647 and xsnprintf with snprintf. Raise errors if the buffer is too
5648 small.
5649
5650 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5651
5652 * remote.c (remote_target::download_tracepoint): Fix the has_more
5653 predicate in the QTDP action list iteration.
5654
5655 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5656
5657 * remote.c (remote_target::download_tracepoint): Fix indentation
5658 in for block.
5659
5660 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5661
5662 * proc-api.c (_initialize_proc_api): Remove c, unused.
5663 * procfs.c (procfs_init_inferior): Remove signals, unused.
5664 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5665 unused.
5666
5667 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
5668 Andrew Burgess <andrew.burgess@embecosm.com>
5669
5670 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5671 'W_STOPCODE (0)' as this could be ambiguous.
5672
5673 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
5674
5675 * ser-tcp.c (net_open): Fix thinko when deciding whether to
5676 disable TCP's Nagle algorithm (use "ai_protocol" instead of
5677 "ai_socktype").
5678
5679 2018-08-02 Tom Tromey <tom@tromey.com>
5680
5681 PR symtab/16842.
5682 * dwarf2read.c (read_func_scope): Set symtab on template parameter
5683 symbols.
5684 (process_structure_scope): Likewise.
5685
5686 2018-08-02 Xavier Roirand <roirand@adacore.com>
5687
5688 PR gdb/22629:
5689 * darwin-nat.c (darwin_kill_inferior): Fix handling of
5690 kill inferior.
5691
5692 2018-08-02 Tom Tromey <tom@tromey.com>
5693
5694 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5695 (darwin_suspend_inferior, darwin_resume_inferior)
5696 (darwin_decode_notify_message, darwin_resume_inferior_threads)
5697 (darwin_check_new_threads): Check result of get_darwin_inferior.
5698
5699 2018-07-31 Joel Brobecker <brobecker@adacore.com>
5700
5701 GDB 8.1.1 released.
5702
5703 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
5704
5705 * varobj.c (varobj_get_path_expr_parent): Report an error if
5706 parent is a dynamic varobj.
5707
5708 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5709
5710 * gnulib/aclocal.m4: Re-generate.
5711 * gnulib/config.in: Re-generate.
5712 * gnulib/configure: Re-generate.
5713 * gnulib/import/Makefile.in: Re-generate.
5714 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5715 * gnulib/import/m4/onceonly.m4: Re-generate.
5716
5717 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5718
5719 * target-descriptions.c (struct xml_test_tdesc): New.
5720 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5721 (record_xml_tdesc): Update.
5722 (maintenance_check_xml_descriptions): Update.
5723 * target-descriptions.h (record_xml_tdesc): Update comment.
5724
5725 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
5726
5727 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5728 checking array bounds are defined.
5729
5730 2018-07-30 Tom Tromey <tom@tromey.com>
5731
5732 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5733 irreflexivity violation.
5734
5735 2018-07-30 Tom Tromey <tom@tromey.com>
5736
5737 * cli/cli-decode.c (lookup_cmd): Remove lint code.
5738 * value.c (unpack_long): Remove lint code.
5739 * valops.c (value_ind): Remove lint code.
5740 * valarith.c (value_x_binop, value_x_unop, value_equal)
5741 (value_pos): Remove lint code.
5742
5743 2018-07-28 Tom de Vries <tdevries@suse.de>
5744
5745 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5746 with undefined upper bound as <optimized out>.
5747
5748 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
5749
5750 * gcore.in: Rename variable "name" to "prefix". Expand
5751 "usage" text.
5752
5753 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
5754
5755 * windows-nat.c (windows_nat_target::create_inferior): Update to
5756 call close() in global namespace.
5757
5758 2018-07-26 Tom Tromey <tom@tromey.com>
5759
5760 * dwarf-index-write.c (add_address_entry): Don't add objfile
5761 offsets.
5762 * dbxread.c (find_stab_function): Rename from
5763 find_stab_function_addr. Return a bound_minimal_symbol.
5764 (read_dbx_symtab): Use raw_text_low, raw_text_high.
5765 Don't add objfile offsets.
5766 (end_psymtab): Use raw_text_low, raw_text_high,
5767 MSYMBOL_VALUE_RAW_ADDRESS.
5768 (read_ofile_symtab): Update.
5769 (process_one_symbol): Update.
5770 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5771 offsets.
5772 (dw2_relocate): Remove.
5773 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5774 searching addrmap.
5775 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5776 Update.
5777 (process_psymtab_comp_unit_reader, add_partial_symbol)
5778 (add_partial_subprogram, dwarf2_ranges_read): Update.
5779 (load_partial_dies): Update.
5780 (add_address_entry): Don't add objfile offsets.
5781 (dwarf2_build_include_psymtabs): Update.
5782 (create_addrmap_from_aranges): Don't add objfile offsets.
5783 (dw2_find_pc_sect_compunit_symtab): Update.
5784 * mdebugread.c (parse_symbol): Don't add objfile offsets.
5785 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5786 Update.
5787 (parse_partial_symbols): Don't add objfile offsets. Use
5788 raw_text_low, raw_text_high. Update.
5789 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5790 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5791 or call 'relocate' quick function. Clear psymbol_map.
5792 * psympriv.h (struct partial_symbol) <address>: Add section
5793 offset.
5794 <set_unrelocated_address>: Rename from set_address.
5795 <raw_text_low, raw_text_high>: New methods.
5796 <text_low, text_high>: Add objfile parameter.
5797 (add_psymbol_to_bcache): Add 'section' parameter. Call
5798 set_unrelocated_address.
5799 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5800 (find_pc_psymbol): Update.
5801 (fixup_psymbol_section, relocate_psymtabs): Remove.
5802 (dump_psymtab, psym_functions): Update.
5803 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5804 parameter.
5805 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5806 (start_psymtab_common): Update.
5807 * symfile-debug.c (debug_qf_relocate): Remove.
5808 (debug_sym_quick_functions): Update.
5809 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5810 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5811 Update.
5812
5813 2018-07-26 Tom Tromey <tromey@redhat.com>
5814
5815 * dbxread.c (end_psymtab): Use text_high_valid and
5816 text_low_valid.
5817 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5818 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5819 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5820 Update comment.
5821 <text_low_valid, text_high_valid>: New fields.
5822 <set_text_low, set_text_high>: Update.
5823 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5824
5825 2018-07-26 Tom Tromey <tom@tromey.com>
5826
5827 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5828 Update.
5829 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5830 textlow and texthigh fields.
5831 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5832 Update.
5833 * mdebugread.c (parse_lines, parse_partial_symbols)
5834 (psymtab_to_symtab_1): Update.
5835 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5836 Rename fields. Update comment. Now private.
5837 <text_low, text_high, set_text_low, set_text_high>: New methods.
5838 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5839 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5840 (start_psymtab_common, maintenance_info_psymtabs)
5841 (maintenance_check_psymtabs): Update.
5842 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5843 texthigh fields.
5844 (scan_xcoff_symtab): Update.
5845
5846 2018-07-26 Tom Tromey <tromey@redhat.com>
5847
5848 * psympriv.h (struct partial_symbol) <unrelocated_address,
5849 address, set_address>: New methods.
5850 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5851 (fixup_psymbol_section, relocate_psymtabs): Update.
5852 (print_partial_symbols): Add 'objfile' parameter. Update.
5853 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5854 Update.
5855
5856 2018-07-26 Tom Tromey <tom@tromey.com>
5857
5858 * dwarf-index-write.c (write_psymbols, debug_names::insert)
5859 (debug_names::write_psymbols): Update.
5860 * psympriv.h (struct partial_symbol): Derive from
5861 general_symbol_info.
5862 <obj_section>: New method.
5863 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5864 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5865 (find_pc_sect_psymbol, fixup_psymbol_section)
5866 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5867 (print_partial_symbols, recursively_search_psymtabs)
5868 (compare_psymbols, psymbol_hash, psymbol_compare)
5869 (add_psymbol_to_bcache, maintenance_check_psymtabs)
5870 (psymbol_name_matches, psym_fill_psymbol_map): Update.
5871
5872 2018-07-26 Tom Tromey <tromey@redhat.com>
5873
5874 * dbxread.c (end_psymtab): Remove dead code.
5875
5876 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
5877
5878 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5879 DWARF unwinders are disabled.
5880 * dwarf2-frame.c: Add dwarf2read.h include.
5881 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5882 disabled.
5883 (dwarf2_frame_unwinders_enabled_p): Define.
5884 (show_dwarf_unwinders_enabled_p): New function.
5885 (_initialize_dwarf2_frame): Register switch to control DWARF
5886 unwinder use.
5887 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5888 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5889 (show_dwarf_cmdlist): Remove static keyword.
5890 * dwarf2read.h (set_dwarf_cmdlist): Declare.
5891 (show_dwarf_cmdlist): Declare.
5892 * NEWS: Document new feature.
5893
5894 2018-07-26 Tom de Vries <tdevries@suse.de>
5895
5896 PR breakpoints/23366
5897 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5898
5899 2018-07-26 Tom de Vries <tdevries@suse.de>
5900
5901 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5902 DW_AT_count can't be translated to a dynamic prop.
5903
5904 2018-07-25 Tom de Vries <tdevries@suse.de>
5905
5906 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5907 try/catch.
5908
5909 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
5910
5911 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5912
5913 2018-07-25 Joel Brobecker <brobecker@adacore.com>
5914
5915 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5916
5917 2018-07-24 Keith Seitz <keiths@redhat.comt
5918
5919 PR symtab/23010
5920 * dwarf2read.c (dw2_add_symbol_to_list): New function.
5921 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5922 instead of add_symbol_to_list.
5923 (read_file_scope): Call prepare_one_comp_unit before reading
5924 any other DIEs.
5925
5926 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
5927
5928 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5929
5930 2018-07-24 Tom Tromey <tom@tromey.com>
5931
5932 * utils.c (malloc, realloc, free): Don't declare.
5933 * configure, config.in: Rebuild.
5934 * configure.ac: Don't check for declarations of free, malloc, or
5935 realloc.
5936
5937 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5938
5939 * aarch64-linux-nat.c
5940 (aarch64_linux_nat_target::stopped_data_address): Remove unused
5941 variable.
5942 * arm-linux-nat.c (fetch_regs): Likewise.
5943 (store_regs): Likewise.
5944 (fetch_vfp_regs): Likewise.
5945 (store_vfp_regs): Likewise.
5946 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5947 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5948 (arm_linux_nat_target::insert_watchpoint): Likewise.
5949 (arm_linux_nat_target::remove_watchpoint): Likewise.
5950 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5951 Likewise.
5952 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5953 Likewise.
5954 * ppc-linux-nat.c (fetch_register): Likewise.
5955 (fetch_all_gp_regs): Likewise.
5956 (fetch_ppc_registers): Likewise.
5957 (store_all_gp_regs): Likewise.
5958 (store_ppc_registers): Likewise.
5959 (hwdebug_insert_point): Likewise.
5960 (can_use_watchpoint_cond_accel): Likewise.
5961 * remote-sim.c (gdb_os_write_stdout): Likewise.
5962
5963 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5964 Tom Tromey <tom@tromey.com>
5965
5966 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5967 test for it.
5968 * configure: Rebuild.
5969
5970 2018-07-22 Tom Tromey <tom@tromey.com>
5971
5972 * regformats/regdat.sh: Define xmltarget_${name} inside
5973 #ifndef IN_PROCESS_AGENT.
5974
5975 2018-07-22 Tom Tromey <tom@tromey.com>
5976
5977 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5978
5979 2018-07-22 Tom Tromey <tom@tromey.com>
5980
5981 * symfile.c (reread_symbols): Notify iter, not objfile.
5982
5983 2018-07-22 Tom Tromey <tom@tromey.com>
5984
5985 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5986 Use arch_ops.
5987 (ravenscar_thread_target::prepare_to_store): Likewise.
5988
5989 2018-07-22 Tom Tromey <tom@tromey.com>
5990
5991 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5992 unused variable. Call value_fetch_lazy when needed.
5993 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5994 Remove unused variable. Call value_fetch_lazy when needed.
5995
5996 2018-07-22 Tom Tromey <tom@tromey.com>
5997
5998 * m32c-tdep.c (mark_dma): Return void.
5999 (make_regs): Remove unused declarations.
6000
6001 2018-07-22 Tom Tromey <tom@tromey.com>
6002
6003 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
6004 cmdscm_get_valid_command_smob_arg_unsafe for effect.
6005 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
6006 bkscm_get_valid_block_smob_arg_unsafe for effect.
6007
6008 2018-07-22 Tom Tromey <tom@tromey.com>
6009
6010 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
6011 value_type.
6012
6013 2018-07-22 Tom Tromey <tom@tromey.com>
6014
6015 * windows-nat.c (saved_context): Conditionally define.
6016 * remote.c (remote_target::remote_btrace_maybe_reopen):
6017 Conditionally declare "warned".
6018 * inflow.c (sigquit_ours): Conditionally define.
6019 (new_tty): Move "tty" declaration inside #if.
6020 * guile/guile.c (guile_datadir): Conditionally define.
6021 * charset.c (set_be_le_names): Move some declarations inside #if.
6022 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
6023 #if.
6024 (parse_xml_btrace_conf): Likewise.
6025
6026 2018-07-22 Tom Tromey <tom@tromey.com>
6027
6028 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
6029
6030 2018-07-22 Tom Tromey <tom@tromey.com>
6031
6032 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
6033 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
6034 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
6035 * buildsym-legacy.c (get_macro_table): Remove unused variable.
6036 * stack.c (frame_apply_level_command): Remove unused variable.
6037 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
6038 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
6039 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6040 unused variable.
6041 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6042 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6043 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6044 variable.
6045 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6046 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6047 variable.
6048 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6049 Remove unused variable.
6050 * cli/cli-script.c (recurse_read_control_structure): Remove unused
6051 variable.
6052 * common/tdesc.c (print_xml_feature::visit): Remove unused
6053 variable.
6054 * compile/compile-object-load.c (store_regs): Remove unused
6055 variables.
6056 * complaints.c (clear_complaints): Remove unused variable.
6057 * corelow.c (core_target_open): Remove unused variable.
6058 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6059 variable.
6060 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6061 variable.
6062 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6063 variable.
6064 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6065 variable.
6066 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6067 variable.
6068 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6069 variable.
6070 * ia64-tdep.c (examine_prologue): Remove unused variable.
6071 * infcall.c (run_inferior_call): Remove unused variable.
6072 * inferior.c (exit_inferior): Remove unused variable.
6073 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6074 * linespec.c (decode_line_2): Remove unused variable.
6075 * linux-nat.c (super_close): Remove.
6076 * linux-tdep.c (linux_info_proc): Remove unused variable.
6077 * mi/mi-main.c (mi_execute_command): Remove unused variable.
6078 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6079 Remove unused variable.
6080 * parse.c (find_minsym_type_and_address): Remove unused variable.
6081 * printcmd.c (info_symbol_command, printf_floating): Remove unused
6082 variable.
6083 * python/py-breakpoint.c (bppy_set_commands): Remove unused
6084 variable.
6085 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6086 variables.
6087 * record-btrace.c (record_btrace_target::store_registers): Remove
6088 unused variable.
6089 (cmd_show_record_btrace_cpu): Remove unused variable.
6090 * riscv-tdep.c (riscv_register_reggroup_p)
6091 (riscv_push_dummy_call, riscv_return_value): Remove unused
6092 variable.
6093 * rust-exp.y (literal): Remove unused variable.
6094 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6095 unused variable.
6096 <STRUCTOP_ANONYMOUS>: Likewise.
6097 * s390-linux-tdep.c (s390_linux_init_abi_31)
6098 (s390_linux_init_abi_64): Remove unused variable.
6099 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6100 (file_select_thread, net_windows_open, _initialize_ser_windows):
6101 Remove unused variables.
6102 * symtab.c (find_pc_sect_line): Remove unused variable.
6103 * target-memory.c (compute_garbled_blocks): Remove unused
6104 variable.
6105 (target_write_memory_blocks): Remove unused variable.
6106 * target.c (target_stack::unpush): Remove unused variables.
6107 * tracepoint.c (start_tracing, all_tracepoint_actions)
6108 (merge_uploaded_trace_state_variables)
6109 (print_one_static_tracepoint_marker): Remove unused variable.
6110 * unittests/basic_string_view/element_access/char/1.cc (test01):
6111 Remove unused variable.
6112 * windows-nat.c (windows_continue, windows_add_all_dlls)
6113 (do_initial_windows_stuff, windows_nat_target::create_inferior):
6114 Remove unused variables.
6115
6116 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
6117
6118 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6119 attr_profile in HAVE_ELF.
6120 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6121 HAVE_ELF.
6122
6123 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
6124
6125 * frame.c (frame_register_unwind): Change parameter name.
6126 (frame_unwind_register): Likewise.
6127 (frame_unwind_register_value): Likewise.
6128 (frame_unwind_register_signed): Likewise.
6129 (frame_unwind_register_unsigned): Likewise.
6130 * frame.h (frame_register_unwind): Likewise.
6131 (frame_unwind_register): Likewise.
6132 (frame_unwind_register_value): Likewise.
6133 (frame_unwind_register_signed): Likewise.
6134 (frame_unwind_register_unsigned): Likewise.
6135 (frame_unwind_arch): Likewise.
6136
6137 2018-07-20 Maciej W. Rozycki <macro@mips.com>
6138
6139 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6140 ISA maintenance.
6141
6142 2018-07-20 Maciej W. Rozycki <macro@mips.com>
6143
6144 * mips-linux-nat.c (mips_linux_nat_target::read_description):
6145 Call `get_ptrace_pid' rather than extracting the ptrace PID by
6146 hand.
6147
6148 2018-07-20 Keith Seitz <keiths@redhat.com>
6149
6150 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6151 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6152 m_compunit_symtab, m_language>: Add "m_" prefix.
6153 Update all uses.
6154 * buildsym.c: Update all uses.
6155
6156 2018-07-20 Tom Tromey <tom@tromey.com>
6157
6158 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6159 * buildsym.h (record_line_ftype): Remove typedef.
6160
6161 2018-07-20 Tom Tromey <tom@tromey.com>
6162
6163 * buildsym-legacy.h (augment_type_symtab): Don't declare.
6164 (end_expandable_symtab): Likewise.
6165 (end_symtab_get_static_block): Likewise.
6166 (end_symtab_from_static_block): Likewise.
6167 * buildsym-legacy.c (augment_type_symtab): Remove.
6168 (end_expandable_symtab): Remove.
6169 (end_symtab_get_static_block): Remove.
6170 (end_symtab_from_static_block): Remove.
6171
6172 2018-07-20 Tom Tromey <tom@tromey.com>
6173
6174 * dwarf2read.c: Include buildsym.h.
6175 (struct dwarf2_cu) <builder>: New method.
6176 (fixup_go_packaging): Update.
6177 (process_full_comp_unit, process_full_type_unit): Update. Don't
6178 use scoped_free_pendings.
6179 (using_directives): Add "cu" parameter, remove "language".
6180 (read_import_statement, setup_type_unit_groups, )
6181 (read_func_scope, read_lexical_block_scope)
6182 (dwarf2_record_block_ranges, read_namespace): Update.
6183 (lnp_state_machine::lnp_state_machine): Add cu parameter.
6184 (lnp_state_machine::handle_end_sequence): Update.
6185 (class lnp_state_machine) <m_cu>: New member.
6186 <m_record_line_callback>: Remove.
6187 <m_currently_recording_lines>: New member.
6188 (lnp_state_machine::handle_set_file): Update.
6189 (noop_record_line): Remove.
6190 (dwarf_record_line_p): Add cu parameter.
6191 (dwarf_record_line_1, dwarf_finish_line): Likewise.
6192 (lnp_state_machine::record_line)
6193 (lnp_state_machine::lnp_state_machine)
6194 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6195 (dwarf_decode_lines): Update.
6196 (dwarf2_start_subfile): Add cu parameter.
6197 (dwarf2_start_symtab, new_symbol): Update.
6198 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6199 Remove dwarf2_per_objfile parameter.
6200 (dwarf_decode_macros): Update.
6201
6202 2018-07-20 Tom Tromey <tom@tromey.com>
6203
6204 * stabsread.c (define_symbol): Update.
6205 * buildsym-legacy.h (get_buildsym_compunit): Declare.
6206 * dwarf2read.c (new_symbol): Update.
6207 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6208 * cp-namespace.c: Include buildsym.h.
6209 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6210 * buildsym-legacy.c (get_buildsym_compunit): New function.
6211
6212 2018-07-20 Tom Tromey <tom@tromey.com>
6213
6214 * xcoffread.c: Include buildsym-legacy.h.
6215 * windows-nat.c: Include buildsym-legacy.h.
6216 * stabsread.c: Include buildsym-legacy.h.
6217 * mdebugread.c: Include buildsym-legacy.h.
6218 * buildsym-legacy.h: New file.
6219 * buildsym-legacy.c: New file, from buildsym.c.
6220 * go32-nat.c: Include buildsym-legacy.h.
6221 * dwarf2read.c: Include buildsym-legacy.h.
6222 * dbxread.c: Include buildsym-legacy.h.
6223 * cp-namespace.c: Include buildsym-legacy.h.
6224 * coffread.c: Include buildsym-legacy.h.
6225 * buildsym.h: Move some contents to buildsym-legacy.h.
6226 * buildsym.c: Include buildsym-legacy.h. Move many functions to
6227 buildsym-legacy.c.
6228 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6229
6230 2018-07-20 Tom Tromey <tom@tromey.com>
6231
6232 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6233 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6234 (buildsym_compunit::buildsym_compunit)
6235 (buildsym_compunit::~buildsym_compunit)
6236 (buildsym_compunit::get_macro_table): Define.
6237
6238 2018-07-20 Tom Tromey <tom@tromey.com>
6239
6240 * buildsym.c (reset_symtab_globals): Remove.
6241 (buildsym_compunit::end_symtab_from_static_block): Update.
6242 (buildsym_compunit::augment_type_symtab): Update.
6243 (end_symtab_from_static_block): Call free_buildsym_compunit.
6244 (augment_type_symtab, end_symtab, end_expandable_symtab):
6245 Likewise.
6246
6247 2018-07-20 Tom Tromey <tom@tromey.com>
6248
6249 * arch-utils.c: Do not include buildsym.h.
6250 * mipsread.c: Do not include buildsym.h.
6251 * machoread.c: Do not include buildsym.h.
6252 * elfread.c: Do not include buildsym.h.
6253
6254 2018-07-20 Tom Tromey <tom@tromey.com>
6255
6256 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6257 initialization.
6258 (buildsym_compunit): Add new constructor.
6259 (struct buildsym_compunit) <get_last_source_file, finish_block,
6260 record_block_range, start_subfile, patch_subfile_names,
6261 push_subfile, pop_subfile, record_line, get_compunit_symtab,
6262 set_last_source_start_addr, get_last_source_start_addr,
6263 get_local_using_directives, set_local_using_directives,
6264 get_global_using_directives, outermost_context_p,
6265 get_current_context_stack, get_context_stack_depth,
6266 get_current_subfile, get_local_symbols, get_file_symbols,
6267 get_global_symbols, record_debugformat, record_producer,
6268 push_context, pop_context, end_symtab_get_static_block,
6269 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6270 New public methods.
6271 <record_pending_block, finish_block_internal, make_blockvector,
6272 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6273 private methods.
6274 Update all users.
6275
6276 2018-05-22 Tom Tromey <tom@tromey.com>
6277
6278 * buildsym.c (record_pending_block): Move earlier. Remove objfile
6279 parameter.
6280 (finish_block_internal): Update.
6281
6282 2018-07-20 Tom Tromey <tom@tromey.com>
6283
6284 * buildsym.c (record_pending_block): Move earlier. Remove objfile
6285 parameter.
6286 (finish_block_internal): Update.
6287
6288 2018-07-20 Tom Tromey <tom@tromey.com>
6289
6290 * buildsym.h (EXTERN): Don't define or undef.
6291 * buildsym.c (EXTERN): Don't define.
6292
6293 2018-07-20 Tom Tromey <tom@tromey.com>
6294
6295 * buildsym.c: Remove TODO comment.
6296
6297 2018-07-20 Tom Tromey <tom@tromey.com>
6298
6299 * coffread.c (coff_symtab_read): Update.
6300 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6301 (xcoff_new_init): Update.
6302 * mipsread.c (mipscoff_new_init): Update.
6303 * mdebugread.c (mdebug_build_psymtabs): Update.
6304 * elfread.c (elf_new_init): Update.
6305 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6306 Update.
6307 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6308 (coffstab_build_psymtabs, elfstab_build_psymtabs)
6309 (stabsect_build_psymtabs): Update.
6310 * buildsym.h (buildsym_init): Don't declare.
6311 * buildsym.c: Update comment.
6312 (prepare_for_building): Remove.
6313 (start_symtab, restart_symtab): Update.
6314 (reset_symtab_globals): Update comment.
6315 (buildsym_init): Remove.
6316
6317 2018-07-20 Tom Tromey <tom@tromey.com>
6318
6319 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6320 * stabsread.c (patch_block_stabs, define_symbol, read_type)
6321 (read_enum_type, common_block_start, common_block_end)
6322 (cleanup_undefined_types_1, finish_global_stabs): Update.
6323 * mdebugread.c (psymtab_to_symtab_1): Update.
6324 * dwarf2read.c (fixup_go_packaging, read_func_scope)
6325 (read_lexical_block_scope, new_symbol): Update.
6326 * dbxread.c (process_one_symbol): Update.
6327 * coffread.c (coff_symtab_read, process_coff_symbol)
6328 (coff_read_enum_type): Update.
6329 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6330 declare.
6331 (get_local_symbols, get_file_symbols, get_global_symbols): New
6332 functions.
6333 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6334 m_global_symbols.
6335 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6336 (~scoped_free_pendings): Update.
6337 (finish_block, prepare_for_building, reset_symtab_globals)
6338 (end_symtab_get_static_block, end_symtab_with_blockvector)
6339 (augment_type_symtab, push_context): Update.
6340 (get_local_symbols, get_file_symbols, get_global_symbols): New
6341 functions.
6342 (buildsym_init): Update.
6343
6344 2018-07-20 Tom Tromey <tom@tromey.com>
6345
6346 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6347 (process_full_type_unit): Likewise.
6348 (dwarf2_start_symtab): Set list_in_scope.
6349
6350 2018-07-20 Tom Tromey <tom@tromey.com>
6351
6352 * dwarf2read.c (process_psymtab_comp_unit_reader)
6353 (build_type_psymtabs_reader): Do not set list_in_scope.
6354
6355 2018-07-20 Tom Tromey <tom@tromey.com>
6356
6357 * buildsym.c (free_pendings): Remove.
6358 (add_symbol_to_list, scoped_free_pendings)
6359 (finish_block_internal, buildsym_init): Update.
6360
6361 2018-07-20 Tom Tromey <tom@tromey.com>
6362
6363 * xcoffread.c (read_xcoff_symtab): Update.
6364 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6365 Update.
6366 * dbxread.c (process_one_symbol): Update.
6367 * coffread.c (coff_symtab_read): Update.
6368 * buildsym.h (finish_block): Update.
6369 * buildsym.c (finish_block): Remove "listhead" argument.
6370 (end_symtab_get_static_block): Update.
6371
6372 2018-07-20 Tom Tromey <tom@tromey.com>
6373
6374 * buildsym.h (class scoped_free_pendings): Remove constructor.
6375 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6376 method.
6377 <m_pending_block_obstack, m_pending_blocks>: New members.
6378 (pending_block_obstack, pending_blocks): Remove.
6379 (scoped_free_pendings::scoped_free_pendings): Default.
6380 (~scoped_free_pendings): Update.
6381 (free_pending_blocks): Remove.
6382 (finish_block_internal, record_pending_block, make_blockvector)
6383 (end_symtab_get_static_block, augment_type_symtab, push_context)
6384 (buildsym_init): Update.
6385
6386 2018-07-20 Tom Tromey <tom@tromey.com>
6387
6388 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6389 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6390 members.
6391 (pending_addrmap, pending_addrmap_obstack)
6392 (pending_addrmap_interesting): Remove.
6393 (scoped_free_pendings, record_block_range, make_blockvector)
6394 (prepare_for_building, reset_symtab_globals, buildsym_init):
6395 Update.
6396
6397 2018-07-20 Tom Tromey <tom@tromey.com>
6398
6399 * xcoffread.c (process_linenos): Update.
6400 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6401 * mdebugread.c (psymtab_to_symtab_1): Update.
6402 * dwarf2read.c (setup_type_unit_groups)
6403 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6404 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6405 * dbxread.c (process_one_symbol): Update.
6406 * coffread.c (coff_symtab_read, enter_linenos)
6407 (process_coff_symbol): Update.
6408 * buildsym.h (current_subfile): Don't declare.
6409 (get_current_subfile): Declare.
6410 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6411 member.
6412 (start_subfile, free_buildsym_compunit, push_subfile)
6413 (prepare_for_building, start_symtab): Update.
6414 (get_current_subfile): New function.
6415
6416 2018-07-20 Tom Tromey <tom@tromey.com>
6417
6418 * coffread.c (coff_symtab_read): Update.
6419 * xcoffread.c (read_xcoff_symtab): Update.
6420 * dwarf2read.c (new_symbol): Update.
6421 (read_func_scope, read_lexical_block_scope): Update.
6422 * dbxread.c (process_one_symbol): Update.
6423 * buildsym.h (context_stack, context_stack_depth): Don't declare.
6424 (outermost_context_p): Remove macro.
6425 (outermost_context_p, get_current_context_stack)
6426 (get_context_stack_depth): Declare.
6427 (pop_context): Return struct context_stack.
6428 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6429 member.
6430 (context_stack_size): Remove.
6431 (INITIAL_CONTEXT_STACK_SIZE): Remove.
6432 (prepare_for_building, end_symtab_get_static_block)
6433 (augment_type_symtab, push_context): Update.
6434 (pop_context): Return struct context_stack.
6435 (outermost_context_p, get_current_context_stack)
6436 (get_context_stack_depth): New functions.
6437 (buildsym_init): Update.
6438
6439 2018-07-20 Tom Tromey <tom@tromey.com>
6440
6441 * rust-exp.y: Now a pure parser. Update all rules.
6442 (%union): Move earlier.
6443 (current_parser, work_obstack): Remove globals.
6444 (rust_parser, ~rust_parser): Update.
6445 (class rust_parser) <copy_name, concat3, crate_name, super_name,
6446 lex_character, lex_number, lex_string, lex_identifier,
6447 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6448 convert_name, convert_params_to_expression,
6449 convert_ast_to_expression, ast_basic_type, ast_operation,
6450 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6451 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6452 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6453 ast_array_type, ast_slice_type, ast_reference_type,
6454 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6455 (rust_parse): Update.
6456 (rustyyerror, rustyylex): Add parser parameter.
6457 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6458 (rust_lex_stringish_test, rust_lex_test_sequence)
6459 (rust_lex_test_trailing_dot, rust_lex_test_completion)
6460 (rust_lex_test_push_back, rust_lex_tests): Update.
6461
6462 2018-07-19 Pedro Alves <palves@redhat.com>
6463
6464 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6465 gdb::unique_xmalloc_ptr.
6466 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6467 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6468 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6469 copy-initialization.
6470 * guile/scm-pretty-print.c (ppscm_print_children): Use
6471 gdb::unique_xmalloc_ptr instead of cleanups.
6472 (gdbscm_apply_val_pretty_printer): Remove cleanups.
6473 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6474 gdb::unique_xmalloc_ptr.
6475 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6476 Adjust to use gdb::unique_xmalloc_ptr.
6477 * guile/scm-utils.c (extract_arg): Adjust.
6478 * guile/scm-value.c (gdbscm_value_field): Adjust to use
6479 gdb::unique_xmalloc_ptr instead of a cleanup.
6480
6481 2018-07-19 Tom Tromey <tom@tromey.com>
6482
6483 * utils.c (do_value_free_to_mark)
6484 (make_cleanup_value_free_to_mark): Remove.
6485 * utils.h (make_cleanup_value_free_to_mark): Remove.
6486
6487 2018-07-19 Pedro Alves <palves@redhat.com>
6488
6489 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6490 forwarding reference.
6491
6492 2018-07-18 Pedro Alves <palves@redhat.com>
6493
6494 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6495 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
6496 cleanup.
6497
6498 2018-07-18 Pedro Alves <palves@redhat.com>
6499
6500 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6501 exceptions.
6502 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6503 (gdbscm_wrap): New.
6504 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6505 directly instead of a cleanup.
6506 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6507 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
6508 (vlscm_binop_gdbthrow): New, factored out from ...
6509 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
6510 (vlscm_rich_compare): Use gdbscm_wrap.
6511 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6512 instead of a cleanup.
6513 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6514 cleanup.
6515 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6516 Use xfree directly instead of a cleanup.
6517 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6518 Adjust to use gdbscm_wrap and scoped_value_mark.
6519 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6520 (gdbscm_value_address, gdbscm_value_dereference)
6521 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6522 scoped_value_mark.
6523 (gdbscm_value_dynamic_type): Use scoped_value_mark.
6524 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6525 scoped_value_mark.
6526 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6527 gdbscm_wrap and scoped_value_mark.
6528 (gdbscm_value_to_string): Use xfree directly instead of a
6529 cleanup. Move 'buffer' unique_ptr to TRY scope.
6530 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6531 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
6532 scoped_value_mark.
6533 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6534 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6535 scoped_value_mark.
6536 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6537 gdbscm_wrap.
6538
6539 2018-07-18 Tom de Vries <tdevries@suse.de>
6540
6541 * findvar.c (default_read_var_value): Also resolve dynamic type for
6542 LOC_OPTIMIZED_OUT vars.
6543
6544 2018-07-18 Maciej W. Rozycki <macro@mips.com>
6545
6546 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6547 decoding.
6548
6549 2018-07-17 Tom Tromey <tom@tromey.com>
6550
6551 * guile/scm-param.c (pascm_set_func, pascm_show_func)
6552 (compute_enum_list, pascm_set_param_value_x)
6553 (gdbscm_parameter_value): Update.
6554 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6555 (gdbscm_scm_to_host_string): Update.
6556 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6557 Update.
6558 * guile/scm-cmd.c (cmdscm_add_completion): Update.
6559 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6560 * guile/scm-string.c (gdbscm_scm_to_string): Return
6561 unique_xmalloc_ptr.
6562 (gdbscm_scm_to_host_string): Likewise.
6563
6564 2018-07-17 Tom Tromey <tom@tromey.com>
6565
6566 * guile/guile.c (gdbscm_eval_from_control_command): Update.
6567 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6568 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6569 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6570 unique_xmalloc_ptr.
6571
6572 2018-07-17 Tom Tromey <tom@tromey.com>
6573
6574 * guile/scm-param.c (pascm_signal_setshow_error): Update.
6575 * guile/guile-internal.h (gdbscm_exception_message_to_string):
6576 Update.
6577 * guile/scm-cmd.c (cmdscm_function): Update.
6578 * guile/scm-pretty-print.c
6579 (ppscm_print_exception_unless_memory_error): Update.
6580 * guile/scm-exception.c (gdbscm_exception_message_to_string):
6581 Return unique_xmalloc_ptr.
6582
6583 2018-07-17 Tom Tromey <tom@tromey.com>
6584
6585 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6586 Use string_printf.
6587
6588 2018-07-17 Jim Wilson <jimw@sifive.com>
6589
6590 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6591 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
6592 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
6593 unecessary braces after EF_RISCV_RVC test. Delete call to
6594 set_gdbarch_decr_pc_after_break.
6595
6596 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6597 RISCV_LAST_FP_REGNUM + 1.
6598 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6599
6600 2018-07-17 Tom Tromey <tom@tromey.com>
6601
6602 * configure.ac: Remove --disable-gdbcli.
6603 * configure: Rebuild.
6604 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6605 (SUBDIR_CLI_CFLAGS): Remove.
6606 (SFILES): Use SUBDIR_CLI_SRCS.
6607 (COMMON_OBS): Use SUBDIR_CLI_OBS.
6608
6609 2018-07-17 Tom Tromey <tom@tromey.com>
6610
6611 PR gdb/18624:
6612 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6613
6614 2018-07-16 Jim Wilson <jimw@sifive.com>
6615
6616 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6617
6618 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6619
6620 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6621 variable.
6622 (libunwind_frame_sniffer): Likewise.
6623 (libunwind_frame_prev_register): Likewise.
6624 (libunwind_sigtramp_frame_sniffer): Likewise.
6625 * ia64-tdep.c (ia64_access_reg): Likewise.
6626 (ia64_access_rse_reg): Likewise.
6627 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6628 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6629
6630 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6631
6632 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6633
6634 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6635
6636 * remote-sim.c (gdbsim_target::close,
6637 gdbsim_target::mourn_inferior): Remove unused variables.
6638
6639 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
6640
6641 * ia64-tdep.c (ktab_buf): New global.
6642 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6643 (get_kernel_table): Adjust.
6644
6645 2018-07-16 Tom Tromey <tom@tromey.com>
6646
6647 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6648 * dwarf2read.c (using_directives, new_symbol): Use
6649 outermost_context_p.
6650 * dbxread.c (process_one_symbol): Use outermost_context_p.
6651 * coffread.c (coff_symtab_read): Use outermost_context_p.
6652
6653 2018-07-16 Tom Tromey <tom@tromey.com>
6654
6655 * dwarf2read.c (using_directives, read_func_scope)
6656 (read_lexical_block_scope): Update.
6657 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6658 * buildsym.h (local_using_directives, global_using_directives):
6659 Don't declare.
6660 (get_local_using_directives, set_local_using_directives)
6661 (get_global_using_directives): Declare.
6662 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6663 m_global_using_directives>: New members.
6664 (finish_block_internal, prepare_for_building)
6665 (reset_symtab_globals, end_symtab_get_static_block)
6666 (push_context): Update.
6667 (get_local_using_directives, set_local_using_directives)
6668 (get_global_using_directives): New functions.
6669 (buildsym_init): Update.
6670
6671 2018-07-16 Tom Tromey <tom@tromey.com>
6672
6673 * xcoffread.c (xcoff_initial_scan): Don't call
6674 free_pending_blocks.
6675 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6676 * buildsym.h (class scoped_free_pendings): Add constructor.
6677 (free_pending_blocks): Don't declare.
6678 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6679 (free_pending_blocks): Now static.
6680
6681 2018-07-16 Tom Tromey <tom@tromey.com>
6682
6683 * buildsym.h (push_subfile, pop_subfile): Update declarations.
6684 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6685 member.
6686 (struct subfile_stack): Remove.
6687 (subfile_stack): Remove.
6688 (push_subfile, pop_subfile, buildsym_init): Update.
6689
6690 2018-07-16 Tom Tromey <tom@tromey.com>
6691
6692 * buildsym.c (push_subfile): Use gdb_assert.
6693 (pop_subfile): Use gdb_assert.
6694
6695 2018-07-16 Tom Tromey <tom@tromey.com>
6696
6697 * buildsym.h (merge_symbol_lists): Remove.
6698 * buildsym.c (merge_symbol_lists): Remove.
6699
6700 2018-07-16 Tom Tromey <tom@tromey.com>
6701
6702 * stabsread.c (scan_file_globals): Update comment.
6703 * stabsread.h (scan_file_globals): Move from buildsym.h.
6704 * buildsym.h (scan_file_globals): Move to stabsread.h.
6705
6706 2018-07-16 Tom Tromey <tom@tromey.com>
6707
6708 * xcoffread.c (xcoff_new_init): Update.
6709 * mipsread.c (mipscoff_new_init): Update.
6710 * mdebugread.c (mdebug_build_psymtabs): Update.
6711 * elfread.c (elf_new_init): Update.
6712 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6713 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6714 * buildsym.h (buildsym_new_init): Don't declare.
6715 * buildsym.c (buildsym_new_init): Remove.
6716
6717 2018-07-16 Tom Tromey <tom@tromey.com>
6718
6719 * stabsread.h (within_function): Move from buildsym.h.
6720 * stabsread.c (start_stabs): Clear within_function.
6721 * coffread.c (coff_start_symtab): Clear within_function.
6722 * buildsym.h (within_function): Move to stabsread.h.
6723 * buildsym.c (prepare_for_building): Update.
6724
6725 2018-07-16 Tom Tromey <tom@tromey.com>
6726
6727 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6728 * dwarf2read.c (dwarf2_start_symtab): Don't set
6729 processing_gcc_compilation.
6730 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6731
6732 2018-07-16 Tom Tromey <tom@tromey.com>
6733
6734 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6735 (next_symbol_text_func): Move from buildsym.h.
6736 * stabsread.c (hashname): Move from buildsym.c.
6737 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6738 (next_symbol_text_func, hashname): Move to stabsread.h.
6739 * buildsym.c: Don't include bcache.h
6740 (hashname): Move to stasbread.c.
6741
6742 2018-07-16 Tom Tromey <tom@tromey.com>
6743
6744 * buildsym.h (context_stack_size): Don't declare.
6745 * buildsym.c (context_stack_size): New global.
6746
6747 2018-07-16 Tom Tromey <tom@tromey.com>
6748
6749 * dbxread.c (processing_acc_compilation): New global.
6750 * buildsym.h (processing_acc_compilation): Don't declare.
6751
6752 2018-07-16 Tom Tromey <tom@tromey.com>
6753
6754 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6755 * dbxread.c (read_ofile_symtab): Update.
6756 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6757 * buildsym.h (last_source_start_addr): Remove.
6758 (set_last_source_start_addr, get_last_source_start_addr):
6759 Declare.
6760 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6761 parameter.
6762 (struct buildsym_compunit) <m_last_source_start_addr>: New
6763 member.
6764 (prepare_for_building): Remove start_addr parameter.
6765 (start_symtab, restart_symtab, end_symtab_get_static_block)
6766 (end_symtab_with_blockvector): Update.
6767 (set_last_source_start_addr, get_last_source_start_addr): New
6768 functions.
6769
6770 2018-07-16 Tom Tromey <tom@tromey.com>
6771
6772 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6773 member.
6774 (have_line_numbers): Remove.
6775 (record_line, prepare_for_building, end_symtab_get_static_block)
6776 (augment_type_symtab): Update.
6777
6778 2018-07-16 Tom Tromey <tom@tromey.com>
6779
6780 * buildsym.c (~buildsym_compunit): Free the macro table.
6781 (struct buildsym_compunit) <get_macro_table, release_macros>: New
6782 methods.
6783 <m_pending_macros>: New member.
6784 (pending_macros): Remove.
6785 (~scoped_free_pendings, get_macro_table, prepare_for_building)
6786 (reset_symtab_globals, end_symtab_get_static_block)
6787 (end_symtab_with_blockvector, augment_type_symtab)
6788 (buildsym_init): Update.
6789
6790 2018-07-16 Tom Tromey <tom@tromey.com>
6791
6792 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6793 parameter.
6794 (buildsym_compunit::set_last_source_file): New method.
6795 <m_last_source_file>: New member.
6796 (prepare_for_building): Remove "name" parameter.
6797 (start_symtab, restart_symtab, reset_symtab_globals): Update.
6798 (last_source_file): Remove.
6799 (set_last_source_file, get_last_source_file): Update.
6800
6801 2018-07-16 Tom Tromey <tom@tromey.com>
6802
6803 * buildsym.c (prepare_for_building): Add assert.
6804
6805 2018-07-16 Tom Tromey <tom@tromey.com>
6806
6807 * buildsym.c (~buildsym_compunit): Update.
6808 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6809 (start_subfile, patch_subfile_names)
6810 (end_symtab_with_blockvector): Update.
6811
6812 2018-07-16 Tom Tromey <tom@tromey.com>
6813
6814 * buildsym.c (struct buildsym_compunit): Add constructor,
6815 destructor, initializers.
6816 (start_buildsym_compunit): Remove.
6817 (free_buildsym_compunit): Use "delete".
6818 (start_symtab, restart_symtab): Use "new".
6819
6820 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
6821
6822 * symfile.c (set_objfile_default_section_offset): Remove struct
6823 keyword.
6824
6825 2018-07-14 Stafford Horne <shorne@gmail.com>
6826
6827 * (Responsible Maintainers): Add myself as or1k maintainer.
6828
6829 2018-07-13 Tom Tromey <tom@tromey.com>
6830
6831 * symfile.c (set_objfile_default_section_offset): Use extra braces
6832 around initializer.
6833
6834 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6835
6836 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6837 non-branching basr.
6838
6839 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6840
6841 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6842 unittests/cli-utils-selftests.c
6843 * unittests/cli-utils-selftests.c: New file.
6844
6845 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6846
6847 * NEWS: Mention new commands. Mention change to 'thread apply'.
6848
6849 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6850
6851 * thread.c (thr_try_catch_cmd): New function.
6852 (thread_apply_all_command): Handle qcs flags.
6853 (thread_apply_command): Handle qcs flags.
6854 (taas_command): New function.
6855 (tfaas_command): New function.
6856 (_initialize_thread): Update to setup the new commands 'taas
6857 and 'tfaas'. Change doc string for 'thread apply'.
6858
6859 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6860
6861 * stack.c: (trailing_outermost_frame): New function, mostly
6862 extracted from backtrace_command_1.
6863 (leading_innermost_frame): New function.
6864 (backtrace_command_1): Update to call trailing_outermost_frame.
6865 (frame_apply_command_count): New function.
6866 (frame_apply_level_command): New function.
6867 (frame_apply_all_command): New function.
6868 (frame_apply_command): New function.
6869 (faas_command): New function.
6870 (frame_cmd_list): New variable.
6871 (_initialize_stack): Update to setup the new commands 'frame apply'
6872 and 'faas'.
6873
6874 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6875
6876 * cli-utils.c (number_or_range_parser::get_number): Only handle
6877 numbers or convenience var as numbers.
6878 (parse_flags): New function.
6879 (parse_flags_qcs): New function.
6880 (number_or_range_parser::finished): Ensure parsing end is detected
6881 before end of string.
6882 * cli-utils.h (parse_flags): New function.
6883 (parse_flags_qcs): New function.
6884 (number_or_range_parser): Remove m_finished bool.
6885 (number_or_range_parser::skip_range): Set m_in_range to false.
6886
6887 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
6888
6889 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6890 on Windows.
6891
6892 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6893 Jan Kratochvil <jan.kratochvil@redhat.com>
6894 Paul Fertser <fercerpav@gmail.com>
6895 Tsutomu Seki <sekiriki@gmail.com>
6896 Pedro Alves <palves@redhat.com>
6897
6898 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6899 'unittests/parse-connection-spec-selftests.c'.
6900 (COMMON_SFILES): Add 'common/netstuff.c'.
6901 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6902 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6903 * common/netstuff.c: New file.
6904 * common/netstuff.h: New file.
6905 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6906 (wait_for_connect): Update comment. New parameter
6907 'gdb::optional<int> sock' instead of 'struct serial *scb'.
6908 Use 'sock' directly instead of 'scb->fd'.
6909 (try_connect): New function, with code from 'net_open'.
6910 (net_open): Rewrite main loop to deal with multiple
6911 sockets/addresses. Handle IPv6-style hostnames; implement
6912 support for IPv6 connections.
6913 * unittests/parse-connection-spec-selftests.c: New file.
6914
6915 2018-07-11 Pedro Alves <palves@redhat.com>
6916
6917 PR gdb/23377
6918 * remote.c (remote_target::remote_detach_pid): Call
6919 set_current_process.
6920
6921 2018-07-11 Pedro Alves <palves@redhat.com>
6922
6923 * h8300-tdep.c (h8300_gdbarch_init): Remove
6924 set_gdbarch_ecoff_reg_to_regnum calls.
6925
6926 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6927
6928 PR c++/23373
6929 * c-typeprint.c (c_type_print_base_struct_union): Don't print
6930 offsets/sizes for static members of a class/struct.
6931
6932 2018-07-11 Alan Hayward <alan.hayward@arm.com>
6933
6934 * target-descriptions.c (tdesc_register_bitsize): Rename.
6935 * target-descriptions.h (tdesc_register_bitsize): Likewise.
6936 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6937 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6938
6939 2018-07-10 Tom Tromey <tom@tromey.com>
6940
6941 * breakpoint.c (moribund_locations): Now static and a
6942 std::vector.
6943 (breakpoint_init_inferior, moribund_breakpoint_here_p)
6944 (build_bpstat_chain, update_global_location_list)
6945 (breakpoint_retire_moribund): Update.
6946 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
6947 VEC.
6948
6949 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
6950
6951 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6952 (riscv_register_reggroup_p): Use new function, remove unneeded
6953 parenthesis.
6954 (riscv_push_dummy_call): Extend assert to compare against xlen or
6955 flen based on register type.
6956
6957 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
6958
6959 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6960
6961 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
6962
6963 * remote.c (show_hardware_watchpoint_limit): New function.
6964 (show_hardware_watchpoint_length_limit): New function.
6965 (show_hardware_breakpoint_limit): New function.
6966 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6967 where appropriate, update help text.
6968
6969 2018-07-09 Tom Tromey <tom@tromey.com>
6970
6971 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6972 (CLIBS): Don't mention NAT_CLIBS.
6973
6974 2018-07-09 Tom Tromey <tom@tromey.com>
6975
6976 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6977 (LIBGDB_OBS, clean mostlyclean): Update.
6978 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6979
6980 2018-07-09 Tom Tromey <tom@tromey.com>
6981
6982 * Makefile.in (%.c: %.y): Use ECHO_YACC.
6983 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
6984 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6985
6986 2018-07-09 Tom Tromey <tom@tromey.com>
6987
6988 * Makefile.in (ALLDEPFILES): Remove exec.c.
6989 (COMMON_OBS): Remove exec.o.
6990 (COMMON_SFILES): Add exec.c.
6991
6992 2018-07-09 Tom Tromey <tom@tromey.com>
6993
6994 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6995
6996 2018-07-09 Tom Tromey <tom@tromey.com>
6997
6998 * Makefile.in (clean mostlyclean): Remove stamp-version.
6999 (version.c): Depend on stamp-version.
7000 (stamp-version): New rule, from version.c rule.
7001
7002 2018-07-09 Tom Tromey <tom@tromey.com>
7003
7004 * Makefile.in (init.c): Depend on stamp-init.
7005 (stamp-init): New rule, from init.c rule.
7006 (clean mostlyclean): Remove stamp-init.
7007
7008 2018-07-09 Tom Tromey <tom@tromey.com>
7009
7010 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
7011 SUBDIR_GCC_COMPILE_SRCS.
7012
7013 2018-07-09 Tom Tromey <tom@tromey.com>
7014
7015 * Makefile.in (init.c): Remove some unused sed rules.
7016
7017 2018-07-09 Tom Tromey <tom@tromey.com>
7018
7019 * Makefile.in (TSOBS): Remove.
7020 (INIT_FILES): Update.
7021 (LIBGDB_OBS): Update.
7022 (COMMON_SFILES): Add inflow.c.
7023 (SFILES): Remove inflow.c.
7024
7025 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7026
7027 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
7028
7029 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
7030
7031 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
7032 get_saveloc_name, is_signal_frame_name, step_name,
7033 init_remote_name, create_addr_space_name,
7034 destroy_addr_space_name, search_unwind_table_name,
7035 find_dyn_list_name): Constify.
7036
7037 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
7038
7039 * darwin-nat.c (darwin_pthread_kill): New function.
7040 (darwin_resume_thread): Use darwin_pthread_kill.
7041
7042 2018-07-05 Tom de Vries <tdevries@suse.de>
7043
7044 * macroexp.c (macro_buffer) <operator=>: New member function.
7045
7046 2018-07-04 Tom Tromey <tom@tromey.com>
7047
7048 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7049
7050 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
7051
7052 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7053 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7054 * maint.c: Likewise.
7055 * top.c: Likewise.
7056
7057 2018-07-04 Joel Brobecker <brobecker@adacore.com>
7058
7059 * NEWS: Create a new section for the next release branch.
7060 Rename the section of the current branch, now that it has
7061 been cut.
7062
7063 2018-07-04 Joel Brobecker <brobecker@adacore.com>
7064
7065 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7066 * version.in: Bump version to 8.2.50.DATE-git.
7067
7068 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
7069 Pedro Alves <palves@redhat.com>
7070
7071 * linux-nat.c (linux_init_ptrace): Rename to ...
7072 (linux_init_ptrace_procfs): ... this. Call
7073 linux_proc_init_warnings.
7074 (linux_nat_target::post_attach)
7075 (linux_nat_target::post_startup_inferior): Adjust.
7076 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7077 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7078
7079 2018-07-04 Tom de Vries <tdevries@suse.de>
7080
7081 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7082 check ...
7083 (read_comp_unit_head): ... here.
7084
7085 2018-07-03 Tom Tromey <tom@tromey.com>
7086
7087 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7088 (stop_tracing, tstatus_command)
7089 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7090 (print_one_static_tracepoint_marker): Update.
7091 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7092 std::vector.
7093 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
7094 VEC.
7095 (all_tracepoints, static_tracepoints_here): Return std::vector.
7096
7097 2018-07-03 Tom Tromey <tom@tromey.com>
7098
7099 * common/ptid.c (ptid_equal): Remove.
7100 * common/ptid.h (ptid_equal): Don't declare.
7101 * ada-tasks.c: Update.
7102 * breakpoint.c: Update.
7103 * common/agent.c: Update.
7104 * corelow.c: Update.
7105 * darwin-nat-info.c: Update.
7106 * darwin-nat.c: Update.
7107 * dcache.c: Update.
7108 * dtrace-probe.c: Update.
7109 * dummy-frame.c: Update.
7110 * fbsd-nat.c: Update.
7111 * frame.c: Update.
7112 * gdbthread.h: Update.
7113 * gnu-nat.c: Update.
7114 * go32-nat.c: Update.
7115 * inf-loop.c: Update.
7116 * inf-ptrace.c: Update.
7117 * infcall.c: Update.
7118 * infcmd.c: Update.
7119 * inflow.c: Update.
7120 * infrun.c: Update.
7121 * linux-fork.c: Update.
7122 * linux-nat.c: Update.
7123 * linux-thread-db.c: Update.
7124 * mi/mi-cmd-var.c: Update.
7125 * mi/mi-interp.c: Update.
7126 * mi/mi-main.c: Update.
7127 * nto-procfs.c: Update.
7128 * ppc-linux-tdep.c: Update.
7129 * procfs.c: Update.
7130 * python/py-inferior.c: Update.
7131 * python/py-record-btrace.c: Update.
7132 * python/py-record.c: Update.
7133 * ravenscar-thread.c: Update.
7134 * regcache.c: Update.
7135 * remote-sim.c: Update.
7136 * remote.c: Update.
7137 * sol-thread.c: Update.
7138 * solib.c: Update.
7139 * target.c: Update.
7140 * tui/tui-stack.c: Update.
7141 * varobj.c: Update.
7142 * windows-nat.c: Update.
7143 * windows-tdep.c: Update.
7144
7145 2018-07-03 Tom Tromey <tom@tromey.com>
7146
7147 * common/ptid.c (ptid_match): Remove.
7148 * common/ptid.h (ptid_match): Don't declare.
7149 * fbsd-nat.c: Update.
7150 * infcmd.c: Update.
7151 * infrun.c: Update.
7152 * linux-nat.c: Update.
7153 * record-btrace.c: Update.
7154 * regcache.c: Update.
7155 * remote.c: Update.
7156
7157 2018-07-03 Tom Tromey <tom@tromey.com>
7158
7159 * common/ptid.c (ptid_tid_p): Remove.
7160 * common/ptid.h (ptid_tid_p): Don't declare.
7161 * sol-thread.c: Update.
7162
7163 2018-07-03 Tom Tromey <tom@tromey.com>
7164
7165 * common/ptid.c (ptid_lwp_p): Remove.
7166 * common/ptid.h (ptid_lwp_p): Don't declare.
7167 * fbsd-nat.c: Update.
7168 * linux-nat.c: Update.
7169 * nat/linux-procfs.c: Update.
7170 * nat/x86-linux-dregs.c: Update.
7171 * sol-thread.c: Update.
7172
7173 2018-07-03 Tom Tromey <tom@tromey.com>
7174
7175 * common/ptid.c (ptid_is_pid): Remove.
7176 * common/ptid.h (ptid_is_pid): Don't declare.
7177 * infrun.c: Update.
7178 * linux-nat.c: Update.
7179 * mi/mi-interp.c: Update.
7180 * remote.c: Update.
7181 * thread.c: Update.
7182
7183 2018-07-03 Tom Tromey <tom@tromey.com>
7184
7185 * common/ptid.c (ptid_get_tid): Remove.
7186 * common/ptid.h (ptid_get_tid): Don't declare.
7187 * ada-tasks.c: Update.
7188 * aix-thread.c: Update.
7189 * bsd-uthread.c: Update.
7190 * darwin-nat.c: Update.
7191 * fbsd-nat.c: Update.
7192 * i386-darwin-nat.c: Update.
7193 * infrun.c: Update.
7194 * linux-tdep.c: Update.
7195 * nto-procfs.c: Update.
7196 * ppc-ravenscar-thread.c: Update.
7197 * python/py-infthread.c: Update.
7198 * ravenscar-thread.c: Update.
7199 * sol-thread.c: Update.
7200 * sparc-ravenscar-thread.c: Update.
7201 * windows-nat.c: Update.
7202
7203 2018-07-03 Tom Tromey <tom@tromey.com>
7204
7205 * common/ptid.c (ptid_get_lwp): Remove.
7206 * common/ptid.h (ptid_get_lwp): Don't declare.
7207 * aarch64-linux-nat.c: Update.
7208 * ada-tasks.c: Update.
7209 * aix-thread.c: Update.
7210 * amd64-linux-nat.c: Update.
7211 * arm-linux-nat.c: Update.
7212 * corelow.c: Update.
7213 * fbsd-nat.c: Update.
7214 * fbsd-tdep.c: Update.
7215 * gnu-nat.c: Update.
7216 * i386-cygwin-tdep.c: Update.
7217 * i386-gnu-nat.c: Update.
7218 * i386-linux-nat.c: Update.
7219 * ia64-linux-nat.c: Update.
7220 * inf-ptrace.c: Update.
7221 * infrun.c: Update.
7222 * linux-fork.c: Update.
7223 * linux-nat.c: Update.
7224 * linux-tdep.c: Update.
7225 * linux-thread-db.c: Update.
7226 * mips-linux-nat.c: Update.
7227 * nat/aarch64-linux-hw-point.c: Update.
7228 * nat/aarch64-linux.c: Update.
7229 * nat/linux-btrace.c: Update.
7230 * nat/linux-osdata.c: Update.
7231 * nat/linux-procfs.c: Update.
7232 * nat/x86-linux-dregs.c: Update.
7233 * obsd-nat.c: Update.
7234 * ppc-fbsd-nat.c: Update.
7235 * ppc-linux-nat.c: Update.
7236 * procfs.c: Update.
7237 * python/py-infthread.c: Update.
7238 * ravenscar-thread.c: Update.
7239 * remote.c: Update.
7240 * s390-linux-nat.c: Update.
7241 * sol-thread.c: Update.
7242 * sol2-tdep.c: Update.
7243 * spu-linux-nat.c: Update.
7244 * x86-linux-nat.c: Update.
7245 * xtensa-linux-nat.c: Update.
7246
7247 2018-07-03 Tom Tromey <tom@tromey.com>
7248
7249 * common/ptid.c (ptid_get_pid): Remove.
7250 * common/ptid.h (ptid_get_pid): Don't declare.
7251 * aarch64-linux-nat.c: Update.
7252 * ada-lang.c: Update.
7253 * aix-thread.c: Update.
7254 * alpha-bsd-nat.c: Update.
7255 * amd64-fbsd-nat.c: Update.
7256 * amd64-linux-nat.c: Update.
7257 * arm-linux-nat.c: Update.
7258 * arm-nbsd-nat.c: Update.
7259 * auxv.c: Update.
7260 * break-catch-syscall.c: Update.
7261 * breakpoint.c: Update.
7262 * bsd-uthread.c: Update.
7263 * corelow.c: Update.
7264 * ctf.c: Update.
7265 * darwin-nat.c: Update.
7266 * fbsd-nat.c: Update.
7267 * fbsd-tdep.c: Update.
7268 * gcore.c: Update.
7269 * gnu-nat.c: Update.
7270 * hppa-nbsd-nat.c: Update.
7271 * hppa-obsd-nat.c: Update.
7272 * i386-fbsd-nat.c: Update.
7273 * ia64-linux-nat.c: Update.
7274 * inf-ptrace.c: Update.
7275 * infcmd.c: Update.
7276 * inferior.c: Update.
7277 * inferior.h: Update.
7278 * inflow.c: Update.
7279 * infrun.c: Update.
7280 * linux-fork.c: Update.
7281 * linux-nat.c: Update.
7282 * linux-tdep.c: Update.
7283 * linux-thread-db.c: Update.
7284 * m68k-bsd-nat.c: Update.
7285 * mi/mi-interp.c: Update.
7286 * mi/mi-main.c: Update.
7287 * mips-linux-nat.c: Update.
7288 * mips-nbsd-nat.c: Update.
7289 * mips64-obsd-nat.c: Update.
7290 * nat/aarch64-linux-hw-point.c: Update.
7291 * nat/aarch64-linux.c: Update.
7292 * nat/linux-btrace.c: Update.
7293 * nat/linux-osdata.c: Update.
7294 * nat/linux-procfs.c: Update.
7295 * nat/x86-linux-dregs.c: Update.
7296 * nto-procfs.c: Update.
7297 * obsd-nat.c: Update.
7298 * ppc-linux-nat.c: Update.
7299 * ppc-nbsd-nat.c: Update.
7300 * ppc-obsd-nat.c: Update.
7301 * proc-service.c: Update.
7302 * procfs.c: Update.
7303 * python/py-inferior.c: Update.
7304 * python/py-infthread.c: Update.
7305 * ravenscar-thread.c: Update.
7306 * record.c: Update.
7307 * remote-sim.c: Update.
7308 * remote.c: Update.
7309 * rs6000-nat.c: Update.
7310 * s390-linux-nat.c: Update.
7311 * sh-nbsd-nat.c: Update.
7312 * sol-thread.c: Update.
7313 * sparc-nat.c: Update.
7314 * sparc64-tdep.c: Update.
7315 * spu-linux-nat.c: Update.
7316 * spu-tdep.c: Update.
7317 * target-debug.h: Update.
7318 * target.c: Update.
7319 * thread.c: Update.
7320 * tid-parse.c: Update.
7321 * tracefile-tfile.c: Update.
7322 * vax-bsd-nat.c: Update.
7323 * windows-nat.c: Update.
7324 * x86-linux-nat.c: Update.
7325 * x86-nat.c: Update.
7326
7327 2018-07-03 Tom Tromey <tom@tromey.com>
7328
7329 * common/ptid.c (pid_to_ptid): Remove.
7330 * common/ptid.h (pid_to_ptid): Don't declare.
7331 * aix-thread.c: Update.
7332 * arm-linux-nat.c: Update.
7333 * common/ptid.c: Update.
7334 * common/ptid.h: Update.
7335 * corelow.c: Update.
7336 * ctf.c: Update.
7337 * darwin-nat.c: Update.
7338 * fbsd-nat.c: Update.
7339 * fork-child.c: Update.
7340 * gnu-nat.c: Update.
7341 * go32-nat.c: Update.
7342 * inf-ptrace.c: Update.
7343 * infcmd.c: Update.
7344 * inferior.c: Update.
7345 * infrun.c: Update.
7346 * linux-fork.c: Update.
7347 * linux-nat.c: Update.
7348 * nat/aarch64-linux-hw-point.c: Update.
7349 * nat/fork-inferior.c: Update.
7350 * nat/x86-linux-dregs.c: Update.
7351 * nto-procfs.c: Update.
7352 * obsd-nat.c: Update.
7353 * procfs.c: Update.
7354 * progspace.c: Update.
7355 * remote.c: Update.
7356 * rs6000-nat.c: Update.
7357 * s390-linux-nat.c: Update.
7358 * sol-thread.c: Update.
7359 * spu-linux-nat.c: Update.
7360 * target.c: Update.
7361 * top.c: Update.
7362 * tracefile-tfile.c: Update.
7363 * windows-nat.c: Update.
7364
7365 2018-07-03 Tom Tromey <tom@tromey.com>
7366
7367 * common/ptid.h (ptid_build): Don't declare.
7368 * common/ptid.c (ptid_build): Remove.
7369 * aix-thread.c: Update.
7370 * bsd-kvm.c: Update.
7371 * bsd-uthread.c: Update.
7372 * common/agent.c: Update.
7373 * common/ptid.c: Update.
7374 * common/ptid.h: Update.
7375 * corelow.c: Update.
7376 * darwin-nat.c: Update.
7377 * fbsd-nat.c: Update.
7378 * gnu-nat.c: Update.
7379 * linux-fork.c: Update.
7380 * linux-nat.c: Update.
7381 * linux-thread-db.c: Update.
7382 * nat/linux-osdata.c: Update.
7383 * nat/linux-procfs.c: Update.
7384 * nto-procfs.c: Update.
7385 * obsd-nat.c: Update.
7386 * proc-service.c: Update.
7387 * procfs.c: Update.
7388 * ravenscar-thread.c: Update.
7389 * remote-sim.c: Update.
7390 * remote.c: Update.
7391 * sol-thread.c: Update.
7392 * target.c: Update.
7393 * windows-nat.c: Update.
7394
7395 2018-07-03 Tom Tromey <tom@tromey.com>
7396
7397 * infrun.c (follow_exec): Use exit_inferior_silent.
7398 * inferior.c (exit_inferior_num_silent): Remove.
7399 * inferior.h (exit_inferior_num_silent): Don't declare.
7400
7401 2018-07-03 Tom Tromey <tom@tromey.com>
7402
7403 PR cli/23340:
7404 * darwin-nat.c (darwin_attach_pid): Reset inferior and
7405 inferior_ptid on error.
7406
7407 2018-07-02 Maciej W. Rozycki <macro@mips.com>
7408 Simon Marchi <simon.marchi@polymtl.ca>
7409
7410 PR tdep/8282
7411 * disasm.h (gdb_disassembler): Add
7412 `m_disassembler_options_holder'. member
7413 * disasm.c (get_all_disassembler_options): New function.
7414 (gdb_disassembler::gdb_disassembler): Use it.
7415 (gdb_buffered_insn_length_init_dis): Likewise.
7416 (gdb_buffered_insn_length): Adjust accordingly.
7417 (set_disassembler_options): Handle options with arguments.
7418 (show_disassembler_options_sfunc): Likewise. Add a leading new
7419 line if showing options with descriptions.
7420 (disassembler_options_completer): Adapt to using the
7421 `disasm_options_and_args_t' structure.
7422 * mips-tdep.c (mips_disassembler_options): New variable.
7423 (mips_disassembler_options_o32): Likewise.
7424 (mips_disassembler_options_n32): Likewise.
7425 (mips_disassembler_options_n64): Likewise.
7426 (gdb_print_insn_mips): Don't set `disassembler_options'.
7427 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7428 functions.
7429 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7430 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
7431 `gdbarch_disassembler_options_implicit' and
7432 `gdbarch_valid_disassembler_options'.
7433 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7434 `disasm_options_and_args_t' structure.
7435 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7436 method.
7437 (valid_disassembler_options): Switch from `disasm_options_t' to
7438 the `disasm_options_and_args_t' structure.
7439 * NEWS: Document `set disassembler-options' support for the MIPS
7440 target.
7441 * gdbarch.h: Regenerate.
7442 * gdbarch.c: Regenerate.
7443
7444 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
7445
7446 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7447
7448 2018-06-29 Joel Brobecker <brobecker@adacore.com>
7449
7450 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7451 parameter in call to amd64_target_description.
7452 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7453 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7454 (amd64fbsd_init_abi): Likewise.
7455 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7456 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7457 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7458 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7459
7460 2018-06-29 Pedro Alves <palves@redhat.com>
7461
7462 * gdb/amd64-tdep.h (amd64_create_target_description): Add
7463 "segments" parameter.
7464 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7465 (_initialize_amd64_tdep): Update call to
7466 amd64_create_target_description.
7467 (amd64_target_description): Add "segments" parameter. Adjust
7468 the implementation to use it.
7469 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7470 call to amd64_create_target_description.
7471 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7472 * gdb/arch/amd64.h (amd64_create_target_description): Add
7473 "segments" register.
7474 * gdb/arch/amd64.c (amd64_create_target_description): Add
7475 "segments" parameter. Call create_feature_i386_64bit_segments
7476 only if SEGMENTS is true.
7477 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7478 call to amd64_create_target_description.
7479
7480 2018-06-29 Pedro Alves <palves@redhat.com>
7481
7482 * thread.c (thread_target_id_str): New, factored out from ...
7483 (print_thread_info_1): ... here. Use it to compute the max
7484 "Target Id" column width.
7485
7486 2018-06-29 Pedro Alves <palves@redhat.com>
7487
7488 * remote.c (remote_target::extra_thread_info): Delete
7489 'display_buf' and 'n' locals. from the cache, regardless of
7490 packet mechanims is in use. Use cache for qThreadExtra and qP
7491 methods too.
7492
7493 2018-06-29 Pedro Alves <palves@redhat.com>
7494
7495 * blockframe.c (find_pc_sect_containing_function): New function.
7496 * breakpoint.c (print_breakpoint_location): Don't call
7497 find_pc_sect_function.
7498 * linespec.c (create_sals_line_offset): Record the location's
7499 symbol in the sal.
7500 * linespec.c (convert_address_location_to_sals): Fill in sal's
7501 symbol with find_pc_sect_containing_function.
7502 * symtab.c (find_function_start_sal): Rename to ...
7503 (find_function_start_sal_1): ... this.
7504 (find_function_start_sal): Reimplement as wrapper around
7505 find_function_start_sal_1, and use
7506 find_pc_sect_containing_function to fill in the sal's symbol.
7507 (find_function_start_sal(symbol*, bool)): Adjust.
7508 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7509 comments.
7510 (find_pc_sect_containing_function): Declare.
7511
7512 2018-06-29 Pedro Alves <palves@redhat.com>
7513
7514 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7515 true if the the location has no symbol.
7516
7517 2018-06-28 Tom Tromey <tom@tromey.com>
7518
7519 * NEWS: Mention --enable-codesign.
7520 * silent-rules.mk (ECHO_SIGN): New variable.
7521 * configure.ac: Add --enable-codesign.
7522 * configure: Rebuild.
7523 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7524 (gdb$(EXEEXT)): Optionally invoke codesign.
7525
7526 2018-06-28 Pedro Alves <palves@redhat.com>
7527
7528 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7529 comments.
7530 (switch_to_thread_no_regs): Adjust comment.
7531 * infcmd.c (stop_pc): Delete.
7532 (post_create_inferior, info_program_command): Replace references
7533 to stop_pc with references to thread_info->suspend.stop_pc.
7534 * inferior.h (stop_pc): Delete declaration.
7535 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7536 (handle_inferior_event_1, handle_signal_stop)
7537 (process_event_stop_test, keep_going_stepped_thread)
7538 (handle_step_into_function, handle_step_into_function_backward)
7539 (print_stop_location): Replace references to stop_pc with
7540 references to thread_info->suspend.stop_pc.
7541 (struct infcall_suspend_state) <stop_pc>: Delete field.
7542 (save_infcall_suspend_state, restore_infcall_suspend_state):
7543 Remove references to inf_stat->stop_pc.
7544 * linux-fork.c (fork_load_infrun_state): Likewise.
7545 * record-btrace.c (record_btrace_set_replay): Likewise.
7546 * record-full.c (record_full_goto_entry): Likewise.
7547 * remote.c (print_one_stopped_thread): Likewise.
7548 * target.c (target_resume): Extend comment.
7549 * thread.c (set_executing_thread): New.
7550 (set_executing): Use it.
7551 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7552 Remove references to stop_pc.
7553
7554 2018-06-28 Pedro Alves <palves@redhat.com>
7555
7556 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7557 Moving fetching stop_pc until after ecs->event_thread is refreshed.
7558
7559 2018-06-28 Tom Tromey <tom@tromey.com>
7560
7561 * coffread.c (coff_symfile_finish): Update.
7562 * xcoffread.c (xcoff_symfile_finish): Update.
7563 * elfread.c (elf_symfile_finish): Update.
7564 * symfile.h (dwarf2_free_objfile): Don't declare.
7565 * dwarf2read.c (_initialize_dwarf2_read): Use
7566 register_objfile_data_with_cleanup.
7567 (dwarf2_free_objfile): Now static. Change signature.
7568
7569 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7570
7571 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7572 option "-o" to add-symbol-file-load to add an offset to each
7573 section's load address.
7574 * symfile.c (set_objfile_default_section_offset): New function.
7575
7576 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7577
7578 * symfile.c (add_symbol_file_command): Make sure that sections
7579 with the same name are sorted in the same order.
7580
7581 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7582
7583 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7584 require the second argument. If omitted, load sections at the
7585 addresses specified in the file.
7586
7587 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7588
7589 * symfile.c (symbol_file_command, symbol_file_add_main_1)
7590 (_initialize_symfile): Add option "-o" to symbol-file to add an
7591 offset to each section of the symbol file.
7592
7593 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7594
7595 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7596
7597 2018-06-27 Tom Tromey <tom@tromey.com>
7598
7599 * stack.c (_initialize_stack): Update "func" help text.
7600
7601 2018-06-27 Tom Tromey <tom@tromey.com>
7602
7603 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7604 std::vector.
7605 (unwind_infopy_str, pyuw_create_unwind_info)
7606 (unwind_infopy_add_saved_register, pyuw_sniffer)
7607 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7608 Update.
7609 (struct saved_reg): Add constructor.
7610 <value>: Now a gdbpy_ref<>.
7611
7612 2018-06-27 Tom Tromey <tom@tromey.com>
7613
7614 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7615
7616 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7617
7618 * gdb-gdb.py.in: Format using autopep8.
7619
7620 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7621
7622 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7623 (type_lookup_function): Recognize CORE_ADDR values.
7624
7625 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7626
7627 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7628 print tag_name.
7629
7630 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7631
7632 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7633 <__lt__>: Add.
7634
7635 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7636
7637 * gdb-gdb.py: Move to...
7638 * gdb-gdb.py.in: ... here.
7639 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7640 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7641 dependencies.
7642 (distclean): Remove gdb-gdb.py when cleaning.
7643 (gdb-gdb.py, gdb-gdb.gdb): New rules.
7644 * configure: Re-generate.
7645
7646 2018-06-27 Pedro Alves <palves@redhat.com>
7647
7648 * proc-service.c (get_ps_regcache): New.
7649 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7650 (ps_lsetfpregs): Use it.
7651
7652 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
7653
7654 PR gdb/21695
7655 * dwarf2read.c (lnp_state_machine::check_line_address): Update
7656 declaration.
7657 (dwarf_decode_lines_1): Adjust.
7658
7659 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7660
7661 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7662 override.
7663 <info_proc>: Likewise.
7664
7665 2018-06-26 Joel Brobecker <brobecker@adacore.com>
7666
7667 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7668 to windows_fetch_one_register, and only handle the case of
7669 fetching one register. Move the code that reloads the context
7670 and iterates over all registers if R is negative to...
7671 (windows_nat_target::fetch_registers): ... here.
7672 (do_windows_store_inferior_registers): Rename to
7673 windows_store_one_register, and only handle the case of storing
7674 one register. Move the code that handles the case where r is
7675 negative to...
7676 (windows_nat_target::store_registers) ... here.
7677
7678 2018-06-26 Tom Tromey <tom@tromey.com>
7679
7680 PR rust/22574:
7681 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7682 * rust-lang.c (rust_print_struct_def): Add podata parameter.
7683 Update.
7684 (rust_internal_print_type): Add podata parameter.
7685 (rust_print_type): Update.
7686
7687 2018-06-26 Tom Tromey <tom@tromey.com>
7688
7689 * typeprint.h (struct print_offset_data) <update, finish,
7690 maybe_print_hole>: New methods.
7691 <indentation>: New constant.
7692 * typeprint.c (print_offset_data::indentation): Define.
7693 (print_offset_data::maybe_print_hole, print_offset_data::update)
7694 (print_offset_data::finish): Move from c-typeprint.c and rename.
7695 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7696 (print_spaces_filtered_with_print_options): Update.
7697 (c_print_type_union_field_offset, maybe_print_hole)
7698 (c_print_type_struct_field_offset): Move to typeprint.c and
7699 rename.
7700 (c_type_print_base_struct_union): Update.
7701
7702 2018-06-25 Pedro Alves <palves@redhat.com>
7703
7704 * gdbthread.h (thread_info_ref, delete_thread)
7705 (delete_thread_silent, first_thread_of_inferior)
7706 (any_thread_of_inferior, switch_to_thread)
7707 (enable_thread_stack_temporaries)
7708 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7709 (get_last_thread_stack_temporary)
7710 (value_in_thread_stack_temporaries, can_access_registers_thread):
7711 Spell out "struct thread_info" instead of just "thread_info".
7712 * inferior.h (notice_new_inferior): Likewise.
7713
7714 2018-06-25 Pedro Alves <palves@redhat.com>
7715
7716 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7717 pass thread_info pointer to delete_thread.
7718 (windows_nat_target::detach): Pass inferior pointer to
7719 detach_inferior.
7720 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7721 delete_thread.
7722 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7723 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7724 and pass a thread_info pointer to delete_thread.
7725 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7726 pass thread_info pointer to delete_thread.
7727 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7728 delete_thread_silent call.
7729 * procfs.c (procfs_target::detach): Pass inferior pointer to
7730 detach_inferior.
7731 (procfs_target::wait): Pass thread_info pointer to delete_thread.
7732 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7733 delete_thread_silent call.
7734 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7735 pass thread_info pointer to delete_thread.
7736 (windows_nat_target::detach): Pass inferior pointer to
7737 delete_inferior.
7738
7739 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7740
7741 * regcache.c (readable_regcache::read_part): Fix asserts.
7742 (reg_buffer::raw_collect_part): New function.
7743 (regcache::write_part): Fix asserts.
7744 (reg_buffer::raw_supply_part): New function.
7745 (regcache::transfer_regset_register): New helper function.
7746 (regcache::transfer_regset): Call new functions.
7747 (regcache_supply_regset): Use gdb_byte*.
7748 (regcache::supply_regset): Likewise.
7749 (regcache_collect_regset): Likewise.
7750 (regcache::collect_regset): Likewise.
7751 * regcache.h (reg_buffer::raw_collect_part): New declaration.
7752 (reg_buffer::raw_supply_part): Likewise.
7753 (regcache::transfer_regset_register): Likewise.
7754 (regcache::transfer_regset): Use gdb_byte*.
7755
7756 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7757
7758 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7759
7760 2018-06-21 Pedro Alves <palves@redhat.com>
7761
7762 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7763 instead of a ptid_t. All callers adjusted.
7764 * ada-tasks.c (ada_get_task_number): Likewise. All callers
7765 adjusted.
7766 (print_ada_task_info, display_current_task_id, task_command_1):
7767 Adjust.
7768 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7769 inferior_thread.
7770 (breakpoint_kind): Adjust.
7771 (remove_breakpoints_pid): Rename to ...
7772 (remove_breakpoints_inf): ... this. Adjust to take an inferior
7773 pointer. All callers adjusted.
7774 (bpstat_clear_actions): Use inferior_thread.
7775 (get_bpstat_thread): New.
7776 (bpstat_do_actions): Use it.
7777 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7778 to take a thread_info pointer. All callers adjusted.
7779 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7780 (breakpoint_re_set_thread): Use inferior_thread.
7781 * breakpoint.h (struct inferior): Forward declare.
7782 (bpstat_stop_status): Update.
7783 (remove_breakpoints_pid): Delete.
7784 (remove_breakpoints_inf): New.
7785 * bsd-uthread.c (bsd_uthread_target::wait)
7786 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7787 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7788 (maint_btrace_packet_history_cmd)
7789 (maint_btrace_clear_packet_history_cmd): Adjust.
7790 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7791 inferior_thread.
7792 * cli/cli-interp.c: Include "inferior.h".
7793 * common/refcounted-object.h (struct
7794 refcounted_object_ref_policy): New.
7795 * compile/compile-object-load.c: Include gdbthread.h.
7796 (store_regs): Use inferior_thread.
7797 * corelow.c (core_target::close): Use current_inferior.
7798 (core_target_open): Adjust to use first_thread_of_inferior and use
7799 the current inferior.
7800 * ctf.c (ctf_target::close): Adjust to use current_inferior.
7801 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7802 <thread>: ... this new field. All references adjusted.
7803 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7804 Take a thread_info pointer instead of a ptid_t.
7805 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7806 (dummy_frame_discard, register_dummy_frame_dtor): Take a
7807 thread_info pointer instead of a ptid_t.
7808 * elfread.c: Include "inferior.h".
7809 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7810 Use inferior_thread.
7811 * eval.c (evaluate_subexp): Likewise.
7812 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7813 inferior_thread.
7814 * gdb_proc_service.h (struct thread_info): Forward declare.
7815 (struct ps_prochandle) <ptid>: Delete, replaced by ...
7816 <thread>: ... this new field. All references adjusted.
7817 * gdbarch.h, gdbarch.c: Regenerate.
7818 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7819 'thread' parameter. All implementations and callers adjusted.
7820 * gdbthread.h (thread_info) <set_running>: New method.
7821 (delete_thread, delete_thread_silent): Take a thread_info pointer
7822 instead of a ptid.
7823 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7824 (first_thread_of_process): Delete, replaced by ...
7825 (first_thread_of_inferior): ... this new function. All callers
7826 adjusted.
7827 (any_live_thread_of_process): Delete, replaced by ...
7828 (any_live_thread_of_inferior): ... this new function. All callers
7829 adjusted.
7830 (switch_to_thread, switch_to_no_thread): Declare.
7831 (is_executing): Delete.
7832 (enable_thread_stack_temporaries): Update comment.
7833 <enable_thread_stack_temporaries>: Take a thread_info pointer
7834 instead of a ptid_t. Incref the thread.
7835 <~enable_thread_stack_temporaries>: Decref the thread.
7836 <m_ptid>: Delete
7837 <m_thr>: New.
7838 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7839 (get_last_thread_stack_temporary)
7840 (value_in_thread_stack_temporaries, can_access_registers_thread):
7841 Take a thread_info pointer instead of a ptid_t. All callers
7842 adjusted.
7843 * infcall.c (get_call_return_value): Use inferior_thread.
7844 (run_inferior_call): Work with thread pointers instead of ptid_t.
7845 (call_function_by_hand_dummy): Work with thread pointers instead
7846 of ptid_t. Use thread_info_ref.
7847 * infcmd.c (proceed_thread_callback): Access thread's state
7848 directly.
7849 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7850 access thread's state directly.
7851 (continue_command): Use inferior_thread.
7852 (info_program_command): Use find_thread_ptid and access thread
7853 state directly.
7854 (proceed_after_attach_callback): Use thread state directly.
7855 (notice_new_inferior): Take a thread_info pointer instead of a
7856 ptid_t. All callers adjusted.
7857 (exit_inferior): Take an inferior pointer instead of a pid. All
7858 callers adjusted.
7859 (exit_inferior_silent): New.
7860 (detach_inferior): Delete.
7861 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7862 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7863 (detach_inferior_command, kill_inferior_command): Use
7864 find_inferior_id instead of valid_gdb_inferior_id and
7865 gdb_inferior_id_to_pid.
7866 (inferior_command): Use inferior and thread pointers.
7867 * inferior.h (struct thread_info): Forward declare.
7868 (notice_new_inferior): Take a thread_info pointer instead of a
7869 ptid_t. All callers adjusted.
7870 (detach_inferior): Delete declaration.
7871 (exit_inferior, exit_inferior_silent): Take an inferior pointer
7872 instead of a pid. All callers adjusted.
7873 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7874 (valid_gdb_inferior_id): Delete.
7875 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7876 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7877 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7878 ...
7879 <inf>: ... this new field.
7880 <step_ptid>: Delete, replaced by ...
7881 <step_thread>: ... this new field.
7882 (get_displaced_stepping_state): Take an inferior pointer instead
7883 of a pid. All callers adjusted.
7884 (displaced_step_in_progress_any_inferior): Adjust.
7885 (displaced_step_in_progress_thread): Take a thread pointer instead
7886 of a ptid_t. All callers adjusted.
7887 (displaced_step_in_progress, add_displaced_stepping_state): Take
7888 an inferior pointer instead of a pid. All callers adjusted.
7889 (get_displaced_step_closure_by_addr): Adjust.
7890 (remove_displaced_stepping_state): Take an inferior pointer
7891 instead of a pid. All callers adjusted.
7892 (displaced_step_prepare_throw, displaced_step_prepare)
7893 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7894 All callers adjusted.
7895 (start_step_over): Adjust.
7896 (infrun_thread_ptid_changed): Remove bit updating ptids in the
7897 displaced step queue.
7898 (do_target_resume): Adjust.
7899 (fetch_inferior_event): Use inferior_thread.
7900 (context_switch, get_inferior_stop_soon): Take an
7901 execution_control_state pointer instead of a ptid_t. All callers
7902 adjusted.
7903 (switch_to_thread_cleanup): Delete.
7904 (stop_all_threads): Use scoped_restore_current_thread.
7905 * inline-frame.c: Include "gdbthread.h".
7906 (inline_state) <inline_state>: Take a thread pointer instead of a
7907 ptid_t. All callers adjusted.
7908 <ptid>: Delete, replaced by ...
7909 <thread>: ... this new field.
7910 (find_inline_frame_state): Take a thread pointer instead of a
7911 ptid_t. All callers adjusted.
7912 (skip_inline_frames, step_into_inline_frame)
7913 (inline_skipped_frames, inline_skipped_symbol): Take a thread
7914 pointer instead of a ptid_t. All callers adjusted.
7915 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7916 (inline_skipped_frames, inline_skipped_symbol): Likewise.
7917 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7918 pointers directly.
7919 * linux-nat.c (get_detach_signal): Likewise.
7920 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7921 (thread_db_notice_clone): Adjust.
7922 (thread_db_find_new_threads_silently)
7923 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7924 a thread pointer instead of a ptid_t. All callers adjusted.
7925 * mi/mi-cmd-var.c: Include "inferior.h".
7926 (mi_cmd_var_update_iter): Update to use thread pointers.
7927 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7928 inferior directly.
7929 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7930 out to ...
7931 (mi_output_running): ... this new function.
7932 (mi_on_resume_1): Adjust to use it.
7933 (mi_user_selected_context_changed): Adjust to use inferior_thread.
7934 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7935 directly.
7936 (interrupt_thread_callback): : Adjust to use thread and inferior
7937 pointers.
7938 * proc-service.c: Include "gdbthread.h".
7939 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7940 * progspace-and-thread.c: Include "inferior.h".
7941 * progspace.c: Include "inferior.h".
7942 * python/py-exitedevent.c (create_exited_event_object): Adjust to
7943 hold a reference to an inferior_object.
7944 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7945 inferior_thread.
7946 * python/py-inferior.c (struct inferior_object): Give the type a
7947 tag name instead of a typedef.
7948 (python_on_normal_stop): No need to check if the current thread is
7949 listed.
7950 (inferior_to_inferior_object): Change return type to
7951 inferior_object. All callers adjusted.
7952 (find_thread_object): Delete, bits factored out to ...
7953 (thread_to_thread_object): ... this new function.
7954 * python/py-infthread.c (create_thread_object): Use
7955 inferior_to_inferior_object.
7956 (thpy_is_stopped): Use thread pointer directly.
7957 (gdbpy_selected_thread): Use inferior_thread.
7958 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7959 field, replaced with ...
7960 <thread>: ... this new field. All users adjusted.
7961 (btpy_insn_or_gap_new): Drop const.
7962 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
7963 callers adjusted.
7964 * python/py-record.c: Include "gdbthread.h".
7965 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7966 a ptid_t. All callers adjusted.
7967 (gdbpy_current_recording): Use inferior_thread.
7968 * python/py-record.h (recpy_record_object) <ptid>: Delete
7969 field, replaced with ...
7970 <thread>: ... this new field. All users adjusted.
7971 (recpy_element_object) <ptid>: Delete
7972 field, replaced with ...
7973 <thread>: ... this new field. All users adjusted.
7974 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7975 a ptid_t. All callers adjusted.
7976 * python/py-threadevent.c: Include "gdbthread.h".
7977 (get_event_thread): Use thread_to_thread_object.
7978 * python/python-internal.h (struct inferior_object): Forward
7979 declare.
7980 (find_thread_object, find_inferior_object): Delete declarations.
7981 (thread_to_thread_object, inferior_to_inferior_object): New
7982 declarations.
7983 * record-btrace.c: Include "inferior.h".
7984 (require_btrace_thread): Use inferior_thread.
7985 (record_btrace_frame_sniffer)
7986 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7987 (get_thread_current_frame): Use scoped_restore_current_thread and
7988 switch_to_thread.
7989 (get_thread_current_frame): Use thread pointer directly.
7990 (record_btrace_replay_at_breakpoint): Use thread's inferior
7991 pointer directly.
7992 * record-full.c: Include "inferior.h".
7993 * regcache.c: Include "gdbthread.h".
7994 (get_thread_arch_regcache): Use the inferior's address space
7995 directly.
7996 (get_thread_regcache, registers_changed_thread): New.
7997 * regcache.h (get_thread_regcache(thread_info *thread)): New
7998 overload.
7999 (registers_changed_thread): New.
8000 (remote_target) <remote_detach_1>: Swap order of parameters.
8001 (remote_add_thread): <remote_add_thread>: Return the new thread.
8002 (get_remote_thread_info(ptid_t)): New overload.
8003 (remote_target::remote_notice_new_inferior): Use thread pointers
8004 directly.
8005 (remote_target::process_initial_stop_replies): Use
8006 thread_info::set_running.
8007 (remote_target::remote_detach_1, remote_target::detach)
8008 (extended_remote_target::detach): Adjust.
8009 * stack.c (frame_show_address): Use inferior_thread.
8010 * target-debug.h (target_debug_print_thread_info_pp): New.
8011 * target-delegates.c: Regenerate.
8012 * target.c (default_thread_address_space): Delete.
8013 (memory_xfer_partial_1): Use current_inferior.
8014 (target_detach): Use current_inferior.
8015 (target_thread_address_space): Delete.
8016 (generic_mourn_inferior): Use current_inferior.
8017 * target.h (struct target_ops) <thread_address_space>: Delete.
8018 (target_thread_address_space): Delete.
8019 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
8020 pointers directly.
8021 (delete_thread_1, delete_thread, delete_thread_silent): Take a
8022 thread pointer instead of a ptid_t. Adjust all callers.
8023 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
8024 (first_thread_of_process): Delete, replaced by ...
8025 (first_thread_of_inferior): ... this new function. All callers
8026 adjusted.
8027 (any_thread_of_process): Rename to ...
8028 (any_thread_of_inferior): ... this, and take an inferior pointer.
8029 (any_live_thread_of_process): Rename to ...
8030 (any_live_thread_of_inferior): ... this, and take an inferior
8031 pointer.
8032 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8033 (value_in_thread_stack_temporaries)
8034 (get_last_thread_stack_temporary): Take a thread pointer instead
8035 of a ptid_t. Adjust all callers.
8036 (thread_info::set_running): New.
8037 (validate_registers_access): Use inferior_thread.
8038 (can_access_registers_ptid): Rename to ...
8039 (can_access_registers_thread): ... this, and take a thread
8040 pointer.
8041 (print_thread_info_1): Adjust to compare thread pointers instead
8042 of ptids.
8043 (switch_to_no_thread, switch_to_thread): Make extern.
8044 (scoped_restore_current_thread::~scoped_restore_current_thread):
8045 Use m_thread pointer directly.
8046 (scoped_restore_current_thread::scoped_restore_current_thread):
8047 Use inferior_thread.
8048 (thread_command): Use thread pointer directly.
8049 (thread_num_make_value_helper): Use inferior_thread.
8050 * top.c (execute_command): Use inferior_thread.
8051 * tui/tui-interp.c: Include "inferior.h".
8052 * varobj.c (varobj_create): Use inferior_thread.
8053 (value_of_root_1): Use find_thread_global_id instead of
8054 global_thread_id_to_ptid.
8055
8056 2018-06-21 Alan Hayward <alan.hayward@arm.com>
8057
8058 * regcache.c (readable_regcache::read_part): Avoid memcpy when
8059 possible.
8060 (regcache::write_part): Likewise.
8061 (readable_regcache::cooked_read_part): Update comment.
8062 (readable_regcache::cooked_write_part): Likewise.
8063 * regcache.h: (readable_regcache::read_part): Likewise.
8064 (regcache::write_part): Likewise.
8065
8066 2018-06-21 Richard Bunt <richard.bunt@arm.com>
8067 Dirk Schubert <dirk.schubert@arm.com>
8068
8069 * aarch64-linux-nat.c (post_attach): New.
8070 (aarch64_linux_nat_target::post_attach): Override post_attach to
8071 record the number of hardware debug registers.
8072
8073 2018-06-20 Tom Tromey <tom@tromey.com>
8074
8075 * python/py-param.c (add_setshow_generic): Make parameters const.
8076 (parmpy_init): Update.
8077
8078 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
8079
8080 * regcache.h (regcache_cooked_read_ftype): Rename to...
8081 (register_read_ftype): ...this, change type to function_view.
8082 (class reg_buffer) <save>: Remove src parameter.
8083 (readonly_detached_regcache) <readonly_detached_regcache>: Make
8084 parameter non-const in first overload. Remove src parameter in
8085 second overload.
8086 * regcache.c (do_cooked_read): Remove.
8087 (readonly_detached_regcache::readonly_detached_regcache): Make
8088 parameter non-const, adjust call to other constructor.
8089 (reg_buffer::save): Remove src parameter.
8090 * frame.c (do_frame_register_read): Remove.
8091 (frame_save_as_regcache): Use lambda function.
8092 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8093 parameter to ppu2spu_data *.
8094 (ppu2spu_sniffer): Use lambda function.
8095
8096 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
8097
8098 * record-full.c (record_full_target::insert_breakpoint): Remove
8099 "struct" keyword, add const.
8100
8101 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
8102
8103 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8104 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8105 * configure.ac: Remove AC_PREREQ, add missing quoting.
8106 * gnulib/configure.ac: Modernize usage of
8107 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
8108 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8109 (AUTOMAKE_VERSION): Bump to 1.15.1.
8110 * configure: Re-generate.
8111 * config.in: Re-generate.
8112 * aclocal.m4: Re-generate.
8113 * gnulib/aclocal.m4: Re-generate.
8114 * gnulib/config.in: Re-generate.
8115 * gnulib/configure: Re-generate.
8116 * gnulib/import/Makefile.in: Re-generate.
8117
8118 2018-06-19 Pedro Alves <palves@redhat.com>
8119
8120 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8121 (lookup_minimal_symbol_by_pc_section): ... here with
8122 gdb_assert_not_reached added.
8123
8124 2018-06-19 Pedro Alves <palves@redhat.com>
8125
8126 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8127 parameter with a block parameter. Compare location's block symbol
8128 with the frame's block instead of addresses.
8129 (skip_inline_frames): Pass the current block instead of the
8130 frame's address. Break out as soon as we determine the frame
8131 should not be skipped.
8132
8133 2018-06-18 Tom Tromey <tom@tromey.com>
8134
8135 * solib-aix.c (solib_aix_get_section_offsets): Return
8136 unique_xmalloc_ptr.
8137 (solib_aix_solib_create_inferior_hook): Update.
8138
8139 2018-06-18 Tom Tromey <tom@tromey.com>
8140
8141 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8142
8143 2018-06-18 Tom Tromey <tom@tromey.com>
8144
8145 * solib-frv.c (frv_relocate_main_executable): Use
8146 unique_xmalloc_ptr.
8147 * solib-dsbt.c (dsbt_relocate_main_executable): Use
8148 unique_xmalloc_ptr.
8149
8150 2018-06-18 Tom Tromey <tom@tromey.com>
8151
8152 * objfiles.h (inhibit_section_map_updates): Update.
8153 (resume_section_map_updates, resume_section_map_updates_cleanup):
8154 Remove.
8155 * solib-svr4.c (svr4_handle_solib_event): Update.
8156 * objfiles.c (inhibit_section_map_updates): Return
8157 scoped_restore_tmpl<int>.
8158 (resume_section_map_updates, resume_section_map_updates_cleanup):
8159 Remove.
8160
8161 2018-06-18 Tom Tromey <tom@tromey.com>
8162
8163 * valprint.h (read_string): Update.
8164 * valprint.c (read_string): Change type of "buffer".
8165 (val_print_string): Update.
8166 * python/py-value.c (valpy_string): Update.
8167 * language.h (struct language_defn) <la_get_string>: Change
8168 type of "buffer".
8169 (default_get_string, c_get_string): Update.
8170 * language.c (default_get_string): Change type of "buffer".
8171 * guile/scm-value.c (gdbscm_value_to_string): Update.
8172 * c-lang.c (c_get_string): Change type of "buffer".
8173
8174 2018-06-18 Tom Tromey <tom@tromey.com>
8175
8176 * ser-mingw.c (struct pipe_state_destroyer): New.
8177 (pipe_state_up): New typedef.
8178 (cleanup_pipe_state): Remove.
8179 (pipe_windows_open): Use pipe_state_up. Don't release argv.
8180
8181 2018-06-18 Tom Tromey <tom@tromey.com>
8182
8183 * rust-lang.h (rust_yyerror): Don't declare.
8184 * rust-lang.c (rust_language_defn): Update.
8185 * rust-exp.y (yyerror): Now static.
8186 * parse.c (parse_exp_in_context_1): Update.
8187 * p-lang.h (p_yyerror): Don't declare.
8188 * p-lang.c (p_language_defn): Update.
8189 * p-exp.y (yyerror): Now static.
8190 * opencl-lang.c (opencl_language_defn): Update.
8191 * objc-lang.c (objc_language_defn): Update.
8192 * m2-lang.h (m2_yyerror): Don't declare.
8193 * m2-lang.c (m2_language_defn): Update.
8194 * m2-exp.y (yyerror): Now static.
8195 * language.h (struct language_defn) <la_error>: Remove.
8196 * language.c (unk_lang_error): Remove.
8197 (unknown_language_defn, auto_language_defn): Remove.
8198 * go-lang.h (go_yyerror): Don't declare.
8199 * go-lang.c (go_language_defn): Update.
8200 * go-exp.y (yyerror): Now static.
8201 * f-lang.h (f_yyerror): Don't declare.
8202 * f-lang.c (f_language_defn): Update.
8203 * f-exp.y (yyerror): Now static.
8204 * d-lang.h (d_yyerror): Don't declare.
8205 * d-lang.c (d_language_defn): Update.
8206 * d-exp.y (yyerror): Now static.
8207 * c-lang.h (c_yyerror): Don't declare.
8208 * c-lang.c (c_language_defn, cplus_language_defn)
8209 (asm_language_defn, minimal_language_defn): Update.
8210 * c-exp.y (yyerror): Now static.
8211 * ada-lang.h (ada_yyerror): Don't declare.
8212 * ada-lang.c (ada_language_defn): Update.
8213 * ada-exp.y (yyerror): Now static.
8214
8215 2018-06-18 Alan Hayward <alan.hayward@arm.com>
8216
8217 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8218 (store_sveregs_to_thread): Likewise.
8219 (aarch64_linux_fetch_inferior_registers): Check for SVE.
8220 (aarch64_linux_store_inferior_registers): Likewise.
8221 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8222 function.
8223 (aarch64_sve_regs_copy_to_regcache): Likewise.
8224 (aarch64_sve_regs_copy_from_regcache): Likewise.
8225 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8226 declaration.
8227 (aarch64_sve_regs_copy_to_regcache): Likewise.
8228 (aarch64_sve_regs_copy_from_regcache): Likewise.
8229 (sve_context): Structure from Linux headers.
8230 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8231 (SVE_SIG_ZREG_SIZE): Likewise.
8232 (SVE_SIG_PREG_SIZE): Likewise.
8233 (SVE_SIG_FFR_SIZE): Likewise.
8234 (SVE_SIG_REGS_OFFSET): Likewise.
8235 (SVE_SIG_ZREGS_OFFSET): Likewise.
8236 (SVE_SIG_ZREG_OFFSET): Likewise.
8237 (SVE_SIG_ZREGS_SIZE): Likewise.
8238 (SVE_SIG_PREGS_OFFSET): Likewise.
8239 (SVE_SIG_PREG_OFFSET): Likewise.
8240 (SVE_SIG_PREGS_SIZE): Likewise.
8241 (SVE_SIG_FFR_OFFSET): Likewise.
8242 (SVE_SIG_REGS_SIZE): Likewise.
8243 (SVE_SIG_CONTEXT_SIZE): Likewise.
8244 (SVE_PT_REGS_MASK): Likewise.
8245 (SVE_PT_REGS_FPSIMD): Likewise.
8246 (SVE_PT_REGS_SVE): Likewise.
8247 (SVE_PT_VL_INHERIT): Likewise.
8248 (SVE_PT_VL_ONEXEC): Likewise.
8249 (SVE_PT_REGS_OFFSET): Likewise.
8250 (SVE_PT_FPSIMD_OFFSET): Likewise.
8251 (SVE_PT_FPSIMD_SIZE): Likewise.
8252 (SVE_PT_SVE_ZREG_SIZE): Likewise.
8253 (SVE_PT_SVE_PREG_SIZE): Likewise.
8254 (SVE_PT_SVE_FFR_SIZE): Likewise.
8255 (SVE_PT_SVE_FPSR_SIZE): Likewise.
8256 (SVE_PT_SVE_FPCR_SIZE): Likewise.
8257 (__SVE_SIG_TO_PT): Likewise.
8258 (SVE_PT_SVE_OFFSET): Likewise.
8259 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8260 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8261 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8262 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8263 (SVE_PT_SVE_PREG_OFFSET): Likewise.
8264 (SVE_PT_SVE_PREGS_SIZE): Likewise.
8265 (SVE_PT_SVE_FFR_OFFSET): Likewise.
8266 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8267 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8268 (SVE_PT_SVE_SIZE): Likewise.
8269 (SVE_PT_SIZE): Likewise.
8270 (HAS_SVE_STATE): New define.
8271
8272 2018-06-18 Alan Hayward <alan.hayward@arm.com>
8273
8274 * nat/aarch64-sve-linux-sigcontext.h: New file.
8275 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8276 new files.
8277 (SVE_VQ_MIN): Likewise.
8278 (SVE_VQ_MAX): Likewise.
8279 (SVE_VL_MIN): Likewise.
8280 (SVE_VL_MAX): Likewise.
8281 (SVE_NUM_ZREGS): Likewise.
8282 (SVE_NUM_PREGS): Likewise.
8283 (sve_vl_valid): Likewise.
8284 (struct user_sve_header): Likewise.
8285
8286 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
8287 Richard Bunt <Richard.Bunt@arm.com>
8288
8289 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8290 was requested by GDB.
8291
8292 2018-06-15 Tom de Vries <tdevries@suse.de>
8293
8294 * MAINTAINERS (Write After Approval): Add Tom de Vries.
8295
8296 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
8297
8298 * gnulib/update-gnulib.sh: Print expected versions of
8299 autoconf/aclocal.
8300
8301 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
8302
8303 * arch-utils.c (default_type_align): Use type_length_units.
8304 * gdbtypes.c (type_align): Use type_length_units.
8305
8306 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8307
8308 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8309 of 'define' command.
8310
8311 2018-06-14 Tom de Vries <tdevries@suse.de>
8312
8313 PR cli/22573
8314 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8315 get_no_prettyformat_print_options.
8316
8317 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
8318
8319 * sparc-nat.h: Include target.h.
8320 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8321 <fetch_registers>: Remove this argument in function call.
8322 <store_registers>: Remove this argument in function call, remove
8323 extra semicolon.
8324 <low_forget_process>: Call sparc64_forget_process instead of
8325 sparc_forget_process.
8326
8327 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8328
8329 * procfs.c (_initialize_procfs): Use add_inf_child_target.
8330 (procfs_target::make_corefile_notes): Adjust to new
8331 target_read_alloc return type.
8332
8333 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8334 Stephen Roberts <stephen.roberts@arm.com>
8335
8336 PR gdb/22882
8337 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8338 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8339 Move should_notify_stop local into more inner scope.
8340
8341 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8342 Stephen Roberts <stephen.roberts@arm.com>
8343
8344 PR gdb/22882
8345 * infrun.c (resume_1): Add call to mark_async_event_handler.
8346
8347 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8348
8349 * infrun.c (do_target_wait): Change old version of $pc printed.
8350
8351 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
8352
8353 * dwarf2read.c (read_index_from_section): Rename to...
8354 (read_gdb_index_from_section): ... this, update all callers.
8355 (dwarf2_read_index): Rename to...
8356 (dwarf2_read_gdb_index): ... this, update all callers.
8357
8358 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
8359
8360 * hppa-linux-nat.c
8361 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8362 hppa_linux_nat_target::fetch_registers.
8363
8364 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8365
8366 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8367 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8368 (AARCH64_DWARF_SVE_FFR): Likewise.
8369 (AARCH64_DWARF_SVE_P0): Likewise.
8370 (AARCH64_DWARF_SVE_Z0): Likewise.
8371
8372 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8373
8374 * common/common-regcache.h (raw_compare): New function.
8375 * regcache.c (regcache::raw_compare): Likewise.
8376 * regcache.h (regcache::raw_compare): New declaration.
8377
8378 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8379
8380 * common/common-regcache.h (reg_buffer_common): New structure.
8381 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8382 (reg_buffer::raw_supply): Likewise.
8383 (reg_buffer::raw_supply_integer): Likewise.
8384 (reg_buffer::raw_supply_zeroed): Likewise.
8385 (reg_buffer::raw_collect): Likewise.
8386 (reg_buffer::raw_collect_integer): Likewise.
8387 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8388 (reg_buffer::raw_supply): Likewise.
8389 (reg_buffer::raw_supply_integer): Likewise.
8390 (reg_buffer::raw_supply_zeroed): Likewise.
8391 (reg_buffer::raw_collect): Likewise.
8392 (reg_buffer::raw_collect_integer): Likewise.
8393
8394 2018-06-10 Tom Tromey <tom@tromey.com>
8395
8396 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
8397 (class remote_state) <stop_reply_queue>: Now std::vector.
8398 (remote_state::~remote_state)
8399 (remote_target::stop_reply_queue_length): Update.
8400 (struct queue_iter_param, remove_child_of_pending_fork)
8401 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8402 (check_pending_event_prevents_wildcard_vcont_callback)
8403 (remove_stop_reply_for_inferior)
8404 (remove_stop_reply_of_remote_state)
8405 (remote_notif_remove_once_on_match)
8406 (stop_reply_match_ptid_and_ws)
8407 (remote_kill_child_of_pending_fork): Remove.
8408 (remote_target::remove_new_fork_children)
8409 (remote_target::check_pending_events_prevent_wildcard_vcont)
8410 (remote_target::discard_pending_stop_replies)
8411 (remote_target::discard_pending_stop_replies_in_queue)
8412 (remote_target::remote_notif_remove_queued_reply)
8413 (remote_target::queued_stop_reply)
8414 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8415 (remote_target::wait, remote_target::kill_new_fork_children)
8416 (remote_target::async): Update.
8417
8418 2018-06-10 Tom Tromey <tom@tromey.com>
8419
8420 * record-full.c (record_full_arch_list_cleanups): Remove.
8421 (record_full_message): Use try/catch.
8422 (record_full_wait_cleanups): Remove.
8423 (record_full_wait_1): Use try/catch.
8424 (record_full_restore): Likewise.
8425
8426 2018-06-10 Tom Tromey <tom@tromey.com>
8427
8428 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
8429 declare VEC. Add constructor.
8430 <in_target_beneath>: Now bool.
8431 (record_full_breakpoints): Now a std::vector, static.
8432 (record_full_sync_record_breakpoints)
8433 (record_full_init_record_breakpoints)
8434 (record_full_target::insert_breakpoint)
8435 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
8436
8437 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8438
8439 * dwarf2read.c (process_cu_includes): Remove struct keyword.
8440 * serial.c (serial_interface_lookup): Remove struct keyword.
8441
8442 2018-06-10 Tom Tromey <tom@tromey.com>
8443
8444 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8445 method.
8446 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8447 a method.
8448 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8449 method.
8450 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8451 "beneath" as a method.
8452 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8453 Use "beneath" as a method.
8454
8455 2018-06-10 Tom Tromey <tom@tromey.com>
8456
8457 * tracefile.c (struct trace_file_writer_deleter): New.
8458 <operator()>: Rename from trace_file_writer_xfree.
8459 (trace_file_writer_up): New typedef.
8460 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8461
8462 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8463
8464 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8465 <m_registers, m_register_status>: Change type to
8466 std::unique_ptr.
8467 * regcache.c (reg_buffer::reg_buffer): Use new instead of
8468 XCNEWVEC.
8469
8470 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8471
8472 * common/common-regcache.h (enum register_status): Add
8473 underlying type "signed char".
8474 * regcache.h (reg_buffer) <m_register_status>: Change type to
8475 register_status *.
8476 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8477 register_status instead of signed char.
8478 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8479 (reg_buffer::get_register_status): Remove cast.
8480 (readable_regcache::raw_read): Remove cast.
8481 (readable_regcache::cooked_read): Remove cast.
8482
8483 2018-06-09 Tom Tromey <tom@tromey.com>
8484
8485 * source.c (reverse_search_command, forward_search_command): Use
8486 scoped_fd.
8487
8488 2018-06-09 Tom Tromey <tom@tromey.com>
8489
8490 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
8491 (serial_ops_list): Now static, std::vector.
8492 (serial_interface_lookup, serial_add_interface): Update.
8493
8494 2018-06-09 Tom Tromey <tom@tromey.com>
8495
8496 * dwarf2read.c (process_cu_includes): Update.
8497 (process_full_comp_unit): Update.
8498 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8499 std::vector.
8500
8501 2018-06-08 Paul Koning <paul_koning@dell.com>
8502
8503 PR gdb/23252
8504
8505 * python/python.c (do_start_initialization):
8506 Avoid call to internal Python API.
8507 (init__gdb_module): New function.
8508
8509 2018-06-08 Gary Benson <gbenson@redhat.com>
8510
8511 * linux-thread-db.c (valprint.h): New include.
8512 (struct check_thread_db_info): New structure.
8513 (check_thread_db_on_load, tdb_testinfo): New static globals.
8514 (check_thread_db, check_thread_db_callback): New functions.
8515 (try_thread_db_load_1): Run integrity checks if requested.
8516 (maintenance_check_libthread_db): New function.
8517 (_initialize_thread_db): Register "maint check libthread-db"
8518 and "maint set/show check-libthread-db".
8519 * NEWS: Mention the above new commands.
8520
8521 2018-06-08 Tom Tromey <tom@tromey.com>
8522
8523 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8524 now a method.
8525
8526 2018-06-08 Tom Tromey <tom@tromey.com>
8527
8528 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8529
8530 2018-06-08 Tom Tromey <tom@tromey.com>
8531
8532 * common/btrace-common.h (struct btrace_data): Add constructor,
8533 destructor, move assignment operator.
8534 <empty, clear, fini>: New methods.
8535 <format>: Initialize.
8536 (btrace_data_init, btrace_data_fini, btrace_data_clear)
8537 (btrace_data_empty): Don't declare.
8538 * common/btrace-common.c (btrace_data_init): Remove.
8539 (btrace_data::fini): Rename from btrace_data_fini.
8540 (btrace_data::empty): Rename from btrace_data_empty.
8541 (btrace_data::clear): Rename from btrace_data_clear. Return
8542 bool.
8543 * btrace.h (make_cleanup_btrace_data): Don't declare.
8544 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8545 (parse_xml_btrace): Update.
8546 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8547 (maint_btrace_clear_packet_history_cmd): Update.
8548
8549 2018-06-07 Pedro Alves <palves@redhat.com>
8550
8551 * target.h (target_ops) <beneath>: Now a method. All references
8552 updated.
8553 (class target_stack): New.
8554 * target.c (g_target_stack): New.
8555 (g_current_top_target): Delete.
8556 (current_top_target): Get the top target out of g_target_stack.
8557 (target_stack::push, target_stack::unpush): New.
8558 (push_target, unpush_target): Reimplement.
8559 (target_is_pushed): Reimplement in terms of g_target_stack.
8560 (target_ops::beneath, target_stack::find_beneath): New.
8561
8562 2018-06-07 Pedro Alves <palves@redhat.com>
8563
8564 * target.h (find_target_beneath): Delete declaration.
8565 * target.c (find_target_beneath): Delete definition.
8566 * aix-thread.c: All callers of find_target_beneath adjusted to
8567 call target_ops::beneath instead.
8568 * bsd-uthread.c: Likewise.
8569 * linux-thread-db.c: Likewise.
8570 * ravenscar-thread.c: Likewise.
8571 * sol-thread.c: Likewise.
8572 * spu-multiarch.c: Likewise.
8573
8574 2018-06-07 Pedro Alves <palves@redhat.com>
8575
8576 * target.h (target_ops) <beneath>: Now a method. All references
8577 updated.
8578 (target_ops) <m_beneath>: New.
8579 * target.c (target_ops::beneath): New.
8580 * corelow.c: Adjust all references to target_ops::beneath.
8581 * linux-thread-db.c: Likewise.
8582 * make-target-delegates: Likewise.
8583 * record-btrace.c: Likewise.
8584 * record-full.c: Likewise.
8585 * remote.c: Likewise.
8586 * target.c: Likewise.
8587 * target-delegates.c: Regenerate.
8588
8589 2018-06-07 Pedro Alves <palves@redhat.com>
8590
8591 * target.h (target_stack): Delete.
8592 (current_top_target): Declare function.
8593 * target.c (target_stack): Delete.
8594 (g_current_top_target): New.
8595 (current_top_target): New function.
8596 * auxv.c: Use current_top_target instead of target_stack
8597 throughout.
8598 * avr-tdep.c: Likewise.
8599 * breakpoint.c: Likewise.
8600 * corefile.c: Likewise.
8601 * elfread.c: Likewise.
8602 * eval.c: Likewise.
8603 * exceptions.c: Likewise.
8604 * frame.c: Likewise.
8605 * gdbarch-selftests.c: Likewise.
8606 * gnu-v3-abi.c: Likewise.
8607 * ia64-tdep.c: Likewise.
8608 * ia64-vms-tdep.c: Likewise.
8609 * infcall.c: Likewise.
8610 * infcmd.c: Likewise.
8611 * infrun.c: Likewise.
8612 * linespec.c: Likewise.
8613 * linux-tdep.c: Likewise.
8614 * minsyms.c: Likewise.
8615 * ppc-linux-nat.c: Likewise.
8616 * ppc-linux-tdep.c: Likewise.
8617 * procfs.c: Likewise.
8618 * regcache.c: Likewise.
8619 * remote.c: Likewise.
8620 * rs6000-tdep.c: Likewise.
8621 * s390-linux-nat.c: Likewise.
8622 * s390-tdep.c: Likewise.
8623 * solib-aix.c: Likewise.
8624 * solib-darwin.c: Likewise.
8625 * solib-dsbt.c: Likewise.
8626 * solib-spu.c: Likewise.
8627 * solib-svr4.c: Likewise.
8628 * solib-target.c: Likewise.
8629 * sparc-tdep.c: Likewise.
8630 * sparc64-tdep.c: Likewise.
8631 * spu-tdep.c: Likewise.
8632 * symfile.c: Likewise.
8633 * symtab.c: Likewise.
8634 * target-descriptions.c: Likewise.
8635 * target-memory.c: Likewise.
8636 * target.c: Likewise.
8637 * target.h: Likewise.
8638 * tracefile-tfile.c: Likewise.
8639 * tracepoint.c: Likewise.
8640 * valops.c: Likewise.
8641 * valprint.c: Likewise.
8642 * value.c: Likewise.
8643 * windows-tdep.c: Likewise.
8644 * mi/mi-main.c: Likewise.
8645
8646 2018-06-07 Tom Tromey <tom@tromey.com>
8647
8648 * valprint.h (build_address_symbolic): Declare.
8649 * printcmd.c (print_address_symbolic): Update.
8650 (build_address_symbolic): Change "name" and "filename" to
8651 std::string.
8652 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8653 Update.
8654 * defs.h (build_address_symbolic): Remove declaration.
8655
8656 2018-06-07 Alan Hayward <alan.hayward@arm.com>
8657
8658 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8659 (aarch64_vnv_type): Add function.
8660 (aarch64_pseudo_register_name): Add V regs for SVE.
8661 (aarch64_pseudo_register_type): Likewise.
8662 (aarch64_pseudo_register_reggroup_p): Likewise.
8663 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8664 (aarch64_pseudo_read_value): Add V regs for SVE.
8665 (aarch64_pseudo_write_2): Use V0 offset for SVE
8666 (aarch64_pseudo_write): Add V regs for SVE.
8667 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8668
8669 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
8670
8671 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8672 (sve_vl_from_vq): Likewise.
8673
8674 2018-06-05 Tom Tromey <tom@tromey.com>
8675
8676 * cli/cli-cmds.c (show_version): Update.
8677 * top.c (print_gdb_version): Add "interactive" parameter.
8678 Update.
8679 * main.c (captured_main_1): Update.
8680 * top.h (print_gdb_version): Add "interactive" parameter and a
8681 comment.
8682
8683 2018-06-05 David Malcolm <dmalcolm@redhat.com>
8684
8685 * common/enum-flags.h: Add trailing semicolon to example in
8686 comment.
8687
8688 2018-06-05 Tom Tromey <tom@tromey.com>
8689
8690 PR cli/12326:
8691 * NEWS: Add entry about pager.
8692 * utils.c (pagination_disabled_for_command): New global.
8693 (prompt_for_continue): Allow "c" response to prompt.
8694 (reinitialize_more_filter): Clear
8695 pagination_disabled_for_command.
8696 (fputs_maybe_filtered): Check pagination_disabled_for_command.
8697
8698 2018-06-04 Tom Tromey <tom@tromey.com>
8699
8700 * ada-lang.h (ada_lookup_symbol_list): Update.
8701 * ada-lang.c (resolve_subexp): Update.
8702 (symbols_are_identical_enums): Change type of syms. Remove nsyms
8703 parameter.
8704 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8705 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8706 results parameter to std::vector.
8707 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8708 Update.
8709 * ada-exp.y (block_lookup): Update.
8710 (select_possible_type_sym): Change type of syms. Remove nsyms
8711 parameter.
8712 (write_var_or_type, write_name_assoc): Update.
8713
8714 2018-06-04 Joel Brobecker <brobecker@adacore.com>
8715
8716 * windows-nat.c (windows_nat_target::xfer_partial): Return
8717 TARGET_XFER_E_IO if we need to delegate to the target beneath
8718 but BENEATH is NULL.
8719
8720 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
8721
8722 * Makefile.in (config.status): Add configure.nat as a
8723 dependency.
8724
8725 2018-06-04 Tom Tromey <tom@tromey.com>
8726
8727 * cp-name-parser.y (cpname_state): Add method declarations.
8728 (HANDLE_QUAL): Update.
8729 (cpname_state::d_grab, cpname_state::fill_comp)
8730 (cpname_state::make_operator, cpname_state::make_dtor)
8731 (cpname_state::make_builtin_type, cpname_state::make_name)
8732 (cpname_state::d_qualify, cpname_state::d_int_type)
8733 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8734 (%union): Move earlier.
8735
8736 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8737
8738 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8739
8740 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8741
8742 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8743 (aarch64_pseudo_write_1): Likewise.
8744 (aarch64_pseudo_read_value): Use helper.
8745 (aarch64_pseudo_write): Likewise.
8746
8747 2018-06-04 Pedro Alves <palves@redhat.com>
8748
8749 * darwin-nat.c (darwin_ops): Delete.
8750 (darwin_attach_pid): Use get_native_target.
8751
8752 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8753
8754 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8755 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8756
8757 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8758
8759 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8760 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8761 (aarch64_gdbarch_init): Check for SVE.
8762 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8763
8764 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8765
8766 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8767 * aarch64-tdep.h (aarch64_read_description): Likewise.
8768 * arch/aarch64.c (aarch64_create_target_description): Likewise.
8769 * arch/aarch64.h (aarch64_create_target_description): Likewise.
8770 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8771 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8772 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8773
8774 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
8775
8776 * value.c (value_fetch_lazy_bitfield): New.
8777 (value_fetch_lazy_memory): New.
8778 (value_fetch_lazy_register): New.
8779 (value_fetch_lazy): Factor out to smaller functions.
8780
8781 2018-06-01 Tom Tromey <tom@tromey.com>
8782
8783 * cp-name-parser.y (backslashable, represented): Now const.
8784
8785 2018-06-01 Tom Tromey <tom@tromey.com>
8786
8787 * cp-name-parser.y: Include parser-defs.h.
8788 (parser_fprintf): Remove declaration.
8789
8790 2018-06-01 Tom Tromey <tom@tromey.com>
8791
8792 * cp-name-parser.y: Use %pure-parser, %lex-param, and
8793 %parse-param.
8794 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8795 (global_result): Remove globals.
8796 (struct cpname_state): New.
8797 (yyparse): Don't declare.
8798 (yylex, yyerror): Move declarations after %union.
8799 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8800 (make_name): Add state parameter.
8801 Update all callers.
8802 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8803 parameter.
8804 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8805 Update.
8806 (yylex): Add lvalp, state parameters.
8807 (yyerror): Add state parameter.
8808 (cp_demangled_name_to_comp): Update.
8809
8810 2018-06-01 Tom Tromey <tom@tromey.com>
8811
8812 * cp-name-parser.y (parser_fprintf): Declare.
8813 (GDB_YY_REMAP_PREFIX): Define.
8814 Include yy-remap.h. Don't redefine yy* identifiers.
8815
8816 2018-06-01 Tom Tromey <tom@tromey.com>
8817
8818 * python/py-type.c (typy_legacy_template_argument): Update.
8819 * cp-support.h (cp_demangled_name_to_comp): Update.
8820 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8821 parameter to be a "std::string *".
8822 (main): Update.
8823
8824 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
8825
8826 * ada-lex.l: Include "diagnostics.h" instead of
8827 "common/diagnostics.h".
8828 * unittests/environ-selftests.c: Likewise.
8829 * common/diagnostics.h: Moved to ../include.
8830
8831 2018-06-01 Joel Brobecker <brobecker@adacore.com>
8832
8833 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8834 to language_mode_manual while calling breakpoint_re_set_one.
8835
8836 2018-06-01 Tom Tromey <tom@tromey.com>
8837
8838 * valops.c (value_cast_structs, destructor_name_p): Update.
8839 * symtab.c (gdb_mangle_name): Update.
8840 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8841 Update.
8842 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8843 (pascal_object_print_value_fields, pascal_object_print_value):
8844 Update.
8845 * p-typeprint.c (pascal_type_print_derivation_info): Update.
8846 * linespec.c (find_methods): Update.
8847 * gdbtypes.h (type_name_no_tag): Remove.
8848 (type_name_or_error): Rename from type_name_no_tag_or_error.
8849 * gdbtypes.c (type_name_no_tag): Remove.
8850 (type_name_or_error): Rename from type_name_no_tag_or_error.
8851 (lookup_struct_elt_type, check_typedef): Update.
8852 * expprint.c (print_subexp_standard): Update.
8853 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8854 * d-namespace.c (d_lookup_nested_symbol): Update.
8855 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8856 (cp_print_class_member): Update.
8857 * cp-namespace.c (cp_lookup_nested_symbol): Update.
8858 * completer.c (add_struct_fields): Update.
8859 * c-typeprint.c (cp_type_print_derivation_info)
8860 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8861 Update.
8862 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8863 (ada_prefer_type, ada_is_exception_sym): Update.
8864
8865 2018-06-01 Tom Tromey <tom@tromey.com>
8866
8867 * valops.c (enum_constant_from_type, value_namespace_elt)
8868 (value_maybe_namespace_elt): Update.
8869 * valarith.c (find_size_for_pointer_math): Update.
8870 * target-descriptions.c (make_gdb_type): Update.
8871 * symmisc.c (print_symbol): Update.
8872 * stabsread.c (define_symbol, read_type)
8873 (complain_about_struct_wipeout, add_undefined_type)
8874 (cleanup_undefined_types_1): Update.
8875 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8876 (rust_range_type_p, val_print_struct, rust_print_struct_def)
8877 (rust_internal_print_type, rust_composite_type)
8878 (rust_evaluate_funcall, rust_evaluate_subexp)
8879 (rust_inclusive_range_type_p): Update.
8880 * python/py-type.c (typy_get_tag): Update.
8881 * p-typeprint.c (pascal_type_print_base): Update.
8882 * mdebugread.c (parse_symbol, parse_type): Update.
8883 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8884 Update.
8885 * guile/scm-type.c (gdbscm_type_tag): Update.
8886 * go-lang.c (sixg_string_p): Update.
8887 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8888 Update.
8889 * gdbtypes.h (struct main_type) <tag_name>: Remove.
8890 (TYPE_TAG_NAME): Remove.
8891 * gdbtypes.c (type_name_no_tag): Simplify.
8892 (check_typedef, check_types_equal, recursive_dump_type)
8893 (copy_type_recursive, arch_composite_type): Update.
8894 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
8895 in summary mode when needed.
8896 * eval.c (evaluate_funcall): Update.
8897 * dwarf2read.c (fixup_go_packaging, read_structure_type)
8898 (process_structure_scope, read_enumeration_type)
8899 (read_namespace_type, read_module_type, determine_prefix): Update.
8900 * cp-support.c (inspect_type): Update.
8901 * coffread.c (process_coff_symbol, decode_base_type): Update.
8902 * c-varobj.c (c_is_path_expr_parent): Update.
8903 * c-typeprint.c (c_type_print_base_struct_union): Update.
8904 (c_type_print_base_1): Update. Print struct/class/union/enum in
8905 summary when using C language.
8906 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8907 (gen_maybe_namespace_elt): Update.
8908 * ada-lang.c (ada_type_name): Simplify.
8909 (empty_record, ada_template_to_fixed_record_type_1)
8910 (template_to_static_fixed_type)
8911 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8912
8913 2018-06-01 Tom Tromey <tom@tromey.com>
8914
8915 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8916 c_print_type.
8917 * c-typeprint.c (c_print_type_1): Add "language" parameter.
8918 (c_print_type): Update.
8919 (c_print_type): New overload.
8920 (c_type_print_varspec_prefix, c_type_print_args)
8921 (c_type_print_varspec_suffix, c_print_type_no_offsets)
8922 (c_type_print_base_struct_union, c_type_print_base_1)
8923 (cp_type_print_method_args): Add "language" parameter.
8924 (c_type_print_base): Update.
8925 * c-lang.h (c_print_type): Add new overload.
8926
8927 2018-06-01 Tom Tromey <tom@tromey.com>
8928
8929 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8930 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8931
8932 2018-06-01 Alan Hayward <alan.hayward@arm.com>
8933
8934 * aarch64-tdep.c (aarch64_sve_register_names): New const
8935 var.
8936 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8937 (AARCH64_SVE_Z_REGS_NUM): New define.
8938 (AARCH64_SVE_P_REGS_NUM): Likewise.
8939 (AARCH64_SVE_NUM_REGS): Likewise.
8940
8941 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
8942
8943 * nat/linux-ptrace.h [__alpha__]
8944 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8945 definitions.
8946
8947 2018-05-31 Maciej W. Rozycki <macro@mips.com>
8948
8949 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8950 the endianness selected.
8951 * NEWS: Document `set endian auto' mode operation update.
8952
8953 2018-05-31 Alan Hayward <alan.hayward@arm.com>
8954
8955 * Makefile.in: Add new header.
8956 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8957 (sve_vl_from_vg): Likewise.
8958 (sve_vq_from_vl): Likewise.
8959 (sve_vl_from_vq): Likewise.
8960 (sve_vq_from_vg): Likewise.
8961 (sve_vg_from_vq): Likewise.
8962 * configure.nat: Add new c file.
8963 * nat/aarch64-sve-linux-ptrace.c: New file.
8964 * nat/aarch64-sve-linux-ptrace.h: New file.
8965
8966 2018-05-31 Alan Hayward <alan.hayward@arm.com>
8967
8968 * aarch64-linux-nat.c (aarch64_linux_read_description):
8969 Add parmeter zero.
8970 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8971 Likewise.
8972 * aarch64-tdep.c (tdesc_aarch64_list): Add.
8973 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8974 (aarch64_gdbarch_init): Add parmeter zero.
8975 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8976 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8977 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8978 parmeter.
8979 * doc/gdb.texinfo: Describe SVE feature
8980 * features/aarch64-sve.c: New file.
8981
8982 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
8983
8984 PR gdb/23210
8985 * gdbarch.sh (significant_addr_bit): Default to zero when
8986 not set by target architecture.
8987 * gdbarch.c: Re-generated.
8988 * utils.c (address_significant): Update.
8989
8990 2018-05-30 Joel Brobecker <brobecker@adacore.com>
8991
8992 * stack.c (func_command): Remove trailing newline in call to error.
8993
8994 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8995
8996 * regcache.h (regcache_raw_collect): Remove, update callers to
8997 use regcache::raw_collect.
8998 * regcache.c (regcache_raw_collect): Remove.
8999
9000 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9001
9002 * regcache.h (regcache_raw_supply): Remove, update callers to
9003 use detached_regcache::raw_supply.
9004 * regcache.c (regcache_raw_supply): Remove.
9005
9006 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9007
9008 * regcache.h (regcache_cooked_write_part): Remove, update
9009 callers to use regcache::cooked_write_part.
9010 * regcache.c (regcache_cooked_write_part): Remove.
9011
9012 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9013
9014 * regcache.h (regcache_cooked_read_part): Remove, update callers
9015 to use readable_regcache::cooked_read_part.
9016 * regcache.c (regcache_cooked_read_part): Remove.
9017
9018 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9019
9020 * regcache.h (regcache_cooked_read_value): Remove, update
9021 callers to use readable_regcache::cooked_read_value.
9022 * regcache.c (regcache_cooked_read_value): Remove.
9023
9024 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9025
9026 * regcache.h (regcache_cooked_write): Remove, update callers to
9027 use regcache::cooked_write.
9028 * regcache.c (regcache_cooked_write): Remove.
9029
9030 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9031
9032 * regcache.h (regcache_invalidate): Remove, update callers to
9033 use detached_regcache::invalidate instead.
9034 * regcache.c (regcache_invalidate): Remove.
9035
9036 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9037
9038 * regcache.h (regcache_raw_write_part): Remove, update callers
9039 to use regcache::raw_write_part instead.
9040 * regcache.c (regcache_raw_write_part): Remove.
9041
9042 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9043
9044 * regcache.h (regcache_raw_read_part): Remove, update callers to
9045 use readable_regcache::raw_read_part instead.
9046 * regcache.c (regcache_raw_read_part): Remove.
9047
9048 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9049
9050 * regcache.h (regcache_cooked_read): Remove, update callers to
9051 use readable_regcache::cooked_read instead.
9052 * regcache.c (regcache_cooked_read): Remove.
9053
9054 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9055
9056 * regcache.h (regcache_raw_write): Remove, update callers to use
9057 regcache::raw_write instead.
9058 * regcache.c (regcache_raw_write): Remove.
9059
9060 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9061
9062 * regcache.h (regcache_raw_read): Remove, update callers to use
9063 readable_regcache::raw_read instead.
9064 * regcache.c (regcache_raw_read): Remove.
9065
9066 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9067
9068 * regcache.h (regcache_raw_update): Remove, update callers to
9069 use readable_regcache::raw_update instead.
9070 * regcache.c (regcache_raw_update): Remove.
9071
9072 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9073
9074 * regcache.h (regcache_register_status): Remove, update callers
9075 to use reg_buffer::get_register_status directly instead.
9076 * regcache.c (regcache_register_status): Remove.
9077
9078 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9079
9080 * regcache.h (regcache_get_ptid): Remove, update all callers to
9081 call regcache::ptid instead.
9082 * regcache.c (regcache_get_ptid): Remove.
9083
9084 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9085
9086 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9087
9088 2018-05-30 Pedro Alves <palves@redhat.com>
9089
9090 * common/common-exceptions.h (exception_rethrow): Use
9091 ATTRIBUTE_NORETURN.
9092
9093 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
9094
9095 * breakpoint.c (print_solib_event, check_status_catch_solib):
9096 Remove struct keyword in range-based for loops.
9097 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9098 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9099 Likewise.
9100 * linespec.c (find_superclass_methods, search_minsyms_for_name):
9101 Likewise.
9102 * symfile.c (addr_info_make_relative): Likewise.
9103 * thread.c (value_in_thread_stack_temporaries): Likewise.
9104
9105 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
9106
9107 PR gdb/16841
9108 * valops.c (value_struct_elt_for_reference): Call check_typedef on
9109 aggregate type to get its real type before accessing it.
9110
9111 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
9112
9113 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9114 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9115 * coff-pe-read.c (add_pe_forwarded_sym): Replace
9116 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9117 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9118 * jit.c (jit_breakpoint_re_set_internal): Likewise.
9119 * printcmd.c (info_address_command): Likewise.
9120
9121 2018-05-29 Tom Tromey <tom@tromey.com>
9122
9123 * windows-nat.c (handle_exception): Update fall-through comment.
9124
9125 2018-05-29 Tom Tromey <tom@tromey.com>
9126
9127 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
9128 (struct program_space) <added_solibs>: Now a std::vector.
9129 * breakpoint.c (print_solib_event): Update.
9130 (check_status_catch_solib): Update.
9131 * progspace.c (clear_program_space_solib_cache): Update.
9132 * solib.c (update_solib_list): Update.
9133
9134 2018-05-29 Tom Tromey <tom@tromey.com>
9135
9136 * python/py-type.c (typy_richcompare): Update.
9137 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9138 * gdbtypes.h (types_deeply_equal): Return bool.
9139 (types_equal): Likewise.
9140 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
9141 declare VEC.
9142 (check_types_equal): Change worklist to std::vector. Return
9143 bool.
9144 (struct type_equality_entry): Add constructor.
9145 (compare_maybe_null_strings): Return bool.
9146 (check_types_worklist): Return bool. Change worklist to
9147 std::vector.
9148 (types_deeply_equal): Use std::vector.
9149 (types_equal): Return bool.
9150 (compare_maybe_null_strings): Simplify.
9151
9152 2018-05-29 Tom Tromey <tom@tromey.com>
9153
9154 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
9155
9156 2018-05-29 Tom Tromey <tom@tromey.com>
9157
9158 * objc-lang.h: Don't include cp-support.h.
9159 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
9160 declare VEC.
9161
9162 2018-05-27 Tom Tromey <tom@tromey.com>
9163
9164 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9165
9166 2018-05-25 Tom Tromey <tom@tromey.com>
9167
9168 * value.c (value::location): Initialize.
9169
9170 2018-05-25 Tom Tromey <tom@tromey.com>
9171
9172 * dbxread.c (init_bincl_list): Remove.
9173 (bincl_list): Now a std::vector.
9174 (bincls_allocated, next_bincl): Remove.
9175 (free_bincl_list, do_free_bincl_list_cleanup)
9176 (make_cleanup_free_bincl_list): Remove.
9177 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9178 unique_xmalloc_ptr.
9179 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9180 (struct header_file_location): Add constructor.
9181 (add_bincl_to_list): Remove.
9182
9183 2018-05-25 Tom Tromey <tom@tromey.com>
9184
9185 * tui/tui.c (tui_enable): Update.
9186 * mi/mi-interp.c (mi_interp::init): Update.
9187 * interps.h (class interp) <name>: New method.
9188 <m_name>: Rename from name.
9189 (~scoped_restore_interp): Update.
9190 * interps.c (interp::interp): Update.
9191 (interp_add, interp_set, interp_lookup_existing)
9192 (current_interp_named_p): Update.
9193
9194 2018-05-25 Tom Tromey <tom@tromey.com>
9195
9196 * interps.c (interp_name): Remove.
9197 * mi/mi-interp.c (mi_interp::init): Update.
9198 * interps.h (interp_name): Remove.
9199 (~scoped_restore_interp): Update.
9200 * tui/tui.c (tui_enable): Update.
9201
9202 2018-05-25 Tom Tromey <tom@tromey.com>
9203
9204 * utils.c (fputs_maybe_filtered): Update.
9205 * linespec.c (decode_line_full): Update.
9206 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9207 (mi_print_breakpoint_for_event, mi_solib_loaded)
9208 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9209 (mi_user_selected_context_changed): Update.
9210 * mi/mi-main.c (mi_execute_command): Update.
9211 * cli/cli-script.c (execute_control_command): Update.
9212 * python/python.c (execute_gdb_command): Update.
9213 * solib.c (info_sharedlibrary_command): Update.
9214 * interps.c (interp_ui_out): Remove.
9215 * interps.h (interp_ui_out): Remove.
9216
9217 2018-05-25 Tom Tromey <tom@tromey.com>
9218
9219 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9220 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9221 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9222
9223 2018-05-25 Tom Tromey <tom@tromey.com>
9224
9225 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9226 * interps.c (interp_exec): Use scoped_restore.
9227
9228 2018-05-25 Tom Tromey <tom@tromey.com>
9229
9230 * remote.c (remote_target::remote_file_get): Use
9231 gdb::byte_vector.
9232 (remote_target::remote_file_put): Likewise.
9233
9234 2018-05-25 Tom Tromey <tom@tromey.com>
9235
9236 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9237 a std::string.
9238 (get_pe_section_index, add_pe_exported_sym): Update.
9239 (read_pe_exported_syms): Use gdb::def_vector.
9240
9241 2018-05-25 Tom Tromey <tom@tromey.com>
9242
9243 * frame.c (remove_prev_frame): Remove.
9244 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9245
9246 2018-05-25 Maciej W. Rozycki <macro@mips.com>
9247
9248 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9249 Remove prototypes.
9250 * mips-linux-nat.c (supply_fpregset): Always call
9251 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9252 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9253 `mips_fill_fpregset'.
9254 * mips-linux-tdep.c (mips_supply_fpregset)
9255 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9256 (mips_fill_fpregset_wrapper): Remove functions.
9257 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9258 (mips_linux_fpregset): Remove variable.
9259 (mips_linux_iterate_over_regset_sections): Use
9260 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9261 (mips_linux_o32_sigframe_init): Remove comment.
9262
9263 2018-05-25 Pedro Alves <palves@redhat.com>
9264
9265 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9266 (struct readahead_cache, struct packet_reg, struct
9267 remote_arch_state, class remote_state): Move higher up in the
9268 file.
9269 (remote_target::m_remote_state): Now an object instead of a pointer.
9270 (remote_target::get_remote_state): Adjust.
9271
9272 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
9273
9274 * stack.c (select_and_print_frame): Delete.
9275 (struct function_bounds): Move struct within function.
9276 (func_command): Most content moved into new function
9277 find_frame_for_function, use new function, print result, add
9278 function comment.
9279 (find_frame_for_function): New function, now returns a result.
9280
9281 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9282
9283 * stack.c (iterate_over_block_arg_vars): Fix comment.
9284 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9285
9286 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
9287
9288 PR gdb/23203
9289 * frame.c
9290 (scoped_restore_selected_frame::scoped_restore_selected_frame):
9291 Define.
9292 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9293 Define.
9294 * frame.h (class scoped_restore_selected_frame): New class.
9295 * stack.c (print_frame_local_vars): Remove catching and rethrowing
9296 of any exception, use scoped_restore_selected_frame to restore the
9297 frame instead.
9298
9299 2018-05-24 Pedro Alves <palves@redhat.com>
9300
9301 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9302 override.
9303
9304 2018-05-23 Tom Tromey <tom@tromey.com>
9305
9306 * complaints.c (struct complaints): Remove.
9307 (symfile_complaint_book): Remove.
9308 (series): New global.
9309 (complaint_internal): Update.
9310 (clear_complaints): Update.
9311
9312 2018-05-23 Tom Tromey <tom@tromey.com>
9313
9314 * complaints.c (counters): New global.
9315 (struct complain): Remove.
9316 (struct complaints) <root>: Remove.
9317 (complaint_sentinel): Remove.
9318 (symfile_complaint_book): Update.
9319 (find_complaint) Remove.
9320 (complaint_internal, clear_complaints): Update.
9321
9322 2018-05-23 Tom Tromey <tom@tromey.com>
9323
9324 * complaints.c (struct complain) <file, line>: Remove.
9325 (find_complaint): Remove file, line parameters.
9326 (complaint_internal): Update.
9327
9328 2018-05-23 Tom Tromey <tom@tromey.com>
9329
9330 * complaints.c (vcomplaint): Remove.
9331 (complaint_internal) Merge in contents of vcomplaint.
9332
9333 2018-05-23 Tom Tromey <tom@tromey.com>
9334
9335 * complaints.c (struct complaints) <explanation>: Remove.
9336 (symfile_explanations): Remove.
9337 (symfile_complaint_book): Update.
9338 (vcomplaint): Update.
9339 (struct explanation): Remove.
9340
9341 2018-05-23 Tom Tromey <tom@tromey.com>
9342
9343 * complaints.c (symfile_complaints): Remove.
9344 (complaint_internal): Remove "complaints" parameter.
9345 (clear_complaints, vcomplaint): Remove "c" parameter.
9346 (get_complaints): Remove.
9347 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9348 (dwarf2_debug_line_missing_file_complaint)
9349 (dwarf2_debug_line_missing_end_sequence_complaint)
9350 (dwarf2_complex_location_expr_complaint)
9351 (dwarf2_const_value_length_mismatch_complaint)
9352 (dwarf2_section_buffer_overflow_complaint)
9353 (dwarf2_macro_malformed_definition_complaint)
9354 (dwarf2_invalid_attrib_class_complaint)
9355 (create_addrmap_from_index, dw2_symtab_iter_next)
9356 (dw2_expand_marked_cus)
9357 (dw2_debug_names_iterator::find_vec_in_debug_names)
9358 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9359 (create_debug_type_hash_table, init_cutu_and_read_dies)
9360 (partial_die_parent_scope, add_partial_enumeration)
9361 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9362 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9363 (read_import_statement, read_file_scope, create_dwo_cu_reader)
9364 (create_cus_hash_table, create_dwp_hash_table)
9365 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9366 (dwarf2_rnglists_process, dwarf2_ranges_process)
9367 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9368 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9369 (handle_struct_member_die, process_structure_scope)
9370 (read_array_type, read_common_block, read_module_type)
9371 (read_tag_pointer_type, read_typedef, read_base_type)
9372 (read_subrange_type, load_partial_dies, partial_die_info::read)
9373 (partial_die_info::read, partial_die_info::read)
9374 (partial_die_info::read, read_checked_initial_length_and_offset)
9375 (dwarf2_string_attr, read_formatted_entries)
9376 (dwarf_decode_line_header)
9377 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9378 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9379 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9380 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9381 (get_signatured_type, get_DW_AT_signature_type)
9382 (decode_locdesc, file_file_name, consume_improper_spaces)
9383 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9384 (dwarf_decode_macro_bytes, dwarf_decode_macros)
9385 (dwarf2_symbol_mark_computed, set_die_type)
9386 (read_attribute_value): Update.
9387 * stap-probe.c (handle_stap_probe, get_stap_base_address):
9388 Update.
9389 * dbxread.c (unknown_symtype_complaint)
9390 (lbrac_mismatch_complaint, repeated_header_complaint)
9391 (set_namestring, function_outside_compilation_unit_complaint)
9392 (read_dbx_symtab, process_one_symbol): Update.
9393 * gdbtypes.c (stub_noname_complaint): Update.
9394 * windows-nat.c (handle_unload_dll): Update.
9395 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9396 (decode_base_type): Update.
9397 * xcoffread.c (bf_notfound_complaint, ef_complaint)
9398 (eb_complaint, record_include_begin, record_include_end)
9399 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9400 (process_xcoff_symbol, read_symbol)
9401 (function_outside_compilation_unit_complaint)
9402 (scan_xcoff_symtab): Update.
9403 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9404 * buildsym.c (finish_block_internal, make_blockvector)
9405 (end_symtab_get_static_block, augment_type_symtab): Update.
9406 * dtrace-probe.c (dtrace_process_dof)
9407 (dtrace_static_probe_ops::get_probes): Update.
9408 * complaints.h (struct complaint): Don't declare.
9409 (symfile_complaints): Remove.
9410 (complaint_internal): Remove "complaints" parameter.
9411 (complaint): Likewise.
9412 (clear_complaints): Likewise.
9413 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9414 (reread_symbols): Update.
9415 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9416 (dwarf2_frame_cache, decode_frame_entry): Update.
9417 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9418 * objc-lang.c (lookup_objc_class, lookup_child_selector)
9419 (info_selectors_command): Update.
9420 * macrotab.c (macro_include, check_for_redefinition)
9421 (macro_undef): Update.
9422 * objfiles.c (filter_overlapping_sections): Update.
9423 * stabsread.c (invalid_cpp_abbrev_complaint)
9424 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9425 (define_symbol, error_type, read_type, rs6000_builtin_type)
9426 (stabs_method_name_from_physname, read_member_functions)
9427 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9428 (attach_fields_to_type, complain_about_struct_wipeout)
9429 (read_range_type, read_args, common_block_start)
9430 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9431 Update.
9432 * mdebugread.c (index_complaint, unknown_ext_complaint)
9433 (basic_type_complaint, bad_tag_guess_complaint)
9434 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9435 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9436 (parse_procedure, parse_lines)
9437 (function_outside_compilation_unit_complaint)
9438 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9439 (bad_tag_guess_complaint, reg_value_complaint): Update.
9440 * cp-support.c (demangled_name_complaint): Update.
9441 * macroscope.c (sal_macro_scope): Update.
9442 * dwarf-index-write.c (class debug_names): Update.
9443
9444 2018-05-23 Tom Tromey <tom@tromey.com>
9445
9446 * complaints.c (clear_complaints): Remove "noisy" parameter.
9447 * complaints.h (clear_complaints): Update.
9448 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9449 (reread_symbols): Update.
9450
9451 2018-05-23 Tom Tromey <tom@tromey.com>
9452
9453 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9454 SUBSEQUENT_MESSAGE.
9455 (vcomplaint, clear_complaints): Update.
9456 (symfile_explanations): Remove some messages.
9457
9458 2018-05-23 Tom Tromey <tom@tromey.com>
9459
9460 * complaints.c (internal_complaint): Remove.
9461 * complaints.h (internal_complaint): Remove.
9462
9463 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9464
9465 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9466
9467 2018-05-22 Pedro Alves <palves@redhat.com>
9468
9469 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9470 (remote_fileio_badfd, remote_fileio_return_errno)
9471 (remote_fileio_return_success, remote_fileio_func_open)
9472 (remote_fileio_func_open, remote_fileio_func_close)
9473 (remote_fileio_func_read, remote_fileio_func_write)
9474 (remote_fileio_func_lseek, remote_fileio_func_rename)
9475 (remote_fileio_func_unlink, remote_fileio_func_stat)
9476 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9477 (remote_fileio_func_isatty, remote_fileio_func_system): Add
9478 remote_target parameter.
9479 (remote_fio_func_map) <func>: Add remote_target parameter.
9480 (do_remote_fileio_request, remote_fileio_request):
9481 * remote-fileio.h (remote_fileio_request):
9482 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9483 remote_target parameter.
9484 (remote_notif_process, handle_notification): Adjust to pass down
9485 the remote.
9486 (remote_notif_state_allocate): Add remote_target parameter. Save
9487 it.
9488 * remote-notif.h (struct remote_target): Forward declare.
9489 (struct notif_client) <parse, ack, can_get_pending_events>: Add
9490 remote_target parameter.
9491 (struct remote_notif_state) <remote>: New field.
9492 (remote_notif_ack, remote_notif_parse): Add remote_target
9493 parameter.
9494 (remote_notif_state_allocate, remote_notif_state_allocate): Add
9495 remote_target parameter.
9496 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9497 (threads_listing_context, rmt_thread_action, protocol_feature)
9498 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9499 (packet_result, struct threads_listing_context, remote_state):
9500 Move definitions and declarations higher up.
9501 (remote_target) <~remote_target>: Declare.
9502 (remote_download_command_source, remote_file_put, remote_file_get)
9503 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9504 (remote_hostio_pread_vFile, remote_hostio_send_command)
9505 (remote_hostio_set_filesystem, remote_hostio_open)
9506 (remote_hostio_close, remote_hostio_unlink, remote_state)
9507 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9508 (get_memory_write_packet_size, get_memory_read_packet_size)
9509 (append_pending_thread_resumptions, remote_detach_1)
9510 (append_resumption, remote_resume_with_vcont)
9511 (add_current_inferior_and_thread, wait_ns, wait_as)
9512 (process_stop_reply, remote_notice_new_inferior)
9513 (process_initial_stop_replies, remote_add_thread)
9514 (btrace_sync_conf, remote_btrace_maybe_reopen)
9515 (remove_new_fork_children, kill_new_fork_children)
9516 (discard_pending_stop_replies, stop_reply_queue_length)
9517 (check_pending_events_prevent_wildcard_vcont)
9518 (discard_pending_stop_replies_in_queue, stop_reply)
9519 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9520 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9521 (remote_interrupt_as, remote_interrupt_ns)
9522 (remote_get_noisy_reply, remote_query_attached)
9523 (remote_add_inferior, remote_current_thread, get_current_thread)
9524 (set_thread, set_general_thread, set_continue_thread)
9525 (set_general_process, write_ptid)
9526 (remote_unpack_thread_info_response, remote_get_threadinfo)
9527 (parse_threadlist_response, remote_get_threadlist)
9528 (remote_threadlist_iterator, remote_get_threads_with_ql)
9529 (remote_get_threads_with_qxfer)
9530 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9531 (get_offsets, remote_check_symbols, remote_supported_packet)
9532 (remote_query_supported, remote_packet_size)
9533 (remote_serial_quit_handler, remote_detach_pid)
9534 (remote_vcont_probe, remote_resume_with_hc)
9535 (send_interrupt_sequence, interrupt_query)
9536 (remote_notif_get_pending_events, fetch_register_using_p)
9537 (send_g_packet, process_g_packet, fetch_registers_using_g)
9538 (store_register_using_P, store_registers_using_G)
9539 (set_remote_traceframe, check_binary_download)
9540 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9541 (remote_xfer_live_readonly_partial, remote_read_bytes)
9542 (remote_send_printf, remote_flash_write, readchar)
9543 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9544 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9545 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9546 (extended_remote_disable_randomization, extended_remote_run)
9547 (send_environment_packet, extended_remote_environment_support)
9548 (extended_remote_set_inferior_cwd, remote_write_qxfer)
9549 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9550 (packet_command): Now methods of ...
9551 (remote_target): ... this class.
9552 (m_remote_state) <remote_target>: New field.
9553 (struct remote_state) <stop_reply_queue,
9554 remote_async_inferior_event_token, wait_forever_enabled_p>: New
9555 fields.
9556 (remote_state::remote_state): Allocate stop_reply_queue.
9557 (remote_state): Delete global.
9558 (get_remote_state_raw): Delete.
9559 (remote_target::get_remote_state): Allocate m_remote_state on
9560 demand.
9561 (get_current_remote_target): New.
9562 (remote_ops, extended_remote_ops): Delete.
9563 (wait_forever_enabled_p, remote_async_inferior_event_token):
9564 Delete, moved to struct remote_state.
9565 (remote_target::close): Delete self. Destruction bits split to
9566 ...
9567 (remote_target::~remote_target): ... this.
9568 (show_memory_packet_size): Adjust to use
9569 get_current_remote_target.
9570 (struct protocol_feature) <func>: Add remote_target parameter.
9571 All callers adjusted.
9572 (curr_quit_handler_target): New.
9573 (remote_serial_quit_handler): Reimplement.
9574 (remote_target::open_1): Adjust to use get_current_remote_target.
9575 Heap-allocate remote_target/extended_remote_target instances.
9576 (vcont_builder::vcont_builder): Add remote_target parameter, and
9577 save it in m_remote. All callers adjusted.
9578 (vcont_builder::m_remote): New field.
9579 (vcont_builder::restart, vcont_builder::flush)
9580 (vcont_builder::push_action): Use it.
9581 (remote_target::commit_resume): Use it.
9582 (struct queue_iter_param) <remote>: New field.
9583 (remote_target::remove_new_fork_children): Fill in 'remote' field.
9584 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9585 (check_pending_event_prevents_wildcard_vcont_callback)
9586 (remote_target::check_pending_events_prevent_wildcard_vcont)
9587 (remote_target::discard_pending_stop_replies)
9588 (remote_target::discard_pending_stop_replies_in_queue)
9589 (remote_target::remote_notif_remove_queued_reply): Fill in
9590 'remote' field.
9591 (remote_notif_get_pending_events): New.
9592 (remote_target::readchar, remote_target::remote_serial_write):
9593 Save/restore curr_quit_handler_target.
9594 (putpkt): New.
9595 (kill_new_fork_children): Fill in 'remote' field.
9596 (packet_command): Use get_current_remote_target, defer to
9597 remote_target method of same name.
9598 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9599 parameter, and save it in m_remote. All callers adjusted.
9600 (scoped_remote_fd::release): Use m_remote.
9601 (scoped_remote_fd::m_remote): New field.
9602 (remote_file_put, remote_file_get, remote_file_delete): Use
9603 get_current_remote_target, defer to remote_target method of same
9604 name.
9605 (remote_btrace_reset): Add remote_state paremeter. Update all
9606 callers.
9607 (remote_async_inferior_event_handler). Pass down 'data'.
9608 (remote_new_objfile): Use get_current_remote_target.
9609 (remote_target::vcont_r_supported): New.
9610 (set_range_stepping): Use get_current_remote_target and
9611 remote_target::vcont_r_supported.
9612 (_initialize_remote): Don't allocate 'remote_state' and
9613 'stop_reply_queue' globals.
9614 * remote.h (struct remote_target): Forward declare.
9615 (getpkt, putpkt, remote_notif_get_pending_events): Add
9616 'remote_target' parameter.
9617
9618 2018-05-22 Pedro Alves <palves@redhat.com>
9619
9620 * remote.c (vcont_builder): Now a class. Make all data members
9621 private.
9622 (vcont_builder) <vcont_builder, restart, flush, push_action>:
9623 Declare methods.
9624 (vcont_builder_restart): Rename to ...
9625 (vcont_builder::restart): ... this.
9626 (vcont_builder_flush): Rename to ...
9627 (vcont_builder::flush): ... this.
9628 (vcont_builder_push_action): Rename to ...
9629 (vcont_builder::push_action): ... this.
9630 (remote_target::commit_resume): Adjust.
9631
9632 2018-05-22 Pedro Alves <palves@redhat.com>
9633
9634 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9635 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9636 (get_fixed_memory_packet_size): New.
9637 (get_memory_packet_size): Use it.
9638 (set_memory_packet_size): Don't override the config size with
9639 DEFAULT_MAX_MEMORY_PACKET_SIZE.
9640 (show_memory_packet_size): Use get_fixed_memory_packet_size.
9641 Don't refer to get_memory_packet_size if not connected to a remote
9642 target. Show "(default)" if configured size is 0.
9643
9644 2018-05-22 Pedro Alves <palves@redhat.com>
9645
9646 * remote.c (remote_target::mourn_inferior): Move
9647 discard_pending_stop_replies call here from ...
9648 (_initialize_remote): ... here.
9649
9650 2018-05-22 Pedro Alves <palves@redhat.com>
9651
9652 * remote.c (compare_section_command): Remove set_general_process
9653 call.
9654
9655 2018-05-22 Pedro Alves <palves@redhat.com>
9656
9657 * remote.c (struct packet_reg, struct remote_arch_state):
9658 Move higher up in the file.
9659 (remote_state) <m_arch_states>: Store remote_arch_state values
9660 instead of remote_arch_state pointers.
9661 (remote_state::get_remote_arch_state): Adjust.
9662
9663 2018-05-22 Pedro Alves <palves@redhat.com>
9664
9665 * remote.c: Include <unordered_map>.
9666 (remote_state): Now a class.
9667 (remote_state) <get_remote_arch_state>: Declare method.
9668 <get_remote_arch_state>: New field.
9669 (remote_arch_state) <remote_arch_state>: Declare ctor.
9670 <regs>: Now a unique_ptr.
9671 (remote_gdbarch_data_handle): Delete.
9672 (get_remote_arch_state): Delete.
9673 (remote_state::get_remote_arch_state): New.
9674 (get_remote_state): Adjust to call remote_state's
9675 get_remote_arch_state method.
9676 (init_remote_state): Delete, bits factored out to ...
9677 (remote_arch_state::remote_arch_state): ... this new method.
9678 (get_remote_packet_size, get_memory_packet_size)
9679 (process_g_packet, remote_target::fetch_registers)
9680 (remote_target::prepare_to_store, store_registers_using_G)
9681 (remote_target::store_registers, remote_target::get_trace_status):
9682 Adjust to call remote_state's method.
9683 (_initialize_remote): Remove reference to
9684 remote_gdbarch_data_handle.
9685
9686 2018-05-22 Pedro Alves <palves@redhat.com>
9687
9688 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9689 pread>: New method declarations.
9690 (remote_target::open_1): Adjust.
9691 (readahead_cache_invalidate): Rename to ...
9692 (readahead_cache::invalidate): ... this, and adjust to be a class
9693 method.
9694 (readahead_cache_invalidate_fd): Rename to ...
9695 (readahead_cache::invalidate_fd): ... this, and adjust to be a
9696 class method.
9697 (remote_hostio_pwrite): Adjust.
9698 (remote_hostio_pread_from_cache): Rename to ...
9699 (readahead_cache::pread): ... this, and adjust to be a class
9700 method.
9701 (remote_hostio_close): Adjust.
9702
9703 2018-05-22 Pedro Alves <palves@redhat.com>
9704
9705 * remote.c (remote_hostio_close_cleanup): Delete.
9706 (class scoped_remote_fd): New.
9707 (remote_file_put, remote_file_get): Use it.
9708
9709 2018-05-22 Pedro Alves <palves@redhat.com>
9710
9711 (struct vCont_action_support): Use bool and initialize all fields.
9712 (struct readahead_cache): Initialize all fields.
9713 (remote_state): Use bool and initialize all fields.
9714 (remote_state::remote_state, remote_state::~remote_state): New.
9715 (new_remote_state): Delete.
9716 (_initialize_remote): Use new to allocate remote_state.
9717
9718 2018-05-22 Pedro Alves <palves@redhat.com>
9719 張俊芝 <zjz@zjz.name>
9720
9721 PR gdb/22973
9722 * c-exp.y: Include "c-support.h".
9723 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9724 of tolower. Use c_ident_is_alpha to scan names.
9725 * c-lang.c: Include "c-support.h".
9726 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9727 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9728 * c-support.h: New file, with bits factored out from ...
9729 * cp-name-parser.y: ... this file.
9730 Include "c-support.h".
9731 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9732 c-support.h and renamed.
9733 (symbol_end, yylex): Adjust.
9734
9735 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9736
9737 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9738 parameter type to CORE_ADDR.
9739 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9740 parameter type in declaration to CORE_ADDR.
9741 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9742 target_auxv_search to get AT_HWCAP and use the result to get the
9743 target description.
9744 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9745 to CORE_ADDR. Remove the cast of the return value to unsigned
9746 long. Fix error predicate of target_auxv_search.
9747 (ppc_linux_nat_target::read_description): Change the type of the
9748 hwcap variable to CORE_ADDR.
9749
9750 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9751
9752 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9753 if the size of fpscr is larger than 32 bits.
9754
9755 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9756
9757 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9758 (ppc32_linux_vsxregmap): New global.
9759 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9760 regcache_supply_regset, and regcache_collect_regset.
9761 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9762 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9763 (fetch_vsx_register, store_vsx_register): Remove.
9764 (fetch_vsx_registers): Add regno parameter. Get regset using
9765 ppc_linux_vsxregset. Use regset to supply registers.
9766 (store_vsx_registers): Add regno parameter. Get regset using
9767 ppc_linux_vsxregset. Use regset to collect registers.
9768 (fetch_register): Call fetch_vsx_registers instead of
9769 fetch_vsx_register.
9770 (store_register): Call store_vsx_registers instead of
9771 store_vsx_register.
9772 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9773 new regno parameter.
9774 (store_ppc_registers): Call store_vsx_registers with -1 for the
9775 new regno parameter.
9776 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9777 (ppc_collect_vsxregset): Remove.
9778
9779 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9780
9781 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9782 offset fields.
9783 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9784 for vector register offset fields.
9785 (ppc64_fbsd_reg_offsets): Likewise.
9786 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9787 to vector register offset fields.
9788 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9789 to vector register offset fields.
9790 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9791 vector register offset fields.
9792 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9793 initializers for vector register offset fields.
9794 (rs6000_aix64_reg_offsets): Likewise.
9795 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9796 (ppc_supply_vrregset): Remove.
9797 (ppc_collect_vrregset): Remove.
9798 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9799 (ppc_linux_vrregset) : New function.
9800 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9801 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9802 (ppc32_linux_vrregset): Remove.
9803 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9804 and use result instead of ppc32_linux_vrregset.
9805 (ppc32_linux_reg_offsets): Remove initializers for vector register
9806 offset fields.
9807 (ppc64_linux_reg_offsets): Likewise.
9808 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9809 * ppc-linux-nat.c: Include regset.h.
9810 (gdb_vrregset_t): Adjust comment to account for little-endian
9811 mode.
9812 (supply_vrregset, fill_vrregset): Remove.
9813 (fetch_altivec_register, store_altivec_register): Remove.
9814 (fetch_altivec_registers): Add regno parameter. Get regset using
9815 ppc_linux_vrregset. Use regset to supply registers.
9816 (store_altivec_registers): Add regno parameter. Get regset using
9817 ppc_linux_vrregset. Use regset to collect registers.
9818 (fetch_register): Call fetch_altivec_registers instead of
9819 fetch_altivec_register.
9820 (store_register): Call store_altivec_registers instead of
9821 store_altivec_register.
9822 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9823 the new regno parameter.
9824 (store_ppc_registers): Call store_altivec_registers with -1 for
9825 the new regno parameter.
9826
9827 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9828
9829 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9830 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9831 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9832 (gdb_vrregset_t): Change array type size to
9833 PPC_LINUX_SIZEOF_VRREGSET.
9834 (gdb_vsxregset_t): Change array type size to
9835 PPC_LINUX_SIZEOF_VSXREGSET.
9836 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9837 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9838 PPC_LINUX_SIZEOF_VSXREGSET.
9839
9840 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9841
9842 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9843 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9844 nat/ppc-linux.c.
9845 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9846 ppc_linux_target_wordsize with tid.
9847 (ppc_linux_nat_target::read_description): Call ppc_linux_target
9848 wordsize with tid.
9849 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9850 (ppc64_64bit_inferior_p): Add static and inline specifiers.
9851 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9852 tid parameter. Remove static specifier.
9853 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9854 (ppc_linux_target_wordsize): New declaration.
9855
9856 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9857
9858 * arch/ppc-linux-common.c: New file.
9859 * arch/ppc-linux-common.h: New file.
9860 * arch/ppc-linux-tdesc.h: New file.
9861 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9862 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9863 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9864 arch/ppc-linux-tdesc.h.
9865 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9866 arch/ppc-linux-tdesc.h.
9867 (ppc_linux_nat_target::read_description): Remove target
9868 description matching code. Fill a ppc_linux_features struct and
9869 call ppc_linux_match_description with it. Move comment about ISA
9870 2.05 to ppc-linux-common.c.
9871 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9872 arch/ppc-linux-tdesc.h.
9873 (ppc_linux_core_read_description): Remove target description
9874 matching code. Fill a ppc_linux_features struct and call
9875 ppc_linux_match_description with it.
9876 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9877 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9878 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9879 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9880 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9881 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9882 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9883 (tdesc_powerpc_e500l): Remove.
9884
9885 2018-05-22 Joel Brobecker <brobecker@adacore.com>
9886
9887 * ada-lang.c (catch_assert_command): Pass empty string instead
9888 of NULL for excep_string argument.
9889
9890 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9891
9892 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9893 the width of the requested register exceeds the width of the
9894 `ptrace' data type.
9895
9896 2018-05-21 Tom Tromey <tom@tromey.com>
9897
9898 * printcmd.c (output_command): Remove.
9899 (output_command_const): Rename to output_command.
9900 * valprint.h (output_command): Rename from output_command_const.
9901 * tracepoint.c (trace_dump_actions): Call output_command.
9902
9903 2018-05-21 Tom Tromey <tom@tromey.com>
9904
9905 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9906 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9907 * ada-lang.h (create_ada_exception_catchpoint): Update.
9908 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9909 std::string.
9910 (create_excep_cond_exprs, ~ada_catchpoint)
9911 (should_stop_exception, print_one_exception)
9912 (print_mention_exception, print_recreate_exception): Update.
9913 (ada_get_next_arg): Remove.
9914 (catch_ada_exception_command_split): Use std::string. Change type
9915 of "excep_string", "cond_string".
9916 (catch_ada_exception_command): Update.
9917 (create_ada_exception_catchpoint): Change type of excep_string.
9918 (ada_exception_sal): Remove excep_string parameter.
9919 (~ada_catchpoint): Remove.
9920
9921 2018-05-21 Tom Tromey <tom@tromey.com>
9922
9923 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9924 cleanup.
9925
9926 2018-05-21 Tom Tromey <tom@tromey.com>
9927
9928 * ada-lang.c (ada_exception_message_1, ada_exception_message):
9929 Return unique_xmalloc_ptr.
9930 (print_it_exception): Update.
9931
9932 2018-05-21 Tom Tromey <tom@tromey.com>
9933
9934 * tracepoint.c (trace_dump_actions): Use std::string.
9935
9936 2018-05-21 Tom Tromey <tom@tromey.com>
9937
9938 * symfile.c (reread_symbols): Use std::string for original_name.
9939
9940 2018-05-21 Tom Tromey <tom@tromey.com>
9941
9942 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9943 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
9944 constructor.
9945
9946 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
9947
9948 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9949 instance to...
9950 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9951 * objfiles.c (get_objfile_bfd_data): Allocate
9952 objfile_per_bfd_storage with obstack_new when allocating on
9953 obstack.
9954
9955 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
9956
9957 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9958 OBSTACK_ZALLOC.
9959 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9960 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9961 * mdebugread.c (mdebug_build_psymtabs): Likewise.
9962 (add_pending): Likewise.
9963 (parse_symbol): Likewise.
9964 (parse_partial_symbols): Likewise.
9965 (psymtab_to_symtab_1): Likewise.
9966 (new_psymtab): Likewise.
9967 (elfmdebug_build_psymtabs): Likewise.
9968 * minsyms.c (terminate_minimal_symbol_table): Likewise.
9969 * objfiles.c (get_objfile_bfd_data): Likewise.
9970 (objfile_register_static_link): Likewise.
9971 * psymtab.c (allocate_psymtab): Likewise.
9972 * stabsread.c (read_member_functions): Likewise.
9973 * xcoffread.c (xcoff_end_psymtab): Likewise.
9974
9975 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
9976
9977 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9978 compiler supports std::is_trivially_constructible.
9979 * common/poison.h: Include obstack.h.
9980 (IsMallocable): Define to is_trivially_constructible if the
9981 compiler supports it, define to true_type otherwise.
9982 (xobnew): New.
9983 (XOBNEW): Redefine.
9984 (xobnewvec): New.
9985 (XOBNEWVEC): Redefine.
9986 * gdb_obstack.h (obstack_zalloc): New.
9987 (OBSTACK_ZALLOC): Redefine.
9988 (obstack_calloc): New.
9989 (OBSTACK_CALLOC): Redefine.
9990 (obstack_new): New.
9991 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9992 (gdbarch_obstack): New declaration in gdbarch.h, definition in
9993 gdbarch.c.
9994 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9995 obstack_calloc/obstack_zalloc.
9996 (gdbarch_obstack_zalloc): Remove.
9997 * target-descriptions.c (tdesc_data_init): Use obstack_new.
9998
9999 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10000
10001 * stack.c (backtrace_command_1): Remove useless variable int i.
10002
10003 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10004
10005 * stack.c (print_frame_info): Fix comment.
10006
10007 2018-05-18 Tom Tromey <tom@tromey.com>
10008
10009 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
10010 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
10011 (~dwarf2_per_objfile): Update
10012 (dwarf2_get_dwz_file): Use new.
10013 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
10014 unique_ptr.
10015
10016 2018-05-18 Tom Tromey <tom@tromey.com>
10017
10018 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
10019 unique_ptr.
10020 * dwarf2read.c (struct dwp_file): Add constructor and
10021 initializers.
10022 (open_and_init_dwp_file): Return a unique_ptr.
10023 (dwarf2_per_objfile, create_dwp_hash_table)
10024 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
10025 (lookup_dwo_unit_in_dwp): Update.
10026 (open_and_init_dwp_file, get_dwp_file): Update.
10027
10028 2018-05-18 Tom Tromey <tom@tromey.com>
10029
10030 * dwarf2read.c (dwarf2_per_objfile): Update.
10031 (struct mapped_index): Add initializers.
10032 (dwarf2_read_index): Use new.
10033 (dw2_symtab_iter_init): Update.
10034 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
10035 unique_ptr.
10036
10037 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
10038
10039 * dwarf2read.c (mapped_index) <total_size>: Remove.
10040
10041 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
10042
10043 * unittests/format_pieces-selftests.c (test_format_specifier):
10044 Add ARI comments.
10045
10046 2018-05-18 Tom Tromey <tom@tromey.com>
10047
10048 * c-typeprint.c (maybe_print_hole): New function.
10049 (c_print_type_struct_field_offset): Update.
10050 (c_type_print_base_struct_union): Call maybe_print_hole.
10051
10052 2018-05-17 Keith Seitz <keiths@redhat.com>
10053
10054 * breakpoint.c (build_bpstat_chain): New function, moved from
10055 bpstat_stop_status.
10056 (bpstat_stop_status): Add optional parameter, `stop_chain'.
10057 If no stop chain is passed, call build_bpstat_chain to build it.
10058 * breakpoint.h (build_bpstat_chain): Declare.
10059 (bpstat_stop_status): Move documentation here from breakpoint.c.
10060 * infrun.c (handle_signal_stop): Before eliding inlined frames,
10061 build the stop chain and pass it to skip_inline_frames.
10062 Pass this stop chain to bpstat_stop_status.
10063 * inline-frame.c: Include breakpoint.h.
10064 (stopped_by_user_bp_inline_frame): New function.
10065 (skip_inline_frames): Add parameter `stop_chain'.
10066 Move documention to inline-frame.h.
10067 If non-NULL, use stopped_by_user_bp_inline_frame to determine
10068 whether the frame should be elided.
10069 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10070 Add moved documentation and update for new parameter.
10071
10072 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
10073
10074 PR cli/14975
10075 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10076 unittests/format_pieces-selftests.c.
10077 * common/format.h (format_piece) <operator==>: New.
10078 (format_pieces) <operator[]>: Remove.
10079 * common/format.c (format_pieces::format_pieces): Handle \e.
10080 * unittests/format_pieces-selftests.c: New.
10081
10082 2018-05-17 Tom Tromey <tom@tromey.com>
10083
10084 PR symtab/23010:
10085 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10086 (dw2_instantiate_symtab): Add skip_partial parameter.
10087 (dw2_find_last_source_symtab, dw2_map_expand_apply)
10088 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10089 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10090 (dw2_expand_symtabs_matching_one)
10091 (dw2_find_pc_sect_compunit_symtab)
10092 (dw2_debug_names_lookup_symbol)
10093 (dw2_debug_names_expand_symtabs_for_function): Update.
10094 (init_cutu_and_read_dies): Add skip_partial parameter.
10095 (process_psymtab_comp_unit, build_type_psymtabs_1)
10096 (process_skeletonless_type_unit, load_partial_comp_unit)
10097 (psymtab_to_symtab_1): Update.
10098 (load_full_comp_unit): Add skip_partial parameter.
10099 (process_imported_unit_die, dwarf2_read_addr_index)
10100 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10101 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10102 (read_signatured_type): Update.
10103
10104 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
10105
10106 * value.c (release_value): Remove unused variable.
10107 (record_latest_value): Likewise.
10108 (access_value_history): Likewise.
10109 (preserve_values): Likewise.
10110
10111 2018-05-17 Tom Tromey <tom@tromey.com>
10112
10113 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10114 Initialize.
10115
10116 2018-05-16 Maciej W. Rozycki <macro@mips.com>
10117
10118 PR gdb/22286
10119 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10120 Also handle registers whose width is not a multiple of
10121 PTRACE_TYPE_RET.
10122 (linux_nat_trad_target::store_register): Likewise.
10123
10124 2018-05-16 Tom Tromey <tom@tromey.com>
10125
10126 * gdbcore.h (core_bfd): Redefine.
10127 * corelow.c (core_target::close): Update.
10128 (core_target_open): Update.
10129 * progspace.h (struct program_space) <cbfd>: Now a
10130 gdb_bfd_ref_ptr.
10131
10132 2018-05-16 Tom Tromey <tom@tromey.com>
10133
10134 PR cli/19551:
10135 * symfile-add-flags.h (enum symfile_add_flags)
10136 <SYMFILE_NOT_FILENAME>: New constant.
10137 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
10138 objfile name from BFD.
10139 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10140 * minidebug.c (find_separate_debug_file_in_section): Put
10141 ".gnu_debugdata" into BFD's file name.
10142
10143 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
10144
10145 * regcache.c (regcache_read_ftype, regcache_write_ftype):
10146 Remove.
10147
10148 2018-05-15 Tamar Christina <tamar.christina@arm.com>
10149
10150 PR binutils/21446
10151 * aarch64-tdep.c (aarch64_analyze_prologue,
10152 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10153 Indicate not interested in errors.
10154
10155 2018-05-15 Maciej W. Rozycki <macro@mips.com>
10156
10157 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10158 Supply the MIPS_ZERO_REGNUM register.
10159
10160 2018-05-15 Maciej W. Rozycki <macro@mips.com>
10161
10162 * mips-tdep.c (mask_address_var): Make variable static.
10163
10164 2018-05-14 Tom Tromey <tom@tromey.com>
10165
10166 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10167
10168 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
10169
10170 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10171 FXSAVE_ADDR for the mxcsr register.
10172
10173 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
10174
10175 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10176
10177 2018-05-11 Pedro Alves <palves@redhat.com>
10178
10179 * corelow.c (core_target) <core_target>: No longer inline.
10180 Initialize m_core_gdbarch, m_core_vec and build the section table
10181 here.
10182 <~core_target>: New.
10183 <core_gdbarch, get_core_register_section>: New methods.
10184 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10185 factored out from ...
10186 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10187 (core_ops): Delete.
10188 (sniff_core_bfd): Add gdbarch parameter.
10189 (core_close): Delete, merged into ...
10190 (core_target::close): ... here. Delete self.
10191 (core_close_cleanup): Delete.
10192 (core_target_open): Allocate a core_target on the heap. Use a
10193 unique_ptr instead of a cleanup. Bits moved into the core_target
10194 ctor. Adjust to use core_target methods instead of globals.
10195 (get_core_register_section): Rename to ...
10196 (core_target::get_core_register_section): ... this and adjust.
10197 (struct get_core_registers_cb_data): New.
10198 (get_core_registers_cb): Use it. Use bool.
10199 (core_target::fetch_registers, core_target::files_info)
10200 (core_target::xfer_partial, core_target::read_description)
10201 (core_target::pid_to, core_target::thread_name): Adjust to
10202 reference class fields instead of globals.
10203 * target.h (struct target_ops_deleter, target_ops_up): New.
10204
10205 2018-05-11 Pedro Alves <palves@redhat.com>
10206
10207 * corefile.c (core_file_command): Move to corelow.c.
10208 * corelow.c (the_core_target): Delete.
10209 (core_file_command): Moved from corefile.c. Check exec_bfd
10210 instead of the_core_target. Use target_detach instead of calling
10211 into the_core_target directly.
10212 (maybe_say_no_core_file_now): New.
10213 (core_target::detach): Use it.
10214 (_initialize_corelow): Remove references to the_core_target.
10215 * gdbcore.h (the_core_target): Delete.
10216
10217 2018-05-11 Tom Tromey <tromey@redhat.com>
10218 Pedro Alves <palves@redhat.com>
10219
10220 * corefile.c (core_bfd): Remove.
10221 * gdbcore.h (core_bfd): Now a macro.
10222 * progspace.h (struct program_space) <cbfd>: New field.
10223
10224 2018-05-11 Tom Tromey <tom@tromey.com>
10225
10226 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10227 gdb::def_vector.
10228
10229 2018-05-10 Tom Tromey <tom@tromey.com>
10230
10231 * configure: Rebuild.
10232 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10233
10234 2018-05-10 Joel Brobecker <brobecker@adacore.com>
10235
10236 PR server/23158:
10237 * regformats/regdat.sh: Adjust script, following the addition
10238 of the new expedite_regs parameter to init_target_desc.
10239
10240 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
10241
10242 PR gdb/23127
10243 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10244 set_gdbarch_significant_addr_bit.
10245 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10246 set_gdbarch_significant_addr_bit.
10247 * utils.c (address_significant): Update to sign extend addr.
10248
10249 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
10250
10251 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10252 (xtensa_linux_init_abi): Limit tdep->num_regs by
10253 tdep->num_nopriv_regs.
10254 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10255 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10256 not initialized.
10257
10258 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
10259
10260 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10261
10262 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
10263
10264 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10265 (I387_MXCSR_INIT_VAL): New constant.
10266 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10267 buffer if it was supplied by the inferior.
10268 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10269 (i387_xsave_get_clear_bv): New function.
10270 (i387_supply_xsave): Only read x87 control registers from the
10271 xsave buffer if the feature is enabled, and the state will have
10272 been written, otherwise, provide a suitable default.
10273 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10274 including x87 control registers. Update control registers if they
10275 have changed from the default value, and mark features as enabled
10276 as required.
10277 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10278
10279 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10280
10281 * spu-tdep.c (info_spu_event_command): Fix output formatting.
10282
10283 2018-05-07 Tom Tromey <tom@tromey.com>
10284
10285 * configure: Rebuild.
10286 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10287
10288 2018-05-07 Tom Tromey <tom@tromey.com>
10289
10290 PR tdep/20362:
10291 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10292 bit. Use correct value for VDIV.
10293
10294 2018-05-04 Tom Tromey <tom@tromey.com>
10295
10296 * configure: Rebuild.
10297 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10298
10299 2018-05-04 Tom Tromey <tom@tromey.com>
10300
10301 * linux-record.c (record_linux_system_call) <case
10302 RECORD_SYS_RECVFROM>: Add "break".
10303
10304 2018-05-04 Tom Tromey <tom@tromey.com>
10305
10306 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10307 Add missing "break".
10308 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10309 Add missing "break".
10310
10311 2018-05-04 Tom Tromey <tom@tromey.com>
10312
10313 * rs6000-tdep.c (ppc_process_record_op4)
10314 (ppc_process_record_op63): Add fall-through comment.
10315
10316 2018-05-04 Tom Tromey <tom@tromey.com>
10317
10318 * i386-tdep.c (i386_process_record): Add fall-through comment.
10319
10320 2018-05-04 Tom Tromey <tom@tromey.com>
10321
10322 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10323 comment.
10324
10325 2018-05-04 Tom Tromey <tom@tromey.com>
10326
10327 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10328 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10329 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10330 comment.
10331 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10332 comment.
10333 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10334 comment.
10335
10336 2018-05-04 Tom Tromey <tom@tromey.com>
10337
10338 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10339
10340 2018-05-04 Tom Tromey <tom@tromey.com>
10341
10342 * s390-tdep.c (s390_process_record): Fix fall-through comments.
10343 * xcoffread.c (scan_xcoff_symtab): Move comment later.
10344 * symfile.c (section_is_mapped): Fix fall-through comment.
10345 * stabsread.c (define_symbol, read_member_functions): Fix
10346 fall-through comment.
10347 * s390-linux-tdep.c (s390_process_record): Fix fall-through
10348 comment.
10349 * remote.c (remote_wait_as): Fix fall-through comment.
10350 * p-exp.y (yylex): Fix fall-through comment.
10351 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10352 comment.
10353 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10354 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10355 * jv-exp.y (yylex): Fix fall-through comment.
10356 * go-exp.y (lex_one_token): Fix fall-through comment.
10357 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10358 fall-through comment.
10359 * f-exp.y (yylex): Fix fall-through comment.
10360 * dwarf2read.c (process_die): Fix fall-through comments.
10361 * dbxread.c (process_one_symbol): Fix fall-through comment.
10362 * d-exp.y (lex_one_token): Fix fall-through comment.
10363 * cp-name-parser.y (yylex): Fix fall-through comment.
10364 * coffread.c (coff_symtab_read): Fix fall-through comment.
10365 * c-exp.y (lex_one_token): Fix fall-through comment.
10366 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10367 comment.
10368 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10369 comment.
10370
10371 2018-05-04 Tom Tromey <tom@tromey.com>
10372
10373 PR python/22730:
10374 * NEWS: Mention gdb.execute change.
10375 * gdbcmd.h (execute_control_command): Don't declare.
10376 * python/python.c (execute_gdb_command): Use read_command_lines_1,
10377 execute_control_commands, execute_control_commands_to_string.
10378 * cli/cli-script.h (execute_control_commands)
10379 (execute_control_commands_to_string): Declare.
10380 (execute_control_command): Add from_tty parameter.
10381 * cli/cli-script.c (execute_control_commands)
10382 (execute_control_commands_to_string): New functions.
10383 (execute_user_command): Use execute_control_commands.
10384 (execute_control_command_1): Add "from_tty" parameter. Update.
10385 (execute_control_command): Likewise.
10386
10387 2018-05-04 Tom Tromey <tom@tromey.com>
10388
10389 PR python/22731:
10390 * NEWS: Mention that breakpoint commands are writable.
10391 * python/py-breakpoint.c (bppy_set_commands): New function.
10392 (breakpoint_object_getset) <"commands">: Use it.
10393
10394 2018-05-04 Tom Tromey <tom@tromey.com>
10395
10396 * tracepoint.c (actions_command): Update.
10397 * mi/mi-cmd-break.c (mi_command_line_array)
10398 (mi_command_line_array_cnt, mi_command_line_array_ptr)
10399 (mi_read_next_line): Remove.
10400 (mi_cmd_break_commands): Update.
10401 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10402 function_view.
10403 * cli/cli-script.c (get_command_line): Update.
10404 (process_next_line): Use function_view. Constify.
10405 (recurse_read_control_structure, read_command_lines)
10406 (read_command_lines_1): Change argument types to function_view.
10407 (do_define_command, document_command): Update.
10408 * breakpoint.h (check_tracepoint_command): Don't declare.
10409 * breakpoint.c (check_tracepoint_command): Remove.
10410 (commands_command_1, create_tracepoint_from_upload): Update.
10411
10412 2018-05-04 Tom Tromey <tom@tromey.com>
10413
10414 PR gdb/11750:
10415 * cli/cli-script.h (enum command_control_type) <define_control>:
10416 New constant.
10417 * cli/cli-script.c (multi_line_command_p): Handle define_control.
10418 (build_command_line, execute_control_command_1)
10419 (process_next_line): Likewise.
10420 (do_define_command): New function, extracted from define_command.
10421 (define_command): Use it.
10422
10423 2018-05-04 Tom Tromey <tom@tromey.com>
10424
10425 * tracepoint.c (actions_command): Update.
10426 * cli/cli-script.h (read_command_lines): Update.
10427 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10428 (MAX_TMPBUF): Remove define.
10429 (define_command): Use string_printf.
10430 (document_command): Likewise.
10431 * breakpoint.c (commands_command_1): Update.
10432
10433 2018-05-04 Tom Tromey <tom@tromey.com>
10434
10435 * top.c (execute_command): Update.
10436 * cli/cli-script.h (print_command_lines): Now varargs.
10437 * cli/cli-script.c (print_command_lines): Now varargs.
10438 (execute_control_command_1) <case while_control, case if_control>:
10439 Update.
10440
10441 2018-05-04 Tom Tromey <tom@tromey.com>
10442
10443 * tracepoint.c (all_tracepoint_actions): Rename from
10444 all_tracepoint_actions_and_cleanup. Change return type.
10445 (actions_command, encode_actions_1, encode_actions)
10446 (trace_dump_actions, tdump_command): Update.
10447 * remote.c (remote_download_command_source): Update.
10448 * python/python.c (gdbpy_eval_from_control_command)
10449 (python_command, python_interactive_command): Update.
10450 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10451 * guile/guile.c (guile_command)
10452 (gdbscm_eval_from_control_command, guile_command): Update.
10453 * compile/compile.c (compile_code_command)
10454 (compile_print_command, compile_to_object): Update.
10455 * cli/cli-script.h (struct command_lines_deleter): New.
10456 (counted_command_line): New typedef.
10457 (struct command_line): Add constructor, destructor.
10458 <body_list>: Remove.
10459 <body_list_0, body_list_1>: New members.
10460 (command_line_up): Remove typedef.
10461 (read_command_lines, read_command_lines_1, get_command_line):
10462 Update.
10463 (copy_command_lines): Don't declare.
10464 * cli/cli-script.c (build_command_line): Use "new".
10465 (get_command_line): Return counted_command_line.
10466 (print_command_lines, execute_user_command)
10467 (execute_control_command_1, while_command, if_command): Update.
10468 (realloc_body_list): Remove.
10469 (process_next_line, recurse_read_control_structure): Update.
10470 (read_command_lines, read_command_lines_1): Return counted_command_line.
10471 (free_command_lines): Use "delete".
10472 (copy_command_lines): Remove.
10473 (define_command, document_command, show_user_1): Update.
10474 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10475 a counted_command_line.
10476 * breakpoint.h (counted_command_line): Remove typedef.
10477 (breakpoint_set_commands): Update.
10478 * breakpoint.c (check_no_tracepoint_commands)
10479 (validate_commands_for_breakpoint): Update.
10480 (breakpoint_set_commands): Change commands to be a
10481 counted_command_line.
10482 (commands_command_1, update_dprintf_command_list)
10483 (create_tracepoint_from_upload): Update.
10484
10485 2018-05-04 Tom Tromey <tom@tromey.com>
10486
10487 * cli/cli-decode.h (cmd_list_element): New constructor.
10488 (~cmd_list_element): New destructor.
10489 (struct cmd_list_element): Add initializers.
10490 * cli/cli-decode.c (do_add_cmd): Use "new".
10491 (delete_cmd): Use "delete".
10492
10493 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
10494 Pedro Alves <palves@redhat.com>
10495
10496 PR breakpoints/19806 and support for PR external/20207.
10497 * NEWS: Mention Aarch64 watchpoint improvements.
10498 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10499 watchpoints and PR external/20207 watchpoints.
10500 * nat/aarch64-linux-hw-point.c
10501 (kernel_supports_any_contiguous_range): New.
10502 (aarch64_watchpoint_offset): New.
10503 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10504 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10505 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10506 (aarch64_align_watchpoint): New parameters aligned_offset_p and
10507 next_addr_orig_p. Support PR external/20207 watchpoints.
10508 (aarch64_downgrade_regs): New.
10509 (aarch64_dr_state_insert_one_point): New parameters offset and
10510 addr_orig.
10511 (aarch64_dr_state_remove_one_point): Likewise.
10512 (aarch64_handle_breakpoint): Update caller.
10513 (aarch64_handle_aligned_watchpoint): Likewise.
10514 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10515 aligned_offset.
10516 (aarch64_linux_set_debug_regs): Remove const from state. Call
10517 aarch64_downgrade_regs.
10518 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10519 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10520 (DR_CONTROL_MASK): ... this.
10521 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10522 (unsigned int aarch64_watchpoint_offset): New prototype.
10523 (aarch64_linux_set_debug_regs): Remove const from state.
10524 * utils.c (align_up, align_down): Move to ...
10525 * common/common-utils.c (align_up, align_down): ... here.
10526 * utils.h (align_up, align_down): Move to ...
10527 * common/common-utils.h (align_up, align_down): ... here.
10528
10529 2018-05-04 Joel Brobecker <brobecker@adacore.com>
10530
10531 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10532 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10533 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10534 Re-implement to match the ABI as summarized in GCC's
10535 gcc/config/sparc/sparc.c. All callers updated.
10536 (sparc32_store_arguments): Remove assertion.
10537
10538 2018-05-04 Tom Tromey <tom@tromey.com>
10539
10540 * printcmd.c: Don't include tui.h.
10541 (decode_format): Use skip_spaces.
10542
10543 2018-05-04 Tom Tromey <tom@tromey.com>
10544
10545 PR gdb/22619:
10546 * printcmd.c (last_count): New global.
10547 (x_command): Use saved count when repeating.
10548
10549 2018-05-04 Tom Tromey <tom@tromey.com>
10550
10551 * nto-procfs.c (do_closedir_cleanup): Remove.
10552 (procfs_pidlist): Use gdb_dir_up.
10553 * procfs.c (do_closedir_cleanup): Remove.
10554 (proc_update_threads): Use gdb_dir_up.
10555 * common/filestuff.h (struct gdb_dir_deleter): New.
10556 (gdb_dir_up): New typedef.
10557
10558 2018-05-04 Tom Tromey <tom@tromey.com>
10559
10560 * ada-lang.c (print_mention_exception): Use std::string.
10561
10562 2018-05-04 Tom Tromey <tom@tromey.com>
10563
10564 * ada-lang.c (create_excep_cond_exprs): Update.
10565 (ada_exception_catchpoint_cond_string): Use std::string.
10566
10567 2018-05-04 Tom Tromey <tom@tromey.com>
10568
10569 * ada-lang.c (xget_renaming_scope): Return std::string.
10570 (old_renaming_is_invisible): Update.
10571
10572 2018-05-04 Tom Tromey <tom@tromey.com>
10573
10574 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10575 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10576
10577 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
10578
10579 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10580
10581 2018-05-04 Tom Tromey <tom@tromey.com>
10582
10583 * remote.c (remote_query_supported_append): Change type.
10584 (remote_check_symbols): Update.
10585
10586 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
10587
10588 PR gdb/11420
10589 * configure.ac: Prepend libpython.
10590 * python/python-config.py: Likewise.
10591 * configure: Regenerate.
10592
10593 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
10594
10595 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10596
10597 2018-05-03 Pedro Alves <palves@redhat.com>
10598
10599 * s390-linux-nat.c
10600 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10601 override. Write 'true' instead of '1'.
10602 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10603 declaration.
10604
10605 2018-05-02 Pedro Alves <palves@redhat.com>
10606
10607 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10608 add_inf_child_target.
10609 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10610 add_inf_child_target.
10611 * aix-thread.c (aix_thread_target_info): New.
10612 (aix_thread_target) <shortname, longname, doc>: Delete.
10613 <info>: New.
10614 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10615 add_inf_child_target.
10616 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10617 add_inf_child_target.
10618 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10619 add_inf_child_target.
10620 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10621 add_inf_child_target.
10622 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10623 add_inf_child_target.
10624 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10625 add_inf_child_target.
10626 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10627 add_inf_child_target.
10628 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10629 add_inf_child_target.
10630 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10631 add_inf_child_target.
10632 * bfd-target.c (target_bfd_target_info): New.
10633 (target_bfd) <shortname, longname, doc>: Delete.
10634 <info>: New.
10635 * bsd-kvm.c (bsd_kvm_target_info): New.
10636 (bsd_kvm_target) <shortname, longname, doc>: Delete.
10637 <info>: New.
10638 (bsd_kvm_target::open): Rename to ...
10639 (bsd_kvm_target_open): ... this. Adjust.
10640 * bsd-uthread.c (bsd_uthread_target_info): New.
10641 (bsd_uthread_target) <shortname, longname, doc>: Delete.
10642 <info>: New.
10643 * corefile.c (core_file_command): Adjust.
10644 * corelow.c (core_target_info): New.
10645 (core_target) <shortname, longname, doc>: Delete.
10646 <info>: New.
10647 (core_target::open): Rename to ...
10648 (core_target_open): ... this. Adjust.
10649 * ctf.c (ctf_target_info): New.
10650 (ctf_target) <shortname, longname, doc>: Delete.
10651 <info>: New.
10652 (ctf_target::open): Rename to ...
10653 (ctf_target_open): ... this.
10654 (_initialize_ctf): Adjust.
10655 * exec.c (exec_target_info): New.
10656 (exec_target) <shortname, longname, doc>: Delete.
10657 <info>: New.
10658 (exec_target::open): Rename to ...
10659 (exec_target_open): ... this.
10660 * gdbcore.h (core_target_open): Declare.
10661 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10662 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10663 add_inf_child_target.
10664 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10665 add_inf_child_target.
10666 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10667 add_inf_child_target.
10668 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10669 add_inf_child_target.
10670 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10671 add_inf_child_target.
10672 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10673 add_inf_child_target.
10674 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10675 add_inf_child_target.
10676 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10677 add_inf_child_target.
10678 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10679 add_inf_child_target.
10680 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10681 add_inf_child_target.
10682 * inf-child.c (inf_child_target_info): New.
10683 (inf_child_target::info): New.
10684 (inf_child_open_target): Remove 'target' parameter. Use
10685 get_native_target instead.
10686 (inf_child_target::open): Delete.
10687 (add_inf_child_target): New.
10688 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10689 Delete.
10690 <info>: New.
10691 (add_inf_child_target): Declare.
10692 (inf_child_open_target): Declare.
10693 * linux-thread-db.c (thread_db_target_info): New.
10694 (thread_db_target) <shortname, longname, doc>: Delete.
10695 <info>: New.
10696 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10697 add_inf_child_target.
10698 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10699 add_inf_child_target.
10700 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10701 add_inf_child_target.
10702 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10703 add_inf_child_target.
10704 * make-target-delegates (print_class): Adjust.
10705 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10706 add_inf_child_target.
10707 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10708 add_inf_child_target.
10709 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10710 add_inf_child_target.
10711 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10712 add_inf_child_target.
10713 * nto-procfs.c (nto_native_target_info): New.
10714 (nto_procfs_target_native) <shortname, longname, doc>:
10715 Delete.
10716 <info>: New.
10717 (nto_procfs_target_info): New.
10718 (nto_procfs_target_procfs) <shortname, longname, doc>:
10719 Delete.
10720 <info>: New.
10721 (init_procfs_targets): Adjust.
10722 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10723 add_inf_child_target.
10724 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10725 add_inf_child_target.
10726 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10727 add_inf_child_target.
10728 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10729 add_inf_child_target.
10730 * ravenscar-thread.c (ravenscar_target_info): New.
10731 (ravenscar_thread_target) <shortname, longname, doc>:
10732 Delete.
10733 <info>: New.
10734 * record-btrace.c (record_btrace_target_info):
10735 (record_btrace_target) <shortname, longname, doc>: Delete.
10736 <info>: New.
10737 (record_btrace_target::open): Rename to ...
10738 (record_btrace_target_open): ... this. Adjust.
10739 * record-full.c (record_longname, record_doc): New.
10740 (record_full_base_target) <shortname, longname, doc>: Delete.
10741 <info>: New.
10742 (record_full_target_info): New.
10743 (record_full_target): <shortname>: Delete.
10744 <info>: New.
10745 (record_full_core_open_1, record_full_open_1): Update comments.
10746 (record_full_base_target::open): Rename to ...
10747 (record_full_open): ... this.
10748 (cmd_record_full_restore): Update.
10749 (_initialize_record_full): Update.
10750 * remote-sim.c (remote_sim_target_info): New.
10751 (gdbsim_target) <shortname, longname, doc>: Delete.
10752 <info>: New.
10753 (gdbsim_target::open): Rename to ...
10754 (gdbsim_target_open): ... this.
10755 (_initialize_remote_sim): Adjust.
10756 * remote.c (remote_doc): New.
10757 (remote_target_info): New.
10758 (remote_target) <shortname, longname, doc>: Delete.
10759 <info>: New.
10760 (extended_remote_target_info): New.
10761 (extended_remote_target) <shortname, longname, doc>: Delete.
10762 <info>: New.
10763 (remote_target::open_1): Make static. Adjust.
10764 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10765 * s390-linux-nat.c (_initialize_s390_nat): Use
10766 add_inf_child_target.
10767 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10768 add_inf_child_target.
10769 * sol-thread.c (thread_db_target_info): New.
10770 (sol_thread_target) <shortname, longname, doc>: Delete.
10771 <info>: New.
10772 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10773 add_inf_child_target.
10774 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10775 add_inf_child_target.
10776 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10777 add_inf_child_target.
10778 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10779 add_inf_child_target.
10780 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10781 add_inf_child_target.
10782 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10783 add_inf_child_target.
10784 * spu-linux-nat.c (_initialize_spu_nat): Use
10785 add_inf_child_target.
10786 * spu-multiarch.c (spu_multiarch_target_info): New.
10787 (spu_multiarch_target) <shortname, longname, doc>: Delete.
10788 <info>: New.
10789 * target-delegates.c: Regenerate.
10790 * target.c: Include <unordered_map>.
10791 (target_ops_p): Delete.
10792 (DEF_VEC_P(target_ops_p)): Delete.
10793 (target_factories): New.
10794 (test_target_info): New.
10795 (test_target_ops::info): New.
10796 (open_target): Adjust to use target_factories.
10797 (add_target_with_completer): Rename to ...
10798 (add_target): ... this. Change prototype. Register target_info
10799 and open callback in target_factories. Register target_info in
10800 command context instead of target_ops.
10801 (add_target): Delete old implementation.
10802 (add_deprecated_target_alias): Change prototype. Adjust.
10803 (the_native_target): New.
10804 (set_native_target, get_native_target): New.
10805 (find_default_run_target): Use the_native_target.
10806 (find_attach_target, find_run_target): Simplify.
10807 (target_ops::open): Delete.
10808 (dummy_target_info): New.
10809 (dummy_target::shortname, dummy_target::longname)
10810 (dummy_target::doc): Delete.
10811 (dummy_target::info): New.
10812 (debug_target::shortname, debug_target::longname)
10813 (debug_target::doc): Delete.
10814 (debug_target::info): New.
10815 * target.h (struct target_info): New.
10816 (target_ops::~target_ops): Add comment.
10817 (target_ops::info): New.
10818 (target_ops::shortname, target_ops::longname, target_ops::doc): No
10819 longer virtual. Implement in terms of target_info.
10820 (set_native_target, get_native_target): Declare.
10821 (target_open_ftype): New.
10822 (add_target, add_target_with_completer)
10823 (add_deprecated_target_alias): Change prototype.
10824 (test_target) <shortname, longname, doc>: Delete.
10825 <info>: New.
10826 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10827 add_inf_child_target.
10828 * tracefile-tfile.c (tfile_target_info): New.
10829 (tfile_target) <shortname, longname, doc>: Delete.
10830 <info>: New.
10831 (tfile_target::open): Rename to ...
10832 (tfile_target_open): ... this.
10833 (_initialize_tracefile_tfile): Adjust.
10834 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10835 add_inf_child_target.
10836 * windows-nat.c (_initialize_windows_nat): Use
10837 add_inf_child_target.
10838 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10839 add_inf_child_target.
10840
10841 2018-05-02 Pedro Alves <palves@redhat.com>
10842
10843 * linux-nat.h (linux_nat_target) <low_new_thread,
10844 low_delete_thread, low_new_fork, low_forget_process,
10845 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10846 New virtual methods.
10847 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10848 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10849 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10850 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10851 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10852 Delete.
10853 * linux-fork.c (delete_fork): Adjust to call low method.
10854 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10855 (linux_nat_new_fork, linux_nat_forget_process_hook)
10856 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10857 (linux_nat_status_is_event):
10858 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10859 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10860 to call low method.
10861 (sigtrap_is_event): Rename to ...
10862 (linux_nat_target::low_status_is_event): ... this.
10863 (linux_nat_set_status_is_event): Delete.
10864 (save_stop_reason, linux_nat_wait_1)
10865 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10866 low methods.
10867 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10868 (linux_nat_set_new_fork, linux_nat_set_forget_process)
10869 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10870 (linux_nat_set_prepare_to_resume): Delete.
10871 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10872 low virtual methods.
10873 * amd64-linux-nat.c: Likewise.
10874 * arm-linux-nat.c: Likewise.
10875 * i386-linux-nat.c: Likewise.
10876 * ia64-linux-nat.c: Likewise.
10877 * mips-linux-nat.c: Likewise.
10878 * ppc-linux-nat.c: Likewise.
10879 * s390-linux-nat.c: Likewise.
10880 * sparc64-linux-nat.c: Likewise.
10881 * x86-linux-nat.c: Likewise.
10882 * x86-linux-nat.h: Include "nat/x86-linux.h".
10883 (x86_linux_nat_target) <low_new_fork, low_forget_process,
10884 low_prepare_to_resume, low_new_thread, low_delete_thread>:
10885 Override methods.
10886
10887 2018-05-02 Pedro Alves <palves@redhat.com>
10888
10889 * target.h (target_ops)
10890 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10891 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10892 stopped_by_watchpoint, have_continuable_watchpoint,
10893 stopped_data_address, watchpoint_addr_within_range,
10894 can_accel_watchpoint_condition, can_run, thread_alive,
10895 has_all_memory, has_memory, has_stack, has_registers,
10896 has_execution, can_async_p, is_async_p, supports_non_stop,
10897 always_non_stop_p, can_execute_reverse, supports_multi_process,
10898 supports_enable_disable_tracepoint,
10899 supports_disable_randomization, supports_string_tracing,
10900 supports_evaluation_of_breakpoint_conditions,
10901 can_run_breakpoint_commands, filesystem_is_local,
10902 can_download_tracepoint, get_trace_state_variable_value,
10903 set_trace_notes, get_tib_address, use_agent, can_use_agent,
10904 record_is_replaying, record_will_replay,
10905 augmented_libraries_svr4_read>: Adjust to return bool.
10906 * aarch64-linux-nat.c: All implementations adjusted.
10907 * aix-thread.c: All implementations adjusted.
10908 * arm-linux-nat.c: All implementations adjusted.
10909 * breakpoint.c: All implementations adjusted.
10910 * bsd-kvm.c: All implementations adjusted.
10911 * bsd-uthread.c: All implementations adjusted.
10912 * corelow.c: All implementations adjusted.
10913 * ctf.c: All implementations adjusted.
10914 * darwin-nat.c: All implementations adjusted.
10915 * darwin-nat.h: All implementations adjusted.
10916 * exec.c: All implementations adjusted.
10917 * fbsd-nat.c: All implementations adjusted.
10918 * fbsd-nat.h: All implementations adjusted.
10919 * gnu-nat.c: All implementations adjusted.
10920 * gnu-nat.h: All implementations adjusted.
10921 * go32-nat.c: All implementations adjusted.
10922 * ia64-linux-nat.c: All implementations adjusted.
10923 * inf-child.c: All implementations adjusted.
10924 * inf-child.h: All implementations adjusted.
10925 * inf-ptrace.c: All implementations adjusted.
10926 * inf-ptrace.h: All implementations adjusted.
10927 * linux-nat.c: All implementations adjusted.
10928 * linux-nat.h: All implementations adjusted.
10929 * mips-linux-nat.c: All implementations adjusted.
10930 * nto-procfs.c: All implementations adjusted.
10931 * ppc-linux-nat.c: All implementations adjusted.
10932 * procfs.c: All implementations adjusted.
10933 * ravenscar-thread.c: All implementations adjusted.
10934 * record-btrace.c: All implementations adjusted.
10935 * record-full.c: All implementations adjusted.
10936 * remote-sim.c: All implementations adjusted.
10937 * remote.c: All implementations adjusted.
10938 * s390-linux-nat.c: All implementations adjusted.
10939 * sol-thread.c: All implementations adjusted.
10940 * spu-multiarch.c: All implementations adjusted.
10941 * target-delegates.c: All implementations adjusted.
10942 * target.c: All implementations adjusted.
10943 * target.h: All implementations adjusted.
10944 * tracefile-tfile.c: All implementations adjusted.
10945 * tracefile.c: All implementations adjusted.
10946 * tracefile.h: All implementations adjusted.
10947 * windows-nat.c: All implementations adjusted.
10948 * x86-linux-nat.h: All implementations adjusted.
10949 * x86-nat.h: All implementations adjusted.
10950
10951 2018-05-02 Pedro Alves <palves@redhat.com>
10952
10953 * make-target-delegates (scan_target_h): Don't trim lines here.
10954 Replace sequences of tabs and/or whitespace with a single
10955 whitespace.
10956 (top level, parsing methods): Trim each line before processing it
10957 here.
10958
10959 2018-05-02 Pedro Alves <palves@redhat.com>
10960 John Baldwin <jhb@freebsd.org>
10961
10962 * target.h (enum strata) <debug_stratum>: New.
10963 (struct target_ops) <all delegation methods>: Replace by C++
10964 virtual methods, and drop "to_" prefix. All references updated
10965 throughout.
10966 <to_shortname, to_longname, to_doc, to_data,
10967 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10968 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10969 virtual methods. All references updated throughout.
10970 <can_attach, supports_terminal_ours, can_create_inferior,
10971 get_thread_control_capabilities, attach_no_wait>: New
10972 virtual methods.
10973 <insert_breakpoint, remove_breakpoint>: Now
10974 TARGET_DEFAULT_NORETURN methods.
10975 <info_proc>: Now returns bool.
10976 <to_magic>: Delete.
10977 (OPS_MAGIC): Delete.
10978 (current_target): Delete. All references replaced by references
10979 to ...
10980 (target_stack): ... this. New.
10981 (target_shortname, target_longname): Adjust.
10982 (target_can_run): Now a function declaration.
10983 (default_child_has_all_memory, default_child_has_memory)
10984 (default_child_has_stack, default_child_has_registers)
10985 (default_child_has_execution): Remove target_ops parameter.
10986 (complete_target_initialization): Delete.
10987 (memory_breakpoint_target): New template class.
10988 (test_target_ops): Refactor as a C++ class with virtual methods.
10989 * make-target-delegates (NAME_PART): Tighten.
10990 (POINTER_PART, CP_SYMBOL): New.
10991 (SIMPLE_RETURN_PART): Reimplement.
10992 (VEC_RETURN_PART): Expect less.
10993 (RETURN_PART, VIRTUAL_PART): New.
10994 (METHOD): Adjust to C++ virtual methods.
10995 (scan_target_h): Remove reference to C99.
10996 (dname): Output "target_ops::" prefix.
10997 (write_function_header): Adjust to output a C++ class method.
10998 (write_declaration): New.
10999 (write_delegator): Adjust to output a C++ class method.
11000 (tdname): Output "dummy_target::" prefix.
11001 (write_tdefault, write_debugmethod): Adjust to output a C++ class
11002 method.
11003 (tdefault_names, debug_names): Delete.
11004 (return_types, tdefaults, styles, argtypes_array): New.
11005 (top level): All methods are delegators.
11006 (print_class): New.
11007 (top level): Print dummy_target and debug_target classes.
11008 * target-delegates.c: Regenerate.
11009 * target-debug.h (target_debug_print_enum_info_proc_what)
11010 (target_debug_print_thread_control_capabilities)
11011 (target_debug_print_thread_info_p): New.
11012 * target.c (dummy_target): Delete.
11013 (the_dummy_target, the_debug_target): New.
11014 (target_stack): Now extern.
11015 (set_targetdebug): Push/unpush debug target.
11016 (default_child_has_all_memory, default_child_has_memory)
11017 (default_child_has_stack, default_child_has_registers)
11018 (default_child_has_execution): Remove target_ops parameter.
11019 (complete_target_initialization): Delete.
11020 (add_target_with_completer): No longer call
11021 complete_target_initialization.
11022 (target_supports_terminal_ours): Use regular delegation.
11023 (update_current_target): Delete.
11024 (push_target): No longer check magic number. Don't call
11025 update_current_target.
11026 (unpush_target): Don't call update_current_target.
11027 (target_is_pushed): No longer check magic number.
11028 (target_require_runnable): Skip for all stratums over
11029 process_stratum.
11030 (target_ops::info_proc): New.
11031 (target_info_proc): Use find_target_at and
11032 find_default_run_target.
11033 (target_supports_disable_randomization): Use regular delegation.
11034 (target_get_osdata): Use find_target_at.
11035 (target_ops::open, target_ops::close, target_ops::can_attach)
11036 (target_ops::attach, target_ops::can_create_inferior)
11037 (target_ops::create_inferior, target_ops::can_run)
11038 (target_can_run): New.
11039 (default_fileio_target): Use regular delegation.
11040 (target_ops::fileio_open, target_ops::fileio_pwrite)
11041 (target_ops::fileio_pread, target_ops::fileio_fstat)
11042 (target_ops::fileio_close, target_ops::fileio_unlink)
11043 (target_ops::fileio_readlink): New.
11044 (target_fileio_open_1, target_fileio_unlink)
11045 (target_fileio_readlink): Always call the target method. Handle
11046 FILEIO_ENOSYS.
11047 (return_zero, return_zero_has_execution): Delete.
11048 (init_dummy_target): Delete.
11049 (dummy_target::dummy_target, dummy_target::shortname)
11050 (dummy_target::longname, dummy_target::doc)
11051 (debug_target::debug_target, debug_target::shortname)
11052 (debug_target::longname, debug_target::doc): New.
11053 (target_supports_delete_record): Use regular delegation.
11054 (setup_target_debug): Delete.
11055 (maintenance_print_target_stack): Skip debug_stratum.
11056 (initialize_targets): Instantiate the_dummy_target and
11057 the_debug_target.
11058 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
11059 use target_stack.
11060 (target_auxv_search, fprint_target_auxv): Adjust.
11061 (info_auxv_command): Adjust to use target_stack.
11062 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11063 * exceptions.c (print_flush): Handle a NULL target_stack.
11064 * regcache.c (target_ops_no_register): Refactor as class with
11065 virtual methods.
11066
11067 * exec.c (exec_target): New class.
11068 (exec_ops): Now an exec_target.
11069 (exec_open, exec_close_1, exec_get_section_table)
11070 (exec_xfer_partial, exec_files_info, exec_has_memory)
11071 (exec_make_note_section): Refactor as exec_target methods.
11072 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11073 Delete.
11074 (exec_target::find_memory_regions): New.
11075 (_initialize_exec): Don't call init_exec_ops.
11076 * gdbcore.h (exec_file_clear): Delete.
11077
11078 * corefile.c (core_target): Delete.
11079 (core_file_command): Adjust.
11080 * corelow.c (core_target): New class.
11081 (the_core_target): New.
11082 (core_close): Remove target_ops parameter.
11083 (core_close_cleanup): Adjust.
11084 (core_target::close): New.
11085 (core_open, core_detach, get_core_registers, core_files_info)
11086 (core_xfer_partial, core_thread_alive, core_read_description)
11087 (core_pid_to_str, core_thread_name, core_has_memory)
11088 (core_has_stack, core_has_registers, core_info_proc): Rework as
11089 core_target methods.
11090 (ignore, core_remove_breakpoint, init_core_ops): Delete.
11091 (_initialize_corelow): Initialize the_core_target.
11092 * gdbcore.h (core_target): Delete.
11093 (the_core_target): New.
11094
11095 * ctf.c: (ctf_target): New class.
11096 (ctf_ops): Now a ctf_target.
11097 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11098 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11099 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11100 methods.
11101 (init_ctf_ops): Delete.
11102 (_initialize_ctf): Don't call it.
11103 * tracefile-tfile.c (tfile_target): New class.
11104 (tfile_ops): Now a tfile_target.
11105 (tfile_open, tfile_close, tfile_files_info)
11106 (tfile_get_tracepoint_status, tfile_trace_find)
11107 (tfile_fetch_registers, tfile_xfer_partial)
11108 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11109 Refactor as tfile_target methods.
11110 (tfile_xfer_partial_features): Remove target_ops parameter.
11111 (init_tfile_ops): Delete.
11112 (_initialize_tracefile_tfile): Don't call it.
11113 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11114 (tracefile_has_stack, tracefile_has_registers)
11115 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11116 tracefile_target methods.
11117 (init_tracefile_ops): Delete.
11118 (tracefile_target::tracefile_target): New.
11119 * tracefile.h: Include "target.h".
11120 (tracefile_target): New class.
11121 (init_tracefile_ops): Delete.
11122
11123 * spu-multiarch.c (spu_multiarch_target): New class.
11124 (spu_ops): Now a spu_multiarch_target.
11125 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11126 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11127 (spu_search_memory, spu_mourn_inferior): Refactor as
11128 spu_multiarch_target methods.
11129 (init_spu_ops): Delete.
11130 (_initialize_spu_multiarch): Remove references to init_spu_ops,
11131 complete_target_initialization.
11132
11133 * ravenscar-thread.c (ravenscar_thread_target): New class.
11134 (ravenscar_ops): Now a ravenscar_thread_target.
11135 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11136 (ravenscar_thread_alive, ravenscar_pid_to_str)
11137 (ravenscar_fetch_registers, ravenscar_store_registers)
11138 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11139 (ravenscar_stopped_by_hw_breakpoint)
11140 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11141 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11142 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11143 methods.
11144 (init_ravenscar_thread_ops): Delete.
11145 (_initialize_ravenscar): Remove references to
11146 init_ravenscar_thread_ops and complete_target_initialization.
11147
11148 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11149 (bsd_uthread_target): New class.
11150 (bsd_uthread_ops): Now a bsd_uthread_target.
11151 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11152 (bsd_uthread_close, bsd_uthread_mourn_inferior)
11153 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11154 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11155 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11156 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11157 (bsd_uthread_target): Delete function.
11158 (_initialize_bsd_uthread): Remove reference to
11159 complete_target_initialization.
11160
11161 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
11162 (target_bfd): ... this new class.
11163 (target_bfd_xfer_partial, target_bfd_get_section_table)
11164 (target_bfd_close): Refactor as target_bfd methods.
11165 (target_bfd::~target_bfd): New.
11166 (target_bfd_reopen): Adjust.
11167 (target_bfd::close): New.
11168
11169 * record-btrace.c (record_btrace_target): New class.
11170 (record_btrace_ops): Now a record_btrace_target.
11171 (record_btrace_open, record_btrace_stop_recording)
11172 (record_btrace_disconnect, record_btrace_close)
11173 (record_btrace_async, record_btrace_info)
11174 (record_btrace_insn_history, record_btrace_insn_history_range)
11175 (record_btrace_insn_history_from, record_btrace_call_history)
11176 (record_btrace_call_history_range)
11177 (record_btrace_call_history_from, record_btrace_record_method)
11178 (record_btrace_is_replaying, record_btrace_will_replay)
11179 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11180 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11181 (record_btrace_store_registers, record_btrace_prepare_to_store)
11182 (record_btrace_to_get_unwinder)
11183 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11184 (record_btrace_commit_resume, record_btrace_wait)
11185 (record_btrace_stop, record_btrace_can_execute_reverse)
11186 (record_btrace_stopped_by_sw_breakpoint)
11187 (record_btrace_supports_stopped_by_sw_breakpoint)
11188 (record_btrace_stopped_by_hw_breakpoint)
11189 (record_btrace_supports_stopped_by_hw_breakpoint)
11190 (record_btrace_update_thread_list, record_btrace_thread_alive)
11191 (record_btrace_goto_begin, record_btrace_goto_end)
11192 (record_btrace_goto, record_btrace_stop_replaying_all)
11193 (record_btrace_execution_direction)
11194 (record_btrace_prepare_to_generate_core)
11195 (record_btrace_done_generating_core): Refactor as
11196 record_btrace_target methods.
11197 (init_record_btrace_ops): Delete.
11198 (_initialize_record_btrace): Remove reference to
11199 init_record_btrace_ops.
11200 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11201 the execution_direction global.
11202 (record_full_base_target, record_full_target)
11203 (record_full_core_target): New classes.
11204 (record_full_ops): Now a record_full_target.
11205 (record_full_core_ops): Now a record_full_core_target.
11206 (record_full_target::detach, record_full_target::disconnect)
11207 (record_full_core_target::disconnect)
11208 (record_full_target::mourn_inferior, record_full_target::kill):
11209 New.
11210 (record_full_open, record_full_close, record_full_async): Refactor
11211 as methods of the record_full_base_target class.
11212 (record_full_resume, record_full_commit_resume): Refactor
11213 as methods of the record_full_target class.
11214 (record_full_wait, record_full_stopped_by_watchpoint)
11215 (record_full_stopped_data_address)
11216 (record_full_stopped_by_sw_breakpoint)
11217 (record_full_supports_stopped_by_sw_breakpoint)
11218 (record_full_stopped_by_hw_breakpoint)
11219 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11220 methods of the record_full_base_target class.
11221 (record_full_store_registers, record_full_xfer_partial)
11222 (record_full_insert_breakpoint, record_full_remove_breakpoint):
11223 Refactor as methods of the record_full_target class.
11224 (record_full_can_execute_reverse, record_full_get_bookmark)
11225 (record_full_goto_bookmark, record_full_execution_direction)
11226 (record_full_record_method, record_full_info, record_full_delete)
11227 (record_full_is_replaying, record_full_will_replay)
11228 (record_full_goto_begin, record_full_goto_end, record_full_goto)
11229 (record_full_stop_replaying): Refactor as methods of the
11230 record_full_base_target class.
11231 (record_full_core_resume, record_full_core_kill)
11232 (record_full_core_fetch_registers)
11233 (record_full_core_prepare_to_store)
11234 (record_full_core_store_registers, record_full_core_xfer_partial)
11235 (record_full_core_insert_breakpoint)
11236 (record_full_core_remove_breakpoint)
11237 (record_full_core_has_execution): Refactor
11238 as methods of the record_full_core_target class.
11239 (record_full_base_target::supports_delete_record): New.
11240 (init_record_full_ops): Delete.
11241 (init_record_full_core_ops): Delete.
11242 (record_full_save): Refactor as method of the
11243 record_full_base_target class.
11244 (_initialize_record_full): Remove references to
11245 init_record_full_ops and init_record_full_core_ops.
11246
11247 * remote.c (remote_target, extended_remote_target): New classes.
11248 (remote_ops): Now a remote_target.
11249 (extended_remote_ops): Now an extended_remote_target.
11250 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11251 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11252 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11253 (remote_pass_signals, remote_set_syscall_catchpoint)
11254 (remote_program_signals, )
11255 (remote_thread_always_alive): Remove target_ops parameter.
11256 (remote_thread_alive, remote_thread_name)
11257 (remote_update_thread_list, remote_threads_extra_info)
11258 (remote_static_tracepoint_marker_at)
11259 (remote_static_tracepoint_markers_by_strid)
11260 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11261 (remote_open): Refactor as methods of remote_target.
11262 (extended_remote_open, extended_remote_detach)
11263 (extended_remote_attach, extended_remote_post_attach):
11264 (extended_remote_supports_disable_randomization)
11265 (extended_remote_create_inferior): : Refactor as method of
11266 extended_remote_target.
11267 (remote_set_permissions, remote_open_1, remote_detach)
11268 (remote_follow_fork, remote_follow_exec, remote_disconnect)
11269 (remote_resume, remote_commit_resume, remote_stop)
11270 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11271 (remote_terminal_ours, remote_wait, remote_fetch_registers)
11272 (remote_prepare_to_store, remote_store_registers)
11273 (remote_flash_erase, remote_flash_done, remote_files_info)
11274 (remote_kill, remote_mourn, remote_insert_breakpoint)
11275 (remote_remove_breakpoint, remote_insert_watchpoint)
11276 (remote_watchpoint_addr_within_range)
11277 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11278 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11279 (remote_supports_stopped_by_sw_breakpoint)
11280 (remote_stopped_by_hw_breakpoint)
11281 (remote_supports_stopped_by_hw_breakpoint)
11282 (remote_stopped_by_watchpoint, remote_stopped_data_address)
11283 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11284 (remote_verify_memory): Refactor as methods of remote_target.
11285 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11286 parameter.
11287 (remote_xfer_partial, remote_get_memory_xfer_limit)
11288 (remote_search_memory, remote_rcmd, remote_memory_map)
11289 (remote_pid_to_str, remote_get_thread_local_address)
11290 (remote_get_tib_address, remote_read_description): Refactor as
11291 methods of remote_target.
11292 (remote_target::fileio_open, remote_target::fileio_pwrite)
11293 (remote_target::fileio_pread, remote_target::fileio_close): New.
11294 (remote_hostio_readlink, remote_hostio_fstat)
11295 (remote_filesystem_is_local, remote_can_execute_reverse)
11296 (remote_supports_non_stop, remote_supports_disable_randomization)
11297 (remote_supports_multi_process, remote_supports_cond_breakpoints)
11298 (remote_supports_enable_disable_tracepoint)
11299 (remote_supports_string_tracing)
11300 (remote_can_run_breakpoint_commands, remote_trace_init)
11301 (remote_download_tracepoint, remote_can_download_tracepoint)
11302 (remote_download_trace_state_variable, remote_enable_tracepoint)
11303 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11304 (remote_trace_start, remote_get_trace_status)
11305 (remote_get_tracepoint_status, remote_trace_stop)
11306 (remote_trace_find, remote_get_trace_state_variable_value)
11307 (remote_save_trace_data, remote_get_raw_trace_data)
11308 (remote_set_disconnected_tracing, remote_core_of_thread)
11309 (remote_set_circular_trace_buffer, remote_traceframe_info)
11310 (remote_get_min_fast_tracepoint_insn_len)
11311 (remote_set_trace_buffer_size, remote_set_trace_notes)
11312 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11313 (remote_disable_btrace, remote_teardown_btrace)
11314 (remote_read_btrace, remote_btrace_conf)
11315 (remote_augmented_libraries_svr4_read, remote_load)
11316 (remote_pid_to_exec_file, remote_can_do_single_step)
11317 (remote_execution_direction, remote_thread_handle_to_thread_info):
11318 Refactor as methods of remote_target.
11319 (init_remote_ops, init_extended_remote_ops): Delete.
11320 (remote_can_async_p, remote_is_async_p, remote_async)
11321 (remote_thread_events, remote_upload_tracepoints)
11322 (remote_upload_trace_state_variables): Refactor as methods of
11323 remote_target.
11324 (_initialize_remote): Remove references to init_remote_ops and
11325 init_extended_remote_ops.
11326
11327 * remote-sim.c (gdbsim_target): New class.
11328 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11329 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11330 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11331 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11332 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11333 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11334 Refactor as methods of gdbsim_target.
11335 (gdbsim_ops): Now a gdbsim_target.
11336 (init_gdbsim_ops): Delete.
11337 (gdbsim_cntrl_c): Adjust.
11338 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11339
11340 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11341 (the_amd64_linux_nat_target): New.
11342 (amd64_linux_fetch_inferior_registers)
11343 (amd64_linux_store_inferior_registers): Refactor as methods of
11344 amd64_linux_nat_target.
11345 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
11346 * i386-linux-nat.c: Don't include "linux-nat.h".
11347 (i386_linux_nat_target): New class.
11348 (the_i386_linux_nat_target): New.
11349 (i386_linux_fetch_inferior_registers)
11350 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11351 as methods of i386_linux_nat_target.
11352 (_initialize_i386_linux_nat): Adjust. Set linux_target.
11353 * inf-child.c (inf_child_ops): Delete.
11354 (inf_child_fetch_inferior_registers)
11355 (inf_child_store_inferior_registers): Delete.
11356 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11357 methods of inf_child_target.
11358 (inf_child_target::supports_terminal_ours)
11359 (inf_child_target::terminal_init)
11360 (inf_child_target::terminal_inferior)
11361 (inf_child_target::terminal_ours_for_output)
11362 (inf_child_target::terminal_ours, inf_child_target::interrupt)
11363 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11364 New.
11365 (inf_child_open, inf_child_disconnect, inf_child_close)
11366 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11367 (inf_child_post_startup_inferior, inf_child_can_run)
11368 (inf_child_pid_to_exec_file): Refactor as methods of
11369 inf_child_target.
11370 (inf_child_follow_fork): Delete.
11371 (inf_child_target::can_create_inferior)
11372 (inf_child_target::can_attach): New.
11373 (inf_child_target::has_all_memory, inf_child_target::has_memory)
11374 (inf_child_target::has_stack, inf_child_target::has_registers)
11375 (inf_child_target::has_execution): New.
11376 (inf_child_fileio_open, inf_child_fileio_pwrite)
11377 (inf_child_fileio_pread, inf_child_fileio_fstat)
11378 (inf_child_fileio_close, inf_child_fileio_unlink)
11379 (inf_child_fileio_readlink, inf_child_use_agent)
11380 (inf_child_can_use_agent): Refactor as methods of
11381 inf_child_target.
11382 (return_zero, inf_child_target): Delete.
11383 (inf_child_target::inf_child_target): New.
11384 * inf-child.h: Include "target.h".
11385 (inf_child_target): Delete function prototype.
11386 (inf_child_target): New class.
11387 (inf_child_open_target, inf_child_mourn_inferior)
11388 (inf_child_maybe_unpush_target): Delete.
11389 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11390 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11391 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11392 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11393 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11394 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11395 (inf_ptrace_wait, inf_ptrace_xfer_partial)
11396 (inf_ptrace_thread_alive, inf_ptrace_files_info)
11397 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11398 methods of inf_ptrace_target.
11399 (inf_ptrace_target): Delete function.
11400 * inf-ptrace.h: Include "inf-child.h".
11401 (inf_ptrace_target): Delete function declaration.
11402 (inf_ptrace_target): New class.
11403 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11404 * linux-nat.c (linux_target): New.
11405 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11406 (linux_nat_target::~linux_nat_target): New.
11407 (linux_child_post_attach, linux_child_post_startup_inferior)
11408 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11409 (linux_child_remove_fork_catchpoint)
11410 (linux_child_insert_vfork_catchpoint)
11411 (linux_child_remove_vfork_catchpoint)
11412 (linux_child_insert_exec_catchpoint)
11413 (linux_child_remove_exec_catchpoint)
11414 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11415 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11416 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11417 (linux_nat_stopped_data_address)
11418 (linux_nat_stopped_by_sw_breakpoint)
11419 (linux_nat_supports_stopped_by_sw_breakpoint)
11420 (linux_nat_stopped_by_hw_breakpoint)
11421 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11422 (linux_nat_kill, linux_nat_mourn_inferior)
11423 (linux_nat_xfer_partial, linux_nat_thread_alive)
11424 (linux_nat_update_thread_list, linux_nat_pid_to_str)
11425 (linux_nat_thread_name, linux_child_pid_to_exec_file)
11426 (linux_child_static_tracepoint_markers_by_strid)
11427 (linux_nat_is_async_p, linux_nat_can_async_p)
11428 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11429 (linux_nat_supports_multi_process)
11430 (linux_nat_supports_disable_randomization, linux_nat_async)
11431 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11432 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11433 (linux_nat_fileio_open, linux_nat_fileio_readlink)
11434 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11435 methods of linux_nat_target.
11436 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11437 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11438 parameter.
11439 (check_stopped_by_watchpoint): Adjust.
11440 (linux_xfer_partial): Delete.
11441 (linux_target_install_ops, linux_target, linux_nat_add_target):
11442 Delete.
11443 (linux_nat_target::linux_nat_target): New.
11444 * linux-nat.h: Include "inf-ptrace.h".
11445 (linux_nat_target): New.
11446 (linux_target, linux_target_install_ops, linux_nat_add_target):
11447 Delete function declarations.
11448 (linux_target): Declare global.
11449 * linux-thread-db.c (thread_db_target): New.
11450 (thread_db_target::thread_db_target): New.
11451 (thread_db_ops): Delete.
11452 (the_thread_db_target): New.
11453 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11454 (thread_db_update_thread_list, thread_db_pid_to_str)
11455 (thread_db_extra_thread_info)
11456 (thread_db_thread_handle_to_thread_info)
11457 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11458 (thread_db_resume): Refactor as methods of thread_db_target.
11459 (init_thread_db_ops): Delete.
11460 (_initialize_thread_db): Remove reference to init_thread_db_ops.
11461 * x86-linux-nat.c: Don't include "linux-nat.h".
11462 (super_post_startup_inferior): Delete.
11463 (x86_linux_nat_target::~x86_linux_nat_target): New.
11464 (x86_linux_child_post_startup_inferior)
11465 (x86_linux_read_description, x86_linux_enable_btrace)
11466 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11467 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11468 methods of x86_linux_nat_target.
11469 (x86_linux_create_target): Delete. Bits folded ...
11470 (x86_linux_add_target): ... here. Now takes a linux_nat_target
11471 pointer.
11472 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11473 (x86_linux_nat_target): New class.
11474 (x86_linux_create_target): Delete.
11475 (x86_linux_add_target): Now takes a linux_nat_target pointer.
11476 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11477 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11478 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11479 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11480 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11481 make extern.
11482 (x86_use_watchpoints): Delete.
11483 * x86-nat.h: Include "breakpoint.h" and "target.h".
11484 (x86_use_watchpoints): Delete.
11485 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11486 (x86_stopped_by_watchpoint, x86_stopped_data_address)
11487 (x86_insert_watchpoint, x86_remove_watchpoint)
11488 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11489 (x86_stopped_by_hw_breakpoint): New declarations.
11490 (x86_nat_target): New template class.
11491
11492 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11493 (the_ppc_linux_nat_target): New.
11494 (ppc_linux_fetch_inferior_registers)
11495 (ppc_linux_can_use_hw_breakpoint)
11496 (ppc_linux_region_ok_for_hw_watchpoint)
11497 (ppc_linux_ranged_break_num_registers)
11498 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11499 (ppc_linux_insert_mask_watchpoint)
11500 (ppc_linux_remove_mask_watchpoint)
11501 (ppc_linux_can_accel_watchpoint_condition)
11502 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11503 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11504 (ppc_linux_watchpoint_addr_within_range)
11505 (ppc_linux_masked_watch_num_registers)
11506 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11507 (ppc_linux_read_description): Refactor as methods of
11508 ppc_linux_nat_target.
11509 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
11510
11511 * procfs.c (procfs_xfer_partial): Delete forward declaration.
11512 (procfs_target): New class.
11513 (the_procfs_target): New.
11514 (procfs_target): Delete function.
11515 (procfs_auxv_parse, procfs_attach, procfs_detach)
11516 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11517 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11518 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11519 (procfs_create_inferior, procfs_update_thread_list)
11520 (procfs_thread_alive, procfs_pid_to_str)
11521 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11522 (procfs_stopped_data_address, procfs_insert_watchpoint)
11523 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11524 (proc_find_memory_regions, procfs_info_proc)
11525 (procfs_make_note_section): Refactor as methods of procfs_target.
11526 (_initialize_procfs): Adjust.
11527 * sol-thread.c (sol_thread_target): New class.
11528 (sol_thread_ops): Now a sol_thread_target.
11529 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11530 (sol_thread_fetch_registers, sol_thread_store_registers)
11531 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11532 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11533 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11534 (init_sol_thread_ops): Delete.
11535 (_initialize_sol_thread): Adjust. Remove references to
11536 init_sol_thread_ops and complete_target_initialization.
11537
11538 * windows-nat.c (windows_nat_target): New class.
11539 (windows_fetch_inferior_registers)
11540 (windows_store_inferior_registers, windows_resume, windows_wait)
11541 (windows_attach, windows_detach, windows_pid_to_exec_file)
11542 (windows_files_info, windows_create_inferior)
11543 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11544 (windows_close, windows_pid_to_str, windows_xfer_partial)
11545 (windows_get_tib_address, windows_get_ada_task_ptid)
11546 (windows_thread_name, windows_thread_alive): Refactor as
11547 windows_nat_target methods.
11548 (do_initial_windows_stuff): Adjust.
11549 (windows_target): Delete function.
11550 (_initialize_windows_nat): Adjust.
11551
11552 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11553 (darwin_mourn_inferior, darwin_kill_inferior)
11554 (darwin_create_inferior, darwin_attach, darwin_detach)
11555 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11556 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11557 (darwin_supports_multi_process): Refactor as darwin_nat_target
11558 methods.
11559 (darwin_resume_to, darwin_files_info): Delete.
11560 (_initialize_darwin_inferior): Rename to ...
11561 (_initialize_darwin_nat): ... this. Adjust to C++ification.
11562 * darwin-nat.h: Include "inf-child.h".
11563 (darwin_nat_target): New class.
11564 (darwin_complete_target): Delete.
11565 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11566 (darwin_target): New.
11567 (i386_darwin_fetch_inferior_registers)
11568 (i386_darwin_store_inferior_registers): Refactor as methods of
11569 darwin_nat_target.
11570 (darwin_complete_target): Delete, with ...
11571 (_initialize_i386_darwin_nat): ... bits factored out here.
11572
11573 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11574 (the_alpha_linux_nat_target): New.
11575 (alpha_linux_register_u_offset): Refactor as
11576 alpha_linux_nat_target method.
11577 (_initialize_alpha_linux_nat): Adjust.
11578 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11579 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11580 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11581 methods of linux_nat_trad_target.
11582 (linux_trad_target): Delete.
11583 * linux-nat-trad.h (linux_trad_target): Delete function.
11584 (linux_nat_trad_target): New class.
11585 * mips-linux-nat.c (mips_linux_nat_target): New class.
11586 (super_fetch_registers, super_store_registers, super_close):
11587 Delete.
11588 (the_mips_linux_nat_target): New.
11589 (mips64_linux_regsets_fetch_registers)
11590 (mips64_linux_regsets_store_registers)
11591 (mips64_linux_fetch_registers, mips64_linux_store_registers)
11592 (mips_linux_register_u_offset, mips_linux_read_description)
11593 (mips_linux_can_use_hw_breakpoint)
11594 (mips_linux_stopped_by_watchpoint)
11595 (mips_linux_stopped_data_address)
11596 (mips_linux_region_ok_for_hw_watchpoint)
11597 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11598 (mips_linux_close): Refactor as methods of mips_linux_nat.
11599 (_initialize_mips_linux_nat): Adjust to C++ification.
11600
11601 * aix-thread.c (aix_thread_target): New class.
11602 (aix_thread_ops): Now an aix_thread_target.
11603 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11604 (aix_thread_fetch_registers, aix_thread_store_registers)
11605 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11606 (aix_thread_thread_alive, aix_thread_pid_to_str)
11607 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11608 Refactor as methods of aix_thread_target.
11609 (init_aix_thread_ops): Delete.
11610 (_initialize_aix_thread): Remove references to init_aix_thread_ops
11611 and complete_target_initialization.
11612 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11613 (rs6000_nat_target): New class.
11614 (the_rs6000_nat_target): New.
11615 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11616 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11617 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11618 (super_create_inferior): Delete.
11619 (_initialize_rs6000_nat): Adjust to C++ification.
11620
11621 * arm-linux-nat.c (arm_linux_nat_target): New class.
11622 (the_arm_linux_nat_target): New.
11623 (arm_linux_fetch_inferior_registers)
11624 (arm_linux_store_inferior_registers, arm_linux_read_description)
11625 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11626 (arm_linux_remove_hw_breakpoint)
11627 (arm_linux_region_ok_for_hw_watchpoint)
11628 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11629 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11630 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11631 arm_linux_nat_target.
11632 (_initialize_arm_linux_nat): Adjust to C++ification.
11633
11634 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11635 (the_aarch64_linux_nat_target): New.
11636 (aarch64_linux_fetch_inferior_registers)
11637 (aarch64_linux_store_inferior_registers)
11638 (aarch64_linux_child_post_startup_inferior)
11639 (aarch64_linux_read_description)
11640 (aarch64_linux_can_use_hw_breakpoint)
11641 (aarch64_linux_insert_hw_breakpoint)
11642 (aarch64_linux_remove_hw_breakpoint)
11643 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11644 (aarch64_linux_region_ok_for_hw_watchpoint)
11645 (aarch64_linux_stopped_data_address)
11646 (aarch64_linux_stopped_by_watchpoint)
11647 (aarch64_linux_watchpoint_addr_within_range)
11648 (aarch64_linux_can_do_single_step): Refactor as methods of
11649 aarch64_linux_nat_target.
11650 (super_post_startup_inferior): Delete.
11651 (_initialize_aarch64_linux_nat): Adjust to C++ification.
11652
11653 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11654 (the_hppa_linux_nat_target): New.
11655 (hppa_linux_fetch_inferior_registers)
11656 (hppa_linux_store_inferior_registers): Refactor as methods of
11657 hppa_linux_nat_target.
11658 (_initialize_hppa_linux_nat): Adjust to C++ification.
11659
11660 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11661 (the_ia64_linux_nat_target): New.
11662 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11663 (ia64_linux_stopped_data_address)
11664 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11665 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11666 ia64_linux_nat_target methods.
11667 (super_xfer_partial): Delete.
11668 (_initialize_ia64_linux_nat): Adjust to C++ification.
11669
11670 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11671 (the_m32r_linux_nat_target): New.
11672 (m32r_linux_fetch_inferior_registers)
11673 (m32r_linux_store_inferior_registers): Refactor as
11674 m32r_linux_nat_target methods.
11675 (_initialize_m32r_linux_nat): Adjust to C++ification.
11676
11677 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11678 (the_m68k_linux_nat_target): New.
11679 (m68k_linux_fetch_inferior_registers)
11680 (m68k_linux_store_inferior_registers): Refactor as
11681 m68k_linux_nat_target methods.
11682 (_initialize_m68k_linux_nat): Adjust to C++ification.
11683
11684 * s390-linux-nat.c (s390_linux_nat_target): New class.
11685 (the_s390_linux_nat_target): New.
11686 (s390_linux_fetch_inferior_registers)
11687 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11688 (s390_insert_watchpoint, s390_remove_watchpoint)
11689 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11690 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11691 (s390_auxv_parse, s390_read_description): Refactor as methods of
11692 s390_linux_nat_target.
11693 (_initialize_s390_nat): Adjust to C++ification.
11694
11695 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11696 (the_sparc_linux_nat_target): New.
11697 (_initialize_sparc_linux_nat): Adjust to C++ification.
11698 * sparc-nat.c (sparc_fetch_inferior_registers)
11699 (sparc_store_inferior_registers): Remove target_ops parameter.
11700 * sparc-nat.h (sparc_fetch_inferior_registers)
11701 (sparc_store_inferior_registers): Remove target_ops parameter.
11702 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11703 (the_sparc64_linux_nat_target): New.
11704 (_initialize_sparc64_linux_nat): Adjust to C++ification.
11705
11706 * spu-linux-nat.c (spu_linux_nat_target): New class.
11707 (the_spu_linux_nat_target): New.
11708 (spu_child_post_startup_inferior, spu_child_post_attach)
11709 (spu_child_wait, spu_fetch_inferior_registers)
11710 (spu_store_inferior_registers, spu_xfer_partial)
11711 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11712 methods.
11713 (_initialize_spu_nat): Adjust to C++ification.
11714
11715 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11716 (the_tilegx_linux_nat_target): New.
11717 (fetch_inferior_registers, store_inferior_registers):
11718 Refactor as methods.
11719 (_initialize_tile_linux_nat): Adjust to C++ification.
11720
11721 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11722 (the_xtensa_linux_nat_target): New.
11723 (xtensa_linux_fetch_inferior_registers)
11724 (xtensa_linux_store_inferior_registers): Refactor as
11725 xtensa_linux_nat_target methods.
11726 (_initialize_xtensa_linux_nat): Adjust to C++ification.
11727
11728 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11729 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11730 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11731 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11732 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11733 (fbsd_stopped_by_sw_breakpoint)
11734 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11735 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11736 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11737 (fbsd_post_startup_inferior, fbsd_post_attach)
11738 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11739 (fbsd_set_syscall_catchpoint)
11740 (super_xfer_partial, super_resume, super_wait)
11741 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11742 (fbsd_handle_debug_trap): Remove target_ops parameter.
11743 (fbsd_nat_add_target): Delete.
11744 * fbsd-nat.h: Include "inf-ptrace.h".
11745 (fbsd_nat_add_target): Delete.
11746 (USE_SIGTRAP_SIGINFO): Define.
11747 (fbsd_nat_target): New class.
11748
11749 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11750 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11751 (amd64bsd_target): Delete.
11752 * amd64-bsd-nat.h: New file.
11753 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11754 "x86-bsd-nat.h".
11755 (amd64_fbsd_nat_target): New class.
11756 (the_amd64_fbsd_nat_target): New.
11757 (amd64fbsd_read_description): Refactor as method of
11758 amd64_fbsd_nat_target.
11759 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11760 (_initialize_amd64fbsd_nat): Adjust to C++ification.
11761 * amd64-nat.h (amd64bsd_target): Delete function declaration.
11762 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11763 (i386bsd_store_inferior_registers): Remove target_ops parameter.
11764 (i386bsd_target): Delete.
11765 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11766 (i386bsd_fetch_inferior_registers)
11767 (i386bsd_store_inferior_registers): Declare.
11768 (i386_bsd_nat_target): New class.
11769 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11770 (the_i386_fbsd_nat_target): New.
11771 (i386fbsd_resume, i386fbsd_read_description): Refactor as
11772 i386_fbsd_nat_target methods.
11773 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11774 (_initialize_i386fbsd_nat): Adjust to C++ification.
11775 * x86-bsd-nat.c (super_mourn_inferior): Delete.
11776 (x86bsd_mourn_inferior, x86bsd_target): Delete.
11777 (_initialize_x86_bsd_nat): Adjust to C++ification.
11778 * x86-bsd-nat.h: Include "x86-nat.h".
11779 (x86bsd_target): Delete declaration.
11780 (x86bsd_nat_target): New class.
11781
11782 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11783 (the_aarch64_fbsd_nat_target): New.
11784 (aarch64_fbsd_fetch_inferior_registers)
11785 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11786 aarch64_fbsd_nat_target.
11787 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11788 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11789 (the_alpha_bsd_nat_target): New.
11790 (alphabsd_fetch_inferior_registers)
11791 (alphabsd_store_inferior_registers): Refactor as
11792 alpha_bsd_nat_target methods.
11793 (_initialize_alphabsd_nat): Refactor as methods of
11794 alpha_bsd_nat_target.
11795 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11796 (the_amd64_nbsd_nat_target): New.
11797 (_initialize_amd64nbsd_nat): Adjust to C++ification.
11798 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11799 (the_amd64_obsd_nat_target): New.
11800 (_initialize_amd64obsd_nat): Adjust to C++ification.
11801 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11802 (the_arm_fbsd_nat_target): New.
11803 (arm_fbsd_fetch_inferior_registers)
11804 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11805 (_initialize_arm_fbsd_nat): Refactor as methods of
11806 arm_fbsd_nat_target.
11807 (_initialize_arm_fbsd_nat): Adjust to C++ification.
11808 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11809 (the_arm_netbsd_nat_target): New.
11810 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11811 arm_netbsd_nat_target.
11812 (_initialize_arm_netbsd_nat): Adjust to C++ification.
11813 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11814 (the_hppa_nbsd_nat_target): New.
11815 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11816 hppa_nbsd_nat_target methods.
11817 (_initialize_hppanbsd_nat): Adjust to C++ification.
11818 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11819 (the_hppa_obsd_nat_target): New.
11820 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11821 methods of hppa_obsd_nat_target.
11822 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
11823 add_target.
11824 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11825 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
11826 add_target.
11827 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11828 (_initialize_i386obsd_nat): Use add_target.
11829 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11830 (the_m68k_bsd_nat_target): New.
11831 (m68kbsd_fetch_inferior_registers)
11832 (m68kbsd_store_inferior_registers): Refactor as methods of
11833 m68k_bsd_nat_target.
11834 (_initialize_m68kbsd_nat): Adjust to C++ification.
11835 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11836 (the_mips_fbsd_nat_target): New.
11837 (mips_fbsd_fetch_inferior_registers)
11838 (mips_fbsd_store_inferior_registers): Refactor as methods of
11839 mips_fbsd_nat_target.
11840 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
11841 add_target.
11842 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11843 (the_mips_nbsd_nat_target): New.
11844 (mipsnbsd_fetch_inferior_registers)
11845 (mipsnbsd_store_inferior_registers): Refactor as methods of
11846 mips_nbsd_nat_target.
11847 (_initialize_mipsnbsd_nat): Adjust to C++ification.
11848 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11849 (the_mips64_obsd_nat_target): New.
11850 (mips64obsd_fetch_inferior_registers)
11851 (mips64obsd_store_inferior_registers): Refactor as methods of
11852 mips64_obsd_nat_target.
11853 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
11854 add_target.
11855 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11856 nbsd_nat_target.
11857 * nbsd-nat.h: Include "inf-ptrace.h".
11858 (nbsd_nat_target): New class.
11859 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11860 (obsd_wait): Refactor as methods of obsd_nat_target.
11861 (obsd_add_target): Delete.
11862 * obsd-nat.h: Include "inf-ptrace.h".
11863 (obsd_nat_target): New class.
11864 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11865 (the_ppc_fbsd_nat_target): New.
11866 (ppcfbsd_fetch_inferior_registers)
11867 (ppcfbsd_store_inferior_registers): Refactor as methods of
11868 ppc_fbsd_nat_target.
11869 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
11870 add_target.
11871 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11872 (the_ppc_nbsd_nat_target): New.
11873 (ppcnbsd_fetch_inferior_registers)
11874 (ppcnbsd_store_inferior_registers): Refactor as methods of
11875 ppc_nbsd_nat_target.
11876 (_initialize_ppcnbsd_nat): Adjust to C++ification.
11877 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11878 (the_ppc_obsd_nat_target): New.
11879 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11880 methods of ppc_obsd_nat_target.
11881 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
11882 add_target.
11883 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11884 (the_sh_nbsd_nat_target): New.
11885 (shnbsd_fetch_inferior_registers)
11886 (shnbsd_store_inferior_registers): Refactor as methods of
11887 sh_nbsd_nat_target.
11888 (_initialize_shnbsd_nat): Adjust to C++ification.
11889 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11890 (inf_ptrace_xfer_partial): Delete.
11891 (sparc_xfer_partial, sparc_target): Delete.
11892 * sparc-nat.h (sparc_fetch_inferior_registers)
11893 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11894 (sparc_target): Delete function declaration.
11895 (sparc_target): New template class.
11896 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11897 (_initialize_sparcnbsd_nat): Adjust to C++ification.
11898 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11899 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
11900 add_target.
11901 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11902 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11903 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11904 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
11905 add_target.
11906 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11907 (the_vax_bsd_nat_target): New.
11908 (vaxbsd_fetch_inferior_registers)
11909 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11910 methods.
11911 (_initialize_vaxbsd_nat): Adjust to C++ification.
11912
11913 * bsd-kvm.c (bsd_kvm_target): New class.
11914 (bsd_kvm_ops): Now a bsd_kvm_target.
11915 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11916 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11917 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11918 bsd_kvm_target.
11919 (bsd_kvm_return_one): Delete.
11920 (bsd_kvm_add_target): Adjust to C++ification.
11921
11922 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11923 (nto_procfs_target_procfs): New classes.
11924 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11925 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11926 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11927 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11928 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11929 (procfs_remove_hw_breakpoint, procfs_resume)
11930 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11931 (procfs_kill_inferior, procfs_store_registers)
11932 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11933 as methods of nto_procfs_target.
11934 (nto_procfs_ops): Now an nto_procfs_target_procfs.
11935 (nto_native_ops): Delete.
11936 (procfs_open, procfs_native_open): Delete.
11937 (nto_native_ops): Now an nto_procfs_target_native.
11938 (init_procfs_targets): Adjust to C++ification.
11939 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11940 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11941 Refactor as methods of nto_procfs_target.
11942
11943 * go32-nat.c (go32_nat_target): New class.
11944 (the_go32_nat_target): New.
11945 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11946 (go32_store_registers, go32_xfer_partial, go32_files_info)
11947 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11948 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11949 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11950 (go32_pid_to_str): Refactor as methods of go32_nat_target.
11951 (go32_target): Delete.
11952 (_initialize_go32_nat): Adjust to C++ification.
11953
11954 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11955 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11956 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11957 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11958 gnu_nat_target.
11959 (gnu_target): Delete.
11960 * gnu-nat.h (gnu_target): Delete.
11961 (gnu_nat_target): New class.
11962 * i386-gnu-nat.c (gnu_base_target): New.
11963 (i386_gnu_nat_target): New class.
11964 (the_i386_gnu_nat_target): New.
11965 (_initialize_i386gnu_nat): Adjust to C++ification.
11966
11967 2018-05-02 Pedro Alves <palves@redhat.com>
11968
11969 * bfd-target.c (target_bfd_xclose): Rename to ...
11970 (target_bfd_close): ... this.
11971 (target_bfd_reopen): Adjust.
11972 * target.c (target_close): Remove references to to_xclose.
11973 * target.h (target_ops::to_xclose): Delete.
11974 (target_ops::to_close): Update comments.
11975
11976 2018-05-02 Pedro Alves <palves@redhat.com>
11977
11978 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11979 "linux-nat.h".
11980 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11981 * inf-ptrace.c (inf_ptrace_register_u_offset)
11982 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11983 (inf_ptrace_store_register, inf_ptrace_store_registers)
11984 (inf_ptrace_trad_target): Move to ...
11985 * linux-nat-trad.c: ... this new file.
11986 * linux-nat-trad.h: New file.
11987 * linux-nat.c (linux_target_install_ops): Make extern.
11988 (linux_trad_target): Delete.
11989 * linux-nat.h (linux_trad_target): Delete declaration.
11990 (linux_target_install_ops): Declare.
11991 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11992 "linux-nat.h".
11993
11994 2018-05-02 Pedro Alves <palves@redhat.com>
11995
11996 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11997 procfs_target/add_target here.
11998 * procfs.c (procfs_target): Make static.
11999 (_initialize_procfs): Call add_target here.
12000 * procfs.h (struct target_ops): Remove forward declaration.
12001 (procfs_target): Remove declaration.
12002 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
12003
12004 2018-05-02 Pedro Alves <palves@redhat.com>
12005
12006 * procfs.c (procfs_stopped_by_watchpoint)
12007 (procfs_insert_watchpoint, procfs_remove_watchpoint)
12008 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
12009 Forward declare.
12010 (procfs_use_watchpoints): Delete, move contents...
12011 (procfs_target): ... here.
12012 * procfs.h (procfs_use_watchpoints): Delete declaration.
12013 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12014 procfs_use_watchpoints.
12015 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
12016 procfs_use_watchpoints.
12017
12018 2018-05-02 Tom Tromey <tom@tromey.com>
12019
12020 PR python/20084:
12021 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
12022 and var_zuinteger_unlimited.
12023 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
12024 and PARAM_ZUINTEGER_UNLIMITED.
12025 (set_parameter_value): Handle var_zuinteger and
12026 var_zuinteger_unlimited.
12027 (add_setshow_generic): Likewise.
12028 (parmpy_init): Likewise.
12029
12030 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
12031
12032 PR rust/23124
12033 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
12034 pointer is not null before dereferencing it.
12035
12036 2018-04-30 Tom Tromey <tom@tromey.com>
12037
12038 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
12039 is_mi_like_p.
12040
12041 2018-04-30 Tom Tromey <tom@tromey.com>
12042
12043 * breakpoint.c (mention): Remove use of is_mi_like_p.
12044 (print_mention_ranged_breakpoint): Likewise.
12045 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12046 of is_mi_like_p.
12047
12048 2018-04-30 Tom Tromey <tom@tromey.com>
12049
12050 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12051
12052 2018-04-30 Tom Tromey <tom@tromey.com>
12053
12054 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12055 (info_spu_event_command): Remove some uses of is_mi_like_p.
12056
12057 2018-04-30 Tom Tromey <tom@tromey.com>
12058
12059 * python/py-framefilter.c (py_print_single_arg)
12060 (enumerate_locals, py_print_args, py_print_frame): Remove some
12061 uses of is_mi_like_p.
12062
12063 2018-04-30 Tom Tromey <tom@tromey.com>
12064
12065 * ui-out.c: Update.
12066 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12067 * ui-out.h (ui_out::is_mi_like_p): Now const.
12068 (ui_out::do_is_mi_like_p): Now const.
12069 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12070
12071 2018-04-30 Tom Tromey <tom@tromey.com>
12072
12073 * varobj.c (varobj_set_visualizer): Use new_reference.
12074 * python/python.c (gdbpy_decode_line): Use new_reference.
12075 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12076 new_reference.
12077
12078 2018-04-30 Tom Tromey <tom@tromey.com>
12079
12080 * varobj.c (install_new_value): Use new_reference.
12081 * value.h (value_incref): Return void. Swap intro comment with
12082 value_decref.
12083 * value.c (set_value_parent): Use new_reference.
12084 (value_incref): Return void. Update intro comment.
12085 (release_value): Use new_reference.
12086 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12087
12088 2018-04-30 Tom Tromey <tom@tromey.com>
12089
12090 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12091 * gdb_bfd.h (new_bfd_ref): Remove.
12092 (gdb_bfd_open): Update comment.
12093 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12094 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12095 (gdb_bfd_fdopenr): Use new_reference.
12096 * exec.c (exec_file_attach): Use new_reference.
12097
12098 2018-04-30 Tom Tromey <tom@tromey.com>
12099
12100 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12101 method.
12102
12103 2018-04-30 Tom Tromey <tom@tromey.com>
12104
12105 * jit.c (jit_read_code_entry): Use type_align.
12106 * i386-tdep.c (i386_gdbarch_init): Don't call
12107 set_gdbarch_long_long_align_bit.
12108 * gdbarch.sh: Remove long_long_align_bit.
12109 * gdbarch.c, gdbarch.h: Rebuild.
12110 * arc-tdep.c (arc_type_align): New function.
12111 (arc_gdbarch_init): Use arc_type_align. Don't call
12112 set_gdbarch_long_long_align_bit.
12113
12114 2018-04-30 Tom Tromey <tom@tromey.com>
12115
12116 * rust-lang.c (rust_type_alignment): Remove.
12117 (rust_composite_type): Use type_align.
12118
12119 2018-04-30 Tom Tromey <tom@tromey.com>
12120
12121 * NEWS: Mention Type.align.
12122 * python/py-type.c (typy_get_alignof): New function.
12123 (type_object_getset): Add "alignof".
12124
12125 2018-04-30 Tom Tromey <tom@tromey.com>
12126
12127 PR exp/17095:
12128 * NEWS: Update.
12129 * std-operator.def (UNOP_ALIGNOF): New operator.
12130 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12131 New.
12132 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12133 * c-lang.c (c_op_print_tab): Add alignof.
12134 * c-exp.y (ALIGNOF): New token.
12135 (exp): Add "ALIGNOF" production.
12136 (ident_tokens): Add _Alignof and alignof.
12137
12138 2018-04-30 Tom Tromey <tom@tromey.com>
12139
12140 * i386-tdep.c (i386_type_align): New function.
12141 (i386_gdbarch_init): Update.
12142 * gdbarch.sh (type_align): New method.
12143 * gdbarch.c, gdbarch.h: Rebuild.
12144 * arch-utils.h (default_type_align): Declare.
12145 * arch-utils.c (default_type_align): New function.
12146 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12147 (struct type) <align_log2>: New field.
12148 <instance_flags>: Now a bitfield.
12149 (TYPE_RAW_ALIGN): New macro.
12150 (type_align, type_raw_align, set_type_align): Declare.
12151 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12152 functions.
12153 * dwarf2read.c (quirk_rust_enum): Set type alignment.
12154 (get_alignment, maybe_set_alignment): New functions.
12155 (read_structure_type, read_enumeration_type, read_array_type)
12156 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12157 (read_subrange_type, read_base_type): Set type alignment.
12158
12159 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
12160
12161 * dwarf2read.c (read_index_from_section): Use bool.
12162
12163 2018-04-29 Fabian Groffen <grobian@gentoo.org>
12164
12165 PR gdb/22950
12166 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12167 with #ifdef.
12168
12169 2018-04-29 John Reiser <jreiser@BitWagon.com>
12170
12171 PR build/22873
12172 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12173 last step, and do it atomically.
12174
12175 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
12176
12177 * compile/compile-c-types.c (convert_int, convert_float):
12178 Update for C FE v1.
12179
12180 2018-04-27 Tom Tromey <tom@tromey.com>
12181
12182 PR rust/22545:
12183 * rust-lang.c (rust_inclusive_range_type_p): New function.
12184 (rust_range): Handle inclusive ranges.
12185 (rust_compute_range): Likewise.
12186 * rust-exp.y (struct rust_op) <inclusive>: New field.
12187 (DOTDOTEQ): New constant.
12188 (range_expr): Add "..=" productions.
12189 (operator_tokens): Add "..=" token.
12190 (ast_range): Add "inclusive" parameter.
12191 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12192 ranges.
12193 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12194 bounds values.
12195 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12196 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12197 Update comments.
12198 * expprint.c (print_subexp_standard): Handle new bounds values.
12199 (dump_subexp_body_standard): Likewise.
12200
12201 2018-04-27 Tom Tromey <tom@tromey.com>
12202
12203 * configure: Rebuild.
12204 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12205 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12206 "OVERRIDE".
12207 (class symbol_needs_eval_context): Likewise.
12208 * dwarf2read.c (mock_mapped_index::symbol_name_count)
12209 (mock_mapped_index::symbol_name_at): Use "override". Remove
12210 "virtual".
12211 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12212 "override".
12213 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12214 * aarch64-tdep.c (instruction_reader::read): Use "override".
12215 (instruction_reader_test::read): Likewise.
12216 * arm-tdep.c (instruction_reader::read): Use "override".
12217 (instruction_reader_thumb::read): Likewise.
12218
12219 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
12220
12221 PR remote/9665
12222 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12223 instead of remote_send.
12224 (remote_send): Remove.
12225
12226 2018-04-26 Pedro Alves <palves@redhat.com>
12227
12228 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12229 find_function_start_sal instead of find_pc_line.
12230
12231 2018-04-26 Pedro Alves <palves@redhat.com>
12232
12233 * breakpoint.c (set_breakpoint_location_function): Handle
12234 mst_data_gnu_ifunc.
12235 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12236 * elfread.c (elf_symtab_read): Give data symbols with
12237 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12238 (elf_rel_plt_read): Update comment.
12239 * linespec.c (convert_linespec_to_sals): Handle
12240 mst_data_gnu_ifunc.
12241 (minsym_found): Handle mst_data_gnu_ifunc.
12242 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12243 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12244 * parse.c (find_minsym_type_and_address): Handle
12245 mst_data_gnu_ifunc.
12246 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12247 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12248 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12249 comment.
12250 <mst_data_gnu_ifunc>: New enumerator.
12251
12252 2018-04-26 Pedro Alves <palves@redhat.com>
12253
12254 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12255 (lookup_minimal_symbol_by_pc_section): ... this. Replace
12256 'want_trampoline' parameter by a lookup_msym_prefer parameter.
12257 Handle it.
12258 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12259 (lookup_minimal_symbol_by_pc): Adjust.
12260 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12261 (lookup_solib_trampoline_symbol_by_pc): Adjust.
12262 * minsyms.h (lookup_msym_prefer): New enum.
12263 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12264 parameter by a lookup_msym_prefer parameter.
12265
12266 2018-04-26 Pedro Alves <palves@redhat.com>
12267
12268 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12269 ends in "@plt" instead of looking at the symbol's section.
12270
12271 2018-04-26 Pedro Alves <palves@redhat.com>
12272
12273 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
12274 all references.
12275 (find_pc_partial_function_gnu_ifunc): Rename to ...
12276 (find_pc_partial_function): ... this, and remove references to
12277 'is_gnu_ifunc_p'.
12278 (find_pc_partial_function): Delete old implementation.
12279 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12280
12281 2018-04-26 Pedro Alves <palves@redhat.com>
12282
12283 * linespec.c (struct bound_minimal_symbol_search_key): New.
12284 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
12285 skip first line if we found a GNU ifunc minimal symbol by name.
12286 (compare_msymbols): Change parameters to work with a destructured
12287 lhs minsym.
12288 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12289 functions.
12290
12291 2018-04-26 Pedro Alves <palves@redhat.com>
12292
12293 * breakpoint.c (set_breakpoint_location_function): Don't resolve
12294 ifunc targets here. Instead, if we have an ifunc minsym, use its
12295 address/name.
12296 (add_location_to_breakpoint): Store the minsym and the objfile in
12297 the breakpoint location.
12298 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12299 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12300 Record the minsym in the sal.
12301 * symtab.h (symtab_and_line) <msymbol>: New field.
12302
12303 2018-04-26 Pedro Alves <palves@redhat.com>
12304
12305 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12306 unless we actually resolved the ifunc.
12307
12308 2018-04-26 Pedro Alves <palves@redhat.com>
12309
12310 * c-exp.y (variable production): Prefer ifunc minsyms over
12311 regular function symbols.
12312 * symtab.c (find_gnu_ifunc): New function.
12313 * minsyms.h (lookup_msym_prefer): New enum.
12314 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12315 parameter by a lookup_msym_prefer parameter.
12316 * symtab.h (find_gnu_ifunc): New declaration.
12317
12318 2018-04-26 Pedro Alves <palves@redhat.com>
12319
12320 * blockframe.c (find_gnu_ifunc_target_type): New function.
12321 (find_function_type): New.
12322 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12323 return a value with a memory address.
12324 (eval_call): For calls to GNU ifunc functions, try to find the
12325 type of the target function from the type that the resolver
12326 returns.
12327 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12328 symbols.
12329 * infcall.c (find_function_return_type): Delete.
12330 (find_function_addr): Add 'function_type' parameter. For calls to
12331 GNU ifunc functions, try to find the type of the target function
12332 from the type that the resolver returns, and return it via
12333 FUNCTION_TYPE.
12334 (call_function_by_hand_dummy): Adjust to use the function type
12335 returned by find_function_addr.
12336 (find_function_addr): Add 'function_type' parameter and move
12337 description here.
12338 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12339 declarations.
12340
12341 2018-04-26 Pedro Alves <palves@redhat.com>
12342
12343 * c-exp.y (variable production): Skip finding an alias for ifunc
12344 symbols.
12345
12346 2018-04-26 Pedro Alves <palves@redhat.com>
12347
12348 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12349
12350 2018-04-25 Pedro Alves <palves@redhat.com>
12351
12352 * infcmd.c (kill_command): Print the pid as string, not the whole
12353 thread's ptid. Add comment. s/has been killed/killed/ in output
12354 message.
12355 * remote.c (remote_detach_1): Print the pid as string, not the
12356 whole thread's ptid.
12357
12358 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12359 Sergio Durigan Junior <sergiodj@redhat.com>
12360 Pedro Alves <palves@redhat.com>
12361
12362 * infcmd.c (kill_command): Print message when inferior has
12363 been killed.
12364 * inferior.c (print_inferior_events): Remove 'static'. Set as
12365 '1'.
12366 (add_inferior): Improve message printed when
12367 'print_inferior_events' is on.
12368 (exit_inferior): Remove message printed when
12369 'print_inferior_events' is on.
12370 (detach_inferior): Improve message printed when
12371 'print_inferior_events' is on.
12372 (initialize_inferiors): Use 'add_inferior_silent' to set
12373 'current_inferior_'.
12374 * inferior.h (print_inferior_events): Declare here as
12375 'extern'.
12376 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12377 '[Detaching...]' messages when 'print_inferior_events' is on.
12378 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
12379 as prefix/suffix for messages. Remove periods. Fix erroneous
12380 'Detaching after fork from child...', replace it by '... from
12381 parent...'.
12382 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12383 prefix/suffix when printing 'Detaching...' messages. Print
12384 them when 'print_inferior_events' is on.
12385 * remote.c (remote_detach_1): Print message when detaching
12386 from inferior and '!is_fork_parent'.
12387
12388 2018-04-24 Tom Tromey <tom@tromey.com>
12389
12390 * cli-out.h: Reindent.
12391
12392 2018-04-24 Tom Tromey <tom@tromey.com>
12393
12394 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12395 (cli_ui_out::do_field_string): Use fputs_filtered.
12396 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12397
12398 2018-04-23 Tom Tromey <tom@tromey.com>
12399
12400 * guile/scm-frame.c (gdbscm_frame_read_var): Use
12401 gdb::unique_xmalloc_ptr.
12402
12403 2018-04-23 Tom Tromey <tom@tromey.com>
12404
12405 * configure: Rebuild.
12406
12407 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
12408
12409 PR gdb/23095
12410 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12411 prepare_for_testing. Set normal_bp to r_debug_state if target
12412 is bsd.
12413
12414 2018-04-21 Pedro Alves <palves@redhat.com>
12415 Rajendra SY <rajendra.sy@gmail.com>
12416
12417 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12418 * remote.c (extended_remote_attach): In all-stop mode, mark the
12419 thread as executing.
12420
12421 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
12422
12423 * thread.c (thread_apply_all_command): Fix comment.
12424 (thread_command): Fix comment.
12425
12426 2018-04-10 Alan Hayward <alan.hayward@arm.com>
12427
12428 * common/tdesc.h (tdesc_create_feature): Remove xml filename
12429 parameter.
12430 * features/aarch64-core.c (create_feature_aarch64_core):
12431 Regenerate.
12432 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12433 Likewise.
12434 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12435 Likewise.
12436 * features/i386/32bit-avx512.c
12437 (create_feature_i386_32bit_avx512): Likewise.
12438 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12439 Likewise.
12440 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12441 Likewise.
12442 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12443 Likewise.
12444 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12445 Likewise.
12446 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12447 Likewise.
12448 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12449 Likewise.
12450 * features/i386/64bit-avx512.c
12451 (create_feature_i386_64bit_avx512): Likewise.
12452 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12453 Likewise.
12454 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12455 Likewise.
12456 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12457 Likewise.
12458 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12459 Likewise.
12460 * features/i386/64bit-segments.c
12461 (create_feature_i386_64bit_segments): Likewise.
12462 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12463 Likewise.
12464 * features/i386/x32-core.c
12465 (create_feature_i386_x32_core): Likewise.
12466 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12467 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12468 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12469 * target-descriptions.c: In generated code, don't pass xml
12470 filename.
12471
12472 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12473
12474 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12475 (print_xml_feature::visit_post): Likewise.
12476 (print_xml_feature::visit): Likewise.
12477 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12478 (print_xml_feature): Add new class.
12479 * regformats/regdat.sh: Null xmltarget on feature targets.
12480 * target-descriptions.c (struct target_desc): Add xmltarget.
12481 (maintenance_check_tdesc_xml_convert): Add unittest function.
12482 (tdesc_get_features_xml): Add function to get xml.
12483 (maintenance_check_xml_descriptions): Test xml generation.
12484 * xml-tdesc.c (string_read_description_xml): Add function.
12485 * xml-tdesc.h (string_read_description_xml): Add declaration.
12486
12487 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12488
12489 * features/Makefile: Add feature marker to targets with new style
12490 target descriptions.
12491 * regformats/aarch64.dat: Regenerate.
12492 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12493 * regformats/i386/amd64-avx-linux.dat: Likewise.
12494 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12495 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12496 * regformats/i386/amd64-linux.dat: Likewise.
12497 * regformats/i386/amd64-mpx-linux.dat: Likewise.
12498 * regformats/i386/amd64.dat: Likewise.
12499 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12500 * regformats/i386/i386-avx-linux.dat: Likewise.
12501 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12502 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12503 * regformats/i386/i386-linux.dat: Likewise.
12504 * regformats/i386/i386-mmx-linux.dat: Likewise.
12505 * regformats/i386/i386-mpx-linux.dat: Likewise.
12506 * regformats/i386/i386.dat: Likewise.
12507 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12508 * regformats/i386/x32-avx-linux.dat: Likewise.
12509 * regformats/i386/x32-linux.dat: Likewise.
12510 * regformats/tic6x-c62x-linux.dat: Likewise.
12511 * regformats/tic6x-c64x-linux.dat: Likewise.
12512 * regformats/tic6x-c64xp-linux.dat: Likewise.
12513 * regformats/regdat.sh: Parse feature marker.
12514
12515 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12516
12517 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12518 (tdesc_osabi_name): Likewise.
12519 * target-descriptions.c (tdesc_architecture_name): Add new
12520 function.
12521 (tdesc_osabi_name): Likewise.
12522
12523 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12524
12525 * common/tdesc.c (tdesc_predefined_type): Move to here.
12526 (tdesc_named_type): Likewise.
12527 (tdesc_create_vector): Likewise.
12528 (tdesc_create_struct): Likewise.
12529 (tdesc_set_struct_size): Likewise.
12530 (tdesc_create_union): Likewise.
12531 (tdesc_create_flags): Likewise.
12532 (tdesc_create_enum): Likewise.
12533 (tdesc_add_field): Likewise.
12534 (tdesc_add_typed_bitfield): Likewise.
12535 (tdesc_add_bitfield): Likewise.
12536 (tdesc_add_flag): Likewise.
12537 (tdesc_add_enum_value): Likewise.
12538 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12539 (struct tdesc_type_vector): Likewise.
12540 (struct tdesc_type_field): Likewise.
12541 (struct tdesc_type_with_fields): Likewise.
12542 (tdesc_create_enum): Add declaration.
12543 (tdesc_add_typed_bitfield): Likewise.
12544 (tdesc_add_enum_value): Likewise.
12545 * target-descriptions.c (tdesc_type_field): Move from here.
12546 (tdesc_type_builtin): Likewise.
12547 (tdesc_type_vector): Likewise.
12548 (tdesc_type_with_fields): Likewise.
12549 (tdesc_predefined_types): Likewise.
12550 (tdesc_named_type): Likewise.
12551 (tdesc_create_vector): Likewise.
12552 (tdesc_create_struct): Likewise.
12553 (tdesc_set_struct_size): Likewise.
12554 (tdesc_create_union): Likewise.
12555 (tdesc_create_flags): Likewise.
12556 (tdesc_create_enum): Likewise.
12557 (tdesc_add_field): Likewise.
12558 (tdesc_add_typed_bitfield): Likewise.
12559 (tdesc_add_bitfield): Likewise.
12560 (tdesc_add_flag): Likewise.
12561 (tdesc_add_enum_value): Likewise.
12562 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12563 (tdesc_add_typed_bitfield): Likewise.
12564 (tdesc_add_enum_value): Likewise.
12565
12566 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12567
12568 * common/tdesc.c (tdesc_feature::accept): Move to here.
12569 (tdesc_feature::operator==): Likewise.
12570 (tdesc_create_reg): Likewise.
12571 * common/tdesc.h (tdesc_type_kind): Likewise.
12572 (struct tdesc_type): Likewise.
12573 (struct tdesc_feature): Likewise.
12574 * regformats/regdat.sh: Create a feature.
12575 * target-descriptions.c (tdesc_type_kind): Move from here.
12576 (tdesc_type): Likewise.
12577 (tdesc_type_up): Likewise.
12578 (tdesc_feature): Likewise.
12579 (tdesc_create_reg): Likewise.
12580
12581 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12582
12583 * Makefile.in: Add arch/tdesc.c
12584 * common/tdesc.c: New file.
12585 * common/tdesc.h (tdesc_element_visitor): Move to here.
12586 (tdesc_element): Likewise.
12587 (tdesc_reg): Likewise.
12588 (tdesc_reg_up): Likewise.
12589 * regformats/regdef.h (reg): Add offset to constructors.
12590 * target-descriptions.c (tdesc_element_visitor): Move from here.
12591 (tdesc_element): Likewise.
12592 (tdesc_reg): Likewise.
12593 (tdesc_reg_up): Likewise.
12594
12595 2018-04-17 Tom Tromey <tom@tromey.com>
12596
12597 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12598 discriminant field.
12599
12600 2018-04-17 Tom Tromey <tom@tromey.com>
12601
12602 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12603
12604 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
12605
12606 * symtab.c (print_symbol_info): Skip printing filename and line
12607 number when `last' is NULL.
12608 (symtab_symbol_info): Use empty string instead of NULL for first
12609 invocation of print_symbol_info.
12610 (rbreak_command): Pass NULL to `last' parameter of
12611 print_symbol_info.
12612
12613 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
12614
12615 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12616 instead of nullptr.
12617
12618 2018-04-16 Pedro Alves <palves@redhat.com>
12619
12620 * MAINTAINERS (sh): Remove.
12621 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12622 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12623 (ALLDEPFILES): Remove sh64-tdep.c.
12624 * NEWS: Mentions that support for SH-5/SH64 is removed.
12625 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12626 (sh*-*-openbsd*): Ditto.
12627 (sh64-*-elf*): Remove.
12628 (sh*): Remove.
12629 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12630 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12631 * sh-tdep.c: No longer include "sh64-tdep.h".
12632 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12633 * sh64-tdep.c, sh64-tdep.h: Remove files.
12634
12635 2018-04-16 Pedro Alves <palves@redhat.com>
12636
12637 * MAINTAINERS: Remove m88k.
12638 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12639 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12640 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12641 * NEWS: Mention that support for m88k was removed.
12642 * configure.host (m88*-*-*): Remove support.
12643 * configure.nat (m88k-*-*): Remove support.
12644 * configure.tgt (m88*-*-openbsd*): Remove.
12645 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12646
12647 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
12648
12649 * configure.tgt (x86_tobjs): New variable.
12650 (amd64_tobjs, i386_tobjs): Use it.
12651
12652 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12653
12654 * symtab.c (print_symbol_info): Precede the symbol definition by
12655 the line number when available.
12656 * NEWS: Advertise this enhancement.
12657
12658 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12659
12660 * NEWS (New options): announce set/show record btrace cpu.
12661 * btrace.c: Include record-btrace.h.
12662 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12663 the vendor is unknown.
12664 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
12665 Maybe overwrite the btrace configuration's cpu.
12666 (btrace_compute_ftrace): Add cpu parameter. Update callers.
12667 (btrace_fetch): Add cpu parameter. Update callers.
12668 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12669 Maybe overwrite the btrace configuration's cpu. Skip enabling
12670 errata workarounds if the vendor is unknown.
12671 * python/py-record-btrace.c: Include record-btrace.h.
12672 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12673 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12674 * record-btrace.c (record_btrace_cpu_state_kind): New.
12675 (record_btrace_cpu): New.
12676 (set_record_btrace_cpu_cmdlist): New.
12677 (record_btrace_get_cpu): New.
12678 (require_btrace_thread, record_btrace_info)
12679 (record_btrace_resume_thread): Call record_btrace_get_cpu.
12680 (cmd_set_record_btrace_cpu_none): New.
12681 (cmd_set_record_btrace_cpu_auto): New.
12682 (cmd_set_record_btrace_cpu): New.
12683 (cmd_show_record_btrace_cpu): New.
12684 (_initialize_record_btrace): Initialize set/show record btrace cpu
12685 commands.
12686 * record-btrace.h (record_btrace_get_cpu): New.
12687
12688 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12689
12690 * record.c (set_record_command): Fix typo in message.
12691
12692 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12693
12694 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12695
12696 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12697
12698 * infrun.c (process_event_stop_test): Call
12699 gdbarch_in_indirect_branch_thunk.
12700 * gdbarch.sh (in_indirect_branch_thunk): New.
12701 * gdbarch.c: Regenerated.
12702 * gdbarch.h: Regenerated.
12703 * x86-tdep.h: New.
12704 * x86-tdep.c: New.
12705 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12706 (HFILES_NO_SRCDIR): Add x86-tdep.h.
12707 (ALLDEPFILES): Add x86-tdep.c.
12708 * arch-utils.h (default_in_indirect_branch_thunk): New.
12709 * arch-utils.c (default_in_indirect_branch_thunk): New.
12710 * i386-tdep: Include x86-tdep.h.
12711 (i386_in_indirect_branch_thunk): New.
12712 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12713 function.
12714 * amd64-tdep: Include x86-tdep.h.
12715 (amd64_in_indirect_branch_thunk): New.
12716 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12717
12718 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
12719
12720 PR gdb/23053
12721 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12722 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12723 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12724 regression.
12725
12726 2018-04-12 Tom Tromey <tom@tromey.com>
12727
12728 * rust-lang.c (rust_print_struct_def): Remove univariant code.
12729 (rust_evaluate_subexp): Likewise.
12730
12731 2018-04-12 Pedro Alves <palves@redhat.com>
12732
12733 * procfs.c (procfs_detach): Make forward declaration's prototype
12734 match definition's protototype.
12735 (proc_get_LDT_entry): Remove stale do_cleanups call.
12736
12737 2018-04-12 Pedro Alves <palves@redhat.com>
12738
12739 * target.h (target_ops::to_has_exited): Delete.
12740 (target_has_exited): Delete.
12741 * target-delegates.c: Regenerate.
12742
12743 2018-04-11 Pedro Alves <palves@redhat.com>
12744
12745 * target.c (fileio_fh_t::t): Add comment.
12746 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12747 (target_fileio_close): Handle a NULL target.
12748 (invalidate_fileio_fh): New.
12749 (target_close): Call it.
12750 * remote.c (remote_hostio_send_command): No longer check whether
12751 remote_desc is open.
12752
12753 2018-04-11 Pedro Alves <palves@redhat.com>
12754
12755 * target.c (fileio_fh_t): Make it a named struct instead of a
12756 typedef.
12757 (fileio_fh_t::is_closed): New method.
12758 (DEF_VEC_O (fileio_fh_t)): Remove.
12759 (fileio_fhandles): Now a std::vector.
12760 (is_closed_fileio_fh): Delete.
12761 (acquire_fileio_fd): Adjust. Rename parameters.
12762 (release_fileio_fd): Adjust.
12763 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12764 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12765 (target_fileio_close): Adjust.
12766
12767 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
12768
12769 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12770 index.
12771
12772 2018-04-10 Pedro Alves <palves@redhat.com>
12773
12774 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12775 (scoped_finish_thread_state): New class.
12776 * infcmd.c (run_command_1): Use it instead of finish_thread_state
12777 cleanup.
12778 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12779 (fetch_inferior_event, normal_stop): Likewise.
12780 * thread.c (finish_thread_state_cleanup): Delete.
12781
12782 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12783 Pedro Alves <palves@redhat.com>
12784
12785 * value.c: Include "selftest.h" and "common/array-view.h".
12786 (struct range) <operator ==>: New.
12787 (test_ranges_contain): New.
12788 (check_ranges_vector): New.
12789 (test_insert_into_bit_range_vector): New.
12790 (_initialize_values): Register selftests.
12791 * common/array-view.h (operator==, operator!=): New.
12792
12793 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12794
12795 * common/gdb_vecs.h (unordered_remove): Add overload that takes
12796 an iterator.
12797 * inline-frame.c: Include <algorithm>.
12798 (struct inline_state): Add constructor.
12799 (inline_state_s): Remove.
12800 (DEF_VEC_O(inline_state_s)): Remove.
12801 (inline_states): Change type to std::vector.
12802 (find_inline_frame_state): Adjust to std::vector.
12803 (allocate_inline_frame_state): Remove.
12804 (clear_inline_frame_state): Adjust to std::vector.
12805 (skip_inline_frames): Adjust to std::vector.
12806
12807 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12808
12809 * tracepoint.h (struct trace_state_variable): Add constructor.
12810 <name>: Change type to std::string.
12811 * tracepoint.c (tsv_s): Remove.
12812 (DEF_VEC_O(tsv_s)): Remove.
12813 (tvariables): Change to std::vector.
12814 (create_trace_state_variable): Adjust to std::vector.
12815 (find_trace_state_variable): Likewise.
12816 (find_trace_state_variable_by_number): Likewise.
12817 (delete_trace_state_variable): Likewise.
12818 (trace_variable_command): Adjust to std::string.
12819 (delete_trace_variable_command): Likewise.
12820 (tvariables_info_1): Adjust to std::vector.
12821 (save_trace_state_variables): Likewise.
12822 (start_tracing): Likewise.
12823 (merge_uploaded_trace_state_variables): Adjust to std::vector
12824 and std::string.
12825 * target.h (struct target_ops)
12826 <to_download_trace_state_variable>: Pass reference to
12827 trace_state_variable.
12828 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12829 * target-delegates.c: Re-generate.
12830 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12831 (mi_tsv_deleted): Likewise.
12832 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12833 * remote.c (remote_download_trace_state_variable): Change
12834 pointer to reference and adjust.
12835 * make-target-delegates (parse_argtypes): Handle references.
12836 (write_function_header): Likewise.
12837 (munge_type): Likewise.
12838
12839 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12840
12841 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12842 string_view-selftests.c.
12843 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12844 testsuite.
12845 * unittests/basic_string_view/cons/char/1.cc: Likewise.
12846 * unittests/basic_string_view/cons/char/2.cc: Likewise.
12847 * unittests/basic_string_view/cons/char/3.cc: Likewise.
12848 * unittests/basic_string_view/element_access/char/1.cc:
12849 Likewise.
12850 * unittests/basic_string_view/element_access/char/empty.cc:
12851 Likewise.
12852 * unittests/basic_string_view/element_access/char/front_back.cc:
12853 Likewise.
12854 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12855 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12856 Likewise.
12857 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12858 Likewise.
12859 * unittests/basic_string_view/modifiers/swap/char/1.cc:
12860 Likewise.
12861 * unittests/basic_string_view/operations/compare/char/1.cc:
12862 Likewise.
12863 * unittests/basic_string_view/operations/compare/char/13650.cc:
12864 Likewise.
12865 * unittests/basic_string_view/operations/copy/char/1.cc:
12866 Likewise.
12867 * unittests/basic_string_view/operations/data/char/1.cc:
12868 Likewise.
12869 * unittests/basic_string_view/operations/find/char/1.cc:
12870 Likewise.
12871 * unittests/basic_string_view/operations/find/char/2.cc:
12872 Likewise.
12873 * unittests/basic_string_view/operations/find/char/3.cc:
12874 Likewise.
12875 * unittests/basic_string_view/operations/find/char/4.cc:
12876 Likewise.
12877 * unittests/basic_string_view/operations/rfind/char/1.cc:
12878 Likewise.
12879 * unittests/basic_string_view/operations/rfind/char/2.cc:
12880 Likewise.
12881 * unittests/basic_string_view/operations/rfind/char/3.cc:
12882 Likewise.
12883 * unittests/basic_string_view/operations/substr/char/1.cc:
12884 Likewise.
12885 * unittests/basic_string_view/operators/char/2.cc: Likewise.
12886 * unittests/string_view-selftests.c: New file.
12887
12888 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12889
12890 * unittests/basic_string_view/capacity/1.cc: New file.
12891 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12892 * unittests/basic_string_view/cons/char/1.cc: New file.
12893 * unittests/basic_string_view/cons/char/2.cc: New file.
12894 * unittests/basic_string_view/cons/char/3.cc: New file.
12895 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12896 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12897 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12898 * unittests/basic_string_view/element_access/char/1.cc: New file.
12899 * unittests/basic_string_view/element_access/char/2.cc: New file.
12900 * unittests/basic_string_view/element_access/char/empty.cc: New file.
12901 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12902 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12903 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12904 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12905 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12906 * unittests/basic_string_view/include.cc: New file.
12907 * unittests/basic_string_view/inserters/char/1.cc: New file.
12908 * unittests/basic_string_view/inserters/char/2.cc: New file.
12909 * unittests/basic_string_view/inserters/char/3.cc: New file.
12910 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12911 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12912 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12913 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12914 * unittests/basic_string_view/literals/types.cc: New file.
12915 * unittests/basic_string_view/literals/values.cc: New file.
12916 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12917 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12918 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12919 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12920 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12921 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12922 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12923 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12924 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12925 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12926 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12927 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12928 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12929 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12930 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12931 * unittests/basic_string_view/operations/data/char/1.cc: New file.
12932 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12933 * unittests/basic_string_view/operations/find/char/1.cc: New file.
12934 * unittests/basic_string_view/operations/find/char/2.cc: New file.
12935 * unittests/basic_string_view/operations/find/char/3.cc: New file.
12936 * unittests/basic_string_view/operations/find/char/4.cc: New file.
12937 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12938 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12939 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12940 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12941 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12942 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12943 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12944 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12945 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12946 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12947 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12948 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12949 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12950 * unittests/basic_string_view/operators/char/2.cc: New file.
12951 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12952 * unittests/basic_string_view/range_access/char/1.cc: New file.
12953 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12954 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12955 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12956 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12957 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12958 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12959 * unittests/basic_string_view/requirements/typedefs.cc: New file.
12960 * unittests/basic_string_view/typedefs.cc: New file.
12961 * unittests/basic_string_view/types/1.cc: New file.
12962
12963 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12964
12965 * common/gdb_string_view.h: Remove libstdc++ implementation
12966 details, adjust to gdb reality.
12967 * common/gdb_string_view.tcc: Likewise.
12968 * cli/cli-script.c (struct string_view): Remove.
12969 (user_args) <m_args>: Change element type to gdb::string_view.
12970 (user_args::insert_args): Adjust.
12971
12972 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12973
12974 * common/gdb_string_view.h: New file.
12975 * common/gdb_string_view.tcc: New file.
12976
12977 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12978
12979 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12980 * configure: Re-generate.
12981
12982 2018-04-09 Pedro Alves <palves@redhat.com>
12983
12984 * gdbarch.sh: Include "observable.h" instead of "observer.h".
12985 (set_target_gdbarch): Call
12986 gdb::observers::architecture_changed.notify instead of
12987 observer_notify_architecture_changed.
12988
12989 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12990
12991 * tracepoint.c (struct current_traceframe_cleanup): Remove.
12992 (do_restore_current_traceframe_cleanup): Remove.
12993 (restore_current_traceframe_cleanup_dtor): Remove.
12994 (make_cleanup_restore_current_traceframe): Remove.
12995 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12996 New.
12997 * tracepoint.h (struct scoped_restore_current_traceframe): New.
12998 * infrun.c (fetch_inferior_event): Use
12999 scoped_restore_current_traceframe.
13000
13001 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13002
13003 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
13004 Remove.
13005 <n_allocated_type_units>: Remove.
13006 <all_type_units>: Change to std::vector.
13007 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13008 to std::vector change.
13009 (dwarf2_per_objfile::get_cutu): Likewise.
13010 (dwarf2_per_objfile::get_tu): Likewise.
13011 (create_signatured_type_table_from_index): Likewise.
13012 (create_signatured_type_table_from_debug_names): Likewise.
13013 (dw2_symtab_iter_next): Likewise.
13014 (dw2_print_stats): Likewise.
13015 (dw2_expand_all_symtabs): Likewise.
13016 (dw2_expand_marked_cus): Likewise.
13017 (dw2_debug_names_iterator::next): Likewise.
13018 (dwarf2_initialize_objfile): Likewise.
13019 (add_signatured_type_cu_to_table): Likewise.
13020 (create_all_type_units): Likewise.
13021 (add_type_unit): Likewise.
13022 (struct tu_abbrev_offset): Add constructor.
13023 (build_type_psymtabs_1): Adjust to std::vector change.
13024 (print_tu_stats): Likewise.
13025 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13026 (write_debug_names): Likewise.
13027
13028 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13029
13030 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
13031 Make an std::vector.
13032 <n_comp_units>: Remove.
13033 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13034 to std::vector change.
13035 (dwarf2_per_objfile::get_cutu): Likewise.
13036 (dwarf2_per_objfile::get_cu): Likewise.
13037 (create_cus_from_index): Likewise.
13038 (create_addrmap_from_index): Likewise.
13039 (create_addrmap_from_aranges): Likewise.
13040 (dwarf2_read_index): Likewise.
13041 (dw2_find_last_source_symtab): Likewise.
13042 (dw2_map_symtabs_matching_filename): Likewise.
13043 (dw2_symtab_iter_next): Likewise.
13044 (dw2_print_stats): Likewise.
13045 (dw2_expand_all_symtabs): Likewise.
13046 (dw2_expand_symtabs_with_fullname): Likewise.
13047 (dw2_expand_marked_cus): Likewise.
13048 (dw2_map_symbol_filenames): Likewise.
13049 (create_cus_from_debug_names): Likewise.
13050 (dwarf2_read_debug_names): Likewise.
13051 (dw2_debug_names_iterator::next): Likewise.
13052 (dwarf2_initialize_objfile): Likewise.
13053 (set_partial_user): Likewise.
13054 (dwarf2_build_psymtabs_hard): Likewise.
13055 (read_comp_units_from_section): Remove arguments, adjust to
13056 std::vector change.
13057 (create_all_comp_units): Adjust to std::vector and
13058 read_comp_units_from_section changes.
13059 (dwarf2_find_containing_comp_unit): Adjust to std::vector
13060 change.
13061 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13062 (psyms_seen_size): Likewise.
13063 (write_gdbindex): Likewise.
13064 (write_debug_names): Likewise.
13065
13066 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13067
13068 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13069 with dwarf2_per_objfile.
13070 (create_cus_from_index): Likewise.
13071 (create_signatured_type_table_from_index): Likewise.
13072 (dwarf2_read_index): Likewise.
13073 (dwarf2_initialize_objfile): Likewise.
13074 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
13075 per_cu rather than get_dwarf2_per_objfile.
13076
13077 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13078
13079 * dwarf2read.h (struct signatured_type): Forward declare.
13080 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13081 New methods.
13082 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13083 (dw2_get_cutu): ...this.
13084 (dwarf2_per_objfile::get_cu): Rename from...
13085 (dw2_get_cu): ...this.
13086 (dwarf2_per_objfile::get_tu): New.
13087 (create_addrmap_from_index): Adjust.
13088 (create_addrmap_from_aranges): Adjust.
13089 (dw2_find_last_source_symtab): Adjust.
13090 (dw2_map_symtabs_matching_filename): Adjust.
13091 (dw2_symtab_iter_next): Adjust.
13092 (dw2_print_stats): Adjust.
13093 (dw2_expand_all_symtabs): Adjust.
13094 (dw2_expand_symtabs_with_fullname): Adjust.
13095 (dw2_expand_marked_cus): Adjust.
13096 (dw_expand_symtabs_matching_file_matcher): Adjust.
13097 (dw2_map_symbol_filenames): Adjust.
13098 (dw2_debug_names_iterator::next): Adjust.
13099 (dwarf2_initialize_objfile): Adjust.
13100 (set_partial_user): Adjust.
13101 (dwarf2_build_psymtabs_hard): Adjust.
13102
13103 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13104
13105 * dwarf2read.c (create_signatured_type_table_from_debug_names):
13106 Remove unused variables.
13107 (dw2_map_symtabs_matching_filename): Likewise.
13108 (dwarf2_record_block_ranges): Likewise.
13109 (dwarf2_read_addr_index): Likewise.
13110 (follow_die_offset): Likewise.
13111
13112 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13113
13114 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13115 to symbol_file_add_main.
13116
13117 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13118
13119 PR mi/22299
13120 * mi/mi-console.c (do_fputc_async_safe): New.
13121 (mi_console_file::write_async_safe): New.
13122 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13123 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13124 New.
13125 * ui-file.c (ui_file::putstrn): Adjust call to
13126 fputstrn_unfiltered.
13127 * utils.c (printchar): Replace do_fputs and do_fprintf
13128 parameters by do_fputc.
13129 (fputstr_filtered): Adjust call to printchar.
13130 (fputstr_unfiltered): Likewise.
13131 (fputstrn_filtered): Likewise.
13132 (fputstrn_unfiltered): Add do_fputc parameter, pass to
13133 printchar.
13134 * utils.h (do_fputc_ftype): New typedef.
13135 (fputstrn_unfiltered): Add do_fputc parameter.
13136
13137 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13138
13139 * regformats/i386/i386-avx.dat: Remove.
13140
13141 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13142
13143 PR gdb/22979
13144 * amd64-tdep.c (amd64_none_init_abi): New function.
13145 (amd64_x32_none_init_abi): New function.
13146 (_initialize_amd64_tdep): Register handlers for x86-64 and
13147 x64_32 with GDB_OSABI_NONE.
13148 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13149 GDB_OSABI_NONE osabi.
13150
13151 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13152
13153 PR gdb/22980
13154 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13155 GDB_OSABI_NONE.
13156 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13157 * osabi.c (gdb_osabi_names): Add "unknown" entry.
13158
13159 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13160
13161 * common/byte-vector.h (char_vector): New type.
13162 * target.h (target_read_alloc): Return
13163 gdb::optional<byte_vector>.
13164 (target_read_stralloc): Return gdb::optional<char_vector>.
13165 (target_get_osdata): Return gdb::optional<char_vector>.
13166 * target.c (target_read_alloc_1): Templatize. Replacement
13167 manual memory management with vector.
13168 (target_read_alloc): Change return type, adjust.
13169 (target_read_stralloc): Change return type, adjust.
13170 (target_get_osdata): Change return type, adjust.
13171 * auxv.c (struct auxv_info) <length>: Remove.
13172 <data>: Change type to gdb::optional<byte_vector>.
13173 (auxv_inferior_data_cleanup): Free auxv_info with delete.
13174 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13175 (target_auxv_search): Adjust.
13176 (fprint_target_auxv): Adjust.
13177 * avr-tdep.c (avr_io_reg_read_command): Adjust.
13178 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13179 (linux_make_corefile_notes): Adjust.
13180 * osdata.c (get_osdata): Adjust.
13181 * remote.c (remote_get_threads_with_qxfer): Adjust.
13182 (remote_memory_map): Adjust.
13183 (remote_traceframe_info): Adjust.
13184 (btrace_read_config): Adjust.
13185 (remote_read_btrace): Adjust.
13186 (remote_pid_to_exec_file): Adjust.
13187 * solib-aix.c (solib_aix_get_library_list): Adjust.
13188 * solib-dsbt.c (decode_loadmap): Don't free buf.
13189 (dsbt_get_initial_loadmaps): Adjust.
13190 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13191 * solib-target.c (solib_target_current_sos): Adjust.
13192 * tracepoint.c (sdata_make_value): Adjust.
13193 * xml-support.c (xinclude_start_include): Adjust.
13194 (xml_fetch_content_from_file): Adjust.
13195 * xml-support.h (xml_fetch_another): Change return type.
13196 (xml_fetch_content_from_file): Change return type.
13197 * xml-syscall.c (xml_init_syscalls_info): Adjust.
13198 * xml-tdesc.c (file_read_description_xml): Adjust.
13199 (fetch_available_features_from_target): Change return type.
13200 (target_fetch_description_xml): Adjust.
13201 (target_read_description_xml): Adjust.
13202
13203 2018-04-06 Tom Tromey <tom@tromey.com>
13204
13205 * value.c (~value): Update.
13206 (struct value) <contents>: Now unique_xmalloc_ptr.
13207 (value_contents_bits_eq, allocate_value_contents)
13208 (value_contents_raw, value_contents_all_raw)
13209 (value_contents_for_printing, value_contents_for_printing_const)
13210 (set_value_enclosing_type): Update.
13211
13212 2018-04-06 Tom Tromey <tom@tromey.com>
13213
13214 * value.c (range_s): Remove typedef, VEC.
13215 (struct range): Add operator<.
13216 (range_lessthan): Remove.
13217 (ranges_contain): Change type.
13218 (~value): Update.
13219 (struct value) <unavailable, optimized_out>: Now std::vector.
13220 (value_entirely_available)
13221 (value_entirely_covered_by_range_vector)
13222 (value_entirely_unavailable, value_entirely_optimized_out):
13223 Update.
13224 (insert_into_bit_range_vector): Change argument type.
13225 (find_first_range_overlap): Likewise.
13226 (struct ranges_and_idx, value_contents_bits_eq)
13227 (require_not_optimized_out, require_available): Update.
13228 (ranges_copy_adjusted): Change argument types.
13229 (value_optimized_out, value_copy, value_fetch_lazy): Update.
13230
13231 2018-04-06 Tom Tromey <tom@tromey.com>
13232
13233 * value.c (~value): Update.
13234 (struct value) <parent>: Now a value_ref_ptr.
13235 (value_parent, set_value_parent, value_address, value_copy):
13236 Update.
13237
13238 2018-04-06 Tom Tromey <tom@tromey.com>
13239
13240 * value.c (struct value): Add constructor, destructor, and member
13241 initializers.
13242 (allocate_value_lazy, value_decref): Update.
13243
13244 2018-04-06 Tom Tromey <tom@tromey.com>
13245
13246 * value.c (struct value) <released, next>: Remove.
13247 (all_values): Now a std::vector.
13248 (allocate_value_lazy): Update.
13249 (value_next): Remove.
13250 (value_mark, value_free_to_mark, release_value)
13251 (value_release_to_mark): Update.
13252
13253 2018-04-06 Tom Tromey <tom@tromey.com>
13254
13255 * value.h (fetch_subexp_value, value_release_to_mark): Update.
13256 (free_value_chain): Remove.
13257 * value.c (free_value_chain): Remove.
13258 (value_release_to_mark): Return a std::vector.
13259 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13260 std::vector.
13261 (check_condition): Update.
13262 * eval.c (fetch_subexp_value): Change "val_chain" to a
13263 std::vector.
13264 * breakpoint.c (update_watchpoint): Update.
13265 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13266
13267 2018-04-06 Tom Tromey <tom@tromey.com>
13268
13269 * value.h (free_all_values): Remove.
13270 * value.c (free_all_values): Remove.
13271
13272 2018-04-06 Tom Tromey <tom@tromey.com>
13273
13274 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13275 (value_history_chain, value_history_count): Remove.
13276 (value_history): New global.
13277 (record_latest_value, access_value_history, show_values)
13278 (preserve_values): Update.
13279
13280 2018-04-06 Tom Tromey <tom@tromey.com>
13281
13282 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13283 * varobj.c (varobj_set_display_format, varobj_set_value)
13284 (install_default_visualizer, construct_visualizer)
13285 (install_new_value, ~varobj, varobj_get_value_type)
13286 (my_value_of_variable, varobj_editable_p): Update.
13287 * c-varobj.c (c_describe_child, c_value_of_variable)
13288 (cplus_number_of_children, cplus_describe_child): Update.
13289 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13290 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13291 (ada_value_of_variable, ada_value_is_changeable_p): Update.
13292
13293 2018-04-06 Tom Tromey <tom@tromey.com>
13294
13295 * printcmd.c (last_examine_address): Change type to
13296 value_ref_ptr.
13297 (do_examine, x_command): Update.
13298
13299 2018-04-06 Tom Tromey <tom@tromey.com>
13300
13301 * value.c (release_value): Update.
13302 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13303 (struct bpstats) <val>: Now a value_ref_ptr.
13304 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13305 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13306 (~watchpoint, print_it_watchpoint, watch_command_1)
13307 (invalidate_bp_value_on_memory_change): Update.
13308
13309 2018-04-06 Tom Tromey <tom@tromey.com>
13310
13311 * varobj.c (varobj_clear_saved_item)
13312 (update_dynamic_varobj_children, install_new_value, ~varobj):
13313 Update.
13314 * value.h (value_incref): Move declaration earlier.
13315 (value_decref): Rename from value_free.
13316 (struct value_ref_policy): New.
13317 (value_ref_ptr): New typedef.
13318 (struct value_deleter): Remove.
13319 (gdb_value_up): Remove typedef.
13320 (release_value): Change return type.
13321 (release_value_or_incref): Remove.
13322 * value.c (set_value_parent): Update.
13323 (value_incref): Change return type.
13324 (value_decref): Rename from value_free.
13325 (value_free_to_mark, free_all_values, free_value_chain): Update.
13326 (release_value): Return value_ref_ptr.
13327 (release_value_or_incref): Remove.
13328 (record_latest_value, set_internalvar, clear_internalvar):
13329 Update.
13330 * stack.c (info_frame_command): Don't call value_free.
13331 * python/py-value.c (valpy_dealloc, valpy_new)
13332 (value_to_value_object): Update.
13333 * printcmd.c (do_examine): Update.
13334 * opencl-lang.c (lval_func_free_closure): Update.
13335 * mi/mi-main.c (register_changed_p): Don't call value_free.
13336 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13337 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13338 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13339 value_free.
13340 * guile/scm-value.c (vlscm_free_value_smob)
13341 (vlscm_scm_from_value): Update.
13342 * frame.c (frame_register_unwind, frame_unwind_register_signed)
13343 (frame_unwind_register_unsigned, get_frame_register_bytes)
13344 (put_frame_register_bytes): Don't call value_free.
13345 * findvar.c (address_from_register): Don't call value_free.
13346 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13347 * dwarf2loc.c (entry_data_value_free_closure)
13348 (value_of_dwarf_reg_entry, free_pieced_value_closure)
13349 (dwarf2_evaluate_loc_desc_full): Update.
13350 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13351 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13352 (~watchpoint, watch_command_1)
13353 (invalidate_bp_value_on_memory_change): Update.
13354 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13355
13356 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
13357
13358 PR gdb/23022
13359 * warning.m4: Add -Wno-error=deprecated-register.
13360 * configure: Re-generate.
13361
13362 2018-04-05 Tom Tromey <tom@tromey.com>
13363
13364 * linespec.h: Remove include of "vec.h".
13365
13366 2018-04-05 Tom Tromey <tom@tromey.com>
13367
13368 * linespec.c (typep): Remove typedef.
13369 (find_methods, find_superclass_methods): Take a std::vector.
13370 (find_method): Use std::vector.
13371
13372 2018-04-05 Tom Tromey <tom@tromey.com>
13373
13374 * utils.c (compare_strings): Remove.
13375 * utils.h (compare_strings): Remove.
13376 * objc-lang.h (find_imps): Update.
13377 * objc-lang.c (find_methods): Take a std::vector.
13378 (uniquify_strings, find_imps): Likewise.
13379 * linespec.c (find_methods): Take a std::vector.
13380 (decode_objc): Use std::vector.
13381 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13382 a std::vector.
13383 (find_method, find_function_symbols): Use std::vector.
13384
13385 2018-04-05 Tom Tromey <tom@tromey.com>
13386
13387 * completer.c (completion_tracker::completion_tracker): Remove
13388 cast.
13389 (completion_tracker::discard_completions): Likewise.
13390 * breakpoint.c (ambiguous_names_p): Remove cast.
13391 * ada-lang.c (_initialize_ada_language): Remove cast.
13392 * utils.h (streq): Update.
13393 (streq_hash): Add new declaration.
13394 * utils.c (streq): Return bool.
13395 (streq_hash): New function.
13396
13397 2018-04-05 Tom Tromey <tom@tromey.com>
13398
13399 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13400 Remove a string copy.
13401
13402 2018-04-05 Tom Tromey <tom@tromey.com>
13403
13404 * linespec.c (filter_results): Use std::vector.
13405 (decode_line_2, decode_line_full): Update.
13406
13407 2018-04-05 Tom Tromey <tom@tromey.com>
13408
13409 * linespec.c (canonical_to_fullform): Return std::string.
13410 (filter_results): Update.
13411 (struct decode_line_2_item): Add constructor.
13412 <fullform, displayform>: Now std::string.
13413 (decode_line_2_compare_items): Now a std::sort comparator.
13414 (decode_line_2): Update.
13415
13416 2018-04-05 Tom Tromey <tom@tromey.com>
13417
13418 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13419 (unexpected_linespec_error): Update.
13420 (linespec_parse_basic, parse_linespec): Update.
13421
13422 2018-04-05 Tom Tromey <tom@tromey.com>
13423
13424 * linespec.c (linespec_parse_basic): Reindent.
13425
13426 2018-04-05 Tom Tromey <tom@tromey.com>
13427
13428 * minsyms.h (iterate_over_minimal_symbols): Update.
13429 * minsyms.c (iterate_over_minimal_symbols): Take a
13430 gdb::function_view.
13431 * linespec.c (struct collect_minsyms): Remove.
13432 (compare_msyms): Now a std::sort comparator.
13433 (add_minsym): Add parameters.
13434 (search_minsyms_for_name): Update. Use std::vector.
13435
13436 2018-04-03 Tom Tromey <tom@tromey.com>
13437
13438 * mipsread.c (read_alphacoff_dynamic_symtab): Use
13439 gdb::byte_vector.
13440
13441 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13442
13443 * MAINTAINERS (Write After Approval): Add Weimin Pan.
13444
13445 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13446
13447 PR gdb/16959
13448 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
13449 printing static type.
13450
13451 2018-04-01 Tom Tromey <tom@tromey.com>
13452
13453 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13454 (rs6000_xfer_shared_libraries): Update.
13455
13456 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
13457
13458 * common/gdb_vecs.h (char_ptr): Remove.
13459 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13460
13461 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13462
13463 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13464 with std::vector.
13465 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13466
13467 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13468
13469 * tracepoint.h (struct uploaded_tp): Initialize fields.
13470 <actions, step_actions, cmd_strings>: Change type to
13471 std::vector<char *>.
13472 * tracepoint.c (get_uploaded_tp): Allocate with new.
13473 (free_uploaded_tps): Free with delete.
13474 (parse_tracepoint_definition): Adjust to std::vector change.
13475 * breakpoint.c (read_uploaded_action): Likewise.
13476 (create_tracepoint_from_upload): Likewise.
13477 * ctf.c (ctf_write_uploaded_tp): Likewise.
13478 (SET_ARRAY_FIELD): Likewise.
13479 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13480
13481 2018-03-30 Tom Tromey <tom@tromey.com>
13482
13483 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
13484 std::unique_ptr.
13485 (svr4_keep_data_in_core): Update.
13486 (svr4_read_so_list): Update.
13487
13488 2018-03-30 Tom Tromey <tom@tromey.com>
13489
13490 * windows-nat.c (handle_output_debug_string, handle_exception):
13491 Update.
13492 * target.h (target_read_string): Update.
13493 * target.c (target_read_string): Change "string" to
13494 unique_xmalloc_ptr.
13495 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13496 Update.
13497 * solib-frv.c (frv_current_sos): Update.
13498 * solib-dsbt.c (dsbt_current_sos): Update.
13499 * solib-darwin.c (darwin_current_sos): Update.
13500 * linux-thread-db.c (inferior_has_bug): Update.
13501 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13502 Update. Remove alloca.
13503 * ada-lang.c (ada_main_name): Update.
13504
13505 2018-03-30 Tom Tromey <tom@tromey.com>
13506
13507 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13508 (struct dwo_file_deleter): New.
13509 (dwo_file_up): New typedef.
13510 (open_and_init_dwo_file): Use dwo_file_up.
13511 (free_dwo_file_cleanup): Remove.
13512
13513 2018-03-30 Tom Tromey <tom@tromey.com>
13514
13515 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13516 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13517
13518 2018-03-30 Tom Tromey <tom@tromey.com>
13519
13520 * dwarf2read.c (class free_cached_comp_units): New class.
13521 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13522 (free_cached_comp_units): Remove function.
13523
13524 2018-03-30 Tom Tromey <tom@tromey.com>
13525
13526 * utils.h (make_cleanup_unpush_target): Remove.
13527 * inf-ptrace.c (struct target_unpusher): New.
13528 (target_unpush_up) New typedef.
13529 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13530 target_unpush_up.
13531 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13532
13533 2018-03-27 Tom Tromey <tom@tromey.com>
13534
13535 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13536
13537 2018-03-27 Pedro Alves <palves@redhat.com>
13538 Tom Tromey <tom@tromey.com>
13539
13540 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13541 destructor. Now a class.
13542 (gdb_readline_wrapper_cleanup): Remove function.
13543 (gdb_readline_wrapper): Remove cleanups.
13544
13545 2018-03-27 Tom Tromey <tom@tromey.com>
13546
13547 * typeprint.h (struct type_print_options) <local_typedefs,
13548 global_typedefs>: Remove "struct" keyword.
13549 (class typedef_hash_table): New class.
13550 (recursively_update_typedef_hash, add_template_parameters)
13551 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13552 (find_typedef_in_hash): Don't declare.
13553 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13554 (typedef_hash_table::recursively_update): Rename from
13555 recursively_update_typedef_hash. Now a member.
13556 (typedef_hash_table::add_template_parameters): Rename from
13557 add_template_parameters. Now a member.
13558 (typedef_hash_table::typedef_hash_table): Now a constructor;
13559 rename from create_typedef_hash.
13560 (typedef_hash_table::~typedef_hash_table): Now a destructor;
13561 rename from free_typedef_hash.
13562 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13563 (do_free_global_table): Remove.
13564 (typedef_hash_table::typedef_hash_table): New constructor; renamed
13565 from copy_type_recursive.
13566 (create_global_typedef_table): Remove.
13567 (typedef_hash_table::find_global_typedef): Now a member of
13568 typedef_hash_table.
13569 (typedef_hash_table::find_typedef): Rename from
13570 find_typedef_in_hash; now a member.
13571 (whatis_exp): Update.
13572 * extension.h (struct ext_lang_type_printers): Add constructor and
13573 destructor.
13574 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13575 declare.
13576 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13577 Now a constructor; rename from start_ext_lang_type_printers.
13578 (ext_lang_type_printers): Now a destructor; rename from
13579 free_ext_lang_type_printers.
13580 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13581 Update.
13582 (c_type_print_base_struct_union): Update. Remove cleanups.
13583
13584 2018-03-27 Tom Tromey <tom@tromey.com>
13585
13586 * dwarf-index-write.c: Include <cmath>.
13587
13588 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13589
13590 * NEWS: Add entry describing new "set|show varsize-limit" command.
13591 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13592 command.
13593 * printcmd.c (_initialize_printcmd): Add "set var" alias of
13594 "set variable".
13595
13596 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
13597
13598 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13599 dwarf-index-write.c
13600 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13601 * dwarf-index-common.c: New file.
13602 * dwarf-index-common.h: New file.
13603 * dwarf-index-write.c: New file.
13604 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13605 (struct dwarf2_section_info): Move from here.
13606 (dwarf2_section_info_def): Likewise.
13607 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13608 (offset_type): Likewise.
13609 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13610 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13611 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13612 (byte_swap): Likewise.
13613 (MAYBE_SWAP): Likewise.
13614 (dwarf2_per_cu_ptr): Likewise.
13615 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13616 (struct tu_stats): Likewise.
13617 (struct dwarf2_per_objfile): Likewise.
13618 (struct dwarf2_per_cu_data): Likewise.
13619 (struct signatured_type): Likewise.
13620 (sig_type_ptr): Likewise.
13621 (DEF_VEC_P (sig_type_ptr)): Likewise.
13622 (INDEX4_SUFFIX): Likewise.
13623 (INDEX5_SUFFIX): Likewise.
13624 (DEBUG_STR_SUFFIX): Likewise.
13625 (dwarf2_read_section): Make non-static.
13626 (mapped_index_string_hash): Move from here.
13627 (dwarf5_djb_hash): Likewise.
13628 (file_write): Likewise.
13629 (class data_buf): Likewise.
13630 (struct symtab_index_entry): Likewise.
13631 (struct mapped_symtab): Likewise.
13632 (find_slot): Likewise.
13633 (hash_expand): Likewise.
13634 (add_index_entry): Likewise.
13635 (uniquify_cu_indices): Likewise.
13636 (class c_str_view): Likewise.
13637 (class c_str_view_hasher): Likewise.
13638 (class vector_hasher): Likewise.
13639 (write_hash_table): Likewise.
13640 (psym_index_map): Likewise.
13641 (struct addrmap_index_data): Likewise.
13642 (add_address_entry): Likewise.
13643 (add_address_entry_worker): Likewise.
13644 (write_address_map): Likewise.
13645 (symbol_kind): Likewise.
13646 (write_psymbols): Likewise.
13647 (struct signatured_type_index_data): Likewise.
13648 (write_one_signatured_type): Likewise.
13649 (recursively_count_psymbols): Likewise.
13650 (recursively_write_psymbols): Likewise.
13651 (class debug_names): Likewise.
13652 (check_dwarf64_offsets): Likewise.
13653 (psyms_seen_size): Likewise.
13654 (write_gdbindex): Likewise.
13655 (write_debug_names): Likewise.
13656 (assert_file_size): Likewise.
13657 (write_psymtabs_to_index): Likewise.
13658 (save_gdb_index_command): Likewise.
13659 (_initialize_dwarf2_read): Don't register the "save gdb-index"
13660 command.
13661 * dwarf2read.h: New file.
13662
13663 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13664
13665 PR gdb/22670
13666 * dwarf2read.c (dwarf2_physname): Do not return the demangled
13667 symbol name if the CU's language stores symbol names in linkage
13668 format.
13669 * language.h (struct language_defn)
13670 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
13671 all instances of this struct.
13672
13673 2018-03-26 Tom Tromey <tom@tromey.com>
13674
13675 * stack.c (backtrace_command_1): Remove verbose code.
13676
13677 2018-03-26 Tom Tromey <tom@tromey.com>
13678
13679 * python/py-framefilter.c (py_print_type): Don't catch
13680 exceptions. Return void.
13681 (py_print_value): Likewise.
13682 (py_print_single_arg): Likewise.
13683 (enumerate_args): Don't catch exceptions.
13684 (py_print_args): Likewise.
13685 (py_print_frame): Likewise.
13686 (gdbpy_apply_frame_filter): Catch exceptions here.
13687
13688 2018-03-26 Tom Tromey <tom@tromey.com>
13689
13690 * stack.c (_initialize_stack): Remove trailing newlines from help
13691 text. Add "Usage" line to "backtrace" help.
13692
13693 2018-03-26 Tom Tromey <tom@tromey.com>
13694
13695 PR python/16486:
13696 * python/py-framefilter.c (py_print_args): Call wrap_hint.
13697
13698 2018-03-26 Tom Tromey <tom@tromey.com>
13699
13700 * python/py-framefilter.c (py_print_single_arg): Return
13701 EXT_LANG_BT_ERROR from catch.
13702
13703 2018-03-26 Tom Tromey <tom@tromey.com>
13704
13705 PR backtrace/15584:
13706 * stack.c (backtrace_command_1): Move some code into no-filters
13707 "if".
13708
13709 2018-03-26 Tom Tromey <tom@tromey.com>
13710
13711 * python/py-framefilter.c (throw_quit_or_print_exception): New
13712 function.
13713 (gdbpy_apply_frame_filter): Use it.
13714
13715 2018-03-26 Tom Tromey <tom@tromey.com>
13716
13717 PR cli/17716:
13718 * python/py-framefilter.c (py_print_type, py_print_value)
13719 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13720 RETURN_MASK_ERROR.
13721
13722 2018-03-26 Tom Tromey <tom@tromey.com>
13723
13724 * python/py-framefilter.c (enumerate_args): Use
13725 gdb::unique_xmalloc_ptr.
13726
13727 2018-03-26 Tom Tromey <tom@tromey.com>
13728
13729 * python/py-framefilter.c (py_print_frame): Return
13730 EXT_LANG_BT_OK.
13731 (gdbpy_apply_frame_filter): Update comment.
13732 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13733 Remove.
13734 <EXT_LANG_BT_NO_FILTERS>: Change value.
13735
13736 2018-03-26 Tom Tromey <tom@tromey.com>
13737
13738 PR backtrace/15582:
13739 * stack.c (backtrace_command): Parse "hide" argument.
13740 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13741 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13742 constant.
13743
13744 2018-03-26 Tom Tromey <tom@tromey.com>
13745
13746 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13747 add "flags".
13748 (backtrace_command): Remove "fulltrace", add "flags".
13749
13750 2018-03-26 Tom Tromey <tom@tromey.com>
13751
13752 * stack.c (backtrace_command): Rewrite command line parsing.
13753
13754 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13755
13756 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13757
13758 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13759
13760 * filename-seen-cache.h: Add include guard.
13761
13762 2018-03-26 Keith Seitz <keiths@redhat.com>
13763
13764 * symfile.c (place_section): Remove "struct" from section_addr_info
13765 in comment.
13766 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13767 "struct" keyword from section_addr_info.
13768
13769 2018-03-26 Alan Hayward <alan.hayward@arm.com>
13770
13771 * regformats/regdef.h (reg): Add constructors.
13772
13773 2018-03-25 Pedro Alves <palves@redhat.com>
13774
13775 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13776 if then/else bodies in var_func_name extraction.
13777
13778 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
13779
13780 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13781 lookup_minimal_symbol() to find symbol entry.
13782 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13783
13784 2018-03-23 Keith Seitz <keiths@redhat.com>
13785
13786 PR c++/22968
13787 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13788 nested type definitions for C++, too.
13789
13790 2018-03-23 Tom Tromey <tom@tromey.com>
13791
13792 * machoread.c (struct oso_el): Add a constructor. Don't define as
13793 a typedef.
13794 (macho_register_oso): Remove.
13795 (macho_symtab_read): Take a std::vector.
13796 (oso_el_compare_name): Now a std::sort comparator.
13797 (macho_symfile_read_all_oso): Take a std::vector.
13798 (macho_symfile_read): Use std::vector. Remove cleanups.
13799
13800 2018-03-22 Tom Tromey <tom@tromey.com>
13801
13802 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13803 (record_full_goto_bookmark): Use std::string.
13804
13805 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13806
13807 PR tdep/18295
13808 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13809 a single mask.
13810
13811 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13812
13813 * rs6000-tdep.c (store_insn_p): New function.
13814 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13815 and cr_reg to their unshifted values. Use store_insn_p to
13816 match LR saves using either R1 or fdata->alloca_reg. Use
13817 store_insn_p to match CR saves. Set alloca_reg_offset
13818 when alloca_reg and framep are set. Remove lr_reg shift
13819 when assigning to fdata->lr_register.
13820
13821 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
13822
13823 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13824 command line args instead of emitting a warning.
13825
13826 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13827
13828 * tracepoint.h (struct static_tracepoint_marker): Initialize
13829 fields, define default constructor, move constructor and move
13830 assignment, disable the rest.
13831 <str_id, extra>: Make std::string.
13832 (release_static_tracepoint_marker): Remove.
13833 (free_current_marker): Remove.
13834 * tracepoint.c (free_current_marker): Remove.
13835 (parse_static_tracepoint_marker_definition): Adjust to
13836 std::string, use new hex2str overload.
13837 (release_static_tracepoint_marker): Remove.
13838 (print_one_static_tracepoint_marker): Get marker by reference
13839 and adjust to std::string.
13840 (info_static_tracepoint_markers_command): Adjust to std::vector
13841 changes
13842 * target.h (static_tracepoint_marker_p): Remove typedef.
13843 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13844 (struct target_ops) <to_static_tracepoint_marker_at>: Return
13845 bool.
13846 <to_static_tracepoint_markers_by_strid>: Return std::vector.
13847 * target-debug.h
13848 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13849 (target_debug_print_std_vector_static_tracepoint_marker): New.
13850 (target_debug_print_struct_static_tracepoint_marker_p): Rename
13851 to...
13852 (target_debug_print_static_tracepoint_marker_p): ... this.
13853 * target-delegates.c: Re-generate.
13854 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13855 Make std::string.
13856 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13857 (decode_static_tracepoint_spec): Adjust to std::vector.
13858 (tracepoint_print_one_detail): Adjust to std::string.
13859 (strace_marker_decode_location): Adjust to std::string.
13860 (update_static_tracepoint): Adjust to std::string, remove call
13861 to release_static_tracepoint_marker.
13862 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13863 Adjust to std::vector.
13864 * remote.c (remote_static_tracepoint_marker_at): Return bool.
13865 (remote_static_tracepoint_markers_by_strid): Adjust to
13866 std::vector.
13867 * common/rsp-low.h (hex2str): New overload with explicit count
13868 of bytes.
13869 * common/rsp-low.c (hex2str): New overload with explicit count
13870 of bytes.
13871 * unittests/rsp-low-selftests.c (test_hex2str): New function.
13872 (_initialize_rsp_low_selftests): Add test_hex2str test.
13873 * unittests/tracepoint-selftests.c
13874 (test_parse_static_tracepoint_marker_definition): Adjust to
13875 std::string.
13876
13877 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13878
13879 * tracepoint.c (parse_static_tracepoint_marker_definition):
13880 Consider case where the definition is followed by more
13881 definitions.
13882 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13883 tracepoint-selftests.c.
13884 * unittests/tracepoint-selftests.c: New.
13885
13886 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13887
13888 * MAINTAINERS (Write After Approval): Add Pedro Franco de
13889 Carvalho.
13890
13891 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13892
13893 * symtab.c (find_pc_sect_line): fixed indentation.
13894
13895 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13896
13897 * symtab.c (find_pc_sect_line): now uses binary search.
13898
13899 2018-03-19 Tom Tromey <tom@tromey.com>
13900
13901 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13902 "IDENT" production.
13903
13904 2018-03-19 Pedro Alves <palves@redhat.com>
13905 Tom Tromey <tom@tromey.com>
13906
13907 * unittests/observable-selftests.c: New file.
13908 * common/observable.h: New file.
13909 * observable.h: New file.
13910 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13911 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13912 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13913 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13914 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13915 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13916 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13917 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13918 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13919 python/py-breakpoint.c, python/py-finishbreakpoint.c,
13920 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13921 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13922 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13923 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13924 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13925 tui/tui-interp.c, valops.c: Update all users.
13926 * tui/tui-hooks.c (tui_bp_created_observer)
13927 (tui_bp_deleted_observer, tui_bp_modified_observer)
13928 (tui_inferior_exit_observer, tui_before_prompt_observer)
13929 (tui_normal_stop_observer, tui_register_changed_observer):
13930 Remove.
13931 (tui_observers_token): New global.
13932 (attach_or_detach, tui_attach_detach_observers): New functions.
13933 (tui_install_hooks, tui_remove_hooks): Use
13934 tui_attach_detach_observers.
13935 * record-btrace.c (record_btrace_thread_observer): Remove.
13936 (record_btrace_thread_observer_token): New global.
13937 * observer.sh: Remove.
13938 * observer.c: Rename to observable.c.
13939 * observable.c (namespace gdb_observers): Define new objects.
13940 (observer_debug): Move into gdb_observers namespace.
13941 (struct observer, struct observer_list, xalloc_observer_list_node)
13942 (xfree_observer_list_node, generic_observer_attach)
13943 (generic_observer_detach, generic_observer_notify): Remove.
13944 (_initialize_observer): Update.
13945 Don't include observer.inc.
13946 * Makefile.in (generated_files): Remove observer.h, observer.inc.
13947 (clean mostlyclean): Likewise.
13948 (observer.h, observer.inc): Remove targets.
13949 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13950 (COMMON_SFILES): Use observable.c, not observer.c.
13951 * .gitignore: Remove observer.h.
13952
13953 2018-03-18 Tom Tromey <tom@tromey.com>
13954
13955 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13956 gdb::def_vector.
13957 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13958
13959 2018-03-17 Tom Tromey <tom@tromey.com>
13960
13961 * auto-load.c (auto_load_objfile_script_1): Use std::string.
13962
13963 2018-03-17 Tom Tromey <tom@tromey.com>
13964
13965 * target.c (class scoped_target_fd): New.
13966 (target_fileio_close_cleanup): Remove.
13967 (target_fileio_read_alloc_1): Use scoped_target_fd.
13968
13969 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
13970
13971 * silent-rules.mk: New.
13972 * Makefile.in: Include silent-rules.mk
13973 (srcdir, VPATH, top_srcdir): Move up.
13974 (COMPILE): Add ECHO_CXX.
13975 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13976 (init.c): Add ECHO_INIT_C.
13977 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13978 (version.c): Add ECHO_GEN.
13979 (printcmd.o): Add ECHO_CXX.
13980 (target-float.o): Add ECHO_CXX.
13981 (ada-exp.o): Add ECHO_CXX.
13982 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13983 (insight$(EXEEXT)): Add ECHO_CXXLD.
13984 * gnulib/configure.ac: Add AM_SILENT_RULES.
13985 * gnulib/aclocal.m4: Re-generate.
13986 * gnulib/configure: Re-generate.
13987 * gnulib/import/Makefile.in: Re-generate.
13988
13989 2018-03-16 Tom Tromey <tom@tromey.com>
13990
13991 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13992 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13993 * utils.c (do_free_section_addr_info)
13994 (make_cleanup_free_section_addr_info): Remove.
13995 * symfile.h (struct other_sections): Add constructor.
13996 (struct section_addr_info): Remove.
13997 (section_addr_info): New typedef.
13998 (struct sym_fns) <sym_offsets>: Change type of parameter.
13999 (build_section_addr_info_from_objfile)
14000 (relative_addr_info_to_section_offsets, addr_info_make_relative)
14001 (default_symfile_offsets, symbol_file_add)
14002 (symbol_file_add_from_bfd)
14003 (build_section_addr_info_from_section_table): Update.
14004 (alloc_section_addr_info, free_section_addr_info): Don't declare.
14005 * symfile.c (alloc_section_addr_info): Remove.
14006 (build_section_addr_info_from_section_table): Change return type.
14007 Update.
14008 (build_section_addr_info_from_bfd)
14009 (build_section_addr_info_from_objfile): Likewise.
14010 (free_section_addr_info): Remove.
14011 (relative_addr_info_to_section_offsets): Change type of "addrs".
14012 (addrs_section_compar): Now a std::sort comparator.
14013 (addrs_section_sort): Change return type.
14014 (addr_info_make_relative): Change type of "addrs". Update.
14015 (default_symfile_offsets, syms_from_objfile_1)
14016 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
14017 (symbol_file_add_separate): Update.
14018 (symbol_file_add): Change type of "addrs". Update.
14019 (add_symbol_file_command): Update. Remove cleanups.
14020 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
14021 cleanups.
14022 * symfile-debug.c (debug_sym_offsets): Change type of "info".
14023 * solib.c (solib_read_symbols): Update.
14024 * objfiles.c (objfile_relocate): Update. Remove cleanups.
14025 * machoread.c (macho_symfile_offsets): Update.
14026 * jit.c (jit_bfd_try_read_symtab): Update.
14027
14028 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
14029
14030 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14031 unittests/utils-selftests.c.
14032 * unittests/utils-selftests.c: New file.
14033
14034 2018-03-14 Tom Tromey <tom@tromey.com>
14035
14036 PR cli/14977:
14037 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
14038 for NULL.
14039
14040 2018-03-14 Tom Tromey <tom@tromey.com>
14041
14042 PR cli/19918:
14043 * printcmd.c (printf_pointer): Allow "-" in format.
14044
14045 2018-03-14 Tom Tromey <tom@tromey.com>
14046
14047 * printcmd.c (_initialize_printcmd): Add usage to printf.
14048
14049 2018-03-14 Yao Qi <qiyao@sourceware.org>
14050
14051 * MAINTAINERS: Update my email address.
14052
14053 2018-03-13 Tom Tromey <tom@tromey.com>
14054
14055 * machoread.c (macho_check_dsym): Change filenamep to a
14056 std::string*.
14057 (macho_symfile_read): Update.
14058 * symfile.c (load_command): Use std::string.
14059
14060 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
14061
14062 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14063 to error message string.
14064 (riscv_register_name): Use xsnprintf instead of sprintf.
14065 (riscv_insn::fetch_instruction): Use gdb_assert instead of
14066 internal_error.
14067 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14068 error.
14069 (riscv_push_dummy_call): Likewise.
14070
14071 2018-03-12 Tom Tromey <tom@tromey.com>
14072
14073 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14074 Use gdb::byte_vector.
14075 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14076
14077 2018-03-12 Yao Qi <yao.qi@linaro.org>
14078
14079 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14080 parameter type to readable_regcache.
14081 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14082 the declaration.
14083
14084 2018-03-11 Tom Tromey <tom@tromey.com>
14085
14086 * dwarf2read.c (struct nextfield): Add initializers.
14087 (struct nextfnfield): Remove.
14088 (struct fnfieldlist): Add initializers. Remove "length" and
14089 "head", use std::vector.
14090 (struct decl_field_list): Remove.
14091 (struct field_info): Add initializers.
14092 <fields, baseclasses>: Now std::vector.
14093 <nbaseclasses, nfnfields, typedef_field_list_count,
14094 nested_types_list_count>: Remove.
14095 (dwarf2_add_field, dwarf2_add_type_defn)
14096 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14097 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14098 (process_structure_scope): Update.
14099
14100 2018-03-11 Tom Tromey <tom@tromey.com>
14101
14102 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14103 for use by std::sort.
14104 (build_type_psymtabs_1): Use std::vector.
14105
14106 2018-03-09 Eli Zaretskii <eliz@gnu.org>
14107
14108 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14109 and LIBMPFR in the printed configuration.
14110
14111 2018-03-08 Tom Tromey <tom@tromey.com>
14112
14113 * source.c (get_filename_and_charpos): Use scoped_fd.
14114 * nto-procfs.c (procfs_open_1): Use scoped_fd.
14115 (procfs_pidlist): Likewise.
14116 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14117 (iterate_over_mappings): Likewise.
14118
14119 2018-03-08 Tom Tromey <tom@tromey.com>
14120
14121 * infcall.c (struct call_return_meta_info)
14122 <stack_temporaries_enabled>: Remove.
14123 (get_call_return_value, call_function_by_hand_dummy): Update.
14124 * thread.c (disable_thread_stack_temporaries): Remove.
14125 (enable_thread_stack_temporaries): Remove.
14126 (thread_stack_temporaries_enabled_p): Return bool.
14127 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14128 (get_last_thread_stack_temporary): Update.
14129 * eval.c (evaluate_subexp): Update.
14130 * gdbthread.h (class enable_thread_stack_temporaries): Now a
14131 class, not a function.
14132 (value_ptr, value_vec): Remove typedefs.
14133 (class thread_info) <stack_temporaries_enabled>: Now bool.
14134 <stack_temporaries>: Now a std::vector.
14135 (thread_stack_temporaries_enabled_p)
14136 (value_in_thread_stack_temporaries): Return bool.
14137
14138 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
14139
14140 * remote.c (putpkt_binary): Fix omitted bytes reporting.
14141 (getpkt_or_notif_sane_1): Likewise.
14142
14143 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14144
14145 * build-id.c (build_id_to_debug_bfd): Use std::string.
14146
14147 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14148
14149 * build-id.c (find_separate_debug_file_by_buildid): Return
14150 std::string.
14151 * build-id.h (find_separate_debug_file_by_buildid): Return
14152 std::string.
14153 * coffread.c (coff_symfile_read): Adjust to std::string.
14154 * elfread.c (elf_symfile_read): Adjust to std::string.
14155 * symfile.c (separate_debug_file_exists): Change parameter to
14156 std::string.
14157 (find_separate_debug_file): Return std::string.
14158 (find_separate_debug_file_by_debuglink): Return std::string.
14159 * symfile.h (find_separate_debug_file_by_debuglink): Return
14160 std::string.
14161
14162 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14163
14164 * common/xml-utils.c (xml_escape_text): Move code to...
14165 (xml_escape_text_append): ... this new function.
14166 * common/xml-utils.h (xml_escape_text_append): New declaration.
14167 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14168 New function.
14169 (_initialize_xml_utils): register test_xml_escape_text_append as
14170 a selftest.
14171
14172 2018-03-07 Alan Hayward <alan.hayward@arm.com>
14173
14174 * defs.h: Remove MAX_REGISTER_SIZE.
14175 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14176 asserts.
14177 * python/py-unwind.c (pyuw_sniffer): Likewise.
14178
14179 2018-03-07 Tom Tromey <tom@tromey.com>
14180
14181 * linux-tdep.c (linux_info_proc): Update.
14182 * target.h (struct target_ops) <to_fileio_readlink>: Return
14183 optional<string>.
14184 (target_fileio_readlink): Return optional<string>.
14185 * remote.c (remote_hostio_readlink): Return optional<string>.
14186 * inf-child.c (inf_child_fileio_readlink): Return
14187 optional<string>.
14188 * target.c (target_fileio_readlink): Return optional<string>.
14189
14190 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
14191
14192 * regcache.c (cooked_read_test): Add riscv to the list of
14193 architectures that have a save_reggroup.
14194
14195 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
14196
14197 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14198 value is not a dynamic class object.
14199
14200 2018-03-06 Tom Tromey <tom@tromey.com>
14201
14202 * rust-exp.y: Formatting fixes.
14203
14204 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14205
14206 * riscv-tdep.c (riscv_register_name): Remove target description
14207 support.
14208 (riscv_gdbarch_init): Remove target description check.
14209
14210 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14211
14212 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14213 comment.
14214 * riscv-tdep.h: Likewise.
14215
14216 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14217
14218 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14219 (riscv_pseudo_register_write): Delete.
14220 (riscv_gdbarch_init): Remove all use of pseudo registers.
14221
14222 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14223
14224 * record-btrace.c (btrace_print_lines): Replace cleanup
14225 parameter with RAII equivalents.
14226 (btrace_insn_history): Replace cleanup with RAII equivalents.
14227 * ui-out.h (make_cleanup_ui_out_list_begin_end,
14228 make_cleanup_ui_out_tuple_begin_end): Remove.
14229 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14230 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14231 make_cleanup_ui_out_list_begin_end): Remove.
14232
14233 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14234
14235 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14236 parameter types to std::vector. Use bool.
14237 (record_btrace_wait): Replace VEC(tp_t) with
14238 std::vector<thread_info *>.
14239 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14240
14241 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14242
14243 * record-btrace.c (record_btrace_disable_callback): Remove.
14244 (struct scoped_btrace_disable): New.
14245 (record_btrace_open): Use scoped_btrace_disable.
14246
14247 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14248
14249 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14250 reading values from registers.
14251
14252 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14253
14254 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14255 where appropriate.
14256
14257 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14258
14259 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14260 change parameter type. Use GDB's print functions, and use
14261 core_addr_to_string where appropriate.
14262 (riscv_push_dummy_call): Use core_addr_to_string where
14263 appropriate, update call to riscv_print_arg_location, and reindent
14264 a few lines.
14265 (riscv_return_value): Update call to riscv_print_arg_location.
14266
14267 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14268 Tim Newsome <tim@sifive.com>
14269 Albert Ou <a0u@eecs.berkeley.edu>
14270 Darius Rad <darius@bluespec.com>
14271
14272 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14273 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14274 (ALLDEPFILES): Add riscv-tdep.c
14275 * configure.tgt: Add riscv support.
14276 * riscv-tdep.c: New file.
14277 * riscv-tdep.h: New file.
14278 * NEWS: Mention new target.
14279 * MAINTAINERS: Add entry for riscv.
14280
14281 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14282
14283 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14284 fields within aggregates.
14285
14286 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
14287
14288 * record-btrace.c (btrace_print_lines): Change type of flags to
14289 gdb_disassembly_flags.
14290
14291 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14292
14293 * fbsd-nat.c: Include "inf-ptrace.h".
14294 (USE_SIGTRAP_SIGINFO): Conditionally define.
14295 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14296 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14297 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14298 function.
14299 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14300 Likewise.
14301 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14302 Likewise.
14303 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14304 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14305 "supports_stopped_by_hw_breakpoint" target methods.
14306
14307 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14308
14309 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14310 * fbsd-nat.c (debug_fbsd_nat): New variable.
14311 (show_fbsd_nat_debug): New function.
14312 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14313 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14314
14315 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14316
14317 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14318 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14319 prototype.
14320 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14321 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14322 method.
14323
14324 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14325
14326 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14327 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14328
14329 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14330
14331 * charset.c (struct charset_vector): New.
14332 (charsets): Change type to charset_vector.
14333 (find_charset_names): Adjust.
14334 (add_one): Adjust.
14335 (_initialize_charset): Adjust.
14336
14337 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14338
14339 * progspace.h (struct program_space) <deleted_solibs>: Change
14340 type to std::vector<std::string>.
14341 * progspace.c (clear_program_space_solib_cache): Adjust.
14342 * breakpoint.c (print_solib_event): Adjust.
14343 (check_status_catch_solib): Adjust.
14344 * solib.c (update_solib_list): Adjust.
14345 * ui-out.h (class ui_out) <field_string>: New overload.
14346 * ui-out.c (ui_out::field_string): New overload.
14347
14348 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14349
14350 * progspace.h (struct program_space): Add constructor and
14351 destructor, initialize fields.
14352 (add_program_space): Remove.
14353 * progspace.c (add_program_space): Rename to...
14354 (program_space::program_space): ... this.
14355 (release_program_space): Rename to...
14356 (program_space::~program_space): ... this.
14357 (delete_program_space): Use delete to delete program_space.
14358 (initialize_progspace): Use new to allocate program_space.
14359 * inferior.c (add_inferior_with_spaces): Likewise.
14360 (clone_inferior_command): Likewise.
14361 * infrun.c (follow_fork_inferior): Likewise.
14362 (handle_vfork_child_exec_or_exit): Likewise.
14363
14364 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14365
14366 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14367 (delim_string_to_char_ptr_vec): Return std::vector of
14368 gdb::unique_xmalloc_ptr.
14369 (dirnames_to_char_ptr_vec_append): Take std::vector of
14370 gdb::unique_xmalloc_ptr.
14371 (dirnames_to_char_ptr_vec): Return std::vector of
14372 gdb::unique_xmalloc_ptr.
14373 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14374 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14375 (delim_string_to_char_ptr_vec): Return an std::vector of
14376 gdb::unique_xmalloc_ptr, adjust the code.
14377 (dirnames_to_char_ptr_vec_append): Take an std::vector of
14378 gdb::unique_xmalloc_ptr, adjust the code.
14379 (dirnames_to_char_ptr_vec): Return an std::vector of
14380 gdb::unique_xmalloc_ptr, adjust the code.
14381 * auto-load.c (auto_load_safe_path_vec): Change type to
14382 std::vector of gdb::unique_xmalloc_ptr.
14383 (auto_load_expand_dir_vars): Return an std::vector of
14384 gdb::unique_xmalloc_ptr, adjust the code.
14385 (auto_load_safe_path_vec_update): Adjust.
14386 (filename_is_in_auto_load_safe_path_vec): Adjust.
14387 (auto_load_objfile_script_1): Adjust.
14388 * build-id.c (build_id_to_debug_bfd): Adjust.
14389 * linux-thread-db.c (thread_db_load_search): Adjust.
14390 * source.c (add_path): Adjust.
14391 (openp): Adjust.
14392 * symfile.c (find_separate_debug_file): Adjust.
14393 * utils.c (do_free_char_ptr_vec): Remove.
14394 (make_cleanup_free_char_ptr_vec): Remove.
14395
14396 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
14397
14398 PR gdb/22907
14399 * common/pathstuff.c: Conditionally include "<windows.h>".
14400
14401 2018-03-01 Georg Sauthoff <mail@georg.so>
14402
14403 PR gdb/22888
14404 * gcore.in: Quote variables and switch interpreter to bash.
14405
14406 2018-03-01 Tom Tromey <tom@tromey.com>
14407
14408 * dwarf2read.c (alloc_discriminant_info): Fix default_index
14409 assertion. Add assertion for discriminant_index.
14410 (quirk_rust_enum): Use correct base type name in univariant case.
14411
14412 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
14413
14414 * record.c (get_call_history_modifiers): Return a
14415 record_print_flags.
14416 (cmd_record_call_history): Adjust.
14417 * record-btrace.c (record_btrace_call_history): Adjust.
14418 (record_btrace_call_history_range): Adjust.
14419 (record_btrace_call_history_from): Adjust.
14420 * target-debug.h (target_debug_print_record_print_flags): New.
14421 * target-delegates.c: Re-generate.
14422 * target.c (target_call_history): Change flags type.
14423 (target_call_history_from): Likewise.
14424 (target_call_history_range): Likewise.
14425 * target.h (struct target_ops) <target_call_history>: Likewise.
14426 (target_call_history_from): Likewise.
14427 (target_call_history_range): Likewise.
14428
14429 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14430 Simon Marchi <simon.marchi@polymtl.ca>
14431
14432 * common/common-utils.c: Include "sys/stat.h".
14433 (is_regular_file): Move here from "source.c"; change return
14434 type to "bool".
14435 * common/common-utils.h (is_regular_file): New prototype.
14436 * common/pathstuff.c (contains_dir_separator): New function.
14437 * common/pathstuff.h (contains_dir_separator): New prototype.
14438 * source.c: Don't include "sys/stat.h".
14439 (is_regular_file): Move to "common/common-utils.c".
14440
14441 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14442
14443 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14444 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14445 * auto-load.c: Include "common/pathstuff.h".
14446 * common/common-def.h (current_directory): Move here.
14447 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14448 function.
14449 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14450 prototype.
14451 * common/pathstuff.c: New file.
14452 * common/pathstuff.h: New file.
14453 * compile/compile.c: Include "common/pathstuff.h".
14454 * defs.h (current_directory): Move to "common/common-defs.h".
14455 * dwarf2read.c: Include "common/pathstuff.h".
14456 * exec.c: Likewise.
14457 * guile/scm-safe-call.c: Likewise.
14458 * linux-thread-db.c: Likewise.
14459 * main.c: Likewise.
14460 * nto-tdep.c: Likewise.
14461 * objfiles.c: Likewise.
14462 * source.c: Likewise.
14463 * symtab.c: Likewise.
14464 * utils.c: Include "common/pathstuff.h".
14465 (gdb_realpath): Move to "common/pathstuff.c".
14466 (gdb_realpath_keepfile): Likewise.
14467 (gdb_abspath): Likewise.
14468 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14469 (gdb_realpath_keepfile): Likewise.
14470 (gdb_abspath): Likewise.
14471
14472 2018-02-28 John Baldwin <jhb@FreeBSD.org>
14473
14474 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14475 wildcard process pid for super_resume for kernels with a
14476 specific bug.
14477
14478 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
14479
14480 * compile/compile.c (get_args): Add additional comments
14481 explaining function.
14482
14483 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
14484 Tom Tromey <tom@tromey.com>
14485
14486 * target.h (memory_write_request_s): Remove typedef. Don't define
14487 VEC.
14488 (target_write_memory_blocks): Change argument to std::vector.
14489 (struct memory_write_request): Add constructor.
14490 * target-memory.c (compare_block_starting_address): Return bool.
14491 Change argument types.
14492 (claim_memory): Change arguments to use std::vector.
14493 (split_regular_and_flash_blocks, blocks_to_erase)
14494 (compute_garbled_blocks): Likewise.
14495 (cleanup_request_data, cleanup_write_requests_vector): Remove.
14496 (target_write_memory_blocks): Change argument to std::vector.
14497 * symfile.c (struct load_section_data): Add constructor and
14498 destructor. Use std::vector for "requests".
14499 (struct load_progress_data): Add initializers.
14500 (load_section_callback): Update. Use "new".
14501 (clear_memory_write_data): Remove.
14502 (generic_load): Update.
14503
14504 2018-02-27 Alan Hayward <alan.hayward@arm.com>
14505
14506 * arch/aarch64.h: Use common/tdesc.h.
14507
14508 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14509
14510 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14511 architecture with a 64-bit ABI.
14512
14513 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14514
14515 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14516 ahead of target description loading.
14517
14518 2018-02-26 Tom Tromey <tom@tromey.com>
14519
14520 * stack.c (backtrace_command_1): Update.
14521 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14522 of "flags".
14523 * python/py-framefilter.c (py_print_frame)
14524 (gdbpy_apply_frame_filter): Change type of "flags".
14525 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14526 of "flags".
14527 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14528 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14529 * extension.h (enum frame_filter_flag): Rename from
14530 frame_filter_flags.
14531 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14532 (apply_ext_lang_frame_filter): Change type of "flags".
14533 * extension.c (apply_ext_lang_frame_filter): Change type of
14534 "flags".
14535 * extension-priv.h (struct extension_language_ops)
14536 <apply_frame_filter>: Change type of "flags".
14537
14538 2018-02-26 Tom Tromey <tom@tromey.com>
14539
14540 PR python/16497:
14541 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
14542 off-by-one in py_end computation.
14543 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14544 PRINT_MORE_FRAMES.
14545 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14546 constant.
14547
14548 2018-02-26 Tom Tromey <tom@tromey.com>
14549
14550 * dwarf2read.c (struct variant_field): New.
14551 (struct nextfield) <variant>: New field.
14552 (dwarf2_add_field): Handle DW_TAG_variant_part.
14553 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14554 discriminated union.
14555 (read_structure_type): Handle DW_TAG_variant_part.
14556 (handle_struct_member_die): New function, extracted from
14557 process_structure_scope. Handle DW_TAG_variant.
14558 (process_structure_scope): Handle discriminated unions. Call
14559 handle_struct_member_die.
14560
14561 2018-02-26 Tom Tromey <tom@tromey.com>
14562
14563 * rust-lang.h (rust_last_path_segment): Declare.
14564 * rust-lang.c (rust_last_path_segment): Now public. Change
14565 contract.
14566 (struct disr_info): Remove.
14567 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14568 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14569 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14570 (rust_enum_p, rust_enum_variant): New function.
14571 (rust_underscore_fields): Remove "offset" parameter.
14572 (rust_print_enum): New function.
14573 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14574 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14575 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
14576 enums.
14577 (rust_internal_print_type): New function, from rust_print_type.
14578 Remove enum code.
14579 (rust_print_type): Call rust_internal_print_type.
14580 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14581 Update enum handling.
14582 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14583 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14584 (rust_union_quirks): New functions.
14585 (process_full_comp_unit, process_full_type_unit): Call
14586 rust_union_quirks.
14587 (process_structure_scope): Update rust_unions if necessary.
14588
14589 2018-02-26 Tom Tromey <tom@tromey.com>
14590
14591 * value.h (value_union_variant): Declare.
14592 * valops.c (value_union_variant): New function.
14593 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14594 (struct discriminant_info): New.
14595 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14596 enumerator.
14597 (struct main_type) <flag_discriminated_union>: New field.
14598
14599 2018-02-26 Tom Tromey <tom@tromey.com>
14600
14601 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14602 unittests/unpack-selftests.c.
14603 * unittests/unpack-selftests.c: New file.
14604 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14605
14606 2018-02-26 Yao Qi <yao.qi@linaro.org>
14607
14608 * dwarf2read.c (struct partial_die_info) <read>: New method.
14609 (read_partial_die): Remove the declaration.
14610 (load_partial_dies): Update.
14611 (partial_die_info::partial_die_info):
14612 (read_partial_die): Change it to partial_die_info::read.
14613
14614 2018-02-26 Yao Qi <yao.qi@linaro.org>
14615
14616 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14617 (fixup_partial_die): Remove declaration.
14618 (scan_partial_symbols): Update.
14619 (partial_die_parent_scope): Likewise.
14620 (partial_die_full_name): Likewise.
14621 (fixup_partial_die): Change it to partial_die_info::fixup.
14622
14623 2018-02-26 Yao Qi <yao.qi@linaro.org>
14624
14625 * dwarf2read.c (read_partial_die): Update the declaration.
14626 (load_partial_dies): Caller update.
14627 (read_partial_die): Remove one argument abbrev_len.
14628
14629 2018-02-26 Yao Qi <yao.qi@linaro.org>
14630
14631 * dwarf2read.c (struct partial_die_info): Add ctor, delete
14632 assignment operator.
14633 (load_partial_dies): Use ctor and copy ctor.
14634 (read_partial_die): Update.
14635 (dwarf2_cu::find_partial_die): Use ctor.
14636
14637 2018-02-26 Yao Qi <yao.qi@linaro.org>
14638
14639 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14640 (find_partial_die_in_comp_unit): Change it to
14641 dwarf2_cu::find_partial_die.
14642 (find_partial_die): Update.
14643
14644 2018-02-26 Yao Qi <yao.qi@linaro.org>
14645
14646 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14647 is NULL.
14648
14649 2018-02-26 Yao Qi <yao.qi@linaro.org>
14650
14651 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14652
14653 2018-02-26 Alan Hayward <alan.hayward@arm.com>
14654
14655 * arch/amd64.h: Use common/tdesc.h.
14656 * arch/i386.c: Likewise.
14657 * arch/i386.h: Likewise.
14658 * arch/tic6x.c: Likewise.
14659 * arch/tdesc.h: Move file from here...
14660 * common/tdesc.h: ...to here.
14661 * features/aarch64-core.c: Regenerate.
14662 * features/aarch64-fpu.c: Regenerate.
14663 * features/i386/32bit-avx.c: Regenerate.
14664 * features/i386/32bit-avx512.c: Regenerate.
14665 * features/i386/32bit-core.c: Regenerate.
14666 * features/i386/32bit-linux.c: Regenerate.
14667 * features/i386/32bit-mpx.c: Regenerate.
14668 * features/i386/32bit-pkeys.c: Regenerate.
14669 * features/i386/32bit-sse.c: Regenerate.
14670 * features/i386/64bit-avx.c: Regenerate.
14671 * features/i386/64bit-avx512.c: Regenerate.
14672 * features/i386/64bit-core.c: Regenerate.
14673 * features/i386/64bit-linux.c: Regenerate.
14674 * features/i386/64bit-mpx.c: Regenerate.
14675 * features/i386/64bit-pkeys.c: Regenerate.
14676 * features/i386/64bit-segments.c: Regenerate.
14677 * features/i386/64bit-sse.c: Regenerate.
14678 * features/i386/x32-core.c: Regenerate.
14679 * features/tic6x-c6xp.c: Regenerate.
14680 * features/tic6x-core.c: Regenerate.
14681 * features/tic6x-gp.c: Regenerate.
14682 * target-descriptions.c: Use common/tdesc.h.
14683 * target-descriptions.h: Likewise.
14684
14685 2018-02-24 Tom Tromey <tom@tromey.com>
14686
14687 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14688 (try_thread_db_load_from_dir, thread_db_load_search): Use
14689 std::string.
14690 (info_auto_load_libthread_db_compare): Return bool. Change
14691 argument types.
14692 (info_auto_load_libthread_db): Use std::vector, std::string.
14693 Remove cleanups.
14694
14695 2018-02-24 Tom Tromey <tom@tromey.com>
14696
14697 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14698 std::string.
14699 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14700 std::string*.
14701 * gdbarch.c: Rebuild.
14702 * gdbarch.h: Rebuild.
14703 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14704 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14705 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14706 std::string*.
14707
14708 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
14709
14710 * gdbtypes.h (sect_offset): Change type to uint64_t.
14711 (sect_offset_str): New function.
14712 * dwarf2read.c (create_addrmap_from_aranges): Use
14713 sect_offset_str.
14714 (error_check_comp_unit_head): Likewise.
14715 (create_debug_type_hash_table): Likewise.
14716 (read_cutu_die_from_dwo): Likewise.
14717 (init_cutu_and_read_dies): Likewise.
14718 (init_cutu_and_read_dies_no_follow): Likewise.
14719 (process_psymtab_comp_unit_reader): Likewise.
14720 (partial_die_parent_scope): Likewise.
14721 (peek_die_abbrev): Likewise.
14722 (process_queue): Likewise.
14723 (dwarf2_physname): Likewise.
14724 (read_namespace_alias): Likewise.
14725 (read_import_statement): Likewise.
14726 (create_dwo_cu_reader): Likewise.
14727 (create_cus_hash_table): Likewise.
14728 (lookup_dwo_cutu): Likewise.
14729 (inherit_abstract_dies): Likewise.
14730 (read_func_scope): Likewise.
14731 (read_call_site_scope): Likewise.
14732 (dwarf2_add_member_fn): Likewise.
14733 (read_common_block): Likewise.
14734 (read_module_type): Likewise.
14735 (read_typedef): Likewise.
14736 (read_subrange_type): Likewise.
14737 (load_partial_dies): Likewise.
14738 (read_partial_die): Likewise.
14739 (find_partial_die): Likewise.
14740 (read_str_index): Likewise.
14741 (dwarf2_string_attr): Likewise.
14742 (build_error_marker_type): Likewise.
14743 (lookup_die_type): Likewise.
14744 (dump_die_shallow): Likewise.
14745 (follow_die_ref): Likewise.
14746 (dwarf2_fetch_die_loc_sect_off): Likewise.
14747 (dwarf2_fetch_constant_bytes): Likewise.
14748 (follow_die_sig): Likewise.
14749 (get_signatured_type): Likewise.
14750 (get_DW_AT_signature_type): Likewise.
14751 (dwarf2_find_containing_comp_unit): Likewise.
14752 (set_die_type): Likewise.
14753
14754 2018-02-21 John Baldwin <jhb@FreeBSD.org>
14755
14756 * arch/aarch64.c: Include "common-defs.h".
14757 * arch/amd64.c: Likewise.
14758 * arch/i386.c: Likewise.
14759
14760 2018-02-21 Tom Tromey <tom@tromey.com>
14761
14762 * value.h: (extract_field_op): Update.
14763 * eval.c (extract_field_op): Return a const char *.
14764 * expression.h (parse_expression_for_completion): Update.
14765 * completer.c (complete_expression): Update.
14766 (add_struct_fields): Make fieldname const.
14767 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14768 (mark_completion_tag, parse_exp_in_context_1): Update.
14769 (parse_expression_for_completion): Change "name" to
14770 unique_xmalloc_ptr*.
14771
14772 2018-02-21 Tom Tromey <tom@tromey.com>
14773
14774 * infcall.c (call_function_by_hand_dummy): Use std::vector.
14775
14776 2018-02-21 Yao Qi <yao.qi@linaro.org>
14777
14778 * avr-tdep.c (avr_read_pc): Change parameter type to
14779 readable_regcache.
14780 * gdbarch.sh (read_pc): Likewise.
14781 * gdbarch.c: Re-generated.
14782 * gdbarch.h: Re-generated.
14783 * hppa-tdep.c (hppa_read_pc): Change parameter type to
14784 readable_regcache.
14785 * ia64-tdep.c (ia64_read_pc): Likewise.
14786 * mips-tdep.c (mips_read_pc): Likewise.
14787 * spu-tdep.c (spu_read_pc): Likewise.
14788
14789 2018-02-21 Yao Qi <yao.qi@linaro.org>
14790
14791 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14792 * regcache-dump.c: New file.
14793 * regcache.c: Move register_dump to regcache-dump.c.
14794 (maintenance_print_registers): Likewise.
14795 (maintenance_print_raw_registers): Likewise.
14796 (maintenance_print_cooked_registers): Likewise.
14797 (maintenance_print_register_groups): Likewise.
14798 (maintenance_print_remote_registers): Likewise.
14799 (_initialize_regcache): Likewise.
14800 * regcache.h (register_dump): Moved from regcache.c.
14801
14802 2018-02-21 Yao Qi <yao.qi@linaro.org>
14803
14804 * regcache.c (regcache::regcache): Update.
14805 (regcache::invalidate): Move it to detached_regcache::invalidate.
14806 (get_thread_arch_aspace_regcache): Update.
14807 (regcache::raw_update): Update.
14808 (regcache::cooked_read): Remove some code.
14809 (regcache::cooked_read_value): Likewise.
14810 (regcache::raw_write): Remove assert on m_readonly_p.
14811 (regcache::raw_supply_integer): Move it to
14812 detached_regcache::raw_supply_integer.
14813 (regcache::raw_supply_zeroed): Likewise.
14814 * regcache.h (detached_regcache) <raw_supply_integer>: New
14815 declaration.
14816 <raw_supply_zeroed, invalidate>: Likewise.
14817 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14818 <invalidate>: Likewise.
14819 <m_readonly_p>: Removed.
14820
14821 2018-02-21 Yao Qi <yao.qi@linaro.org>
14822
14823 * infcmd.c (get_return_value): Let stop_regs point to
14824 get_current_regcache.
14825 * regcache.c (regcache::regcache): Remove.
14826 (register_dump_reg_buffer): New class.
14827 (regcache_print): Adjust.
14828 * regcache.h (regcache): Remove constructors.
14829
14830 2018-02-21 Yao Qi <yao.qi@linaro.org>
14831
14832 * regcache.c (class register_dump): New class.
14833 (register_dump_regcache, register_dump_none): New class.
14834 (register_dump_remote, register_dump_groups): New class.
14835 (regcache_print): Update.
14836 * regcache.h (regcache_dump_what): Move it to regcache.c.
14837 (regcache) <dump>: Remove.
14838
14839 2018-02-21 Yao Qi <yao.qi@linaro.org>
14840
14841 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14842 reg_buffer_rw *.
14843 (jit_unwind_reg_set_impl): Call raw_supply.
14844 (jit_frame_sniffer): Use reg_buffer_rw.
14845 * record-full.c (record_full_core_regbuf): Change its type.
14846 (record_full_core_open_1): Use reg_buffer_rw.
14847 (record_full_close): Likewise.
14848 (record_full_core_fetch_registers): Use regcache->raw_supply.
14849 (record_full_core_store_registers): Likewise.
14850 * regcache.c (regcache::get_register_status): Move it to
14851 reg_buffer.
14852 (regcache_raw_set_cached_value): Remove.
14853 (regcache::raw_set_cached_value): Remove.
14854 (regcache::raw_write): Call raw_supply.
14855 (regcache::raw_supply): Move it to reg_buffer_rw.
14856 * regcache.h (regcache_raw_set_cached_value): Remove.
14857 (reg_buffer_rw): New class.
14858
14859 2018-02-21 Yao Qi <yao.qi@linaro.org>
14860
14861 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14862 readonly_detached_regcache.
14863 (dummy_frame_prev_register): Use regcache->cooked_read.
14864 * frame.c (frame_save_as_regcache): Change return type.
14865 (frame_pop): Update.
14866 * frame.h (frame_save_as_regcache): Update declaration.
14867 * inferior.h (get_infcall_suspend_state_regcache): Update
14868 declaration.
14869 * infrun.c (infcall_suspend_state) <registers>: use
14870 readonly_detached_regcache.
14871 (save_infcall_suspend_state): Don't use regcache_dup.
14872 (get_infcall_suspend_state_regcache): Change return type.
14873 * linux-fork.c (struct fork_info) <savedregs>: Change to
14874 readonly_detached_regcache.
14875 <pc>: New field.
14876 (fork_save_infrun_state): Don't use regcache_dup.
14877 (info_checkpoints_command): Adjust.
14878 * mi/mi-main.c (register_changed_p): Update declaration.
14879 (mi_cmd_data_list_changed_registers): Use
14880 readonly_detached_regcache.
14881 (register_changed_p): Change parameter type to
14882 readonly_detached_regcache.
14883 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14884 readonly_detached_regcache.
14885 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14886 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14887 New.
14888 (regcache::save): Move it to reg_buffer.
14889 (regcache::restore): Change parameter type.
14890 (regcache_dup): Remove.
14891 * regcache.h (reg_buffer) <save>: New method.
14892 (readonly_detached_regcache): New class.
14893 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14894 readonly_detached_regcache.
14895 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14896
14897 2018-02-21 Yao Qi <yao.qi@linaro.org>
14898
14899 * frame.c (frame_save_as_regcache): Use regcache method save.
14900 (frame_pop): Use regcache method restore.
14901 * infrun.c (restore_infcall_suspend_state): Likewise.
14902 * linux-fork.c (fork_load_infrun_state): Likewise.
14903 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14904 save.
14905 * regcache.c (regcache_save): Remove.
14906 (regcache::restore): More asserts.
14907 (regcache_cpy): Remove.
14908 * regcache.h (regcache_save): Remove the declaration.
14909 (regcache::restore): Move from private to public.
14910 Remove the friend declaration of regcache_cpy.
14911 (regcache_cpy): Remove declaration.
14912
14913 2018-02-21 Yao Qi <yao.qi@linaro.org>
14914
14915 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14916 parameter type to 'readable_regcache *'.
14917 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14918 * arm-tdep.c (arm_neon_quad_read): Likewise.
14919 (arm_pseudo_read): Likewise.
14920 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14921 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14922 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14923 * gdbarch.c: Re-generated.
14924 * gdbarch.h: Re-generated.
14925 * gdbarch.sh (pseudo_register_read): Change parameter type to
14926 'readable_regcache *'.
14927 (pseudo_register_read_value): Likewise.
14928 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14929 (h8300_pseudo_register_read): Likewise.
14930 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14931 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14932 (i386_pseudo_register_read_into_value): Likewise.
14933 (i386_pseudo_register_read_value): Likewise.
14934 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14935 declaration.
14936 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14937 * m32c-tdep.c (m32c_raw_read): Likewise.
14938 (m32c_read_flg): Likewise.
14939 (m32c_banked_register): Likewise.
14940 (m32c_banked_read): Likewise.
14941 (m32c_sb_read): Likewise.
14942 (m32c_part_read): Likewise.
14943 (m32c_cat_read): Likewise.
14944 (m32c_r3r2r1r0_read): Likewise.
14945 (m32c_pseudo_register_read): Likewise.
14946 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14947 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14948 (mep_pseudo_cr64_read): Likewise.
14949 (mep_pseudo_register_read): Likewise.
14950 * mips-tdep.c (mips_pseudo_register_read): Likewise.
14951 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14952 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14953 * regcache.c (regcache::raw_read): Move it to readable_regcache.
14954 (regcache::cooked_read): Likewise.
14955 (regcache::cooked_read_value): Likewise.
14956 (regcache_cooked_read_signed):
14957 (regcache::cooked_read): Likewise.
14958 * regcache.h (readable_regcache): New class.
14959 (regcache): Inherit readable_regcache. Move some methods to
14960 readable_regcache.
14961 * rl78-tdep.c (rl78_pseudo_register_read): Change
14962 parameter type to 'readable_regcache *'.
14963 * rs6000-tdep.c (do_regcache_raw_read): Remove.
14964 (e500_pseudo_register_read): Change parameter type to
14965 'readable_regcache *'.
14966 (dfp_pseudo_register_read): Likewise.
14967 (vsx_pseudo_register_read): Likewise.
14968 (efpr_pseudo_register_read): Likewise.
14969 * s390-tdep.c (s390_pseudo_register_read): Likewise.
14970 * sh-tdep.c (sh_pseudo_register_read): Likewise.
14971 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14972 (sh64_pseudo_register_read): Likewise.
14973 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14974 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14975 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14976 (spu_pseudo_register_read): Likewise.
14977 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14978 (xtensa_pseudo_register_read): Likewise.
14979
14980 2018-02-21 Yao Qi <yao.qi@linaro.org>
14981
14982 * regcache.c (regcache::regcache): Call reg_buffer ctor.
14983 (regcache::arch): Move it to reg_buffer::arch.
14984 (regcache::register_buffer): Likewise.
14985 (regcache::assert_regnum): Likewise.
14986 (regcache::num_raw_registers): Likewise.
14987 * regcache.h (reg_buffer): New class.
14988 (regcache): Inherit reg_buffer.
14989
14990 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
14991
14992 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14993 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14994
14995 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
14996
14997 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14998
14999 2018-02-19 Alan Hayward <alan.hayward@arm.com>
15000
15001 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
15002 (SFILES): Remove common/*.c files.
15003 (COMMON_OBS): Remove some *.o files built from common/*.c files.
15004 * common/common.host: Add common reference.
15005 * configure.ac: Likewise.
15006 * configure: Regenerate.
15007
15008 2018-02-16 Yao Qi <yao.qi@linaro.org>
15009
15010 * block.c (block_namespace_info): Inherit allocate_on_obstack.
15011 (block_initialize_namespace): Use new.
15012 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
15013 (dwarf2_free_objfile): Use delete.
15014 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
15015 (copy_type_recursive): Use new.
15016 * gdb_obstack.h (allocate_on_obstack): New.
15017
15018 2018-02-15 Yao Qi <yao.qi@linaro.org>
15019
15020 PR gdb/22849
15021 * inferior.c (exit_inferior_1): Reset inf->control.
15022
15023 2018-02-15 Joel Brobecker <brobecker@adacore.com>
15024
15025 * ada-lang.c (ada_to_fixed_value_create): Delete advance
15026 declaration.
15027
15028 2018-02-14 Pedro Alves <palves@redhat.com>
15029
15030 * frame-unwind.c (frame_unwind_try_unwinder): Always call
15031 frame_cleanup_after_sniffer on exception.
15032
15033 2018-02-14 Tom Tromey <tom@tromey.com>
15034
15035 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
15036 const.
15037 (solib_bfd_open): Make pathname const.
15038 * solib.c (solib_bfd_open): Make pathname const.
15039 * solib-spu.c (spu_bfd_fopen): Make name const.
15040 (spu_bfd_open): Make pathname const.
15041 * solib-darwin.c (darwin_bfd_open): Make pathname const.
15042 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15043
15044 2018-02-14 Tom Tromey <tom@tromey.com>
15045
15046 * symfile.c (symfile_bfd_open): Update.
15047 * source.h (openp, source_full_path_of, find_and_open_source):
15048 Change argument type to unique_xmalloc_ptr.
15049 * source.c (openp): Take a unique_xmalloc_ptr.
15050 (source_full_path_of, find_and_open_source): Likewise.
15051 (open_source_file, symtab_to_fullname): Update.
15052 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15053 unique_xmalloc_ptr.
15054 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15055 (exec_file_find): Update.
15056 * psymtab.c (psymtab_to_fullname): Update.
15057 * nto-tdep.h (nto_find_and_open_solib): Update.
15058 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15059 unique_xmalloc_ptr.
15060 * exec.c (exec_file_attach): Update.
15061 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15062 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15063
15064 2018-02-14 Tom Tromey <tom@tromey.com>
15065
15066 * solib.c: Include source.h.
15067 * nto-tdep.c: Include source.h.
15068 * mi/mi-cmd-env.c: Include source.h.
15069 * infcmd.c: Include source.h.
15070 * exec.c: Include source.h.
15071 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15072 (add_path, directory_switch, source_path, init_source_path): Move
15073 declarations...
15074 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15075 (add_path, directory_switch, source_path, init_source_path):
15076 ...here.
15077
15078 2018-02-14 Tom Tromey <tom@tromey.com>
15079
15080 * solist.h (exec_file_find, solib_find): Return
15081 unique_xmalloc_ptr.
15082 (solib_bfd_fopen): Take a const char *.
15083 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15084 (exec_file_find, solib_find): Likewise.
15085 (solib_bfd_fopen): Do not take ownership of "pathname".
15086 (solib_bfd_open): Use unique_xmalloc_ptr.
15087 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15088 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15089 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15090 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15091
15092 2018-02-14 Joel Brobecker <brobecker@adacore.com>
15093
15094 * ada-lang.c (name_match_type_from_name): Remove reference to
15095 ada_name_for_lookup in function's documentation.
15096 * ada-lang.h (ada_name_for_lookup): Delete declaration.
15097
15098 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
15099
15100 * defs.h (enum openp_flags): New enum.
15101 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15102 Move to enum openp_flags.
15103 (openp_flags): New enum flags.
15104 (openp): Change parameter type to openp_flags.
15105 * source.c (openp): Change parameter type to openp_flags.
15106 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15107 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15108
15109 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
15110
15111 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15112 per-command.
15113
15114 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
15115
15116 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15117 into...
15118 (class dwarf2_queue_guard): ...the destructor of this new class.
15119 (dw2_do_instantiate_symtab): Create instance of the new class
15120 dwarf2_queue_guard, remove cleanup.
15121
15122 2018-02-09 Tom Tromey <tom@tromey.com>
15123
15124 * source.c (find_source_lines): Don't reference past the end of
15125 the vector.
15126
15127 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15128
15129 * remote.c (remote_btrace_maybe_reopen): Change error message.
15130 * btrace.c (btrace_enable): Likewise.
15131 (parse_xml_btrace): Likewise.
15132 (parse_xml_btrace_conf): Likewise.
15133
15134 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15135
15136 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15137 (linux_enable_pt, linux_enable_bts): Call
15138 diagnose_perf_event_open_fail.
15139
15140 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15141
15142 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15143 Remove parameter and change return type. Update callers. Move it.
15144 (linux_enable_bts, linux_enable_pt): Improve error message.
15145 (linux_enable_pt): Remove zero buffer size check.
15146 (linux_enable_btrace): Improve error messages. Remove NULL return
15147 check.
15148
15149 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15150
15151 * btrace.c (btrace_enable): Remove target_supports_btrace call.
15152 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15153 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15154 (linux_supports_pt, linux_supports_btrace): Remove.
15155 (linux_enable_bts): Call cpu_supports_bts.
15156 * nat/linux-btrace.h (linux_supports_btrace): Remove.
15157 * remote.c (remote_supports_btrace): Remove.
15158 (init_remote_ops): Remove remote_supports_btrace.
15159 * target-delegates.c: Regenerated.
15160 * target.c (target_supports_btrace): Remove.
15161 * target.h (target_ops) <to_supports_btrace>: Remove
15162 (target_supports_btrace): Remove.
15163 * x86-linux-nat.c (x86_linux_create_target): Remove
15164 linux_supports_btrace.
15165
15166 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15167
15168 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15169 btrace failed.
15170 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15171 exception and use message in own exception.
15172
15173 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15174
15175 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15176 (perf_event_pt_event_type): Use gdb_file_up.
15177 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15178 scoped_fd, and scoped_mmap.
15179
15180 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15181
15182 * common/scoped_mmap.h: New.
15183 * unittests/scoped_mmap-selftest.c: New.
15184 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15185 unittests/scoped_mmap-selftest.c.
15186
15187 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15188
15189 * common/scoped_fd.h: New.
15190 * unittests/scoped_fd-selftest.c: New.
15191 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15192 unittests/scoped_fd-selftest.c.
15193
15194 2018-02-09 Tom Tromey <tom@tromey.com>
15195
15196 * auto-load.c (auto_load_section_scripts): Use
15197 gdb::unique_xmalloc_ptr.
15198
15199 2018-02-09 Tom Tromey <tom@tromey.com>
15200
15201 * auto-load.c (execute_script_contents): Use std::string.
15202
15203 2018-02-09 Joel Brobecker <brobecker@adacore.com>
15204
15205 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15206 Python function, rather than a new command.
15207
15208 2018-02-08 Tom Tromey <tom@tromey.com>
15209
15210 * solib.c (solib_find_1): Use std::string.
15211 (solib_bfd_fopen): Use unique_xmalloc_ptr.
15212
15213 2018-02-08 Tom Tromey <tom@tromey.com>
15214
15215 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15216
15217 2018-02-08 Tom Tromey <tom@tromey.com>
15218
15219 * source.c (find_source_lines): Use gdb::def_vector.
15220
15221 2018-02-08 Tom Tromey <tom@tromey.com>
15222
15223 * macrocmd.c (struct temporary_macro_definition): New.
15224 (macro_define_command): Use temporary_macro_definition. Remove
15225 cleanups.
15226 (free_macro_definition_ptr): Remove.
15227
15228 2018-02-08 Tom Tromey <tom@tromey.com>
15229
15230 * macroexp.c (maybe_expand): Use std::string.
15231
15232 2018-02-08 Tom Tromey <tom@tromey.com>
15233
15234 * macroexp.c (struct macro_buffer): Add initializers for some
15235 members.
15236 (init_buffer, init_shared_buffer, free_buffer)
15237 (free_buffer_return_text): Remove.
15238 (macro_buffer): New constructors.
15239 (~macro_buffer): New destructor.
15240 (macro_buffer::set_shared): New method.
15241 (macro_buffer::resize_buffer, macro_buffer::appendc)
15242 (macro_buffer::appendmem): Now methods, not free functions.
15243 (set_token, append_tokens_without_splicing, stringify)
15244 (macro_stringify): Update.
15245 (gather_arguments): Change return type. Remove argc_p argument,
15246 add args_ptr argument. Use std::vector.
15247 (substitute_args): Remove argc argument. Accept std::vector.
15248 (expand): Update. Use std::vector.
15249 (scan, macro_expand, macro_expand_next): Update.
15250
15251 2018-02-08 Tom Tromey <tom@tromey.com>
15252
15253 * symtab.c (default_collect_symbol_completion_matches_break_on):
15254 Use unique_xmalloc_ptr.
15255 * macroscope.h: (sal_macro_scope, user_macro_scope)
15256 (default_macro_scope): Return unique_xmalloc_ptr.
15257 * macroscope.c (sal_macro_scope, user_macro_scope)
15258 (default_macro_scope): Return unique_xmalloc_ptr.
15259 * macroexp.h (macro_expand, macro_expand_once): Return
15260 unique_xmalloc_ptr.
15261 * macroexp.c (macro_expand, macro_expand_once): Return
15262 unique_xmalloc_ptr.
15263 * macrocmd.c (macro_expand_command, macro_expand_once_command)
15264 (info_macro_command, info_macros_command): Use
15265 unique_xmalloc_ptr.
15266 * compile/compile-c-support.c (write_macro_definitions): Use
15267 unique_xmalloc_ptr.
15268 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15269
15270 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
15271
15272 * value.c (value_static_field): Assign field type instead of
15273 containing type when returning an optimized out value.
15274
15275 2018-02-06 Yao Qi <yao.qi@linaro.org>
15276
15277 * ft32-tdep.c (ft32_read_pc): Remove.
15278 (ft32_write_pc): Remove.
15279 (ft32_gdbarch_init): Update.
15280 * m32r-tdep.c (m32r_read_pc): Remove.
15281 (m32r_gdbarch_init): Update.
15282 * mep-tdep.c (mep_read_pc): Remove.
15283 (mep_gdbarch_init): Update.
15284 * microblaze-tdep.c (microblaze_write_pc): Remove.
15285 (microblaze_gdbarch_init): Update.
15286 * mn10300-tdep.c (mn10300_read_pc): Remove.
15287 (mn10300_write_pc): Remove.
15288 (mn10300_gdbarch_init): Update.
15289 * moxie-tdep.c (moxie_read_pc): Remove.
15290 (moxie_write_pc): Remove.
15291 (moxie_gdbarch_init): Update.
15292
15293 2018-02-06 Yao Qi <yao.qi@linaro.org>
15294
15295 * expprint.c (print_subexp_standard): Handle
15296 OP_F77_UNDETERMINED_ARGLIST.
15297 (dump_subexp_body_standard): Likewise.
15298
15299 2018-02-05 Alan Hayward <alan.hayward@arm.com>
15300
15301 * target-descriptions.c (tdesc_element_visitor) Add empty
15302 implementations.
15303 (tdesc_type): Move make_gdb_type from here.
15304 (tdesc_type_builtin): Likewise.
15305 (tdesc_type_vector): Likewise.
15306 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15307 (make_gdb_type_struct): Move from tdesc_type_with_fields.
15308 (make_gdb_type_union): Likewise.
15309 (make_gdb_type_flags): Likewise.
15310 (make_gdb_type_enum): Likewise.
15311 (make_gdb_type): New function.
15312 (tdesc_register_type): Use static make_gdb_type.
15313
15314 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
15315
15316 * infcmd.c (default_print_one_register_info): Align natural-format
15317 column values consistently one under another.
15318 (pad_to_column): New function.
15319
15320 2018-02-05 Joel Brobecker <brobecker@adacore.com>
15321
15322 * dwarf2read.c (dwarf2_physname): Move commment.
15323
15324 2018-02-01 Leszek Swirski <leszeks@google.com>
15325
15326 * varobj.c (varobj_formatted_print_options): Allow recursive
15327 pretty printing if pretty printing is enabled.
15328
15329 2018-02-01 Leszek Swirski <leszeks@google.com>
15330
15331 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15332 names after a structop as a filename.
15333
15334 2018-02-01 Yao Qi <yao.qi@linaro.org>
15335
15336 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15337 (arm_record_coproc_data_proc): Likewise.
15338
15339 2018-02-01 Yao Qi <yao.qi@linaro.org>
15340
15341 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15342
15343 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
15344
15345 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15346 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15347
15348 2018-01-31 Pedro Alves <palves@redhat.com>
15349
15350 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15351 * inflow.c (child_terminal_save_inferior): Wrap reference to
15352 tcgetpgrp in HAVE_TERMIOS_H.
15353 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15354 _WIN32.
15355 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15356 always iterate over all inferiors.
15357 (gdbsim_cntrl_c): Adjust.
15358 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15359
15360 2018-01-31 Joel Brobecker <brobecker@adacore.com>
15361
15362 * gdbtypes.c (lookup_array_range_type): Make sure the array's
15363 index type is objfile-owned if the element type is as well.
15364
15365 2018-01-31 Joel Brobecker <brobecker@adacore.com>
15366
15367 GDB 8.1 released.
15368
15369 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
15370
15371 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15372 "features/s390x-linux64.c".
15373 (_initialize_s390_linux_tdep): Remove initialization of tdescs
15374 s390_linux32 and s390x_linux64.
15375 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15376 default tdesc.
15377 * s390-tdep.c: Include "features/s390-linux32.c" and
15378 "features/s390x-linux64.c".
15379 (s390_tdesc_valid): Add check for tdesc_has_registers.
15380 (s390_gdbarch_init): Make sure there is always a valid tdesc.
15381 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15382 tdesc_s390x_linux64.
15383 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15384 tdesc_s390x_linux64 to...
15385 * s390-tdep.h: ...here.
15386
15387 2018-01-30 Pedro Alves <palves@redhat.com>
15388
15389 PR gdb/13211
15390 * config.in, configure: Regenerate.
15391 * configure.ac: Check for getpgid.
15392 * go32-nat.c (go32_pass_ctrlc): New.
15393 (go32_target): Install it.
15394 * inf-child.c (inf_child_target): Install
15395 child_terminal_save_inferior, child_pass_ctrlc and
15396 child_interrupt.
15397 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15398 (inf_ptrace_target): No longer install it.
15399 * infcmd.c (interrupt_target_1): Adjust.
15400 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15401 (child_interrupt): Declare.
15402 (inferior::terminal_state): New.
15403 * inflow.c (struct terminal_info): Update comments.
15404 (inferior_process_group): Delete.
15405 (terminal_is_ours): Delete.
15406 (gdb_tty_state): New.
15407 (child_terminal_init): Adjust.
15408 (is_gdb_terminal, sharing_input_terminal_1)
15409 (sharing_input_terminal): New functions.
15410 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
15411 Set the process's actual process group in the foreground if
15412 possible. Handle is_ours_for_output/is_ours distinction. Don't
15413 mark terminal as the inferior's if not sharing GDB's terminal.
15414 Don't check attach_flag.
15415 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15416 pass down a target_terminal_state.
15417 (child_terminal_save_inferior): New, factored out from ...
15418 (child_terminal_ours_1): ... this. Handle
15419 target_terminal_state::is_ours_for_output.
15420 (child_interrupt, child_pass_ctrlc): New.
15421 (inflow_inferior_exit): Clear the inferior's terminal_state.
15422 (copy_terminal_info): Copy the inferior's terminal state.
15423 (_initialize_inflow): Remove reference to terminal_is_ours.
15424 * inflow.h (inferior_process_group): Delete.
15425 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15426 * procfs.c (procfs_target): Don't install procfs_interrupt.
15427 (procfs_interrupt): Delete.
15428 * remote.c (remote_serial_quit_handler): Adjust.
15429 (remote_interrupt): Remove ptid parameter. Adjust.
15430 * target-delegates.c: Regenerate.
15431 * target.c: Include "terminal.h".
15432 (target_terminal::terminal_state): Rename to ...
15433 (target_terminal::m_terminal_state): ... this.
15434 (target_terminal::init): Adjust.
15435 (target_terminal::inferior): Adjust to per-inferior
15436 terminal_state.
15437 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15438 (target_terminal::ours, target_terminal::ours_for_output): Use
15439 target_terminal_is_ours_kind.
15440 (target_interrupt): Remove ptid parameter. Adjust.
15441 (default_target_pass_ctrlc): Adjust.
15442 * target.h (target_ops::to_terminal_save_inferior): New field.
15443 (target_ops::to_interrupt): Remove ptid_t parameter.
15444 (target_interrupt): Remove ptid_t parameter. Update comment.
15445 (target_pass_ctrlc): Update comment.
15446 * target/target.h (target_terminal_state): New scoped enum,
15447 factored out of ...
15448 (target_terminal::terminal_state): ... here.
15449 (target_terminal::inferior): Update comments.
15450 (target_terminal::restore_inferior): New.
15451 (target_terminal::is_inferior, target_terminal::is_ours)
15452 (target_terminal::is_ours_for_output): Adjust.
15453 (target_terminal::scoped_restore_terminal_state): Adjust to
15454 rename, and call restore_inferior() instead of inferior().
15455 (target_terminal::scoped_restore_terminal_state::m_state): Change
15456 type.
15457 (target_terminal::terminal_state): Rename to ...
15458 (target_terminal::m_terminal_state): ... this and change type.
15459
15460 2018-01-30 Pedro Alves <palves@redhat.com>
15461
15462 * linux-nat.c (wait_for_signal): New function.
15463 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15464 directly.
15465 (async_terminal_is_ours)
15466 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15467 (linux_nat_add_target): Don't override
15468 to_terminal_inferior/to_terminal_ours.
15469
15470 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
15471
15472 * remote.c (remote_follow_fork): Don't call "detach_inferior".
15473
15474 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
15475
15476 * dwarf2read.c (free_dwo_files): Add forward-declaration.
15477 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15478 dwarf2_per_objfile_free here.
15479 (dwarf2_per_objfile_free): Remove.
15480 (_initialize_dwarf2_read): Don't register
15481 dwarf2_per_objfile_free as a registry cleanup.
15482
15483 2018-01-27 Eli Zaretskii <eliz@gnu.org>
15484
15485 Avoid compilation errors in MinGW native builds
15486
15487 The error is triggered by including python-internal.h, and the
15488 error message is:
15489
15490 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15491 from build-gnulib/import/math.h:27,
15492 from d:/usr/Python26/include/pyport.h:235,
15493 from d:/usr/Python26/include/Python.h:58,
15494 from python/python-internal.h:94,
15495 from python/py-arch.c:24:
15496 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15497 using ::hypot;
15498 ^~~~~
15499
15500 This happens because Python headers define 'hypot' to expand t
15501 '_hypot' in the Windows builds.
15502 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15503 'hypoth'. This avoids a compilation error.
15504
15505 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15506
15507 * MAINTAINERS (Write After Approval): Fix ordering.
15508
15509 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15510
15511 * MAINTAINERS (Write After Approval): Add Alan Hayward.
15512
15513 2018-01-26 Alan Modra <amodra@gmail.com>
15514
15515 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15516 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15517 Remove nop. Make const. Comment.
15518 (powerpc32_plt_stub_so_2): New.
15519 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15520 Correct count. Update uses.
15521 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15522 Move common code reading PLT entry word. Correct
15523 powerpc32_plt_stub PLT address calculation.
15524 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15525 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15526 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15527 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15528 (ppc64_standard_linkage8): Likewise.
15529 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15530 Correct insns description.
15531 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15532
15533 2018-01-24 Pedro Alves <palves@redhat.com>
15534
15535 GCC PR libstdc++/83906
15536 * gdbtypes.c (operator==(const dynamic_prop &,
15537 const dynamic_prop &)): New.
15538 (operator==(const range_bounds &, const range_bounds &)): New.
15539 (check_types_equal): Use them instead of memcmp.
15540 * gdbtypes.h (operator==(const dynamic_prop &,
15541 const dynamic_prop &)): Declare.
15542 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15543 (operator==(const range_bounds &, const range_bounds &)): Declare.
15544 (operator!=(const range_bounds &, const range_bounds &)): Declare.
15545
15546 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15547
15548 * s390-linux-tdep.c (s390_record_address_mask)
15549 (s390_record_calc_disp_common, s390_record_calc_disp)
15550 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15551 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15552 (s390_process_record): Move to s390-tdep.c.
15553 (s390_linux_init_abi_any): Adjust.
15554 * s390-tdep.c (s390_record_address_mask)
15555 (s390_record_calc_disp_common, s390_record_calc_disp)
15556 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15557 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15558 (s390_process_record): Moved from s390-linux-tdep.c
15559 (s390_gdbarch_init): Adjust.
15560
15561 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15562
15563 * s390-linux-nat.c (s390-tdep.h): New include.
15564 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15565 (HFILES_NO_SRCDIR): Add s390-tdep.h.
15566 (ALLDEPFILES): Add s390-tdep.c.
15567 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15568 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15569 * s390-tdep.h: ...this. New file.
15570 * s390-linux-tdep.c (s390-tdep.h): New include.
15571 (_initialize_s390_tdep): Rename to...
15572 (_initialize_s390_linux_tdep): ...this and adjust.
15573 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15574 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15575 s390-tdep.h.
15576 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15577 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15578 (s390_is_partial_instruction, s390_software_single_step)
15579 (is_non_branch_ril, s390_displaced_step_copy_insn)
15580 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15581 (s390_prologue_data, s390_addr, s390_store, s390_load)
15582 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15583 (s390_register_call_saved, s390_guess_tracepoint_registers)
15584 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15585 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15586 (s390_pseudo_register_name, s390_pseudo_register_type)
15587 (s390_pseudo_register_read, s390_pseudo_register_write)
15588 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15589 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15590 (s390_addr_bits_remove, s390_address_class_type_flags)
15591 (s390_address_class_type_flags_to_name)
15592 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15593 (s390_function_arg_float, s390_function_arg_vector)
15594 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15595 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15596 (s390_frame_align, s390_register_return_value, s390_return_value)
15597 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15598 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15599 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15600 (s390_trad_frame_prev_register, s390_unwind_cache)
15601 (s390_prologue_frame_unwind_cache)
15602 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15603 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15604 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15605 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15606 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15607 (s390_frame_base_address, s390_local_base_address)
15608 (s390_frame_base, s390_gcc_target_options)
15609 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15610 (s390_validate_reg_range, s390_tdesc_valid)
15611 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15612 * s390-tdep.c: ...this. New file.
15613
15614 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15615
15616 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15617 (s390_process_record, s390_gdbarch_tdep_alloc)
15618 (s390_linux_init_abi_any): Use/set new hook.
15619
15620 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15621
15622 * s390-linux-tdep.c (osabi.h): New include.
15623 (s390_linux_init_abi_31, s390_linux_init_abi_64)
15624 (s390_linux_init_abi_any): New functions.
15625 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15626
15627 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15628
15629 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15630 tdesc_has_registers check
15631
15632 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15633
15634 * s390-linux-tdep.c (s390_tdesc_valid): New function.
15635 (s390_validate_reg_range): New macro.
15636 (s390_gdbarch_init): Adjust.
15637
15638 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15639
15640 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15641 (s390_gdbarch_tdep_alloc): Adjust.
15642 (s390_gdbarch_init): Adjust.
15643
15644 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15645
15646 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15647 <have_tdb>: Change type to bool.
15648 (s390_gdbarch_tdep_alloc): Adjust.
15649 (s390_gdbarch_init): Adjust.
15650
15651 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15652
15653 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15654 (gdbarch_tdep) <have_upper, have_vx>: New fields.
15655 (s390_gdbarch_tdep_alloc): New function.
15656 (s390_gdbarch_init): Allocate tdep at start and use its fields
15657 instead of separate variables.
15658
15659 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15660
15661 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15662 when looking for cached gdbarch and add comment for remaining.
15663
15664 2018-01-22 Pedro Alves <palves@redhat.com>
15665 Sergio Durigan Junior <sergiodj@redhat.com>
15666
15667 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15668 case.
15669
15670 2018-01-22 Maciej W. Rozycki <macro@mips.com>
15671
15672 * MAINTAINERS: Update my company e-mail address.
15673
15674 2018-01-22 Yao Qi <yao.qi@linaro.org>
15675
15676 * regcache.c (cooked_write_test): New function.
15677 (_initialize_regcache): Register the test.
15678
15679 2018-01-22 Yao Qi <yao.qi@linaro.org>
15680
15681 * ia64-tdep.c (ia64_pseudo_register_read): Call
15682 regcache->cooked_read instead of regcache_cooked_read_unsigned.
15683 * m32c-tdep.c (m32c_cat_read): Likewise.
15684 (m32c_r3r2r1r0_read): Likewise.
15685 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15686 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15687
15688 2018-01-22 Yao Qi <yao.qi@linaro.org>
15689
15690 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15691 method raw_read instead of regcache_raw_read.
15692 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15693 * arm-tdep.c (arm_neon_quad_read): Likewise.
15694 * avr-tdep.c (avr_pseudo_register_read): Likewise.
15695 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15696 * frv-tdep.c (frv_pseudo_register_read): Likewise.
15697 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15698 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15699 (i386_pseudo_register_read_into_value): Likewise.
15700 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15701 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15702 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15703 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15704 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15705 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15706 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15707 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15708 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15709
15710 2018-01-22 Yao Qi <yao.qi@linaro.org>
15711
15712 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15713 * configure.tgt: Remove target mt.
15714 * mt-tdep.c: Remove.
15715 * regcache.c (cooked_read_test): Remove the check for mt.
15716
15717 2018-01-22 Yao Qi <yao.qi@linaro.org>
15718
15719 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15720 instead of gdbarch_pseudo_register_read_value.
15721
15722 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15723
15724 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15725 language is Ada.
15726
15727 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15728
15729 * linespec.c (create_sals_line_offset): Remove code that preserved
15730 the symtab_and_line's line number.
15731
15732 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15733
15734 * varobj.c (varobj_create): Don't set valid_block when creating a
15735 floating varobj.
15736
15737 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15738
15739 * varobj.c (varobj_create): Remove out of date comment.
15740
15741 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15742
15743 PR mi/20395
15744 * ada-exp.y (write_var_from_sym): Pass extra parameter when
15745 updating innermost block.
15746 * parse.c (innermost_block_tracker::update): Take extra type
15747 parameter, and check types match before updating innermost block.
15748 (write_dollar_variable): Update innermost block for registers.
15749 * parser-defs.h (enum innermost_block_tracker_type): New enum.
15750 (innermost_block_tracker::innermost_block_tracker): Initialise
15751 m_types member.
15752 (innermost_block_tracker::reset): Take type parameter.
15753 (innermost_block_tracker::update): Take type parameter, and pass
15754 type through as needed.
15755 (innermost_block_tracker::m_types): New member.
15756 * varobj.c (varobj_create): Pass type when reseting innermost
15757 block.
15758
15759 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15760
15761 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15762 * ada-lang.c (resolve_subexp): Likewise.
15763 * breakpoint.c (set_breakpoint_condition) Likewise.
15764 (watch_command_1) Likewise.
15765 * c-exp.y (variable): Likewise.
15766 * d-exp.y (PrimaryExpression): Likewise.
15767 * f-exp.y (variable): Likewise.
15768 * go-exp.y (variable): Likewise.
15769 * m2-exp.y (variable): Likewise.
15770 * objfiles.c (objfile::~objfile): Likewise.
15771 * p-exp.y (variable): Likewise.
15772 * parse.c (innermost_block): Change type.
15773 * parser-defs.h (class innermost_block_tracker): New.
15774 (innermost_block): Change to innermost_block_tracker.
15775 * printcmd.c (display_command): Switch to innermost_block API.
15776 (do_one_display): Likewise.
15777 * rust-exp.y (do_one_display): Likewise.
15778 * symfile.c (clear_symtab_users): Likewise.
15779 * varobj.c (varobj_create): Switch to innermost_block API, replace
15780 use of innermost_block with block stored on varobj object.
15781
15782 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15783
15784 * expression.h (innermost_block): Remove declaration.
15785 * varobj.c: Add 'parser-defs.h' include.
15786
15787 2018-01-19 Tom Tromey <tom@tromey.com>
15788
15789 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15790 symbols in the static and global blocks.
15791
15792 2018-01-19 James Clarke <jrtc27@jrtc27.com>
15793
15794 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15795 gdb_ptrace.h, and move including gdb_wait.h ...
15796 * nat/linux-ptrace.h: ... to here.
15797
15798 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15799
15800 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15801 inf_ptrace_detach_success.
15802 (inf_ptrace_detach_success): Add inferior parameter, use it
15803 instead of inferior_ptid, pass it to detach_inferior.
15804 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15805 parameter.
15806 * inferior.c (detach_inferior): Add overload that takes an
15807 inferior object.
15808 * inferior.h (detach_inferior): Likewise.
15809 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15810 use inferior_ptid, adjust call to inf_ptrace_detach_success.
15811 * linux-thread-db.c (thread_db_detach): Use inf parameter.
15812
15813 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15814
15815 * target.h (struct target_ops) <to_detach>: Add inferior
15816 parameter.
15817 (target_detach): Likewise.
15818 * target.c (dispose_inferior): Pass inferior down.
15819 (target_detach): Pass inferior down. Assert that it is equal to
15820 the current inferior.
15821 * aix-thread.c (aix_thread_detach): Pass inferior down.
15822 * corefile.c (core_file_command): Pass current_inferior() down.
15823 * corelow.c (core_detach): Add inferior parameter.
15824 * darwin-nat.c (darwin_detach): Likewise.
15825 * gnu-nat.c (gnu_detach): Likewise.
15826 * inf-ptrace.c (inf_ptrace_detach): Likewise.
15827 * infcmd.c (detach_command): Pass current_inferior() down to
15828 target_detach.
15829 * infrun.c (follow_fork_inferior): Pass parent_inf to
15830 target_detach.
15831 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15832 target_detach.
15833 * linux-nat.c (linux_nat_detach): Add inferior parameter.
15834 * linux-thread-db.c (thread_db_detach): Likewise.
15835 * nto-procfs.c (procfs_detach): Likewise.
15836 * procfs.c (procfs_detach): Likewise.
15837 * record.c (record_detach): Likewise.
15838 * record.h (struct inferior): Forward-declare.
15839 (record_detach): Add inferior parameter.
15840 * remote-sim.c (gdbsim_detach): Likewise.
15841 * remote.c (remote_detach_1): Likewise.
15842 (remote_detach): Likewise.
15843 (extended_remote_detach): Likewise.
15844 * sol-thread.c (sol_thread_detach): Likewise.
15845 * target-debug.h (target_debug_print_inferior_p): New macro.
15846 * target-delegates.c: Re-generate.
15847 * top.c (kill_or_detach): Pass inferior down to target_detach.
15848 * windows-nat.c (windows_detach): Add inferior parameter.
15849
15850 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15851
15852 * target.h (struct target_ops) <to_detach>: Remove args
15853 parameter.
15854 (target_detach): Likewise.
15855 * target.c (dispose_inferior): Adjust.
15856 (target_detach): Remove args parameter, adjust.
15857 * aix-thread.c (aix_thread_detach): Adjust.
15858 * corefile.c (core_file_command): Adjust.
15859 * corelow.c (core_detach): Adjust.
15860 * darwin-nat.c (darwin_detach): Adjust.
15861 * gnu-nat.c (gnu_detach): Adjust.
15862 * inf-ptrace.c (inf_ptrace_detach): Adjust.
15863 * infcmd.c (detach_command): Adjust
15864 * infrun.c (follow_fork_inferior): Adjust.
15865 (handle_vfork_child_exec_or_exit): Adjust.
15866 * linux-fork.c (linux_fork_detach): Remove args parameter.
15867 * linux-fork.h (linux_fork_detach): Likewise.
15868 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15869 * linux-thread-db.c (thread_db_detach): Likewise.
15870 * nto-procfs.c (procfs_detach): Likewise.
15871 * procfs.c (procfs_detach): Likewise.
15872 (do_detach): Remove signo parameter.
15873 * record.c (record_detach): Remove args parameter.
15874 * record.h (record_detach): Likewise.
15875 * remote-sim.c (gdbsim_detach): Likewise.
15876 * remote.c (remote_detach_1): Likewise.
15877 (remote_detach): Likewise.
15878 (extended_remote_detach): Likewise.
15879 * sol-thread.c (sol_thread_detach): Likewise.
15880 * target-delegates.c: Re-generate.
15881 * top.c (struct qt_args) <args>: Remove field.
15882 (kill_or_detach): Don't pass args.
15883 (quit_force): Don't set args.
15884 * windows-nat.c (windows_detach): Remove args parameter.
15885
15886 2018-01-19 Yao Qi <yao.qi@linaro.org>
15887
15888 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15889 (arm_linux_init_abi): Install it.
15890
15891 2018-01-19 Yao Qi <yao.qi@linaro.org>
15892
15893 * osabi.c (gdb_osabi_names): Extend the regexp for
15894 arm-linux-gnueabihf.
15895
15896 2018-01-18 Yao Qi <yao.qi@linaro.org>
15897
15898 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15899 m_abbrevs.
15900 (abbrev_table::add_abbrev): Update.
15901 (abbrev_table::lookup_abbrev): Update.
15902
15903 2018-01-18 Yao Qi <yao.qi@linaro.org>
15904
15905 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15906
15907 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
15908
15909 * compile/compile.c (compile_to_object): Convert "triplet_rx"
15910 to "std::string".
15911
15912 2018-01-17 Tom Tromey <tom@tromey.com>
15913
15914 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
15915
15916 2018-01-17 Tom Tromey <tom@tromey.com>
15917
15918 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15919 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15920 (create_array_type_with_stride): Update.
15921 * dwarf2read.c (set_die_type): Update.
15922
15923 2018-01-17 Tom Tromey <tom@tromey.com>
15924
15925 * dwarf2read.c (delayed_method_info): Remove typedef.
15926 (dwarf2_cu::method_info): Now a std::vector.
15927 (add_to_method_list): Update.
15928 (free_delayed_list): Remove.
15929 (compute_delayed_physnames): Update.
15930 (process_full_comp_unit, process_full_type_unit): Clear the method
15931 list. Remove cleanups.
15932 (psymtab_include_file_name): Add name_holder parameter. Use
15933 unique_xmalloc_ptr.
15934 (dwarf_decode_lines): Update.
15935
15936 2018-01-17 Tom Tromey <tom@tromey.com>
15937 Simon Marchi <simon.marchi@ericsson.com>
15938
15939 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15940 (dwarf2_per_objfile::free_cached_comp_units)
15941 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15942 (init_cutu_and_read_dies_no_follow): Update.
15943 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15944 (dwarf2_cu::~dwarf2_cu): New.
15945 (free_heap_comp_unit, free_stack_comp_unit): Remove.
15946 (age_cached_comp_units, free_one_cached_comp_unit): Update.
15947
15948 2018-01-17 Tom Tromey <tom@tromey.com>
15949 Simon Marchi <simon.marchi@ericsson.com>
15950
15951 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15952 (struct die_reader_specs) <abbrev_table>: New member.
15953 (struct abbrev_table): Add constructor.
15954 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15955 <abbrev_obstack>: Now an auto_obstack.
15956 (abbrev_table_up): New typedef.
15957 (init_cu_die_reader): Add abbrev_table parameter.
15958 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15959 Add result_dwo_abbrev_table.
15960 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15961 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15962 Update.
15963 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15964 parameter.
15965 (skip_children): Update.
15966 (abbrev_table::alloc_abbrev): Rename from
15967 abbrev_table_alloc_abbrev.
15968 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15969 (abbrev_table::lookup_abbrev): Rename from
15970 abbrev_table_lookup_abbrev.
15971 (abbrev_table_read_table): Return abbrev_table_up.
15972 (abbrev_table_free, abbrev_table_free_cleanup)
15973 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15974 (load_partial_dies): Update.
15975
15976 2018-01-17 Tom Tromey <tom@tromey.com>
15977
15978 * dwarf2read.c (dwarf2_compute_name): Update comment.
15979 (read_func_scope, read_variable): Update.
15980 (new_symbol): Remove.
15981 (new_symbol_full): Rename to new_symbol.
15982
15983 2018-01-17 Mike Gulick <mgulick@mathworks.com>
15984
15985 PR gdb/16577
15986 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15987 a warning instead of throwing an error, set section size to 0 and return
15988 NULL.
15989 * gdb_bfd.h (gdb_bfd_map_section): Update description.
15990
15991 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
15992
15993 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15994 std::string.
15995 (linux_ptrace_attach_fail_reason_string): Likewise.
15996 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15997 Likewise.
15998 (linux_ptrace_attach_fail_reason_string): Likewise.
15999 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
16000
16001 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
16002
16003 * linux-nat.c (linux_nat_attach): Remove xstrdup.
16004
16005 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
16006
16007 PR gdb/21559
16008 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
16009 checking for fs_base/gs_base fields in struct user_regs_struct.
16010 * configure: Regenerate.
16011
16012 2018-01-17 Yao Qi <yao.qi@linaro.org>
16013
16014 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
16015 function.
16016 (aarch64_linux_init_abi): Install it to gdbarch hook
16017 gcc_target_options.
16018
16019 2018-01-15 Pedro Alves <palves@redhat.com>
16020
16021 * common/signals-state-save-restore.c
16022 (save_original_signals_state): Fix typos.
16023
16024 2017-01-12 Tom Tromey <tom@tromey.com>
16025 Sergio Durigan Junior <sergiodj@redhat.com>
16026
16027 * Makefile.in (install-only): Install gdb-add-index.
16028
16029 2018-01-12 John Baldwin <jhb@FreeBSD.org>
16030
16031 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
16032
16033 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
16034
16035 * infrun.c (keep_going_pass_signal): Clear step-over info when
16036 insert_breakpoints fails.
16037
16038 2018-01-11 Pedro Alves <palves@redhat.com>
16039
16040 PR gdb/22583
16041 * infrun.c (resume): Rename to ...
16042 (resume_1): ... this.
16043 (resume): Reimplement as wrapper around resume_1.
16044
16045 2018-01-11 Pedro Alves <palves@redhat.com>
16046
16047 PR remote/22597
16048 * remote.c (remote_parse_stop_reply): Default to the last-set
16049 general thread instead of to 'magic_null_ptid'.
16050
16051 2018-01-10 Pedro Alves <palves@redhat.com>
16052
16053 * language.h (language_get_symbol_name_matcher): Rename ...
16054 (get_symbol_name_matcher): ... this.
16055 * language.c (language_get_symbol_name_matcher): Ditto.
16056 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16057 callers adjusted.
16058
16059 2018-01-10 Pedro Alves <palves@redhat.com>
16060
16061 PR gdb/22670
16062 * dwarf2read.c
16063 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16064 Adjust to use language_get_symbol_name_matcher instead of
16065 language_defn::la_get_symbol_name_matcher.
16066 * language.c (language_get_symbol_name_matcher): If in Ada mode
16067 and the lookup name is a verbatim match, return Ada's matcher.
16068 * language.h (language_get_symbol_name_matcher): Adjust comment.
16069 (ada_lookup_name_info::verbatim_p):: New method.
16070
16071 2018-01-10 Pedro Alves <palves@redhat.com>
16072
16073 PR gdb/22670
16074 * ada-lang.c (ada_collect_symbol_completion_matches): If the
16075 minsym's language is language_auto or language_cplus, pass down
16076 language_ada instead.
16077 * symtab.c (compare_symbol_name): Don't frob symbol language here.
16078
16079 2018-01-10 Pedro Alves <palves@redhat.com>
16080
16081 PR gdb/22670
16082 * minsyms.c (linkage_name_str): New function.
16083 (iterate_over_minimal_symbols): Use it.
16084
16085 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16086
16087 * NEWS: Document that 'info proc' now works on FreeBSD.
16088
16089 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16090
16091 * configure.ac: Check for kinfo_getfile in libutil.
16092 * configure: Regenerate.
16093 * config.in: Regenerate.
16094 * fbsd-nat.c: Include "fbsd-tdep.h".
16095 (fbsd_fetch_cmdline): New.
16096 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16097 rather than calling error.
16098 (fbsd_info_proc): New.
16099 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16100 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16101 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16102
16103 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16104
16105 * fbsd-nat.c (struct free_deleter): Remove.
16106 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16107
16108 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16109
16110 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16111 NULL for an empty pathname.
16112
16113 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16114
16115 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16116 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16117 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16118 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16119 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16120 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16121 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16122 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16123 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16124 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16125 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16126 (fbsd_core_fetch_timeval, fbsd_print_sigset)
16127 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16128 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
16129 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16130
16131 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
16132
16133 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16134 (gnu_xfer_auxv): New function.
16135 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16136 TARGET_OBJECT_AUXV.
16137
16138 2018-01-08 Yao Qi <yao.qi@linaro.org>
16139 Simon Marchi <simon.marchi@ericsson.com>
16140
16141 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16142 common/selftest.c.
16143 (COMMON_OBS): Remove selftest.o.
16144 * configure.ac: Append selftest-arch.c and common/selftest.c to
16145 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
16146 * configure: Re-generated.
16147 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16148 GDB_SELF_TEST.
16149 (maintenance_info_selftests): Likewise.
16150
16151 2018-01-08 Xavier Roirand <roirand@adacore.com>
16152
16153 * ada-valprint.c (val_print_packed_array_elements): Use
16154 proper number of elements when printing an array indexed
16155 by an enumeration type.
16156
16157 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16158
16159 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16160 (dw2_get_file_names_reader): Adjust.
16161 (lookup_dwo_signatured_type): Adjust.
16162 (lookup_dwp_signatured_type): Adjust.
16163 (lookup_signatured_type): Adjust.
16164 (create_type_unit_group): Adjust.
16165 (get_type_unit_group): Adjust.
16166 (process_psymtab_comp_unit_reader): Adjust.
16167 (build_type_psymtabs_reader): Adjust.
16168 (scan_partial_symbols): Adjust.
16169 (add_partial_symbol): Adjust.
16170 (add_partial_subprogram): Adjust.
16171 (peek_die_abbrev): Adjust.
16172 (fixup_go_packaging): Adjust.
16173 (process_imported_unit_die): Adjust.
16174 (dwarf2_compute_name): Adjust.
16175 (dwarf2_physname): Adjust.
16176 (read_import_statement): Adjust.
16177 (handle_DW_AT_stmt_list): Adjust.
16178 (read_file_scope): Adjust.
16179 (read_func_scope): Adjust.
16180 (read_lexical_block_scope): Adjust.
16181 (read_call_site_scope): Adjust.
16182 (read_variable): Adjust.
16183 (dwarf2_rnglists_process): Adjust.
16184 (dwarf2_ranges_process): Adjust.
16185 (dwarf2_ranges_read): Adjust.
16186 (dwarf2_get_pc_bounds): Adjust.
16187 (dwarf2_record_block_ranges): Adjust.
16188 (dwarf2_add_field): Adjust.
16189 (dwarf2_add_member_fn): Adjust.
16190 (read_structure_type): Adjust.
16191 (process_structure_scope): Adjust.
16192 (read_enumeration_type): Adjust.
16193 (read_array_type): Adjust.
16194 (mark_common_block_symbol_computed): Adjust.
16195 (read_common_block): Adjust.
16196 (read_namespace_type): Adjust.
16197 (read_namespace): Adjust.
16198 (read_module_type): Adjust.
16199 (read_tag_pointer_type): Adjust.
16200 (read_tag_ptr_to_member_type): Adjust.
16201 (read_tag_string_type): Adjust.
16202 (read_subroutine_type): Adjust.
16203 (read_typedef): Adjust.
16204 (read_base_type): Adjust.
16205 (attr_to_dynamic_prop): Adjust.
16206 (read_subrange_type): Adjust.
16207 (read_unspecified_type): Adjust.
16208 (dwarf2_read_abbrevs): Adjust.
16209 (load_partial_dies): Adjust.
16210 (read_partial_die): Adjust.
16211 (find_partial_die): Adjust.
16212 (guess_partial_die_structure_name): Adjust.
16213 (fixup_partial_die): Adjust.
16214 (read_attribute_value): Adjust.
16215 (read_addr_index): Adjust.
16216 (read_addr_index_from_leb128): Adjust.
16217 (read_str_index): Adjust.
16218 (dwarf2_string_attr): Adjust.
16219 (get_debug_line_section): Adjust.
16220 (dwarf_decode_line_header): Adjust.
16221 (lnp_state_machine::check_line_address): Adjust.
16222 (dwarf_decode_lines_1): Adjust.
16223 (dwarf_decode_lines): Adjust.
16224 (dwarf2_start_symtab): Adjust.
16225 (var_decode_location): Adjust.
16226 (new_symbol_full): Adjust.
16227 (dwarf2_const_value_data): Adjust.
16228 (dwarf2_const_value_attr): Adjust.
16229 (dwarf2_const_value): Adjust.
16230 (die_type): Adjust.
16231 (die_containing_type): Adjust.
16232 (build_error_marker_type): Adjust.
16233 (lookup_die_type): Adjust.
16234 (guess_full_die_structure_name): Adjust.
16235 (anonymous_struct_prefix): Adjust.
16236 (determine_prefix): Adjust.
16237 (dwarf2_name): Adjust.
16238 (follow_die_ref_or_sig): Adjust.
16239 (follow_die_offset): Adjust.
16240 (follow_die_ref): Adjust.
16241 (follow_die_sig_1): Adjust.
16242 (follow_die_sig): Adjust.
16243 (get_signatured_type): Adjust.
16244 (get_DW_AT_signature_type): Adjust.
16245 (decode_locdesc): Adjust.
16246 (dwarf_decode_macros): Adjust.
16247 (cu_debug_loc_section): Adjust.
16248 (fill_in_loclist_baton): Adjust.
16249 (dwarf2_symbol_mark_computed): Adjust.
16250 (init_one_comp_unit): Don't assign
16251 dwarf2_cu::dwarf2_per_objfile.
16252 (set_die_type): Adjust.
16253
16254 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16255
16256 * dwarf2read.c (struct mapped_debug_names): Add constructor.
16257 <dwarf2_per_objfile>: New field.
16258 (dwarf2_per_objfile): Remove global.
16259 (get_dwarf2_per_objfile): New function.
16260 (set_dwarf2_per_objfile): New function.
16261 (dwarf2_build_psymtabs_hard): Change objfile parameter to
16262 dwarf2_per_objfile.
16263 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16264 (read_abbrev_offset): Likewise.
16265 (read_indirect_string): Likewise.
16266 (read_indirect_line_string): Likewise.
16267 (read_indirect_string_at_offset): Likewise.
16268 (read_indirect_string_from_dwz): Likewise.
16269 (dwarf2_find_containing_comp_unit): Change objfile parameter to
16270 dwarf2_per_objfile.
16271 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16272 (create_all_comp_units): Change objfile parameter to
16273 dwarf2_per_objfile.
16274 (create_all_type_units): Likewise.
16275 (process_queue): Add dwarf2_per_objfile parameter.
16276 (read_and_check_comp_unit_head): Likewise.
16277 (lookup_dwo_unit_in_dwp): Likewise.
16278 (get_dwp_file): Likewise.
16279 (process_cu_includes): Likewise.
16280 (struct free_dwo_file_cleanup_data): New struct.
16281 (dwarf2_has_info): Use get_dwarf2_per_objfile and
16282 set_dwarf2_per_objfile.
16283 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16284 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16285 context, adjust calls.
16286 (dw2_instantiate_symtab): Likewise.
16287 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16288 (dw2_get_cu): Likewise.
16289 (create_cu_from_index_list): Change objfile parameter to
16290 dwarf2_per_objfile.
16291 (create_cus_from_index_list): Get dwarf2_per_objfile from
16292 context, adjust calls.
16293 (create_cus_from_index): Likewise.
16294 (create_signatured_type_table_from_index): Change objfile
16295 parameter to dwarf2_per_objfile.
16296 (create_signatured_type_table_from_debug_names): Change objfile
16297 parameter to dwarf2_per_objfile.
16298 (create_addrmap_from_index): Likewise.
16299 (create_addrmap_from_aranges): Likewise.
16300 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16301 (dw2_setup): Remove.
16302 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16303 context.
16304 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16305 get_dwarf2_per_objfile.
16306 (dw2_forget_cached_source_info): Likewise.
16307 (dw2_map_symtabs_matching_filename): Likewise.
16308 (struct dw2_symtab_iterator) <index>: Remove.
16309 <dwarf2_per_objfile>: New field.
16310 (dw2_symtab_iter_init): Replace index parameter with
16311 dwarf2_per_objfile.
16312 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16313 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16314 (dw2_print_stats): Likewise.
16315 (dw2_dump): Likewise.
16316 (dw2_expand_symtabs_for_function): Likewise.
16317 (dw2_expand_all_symtabs): Likewise.
16318 (dw2_expand_symtabs_with_fullname): Likewise.
16319 (dw2_expand_marked_cus): Replace index and objfile parameters
16320 with dwarf2_per_objfile.
16321 (dw_expand_symtabs_matching_file_matcher): Add
16322 dwarf2_per_objfile parameter and adjust calls.
16323 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16324 adjust calls.
16325 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16326 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16327 adjust calls.
16328 (create_cus_from_debug_names_list): Replace objfile parameter
16329 with dwarf2_per_objfile and adjust calls.
16330 (create_cus_from_debug_names): Likewise.
16331 (dwarf2_read_debug_names): Likewise.
16332 (mapped_debug_names::namei_to_name): Adjust call.
16333 (dw2_debug_names_iterator::next): Likewise.
16334 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16335 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16336 (dw2_debug_names_dump): Likewise.
16337 (dw2_debug_names_expand_symtabs_for_function): Likewise.
16338 (dw2_debug_names_expand_symtabs_matching): Likewise.
16339 (dwarf2_initialize_objfile): Likewise.
16340 (dwarf2_build_psymtabs): Likewise.
16341 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16342 this_cu.
16343 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16344 (read_and_check_comp_unit_head): Likewise.
16345 (read_abbrev_offset): Likewise.
16346 (create_debug_type_hash_table): Likewise.
16347 (create_debug_types_hash_table): Likewise.
16348 (create_all_type_units): Replace objfile parameter with
16349 dwarf2_per_objfile.
16350 (add_type_unit): Add dwarf2_per_objfile parameter.
16351 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16352 with dwarf2_per_objfile.
16353 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16354 (lookup_dwp_signatured_type): Likewise.
16355 (lookup_signatured_type): Likewise.
16356 (read_cutu_die_from_dwo): Likewise.
16357 (init_tu_and_read_dwo_dies): Likewise.
16358 (init_cutu_and_read_dies): Likewise.
16359 (init_cutu_and_read_dies_no_follow): Likewise.
16360 (allocate_type_unit_groups_table): Add objfile parameter.
16361 (create_type_unit_group): Use dwarf2_per_objfile from cu.
16362 (get_type_unit_group): Likewise.
16363 (process_psymtab_comp_unit): Update call.
16364 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16365 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16366 (print_tu_stats): Likewise.
16367 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16368 in void* parameter.
16369 (build_type_psymtabs): Change objfile parameter to
16370 dwarf2_per_objfile.
16371 (process_skeletonless_type_unit): Use dwarf2_per_objfile
16372 passed in void* parameter.
16373 (process_skeletonless_type_units): Change objfile parameter to
16374 dwarf2_per_objfile.
16375 (set_partial_user): Likewise.
16376 (dwarf2_build_psymtabs_hard): Likewise.
16377 (read_comp_units_from_section): Likewise.
16378 (create_all_comp_units): Likewise.
16379 (scan_partial_symbols): Update calls.
16380 (add_partial_symbol): Likewise.
16381 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16382 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16383 (process_queue): Add dwarf2_per_objfile parameter.
16384 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16385 (compute_compunit_symtab_includes): Likewise.
16386 (process_cu_includes): Add dwarf2_per_objfile parameter.
16387 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16388 (process_full_type_unit): Likewise.
16389 (process_imported_unit_die): Update call.
16390 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16391 (read_file_scope): Likewise.
16392 (allocate_dwo_file_hash_table): Add objfile parameter.
16393 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16394 (create_cus_hash_table): Likewise.
16395 (create_dwp_hash_table): Likewise.
16396 (create_dwo_unit_in_dwp_v1): Likewise.
16397 (create_dwp_v2_section): Likewise.
16398 (create_dwo_unit_in_dwp_v2): Likewise.
16399 (lookup_dwo_unit_in_dwp): Likewise.
16400 (try_open_dwop_file): Likewise.
16401 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16402 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16403 cleanup to include a reference to dwarf2_per_objfile.
16404 (open_dwp_file): Add dwarf2_per_objfile parameter.
16405 (open_and_init_dwp_file): Likewise.
16406 (get_dwp_file): Likewise.
16407 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16408 (queue_and_load_all_dwo_tus): Update call.
16409 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16410 data.
16411 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16412 (dwarf2_ranges_process): Likewise.
16413 (dwarf2_get_pc_bounds): Likewise.
16414 (mark_common_block_symbol_computed): Likewise.
16415 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16416 (dwarf2_read_abbrevs): Update call.
16417 (read_partial_die): Use dwarf2_per_objfile from cu.
16418 (find_partial_die): Likewise.
16419 (fixup_partial_die): Likewise.
16420 (read_attribute_value): Likewise.
16421 (read_indirect_string_at_offset_from): Add objfile parameter.
16422 (read_indirect_string_at_offset): Add dwarf2_per_objfile
16423 parameter.
16424 (read_indirect_string_from_dwz): Add objfile parameter.
16425 (read_indirect_string): Add objfile parameter.
16426 (read_addr_index_1): Add dwarf2_per_objfile parameter.
16427 (read_addr_index): Use dwarf2_per_objfile from cu.
16428 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16429 call dw2_setup.
16430 (read_str_index): Use dwarf2_per_objfile from cu.
16431 (get_debug_line_section): Likewise.
16432 (read_formatted_entries): Add dwarf2_per_objfile parameter.
16433 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16434 (new_symbol_full): Use dwarf2_per_objfile from cu.
16435 (build_error_marker_type): Likewise.
16436 (lookup_die_type): Likewise.
16437 (determine_prefix): Likewise.
16438 (follow_die_offset): Likewise.
16439 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16440 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16441 (dwarf2_fetch_die_type_sect_off): Likewise.
16442 (dwarf2_get_die_type): Likewise.
16443 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16444 (get_signatured_type): Likewise.
16445 (get_DW_AT_signature_type): Likewise.
16446 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16447 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16448 (cu_debug_loc_section): Likewise.
16449 (fill_in_loclist_baton): Likewise.
16450 (dwarf2_symbol_mark_computed): Likewise.
16451 (dwarf2_find_containing_comp_unit): Change objfile parameter to
16452 dwarf2_per_objfile.
16453 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16454 parameter.
16455 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16456 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16457 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16458 (set_die_type): Use dwarf2_free_objfile from cu.
16459 (get_die_type_at_offset): Likewise.
16460 (dwarf2_per_objfile_free): Don't assign global variable.
16461 (debug_names) <constructor>: Add dwarf2_per_objfile
16462 parameter, update m_debugstrlookup construction.
16463 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16464 parameter.
16465 <m_dwarf2_per_objfile>: New field.
16466 <lookup>: Use m_dwarf2_per_objfile.
16467 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16468 (psyms_seen_size): Likewise.
16469 (write_gdbindex): Replace objfile parameter with
16470 dwarf2_per_objfile.
16471 (write_debug_names): Likewise.
16472 (write_psymtabs_to_index): Likewise.
16473 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16474 calls.
16475
16476 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16477
16478 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16479 <dwarf2_per_objfile>: New field.
16480 (struct dwarf2_per_cu_data) <objfile>: Remove.
16481 <dwarf2_per_objfile>: New field.
16482 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16483 of objfile.
16484 (create_signatured_type_table_from_index): Likewise.
16485 (create_debug_type_hash_table): Likewise.
16486 (fill_in_sig_entry_from_dwo_entry): Likewise.
16487 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16488 (create_type_unit_group): Assign dwarf2_per_objfile instead of
16489 objfile.
16490 (create_partial_symtab): Access objfile through
16491 dwarf2_per_objfile.
16492 (process_psymtab_comp_unit_reader): Likewise.
16493 (read_comp_units_from_section): Likewise.
16494 (scan_partial_symbols): Likewise.
16495 (add_partial_symbol): Likewise.
16496 (add_partial_subprogram): Likewise.
16497 (peek_die_abbrev): Likewise.
16498 (fixup_go_packaging): Likewise.
16499 (process_full_comp_unit): Likewise.
16500 (process_full_type_unit): Likewise.
16501 (process_imported_unit_die): Likewise.
16502 (dwarf2_compute_name): Likewise.
16503 (dwarf2_physname): Likewise.
16504 (read_import_statement): Likewise.
16505 (create_cus_hash_table): Assign dwarf2_physname instead of
16506 objfile.
16507 (read_func_scope): Access objfile through dwarf2_per_objfile.
16508 (read_lexical_block_scope): Likewise.
16509 (read_call_site_scope): Likewise.
16510 (read_variable): Likewise.
16511 (dwarf2_rnglists_process): Likewise.
16512 (dwarf2_ranges_process): Likewise.
16513 (dwarf2_ranges_read): Likewise.
16514 (dwarf2_record_block_ranges): Likewise.
16515 (dwarf2_add_field): Likewise.
16516 (dwarf2_add_member_fn): Likewise.
16517 (read_structure_type): Likewise.
16518 (process_structure_scope): Likewise.
16519 (read_enumeration_type): Likewise.
16520 (read_array_type): Likewise.
16521 (read_common_block): Likewise.
16522 (read_namespace_type): Likewise.
16523 (read_namespace): Likewise.
16524 (read_module_type): Likewise.
16525 (read_tag_pointer_type): Likewise.
16526 (read_tag_ptr_to_member_type): Likewise.
16527 (read_tag_string_type): Likewise.
16528 (read_subroutine_type): Likewise.
16529 (read_typedef): Likewise.
16530 (read_base_type): Likewise.
16531 (attr_to_dynamic_prop): Likewise.
16532 (read_subrange_type): Likewise.
16533 (read_unspecified_type): Likewise.
16534 (load_partial_dies): Likewise.
16535 (read_partial_die): Likewise.
16536 (find_partial_die): Likewise.
16537 (guess_partial_die_structure_name): Likewise.
16538 (fixup_partial_die): Likewise.
16539 (read_attribute_value): Likewise.
16540 (read_addr_index_from_leb128): Likewise.
16541 (dwarf2_read_addr_index): Likewise.
16542 (dwarf2_string_attr): Likewise.
16543 (lnp_state_machine::check_line_address): Likewise.
16544 (dwarf_decode_lines_1): Likewise.
16545 (dwarf_decode_lines): Likewise.
16546 (dwarf2_start_symtab): Likewise.
16547 (var_decode_location): Likewise.
16548 (new_symbol_full): Likewise.
16549 (dwarf2_const_value_data): Likewise.
16550 (dwarf2_const_value_attr): Likewise.
16551 (dwarf2_const_value): Likewise.
16552 (die_type): Likewise.
16553 (die_containing_type): Likewise.
16554 (lookup_die_type): Likewise.
16555 (guess_full_die_structure_name): Likewise.
16556 (anonymous_struct_prefix): Likewise.
16557 (dwarf2_name): Likewise.
16558 (follow_die_ref_or_sig): Likewise.
16559 (follow_die_offset): Likewise.
16560 (follow_die_ref): Likewise.
16561 (dwarf2_fetch_die_loc_sect_off): Likewise.
16562 (dwarf2_fetch_constant_bytes): Likewise.
16563 (dwarf2_fetch_die_type_sect_off): Likewise.
16564 (dwarf2_get_die_type): Likewise.
16565 (follow_die_sig): Likewise.
16566 (decode_locdesc): Likewise.
16567 (dwarf2_per_cu_objfile): Likewise.
16568 (dwarf2_per_cu_text_offset): Likewise.
16569 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16570 objfile.
16571 (set_die_type): Access objfile through
16572 dwarf2_per_objfile.
16573
16574 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16575
16576 * valprint.c (converted_character_d): Remove typedef.
16577 (DEF_VEC_O (converted_character_d)): Remove.
16578 (count_next_character): Use std::vector.
16579 (print_converted_chars_to_obstack): Likewise.
16580 (generic_printstr): Likewise.
16581
16582 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16583
16584 * xml-support.h (struct gdb_xml_value): Add constructor.
16585 <value>: Change type to unique_xmalloc_ptr.
16586 (gdb_xml_value_s): Remove typedef.
16587 (DEF_VEC_O (gdb_xml_value_s)): Remove.
16588 (gdb_xml_element_start_handler): Change parameter type to
16589 std::vector.
16590 (xml_find_attribute): Likewise.
16591 * xml-support.c (xml_find_attribute): Change parameter type to
16592 std::vector and adjust.
16593 (gdb_xml_values_cleanup): Remove.
16594 (gdb_xml_parser::start_element): Adjust to std::vector.
16595 (xinclude_start_include): Change paraeter type to std::vector
16596 and adjust.
16597 * btrace.c (check_xml_btrace_version): Likewise.
16598 (parse_xml_btrace_block): Likewise.
16599 (parse_xml_btrace_pt_config_cpu): Likewise.
16600 (parse_xml_btrace_pt): Likewise.
16601 (parse_xml_btrace_conf_bts): Likewise.
16602 (parse_xml_btrace_conf_pt): Likewise.
16603 * memory-map.c (memory_map_start_memory): Likewise.
16604 (memory_map_start_property): Likewise.
16605 * osdata.c (osdata_start_osdata): Likewise.
16606 (osdata_start_item): Likewise.
16607 (osdata_start_column): Likewise.
16608 * remote.c (start_thread): Likewise.
16609 * solib-aix.c (library_list_start_library): Likewise.
16610 (library_list_start_list): Likewise.
16611 * solib-svr4.c (library_list_start_library): Likewise.
16612 (svr4_library_list_start_list): Likewise.
16613 * solib-target.c (library_list_start_segment): Likewise.
16614 (library_list_start_section): Likewise.
16615 (library_list_start_library): Likewise.
16616 (library_list_start_list): Likewise.
16617 * tracepoint.c (traceframe_info_start_memory): Likewise.
16618 (traceframe_info_start_tvar): Likewise.
16619 * xml-syscall.c (syscall_start_syscall): Likewise.
16620 * xml-tdesc.c (tdesc_start_target): Likewise.
16621 (tdesc_start_feature): Likewise.
16622 (tdesc_start_reg): Likewise.
16623 (tdesc_start_union): Likewise.
16624 (tdesc_start_struct): Likewise.
16625 (tdesc_start_flags): Likewise.
16626 (tdesc_start_enum): Likewise.
16627 (tdesc_start_field): Likewise.
16628 (tdesc_start_enum_value): Likewise.
16629 (tdesc_start_vector): Likewise.
16630
16631 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16632
16633 * extension.h (struct xmethod_worker) <clone>: Remove.
16634 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16635 Remove.
16636 (python_xmethod_worker::clone): Remove.
16637 * valops.c (find_overload_match): Use std::move instead of
16638 clone.
16639
16640 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16641
16642 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16643 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16644 <free_xmethod_worker_data>: Remove.
16645 <get_matching_xmethod_workers>: Chance VEC to std::vector.
16646 <get_xmethod_arg_types>: Remove.
16647 <get_xmethod_result_type>: Remove.
16648 <invoke_xmethod>: Remove.
16649 * extension.c (new_xmethod_worker): Remove.
16650 (clone_xmethod_worker): Remove.
16651 (get_matching_xmethod_workers): Return void, pass std::vector by
16652 pointer.
16653 (get_xmethod_arg_types): Rename to...
16654 (xmethod_worker::get_arg_types): ... this, and adjust.
16655 (get_xmethod_result_type): Rename to...
16656 (xmethod_worker::get_result_type): ... this, and adjust.
16657 (invoke_xmethod): Remove.
16658 (free_xmethod_worker): Remove.
16659 (free_xmethod_worker_vec): Remove.
16660 * extension.h (enum ext_lang_rc): Move here from
16661 extension-priv.h.
16662 (struct xmethod_worker): Add constructor and destructor.
16663 <data>: Remove.
16664 <value>: Remove.
16665 <invoke, clone, do_get_result_type, do_get_arg_types>: New
16666 virtual pure methods.
16667 <get_arg_types, get_result_type>: New methods.
16668 (xmethod_worker_ptr): Remove typedef.
16669 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16670 (xmethod_worker_vec): Remove typedef.
16671 (xmethod_worker_up): New typedef.
16672 (invoke_xmethod): Remove.
16673 (clone_xmethod_worker): Remove.
16674 (free_xmethod_worker): Remove.
16675 (free_xmethod_worker_vec): Remove.
16676 (get_xmethod_arg_types): Remove.
16677 (get_xmethod_result_type): Remove.
16678 * valops.c (find_method_list): Use std::vector, don't use
16679 intermediate vector.
16680 (value_find_oload_method_list): Use std::vector.
16681 (find_overload_match): Use std::vector.
16682 (find_oload_champ): Use std::vector.
16683 * value.c (value_free): Use operator delete.
16684 (value_of_xmethod): Rename to...
16685 (value_from_xmethod): ... this. Don't assign
16686 xmethod_worker::value, take rvalue-reference.
16687 (result_type_of_xmethod): Adjust.
16688 (call_xmethod): Adjust.
16689 * value.h: Include extension.h.
16690 (struct xmethod_worker): Don't forward-declare.
16691 (value_of_xmethod): Rename to...
16692 (value_from_xmethod): ... this, take rvalue-reference.
16693 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16694 (struct python_xmethod_worker): ... this, add constructor and
16695 destructor.
16696 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16697 (gdbpy_free_xmethod_worker_data): Rename to...
16698 (python_xmethod_worker::~python_xmethod_worker): ... this and
16699 adjust.
16700 (gdbpy_clone_xmethod_worker_data): Rename to...
16701 (python_xmethod_worker::clone): ... this and adjust.
16702 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16703 temporary vector.
16704 (gdbpy_get_xmethod_arg_types): Rename to...
16705 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16706 (gdbpy_get_xmethod_result_type): Rename to...
16707 (python_xmethod_worker::do_get_result_type): ... this and
16708 adjust.
16709 (gdbpy_invoke_xmethod): Rename to...
16710 (python_xmethod_worker::invoke): ... this and adjust.
16711 (new_python_xmethod_worker): Rename to...
16712 (python_xmethod_worker::python_xmethod_worker): ... this and
16713 adjust.
16714 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16715 Remove.
16716 (gdbpy_free_xmethod_worker_data): Remove.
16717 (gdbpy_get_matching_xmethod_workers): Use std::vector.
16718 (gdbpy_get_xmethod_arg_types): Remove.
16719 (gdbpy_get_xmethod_result_type): Remove.
16720 (gdbpy_invoke_xmethod): Remove.
16721 * python/python.c (python_extension_ops): Remove obsolete
16722 callbacks.
16723
16724 2018-01-05 Pedro Alves <palves@redhat.com>
16725
16726 PR gdb/18653
16727 * common/signals-state-save-restore.c
16728 (save_original_signals_state): New parameter 'quiet'. Warn if we
16729 find a custom handler preinstalled, instead of internal erroring.
16730 But only warn if !quiet.
16731 * common/signals-state-save-restore.h
16732 (save_original_signals_state): New parameter 'quiet'.
16733 * main.c (captured_main_1): Move save_original_signals_state call
16734 after option handling, and pass QUIET.
16735
16736 2018-01-05 Pedro Alves <palves@redhat.com>
16737
16738 * spu-tdep.c (spu_catch_start): Pass
16739 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16740
16741 2018-01-05 Pedro Alves <palves@redhat.com>
16742
16743 PR gdb/22670
16744 * ada-lang.c (literal_symbol_name_matcher): New function.
16745 (ada_get_symbol_name_matcher): Use it for
16746 symbol_name_match_type::SEARCH_NAME.
16747 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
16748 it down instead of assuming symbol_name_match_type::FULL.
16749 * block.h (block_lookup_symbol): New parameter 'match_type'.
16750 * c-valprint.c (print_unpacked_pointer): Use
16751 lookup_symbol_search_name instead of lookup_symbol.
16752 * compile/compile-object-load.c (get_out_value_type): Pass down
16753 symbol_name_match_type::SEARCH_NAME.
16754 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16755 symbol_name_match_type::FULL.
16756 * cp-support.c (cp_get_symbol_name_matcher): Handle
16757 symbol_name_match_type::SEARCH_NAME.
16758 * infrun.c (insert_exception_resume_breakpoint): Use
16759 lookup_symbol_search_name.
16760 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16761 * psymtab.c (maintenance_check_psymtabs): Use
16762 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16763 * stack.c (print_frame_args): Use lookup_symbol_search_name and
16764 SYMBOL_SEARCH_NAME.
16765 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16766 if symbol_name_match_type::SEARCH_NAME.
16767 (lookup_symbol_in_language): Pass down
16768 symbol_name_match_type::FULL.
16769 (lookup_symbol_search_name): New.
16770 (lookup_language_this): Pass down
16771 symbol_name_match_type::SEARCH_NAME.
16772 (lookup_symbol_aux, lookup_local_symbol): New parameter
16773 'match_type'. Pass it down.
16774 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16775 (lookup_symbol_search_name): New declaration.
16776 (lookup_symbol_in_block): New 'match_type' parameter.
16777
16778 2018-01-05 Pedro Alves <palves@redhat.com>
16779
16780 PR gdb/22670
16781 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16782 ada_lookup_symbol.
16783 (ada_lookup_symbol): Reimplement in terms of
16784 ada_lookup_symbol_list, bits factored out from
16785 ada_lookup_encoded_symbol.
16786
16787 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16788
16789 * ada-exp.y (write_object_renaming): When subscripting an array
16790 using a symbol as the index, pass the block in call to
16791 ada_lookup_encoded_symbol when looking that symbol up.
16792
16793 2018-01-05 Jerome Guitton <guitton@adacore.com>
16794
16795 * ada-lang.c (ada_array_length): Use ada_index_type instead of
16796 TYPE_INDEX_TYPE.
16797
16798 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16799
16800 * ada-lang.c (ada_to_fixed_value_create): Add handling of
16801 the case where VALUE_LVAL (val0) is not lval_memory.
16802
16803 2018-01-05 Xavier Roirand <roirand@adacore.com>
16804
16805 * ada-valprint.c (print_optional_low_bound): Handle
16806 character-indexed array printing like boolean-indexed array
16807 printing.
16808
16809 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16810
16811 * NEWS: Create a new section for the next release branch.
16812 Rename the section of the current branch, now that it has
16813 been cut.
16814
16815 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16816
16817 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16818 * version.in: Bump version to 8.1.50.DATE-git.
16819
16820 2018-01-03 Xavier Roirand <roirand@adacore.com>
16821
16822 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16823 Add field.
16824 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16825 Add field.
16826 (default_exception_support_info) <catch_handlers_sym>: Add field.
16827 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16828 (ada_exception_name_addr_1): Add "catch handlers" handling.
16829 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16830 Update all callers.
16831 (create_excep_cond_exprs) <ex>: Add parameter.
16832 (re_set_exception): Update create_excep_cond_exprs call.
16833 (print_it_exception, print_one_exception, print_mention_exception)
16834 (print_recreate_exception): Add "catch handler" handling.
16835 (allocate_location_catch_handlers, re_set_catch_handlers)
16836 (check_status_catch_handlers, print_it_catch_handlers)
16837 (print_one_catch_handlers, print_mention_catch_handlers)
16838 (print_recreate_catch_handlers): New function.
16839 (catch_handlers_breakpoint_ops): New variable.
16840 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16841 Add parameter. Add "catch handler" handling.
16842 (ada_exception_sym_name, ada_exception_breakpoint_ops):
16843 Add "catch handler" handling.
16844 (ada_exception_catchpoint_cond_string): Add "catch handler"
16845 handling.
16846 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16847 call.
16848 (catch_ada_handlers_command): New function.
16849 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16850 operations structure.
16851 (_initialize_ada_language): Add "catch handlers" command entry.
16852 * NEWS: Document "catch handlers" feature.
16853
16854 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16855
16856 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16857 account when creating the array type of the slice.
16858 (ada_value_slice): Likewise.
16859
16860 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16861
16862 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16863 New enum value.
16864 (create_array_type_with_stride): Add byte_stride_prop parameter.
16865 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16866 New parameter. Update all callers in this file.
16867 (array_type_has_dynamic_stride): New function.
16868 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16869 of arrays with dynamic byte strides.
16870 * dwarf2read.c (read_array_type): Add support for dynamic
16871 DW_AT_byte_stride attributes.
16872
16873 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16874
16875 * dwarf2read.c (read_unspecified_type): Treat
16876 DW_TAG_enumeration_type DIEs from Ada units as stubs.
16877
16878 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16879
16880 Update copyright year range in all GDB files.
16881
16882 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
16883
16884 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16885 and gdb/testsuite/gdb.base/step-line.c.
16886
16887 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16888
16889 * copyright.py (main): Dump the contents of
16890 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16891 even if BY_HAND is empty.
16892
16893 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16894
16895 * top.c (print_gdb_version): Update Copyright year in version
16896 message.
16897
16898 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16899
16900 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16901
16902 For older changes see ChangeLog-2017.
16903 \f
16904 Local Variables:
16905 mode: change-log
16906 left-margin: 8
16907 fill-column: 74
16908 version-control: never
16909 coding: utf-8
16910 End:
This page took 0.360267 seconds and 5 git commands to generate.