gdb: Extend the comments in c-exp.y
[binutils-gdb.git] / gdb / ChangeLog
1 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 PR gdb/13368
4 * c-exp.y (typebase): Extend the comment.
5 (ident_tokens): Likewise.
6
7 2018-12-18 Tom Tromey <tom@tromey.com>
8
9 * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take
10 address of sect_off.
11
12 2018-12-23 Joel Brobecker <brobecker@adacore.com>
13
14 GDB 8.2.1 released.
15
16 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
17
18 * riscv-tdep.c (riscv_call_arg_struct): Don't adjust size before
19 assigning locations.
20 (riscv_return_value): Take more care not to read/write outside of
21 argument buffer. Cast return value between the declared type and
22 the abi type.
23
24 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
25
26 * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
27 fflags, and frm registers.
28
29 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
30
31 * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
32 (riscv_gdbarch_init): Register new function with gdbarch.
33 * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
34
35 2018-12-21 Simon Marchi <simon.marchi@ericsson.com>
36
37 * minsyms.c (mst_str): New.
38 (minimal_symbol_reader::record_full): Add debug output.
39
40 2018-12-21 John Baldwin <jhb@FreeBSD.org>
41
42 * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
43 equal PL_FLAG_SI.
44 (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
45
46 2018-12-21 Paul Marechal <paul.marechal@ericsson.com>
47
48 PR gdb/23974
49 * target.c (target_read_stralloc): Check for empty vector.
50
51 2018-12-21 Дилян Палаузов <dilyan.palauzov@aegee.org>
52
53 * top.c (print_gdb_configuration): Print "--without-python"
54 if GDB was configured without Python.
55
56 2018-12-21 Andrew Burgess <andrew.burgess@embecosm.com>
57
58 * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
59 a signed offset as a string.
60
61 2018-12-21 Dave Murphy <davem@devkitpro.org>
62
63 * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
64 initialise.
65 * probe.c (any_static_probe_ops): Ditto.
66 * record-btrace.c (record_btrace_thread_observer_token): Ditto.
67 * stap-probe.c (stap_static_probe_ops): Ditto.
68 * tui/tui-hooks.c (tui_observers_token): Ditto.
69 * unittests/observable-selftests.c (token1, token2, token3): Ditto.
70
71 2018-12-19 Andrew Burgess <andrew.burgess@embecosm.com>
72
73 * gdb/dummy-frame.c (default_dummy_id): Defined new function.
74 * gdb/dummy-frame.h (default_dummy_id): Declare new function.
75 * gdb/frame-unwind.c (default_unwind_pc): Define new function.
76 (default_unwind_sp): Define new function.
77 * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
78 (default_unwind_sp): Declare new function.
79 * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
80 available.
81 (get_frame_sp): Assume that gdbarch_unwind_sp is available.
82 * gdb/gdbarch.c: Regenerate.
83 * gdb/gdbarch.h: Regenerate.
84 * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
85 unwind_sp. Add additional header files to be included in
86 generated file.
87
88 2018-12-19 Dimitar Dimitrov <dimitar@dinux.eu>
89
90 * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
91 sp clobbers.
92
93 2018-12-17 Andrew Burgess <andrew.burgess@embecosm.com>
94
95 * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
96 'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
97 'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
98 'processing_has_namespace_info' from unsigned int to bool. Update
99 comments.
100 (producer_is_icc_lt_14): Update return type.
101 (producer_is_gcc_lt_4_3): Likewise.
102 (producer_is_gxx_lt_4_6): Likewise.
103 (process_die): Write true instead of 1 into predicate fields.
104 (dwarf2_start_symtab): Likewise.
105 (var_decode_location): Likewise.
106 (dwarf2_mark_helper): Likewise.
107 (dwarf2_mark): Likewise.
108 (dwarf2_clear_marks): Write false instead of 0 into predicate
109 field.
110 (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
111 0.
112
113 2018-12-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
114
115 * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
116 asm/sigcontext.h.
117
118 2018-12-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
119
120 * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
121 warning trailing new line.
122
123 2018-12-16 Philippe Waroquiers <philippe.waroquiers@skynet.be>
124
125 * nat/linux-ptrace.c (kill_child): New function.
126 (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
127 Add a call to kill_child in case of early return after fork.
128 (linux_check_ptrace_features): Use kill_child instead of local code.
129 (linux_test_for_tracefork): Likewise.
130
131 2018-12-14 Tom Tromey <tom@tromey.com>
132
133 * Makefile.in: Remove "alloca" comment.
134 (INFOFILES): Remove.
135 (local-maintainer-clean): Don't use INFOFILES.
136
137 2018-12-13 John Baldwin <jhb@FreeBSD.org>
138
139 * syscalls/update-freebsd.sh: New file.
140 * syscalls/freebsd.xml: Regenerate.
141
142 2018-12-13 John Baldwin <jhb@FreeBSD.org>
143
144 * NEWS: Add entry documenting system call aliases.
145 * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
146 to get_syscalls_by_name.
147 * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
148 * gdbarch.h: Regenerate.
149 * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
150 * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
151 from get_syscall_by_name. Now accepts a pointer to a vector of
152 integers and returns a bool.
153 [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
154 (syscall_create_syscall_desc): Add alias parameter and pass it to
155 syscall_desc constructor.
156 (syscall_start_syscall): Handle alias attribute.
157 (syscall_attr): Add alias attribute.
158 (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
159 Now accepts a pointer to a vector of integers and returns a
160 bool. Add syscalls whose alias or name matches the requested
161 name.
162 (get_syscalls_by_name): Rename from get_syscall_by_name. Now
163 accepts a pointer to a vector of integers and returns a bool.
164 * xml-syscall.h (get_syscalls_by_name): Likewise.
165
166 2018-12-13 John Baldwin <jhb@FreeBSD.org>
167
168 * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
169 to get_syscalls_by_group.
170 * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
171 false.
172 [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
173 numbers to an existing vector of integers and return a bool.
174 (get_syscalls_by_group): Accept pointer to vector of integers
175 and change return type to bool.
176 * xml-syscall.h (get_syscalls_by_group): Likewise.
177
178 2018-12-13 Jim Wilson <jimw@sifive.com>
179
180 * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
181 comment for SD field, and correct xlen calculation. For MISA, add
182 comment for MXL field, add call to register_size, and correct base
183 calculation.
184
185 2018-12-13 Stafford Horne <shorne@gmail.com>
186
187 * NEWS(New targets): Add or1k*-*-linux*.
188
189 2018-12-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
190
191 * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
192 declare on one line to fix ARI warning.
193
194 2018-12-12 Andrew Burgess <andrew.burgess@embecosm.com>
195
196 * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
197 (infcall_suspend_state::registers): New.
198 (infcall_suspend_state::restore): New.
199 (infcall_suspend_state::thread_suspend): Rename to...
200 (infcall_suspend_state::m_thread_suspend): ...this.
201 (infcall_suspend_state::registers): Rename to...
202 (infcall_suspend_state::m_registers): ...this.
203 (infcall_suspend_state::siginfo_gdbarch): Rename to...
204 (infcall_suspend_state::m_siginfo_gdbarch): ...this.
205 (infcall_suspend_state::siginfo_data): Rename to...
206 (infcall_suspend_state::m_siginfo_data): ...this.
207 (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
208 constructor.
209 (restore_infcall_suspend_state): Rewrite to use
210 infcall_suspend_state::restore method.
211 (get_infcall_suspend_state_regcache): Use
212 infcall_suspend_state::registers method.
213
214 2018-12-12 Andrew Burgess <andrew.burgess@embecosm.com>
215
216 * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
217 arguments are passed in integer registers.
218 (riscv_call_arg_complex_float): Likewise.
219
220 2018-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
221
222 * nat/linux-osdata.c (common_getter): New function.
223 (struct osdata_type): Change getter to take_snapshot.
224 Add LONGEST len_avail and struct buffer buffer.
225 Change all elements in the initializer.
226 Add an element for the list of types.
227 (linux_xfer_osdata_info_os_types): New function.
228 (linux_common_xfer_osdata): Use common_getter for the list of types.
229 Replace getter call by common_getter.
230 (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
231 Add arg BUFFER. Only keep the code that adds data in BUFFER.
232 (linux_xfer_osdata_fds): Likewise.
233 (linux_xfer_osdata_modules): Likewise.
234 (linux_xfer_osdata_msg): Likewise.
235 (linux_xfer_osdata_processes): Likewise.
236 (linux_xfer_osdata_processgroups): Likewise.
237 (linux_xfer_osdata_sem): Likewise.
238 (linux_xfer_osdata_shm): Likewise.
239 (linux_xfer_osdata_isockets): Likewise.
240 (linux_xfer_osdata_threads): Likewise.
241
242 2018-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
243
244 * nat/linux-osdata.c: Removed various trailing spaces.
245
246 2018-12-10 Andrew Burgess <andrew.burgess@embecosm.com>
247
248 * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
249 leading whitespace before #include line.
250
251 2018-12-08 Simon Marchi <simon.marchi@ericsson.com>
252 Дилян Палаузов <dilyan.palauzov@aegee.org>
253
254 PR gdb/23950
255 * configure.ac: Search for tgetent in libtinfow.
256 * configure: Re-generate.
257
258 2018-12-08 Philippe Waroquiers <philippe.waroquiers@skynet.be>
259
260 * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
261 (thread_db_err_str): Forward declare.
262 (delete_thread_db_info): Call td_ta_delete_p if available.
263 (try_thread_db_load_1): Acquire td_ta_delete address.
264 * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
265
266 2018-12-08 Pedro Alves <palves@redhat.com>
267
268 * source.c (forward_search_command): Rename to ...
269 (search_command_helper): ... this. Add 'forward' parameter.
270 Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
271 buffer. Handle backward searches too.
272 (forward_search_command, reverse_search_command): Reimplement by
273 calling search_command_helper.
274
275 2018-12-07 Andrew Burgess <andrew.burgess@embecosm.com>
276
277 * .dir-locals.el: Copy most of the settings from c-mode over to
278 c++-mode.
279
280 2018-12-08 Stafford Horne <shorne@gmail.com>
281
282 * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
283 * configure.tgt: Add or1k*-*-linux*.
284 * or1k-linux-tdep.c: New file.
285 * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
286
287 2018-12-07 Pedro Alves <palves@redhat.com>
288
289 * dwarf2read.c (get_gdb_index_contents_from_section): Use
290 gdb::make_array_view.
291
292 2018-12-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
293
294 * language.c (_initialize_language): Fix leak by assigning
295 a static string to language. Same for range and case_sensitive,
296 even if no leak is detected for these variables.
297
298 2018-12-05 John Baldwin <jhb@FreeBSD.org>
299
300 * configure: Re-generate.
301 * configure.ac: Use separate sed expressions to escape variables
302 in auto-load directories.
303
304 2018-12-05 Andrew Burgess <andrew.burgess@embecosm.com>
305
306 * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
307 (riscv_find_default_target_description): Use new function to
308 extract feature from gdbarch_info.
309 (riscv_gdbarch_init): Add error checks for xlen and flen between
310 target description and bfd headers. Be smarter about when we
311 think the hardware floating point abi should be used.
312
313 2018-12-05 Alan Hayward <alan.hayward@arm.com>
314
315 * nat/aarch64-linux-hw-point.c
316 (aarch64_linux_any_set_debug_regs_state): New function.
317 * nat/aarch64-linux-hw-point.h
318 (aarch64_linux_any_set_debug_regs_state): New declaration.
319 * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
320 BPs or WPs are set.
321
322 2018-11-30 John Baldwin <jhb@FreeBSD.org>
323
324 * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
325 (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
326
327 2018-11-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
328 Simon Marchi <simon.marchi@ericsson.com>
329
330 * linespec.c (symtab_vector_up): Remove.
331 (symtabs_from_filename): Change return type to std::vector.
332 (collect_symtabs_from_filename): Likewise.
333 (create_sals_line_offset): Assign return value of
334 collect_symtabs_from_filename to *ls->file_symtabs.
335 (convert_explicit_location_to_linespec): Remove call to release.
336 (parse_linespec): Likewise.
337 (symtab_collector) <symtab_collector>: Remove initialization of
338 m_symtabs.
339 <release_symtabs>: Change return type to std::vector<symtab *>.
340 <operator ()>: Adjust.
341
342 2018-11-30 John Baldwin <jhb@FreeBSD.org>
343
344 * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
345 defined.
346 (union sigval32, struct siginfo32, fbsd_siginfo_size)
347 (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
348 of KERN_PROC_AUXV and PT_LWPINFO.
349 (fbsd_nat_target::xfer_partial): Define method unconditionally.
350 Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
351 Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
352 Make TARGET_OBJECT_FREEBSD_VMMAP and
353 TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
354 and KERN_PROC_PS_STRINGS.
355 * fbsd-nat.h: Include <sys/proc.h>.
356 (fbsd_nat_target::xfer_partial): Declare method unconditionally.
357
358 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
359
360 * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
361 header files.
362 (riscv_linux_nat_target::read_description): New method.
363
364 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
365
366 * arch/riscv.h (riscv_gdbarch_features::hash): New method.
367 * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
368 (riscv_tdesc_cache): New global.
369 (riscv_create_target_description): Look in the cache before
370 creating a new target description.
371
372 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
373
374 * arch/riscv.h (riscv_gdb_features::operator==): New.
375 (riscv_gdb_features::operator!=): New.
376 * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
377 operator.
378
379 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
380
381 * arch/riscv.h (riscv_create_target_description): Make return type
382 const.
383 * arch/riscv.c (riscv_create_target_description): Likewise.
384 * riscv-tdep.c (riscv_find_default_target_description): Likewise.
385
386 2018-11-30 Jan Kratochvil <jan.kratochvil@redhat.com>
387 Keith Seitz <keiths@redhat.com>
388 Tom Tromey <tom@tromey.com>
389 Sergio Durigan Junior <sergiodj@redhat.com>
390
391 https://bugzilla.redhat.com/show_bug.cgi?id=1613614
392 * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
393 'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
394 inside the CU.
395
396 2018-11-30 Pedro Alves <palves@redhat.com>
397
398 * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
399 <stratum>: New override.
400 * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
401 <stratum>: New override.
402 * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
403 <stratum>: New override.
404 * exec.c (exec_target) <exec_target>: Delete.
405 <stratum>: New override.
406 * gdbarch-selftests.c (register_to_value_test): Adjust to use the
407 stratum method instead of the to_stratum field.
408 * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
409 <stratum>: New override.
410 (thread_db_target::thread_db_target): Delete.
411 * make-target-delegates (print_class): Don't print a ctor
412 declaration. Print a stratum method override declaration.
413 * process-stratum-target.h (process_stratum_target)
414 <process_stratum_target>: Delete.
415 <stratum>: New override.
416 * ravenscar-thread.c (ravenscar_thread_target)
417 <ravenscar_thread_target>: Delete.
418 <stratum>: New override.
419 * record-btrace.c (record_btrace_target)
420 <record_btrace_target>: Delete.
421 <stratum>: New override.
422 * record-full.c (record_full_base_target)
423 <record_full_base_target>: Delete.
424 <stratum>: New override.
425 * record.c (record_disconnect, record_detach)
426 (record_mourn_inferior, record_kill): Adjust to use the stratum
427 method instead of the to_stratum field.
428 * regcache.c (cooked_read_test, cooked_write_test): Likewise.
429 * sol-thread.c (sol_thread_target)
430 <sol_thread_target>: Delete.
431 <stratum>: New override.
432 * spu-multiarch.c (spu_multiarch_target)
433 <spu_multiarch_target>: Delete.
434 <stratum>: New override.
435 * target-delegates.c: Regenerate.
436 * target.c (target_stack::push, target_stack::unpush)
437 (pop_all_targets_above, pop_all_targets_at_and_above)
438 (info_target_command, target_require_runnable)
439 (target_stack::find_beneath): Adjust to use the stratum method
440 instead of the to_stratum field.
441 (dummy_target::dummy_target): Delete.
442 (dummy_target::stratum): New.
443 (debug_target::debug_target): Delete.
444 (debug_target::stratum): New.
445 (maintenance_print_target_stack): Adjust to use the stratum method
446 instead of the to_stratum field.
447 * target.h (struct target_ops) <stratum>: New method.
448 <to_stratum>: Delete.
449 <is_pushed>: Adjust to use the stratum method
450 instead of the to_stratum field.
451
452 2018-11-30 Pedro Alves <palves@redhat.com>
453
454 * corelow.c (core_target) <has_all_memory, has_execution>: New
455 overrides.
456 * inf-child.c (inf_child_target::has_all_memory)
457 (inf_child_target::has_memory, inf_child_target::has_stack)
458 (inf_child_target::has_registers)
459 (inf_child_target::has_execution): Delete.
460 * inf-child.h (inf_child_target) <has_all_memory, has_memory,
461 has_stack, has_registers, has_execution>: Delete.
462 * process-stratum-target.c
463 (process_stratum_target::has_all_memory)
464 (process_stratum_target::has_memory)
465 (process_stratum_target::has_stack)
466 (process_stratum_target::has_registers)
467 (process_stratum_target::has_execution): New.
468 * process-stratum-target.h (process_stratum_target)
469 <has_all_memory, has_memory, has_stack, has_registers,
470 has_execution>: New method overrides.
471 * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
472 has_memory, has_stack, has_registers, has_execution>: Delete.
473 * remote-sim.c (gdbsim_target) <has_stack, has_registers,
474 has_execution>: Delete.
475 * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
476 has_registers, has_execution>: Delete.
477 * target.c (default_child_has_all_memory)
478 (default_child_has_memory, default_child_has_stack)
479 (default_child_has_registers, default_child_has_execution):
480 Delete.
481 * target.h (default_child_has_all_memory)
482 (default_child_has_memory, default_child_has_stack)
483 (default_child_has_registers, default_child_has_execution):
484 Delete.
485 * tracefile.h (tracefile_target) <has_execution>: New override.
486
487 2018-11-30 Pedro Alves <palves@redhat.com>
488
489 * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
490 * bsd-kvm.c: Include "process-stratum-target.h".
491 (bsd_kvm_target): Now inherits from process_stratum_target.
492 (bsd_kvm_target::bsd_kvm_target): Default it.
493 * corelow.c: Include "process-stratum-target.h".
494 (core_target): Now inherits from process_stratum_target.
495 (core_target::core_target): Don't set to_stratum here.
496 * inf-child.c (inf_child_target::inf_child_target): Delete.
497 * inf-child.h: Include "process-stratum-target.h".
498 (inf_child_target): Inherit from process_stratum_target.
499 (inf_child_target) <inf_child_target>: Default it.
500 <can_async_p, supports_non_stop, supports_disable_randomization>:
501 Delete overrides.
502 * process-stratum-target.c: New file.
503 * process-stratum-target.h: New file.
504 * remote-sim.c: Include "process-stratum-target.h".
505 (gdbsim_target): Inherit from process_stratum_target.
506 <gdbsim_target>: Default it.
507 * remote.c: Include "process-stratum-target.h".
508 (remote_target): Inherit from process_stratum_target.
509 <remote_target>: Default it.
510 * target.c (default_thread_address_space)
511 (default_thread_architecture): Delete.
512 * target.h (target_ops) <thread_architecture>: Now returns NULL by
513 default.
514 <thread_address_space>: Ditto.
515 * test-target.h: Include "process-stratum-target.h" instead of
516 "target.h".
517 (test_target_ops): Inherit from process_stratum_target.
518 <test_target_ops>: Default it.
519 * tracefile.c (tracefile_target::tracefile_target): Delete.
520 * tracefile.h: Include "process-stratum-target.h".
521 (tracefile_target): Inherit from process_stratum_target.
522 <tracefile_target>: Default it.
523 * target-delegates.c: Regenerate.
524
525 2018-11-30 Pedro Alves <palves@redhat.com>
526
527 * Makefile.in (COMMON_SFILES): Add test-target.c.
528 * gdbarch-selftests.c: Include "test-target.h".
529 * regcache.c: Include "test-target.h".
530 * target.c (test_target_info, test_target_ops::info): Move to ...
531 * test-target.c: ... this new file.
532 * target.h (test_target_ops): Move to ...
533 * test-target.h: ... this new file.
534
535 2018-11-29 Philippe Waroquiers <philippe.waroquiers@skynet.be>
536
537 * source.c (forward_search_command): Fix leak by using
538 xrealloc even for the first allocation in the loop, as buf
539 is static.
540
541 2018-11-29 Rajendra SY <rajendra.sy@gmail.com>
542
543 PR gdb/23093
544 * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
545 (fbsd_gdb_signal_to_target): New.
546 (fbsd_init_abi): Install gdbarch "signal_from_target" and
547 "signal_to_target" methods.
548
549 2018-11-29 Tom Tromey <tom@tromey.com>
550
551 * valarith.c (value_x_unop): Don't set argvec[3].
552
553 2018-11-26 Simon Marchi <simon.marchi@ericsson.com>
554
555 PR gdb/23917
556 * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
557 semicolon.
558
559 2018-11-26 Pedro Alves <palves@redhat.com>
560
561 * procfs.c (procfs_notice_thread): Replace uses of
562 in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
563 * sol-thread.c (sol_thread_target::wait)
564 (sol_update_thread_list_callback): Likewise.
565
566 2018-11-25 Tom Tromey <tom@tromey.com>
567
568 * ui-out.c (ui_out::field_fmt): Remove comment.
569 * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
570 * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
571
572 2018-11-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
573
574 * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
575 leak in open_source_file' has been partially undone by '2179fbc36d23
576 Return scoped_fd from open_source_file'. Re-add the transfer of
577 current s->fullname to the unique_xmalloc_ptr fullname given
578 to find_and_open_source.
579
580 2018-11-23 Pedro Alves <palves@redhat.com>
581
582 * gdbthread.h (enum thread_state): Move comments here.
583 (is_running, is_stopped, is_exited): Remove declarations.
584
585 2018-11-22 Pedro Alves <palves@redhat.com>
586
587 * Makefile.in (COMMON_SFILES): Add thread-iter.c.
588 * breakpoint.c (breakpoints_should_be_inserted_now): Replace
589 ALL_NON_EXITED_THREADS with all_non_exited_threads.
590 (print_one_breakpoint_location): Replace ALL_INFERIORS with
591 all_inferiors.
592 * bsd-kvm.c: Include inferior.h.
593 * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
594 with all_non_exited_threads.
595 * common/filtered-iterator.h: New.
596 * common/safe-iterator.h: New.
597 * corelow.c (core_target_open): Don't call init_thread_list here.
598 * darwin-nat.c (thread_info_from_private_thread_info): Replace
599 ALL_THREADS with all_threads.
600 * fbsd-nat.c (fbsd_nat_target::resume): Replace
601 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
602 * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
603 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
604 * fork-child.c (postfork_hook): Don't call init_thread_list here.
605 * gdbarch-selftests.c (register_to_value_test): Adjust.
606 * gdbthread.h: Don't include "inferior.h" here.
607 (struct inferior): Forward declare.
608 (enum step_over_calls_kind): Moved here from inferior.h.
609 (thread_info::deletable): Definition moved to thread.c.
610 (find_thread_ptid (inferior *, ptid_t)): Declare.
611 (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
612 Include "thread-iter.h".
613 (all_threads, all_non_exited_threads, all_threads_safe): New.
614 (any_thread_p): Declare.
615 (thread_list): Delete.
616 * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
617 all_non_exited_threads.
618 (proceed_after_attach_callback): Delete.
619 (proceed_after_attach): Take an inferior pointer instead of an
620 integer PID. Adjust to use range-for.
621 (attach_post_wait): Pass down inferior pointer instead of pid.
622 Use range-for instead of ALL_NON_EXITED_THREADS.
623 (detach_command): Remove init_thread_list call.
624 * inferior-iter.h: New.
625 * inferior.c (struct delete_thread_of_inferior_arg): Delete.
626 (delete_thread_of_inferior): Delete.
627 (delete_inferior, exit_inferior_1): Use range-for with
628 inf->threads_safe() instead of iterate_over_threads.
629 (inferior_appeared): Call init_thread_list here.
630 (discard_all_inferiors): Use all_non_exited_inferiors.
631 (find_inferior_id, find_inferior_pid): Use all_inferiors.
632 (iterate_over_inferiors): Use all_inferiors_safe.
633 (have_inferiors, number_of_live_inferiors): Use
634 all_non_exited_inferiors.
635 (number_of_inferiors): Use all_inferiors and std::distance.
636 (print_inferior): Use all_inferiors.
637 * inferior.h: Include gdbthread.h.
638 (enum step_over_calls_kind): Moved to gdbthread.h.
639 (struct inferior) <thread_list>: New field.
640 <threads, non_exited_threads, threads_safe>: New methods.
641 (ALL_INFERIORS): Delete.
642 Include "inferior-iter.h".
643 (ALL_NON_EXITED_INFERIORS): Delete.
644 (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
645 functions.
646 * inflow.c (child_interrupt, child_pass_ctrlc): Replace
647 ALL_NON_EXITED_THREADS with all_non_exited_threads.
648 * infrun.c (follow_exec): Use all_threads_safe.
649 (clear_proceed_status, proceed): Use all_non_exited_threads.
650 (init_wait_for_inferior): Don't clear inline frame state here.
651 (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
652 all_threads instead of ALL_NON_EXITED_THREADS.
653 (random_pending_event_thread): Use all_non_exited_threads instead
654 of ALL_NON_EXITED_THREADS. Use a lambda for repeated code.
655 (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
656 instead of ALL_NON_EXITED_THREADS.
657 (handle_no_resumed): Use all_non_exited_threads instead of
658 ALL_NON_EXITED_THREADS. Use all_inferiors instead of
659 ALL_INFERIORS.
660 (restart_threads, switch_back_to_stepped_thread): Use
661 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
662 * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
663 all_inferiors.
664 (kill_unfollowed_fork_children): Use inf->non_exited_threads
665 instead of ALL_NON_EXITED_THREADS.
666 * linux-tdep.c (linux_make_corefile_notes): Use
667 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
668 * linux-thread-db.c (thread_db_target::update_thread_list):
669 Replace ALL_INFERIORS with all_inferiors.
670 (thread_db_target::thread_handle_to_thread_info): Use
671 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
672 * mi/mi-interp.c (multiple_inferiors_p): New.
673 (mi_on_resume_1): Simplify using all_non_exited_threads and
674 multiple_inferiors_p.
675 * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
676 instead of ALL_NON_EXITED_THREADS.
677 * nto-procfs.c (nto_procfs_target::open): Don't call
678 init_thread_list here.
679 * record-btrace.c (record_btrace_target_open)
680 (record_btrace_target::stop_recording)
681 (record_btrace_target::close)
682 (record_btrace_target::record_is_replaying)
683 (record_btrace_target::resume, record_btrace_target::wait)
684 (record_btrace_target::record_stop_replaying): Use
685 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
686 * record-full.c (record_full_wait_1): Use all_non_exited_threads
687 instead of ALL_NON_EXITED_THREADS.
688 * regcache.c (cooked_read_test): Remove reference to global
689 thread_list.
690 * remote-sim.c (gdbsim_target::create_inferior): Don't call
691 init_thread_list here.
692 * remote.c (remote_target::update_thread_list): Use
693 all_threads_safe instead of ALL_NON_EXITED_THREADS.
694 (remote_target::process_initial_stop_replies): Replace
695 ALL_INFERIORS with all_non_exited_inferiors and use
696 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
697 (remote_target::open_1): Don't call init_thread_list here.
698 (remote_target::append_pending_thread_resumptions)
699 (remote_target::remote_resume_with_hc): Use all_non_exited_threads
700 instead of ALL_NON_EXITED_THREADS.
701 (remote_target::commit_resume)
702 (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
703 with all_non_exited_inferiors and use all_non_exited_threads
704 instead of ALL_NON_EXITED_THREADS.
705 (remote_target::kill_new_fork_children): Use
706 all_non_exited_threads instead of ALL_NON_EXITED_THREADS. Remove
707 init_thread_list and init_wait_for_inferior calls.
708 (remote_target::remote_btrace_maybe_reopen)
709 (remote_target::thread_handle_to_thread_info): Use
710 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
711 * target.c (target_terminal::restore_inferior)
712 (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
713 all_non_exited_inferiors.
714 * thread-iter.c: New file.
715 * thread-iter.h: New file.
716 * thread.c: Include "inline-frame.h".
717 (thread_list): Delete.
718 (clear_thread_inferior_resources): Call clear_inline_frame_state.
719 (init_thread_list): Use all_threads_safe instead of
720 ALL_THREADS_SAFE. Adjust to per-inferior thread lists.
721 (new_thread): Adjust to per-inferior thread lists.
722 (add_thread_silent): Pass inferior to find_thread_ptid.
723 (thread_info::deletable): New, moved from the header.
724 (delete_thread_1): Adjust to per-inferior thread lists.
725 (find_thread_global_id): Use inf->threads().
726 (find_thread_ptid): Use find_inferior_ptid and pass inferior to
727 find_thread_ptid.
728 (find_thread_ptid(inferior*, ptid_t)): New overload.
729 (iterate_over_threads): Use all_threads_safe.
730 (any_thread_p): New.
731 (thread_count): Use all_threads and std::distance.
732 (live_threads_count): Use all_non_exited_threads and
733 std::distance.
734 (valid_global_thread_id): Use all_threads.
735 (in_thread_list): Use find_thread_ptid.
736 (first_thread_of_inferior): Adjust to per-inferior thread lists.
737 (any_thread_of_inferior, any_live_thread_of_inferior): Use
738 inf->non_exited_threads().
739 (prune_threads, delete_exited_threads): Use all_threads_safe.
740 (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
741 (set_resumed, set_running): Use all_non_exited_threads.
742 (is_thread_state, is_stopped, is_exited, is_running)
743 (is_executing): Delete.
744 (set_executing, set_stop_requested, finish_thread_state): Use
745 all_non_exited_threads.
746 (print_thread_info_1): Use all_inferiors and all_threads.
747 (thread_apply_all_command): Use all_non_exited_threads.
748 (thread_find_command): Use all_threads.
749 (update_threads_executing): Use all_non_exited_threads.
750 * tid-parse.c (parse_thread_id): Use inf->threads.
751 * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
752
753 2018-11-22 Pedro Alves <palves@redhat.com>
754
755 * infrun.c (follow_exec) <set follow-exec new>: Add thread and
756 switch to it before calling into try_open_exec_file.
757
758 2018-11-22 Pedro Alves <palves@redhat.com>
759
760 * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
761 inferior_thread instead of find_thread_ptid, and only when
762 inferior_ptid is not null_ptid.
763 * inferior.c (add_inferior): Don't include target_pid_to_str
764 output when the inferior is not started.
765 * python/py-inferior.c (python_on_normal_stop): Don't use
766 find_thread_ptid.
767 (tui_on_user_selected_context_changed): Use inferior_thread
768 instead of find_thread_ptid, and only when inferior_ptid is not
769 null_ptid.
770
771 2018-11-21 Benno Fünfstück <benno.fuenfstueck@gmail.com>
772
773 PR python/23714
774 * gdb/python/python.c (execute_gdb_command): Call
775 prevent_dont_repeat earlier to avoid affecting dont_repeat.
776
777 2018-11-21 Andrew Burgess <andrew.burgess@embecosm.com>
778
779 * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
780 (HFILES_NO_SRCDIR): Add arch/riscv.h.
781 * arch/riscv.c: New file.
782 * arch/riscv.h: New file.
783 * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
784 this list, and add arch/riscv.o.
785 * features/Makefile: Add riscv features.
786 * features/riscv/32bit-cpu.c: New file.
787 * features/riscv/32bit-cpu.xml: New file.
788 * features/riscv/32bit-csr.c: New file.
789 * features/riscv/32bit-csr.xml: New file.
790 * features/riscv/32bit-fpu.c: New file.
791 * features/riscv/32bit-fpu.xml: New file.
792 * features/riscv/64bit-cpu.c: New file.
793 * features/riscv/64bit-cpu.xml: New file.
794 * features/riscv/64bit-csr.c: New file.
795 * features/riscv/64bit-csr.xml: New file.
796 * features/riscv/64bit-fpu.c: New file.
797 * features/riscv/64bit-fpu.xml: New file.
798 * features/riscv/rebuild-csr-xml.sh: New file.
799 * riscv-tdep.c: Add 'arch/riscv.h' include.
800 (riscv_gdb_reg_names): Delete.
801 (csr_reggroup): New global.
802 (struct riscv_register_alias): Delete.
803 (struct riscv_register_feature): New structure.
804 (riscv_register_aliases): Delete.
805 (riscv_xreg_feature): New global.
806 (riscv_freg_feature): New global.
807 (riscv_virtual_feature): New global.
808 (riscv_csr_feature): New global.
809 (riscv_create_csr_aliases): New function.
810 (riscv_read_misa_reg): Delete.
811 (riscv_has_feature): Delete.
812 (riscv_isa_xlen): Simplify, just return cached xlen.
813 (riscv_isa_flen): Simplify, just return cached flen.
814 (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
815 (riscv_register_name): Update to make use of tdesc_register_name.
816 Look up xreg and freg names in the new globals riscv_xreg_feature
817 and riscv_freg_feature. Don't supply csr aliases here.
818 (riscv_fpreg_q_type): Delete.
819 (riscv_register_type): Use tdesc_register_type in almost all
820 cases, override the returned type in a few specific cases only.
821 (riscv_print_one_register_info): Handle errors reading registers.
822 (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
823 registers that are otherwise unknown to GDB. Also check the
824 csr_reggroup.
825 (riscv_print_registers_info): Remove assert about upper register
826 number, and use gdbarch_register_reggroup_p instead of
827 short-cutting.
828 (riscv_find_default_target_description): New function.
829 (riscv_check_tdesc_feature): New function.
830 (riscv_add_reggroups): New function.
831 (riscv_setup_register_aliases): New function.
832 (riscv_init_reggroups): New function.
833 (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
834 setup register groups. Register new riscv debug variable.
835 * riscv-tdep.h: Add 'arch/riscv.h' include.
836 (struct gdbarch_tdep): Remove abi union, and add
837 riscv_gdbarch_features field. Remove cached quad floating point
838 type, and provide initialisation for double type field.
839 * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
840 the list of targets using the feature based target descriptions.
841 * NEWS: Mention target description support.
842
843 2018-11-21 Pedro Alves <palves@redhat.com>
844
845 * valops.c (find_method_list, value_find_oload_method_list)
846 (find_overload_match, find_oload_champ): Rename parameters and
847 locals.
848
849 2018-11-21 Pedro Alves <palves@redhat.com>
850
851 * valops.c (find_method_list): Replace pointer and length
852 parameters with an gdb::array_view. Adjust.
853 (value_find_oload_method_list): Likewise.
854 (find_overload_match): Use gdb::array_view for methods list.
855 Adjust to find_oload_champ interface change.
856 (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
857 'num_fns' parameter now a size_t. Eliminate 'fn_count' local.
858
859 2018-11-21 Pedro Alves <palves@redhat.com>
860
861 * gdbtypes.c (compare_badness): Change type of parameters to const
862 reference. Adjust to badness_vector being a std::vector now.
863 (rank_function): Adjust to badness_vector being a std::vector now.
864 * gdbtypes.h (badness_vector): Now a typedef to std::vector.
865 (LENGTH_MATCH): Delete.
866 (compare_badness): Change type of parameters to const reference.
867 (rank_function): Return a badness_vector by value now.
868 (find_overload_match): Adjust to badness_vector being a
869 std::vector now. Remove cleanups.
870 (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
871 badness_vector pointer.
872 (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
873 a badness_vector pointer. Adjust to badness_vector being a
874 std::vector now. Remove cleanups.
875 (find_oload_champ): 'oload_champ_bv' parameter now
876 a badness_vector pointer. Adjust to badness_vector being a
877 std::vector now. Remove cleanups.
878
879 2018-11-21 Pedro Alves <palves@redhat.com>
880
881 * cp-support.c (sym_return_val_size, sym_return_val_index)
882 (sym_return_val): Delete.
883 (overload_list_add_symbol): Add std::vector parameter. Adjust to
884 add to the vector.
885 (make_symbol_overload_list): Adjust to return a std::vector
886 instead of maintaining a global open coded vector.
887 (make_symbol_overload_list_block): Add std::vector parameter.
888 (make_symbol_overload_list_block): Rename to ...
889 (add_symbol_overload_list_block): ... this and add std::vector
890 parameter.
891 (make_symbol_overload_list_namespace): Rename to ...
892 (add_symbol_overload_list_namespace): ... this and add std::vector
893 parameter.
894 (make_symbol_overload_list_adl_namespace): Rename to ...
895 (add_symbol_overload_list_adl_namespace): ... this and add
896 std::vector parameter.
897 (make_symbol_overload_list_adl): Delete.
898 (add_symbol_overload_list_adl): New.
899 (make_symbol_overload_list_using): Rename to ...
900 (add_symbol_overload_list_using): ... this and add std::vector
901 parameter.
902 (make_symbol_overload_list_qualified): Rename to ...
903 (add_symbol_overload_list_qualified): ... this and add std::vector
904 parameter.
905 * cp-support.h: Include "common/array-view.h" and <vector>.
906 (make_symbol_overload_list): Change return type to std::vector.
907 (make_symbol_overload_list_adl): Delete declaration.
908 (add_symbol_overload_list_adl): New declaration.
909 * valops.c (find_overload_match): Local 'oload_syms' now a
910 std::vector.
911 (find_oload_champ_namespace): 'oload_syms' parameter now a
912 std::vector pointer.
913 (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
914 std::vector pointer. Adjust to new make_symbol_overload_list
915 interface.
916
917 2018-11-21 Pedro Alves <palves@redhat.com>
918
919 * common/array-view.h (array_view::splice(size_type, size_t)): New.
920 (array_view::splice(size_type)): New.
921 * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
922 * extension.c (xmethod_worker::get_arg_types): Adjust to return an
923 std::vector.
924 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
925 * extension.h: Include "common/array-view.h".
926 (xmethod_worker::invoke): Adjust to use gdb::array_view.
927 (xmethod_worker::get_arg_types): Adjust to return an std::vector.
928 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
929 (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
930 (xmethod_worker::do_get_result_type): Adjust to use
931 gdb::array_view.
932 * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
933 * gdbtypes.h: Include "common/array-view.h".
934 (rank_function): Adjust to use gdb::array_view.
935 * python/py-xmethods.c (python_xmethod_worker::invoke)
936 (python_xmethod_worker::do_get_arg_types)
937 (python_xmethod_worker::do_get_result_type)
938 (python_xmethod_worker::invoke): Adjust to new interfaces.
939 * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
940 (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
941 * valops.c (find_overload_match, find_oload_champ_namespace)
942 (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
943 gdb:array_view and the new xmethod_worker interfaces.
944 * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
945 gdb::array_view.
946 * value.h (find_overload_match, result_type_of_xmethod)
947 (call_xmethod): Adjust to use gdb::array_view.
948 * unittests/array-view-selftests.c: Add slicing tests.
949
950 2018-11-21 Pedro Alves <palves@redhat.com>
951
952 * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
953 * common/array-view.h (make_array_view): New.
954 * compile/compile-object-run.c (compile_object_run): Adjust to
955 pass an array_view.
956 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
957 * eval.c (eval_call): Adjust to pass an array_view.
958 (evaluate_subexp_standard): Adjust to pass an array_view.
959 * gcore.c (call_target_sbrk): Adjust to pass an array_view.
960 * guile/scm-value.c (gdbscm_value_call): Likewise.
961 * infcall.c (push_dummy_code): Replace pointer + size parameters
962 with an array_view parameter.
963 (call_function_by_hand, call_function_by_hand_dummy): Likewise and
964 adjust.
965 * infcall.h: Include "common/array-view.h".
966 (call_function_by_hand, call_function_by_hand_dummy): Replace
967 pointer + size parameters with an array_view parameter.
968 * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
969 * linux-tdep.c (linux_infcall_mmap): Likewise.
970 * objc-lang.c (lookup_objc_class, lookup_child_selector)
971 (value_nsstring, print_object_command): Likewise.
972 * python/py-value.c (valpy_call): Likewise.
973 * rust-lang.c (rust_evaluate_funcall): Likewise.
974 * spu-tdep.c (flush_ea_cache): Likewise.
975 * valarith.c (value_x_binop, value_x_unop): Likewise.
976 * valops.c (value_allocate_space_in_inferior): Likewise.
977 * unittests/array-view-selftests.c (run_tests): Add
978 gdb::make_array_view test.
979
980 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
981
982 * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
983 than a fixed size buffer.
984
985 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
986
987 * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
988 and remove insertion of extra spaces in GDB's output.
989 * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
990 Layout field into a temporary buffer, and then output it as a
991 string field.
992
993 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
994
995 * NEWS: Document the language choice done by
996 'info [types|functions|variables]|rbreak'.
997
998 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
999
1000 * symtab.c (treg_matches_sym_type_name): Use
1001 scoped_switch_to_sym_language_if_auto instead of local logic.
1002 (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
1003 to switch to SYM language when language mode is auto.
1004
1005 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1006
1007 * language.h (scoped_switch_to_sym_language_if_auto): New class.
1008
1009 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1010
1011 * symtab.c (search_symbols): Properly check absence of type regexp
1012 before entering the loop scanning the minimal symbols.
1013
1014 2018-11-20 John Darrington <john@darrington.wattle.id.au>
1015
1016 * s12z-tdep.c (s12z_extract_return_value): New function.
1017 (inv_reg_perm) New array.
1018 (s12z_return_value): Populate readbuf if non-null.
1019
1020 2018-11-20 Eli Zaretskii <eliz@gnu.org>
1021
1022 * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
1023 with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
1024 to MinGW fixed by Gnulib.
1025 (O_NOINHERIT): Define if not defined.
1026
1027 2018-11-19 John Darrington <john@darrington.wattle.id.au>
1028
1029 * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1030
1031 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
1032
1033 * infrun.c (displaced_step_inferior_state) <next>: Remove.
1034
1035 2018-11-19 Tom Tromey <tom@tromey.com>
1036
1037 * source.c (get_filename_and_charpos): Return void.
1038
1039 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
1040
1041 * skip.c (_initialize_step_skip): Fix "info skip" help.
1042
1043 2018-11-16 Tom Tromey <tom@tromey.com>
1044
1045 PR rust/23625:
1046 * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1047
1048 2018-11-19 Simon Marchi <simon.marchi@ericsson.com>
1049
1050 * infrun.c (displaced_step_inferior_states): Change type to
1051 std::forward_list.
1052 (get_displaced_stepping_state): Adjust.
1053 (displaced_step_in_progress_any_inferior): Adjust.
1054 (add_displaced_stepping_state): Adjust.
1055 (remove_displaced_stepping_state): Adjust.
1056
1057 2018-11-18 Tom Tromey <tom@tromey.com>
1058
1059 PR build/23814:
1060 * target-delegates.c: Rebuild.
1061 * ia64-linux-nat.c (class ia64_linux_nat_target)
1062 <have_steppable_watchpoint>: Use override. Return true, not 1.
1063 (ia64_linux_nat_target::can_use_hw_breakpoint): Rename. Remove
1064 "self" argument.
1065 (ia64_linux_nat_target::low_new_thread): Rename.
1066 (class ia64_linux_nat_target) <read_description>: Don't declare.
1067 * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1068 bool.
1069
1070 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1071
1072 PR gdb/22736:
1073 * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1074 lang_struct_return code.
1075
1076 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1077
1078 * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1079 return_method.
1080 * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1081 * amd64-tdep.c (amd64_push_arguments): Likewise.
1082 (amd64_push_dummy_call): Likewise.
1083 * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1084 * arc-tdep.c (arc_push_dummy_call): Likewise.
1085 * arm-tdep.c (arm_push_dummy_call): Likewise.
1086 * avr-tdep.c (avr_push_dummy_call): Likewise.
1087 * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1088 * cris-tdep.c (cris_push_dummy_call): Likewise.
1089 * csky-tdep.c (csky_push_dummy_call): Likewise.
1090 * frv-tdep.c (frv_push_dummy_call): Likewise.
1091 * gdbarch.c: Regenerate.
1092 * gdbarch.h: Regenerate.
1093 * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1094 return_method.
1095 * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1096 * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1097 (hppa64_push_dummy_call): Likewise.
1098 * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1099 * i386-tdep.c (i386_push_dummy_call): Likewise.
1100 * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1101 * infcall.c (call_function_by_hand_dummy): Likewise.
1102 * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1103 * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1104 * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1105 * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1106 * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1107 * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1108 * mep-tdep.c (mep_push_dummy_call): Likewise.
1109 * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1110 (mips_n32n64_push_dummy_call): Likewise.
1111 (mips_o32_push_dummy_call): Likewise.
1112 (mips_o64_push_dummy_call): Likewise.
1113 * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1114 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1115 * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1116 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1117 * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1118 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1119 (ppc64_sysv_abi_push_dummy_call): Likewise.
1120 * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1121 (ppc64_sysv_abi_push_dummy_call): Likewise.
1122 * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1123 * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1124 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1125 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1126 * rx-tdep.c (rx_push_dummy_call): Likewise.
1127 * s390-tdep.c (s390_push_dummy_call): Likewise.
1128 * score-tdep.c (score_push_dummy_call): Likewise.
1129 * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1130 (sh_push_dummy_call_nofpu): Likewise.
1131 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1132 (sparc32_push_dummy_call): Likewise.
1133 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1134 (sparc64_push_dummy_call): Likewise.
1135 * spu-tdep.c (spu_push_dummy_call): Likewise.
1136 * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1137 * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1138 * v850-tdep.c (v850_push_dummy_call): Likewise.
1139 * vax-tdep.c (vax_push_dummy_call): Likewise.
1140 * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1141 * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1142
1143 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1144
1145 * gdbarch.sh (enum function_call_return_method): Add enum.
1146 * gdbarch.h: Regenerate.
1147 * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1148
1149 2018-11-15 Joel Brobecker <brobecker@adacore.com>
1150
1151 * unittests/copy_bitwise-selftests.c: New file.
1152 * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1153 (selftests::copy_bitwise_tests): Delete, moving this code to
1154 unittests/copy_bitwise-selftests.c instead.
1155 (_initialize_utils): Do not register copy_bitwise tests.
1156 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1157 unittests/copy_bitwise-selftests.c.
1158
1159 2018-11-14 Joel Brobecker <brobecker@adacore.com>
1160
1161 * ada-lang.c (move_bits): Delete. Update all callers to use
1162 copy_bitwise instead.
1163 * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1164 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1165 Move from here to utils.c.
1166 (_initialize_dwarf2loc): Remove call to register copy_bitwise
1167 selftests.
1168 * utils.h (copy_bitwise): Add declaration.
1169 * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1170 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1171 Moved here from dwarf2loc.c.
1172 (_initialize_utils): Register copy_bitwise selftests.
1173
1174 2018-11-14 Jim Wilson <jimw@sifive.com>
1175
1176 * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1177 (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1178 then increment next_regnum if odd.
1179 (riscv_arg_location): New arg is_unnamed. Set ainfo->is_unnamed.
1180 (riscv_push_dummy_call): New local ftype. Call check_typedef to set
1181 function type. Pass new arg to riscv_arg_location based on function
1182 type.
1183 (riscv_return_value): Pass new arg to riscv_arg_location.
1184
1185 * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1186 (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1187 of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1188
1189 * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1190 setting len. New local align, set to max of arg align and xlen,
1191 and pass to first riscv_assign_stack_location call.
1192
1193 2018-11-12 Simon Marchi <simon.marchi@polymtl.ca>
1194
1195 * skip.c (complete_skip_number): New function.
1196 (_initialize_step_skip): Add completers to some skip commands.
1197
1198 2018-11-09 Tom Tromey <tom@tromey.com>
1199
1200 * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1201 (struct remote_g_packet_data): Derive from allocate_on_obstack.
1202 <guesses>: Now a std::vector.
1203 (remote_g_packet_data_init, register_remote_g_packet_guess):
1204 Update.
1205 (remote_read_description_p): Update. Return bool.
1206 (remote_target::read_description): Update.
1207 (struct remote_g_packet_guess): Add constructor.
1208
1209 2018-11-09 Tom Tromey <tom@tromey.com>
1210
1211 * common/scoped_fd.h (class scoped_fd): Add move constructor and
1212 move assignment operator.
1213 * psymtab.c (psymtab_to_fullname): Update.
1214 * source.h (open_source_file): Return scoped_fd.
1215 (find_and_open_source): Likewise.
1216 * source.c (open_source_file): Return scoped_fd.
1217 (get_filename_and_charpos): Update.
1218 (print_source_lines_base): Update. Use scoped_fd::to_file.
1219 (forward_search_command): Likewise.
1220 (reverse_search_command): Likewise.
1221 (find_and_open_source): Return scoped_fd.
1222 * tui/tui-source.c (tui_set_source_content): Update. Use
1223 gdb_file_up.
1224
1225 2018-11-09 John Baldwin <jhb@FreeBSD.org>
1226
1227 * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1228 overflow.
1229
1230 2018-11-09 Hafiz Abid Qadeer <abidh@codesourcery.com>
1231
1232 * configure: Regenerate.
1233
1234 2018-11-09 Tom de Vries <tdevries@suse.de>
1235
1236 * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1237 unconditionally, to set the language of the symbol. Manage freeing
1238 returned pointer using gdb::unique_xmalloc_ptr.
1239
1240 2018-11-08 Tom Tromey <tom@tromey.com>
1241
1242 * record.c (require_record_target): Upper-case "<TAB>".
1243
1244 2018-11-08 Tom Tromey <tom@tromey.com>
1245
1246 * python/lib/gdb/command/pretty_printers.py
1247 (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1248
1249 2018-11-08 Tom Tromey <tom@tromey.com>
1250
1251 PR gdb/23555:
1252 PR gdb/23838:
1253 * target.h (target_supports_terminal_ours): Return bool.
1254 * target.c (target_supports_terminal_ours): Handle case where
1255 current_top_target returns nullptr. Return bool.
1256
1257 2018-11-08 Joel Brobecker <brobecker@adacore.com>
1258
1259 * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1260 return the correct count for potential HFAs.
1261
1262 2018-11-08 Jan Beulich <jbeulich@suse.com>
1263
1264 * i387-tdep.c (i387_supply_xsave): Split handling of
1265 X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1266 (i387_collect_xsave): Likewise.
1267
1268 2018-11-08 Andrew Burgess <andrew.burgess@embecosm.com>
1269
1270 * riscv-tdep.c (riscv_insn::decode): Update header comment.
1271 (riscv_frame_this_id): Catch errors thrown while building the
1272 frame cache, leave the frame id as the default, which is the outer
1273 frame id.
1274
1275 2018-11-07 Joel Brobecker <brobecker@adacore.com>
1276
1277 * ada-lang.c (read_atcb): Only set task_info->called_task if
1278 task_info->state == Entry_Caller_Sleep.
1279 (print_ada_task_info): Do not check task_info->state before
1280 checking task_info->called_task.
1281 (info_task): Likewise.
1282
1283 2018-11-07 Joel Brobecker <brobecker@adacore.com>
1284
1285 * ada-tasks.c (read_atcb): Clear task_info before computing
1286 the value of each of its fields.
1287
1288 2018-11-07 Andrew Burgess <andrew.burgess@embecosm.com>
1289
1290 * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1291 NULL before dereferencing it.
1292
1293 2018-11-06 Tom de Vries <tdevries@suse.de>
1294
1295 * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1296 program headers.
1297
1298 2018-11-06 Max Filippov <jcmvbkbc@gmail.com>
1299
1300 * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1301 so that it applies to uclinux as well.
1302
1303 2018-11-06 Marius Muench <marius.muench@eurecom.fr>
1304
1305 * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1306 when on AAPCS.
1307
1308 2018-11-06 John Baldwin <jhb@FreeBSD.org>
1309
1310 * riscv-fbsd-nat.c (getregs_supplies): Return true for
1311 RISCV_CSR_SSTATUS_REGNUM.
1312
1313 2018-11-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1314
1315 * source.c (open_source_file): Fix leak by transferring the
1316 current s->fullname to the unique_xmalloc_ptr fullname given
1317 to find_and_open_source.
1318
1319 2018-11-04 Tom Tromey <tom@tromey.com>
1320
1321 * varobj.c (install_default_visualizer): Update.
1322 * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1323 Return gdbpy_ref.
1324 * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1325 (find_pretty_printer_from_progspace)
1326 (find_pretty_printer_from_gdb, find_pretty_printer)
1327 (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1328 (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1329 Update.
1330
1331 2018-11-04 Tom Tromey <tom@tromey.com>
1332
1333 * python/python.c (gdbpy_parameter_value): Update.
1334 * python/python-internal.h (python_string_to_unicode)
1335 (python_string_to_target_python_string)
1336 (host_string_to_python_string): Return gdbpy_ref.
1337 * python/py-utils.c (python_string_to_unicode)
1338 (unicode_to_encoded_python_string)
1339 (unicode_to_target_python_string)
1340 (python_string_to_target_string)
1341 (python_string_to_target_python_string): Return gdbpy_ref.
1342 (python_string_to_host_string): Update.
1343 (host_string_to_python_string): Return gdbpy_ref.
1344 * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1345 (stpy_fullname): Update.
1346 * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1347 Update.
1348 * python/py-prettyprint.c (print_string_repr): Update.
1349 * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1350 (objfpy_get_build_id): Update.
1351 * python/py-breakpoint.c (bppy_get_location)
1352 (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1353 Update.
1354
1355 2018-11-04 Tom Tromey <tom@tromey.com>
1356
1357 * python/python-internal.h (gdb_py_object_from_longest)
1358 (gdb_py_object_from_ulongest): Return gdbpy_ref.
1359 * python/py-value.c (valpy_int): Update.
1360 * python/py-utils.c (gdb_py_object_from_longest): Return
1361 gdbpy_ref.
1362 (gdb_py_object_from_ulongest): Likewise.
1363 * python/py-type.c (typy_get_alignof): Update.
1364 * python/py-linetable.c (ltpy_get_all_source_lines)
1365 (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1366 * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1367
1368 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1369
1370 * ada-lang.c (_initialize_ada_language): Fix typo.
1371
1372 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1373
1374 * language.c (type): Remove.
1375 (_initialize_language): Remove assignment to type.
1376
1377 2018-11-02 Joel Brobecker <brobecker@adacore.com>
1378
1379 * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1380 * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1381 (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1382 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1383 (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1384 (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1385 * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1386 and aarch64-ravenscar-thread.o.
1387 * NEWS: Add entry documenting Ravenscar tasking support
1388 on AArch64 ELF.
1389
1390 2018-11-02 Matthew Malcomson <matthew.malcomson@arm.com>
1391
1392 * symtab.c (info_functions_command): Initialize quiet flag.
1393 * stack.c (info_args_command): Likewise.
1394
1395 2018-11-01 Jim Wilson <jimw@sifive.com>
1396
1397 * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1398 Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
1399 debugging messages.
1400
1401 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1402
1403 * ada-lang.c (ada_watch_location_expression): New function.
1404 (ada_language_defn): Set la_watch_location_expression to
1405 ada_watch_location_expression.
1406
1407 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1408
1409 * print-utils.c (int_string): Remove unnecessary trailing spaces.
1410
1411 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1412
1413 * rs6000-tdep.c (skip_prologue): Fix potential negative left
1414 shifting.
1415
1416 2018-11-01 Jerome Guitton <guitton@adacore.com>
1417 Joel Brobecker <brobecker@adacore.com>
1418
1419 * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1420 * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1421 * arm-pikeos-tdep.c: New file.
1422 * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1423 embedded system.
1424 * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1425
1426 2018-11-01 Simon Marchi <simon.marchi@ericsson.com>
1427
1428 * common/pathstuff.c (get_standard_temp_dir): New.
1429 * common/pathstuff.h (get_standard_temp_dir): New.
1430 * config.in: Re-generate.
1431 * configure: Re-generate.
1432 * configure.ac: Don't check for mkdtemp.
1433 * gnulib/aclocal-m4-deps.mk: Re-generate.
1434 * gnulib/aclocal.m4: Re-generate.
1435 * gnulib/config.in: Re-generate.
1436 * gnulib/configure: Re-generate.
1437 * gnulib/import/Makefile.am: Re-generate.
1438 * gnulib/import/Makefile.in: Re-generate.
1439 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1440 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1441 * gnulib/import/m4/mkdtemp.m4: New file.
1442 * gnulib/import/mkdtemp.c: New file.
1443 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1444 Add mkdtemp module.
1445 * unittests/mkdir-recursive-selftests.c (test): Use
1446 get_standard_temp_dir.
1447 (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1448 ifdef.
1449 * compile/compile.c (get_compile_file_tempdir): Likewise.
1450
1451 2018-11-01 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1452
1453 * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1454 (SIG_FRAME_LR_OFFSET64): New define.
1455 (SIG_FRAME_FP_OFFSET64): New define.
1456 (aix_sighandle_frame_cache): New Function.
1457 (aix_sighandle_frame_this_id): New Function.
1458 (aix_sighandle_frame_prev_register): New Function.
1459 (aix_sighandle_frame_sniffer): New Function.
1460 (aix_sighandle_frame_unwind): New global variable.
1461 (rs6000_aix_init_osabi): Install new frame unwinder.
1462
1463 2018-10-31 Sergio Durigan Junior <sergiodj@redhat.com>
1464
1465 PR gdb/23835
1466 * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1467 already defined.
1468
1469 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1470
1471 * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1472
1473 2018-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
1474
1475 * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1476 (producer_is_icc): New function.
1477 (check_producer): Set producer_is_icc field on dwarf2_cu.
1478 (dwarf2_init_integer_type): New function.
1479 (read_base_type): Call dwarf2_init_integer_type instead of
1480 init_integer_type in all cases.
1481 (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1482 * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1483 LEN is greater than 0.
1484
1485 2018-10-30 Tom Tromey <tom@tromey.com>
1486
1487 * main.c (captured_main_1): Check return value of bfd_init.
1488
1489 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
1490
1491 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1492 Adjust comments.
1493
1494 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1495
1496 * procfs.c: Include common/pathstuff.h.
1497
1498 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
1499
1500 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1501 Add missing braces. No functional change.
1502
1503 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1504
1505 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1506 to report a bad option and fix indentation.
1507 * demangle.c (demangle_command): Use report_unrecognized_option_error
1508 to report a bad option and correctly report the bad option.
1509
1510 2018-10-27 Tom Tromey <tom@tromey.com>
1511
1512 PR cli/23364:
1513 * darwin-nat.c (copied_shell): New global.
1514 (may_have_sip): Rename from should_disable_startup_with_shell.
1515 (copy_shell_to_cache, maybe_cache_shell): New functions.
1516 (darwin_nat_target::create_inferior): Update. Use
1517 copied_shell.
1518
1519 2018-10-27 Tom Tromey <tom@tromey.com>
1520
1521 * unittests/scoped_fd-selftests.c (test_to_file): New function.
1522 (run_tests): Call test_to_file.
1523 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1524 temporary files.
1525 * common/scoped_fd.h (scoped_fd::to_file): New method.
1526
1527 2018-10-27 Tom Tromey <tom@tromey.com>
1528
1529 * unittests/scoped_mmap-selftests.c (test_normal): Use
1530 gdb_mkostemp_cloexec.
1531 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1532 Use gdb_mkostemp_cloexec.
1533 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1534 gnulib/config.in, gnulib/configure,
1535 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1536 gnulib/import/m4/gnulib-cache.m4,
1537 gnulib/import/m4/gnulib-comp.m4: Update.
1538 * gnulib/import/m4/mkostemp.m4: New file.
1539 * gnulib/import/m4/mkstemp.m4: Remove.
1540 * gnulib/import/mkostemp.c: New file.
1541 * gnulib/import/mkstemp.m4: Remove.
1542 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1543 mkstemp, add mkostemp. Apply new patch.
1544 * gnulib/import/stdlib.in.h: Apply patch.
1545 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1546 New file.
1547 * dwarf-index-write.c (write_psymtabs_to_index): Use
1548 gdb_mkostemp_cloexec.
1549 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1550
1551 2018-10-27 Tom Tromey <tom@tromey.com>
1552
1553 * unittests/mkdir-recursive-selftests.c: New file.
1554 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1555 unittests/mkdir-recursive-selftests.c.
1556 * dwarf-index-cache.c (mkdir_recursive): Move to
1557 common/filestuff.c.
1558 (index_cache::store): Check return value of mkdir_recursive.
1559 (create_dir_and_check, test_mkdir_recursive): Move to new file.
1560 (_initialize_index_cache): Don't register test.
1561 * common/filestuff.h (mkdir_recursive): Declare.
1562 * common/filestuff.c (mkdir_recursive): Move from
1563 dwarf-index-cache.c. Return bool.
1564
1565 2018-10-27 Tom Tromey <tom@tromey.com>
1566
1567 * dwarf-index-write.c (write_psymtabs_to_index): Move
1568 make_temp_filename to common/pathstuff.c.
1569 * common/pathstuff.h (make_temp_filename): Declare.
1570 * common/pathstuff.c (make_temp_filename): New function, moved
1571 from dwarf-index-write.c.
1572
1573 2018-10-27 Tom Tromey <tom@tromey.com>
1574
1575 * procfs.c (procfs_target::create_inferior): Use get_shell.
1576 * cli/cli-cmds.c (shell_escape): Use get_shell.
1577 * windows-nat.c (windows_nat_target::create_inferior): Use
1578 get_shell.
1579 * common/pathstuff.c (get_shell): New function.
1580 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1581 (fork_inferior): Use get_shell.
1582 * common/pathstuff.h (get_shell): Declare.
1583
1584 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1585
1586 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1587
1588 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1589
1590 * stack.c (print_variable_and_value_data): Add preg and treg.
1591 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1592 and update callers.
1593 (print_frame_arg_vars): Likewise.
1594 (prepare_reg): New function.
1595 (info_locals_command): Extract info print args and use them.
1596 (info_args_command): Likewise.
1597 (_initialize_stack): Modify on-line help.
1598 * symtab.c (treg_matches_sym_type_name): New function.
1599 (search_symbols): New arg t_regexp.
1600 (symtab_symbol_info): New args quiet, regexp, t_regexp.
1601 (info_variables_command): Extract info print args and use them.
1602 (info_functions_command): Likewise.
1603 (info_types_command): Update call to symtab_symbol_info.
1604 (_initialize_symtab): Modify on-line help.
1605 * symtab.h (treg_matches_sym_type_name): New function.
1606 (search_symbols): New t_regexp arg.
1607
1608 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1609
1610 * cli-utils.c (extract_arg_maybe_quoted): New function.
1611 (extract_info_print_args): New function.
1612 (info_print_args_help): New function.
1613 (report_unrecognized_option_error): New function.
1614 * cli-utils.h (extract_arg_maybe_quoted): New function.
1615 (extract_info_print_args): New function.
1616 (info_print_args_help): New function.
1617 (report_unrecognized_option_error): New function.
1618
1619 2018-10-26 Tom Tromey <tom@tromey.com>
1620
1621 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1622 (compute_compunit_symtab_includes): Update.
1623 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
1624 (compunit_symtab_ptr): Likewise.
1625
1626 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1627
1628 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1629 default_print_auxv_entry for specific tag values.
1630
1631 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1632
1633 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1634
1635 2018-10-26 Jim Wilson <jimw@sifive.com>
1636
1637 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1638 (riscv_linux_sigframe_init): Declare.
1639 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1640 (riscv_linux_sigframe): New.
1641 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1642 (riscv_linux_sigframe_init): Define.
1643 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1644
1645 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1646 (riscv_isa_flen): Likewise. Drop static.
1647 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1648 (riscv_isa_flen): Likewise. Declare.
1649
1650 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1651 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1652
1653 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1654 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1655 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1656 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1657 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1658 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1659 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1660 Define.
1661 (struct ppc_linux_features) <htm>: New field.
1662 (ppc_linux_no_features): Add initializer for htm field.
1663 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1664 new tdescs.
1665 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1666 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1667 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1668 Define if not already defined.
1669 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1670 and rs6000/powerpc-isa207-htm-vsx64l.
1671 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1672 rs6000/powerpc-isa207-htm-vsx64l.xml.
1673 * features/rs6000/power-htm-spr.xml: New file.
1674 * features/rs6000/power-htm-core.xml: New file.
1675 * features/rs6000/power64-htm-core.xml: New file.
1676 * features/rs6000/power-htm-fpu.xml: New file.
1677 * features/rs6000/power-htm-altivec.xml: New file.
1678 * features/rs6000/power-htm-vsx.xml: New file.
1679 * features/rs6000/power-htm-ppr.xml: New file.
1680 * features/rs6000/power-htm-dscr.xml: New file.
1681 * features/rs6000/power-htm-tar.xml: New file.
1682 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1683 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1684 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1685 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1686 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1687 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1688 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1689 fetch_regset with HTM regsets.
1690 (store_register, store_ppc_registers): Call store_regset with HTM
1691 regsets.
1692 (ppc_linux_nat_target::read_description): Set htm field in the
1693 features struct if needed.
1694 * ppc-linux-tdep.c: Include
1695 features/rs6000/powerpc-isa207-htm-vsx32l.c and
1696 features/rs6000/powerpc-isa207-htm-vsx64l.c.
1697 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1698 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1699 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1700 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1701 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1702 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1703 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1704 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1705 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1706 (ppc32_linux_ctarregset): New globals.
1707 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1708 (ppc_linux_collect_core_cpgrregset): New function.
1709 (ppc_linux_iterate_over_regset_sections): Call back with the htm
1710 regsets.
1711 (ppc_linux_core_read_description): Check if the tm spr section is
1712 present and set htm in the features struct.
1713 (_initialize_ppc_linux_tdep): Call
1714 initialize_tdesc_powerpc_isa207_htm_vsx32l and
1715 initialize_tdesc_powerpc_isa207_htm_vsx64l.
1716 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1717 Declare.
1718 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1719 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1720 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1721 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1722 New fields.
1723 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1724 Likewise.
1725 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1726 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1727 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1728 New enum fields.
1729 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1730 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1731 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1732 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1733 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1734 <PPC_CTAR_REGNUM>: Likewise.
1735 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1736 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1737 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1738 (IS_CEFP_PSEUDOREG): Define.
1739 (rs6000_register_name): Hide the upper halves of checkpointed VSX
1740 registers. Return names for the checkpointed DFP, VSX, and EFP
1741 pseudo registers.
1742 (rs6000_pseudo_register_type): Remove initial assert and raise an
1743 internal error in the else clause instead. Return types for the
1744 checkpointed DFP, VSX, and EFP pseudo registers.
1745 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1746 checkpointed DFP pseudo registers.
1747 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1748 checkpointed VSX pseudo registers.
1749 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1750 from efpr_pseudo_register_read and
1751 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
1752 registers.
1753 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1754 Handle checkpointed DFP, VSX, and EFP registers.
1755 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1756 (efp_ax_pseudo_register_collect): New functions.
1757 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1758 register logic to new functions. Handle checkpointed DFP, VSX,
1759 and EFP pseudo registers.
1760 (rs6000_gdbarch_init): Look for and validate the htm features.
1761 Include checkpointed DFP, VSX and EFP pseudo-registers.
1762 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1763 HTM registers.
1764
1765 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1766
1767 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1768 without altivec or fpu.
1769
1770 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1771 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1772
1773 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1774 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1775 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1776 Define if not already defined.
1777 * features/rs6000/power-ebb.xml: New file.
1778 * features/rs6000/power-linux-pmu.xml: New file.
1779 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1780 features.
1781 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1782 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1783 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1784 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1785 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1786 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1787 fetch_regset with ebb and pmu regsets.
1788 (store_register, store_ppc_registers): Call store_regset with ebb
1789 and pmu regsets.
1790 (ppc_linux_nat_target::read_description): Set isa207 field in the
1791 features struct if ebb and pmu are avaiable.
1792 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1793 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1794 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1795 and pmu regsets.
1796 (ppc_linux_core_read_description): Check if the pmu section is
1797 present and set isa207 in the features struct.
1798 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1799 (ppc32_linux_pmuregset): Declare.
1800 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1801 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1802 <ppc_sier_regnum>: New field.
1803 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1804 New enum values.
1805 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1806 values.
1807 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1808 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1809 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1810 ebb and pmu features.
1811
1812 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1813 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1814
1815 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1816 (tdesc_powerpc_isa207_vsx64l): Declare.
1817 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1818 (struct ppc_linux_features) <isa207>: New field.
1819 (ppc_linux_no_features): Add initializer for isa207 field.
1820 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1821 new tdescs.
1822 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1823 (NT_PPC_TAR): Define if not already defined.
1824 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1825 rs6000/powerpc-isa207-vsx64l.
1826 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1827 rs6000/powerpc-isa207-vsx64l.xml.
1828 * features/rs6000/power-tar.xml: New file.
1829 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1830 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1831 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1832 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1833 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1834 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1835 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1836 fetch_regset with the TAR regset.
1837 (store_register, store_ppc_registers): Call store_regset with the
1838 TAR regset.
1839 (ppc_linux_nat_target::read_description): Set isa207 field in the
1840 features struct if needed.
1841 * ppc-linux-tdep.c: Include
1842 features/rs6000/powerpc-isa207-vsx32l.c and
1843 features/rs6000/powerpc-isa207-vsx64l.c.
1844 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1845 (ppc_linux_iterate_over_regset_sections): Call back with the tar
1846 regset.
1847 (ppc_linux_core_read_description): Check if the tar section is
1848 present and set isa207 in the features struct.
1849 (_initialize_ppc_linux_tdep): Call
1850 initialize_tdesc_powerpc_isa207_vsx32l and
1851 initialize_tdesc_powerpc_isa207_vsx64l.
1852 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1853 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1854 (enum) <PPC_TAR_REGNUM>: New enum value.
1855 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1856 feature.
1857 (ppc_process_record_op31): Record changes to TAR.
1858
1859 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1860 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1861
1862 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1863 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1864 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1865 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1866 (struct ppc_linux_features) <ppr_dscr>: New field.
1867 (ppc_linux_no_features): Add initializer for ppr_dscr field.
1868 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1869 new tdescs.
1870 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1871 Define if not already defined.
1872 * features/Makefile (WHICH): Add
1873 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1874 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1875 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1876 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1877 * features/rs6000/power-dscr.xml: New file.
1878 * features/rs6000/power-ppr.xml: New file.
1879 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1880 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1881 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1882 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1883 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1884 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1885 * ppc-linux-nat.c: Include <sys/uio.h>.
1886 (fetch_regset, store_regset, check_regset): New functions.
1887 (fetch_register, fetch_ppc_registers): Call fetch_regset with
1888 DSCR and PPR regsets.
1889 (store_register, store_ppc_registers): Call store_regset with
1890 DSCR and PPR regsets.
1891 (ppc_linux_get_hwcap2): New function.
1892 (ppc_linux_nat_target::read_description): Call
1893 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1894 features struct if needed.
1895 * ppc-linux-tdep.c: Include
1896 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1897 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1898 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1899 (ppc32_linux_dscrregset): New globals.
1900 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1901 and dscr regsets.
1902 (ppc_linux_core_read_description): Check if the ppr and dscr
1903 sections are present and set ppr_dscr in the features struct.
1904 (_initialize_ppc_linux_tdep): Call
1905 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1906 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1907 * ppc-linux-tdep.h (ppc32_linux_pprregset)
1908 (ppc32_linux_dscrregset): Declare.
1909 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1910 <ppc_dscr_regnum>: New field.
1911 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1912 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1913 and dscr features.
1914 (ppc_process_record_op31): Record changes to PPR and DSCR.
1915
1916 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1917
1918 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1919 second initializer line for the have_* variables. Initialize
1920 have_fpu to 0 instead of 1.
1921
1922 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1923
1924 * arch/ppc-linux-common.c (ppc_linux_match_description):
1925 Parenthesize tdesc assignements and indent them properly.
1926
1927 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1928
1929 * ppc-linux-nat.c (fetch_register): Change if statement to else
1930 if.
1931 (store_register): Likewise.
1932
1933 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1934
1935 * rs6000-tdep.c: Remove reggroups.h include.
1936 (rs6000_pseudo_register_reggroup_p): Remove.
1937 (rs6000_gdbarch_init): Remove call to
1938 set_tdesc_pseudo_register_reggroup_p.
1939
1940 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1941
1942 * reggroups.c (default_register_reggroup_p): Return true for
1943 decfloat registers and float_reggroup.
1944
1945 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1946
1947 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1948 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1949 ppc_linux_collect_vrregset by regcache_collect_regset.
1950
1951 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1952
1953 * linux-tdep.c (linux_collect_regset_section_cb): Use
1954 std::vector<gdb_byte> instead of char * and malloc for buf.
1955 Remove xfree.
1956
1957 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1958
1959 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1960 symtab_start instead of always using language_unknown.
1961
1962 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
1963
1964 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1965 READ_P parameter, catch and ignore register access errors from
1966 either the old or new MISA location.
1967 (riscv_has_feature): Update call to riscv_read_misa_reg.
1968
1969 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
1970
1971 * python/py-function.c (convert_values_to_python): Return
1972 gdbpy_ref<>. Add header comment.
1973 (fnpy_call): Adjust.
1974
1975 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
1976
1977 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1978 (cmdpy_completer_handle_brkchars): Adjust.
1979 (cmdpy_completer): Adjust.
1980
1981 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
1982
1983 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1984 Pass correct regnum to raw_supply_zeroed.
1985
1986 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
1987
1988 * regcache.c (cooked_read_test): Add CSKY to the list of
1989 architectures with a save_reggroup
1990
1991 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
1992
1993 PR gdb/23368
1994 * infrun.c (follow_exec): In the follow_exec_mode_new case,
1995 transfer terminal state from old new new inferior.
1996 * terminal.h (swap_terminal_info): New function.
1997 * inflow.c (swap_terminal_info): New function.
1998
1999 2018-10-23 Tom Tromey <tom@tromey.com>
2000
2001 * record-btrace.c (get_thread_current_frame_id): Rename from
2002 get_thread_current_frame. Return a frame_id.
2003 (record_btrace_start_replaying): Update.
2004
2005 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
2006
2007 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
2008 for CSRs.
2009
2010 2018-10-23 Joel Brobecker <brobecker@adacore.com>
2011
2012 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
2013 have_nonsteppable_watchpoint attribute to 1.
2014
2015 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
2016
2017 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
2018 register names.
2019 (struct register_alias): Rename to...
2020 (struct riscv_register_alias): ...this, and update comment.
2021 (riscv_register_aliases): Update type, and alias names. Remove
2022 CSR names from this list.
2023 (riscv_register_name): Use riscv_gdb_reg_names for int and float
2024 register names. Add an extra assertion.
2025 (riscv_is_regnum_a_named_csr): New function.
2026 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
2027
2028 2018-10-23 John Darrington <john@darrington.wattle.id.au>
2029
2030 * configure.tgt: Add configuration for s12z.
2031 * s12z-tdep.c: New file.
2032 * NEWS: Mention new target.
2033
2034 2018-10-22 Jim Wilson <jimw@sifive.com>
2035
2036 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2037 FP reg smaller than FP reg size, and fill with -1 instead of 0.
2038
2039 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2040 (riscv_register_type): Use them.
2041 (riscv_print_one_register_info): Handle union of floats same as float.
2042 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2043 riscv_fpreg_q_type fields.
2044
2045 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
2046
2047 * gdbarch.sh (gdbarch_num_cooked_regs): New.
2048 * gdbarch.h: Re-generate.
2049 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2050 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2051 * eval.c (evaluate_subexp_standard): Likewise.
2052 * findvar.c (value_of_register): Likewise.
2053 (value_of_register_lazy): Likewise.
2054 (address_from_register): Likewise.
2055 * frame.c (get_frame_register_bytes): Likewise.
2056 * gdbarch-selftests.c (register_to_value_test): Likewise.
2057 * h8300-tdep.c (h8300_register_type): Likewise.
2058 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2059 (i386_svr4_reg_to_regnum): Likewise.
2060 * infcmd.c (default_print_registers_info): Likewise.
2061 (registers_info): Likewise.
2062 (print_vector_info): Likewise.
2063 (default_print_float_info): Likewise.
2064 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2065 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2066 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2067 (mi_cmd_data_list_changed_registers): Likewise.
2068 (mi_cmd_data_list_register_values): Likewise.
2069 (mi_cmd_data_write_register_values): Likewise.
2070 (mi_cmd_trace_frame_collected): Likewise.
2071 * mips-tdep.c (print_gp_register_row): Likewise.
2072 (mips_print_registers_info): Likewise.
2073 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2074 * regcache.c (init_regcache_descr): Likewise.
2075 (register_size): Likewise.
2076 (register_dump::dump): Likewise.
2077 (cooked_read_test): Likewise.
2078 (cooked_write_test): Likewise.
2079 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2080 (rs6000_gdbarch_init): Likewise.
2081 * stabsread.c (stab_reg_to_regnum): Likewise.
2082 * stack.c (info_frame_command): Likewise.
2083 * target-descriptions.c (tdesc_register_name): Likewise.
2084 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2085 * tui/tui-regs.c (tui_show_register_group): Likewise.
2086 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2087 (user_reg_map_regnum_to_name): Likewise.
2088 (value_of_user_reg): Likewise.
2089 (maintenance_print_user_registers): Likewise.
2090 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2091 (xtensa_register_name): Likewise.
2092 (xtensa_register_type): Likewise.
2093 (xtensa_reg_to_regnum): Likewise.
2094 (xtensa_pseudo_register_read): Likewise.
2095 (xtensa_pseudo_register_write): Likewise.
2096
2097 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2098
2099 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2100 correctly-sized buffer with raw_read.
2101 (amd64_pseudo_register_write): Use correctly-sized buffer for
2102 raw_read/raw_write.
2103
2104 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2105
2106 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2107 in add_prefix_cmd of set print type.
2108
2109 2018-10-19 Tom Tromey <tom@tromey.com>
2110
2111 PR tui/18388:
2112 * NEWS: Mention tabset deprecation.
2113 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2114 (update_tab_width): New function.
2115 (tui_set_tab_width, tui_show_tab_width): New functions.
2116 (tui_set_tab_width_command): Use update_tab_width.
2117 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
2118 Add new "set tui tab-width" command.
2119 * tui/tui-source.c (tui_set_source_content): Update.
2120 * tui/tui-disasm.c (tui_set_disassem_content): Update.
2121 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2122 Don't declare.
2123 (tui_tab_width): Declare.
2124 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2125 (tui_set_default_tab_len): Remove.
2126
2127 2018-10-19 Tom Tromey <tom@tromey.com>
2128
2129 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2130 (key_is_backspace, tui_getc): Don't declare.
2131 * tui/tui-io.c (key_is_start_sequence): Now static.
2132 (key_is_end_sequence, key_is_backspace): Remove.
2133 (tui_getc): Now static.
2134
2135 2018-10-19 Tom Tromey <tom@tromey.com>
2136
2137 * symfile.c (reread_symbols): Clear "static_links".
2138
2139 2018-10-19 Alan Hayward <alan.hayward@arm.com>
2140
2141 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2142 define.
2143 (aarch64_linux_sigframe_init): Extra boundary checks.
2144
2145 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
2146
2147 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2148 the possibly non-existent tdesc type 'vec128', but the type of raw
2149 register v16 instead.
2150
2151 2018-10-19 Gary Benson <gbenson@redhat.com>
2152
2153 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2154
2155 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
2156
2157 PR cli/23785
2158 * cli/cli-dump.c (restore_binary_file): Check if "file" is
2159 NULL.
2160
2161 2018-10-17 Paul Koning <paul_koning@dell.com>
2162
2163 * charset.c (convert_between_encodings): Fix unsigned overflow.
2164
2165 2018-10-17 John Baldwin <jhb@FreeBSD.org>
2166
2167 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2168 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2169 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2170 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2171 New functions.
2172 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2173 and fbsd_info_proc_mappings_header.
2174 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2175 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2176 New.
2177
2178 2018-10-17 Joel Brobecker <brobecker@adacore.com>
2179
2180 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2181 Solaris Maintainer.
2182
2183 2018-10-15 Tom Tromey <tom@tromey.com>
2184
2185 * tui/tui.c (strcat_to_buf): Remove casts.
2186 * tui/tui-winsource.c (tui_show_source_line)
2187 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2188 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2189 * tui/tui-windata.c (tui_first_data_item_displayed)
2190 (tui_delete_data_content_windows, tui_erase_data_content)
2191 (tui_display_all_data, tui_display_data_from)
2192 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2193 * tui/tui-win.c (tui_set_win_height)
2194 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2195 casts.
2196 * tui/tui-win.c (tui_resize_all): Remove casts.
2197 (tui_scroll_backward_command, tui_set_focus)
2198 (tui_set_tab_width_command): Likewise.
2199 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2200 * tui/tui-regs.c (tui_show_register_group): Remove cast.
2201 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2202 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2203 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2204 Remove casts.
2205
2206 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
2207
2208 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2209 AArch64/ARM maintainer.
2210
2211 2018-10-11 Gary Benson <gbenson@redhat.com>
2212
2213 * interps.h (interp::m_name): Make private and mutable.
2214 * interps.c (interp::~interp): Free m_name.
2215
2216 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2217 Simon Marchi <simark@simark.ca>
2218
2219 * README (`configure' options): Add documentation for new
2220 "--enable-unit-tests" option.
2221 * acinclude.m4: Include "selftest.m4".
2222 * configure: Regenerate.
2223 * configure.ac: Use "GDB_AC_SELFTEST".
2224 * maint.c (maintenance_selftest): Update message informing
2225 that selftests have been disabled.
2226 (maintenance_info_selftests): Likewise.
2227 * selftest.m4: New file.
2228
2229 2018-10-10 Gary Benson <gbenson@redhat.com>
2230
2231 * remote.c (remote_target::remote_send_printf): Add
2232 missing va_end found by Coverity.
2233
2234 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
2235
2236 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2237
2238 2018-10-09 Tom Tromey <tom@tromey.com>
2239
2240 * configure: Rebuild.
2241 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2242 * NEWS: Update --enable-ubsan documentation.
2243
2244 2018-10-09 Gary Benson <gbenson@redhat.com>
2245
2246 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2247 found by Coverity.
2248
2249 2018-10-08 Tom Tromey <tom@tromey.com>
2250
2251 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2252 variable.
2253 (riscv_fbsd_init_abi): Likewise.
2254
2255 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
2256 * valops.c (value_struct_elt_for_reference): Rename local variable
2257 to work around the shadowing a previous local warning.
2258
2259 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2260
2261 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2262 * NEWS: Mention new FreeBSD/riscv native configuration.
2263 * configure.host: Add riscv*-*-freebsd*.
2264 * configure.nat: Likewise.
2265 * riscv-fbsd-nat.c: New file.
2266
2267 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2268
2269 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2270 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2271 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2272 * NEWS: Mention new FreeBSD/riscv target.
2273 * configure.tgt: Add riscv*-*-freebsd*.
2274 * riscv-fbsd-tdep.c: New file.
2275 * riscv-fbsd-tdep.h: New file.
2276
2277 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2278
2279 * regcache.h (struct regcache_map_entry): Note that this type can
2280 be used with traditional frame caches.
2281 * trad-frame.c (trad_frame_set_reg_regmap): New.
2282 * trad-frame.h (trad_frame_set_reg_regmap): New.
2283
2284 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
2285
2286 PR c++/16841
2287 * valops.c (get_virtual_base_offset): New function.
2288 (value_struct_elt_for_reference): Use it to get virtual base offset
2289 and add it in calculating class member address.
2290
2291 2018-10-08 John Darrington <john@darrington.wattle.id.au>
2292
2293 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2294 (check_producer): Check if the producer is codewarrior.
2295 (producer_is_codewarrior): New function.
2296 (lnp_state_machine::record_line): Ignore is_stmt flag for records
2297 produced by codewarrior.
2298 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2299
2300 2018-10-06 Tom Tromey <tom@tromey.com>
2301
2302 PR python/19399:
2303 * python/py-inferior.c: Add "architecture" entry.
2304 (infpy_architecture): New function.
2305
2306 2018-10-06 Tom Tromey <tom@tromey.com>
2307
2308 PR python/21765:
2309 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2310 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2311 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
2312 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2313
2314 2018-10-06 Tom Tromey <tom@tromey.com>
2315
2316 PR build/17077:
2317 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2318 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2319 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2320 #include.
2321
2322 2018-10-06 Tom Tromey <tom@tromey.com>
2323
2324 * python/py-breakpoint.c (bppy_get_location): Handle a
2325 bp_breakpoint without a location.
2326
2327 2018-10-06 Tom Tromey <tom@tromey.com>
2328
2329 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2330 (_RegEx): Reformat help text.
2331 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2332 (AnyCallerIs, AnyCallerMatches): Reformat help text.
2333 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2334 text.
2335 * python/lib/gdb/command/xmethods.py (InfoXMethod)
2336 (EnableXMethod, DisableXMethod): Remove help indentation.
2337 Capitalize meta-syntactic variables.
2338 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2339 (EnableUnwinder, DisableUnwinder): Remove help indentation.
2340 Capitalize meta-syntactic variables.
2341 * python/lib/gdb/command/explore.py (ExploreCommand)
2342 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2343 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2344 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2345 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2346 Remove help indentation.
2347 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2348 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2349 (DisableFrameFilter, SetFrameFilterPriority)
2350 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2351
2352 2018-10-06 Tom Tromey <tom@tromey.com>
2353
2354 PR tui/28819:
2355 * tui/tui-io.c (gdb_wgetch): New function.
2356 (tui_mld_getc, tui_getc): Use it.
2357
2358 2018-10-05 Tom Tromey <tom@tromey.com>
2359
2360 * sol-thread.c (sol_thread_target::wait): Rename inner
2361 "save_ptid".
2362
2363 2018-10-04 Tom Tromey <tom@tromey.com>
2364
2365 * configure: Rebuild.
2366 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2367
2368 2018-10-04 Tom Tromey <tom@tromey.com>
2369
2370 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2371 declaration of "block".
2372
2373 2018-10-04 Tom Tromey <tom@tromey.com>
2374
2375 * common/filestuff.c (fdwalk): Remove inner declaration of
2376 "result".
2377
2378 2018-10-04 Tom Tromey <tom@tromey.com>
2379
2380 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2381 "structs_addr" and hoist declaration.
2382
2383 2018-10-04 Tom Tromey <tom@tromey.com>
2384
2385 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2386 variable "size".
2387
2388 2018-10-04 Tom Tromey <tom@tromey.com>
2389
2390 * mdebugread.c (parse_partial_symbols): Use std::string.
2391
2392 2018-10-04 Tom Tromey <tom@tromey.com>
2393
2394 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2395 * p-valprint.c (pascal_val_print): Split inner "i" variable.
2396 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2397 header.
2398 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2399 more inner scope.
2400 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2401 * varobj.c (varobj_update): Rename inner "newobj",
2402 "type_changed".
2403 * valprint.c (generic_emit_char): Rename inner "buf".
2404 * valops.c (find_overload_match): Rename inner "temp".
2405 (value_struct_elt_for_reference): Declare "v" in more inner
2406 scope.
2407 * v850-tdep.c (v850_push_dummy_call): Rename "len".
2408 * unittests/array-view-selftests.c (run_tests): Rename inner
2409 "vec".
2410 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2411 header.
2412 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2413 "tsv" in more inner scope.
2414 (print_one_static_tracepoint_marker): Rename inner
2415 "tuple_emitter".
2416 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2417 (tic6x_push_dummy_call): Don't redeclare "addr".
2418 * target-float.c: Declare "dto" lower.
2419 * symtab.c (lookup_local_symbol): Rename inner "sym".
2420 (find_pc_sect_line): Rename inner "pc".
2421 * stack.c (print_frame): Don't redeclare "gdbarch".
2422 (return_command): Rename inner "gdbarch".
2423 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2424 "sp".
2425 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2426 header.
2427 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2428 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2429 scope.
2430 * remote.c (remote_target::update_thread_list): Don't redeclare
2431 "tp".
2432 (remote_target::process_initial_stop_replies): Rename inner
2433 "thread".
2434 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2435 (remote_target::wait_as): Don't redeclare "stop_reply".
2436 (remote_target::get_thread_local_address): Rename inner
2437 "result".
2438 (remote_target::get_tib_address): Likewise.
2439
2440 * regcache.c (cooked_read_test): Rename "regnum".
2441 * record-btrace.c (cmd_record_btrace_start): Rename inner
2442 "exception".
2443 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2444 loop header.
2445 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2446 header.
2447 (ppu2spu_sniffer): Rename inner "buf".
2448 * parse.c (operator_check_standard): Rename inner "type",
2449 "objfile".
2450 * p-valprint.c (pascal_val_print): Introduce new scope for
2451 "low_bound", "high_bound".
2452 * p-exp.y (yylex): Declare "i" in loop header.
2453 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2454 Lower declaration of "s".
2455 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2456 header.
2457 (nios2_push_dummy_call): Rename "len".
2458 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2459 "buf".
2460 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2461 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2462 (linux_xfer_osdata_modules): Likewise.
2463 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2464 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2465 (mips_o64_push_dummy_call): Likewise.
2466 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2467 "op".
2468 * mi/mi-main.c (list_available_thread_groups): Rename inner
2469 "tuple_emitter".
2470 (mi_cmd_data_read_memory): Rename inner "opts".
2471 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2472 "tuple_emitter".
2473 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2474 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
2475 more inner scope.
2476 (parse_partial_symbols): Rename inner "pst", "p", "name"
2477 * main.c (captured_main_1): Rename inner "i"s.
2478 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2479 "oso2".
2480 * linux-tdep.c (linux_info_proc): Rename inner "filename".
2481 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2482 * infrun.c (handle_no_resumed): Don't redeclare "thread".
2483 (handle_signal_stop): Rename inner "gdbarch".
2484 (handle_command): Declare "signum" in loop header.
2485 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2486 "status".
2487 (examine_prologue): Rename inner "sol" and "sof".
2488 (ia64_extract_return_value): Rename inner "val". Declare another
2489 "val" in a more inner scope.
2490 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2491 inner scope.
2492 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2493 "except".
2494 * findvar.c (default_read_var_value): Don't redeclare "addr".
2495 * f-exp.y (yylex): Declare "i" in loop header.
2496 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2497 Rename inner "type", "expect_type".
2498 (evaluate_subexp_for_sizeof): Rename inner "pc".
2499 * elfread.c (elf_symfile_read): Rename inner "abfd".
2500 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2501 "bytes_read".
2502 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2503 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2504 (dwarf_decode_line_header): Rename inner "lh".
2505 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2506 "offset". Declare "i" in loop header.
2507 (disassemble_dwarf_expression): Rename inner "addr_size".
2508 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2509 inner "result".
2510 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2511 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2512 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2513 "inner_list_emitter".
2514 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2515 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2516 declaration in a block.
2517 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2518 * cp-valprint.c (cp_print_value_fields): Don't redeclare
2519 "obstack_final_size".
2520 * cp-support.c (inspect_type): Declare "i" in loop header.
2521 * compile/compile.c (compile_instance::insert_symbol_error):
2522 Rename inner "e".
2523 * common/agent.c (agent_run_command): Remove inner "ret"
2524 declaration.
2525 * coffread.c (coff_symfile_read): Rename inner "name".
2526 (coff_symfile_read): Rename inner "abfd".
2527 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2528 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2529 "high".
2530 * c-exp.y (lex_one_token): Move "len" declaration lower.
2531 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2532 "gdbarch".
2533 (create_exception_master_breakpoint): Likewise. Don't redeclare
2534 "b".
2535 (watch_command_1): Declare "mark" later.
2536 (clear_command): Don't shadow "a" or "b".
2537 (delete_command): Rename inner "b".
2538 (delete_trace_command): Likewise.
2539 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2540 "op".
2541 (arm_gdbarch_init): Remove inner "e_flags".
2542 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2543 "offset" in inner blocks.
2544
2545 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
2546
2547 * dwarf-index-write.c (file_write): Don't write if the vector is
2548 empty.
2549
2550 2018-10-05 Tom de Vries <tdevries@suse.de>
2551
2552 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2553 PyArg_ParseTuple call.
2554
2555 2018-10-05 Tom de Vries <tdevries@suse.de>
2556
2557 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2558 PyArg_ParseTuple call.
2559
2560 2018-10-04 Joel Brobecker <brobecker@adacore.com>
2561
2562 * psymtab.c (recursively_search_psymtabs): Reformat parameters
2563 to avoid exceeding 80 characters per line limit.
2564
2565 2018-10-04 Tom Tromey <tom@tromey.com>
2566
2567 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2568 (reread_symbols): Update.
2569 * complaints.h (clear_complaints): Remove argument.
2570 * complaints.c (enum complaint_series): Remove.
2571 (series): Remove global.
2572 (complaint_internal): Update.
2573 (clear_complaints): Remove argument.
2574
2575 2018-10-04 Tom Tromey <tom@tromey.com>
2576
2577 * symfile.c (symbol_file_add_with_addrs): Do not print "no
2578 debugging symbols" message if there is a separate debug objfile.
2579
2580 2018-10-04 Tom Tromey <tom@tromey.com>
2581
2582 PR cli/19551:
2583 * symfile.c (symbol_file_add_with_addrs): Update output.
2584 * psymtab.c (require_partial_symbols): Update output.
2585
2586 2018-10-04 Tom Tromey <tom@tromey.com>
2587
2588 PR cli/22234:
2589 * complaints.c: Emit \n.
2590
2591 2018-10-04 Tom Tromey <tom@tromey.com>
2592
2593 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2594 (separate_debug_file_exists, find_separate_debug_file)
2595 (add_symbol_file_command, reread_symbols, allocate_symtab)
2596 (allocate_compunit_symtab): Use filtered printing, not
2597 unfiltered.
2598 * psymtab.c (require_partial_symbols, dump_psymtab)
2599 (allocate_psymtab): Use filtered printing, not unfiltered.
2600
2601 2018-10-04 Tom Tromey <tom@tromey.com>
2602
2603 * complaints.c (complaint_internal): Correctly check complaint
2604 count.
2605
2606 2018-10-04 Tom Tromey <tom@tromey.com>
2607
2608 * complaints.h (struct complaints): Remove declaration.
2609 * complaints.c (clear_complaints): Remove an unused variable.
2610
2611 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2612
2613 * MAINTAINERS (Write After Approval): Add self.
2614
2615 2018-10-03 Tom Tromey <tom@tromey.com>
2616
2617 * guile/scm-value.c (gdbscm_value_to_string): Initialize
2618 "buffer_contents".
2619 * coffread.c (coff_symtab_read): Initialize "newobj".
2620
2621 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
2622
2623 * dwarf2read.c (read_func_scope): Remove struct keyword in
2624 range-based for.
2625
2626 2018-10-03 Tom Tromey <tom@tromey.com>
2627
2628 * README: Mention --enable-ubsan.
2629 * NEWS: Mention --enable-ubsan.
2630 * acinclude.m4: Include sanitize.m4.
2631 * configure: Rebuild.
2632 * configure.ac: Call AM_GDB_UBSAN.
2633 * sanitize.m4: New file.
2634
2635 2018-10-03 Tom Tromey <tom@tromey.com>
2636
2637 * expression.h (enum exp_opcode): Use uint8_t as base type.
2638 * expprint.c (op_name): Handle invalid opcodes.
2639
2640 2018-10-03 Tom Tromey <tom@tromey.com>
2641
2642 * parse.c (prefixify_expression): Add assert.
2643 (parse_exp_in_context_1): Throw exception if the expression is
2644 empty.
2645
2646 2018-10-03 Tom Tromey <tom@tromey.com>
2647
2648 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2649
2650 2018-10-03 Tom Tromey <tom@tromey.com>
2651
2652 * c-exp.y (parse_number): Work in unsigned. Remove casts.
2653
2654 2018-10-03 Tom Tromey <tom@tromey.com>
2655
2656 * dwarf2read.c (read_subrange_type): Make "negative_mask"
2657 unsigned.
2658
2659 2018-10-03 Tom Tromey <tom@tromey.com>
2660
2661 * findvar.c (extract_integer): Do work in an unsigned type.
2662
2663 2018-10-03 Tom Tromey <tom@tromey.com>
2664
2665 * common/enum-flags.h (enum_flags::operator~): Add static assert.
2666 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2667 base type.
2668 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2669 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2670 type.
2671 * c-lang.h (enum c_string_type_values): Use unsigned as base
2672 type.
2673 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2674
2675 2018-10-03 Tom Tromey <tom@tromey.com>
2676
2677 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2678 <~dwarf2_frame_state_reg_info>: Update.
2679 <dwarf2_frame_state_reg_info>: Update.
2680 <alloc_regs>: Add assertion. Update.
2681 <reg>: Now a std::vector.
2682 <num_regs>: Remove.
2683 <swap>: Update.
2684 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2685 (execute_cfa_program_test, dwarf2_frame_cache): Update.
2686
2687 2018-10-03 Tom Tromey <tom@tromey.com>
2688
2689 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2690
2691 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2692
2693 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2694
2695 2018-10-02 Tom Tromey <tom@tromey.com>
2696
2697 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2698
2699 2018-10-02 John Darrington <john@darrington.wattle.id.au>
2700
2701 * NEWS: Mention changed commands.
2702 * ser-uds.c: New file.
2703 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2704 * configure: Regenerate.
2705 * Makefile.in: Add new file.
2706 * serial.c (serial_open): Check if filename is a socket
2707 and lookup the appropriate interface accordingly.
2708
2709 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2710
2711 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2712 define.
2713 (AARCH64_EXTRA_MAGIC): Likewise.
2714 (AARCH64_FPSIMD_MAGIC): Likewise.
2715 (AARCH64_SVE_MAGIC): Likewise.
2716 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2717 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2718 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2719 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2720 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2721 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2722 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2723 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2724 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2725 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2726 (read_aarch64_ctx): Add function.
2727 (aarch64_linux_sigframe_init): Detect FP registers.
2728
2729 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2730
2731 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2732 (AARCH64_D0_REGNUM): Likewise.
2733 (AARCH64_S0_REGNUM): Likewise.
2734 (AARCH64_H0_REGNUM): Likewise.
2735 (AARCH64_B0_REGNUM): Likewise.
2736 (AARCH64_SVE_V0_REGNUM): Likewise.
2737 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2738 (AARCH64_D0_REGNUM): Likewise.
2739 (AARCH64_S0_REGNUM): Likewise.
2740 (AARCH64_H0_REGNUM): Likewise.
2741 (AARCH64_B0_REGNUM): Likewise.
2742 (AARCH64_SVE_V0_REGNUM): Likewise.
2743
2744 2018-10-01 Gary Benson <gbenson@redhat.com>
2745
2746 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2747 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2748 prfpregset_t instead of gdb_prfpregset_t.
2749 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2750 * configure, config.in: Rebuild.
2751
2752 2018-10-01 Gary Benson <gbenson@redhat.com>
2753
2754 * common/gdb_proc_service.h: New file, factored out from...
2755 * gdb_proc_service.h: Moved common code to the above file.
2756 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2757
2758 2018-10-01 Gary Benson <gbenson@redhat.com>
2759
2760 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2761 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
2762
2763 2018-10-01 Gary Benson <gbenson@redhat.com>
2764
2765 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2766 (AC_CHECK_HEADERS): Check for linux/elf.h.
2767 * configure, config.in: Rebuild.
2768 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2769 doesn't define elf_fpregset_t.
2770
2771 2018-10-01 Gary Benson <gbenson@redhat.com>
2772
2773 * gdb_proc_service.h: Whitespace change.
2774
2775 2018-10-01 Tom Tromey <tom@tromey.com>
2776
2777 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2778 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2779 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2780
2781 2018-10-01 Tom Tromey <tom@tromey.com>
2782
2783 * README: Minor change.
2784
2785 2018-09-30 Pedro Alves <palves@redhat.com>
2786
2787 * darwin-nat-info.c (darwin_debug_regions_recurse)
2788 (info_mach_exceptions_command): Remove unused local variables.
2789 * darwin-nat.c (darwin_decode_notify_message)
2790 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2791 (darwin_stop_inferior, darwin_setup_exceptions)
2792 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2793 (darwin_nat_target::attach, darwin_nat_target::detach)
2794 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2795 local variables.
2796 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2797 variables.
2798
2799 2018-09-29 Tom Tromey <tom@tromey.com>
2800
2801 * README: Remove some leftover text.
2802
2803 2018-09-29 Tom Tromey <tom@tromey.com>
2804
2805 * PROBLEMS: Rewrite.
2806 * README: Update.
2807
2808 2018-09-28 John Baldwin <jhb@FreeBSD.org>
2809
2810 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2811 case with explicit breakpoint kind.
2812 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2813 'additional_info' and related logic.
2814 (riscv_debug_breakpoints): New variable.
2815 (riscv_breakpoint_kind_from_pc): Use the length of the existing
2816 instruction to determine the breakpoint kind.
2817 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2818 flag. Update description of 'set/show riscv
2819 use-compressed-breakpoints' flag.
2820
2821 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
2822
2823 (NEWS): Mention changes to frame related commands.
2824 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2825 (add_prefix_cmd_suppress_notification): New function.
2826 (add_com_suppress_notification): Call
2827 add_cmd_suppress_notification.
2828 * command.h (add_cmd_suppress_notification): Declare.
2829 (add_prefix_cmd_suppress_notification): Declare.
2830 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2831 (parse_frame_specification): Moved from stack.c, with
2832 simplification to handle a single argument.
2833 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2834 switch to the selected frame. Add a header comment.
2835 * stack.c: Remove 'safe-ctype.h' include.
2836 (find_frame_for_function): Add declaration.
2837 (find_frame_for_address): New function.
2838 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2839 (frame_selection_by_function_completer): New function.
2840 (info_frame_command): Rename to...
2841 (info_frame_command_core): ...this, and update parameter types.
2842 (select_frame_command): Rename to...
2843 (select_frame_command_core): ...this, and update parameter types.
2844 (frame_command): Rename to...
2845 (frame_command_core): ...this, and update parameter types.
2846 (class frame_command_helper): New class to wrap implementations of
2847 frame related sub-commands.
2848 (frame_apply_cmd_list): New static global.
2849 (frame_cmd_list): Make static.
2850 (select_frame_cmd_list): New global for sub-commands.
2851 (info_frame_cmd_list): New global for sub-commands.
2852 (_initialize_stack): Register sub-commands for 'frame',
2853 'select-frame', and 'info frame'. Update 'frame apply' commands
2854 to use frame_apply_cmd_list. Move function local static
2855 frame_apply_list to file static frame_apply_cmd_list for
2856 consistency.
2857 * stack.h (select_frame_command): Delete declarationn.
2858 (select_frame_for_mi): Declare new function.
2859
2860 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
2861
2862 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2863 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2864 and NOP.
2865
2866 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
2867
2868 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2869
2870 2018-09-26 Tom Tromey <tom@tromey.com>
2871
2872 * valops.c (auto_abandon): Remove dead code.
2873
2874 2018-09-26 Tom Tromey <tom@tromey.com>
2875
2876 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2877
2878 2018-09-24 Tom Tromey <tom@tromey.com>
2879
2880 * common/pathstuff.c (get_standard_cache_dir): Make
2881 "xdg_cache_home" and "home" const.
2882 * top.c (init_history): Make "tmpenv" const.
2883 * main.c (get_init_files): Make "homedir" const.
2884
2885 2018-09-23 Tom Tromey <tom@tromey.com>
2886
2887 PR python/18852:
2888 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2889
2890 2018-09-23 Tom Tromey <tom@tromey.com>
2891
2892 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2893 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2894 * python/python-internal.h (gdbpy_handle_exception): Declare.
2895 * python/py-utils.c (gdbpy_handle_exception): New function.
2896
2897 2018-09-23 Tom Tromey <tom@tromey.com>
2898
2899 PR python/17284:
2900 * python/py-type.c (typy_template_argument): Check for negative
2901 argument number.
2902
2903 2018-09-23 Tom Tromey <tom@tromey.com>
2904
2905 PR python/14062:
2906 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2907
2908 2018-09-23 Tom Tromey <tom@tromey.com>
2909
2910 PR python/18170:
2911 * python/py-value.c (valpy_int): Allow conversion from pointer
2912 type.
2913
2914 2018-09-23 Tom Tromey <tom@tromey.com>
2915
2916 PR python/20126:
2917 * python/py-value.c (valpy_int): Respect type sign.
2918
2919 2018-09-23 Tom Tromey <tom@tromey.com>
2920
2921 PR python/18352;
2922 * python/py-value.c (valpy_float): Allow conversions from int or
2923 char.
2924 (valpy_int, valpy_long): Allow conversions from float.
2925
2926 2018-09-23 Tom Tromey <tom@tromey.com>
2927
2928 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2929 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2930
2931 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2932
2933 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2934 __sighndlr.
2935 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2936
2937 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
2938
2939 * windows-nat.c (windows_nat_target::wait): Remove a spurious
2940 target_terminal::ours().
2941
2942 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
2943
2944 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2945 of vl to ULONGEST.
2946
2947 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
2948
2949 * breakpoint.c (update_inserted_breakpoint_locations): Remove
2950 redundant condition.
2951
2952 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2953
2954 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2955
2956 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2957 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
2958 * sol-thread.c (ps_pdmodel): Don't guard definition.
2959
2960 * procfs.c: Fix formatting.
2961
2962 * procfs.c (sysset_t_alloc): Remove.
2963 (create_procinfo): Use XNEW instead of sysset_t_alloc.
2964 (procfs_debug_inferior): Likewise.
2965 (procfs_set_exec_trap): Likewise.
2966 (proc_set_traced_sysentry): Don't allocate argp dynamically.
2967 (proc_set_traced_sysexit): Likewise.
2968
2969 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2970 (dead_procinfo): Likewise.
2971 (proc_warn): Likewise.
2972 (proc_error): Likewise.
2973 (proc_get_LDT_entry): Likewise.
2974 (do_attach): Likewise.
2975 (procfs_target::pid_to_str): Likewise.
2976 (iterate_over_mappings): Likewise.
2977
2978 * procfs.c (create_procinfo): Fix ARI warning.
2979 (proc_get_status): Likewise.
2980 (proc_stop_process): Likewise.
2981 (proc_run_process): Likewise.
2982 (proc_kill): Likewise.
2983 (proc_get_LDT_entry): Likewise.
2984 (procfs_find_LDT_entry): Likewise.
2985 (proc_update_threads): Likewise.
2986 (proc_iterate_over_threads): Likewise.
2987 (do_attach): Likewise.
2988 (procfs_xfer_memory): Likewise.
2989 (invalidate_cache): Likewise.
2990 (procfs_target::resume): Likewise.
2991 (procfs_init_inferior): Likewise.
2992 (procfs_set_exec_trap): Likewise.
2993 (procfs_target::thread_alive): Likewise.
2994 (procfs_target::pid_to_exec_file): Likewise.
2995 (iterate_over_mappings): Likewise.
2996 (procfs_target::make_corefile_notes): Likewise.
2997 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2998
2999 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
3000 (procfs_find_LDT_entry): Likewise.
3001 * sol-thread.c (ps_lgetLDT): Likewise.
3002
3003 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3004
3005 PR tdep/17903
3006 * procfs.c (procfs_target): Declare pid_to_exec_file.
3007 (procfs_target::pid_to_exec_file): New.
3008
3009 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3010
3011 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
3012 renaming.
3013 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
3014 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
3015
3016 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3017
3018 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
3019 (supply_fpregset, fill_fpregset): Move ...
3020 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
3021 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
3022 Remove references to ioctl-based procfs.
3023 Include <sys/reg.h>.
3024 Remove PR_MODEL_NATIVE guards.
3025 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
3026 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
3027
3028 2018-09-19 Xavier Roirand <roirand@adacore.com>
3029
3030 PR gdb/20981:
3031 * solib-darwin.c (darwin_get_dyld_bfd): New function.
3032 (darwin_solib_get_all_image_info_addr_at_init): Update call.
3033 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3034
3035 2018-09-19 John Baldwin <jhb@FreeBSD.org>
3036
3037 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3038 (fbsd_print_sockaddr_in6): Likewise.
3039
3040 2018-09-19 Richard Bunt <richard.bunt@arm.com>
3041 Chris January <chris.january@arm.com>
3042
3043 * eval.c (skip_undetermined_arglist): Skip argument list helper.
3044 (evaluate_subexp_standard): Return a dummy type when
3045 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3046 OP_F77_UNDETERMINED_ARGLIST case.
3047 * expression.h (enum noside): Update comment.
3048
3049 2018-09-19 George Vasick <george.vasick@oracle.com>
3050
3051 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3052
3053 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
3054 April Chin <april.chin@oracle.com>
3055 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3056
3057 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3058 uint_t lwpid_t.
3059 (create_procinfo): Print pids in /proc without leading zeros.
3060
3061 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
3062
3063 * nios2-tdep.c (nios2_gcc_target_options): New.
3064 (nios2_gdb_arch_init): Install new hook.
3065
3066 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
3067
3068 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3069 New file.
3070 * update-gnulib.sh: Apply patch.
3071 * configure: Re-generate.
3072
3073 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3074
3075 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3076 description. Make "info proc" command descriptions more
3077 consistent.
3078
3079 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3080
3081 * NEWS: Mention 'info proc files' command.
3082
3083 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3084
3085 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3086 descriptors for IP_FILES and IP_ALL.
3087
3088 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3089
3090 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3091 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3092 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3093 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3094 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3095 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3096 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3097 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3098 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3099 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3100 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3101 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3102 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3103 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3104 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3105 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3106 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3107 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3108 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3109 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3110 (struct fbsd_sockaddr_un): New types.
3111 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3112 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3113 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3114 (fbsd_core_info_proc_files): New functions.
3115 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3116 IP_ALL.
3117 * fbsd-tdep.h (fbsd_info_proc_files_header)
3118 (fbsd_info_proc_files_entry): New.
3119
3120 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3121
3122 * defs.h (enum info_proc_what) [IP_FILES]: New value.
3123 * infcmd.c (info_proc_cmd_files): New function.
3124 (_initialize_infcmd): Register 'info proc files' command.
3125
3126 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3127
3128 * gnulib/aclocal-m4-deps.mk: Re-generate.
3129 * gnulib/aclocal.m4: Re-generate.
3130 * gnulib/config.in: Re-generate.
3131 * gnulib/configure: Re-generate.
3132 * gnulib/import/Makefile.am: Re-generate.
3133 * gnulib/import/Makefile.in: Re-generate.
3134 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3135 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3136 * gnulib/import/arpa_inet.in.h: New file.
3137 * gnulib/import/inet_ntop.c: New file.
3138 * gnulib/import/m4/arpa_inet_h.m4: New file.
3139 * gnulib/import/m4/inet_ntop.m4: New file.
3140 * gnulib/import/m4/netinet_in_h.m4: New file.
3141 * gnulib/import/m4/socklen.m4: New file.
3142 * gnulib/import/m4/sockpfaf.m4: New file.
3143 * gnulib/import/m4/stdalign.m4: New file.
3144 * gnulib/import/m4/sys_uio_h.m4: New file.
3145 * gnulib/import/netinet_in.in.h: New file.
3146 * gnulib/import/stdalign.in.h: New file.
3147 * gnulib/import/sys_socket.c: New file.
3148 * gnulib/import/sys_socket.in.h: New file.
3149 * gnulib/import/sys_uio.in.h: New file.
3150 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3151 module.
3152
3153 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3154
3155 * gnulib/aclocal-m4-deps.mk: New file.
3156 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3157 deterministically.
3158
3159 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3160
3161 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3162 KVE_PATH.
3163
3164 2018-09-18 Tom Tromey <tom@tromey.com>
3165
3166 * compile/compile-object-load.c (struct
3167 link_hash_table_cleanup_data): Add constructor and destructor.
3168 Use DISABLE_COPY_AND_ASSIGN.
3169 (~link_hash_table_cleanup_data): Rename from
3170 link_hash_table_free. Now a destructor.
3171 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
3172
3173 2018-09-18 Tom Tromey <tom@tromey.com>
3174
3175 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3176 * compile/compile-object-load.c (struct munmap_list): Move to
3177 header file.
3178 (munmap_list::add): Rename from munmap_list_add; rewrite.
3179 (munmap_list::~munmap_list): Rename from munmap_list_free.
3180 (munmap_listp_free_cleanup): Remove.
3181 (compile_object_load): Update.
3182 * compile/compile-object-load.h (struct munmap_list): Move from
3183 compile-object-load.c. Rewrite.
3184
3185 2018-09-18 Alan Hayward <alan.hayward@arm.com>
3186
3187 * aarch64-tdep.c (pass_in_v): Use register size.
3188 (aarch64_extract_return_value): Likewise.
3189 (aarch64_store_return_value): Likewise.
3190
3191 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3192
3193 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3194 rlim_t.
3195
3196 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3197
3198 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3199 Fix short help line.
3200
3201 2018-09-17 Tom Tromey <tom@tromey.com>
3202
3203 PR python/20445:
3204 * configure: Rebuild.
3205 * configure.ac: Conditionally use -DNDEBUG for Python.
3206
3207 2018-09-17 Tom Tromey <tom@tromey.com>
3208
3209 * configure: Rebuild.
3210 * configure.ac: Use gmp as a library dependency when checking for
3211 mpfr.
3212
3213 2018-09-17 Pedro Alves <palves@redhat.com>
3214
3215 * python/py-inferior.c (find_inferior_object): Delete.
3216
3217 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
3218
3219 * compile/compile-cplus-types.c
3220 (compile_cplus_instance::enter_scope): Don't use new_scope after
3221 std::move.
3222
3223 2018-09-17 Tom Tromey <tom@tromey.com>
3224
3225 * common/pathstuff.c (get_standard_cache_dir): Use
3226 ~/Library/Caches on macOS.
3227 * common/pathstuff.h (get_standard_cache_dir): Update comment.
3228
3229 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
3230
3231 PR python/23669
3232 * breakpoint.c (commands_cmd_element): New.
3233 (_initialize_breakpoint): Assign commands_cmd_element.
3234 * breakpoint.h (commands_cmd_element): New.
3235 * cli/cli-script.c (while_cmd_element, if_command,
3236 define_cmd_element): New.
3237 (command_name_equals): Remove.
3238 (process_next_line): Compare commands by pointer, not by name.
3239 (_initialize_cli_script): Assign the various cmd_list_element
3240 variables.
3241 * compile/compile.c (compile_cmd_element): New.
3242 (_initialize_compile): Assign compile_cmd_element.
3243 * compile/compile.h (compile_cmd_element): New.
3244 * guile/guile.c (guile_cmd_element): New.
3245 (install_gdb_commands): Assign guile_cmd_element.
3246 * guile/guile.h (guile_cmd_element): New.
3247 * python/python.c (python_cmd_element): New.
3248 (_initialize_python): Assign python_cmd_element.
3249 * python/python.h (python_cmd_element): New.
3250 * tracepoint.c (while_stepping_cmd_element): New.
3251 (_initialize_tracepoint): Assign while_stepping_cmd_element.
3252 * tracepoint.h (while_stepping_cmd_element): New.
3253
3254 2018-09-17 Tom Tromey <tom@tromey.com>
3255
3256 * infrun.c (save_infcall_suspend_state): Return
3257 infcall_suspend_state_up.
3258 (save_infcall_control_state): Return infcall_control_state_up.
3259 * inferior.h (save_infcall_suspend_state)
3260 (save_infcall_control_state): Declare later. Return unique
3261 pointers.
3262
3263 2018-09-17 Tom Tromey <tom@tromey.com>
3264
3265 * infrun.c (struct stop_context): Declare constructor,
3266 destructor, "changed" method.
3267 (stop_context::stop_context): Rename from save_stop_context.
3268 (stop_context::~stop_context): Rename from
3269 release_stop_context_cleanup.
3270 (normal_stop): Update.
3271 (stop_context::changed): Rename from stop_context_changed. Return
3272 bool.
3273
3274 2018-09-17 Tom Tromey <tom@tromey.com>
3275
3276 * inferior.h (struct infcall_suspend_state_deleter): New.
3277 (infcall_suspend_state_up): New typedef.
3278 (struct infcall_control_state_deleter): New.
3279 (infcall_control_state_up): New typedef.
3280 (make_cleanup_restore_infcall_suspend_state)
3281 (make_cleanup_restore_infcall_control_state): Don't declare.
3282 * infcall.c (call_function_by_hand_dummy): Update.
3283 * infrun.c (do_restore_infcall_suspend_state_cleanup)
3284 (make_cleanup_restore_infcall_suspend_state): Remove.
3285 (do_restore_infcall_control_state_cleanup)
3286 (make_cleanup_restore_infcall_control_state): Remove.
3287
3288 2018-09-17 Tom Tromey <tom@tromey.com>
3289
3290 * gdbthread.h (struct thread_control_state): Add initializer.
3291 (class thread_info) <control>: Remove initializer.
3292 * inferior.h (struct inferior_control_state): Add initializer.
3293 (class inferior) <control>: Remove initializer.
3294 (exit_inferior_1): Update.
3295 * infrun.c (struct infcall_control_state): Add constructors.
3296 (save_infcall_control_state): Use new.
3297 (restore_infcall_control_state, discard_infcall_control_state):
3298 Use delete.
3299
3300 2018-09-17 Tom Tromey <tom@tromey.com>
3301
3302 * infrun.c (struct infcall_suspend_state) <registers>: Now a
3303 unique_ptr.
3304 <siginfo_data>: Now a unique_xmalloc_ptr.
3305 (save_infcall_suspend_state, restore_infcall_suspend_state)
3306 (discard_infcall_suspend_state)
3307 (get_infcall_suspend_state_regcache): Update.
3308
3309 2018-09-17 Tom Tromey <tom@tromey.com>
3310
3311 * gdbthread.h (struct thread_suspend_state): Add initializers.
3312 (class thread_info) <suspend>: Remove initializer.
3313 * infrun.c (struct infcall_suspend_state): Add initializers.
3314 (save_infcall_suspend_state): Use new.
3315 (discard_infcall_suspend_state): Use delete.
3316
3317 2018-09-16 Tom Tromey <tom@tromey.com>
3318
3319 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3320 Remove.
3321 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3322 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3323 (py_varobj_iter_new): Likewise.
3324 (py_varobj_get_iterator): Use gdbpy_ref.
3325
3326 2018-09-16 Tom Tromey <tom@tromey.com>
3327
3328 * python/py-threadevent.c (py_get_event_thread): Simplify.
3329 * python/py-inferior.c (infpy_thread_from_thread_handle):
3330 Return immediately after calling thread_to_thread_object. Use
3331 Py_RETURN_NONE.
3332 (thread_to_thread_object): Set the exception on a NULL return.
3333
3334 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
3335
3336 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3337
3338 2018-09-16 Tom Tromey <tom@tromey.com>
3339
3340 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3341 Remove.
3342
3343 2018-09-16 Tom Tromey <tom@tromey.com>
3344
3345 * python/python-internal.h (thread_to_thread_object): Change
3346 return type.
3347 * python/py-inferior.c (thread_to_thread_object): Return a new
3348 reference.
3349 (infpy_thread_from_thread_handle): Update.
3350 * python/py-infthread.c (gdbpy_selected_thread): Update.
3351 * python/py-stopevent.c (create_stop_event_object): Update.
3352 * python/py-threadevent.c (py_get_event_thread): Return a new
3353 reference.
3354 (py_get_event_thread): Update.
3355 * python/py-event.h (py_get_event_thread): Change return type.
3356 * python/py-continueevent.c (create_continue_event_object):
3357 Update.
3358
3359 2018-09-16 Tom Tromey <tom@tromey.com>
3360
3361 * python/py-progspace.c (pspy_get_objfiles): Update.
3362 * python/python-internal.h (objfile_to_objfile_object): Change
3363 return type.
3364 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3365 Update.
3366 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3367 Update.
3368 * python/python.c (gdbpy_get_current_objfile): Update.
3369 (gdbpy_objfiles): Update.
3370 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3371 Update.
3372 (objfile_to_objfile_object): Return a new reference.
3373 * python/py-symtab.c (stpy_get_objfile): Update.
3374 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3375 Update.
3376
3377 2018-09-16 Tom Tromey <tom@tromey.com>
3378
3379 * python/py-inferior.c (infpy_get_progspace): Update.
3380 * python/python-internal.h (pspace_to_pspace_object): Change
3381 return type.
3382 * python/py-newobjfileevent.c
3383 (create_clear_objfiles_event_object): Update.
3384 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3385 Update.
3386 * python/python.c (gdbpy_get_current_progspace): Update.
3387 (gdbpy_progspaces): Update.
3388 * python/py-progspace.c (pspace_to_pspace_object): Return a new
3389 reference.
3390 * python/py-objfile.c (objfpy_get_progspace): Update.
3391 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3392 Update.
3393
3394 2018-09-16 Tom Tromey <tom@tromey.com>
3395
3396 * python/lib/gdb/__init__.py (current_progspace, objfiles)
3397 (solib_name, block_for_pc, find_pc_line): New functions.
3398 (execute_unwinders): Update.
3399 * python/py-block.c (gdbpy_block_for_pc): Remove.
3400 * python/py-inferior.c (infpy_get_progspace): New function.
3401 (inferior_object_getset) <progspace>: Add.
3402 * python/py-progspace.c (pspy_objfiles): Rewrite.
3403 (pspy_solib_name, pspy_block_for_pc)
3404 (pspy_find_pc_line, pspy_is_valid): New functions.
3405 (progspace_object_methods): Add entries for solib_name,
3406 block_for_pc, find_pc_line, is_valid.
3407 * python/python-internal.h (gdbpy_block_for_pc)
3408 (build_objfiles_list): Don't declare.
3409 * python/python.c: Don't include solib.h.
3410 (gdbpy_solib_name, gdbpy_find_pc_line)
3411 (gdbpy_get_current_progspace, build_objfiles_list)
3412 (gdbpy_objfiles): Remove.
3413 (GdbMethods) <current_progspace, objfiles, block_for_pc,
3414 solib_name, find_pc_line>: Remove entries.
3415
3416 2018-09-16 Tom Tromey <tom@tromey.com>
3417
3418 * top.c (new_ui_command): Use GNU style for metasyntactic
3419 variables.
3420 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3421 variables.
3422 * maint.c (maintenance_translate_address): Remove "<>" around
3423 text.
3424 * interps.c (interpreter_exec_cmd): Use GNU style for
3425 metasyntactic variables.
3426 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3427 metasyntactic variables.
3428 * tracepoint.c (tfind_range_command): Use GNU style for
3429 metasyntactic variables.
3430 (tfind_outside_command): Likewise.
3431 (_initialize_tracepoint): Likewise.
3432 * remote.c (extended_remote_target::create_inferior): Use GNU
3433 style for metasyntactic variables.
3434 * sparc64-tdep.c (adi_examine_command): Use GNU style for
3435 metasyntactic variables.
3436 (adi_assign_command): Likewise.
3437
3438 2018-09-16 Tom Tromey <tom@tromey.com>
3439
3440 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3441 metasyntactic variables. Print message if no disassembler options
3442 are available.
3443
3444 2018-09-15 Tom Tromey <tom@tromey.com>
3445
3446 * infcmd.c (get_inferior_args): Return const char *.
3447 * inferior.h (get_inferior_args): Return type now const.
3448 * linux-tdep.c (linux_fill_prpsinfo): Update.
3449 * procfs.c (procfs_target::make_corefile_notes): Update.
3450
3451 2018-09-07 Tom Tromey <tom@tromey.com>
3452
3453 * python/python.c (execute_gdb_command): Call bpstat_do_actions
3454 inside the TRY.
3455
3456 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
3457
3458 * nios2-tdep.c (nios2_type_align): New.
3459 (nios2_gdb_arch_init): Install type_align hook.
3460
3461 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3462
3463 * eval.c (fake_method::fake_method): Call xzalloc directly for a
3464 type that is neither object file owned, nor gdbarch owned.
3465 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3466 gdbarch is non-NULL.
3467 (alloc_type_instance): Allocate non-objfile owned types on the
3468 gdbarch obstack.
3469 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3470 using TYPE_ALLOC to ensure memory is allocated on the correct
3471 obstack.
3472 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3473 obstack, or the gdbarch obstack.
3474 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3475
3476 2018-09-14 Tom Tromey <tom@tromey.com>
3477
3478 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3479 block.
3480
3481 2018-09-14 Tom Tromey <tom@tromey.com>
3482
3483 * nat/fork-inferior.c (get_startup_shell): Remove "static".
3484
3485 2018-09-13 Tom Tromey <tom@tromey.com>
3486
3487 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3488 static.
3489
3490 2018-09-13 Tom Tromey <tom@tromey.com>
3491
3492 * exec.c (try_open_exec_file): Use std::string.
3493
3494 2018-09-13 Tom Tromey <tom@tromey.com>
3495
3496 * utils.h (gdb_bfd_errmsg): Return std::string.
3497 * exec.c (exec_file_attach): Update.
3498 * compile/compile-object-load.c (compile_object_load): Update.
3499 * utils.c (gdb_bfd_errmsg): Return std::string.
3500
3501 2018-09-13 Tom Tromey <tom@tromey.com>
3502
3503 * procfs.c (struct procinfo_deleter): New.
3504 (procinfo_up): New typedef.
3505 (do_destroy_procinfo_cleanup): Remove.
3506 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
3507
3508 2018-09-13 Tom Tromey <tom@tromey.com>
3509
3510 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3511
3512 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3513 2018-09-13 Tom Tromey <tom@tromey.com>
3514
3515 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3516 (pspy_get_objfiles): New function.
3517 (progspace_object_methods): New.
3518 (pspace_object_type): Add tp_methods callback.
3519 * python/python-internal.h (build_objfiles_list): New
3520 declaration.
3521 * python/python.c (build_objfiles_list): New function.
3522 (gdbpy_objfiles): Implement using build_objfiles_list.
3523 * NEWS: Mention the Progspace.objfiles method.
3524
3525 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3526
3527 * python/py-inferior.c (infpy_get_progspace): New function.
3528 (inferior_object_getset): Add progspace property.
3529 * NEWS: Mention the new property.
3530
3531 2018-09-13 Tom Tromey <tom@tromey.com>
3532
3533 PR rust/23650:
3534 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3535
3536 2018-09-13 Tom Tromey <tom@tromey.com>
3537
3538 PR rust/23626:
3539 * rust-lang.c (rust_enum_variant): Now static.
3540 (rust_empty_enum_p): New function.
3541 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3542 Handle empty enum.
3543
3544 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3545
3546 * python/py-inferior.c (infpy_repr): New.
3547 (inferior_object_type): Register infpy_repr.
3548 * python/py-objfile.c (objfpy_repr): New.
3549 (objfile_object_type): Register objfpy_repr.
3550
3551 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3552
3553 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3554
3555 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3556
3557 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3558 typo.
3559
3560 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
3561
3562 * common/common-utils.c: Don't include '<sys/stat.h>'.
3563 (is_regular_file): Move to...
3564 * common/filestuff.c (is_regular_file): ... here.
3565 * common/common-utils.h (is_regular_file): Move to...
3566 * common/filestuff.h (is_regular_file): ... here.
3567
3568 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
3569
3570 * skip.c (debug_skip): New variable.
3571 (skiplist_entry::do_skip_file_p): Add debug output.
3572 (skiplist_entry::do_skip_gfile_p): Likewise.
3573 (skiplist_entry::skip_function_p): Likewise.
3574 (_initialize_step_skip): Create debug command.
3575 * NEWS: Mention set/show debug skip.
3576
3577 2018-09-11 Xavier Roirand <roirand@adacore.com>
3578
3579 * darwin-nat.c (should_disable_startup_with_shell):
3580 New function.
3581 (darwin_nat_target::create_inferior): Add call.
3582
3583 2018-09-11 Xavier Roirand <roirand@adacore.com>
3584
3585 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3586 inf_port, msg_state>: Initialize.
3587 (struct darwin_thread_info) <signaled, single_step>: Change
3588 type and initialize.
3589 (struct darwin_thread_info) <event>: Initialize.
3590
3591 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3592
3593 PR gdb/23555
3594 PR gdb/23558
3595 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3596 guesses.
3597
3598 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3599
3600 Revert:
3601 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
3602
3603 PR gdb/23555
3604 PR gdb/23558
3605 * gnulib/aclocal.m4: Regenerate.
3606 * gnulib/config.in: Regenerate.
3607 * gnulib/configure: Regenerate.
3608 * gnulib/import/Makefile.am: Update.
3609 * gnulib/import/Makefile.in: Update.
3610 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3611 * gnulib/import/_Noreturn.h: ... this.
3612 * gnulib/import/alloca.in.h: Update.
3613 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3614 * gnulib/import/arg-nonnull.h: ... this.
3615 * gnulib/import/assure.h: Update.
3616 * gnulib/import/at-func.c: Update.
3617 * gnulib/import/basename-lgpl.c: Update.
3618 * gnulib/import/extra/snippet/c++defs.h: Rename to...
3619 * gnulib/import/c++defs.h: ... this.
3620 * gnulib/import/canonicalize-lgpl.c: Update.
3621 * gnulib/import/cdefs.h: Update.
3622 * gnulib/import/chdir-long.c: Update.
3623 * gnulib/import/chdir-long.h: Update.
3624 * gnulib/import/cloexec.c: Update.
3625 * gnulib/import/cloexec.h: Update.
3626 * gnulib/import/close.c: Update.
3627 * gnulib/import/closedir.c: Update.
3628 * gnulib/import/config.charset: Update.
3629 * gnulib/import/dirent-private.h: Update.
3630 * gnulib/import/dirent.in.h: Update.
3631 * gnulib/import/dirfd.c: Update.
3632 * gnulib/import/dirname-lgpl.c: Update.
3633 * gnulib/import/dirname.h: Update.
3634 * gnulib/import/dosname.h: Update.
3635 * gnulib/import/dup-safer-flag.c: Update.
3636 * gnulib/import/dup-safer.c: Update.
3637 * gnulib/import/dup.c: Update.
3638 * gnulib/import/dup2.c: Update.
3639 * gnulib/import/errno.in.h: Update.
3640 * gnulib/import/error.c: Update.
3641 * gnulib/import/error.h: Update.
3642 * gnulib/import/exitfail.c: Update.
3643 * gnulib/import/exitfail.h: Update.
3644 * gnulib/import/extra/update-copyright: Update.
3645 * gnulib/import/fchdir.c: Update.
3646 * gnulib/import/fcntl.c: Update.
3647 * gnulib/import/fcntl.in.h: Update.
3648 * gnulib/import/fd-hook.c: Update.
3649 * gnulib/import/fd-hook.h: Update.
3650 * gnulib/import/fd-safer-flag.c: Update.
3651 * gnulib/import/fd-safer.c: Update.
3652 * gnulib/import/fdopendir.c: Update.
3653 * gnulib/import/filename.h: Update.
3654 * gnulib/import/filenamecat-lgpl.c: Update.
3655 * gnulib/import/filenamecat.h: Update.
3656 * gnulib/import/flexmember.h: Update.
3657 * gnulib/import/float+.h: Update.
3658 * gnulib/import/float.c: Update.
3659 * gnulib/import/float.in.h: Update.
3660 * gnulib/import/fnmatch.c: Update.
3661 * gnulib/import/fnmatch.in.h: Update.
3662 * gnulib/import/fnmatch_loop.c: Update.
3663 * gnulib/import/fpucw.h: Update.
3664 * gnulib/import/frexp.c: Update.
3665 * gnulib/import/frexpl.c: Update.
3666 * gnulib/import/fstat.c: Update.
3667 * gnulib/import/fstatat.c: Update.
3668 * gnulib/import/getcwd-lgpl.c: Update.
3669 * gnulib/import/getcwd.c: Update.
3670 * gnulib/import/getdtablesize.c: Update.
3671 * gnulib/import/getlogin_r.c: Update.
3672 * gnulib/import/getprogname.c: Update.
3673 * gnulib/import/getprogname.h: Update.
3674 * gnulib/import/gettext.h: Update.
3675 * gnulib/import/gettimeofday.c: Update.
3676 * gnulib/import/glob-libc.h: Update.
3677 * gnulib/import/glob.c: Update.
3678 * gnulib/import/glob.in.h: Update.
3679 * gnulib/import/glob_internal.h: Update.
3680 * gnulib/import/glob_pattern_p.c: Update.
3681 * gnulib/import/globfree.c: Update.
3682 * gnulib/import/hard-locale.c: Update.
3683 * gnulib/import/hard-locale.h: Update.
3684 * gnulib/import/intprops.h: Update.
3685 * gnulib/import/inttypes.in.h: Update.
3686 * gnulib/import/isnan.c: Update.
3687 * gnulib/import/isnand-nolibm.h: Update.
3688 * gnulib/import/isnand.c: Update.
3689 * gnulib/import/isnanl-nolibm.h: Update.
3690 * gnulib/import/isnanl.c: Update.
3691 * gnulib/import/itold.c: Update.
3692 * gnulib/import/libc-config.h: Update.
3693 * gnulib/import/limits.in.h: Update.
3694 * gnulib/import/localcharset.c: Update.
3695 * gnulib/import/localcharset.h: Update.
3696 * gnulib/import/localtime-buffer.c: Update.
3697 * gnulib/import/localtime-buffer.h: Update.
3698 * gnulib/import/lstat.c: Update.
3699 * gnulib/import/m4/00gnulib.m4: Update.
3700 * gnulib/import/m4/__inline.m4: Update.
3701 * gnulib/import/m4/absolute-header.m4: Update.
3702 * gnulib/import/m4/alloca.m4: Update.
3703 * gnulib/import/m4/builtin-expect.m4: Update.
3704 * gnulib/import/m4/canonicalize.m4: Update.
3705 * gnulib/import/m4/chdir-long.m4: Update.
3706 * gnulib/import/m4/close.m4: Update.
3707 * gnulib/import/m4/closedir.m4: Update.
3708 * gnulib/import/m4/configmake.m4: Update.
3709 * gnulib/import/m4/d-ino.m4: Update.
3710 * gnulib/import/m4/d-type.m4: Update.
3711 * gnulib/import/m4/dirent_h.m4: Update.
3712 * gnulib/import/m4/dirfd.m4: Update.
3713 * gnulib/import/m4/dirname.m4: Update.
3714 * gnulib/import/m4/double-slash-root.m4: Update.
3715 * gnulib/import/m4/dup.m4: Update.
3716 * gnulib/import/m4/dup2.m4: Update.
3717 * gnulib/import/m4/eealloc.m4: Update.
3718 * gnulib/import/m4/environ.m4: Update.
3719 * gnulib/import/m4/errno_h.m4: Update.
3720 * gnulib/import/m4/error.m4: Update.
3721 * gnulib/import/m4/exponentd.m4: Update.
3722 * gnulib/import/m4/exponentl.m4: Update.
3723 * gnulib/import/m4/extensions.m4: Update.
3724 * gnulib/import/m4/extern-inline.m4: Update.
3725 * gnulib/import/m4/fchdir.m4: Update.
3726 * gnulib/import/m4/fcntl-o.m4: Update.
3727 * gnulib/import/m4/fcntl.m4: Update.
3728 * gnulib/import/m4/fcntl_h.m4: Update.
3729 * gnulib/import/m4/fdopendir.m4: Update.
3730 * gnulib/import/m4/filenamecat.m4: Update.
3731 * gnulib/import/m4/flexmember.m4: Update.
3732 * gnulib/import/m4/float_h.m4: Update.
3733 * gnulib/import/m4/fnmatch.m4: Update.
3734 * gnulib/import/m4/fnmatch_h.m4: Update.
3735 * gnulib/import/m4/fpieee.m4: Update.
3736 * gnulib/import/m4/frexp.m4: Update.
3737 * gnulib/import/m4/frexpl.m4: Update.
3738 * gnulib/import/m4/fstat.m4: Update.
3739 * gnulib/import/m4/fstatat.m4: Update.
3740 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3741 * gnulib/import/m4/getcwd-path-max.m4: Update.
3742 * gnulib/import/m4/getcwd.m4: Update.
3743 * gnulib/import/m4/getdtablesize.m4: Update.
3744 * gnulib/import/m4/getlogin.m4: Update.
3745 * gnulib/import/m4/getlogin_r.m4: Update.
3746 * gnulib/import/m4/getpagesize.m4: Update.
3747 * gnulib/import/m4/getprogname.m4: Update.
3748 * gnulib/import/m4/gettimeofday.m4: Update.
3749 * gnulib/import/m4/glibc21.m4: Update.
3750 * gnulib/import/m4/glob.m4: Update.
3751 * gnulib/import/m4/glob_h.m4: Update.
3752 * gnulib/import/m4/gnulib-cache.m4: Update.
3753 * gnulib/import/m4/gnulib-common.m4: Update.
3754 * gnulib/import/m4/gnulib-comp.m4: Update.
3755 * gnulib/import/m4/gnulib-tool.m4: Update.
3756 * gnulib/import/m4/hard-locale.m4: Update.
3757 * gnulib/import/m4/include_next.m4: Update.
3758 * gnulib/import/m4/inttypes-pri.m4: Update.
3759 * gnulib/import/m4/inttypes.m4: Update.
3760 * gnulib/import/m4/isnand.m4: Update.
3761 * gnulib/import/m4/isnanl.m4: Update.
3762 * gnulib/import/m4/largefile.m4: Update.
3763 * gnulib/import/m4/limits-h.m4: Update.
3764 * gnulib/import/m4/localcharset.m4: Update.
3765 * gnulib/import/m4/locale-fr.m4: Update.
3766 * gnulib/import/m4/locale-ja.m4: Update.
3767 * gnulib/import/m4/locale-zh.m4: Update.
3768 * gnulib/import/m4/localtime-buffer.m4: Update.
3769 * gnulib/import/m4/longlong.m4: Update.
3770 * gnulib/import/m4/lstat.m4: Update.
3771 * gnulib/import/m4/malloc.m4: Update.
3772 * gnulib/import/m4/malloca.m4: Update.
3773 * gnulib/import/m4/math_h.m4: Update.
3774 * gnulib/import/m4/mbrtowc.m4: Update.
3775 * gnulib/import/m4/mbsinit.m4: Update.
3776 * gnulib/import/m4/mbsrtowcs.m4: Update.
3777 * gnulib/import/m4/mbstate_t.m4: Update.
3778 * gnulib/import/m4/memchr.m4: Update.
3779 * gnulib/import/m4/memmem.m4: Update.
3780 * gnulib/import/m4/mempcpy.m4: Update.
3781 * gnulib/import/m4/memrchr.m4: Update.
3782 * gnulib/import/m4/mkdir.m4: Update.
3783 * gnulib/import/m4/mkstemp.m4: Update.
3784 * gnulib/import/m4/mmap-anon.m4: Update.
3785 * gnulib/import/m4/mode_t.m4: Update.
3786 * gnulib/import/m4/msvc-inval.m4: Update.
3787 * gnulib/import/m4/msvc-nothrow.m4: Update.
3788 * gnulib/import/m4/multiarch.m4: Update.
3789 * gnulib/import/m4/nocrash.m4: Update.
3790 * gnulib/import/m4/off_t.m4: Update.
3791 * gnulib/import/m4/onceonly.m4: Update.
3792 * gnulib/import/m4/open-cloexec.m4: Update.
3793 * gnulib/import/m4/open.m4: Update.
3794 * gnulib/import/m4/openat.m4: Update.
3795 * gnulib/import/m4/opendir.m4: Update.
3796 * gnulib/import/m4/pathmax.m4: Update.
3797 * gnulib/import/m4/rawmemchr.m4: Update.
3798 * gnulib/import/m4/readdir.m4: Update.
3799 * gnulib/import/m4/readlink.m4: Update.
3800 * gnulib/import/m4/realloc.m4: Update.
3801 * gnulib/import/m4/rename.m4: Update.
3802 * gnulib/import/m4/rewinddir.m4: Update.
3803 * gnulib/import/m4/rmdir.m4: Update.
3804 * gnulib/import/m4/save-cwd.m4: Update.
3805 * gnulib/import/m4/secure_getenv.m4: Update.
3806 * gnulib/import/m4/setenv.m4: Update.
3807 * gnulib/import/m4/signal_h.m4: Update.
3808 * gnulib/import/m4/ssize_t.m4: Update.
3809 * gnulib/import/m4/stat-time.m4: Update.
3810 * gnulib/import/m4/stat.m4: Update.
3811 * gnulib/import/m4/std-gnu11.m4: Update.
3812 * gnulib/import/m4/stdbool.m4: Update.
3813 * gnulib/import/m4/stddef_h.m4: Update.
3814 * gnulib/import/m4/stdint.m4: Update.
3815 * gnulib/import/m4/stdio_h.m4: Update.
3816 * gnulib/import/m4/stdlib_h.m4: Update.
3817 * gnulib/import/m4/strchrnul.m4: Update.
3818 * gnulib/import/m4/strdup.m4: Update.
3819 * gnulib/import/m4/strerror.m4: Update.
3820 * gnulib/import/m4/string_h.m4: Update.
3821 * gnulib/import/m4/strstr.m4: Update.
3822 * gnulib/import/m4/strtok_r.m4: Update.
3823 * gnulib/import/m4/sys_socket_h.m4: Update.
3824 * gnulib/import/m4/sys_stat_h.m4: Update.
3825 * gnulib/import/m4/sys_time_h.m4: Update.
3826 * gnulib/import/m4/sys_types_h.m4: Update.
3827 * gnulib/import/m4/tempname.m4: Update.
3828 * gnulib/import/m4/time_h.m4: Update.
3829 * gnulib/import/m4/unistd-safer.m4: Update.
3830 * gnulib/import/m4/unistd_h.m4: Update.
3831 * gnulib/import/m4/warn-on-use.m4: Update.
3832 * gnulib/import/m4/wchar_h.m4: Update.
3833 * gnulib/import/m4/wchar_t.m4: Update.
3834 * gnulib/import/m4/wctype_h.m4: Update.
3835 * gnulib/import/m4/wint_t.m4: Update.
3836 * gnulib/import/malloc.c: Update.
3837 * gnulib/import/malloc/scratch_buffer.h: Update.
3838 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3839 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3840 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3841 * gnulib/import/malloca.c: Update.
3842 * gnulib/import/malloca.h: Update.
3843 * gnulib/import/malloca.valgrind: Update.
3844 * gnulib/import/math.in.h: Update.
3845 * gnulib/import/mbrtowc.c: Update.
3846 * gnulib/import/mbsinit.c: Update.
3847 * gnulib/import/mbsrtowcs-impl.h: Update.
3848 * gnulib/import/mbsrtowcs-state.c: Update.
3849 * gnulib/import/mbsrtowcs.c: Update.
3850 * gnulib/import/memchr.c: Update.
3851 * gnulib/import/memmem.c: Update.
3852 * gnulib/import/mempcpy.c: Update.
3853 * gnulib/import/memrchr.c: Update.
3854 * gnulib/import/mkdir.c: Update.
3855 * gnulib/import/mkstemp.c: Update.
3856 * gnulib/import/msvc-inval.c: Update.
3857 * gnulib/import/msvc-inval.h: Update.
3858 * gnulib/import/msvc-nothrow.c: Update.
3859 * gnulib/import/msvc-nothrow.h: Update.
3860 * gnulib/import/open.c: Update.
3861 * gnulib/import/openat-die.c: Update.
3862 * gnulib/import/openat-priv.h: Update.
3863 * gnulib/import/openat-proc.c: Update.
3864 * gnulib/import/openat.c: Update.
3865 * gnulib/import/openat.h: Update.
3866 * gnulib/import/opendir.c: Update.
3867 * gnulib/import/pathmax.h: Update.
3868 * gnulib/import/pipe-safer.c: Update.
3869 * gnulib/import/rawmemchr.c: Update.
3870 * gnulib/import/readdir.c: Update.
3871 * gnulib/import/readlink.c: Update.
3872 * gnulib/import/realloc.c: Update.
3873 * gnulib/import/ref-add.sin: Update.
3874 * gnulib/import/ref-del.sin: Update.
3875 * gnulib/import/rename.c: Update.
3876 * gnulib/import/rewinddir.c: Update.
3877 * gnulib/import/rmdir.c: Update.
3878 * gnulib/import/same-inode.h: Update.
3879 * gnulib/import/save-cwd.c: Update.
3880 * gnulib/import/save-cwd.h: Update.
3881 * gnulib/import/scratch_buffer.h: Update.
3882 * gnulib/import/secure_getenv.c: Update.
3883 * gnulib/import/setenv.c: Update.
3884 * gnulib/import/signal.in.h: Update.
3885 * gnulib/import/stat-time.c: Update.
3886 * gnulib/import/stat-time.h: Update.
3887 * gnulib/import/stat-w32.c: Update.
3888 * gnulib/import/stat-w32.h: Update.
3889 * gnulib/import/stat.c: Update.
3890 * gnulib/import/stdbool.in.h: Update.
3891 * gnulib/import/stddef.in.h: Update.
3892 * gnulib/import/stdint.in.h: Update.
3893 * gnulib/import/stdio.in.h: Update.
3894 * gnulib/import/stdlib.in.h: Update.
3895 * gnulib/import/str-two-way.h: Update.
3896 * gnulib/import/strchrnul.c: Update.
3897 * gnulib/import/strdup.c: Update.
3898 * gnulib/import/streq.h: Update.
3899 * gnulib/import/strerror-override.c: Update.
3900 * gnulib/import/strerror-override.h: Update.
3901 * gnulib/import/strerror.c: Update.
3902 * gnulib/import/string.in.h: Update.
3903 * gnulib/import/stripslash.c: Update.
3904 * gnulib/import/strnlen1.c: Update.
3905 * gnulib/import/strnlen1.h: Update.
3906 * gnulib/import/strstr.c: Update.
3907 * gnulib/import/strtok_r.c: Update.
3908 * gnulib/import/sys_stat.in.h: Update.
3909 * gnulib/import/sys_time.in.h: Update.
3910 * gnulib/import/sys_types.in.h: Update.
3911 * gnulib/import/tempname.c: Update.
3912 * gnulib/import/tempname.h: Update.
3913 * gnulib/import/time.in.h: Update.
3914 * gnulib/import/unistd--.h: Update.
3915 * gnulib/import/unistd-safer.h: Update.
3916 * gnulib/import/unistd.in.h: Update.
3917 * gnulib/import/unsetenv.c: Update.
3918 * gnulib/import/verify.h: Update.
3919 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3920 * gnulib/import/wchar.in.h: Update.
3921 * gnulib/import/wctype.in.h: Update.
3922 * gnulib/import/xalloc-oversized.h: Update.
3923 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3924 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3925
3926 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
3927
3928 * record-btrace.c (get_thread_current_frame): Remove
3929 old_inferior_ptid.
3930
3931 2018-09-10 Jerome Guitton <guitton@adacore.com>
3932
3933 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3934 with check_tag to 1 if and only if the type is tagged and the
3935 component being searched cannot been found in the current
3936 view. Otherwise, always call ada_to_fixed_type with
3937 check_tag to 0.
3938
3939 2018-09-10 Xavier Roirand <roirand@adacore.com>
3940
3941 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3942 declaration.
3943 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3944 * ada-varobj.c (ada_varobj_get_number_of_children,
3945 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3946
3947 2018-09-10 Xavier Roirand <roirand@adacore.com>
3948
3949 * ada-valprint.c (ada_value_print): Use type instead of
3950 enclosing type.
3951
3952 2018-09-10 Xavier Roirand <roirand@adacore.com>
3953
3954 * ada-lang.c (ada_value_subscript): Handle case when parameter is
3955 an array of access to unconstrained array.
3956
3957 2018-09-10 Xavier Roirand <roirand@adacore.com>
3958
3959 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3960 (ada_check_typedef): Use it.
3961
3962 2018-09-10 Xavier Roirand <roirand@adacore.com>
3963
3964 * ada-varobj.c (ada_varobj_describe_struct_child)
3965 (ada_varobj_describe_child): Handle union case like struct one.
3966
3967 2018-09-10 Tom Tromey <tom@tromey.com>
3968
3969 PR python/18380:
3970 * python/python.c (_initialize_python): Make example in "python"
3971 help work in Python 3.
3972
3973 2018-09-10 Eli Zaretskii <eliz@gnu.org>
3974
3975 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3976 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
3977 $(EXEEXT) to the script, as it is not a program.
3978
3979 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
3980
3981 * python/py-prettyprint.c (pretty_print_one_value): Return
3982 gdbpy_ref<>.
3983 (print_string_repr): Adjust.
3984 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3985 * python/python-internal.h (apply_varobj_pretty_printer): Return
3986 gdbpy_ref<>.
3987 * varobj.c (varobj_value_get_print_value): Adjust.
3988
3989 2018-09-08 Tom Tromey <tom@tromey.com>
3990
3991 PR python/16047:
3992 * python/py-prettyprint.c (pretty_print_one_value): Check for
3993 to_string method.
3994
3995 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3996
3997 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3998 replace_operator_with_call.
3999
4000 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4001
4002 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
4003
4004 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4005
4006 * ada-typeprint.c (print_range): Print the bounds using TYPE
4007 rather than its TYPE_TARGET_TYPE.
4008
4009 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4010
4011 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4012 call to ada_to_fixed_value_create.
4013
4014 2018-09-08 Jerome Guitton <guitton@adacore.com>
4015
4016 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
4017
4018 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4019
4020 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
4021 by calls to error.
4022
4023 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4024
4025 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
4026 Move update of loop variable "fi".
4027
4028 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4029
4030 * ada-lang.c (value_assign_to_component): In the case of
4031 big-endian targets, extract the bits of the given VAL
4032 using an src_offset of zero if container is not a scalar.
4033
4034 2018-09-06 Simon Ser <contact@emersion.fr>
4035
4036 PR gdb/23105
4037 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4038 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4039 * fbsd-tdep.c (fbsd_make_note_desc): New.
4040 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4041 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4042 * target.h (enum target_object) Add FreeBSD-specific
4043 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4044
4045 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4046
4047 * compile/compile-c.h (generate_c_for_variable_locations):
4048 Change reference to pointer.
4049 * compile/compile-c-support.c (compile_program) <compute>:
4050 Likewise.
4051 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4052 (generate_c_for_for_one_variable): Likewise
4053 (generate_c_for_variable_locations): Likewise
4054 * compile/compile-c-types.c (compile_c_instance::convert_type):
4055 Likewise
4056 * compile/compile-cplus-symbols.c (convert_one_symbol):
4057 std::move the scope passed to enter_scope.
4058 * compile/compile-cplus-types.c
4059 (compile_cplus_instance::enter_scope): Make parameter
4060 rvalue-reference.
4061 (compile_cplus_instance::new_scope): Change reference to
4062 pointer.
4063 (compile_cplus_instance::convert_type): Likewise
4064 (compile_cplus_convert_typedef): std::move the scope passed to
4065 enter_scope.
4066 (compile_cplus_convert_struct_or_union): Likewise.
4067 (compile_cplus_convert_enum): Likewise.
4068 (compile_cplus_convert_namespace): Likewise.
4069 * compile/compile-cplus.h (compile_cplus_instance)
4070 <enter_scope>: Make parameter rvalue-reference.
4071 * compile/compile-internal.h (compile_instance)
4072 <get_cached_type>: Likewise
4073 * compile/compile-loc2c.c (push): Likewise
4074 (pushf): Likewise
4075 (unary): Likewise
4076 (binary): Likewise
4077 (print_label): Likewise
4078 (pushf_register_address): Likewise
4079 (pushf_register): Likewise
4080 (do_compile_dwarf_expr_to_c): Likewise
4081 (compile_dwarf_expr_to_c): Likewise
4082 (compile_dwarf_bounds_to_c): Likewise
4083 * compile/compile.c (compile_instance::get_cached_type):
4084 Likewise
4085 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4086 (compile_dwarf_bounds_to_c): Likewise
4087 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4088 (dwarf2_compile_property_to_c): Likewise
4089 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4090 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4091 Likewise
4092
4093 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4094
4095 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4096 * tui/tui-data.c (init_content_element): Don't initialize it.
4097
4098 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4099
4100 * tui/tui-data.h (struct tui_win_info)
4101 <detail::opaque>: Remove.
4102 * tui/tui-data.c (init_win_info): Remove assignment.
4103
4104 2018-09-05 Tom Tromey <tom@tromey.com>
4105
4106 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4107 -Wformat-nonliteral.
4108 * target-float.c (host_float_ops<T>::to_string)
4109 (host_float_ops<T>::from_string): Use
4110 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4111 * configure: Rebuild.
4112
4113 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
4114
4115 * printcmd.c (printf_c_string): Use
4116 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4117 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4118
4119 2018-09-05 Tom Tromey <tom@tromey.com>
4120
4121 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4122
4123 2018-09-05 Tom de Vries <tdevries@suse.de>
4124
4125 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4126 with resolve_abstract_p == true.
4127 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4128 defaulting to false. Propagate resolve_abstract_p to
4129 dwarf2_fetch_die_loc_sect_off.
4130 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4131 parameter, defaulting to false.
4132 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4133 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4134 parameter.
4135 * dwarf2read.h (struct die_info): Forward-declare.
4136 (die_info_ptr): New typedef.
4137 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4138
4139 2018-09-05 Joel Brobecker <brobecker@adacore.com>
4140
4141 GDB 8.2 released.
4142
4143 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
4144 Pedro Alves <palves@redhat.com>
4145
4146 * gnulib/Makefile.in (aclocal_m4_deps): Move to
4147 "aclocal-m4-deps.mk". Include file here.
4148 $(srcdir)/aclocal.m4: Add "configure.ac".
4149 * gnulib/aclocal-m4-deps.mk: New file.
4150 * gnulib/update-gnulib.sh: Automatically update
4151 "aclocal-m4-deps.mk".
4152
4153 2018-09-04 Tom Tromey <tom@tromey.com>
4154
4155 * configure: Rebuild.
4156 * configure.ac: Remove multi-ice code.
4157
4158 2018-09-04 Tom Tromey <tom@tromey.com>
4159
4160 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4161 (ada-exp.o): Update.
4162
4163 2018-09-04 Tom Tromey <tom@tromey.com>
4164
4165 * Makefile.in (printcmd.o, target-float.o): Remove.
4166 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4167
4168 2018-09-04 Tom Tromey <tom@tromey.com>
4169
4170 * gnulib/Makefile.in: Remove obsolete comment.
4171 * Makefile.in: Remove obsolete comment.
4172
4173 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
4174
4175 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4176 line with '+'.
4177
4178 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
4179
4180 * riscv-tdep.c: Add 'prologue-value.h' include.
4181 (struct riscv_unwind_cache): New struct.
4182 (riscv_debug_unwinder): New global.
4183 (riscv_scan_prologue): Update arguments, capture register details
4184 from prologue scan.
4185 (riscv_skip_prologue): Reformat arguments line, move end of
4186 prologue calculation into riscv_scan_prologue.
4187 (riscv_frame_cache): Update return type, create
4188 riscv_unwind_cache, scan the prologue, and fill in remaining cache
4189 details.
4190 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4191 (riscv_frame_prev_register): Use the trad_frame within the
4192 riscv_unwind_cache.
4193 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4194 flag.
4195
4196 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
4197
4198 * trad-frame.h (trad_frame_set_realreg): Declare.
4199 (trad_frame_set_addr): Declare.
4200 * trad-frame.c (trad_frame_set_realreg): Define new function.
4201 (trad_frame_set_addr): Define new function.
4202 (trad_frame_set_reg_realreg): Use new function.
4203 (trad_frame_set_reg_addr): Use new function.
4204
4205 2018-09-01 Keith Seitz <keiths@redhat.com>
4206
4207 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4208 pulongest instead of "%lld".
4209 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4210 ATTRIBUTE_UNUSED.
4211
4212 2018-08-31 Tom Tromey <tom@tromey.com>
4213
4214 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4215 variant part type.
4216
4217 2018-08-31 Pedro Alves <palves@redhat.com>
4218
4219 * gdbarch.h: Regenerate.
4220
4221 2018-08-31 Pedro Alves <palves@redhat.com>
4222
4223 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4224 * target.h (Hardware watchpoint interfaces): Describe
4225 continuable/steppable/non-steppable watchpoints.
4226 * gdbarch.h, gdbarch.c: Regenerate.
4227
4228 2018-08-31 Pedro Alves <palves@redhat.com>
4229
4230 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4231 Delete.
4232 * s390-linux-nat.c
4233 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4234 * target.h (target_ops::have_continuable_watchpoint): Delete.
4235 (target_have_continuable_watchpoint): Delete.
4236 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4237 * target-delegates.c: Regenerate.
4238
4239 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4240
4241 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4242 the files present in "gnulib/import/m4/".
4243
4244 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
4245
4246 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4247 c.sw, c.swsp, and c.sdsp.
4248
4249 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
4250
4251 * riscv-tdep.c (struct riscv_inferior_data): Delete.
4252 (riscv_read_misa_reg): Don't cache value read into inferior data.
4253 (riscv_new_inferior_data): Delete.
4254 (riscv_inferior_data_cleanup): Delete.
4255 (riscv_inferior_data): Delete.
4256 (riscv_invalidate_inferior_data): Delete.
4257 (_initialize_riscv_tdep): Remove initialisation of inferior data.
4258
4259 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
4260
4261 * compile/compile-cplus-types.c
4262 (compile_cplus_instance::leave_scope): Take the address of scope
4263 object.
4264 (compile_cplus_instance::convert_qualified_base): Compare quals
4265 to 0.
4266
4267 2018-08-30 Keith Seitz <keiths@redhat.com>
4268
4269 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4270 Use "%s" and host_address_to_string instead of "%p" in printf.
4271
4272 2018-08-29 Keith Seitz <keiths@redhat.com>
4273
4274 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4275 and compile-cplus-types.c.
4276 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4277 * c-lang.c (cplus_language_defn): Set C++ compile functions.
4278 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4279 Declare.
4280 * compile/compile-c-support.c: Include compile-cplus.h.
4281 (load_libcompile): Templatize.
4282 (get_compile_context): "New" function.
4283 (c_get_compile_context): Use get_compile_context.
4284 (cplus_get_compile_context): New function.
4285 (cplus_push_user_expression, cplus_pop_user_expression)
4286 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4287 (cplus_compute_program): Define new structs/functions.
4288 * compile/compile-cplus-symmbols.c: New file.
4289 * compile/compile-cplus-types.c: New file.
4290 * compile/compile-cplus.h: New file.
4291 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4292 Declare.
4293 * compile/compile-object-load.c (get_out_value_type): Use
4294 strncmp_iw when comparing symbol names.
4295 (compile_object_load): Add mst_bss and mst_data.
4296 * compile/compile.c (_initialize_compile): Remove
4297 -Wno-implicit-function-declaration from `compile_args'.
4298 * compile/gcc-cp-plugin.h: New file.
4299 * NEWS: Mention C++ compile support and new debug options.
4300
4301 2018-08-29 Keith Seitz <keiths@redhat.com>
4302
4303 * linespec.c (collect_info::add_symbol): Make virtual.
4304 (struct symbol_searcher_collect_info): New struct.
4305 (symbol_searcher::find_all_symbols): New method.
4306 * symtab.h (class symbol_searcher): New class.
4307
4308 2018-08-29 Keith Seitz <keiths@redhat.com>
4309
4310 * linespec.c (struct linespec) <function_symbols, label_symbols>:
4311 Change to vector of block_symbol. Update all users.
4312 (struct collect_info) <symbols>: Likewise.
4313 (collect_info::add_symbol): Take block_symbol as argument.
4314 Update all callers.
4315 (decode_compound_collector) <m_symbols>: Change type to vector
4316 of block_symbol. Update all users.
4317 (decode_compound_collector::operator ()): Change parameter type
4318 to block_symbol.
4319 (find_method, find_function_symbols, find_linespec_symbols)
4320 (find_label_symbols_in_block, find_label_symbols): Change symbol
4321 vectors to block_symbol vectors.
4322 * symtab.h (symbol_found_callback_ftype): Change parameter type to
4323 block_symbol.
4324
4325 2018-08-29 Keith Seitz <keiths@redhat.com>
4326
4327 * linespec.c (symbolp): Remove typedef and VEC definitions.
4328 (bound_minimal_symbol_d): Likewise.
4329
4330 2018-08-29 Keith Seitz <keiths@redhat.com>
4331
4332 * linespec.c (decode_compound_collector::decode_compound_collector):
4333 Remove initialization for `m_symtabs'.
4334 (decode_compound_collector::release_symbols): Change return type
4335 to std::vector. Update all callers.
4336 (class decode_compound_collector) <m_symbols>: Change type to
4337 std::vector.
4338 (lookup_prefix_sym): Change return type to std::vector. Update all
4339 callers.
4340 (compare_symbols): Remove.
4341 (std_compare_symbols): Rename to `compare_symbols'.
4342 (find_method): Change `sym_classes' parameter to std::vector.
4343 Update all callers. Use std::sort to sort sym_classes.
4344 (find_linespec_symbols): Remove cleanup.
4345
4346 2018-08-29 Keith Seitz <keiths@redhat.com>
4347
4348 * linespec.c (struct linespec) <minimal_symbols>: Change type to
4349 std::vector. Update all users.
4350 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4351 (struct collect_info) <minimal_symbols>: Likewise.
4352 (compare_msymbols): Return bool. Change parameters to const
4353 bound_minimal_symbol references.
4354 (find_method, find_function_symbols, find_linespec_symbols): Change
4355 `minsyms' parameter to std::vector. Update all callers.
4356
4357 2018-08-29 Keith Seitz <keiths@redhat.com>
4358
4359 * linespec.c (struct linespec) <label_symbols>: Change type to
4360 std::vector. Update all users.
4361 (find_label_symbols_in_block): Change `result' parameter to
4362 std::vector. Update all callers.
4363 (find_label_symbols): Return std::vector. Update all callers.
4364
4365 2018-08-29 Keith Seitz <keiths@redhat.com>
4366
4367 * linespec.c (struct linespec) <function_symbols>: Change type to
4368 std::vector. Update all users.
4369 (struct collect_info) <function_symbols>: Likewise.
4370 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4371 (std_compare_symbols): New function.
4372 (find_method, find_function_symbols, find_linespec_symbols)
4373 (find_label_symbols_in_block): Change `symbols' parameter to
4374 std::vector. Update all callers.
4375 (find_label_symbols): Likewise for `function_symbols' and
4376 `label_funcs_ret'.
4377
4378 2018-08-29 Keith Seitz <keiths@redhat.com>
4379
4380 * linespec.c (symtab_vector_up): Define.
4381 (struct linespec) <file_symtabs>: Change type to std::vector *.
4382 Update all uses.
4383 (struct collect_info) <file_symtabs>: Likewise.
4384 (collect_symtabs_from_filename): Return symtab_vector_up.
4385 Update all callers.
4386 (decode_objc): Remove cleanup.
4387 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4388 (symtab_collector::release_symtabs): Return symtab_vector_up.
4389 Update all callers.
4390 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4391 Update all users.
4392 (collect_symtabs_from_filename, symtabs_from_filename): Return
4393 symtab_vector_up. Update all callers.
4394
4395 2018-08-29 Tom Tromey <tom@tromey.com>
4396
4397 * csky-tdep.c (csky_analyze_prologue): Use
4398 core_addr_to_string_nz.
4399
4400 2018-08-29 Tom Tromey <tom@tromey.com>
4401
4402 * windows-nat.c (struct xlate_exception) <them>: Change type to
4403 DWORD.
4404 (xlate): Fix formatting. Remove last entry.
4405 (struct xlate_exception, xlate): Comment out.
4406 (windows_nat_target::resume): Use ranged for.
4407
4408 2018-08-29 Jim Wilson <jimw@sifive.com>
4409
4410 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4411 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4412 of NT_PRFPREG.
4413 (riscv_linux_nat_target::store_registers): Likewise.
4414
4415 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
4416
4417 PR gdb/23555
4418 PR gdb/23558
4419 * gnulib/aclocal.m4: Regenerate.
4420 * gnulib/config.in: Regenerate.
4421 * gnulib/configure: Regenerate.
4422 * gnulib/import/Makefile.am: Update.
4423 * gnulib/import/Makefile.in: Update.
4424 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4425 * gnulib/import/_Noreturn.h: ... this.
4426 * gnulib/import/alloca.in.h: Update.
4427 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4428 * gnulib/import/arg-nonnull.h: ... this.
4429 * gnulib/import/assure.h: Update.
4430 * gnulib/import/at-func.c: Update.
4431 * gnulib/import/basename-lgpl.c: Update.
4432 * gnulib/import/extra/snippet/c++defs.h: Rename to...
4433 * gnulib/import/c++defs.h: ... this.
4434 * gnulib/import/canonicalize-lgpl.c: Update.
4435 * gnulib/import/cdefs.h: Update.
4436 * gnulib/import/chdir-long.c: Update.
4437 * gnulib/import/chdir-long.h: Update.
4438 * gnulib/import/cloexec.c: Update.
4439 * gnulib/import/cloexec.h: Update.
4440 * gnulib/import/close.c: Update.
4441 * gnulib/import/closedir.c: Update.
4442 * gnulib/import/config.charset: Update.
4443 * gnulib/import/dirent-private.h: Update.
4444 * gnulib/import/dirent.in.h: Update.
4445 * gnulib/import/dirfd.c: Update.
4446 * gnulib/import/dirname-lgpl.c: Update.
4447 * gnulib/import/dirname.h: Update.
4448 * gnulib/import/dosname.h: Update.
4449 * gnulib/import/dup-safer-flag.c: Update.
4450 * gnulib/import/dup-safer.c: Update.
4451 * gnulib/import/dup.c: Update.
4452 * gnulib/import/dup2.c: Update.
4453 * gnulib/import/errno.in.h: Update.
4454 * gnulib/import/error.c: Update.
4455 * gnulib/import/error.h: Update.
4456 * gnulib/import/exitfail.c: Update.
4457 * gnulib/import/exitfail.h: Update.
4458 * gnulib/import/extra/update-copyright: Update.
4459 * gnulib/import/fchdir.c: Update.
4460 * gnulib/import/fcntl.c: Update.
4461 * gnulib/import/fcntl.in.h: Update.
4462 * gnulib/import/fd-hook.c: Update.
4463 * gnulib/import/fd-hook.h: Update.
4464 * gnulib/import/fd-safer-flag.c: Update.
4465 * gnulib/import/fd-safer.c: Update.
4466 * gnulib/import/fdopendir.c: Update.
4467 * gnulib/import/filename.h: Update.
4468 * gnulib/import/filenamecat-lgpl.c: Update.
4469 * gnulib/import/filenamecat.h: Update.
4470 * gnulib/import/flexmember.h: Update.
4471 * gnulib/import/float+.h: Update.
4472 * gnulib/import/float.c: Update.
4473 * gnulib/import/float.in.h: Update.
4474 * gnulib/import/fnmatch.c: Update.
4475 * gnulib/import/fnmatch.in.h: Update.
4476 * gnulib/import/fnmatch_loop.c: Update.
4477 * gnulib/import/fpucw.h: Update.
4478 * gnulib/import/frexp.c: Update.
4479 * gnulib/import/frexpl.c: Update.
4480 * gnulib/import/fstat.c: Update.
4481 * gnulib/import/fstatat.c: Update.
4482 * gnulib/import/getcwd-lgpl.c: Update.
4483 * gnulib/import/getcwd.c: Update.
4484 * gnulib/import/getdtablesize.c: Update.
4485 * gnulib/import/getlogin_r.c: Update.
4486 * gnulib/import/getprogname.c: Update.
4487 * gnulib/import/getprogname.h: Update.
4488 * gnulib/import/gettext.h: Update.
4489 * gnulib/import/gettimeofday.c: Update.
4490 * gnulib/import/glob-libc.h: Update.
4491 * gnulib/import/glob.c: Update.
4492 * gnulib/import/glob.in.h: Update.
4493 * gnulib/import/glob_internal.h: Update.
4494 * gnulib/import/glob_pattern_p.c: Update.
4495 * gnulib/import/globfree.c: Update.
4496 * gnulib/import/hard-locale.c: Update.
4497 * gnulib/import/hard-locale.h: Update.
4498 * gnulib/import/intprops.h: Update.
4499 * gnulib/import/inttypes.in.h: Update.
4500 * gnulib/import/isnan.c: Update.
4501 * gnulib/import/isnand-nolibm.h: Update.
4502 * gnulib/import/isnand.c: Update.
4503 * gnulib/import/isnanl-nolibm.h: Update.
4504 * gnulib/import/isnanl.c: Update.
4505 * gnulib/import/itold.c: Update.
4506 * gnulib/import/libc-config.h: Update.
4507 * gnulib/import/limits.in.h: Update.
4508 * gnulib/import/localcharset.c: Update.
4509 * gnulib/import/localcharset.h: Update.
4510 * gnulib/import/localtime-buffer.c: Update.
4511 * gnulib/import/localtime-buffer.h: Update.
4512 * gnulib/import/lstat.c: Update.
4513 * gnulib/import/m4/00gnulib.m4: Update.
4514 * gnulib/import/m4/__inline.m4: Update.
4515 * gnulib/import/m4/absolute-header.m4: Update.
4516 * gnulib/import/m4/alloca.m4: Update.
4517 * gnulib/import/m4/builtin-expect.m4: Update.
4518 * gnulib/import/m4/canonicalize.m4: Update.
4519 * gnulib/import/m4/chdir-long.m4: Update.
4520 * gnulib/import/m4/close.m4: Update.
4521 * gnulib/import/m4/closedir.m4: Update.
4522 * gnulib/import/m4/configmake.m4: Update.
4523 * gnulib/import/m4/d-ino.m4: Update.
4524 * gnulib/import/m4/d-type.m4: Update.
4525 * gnulib/import/m4/dirent_h.m4: Update.
4526 * gnulib/import/m4/dirfd.m4: Update.
4527 * gnulib/import/m4/dirname.m4: Update.
4528 * gnulib/import/m4/double-slash-root.m4: Update.
4529 * gnulib/import/m4/dup.m4: Update.
4530 * gnulib/import/m4/dup2.m4: Update.
4531 * gnulib/import/m4/eealloc.m4: Update.
4532 * gnulib/import/m4/environ.m4: Update.
4533 * gnulib/import/m4/errno_h.m4: Update.
4534 * gnulib/import/m4/error.m4: Update.
4535 * gnulib/import/m4/exponentd.m4: Update.
4536 * gnulib/import/m4/exponentl.m4: Update.
4537 * gnulib/import/m4/extensions.m4: Update.
4538 * gnulib/import/m4/extern-inline.m4: Update.
4539 * gnulib/import/m4/fchdir.m4: Update.
4540 * gnulib/import/m4/fcntl-o.m4: Update.
4541 * gnulib/import/m4/fcntl.m4: Update.
4542 * gnulib/import/m4/fcntl_h.m4: Update.
4543 * gnulib/import/m4/fdopendir.m4: Update.
4544 * gnulib/import/m4/filenamecat.m4: Update.
4545 * gnulib/import/m4/flexmember.m4: Update.
4546 * gnulib/import/m4/float_h.m4: Update.
4547 * gnulib/import/m4/fnmatch.m4: Update.
4548 * gnulib/import/m4/fnmatch_h.m4: Update.
4549 * gnulib/import/m4/fpieee.m4: Update.
4550 * gnulib/import/m4/frexp.m4: Update.
4551 * gnulib/import/m4/frexpl.m4: Update.
4552 * gnulib/import/m4/fstat.m4: Update.
4553 * gnulib/import/m4/fstatat.m4: Update.
4554 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4555 * gnulib/import/m4/getcwd-path-max.m4: Update.
4556 * gnulib/import/m4/getcwd.m4: Update.
4557 * gnulib/import/m4/getdtablesize.m4: Update.
4558 * gnulib/import/m4/getlogin.m4: Update.
4559 * gnulib/import/m4/getlogin_r.m4: Update.
4560 * gnulib/import/m4/getpagesize.m4: Update.
4561 * gnulib/import/m4/getprogname.m4: Update.
4562 * gnulib/import/m4/gettimeofday.m4: Update.
4563 * gnulib/import/m4/glibc21.m4: Update.
4564 * gnulib/import/m4/glob.m4: Update.
4565 * gnulib/import/m4/glob_h.m4: Update.
4566 * gnulib/import/m4/gnulib-cache.m4: Update.
4567 * gnulib/import/m4/gnulib-common.m4: Update.
4568 * gnulib/import/m4/gnulib-comp.m4: Update.
4569 * gnulib/import/m4/gnulib-tool.m4: Update.
4570 * gnulib/import/m4/hard-locale.m4: Update.
4571 * gnulib/import/m4/include_next.m4: Update.
4572 * gnulib/import/m4/inttypes-pri.m4: Update.
4573 * gnulib/import/m4/inttypes.m4: Update.
4574 * gnulib/import/m4/isnand.m4: Update.
4575 * gnulib/import/m4/isnanl.m4: Update.
4576 * gnulib/import/m4/largefile.m4: Update.
4577 * gnulib/import/m4/limits-h.m4: Update.
4578 * gnulib/import/m4/localcharset.m4: Update.
4579 * gnulib/import/m4/locale-fr.m4: Update.
4580 * gnulib/import/m4/locale-ja.m4: Update.
4581 * gnulib/import/m4/locale-zh.m4: Update.
4582 * gnulib/import/m4/localtime-buffer.m4: Update.
4583 * gnulib/import/m4/longlong.m4: Update.
4584 * gnulib/import/m4/lstat.m4: Update.
4585 * gnulib/import/m4/malloc.m4: Update.
4586 * gnulib/import/m4/malloca.m4: Update.
4587 * gnulib/import/m4/math_h.m4: Update.
4588 * gnulib/import/m4/mbrtowc.m4: Update.
4589 * gnulib/import/m4/mbsinit.m4: Update.
4590 * gnulib/import/m4/mbsrtowcs.m4: Update.
4591 * gnulib/import/m4/mbstate_t.m4: Update.
4592 * gnulib/import/m4/memchr.m4: Update.
4593 * gnulib/import/m4/memmem.m4: Update.
4594 * gnulib/import/m4/mempcpy.m4: Update.
4595 * gnulib/import/m4/memrchr.m4: Update.
4596 * gnulib/import/m4/mkdir.m4: Update.
4597 * gnulib/import/m4/mkstemp.m4: Update.
4598 * gnulib/import/m4/mmap-anon.m4: Update.
4599 * gnulib/import/m4/mode_t.m4: Update.
4600 * gnulib/import/m4/msvc-inval.m4: Update.
4601 * gnulib/import/m4/msvc-nothrow.m4: Update.
4602 * gnulib/import/m4/multiarch.m4: Update.
4603 * gnulib/import/m4/nocrash.m4: Update.
4604 * gnulib/import/m4/off_t.m4: Update.
4605 * gnulib/import/m4/onceonly.m4: Update.
4606 * gnulib/import/m4/open-cloexec.m4: Update.
4607 * gnulib/import/m4/open.m4: Update.
4608 * gnulib/import/m4/openat.m4: Update.
4609 * gnulib/import/m4/opendir.m4: Update.
4610 * gnulib/import/m4/pathmax.m4: Update.
4611 * gnulib/import/m4/rawmemchr.m4: Update.
4612 * gnulib/import/m4/readdir.m4: Update.
4613 * gnulib/import/m4/readlink.m4: Update.
4614 * gnulib/import/m4/realloc.m4: Update.
4615 * gnulib/import/m4/rename.m4: Update.
4616 * gnulib/import/m4/rewinddir.m4: Update.
4617 * gnulib/import/m4/rmdir.m4: Update.
4618 * gnulib/import/m4/save-cwd.m4: Update.
4619 * gnulib/import/m4/secure_getenv.m4: Update.
4620 * gnulib/import/m4/setenv.m4: Update.
4621 * gnulib/import/m4/signal_h.m4: Update.
4622 * gnulib/import/m4/ssize_t.m4: Update.
4623 * gnulib/import/m4/stat-time.m4: Update.
4624 * gnulib/import/m4/stat.m4: Update.
4625 * gnulib/import/m4/std-gnu11.m4: Update.
4626 * gnulib/import/m4/stdbool.m4: Update.
4627 * gnulib/import/m4/stddef_h.m4: Update.
4628 * gnulib/import/m4/stdint.m4: Update.
4629 * gnulib/import/m4/stdio_h.m4: Update.
4630 * gnulib/import/m4/stdlib_h.m4: Update.
4631 * gnulib/import/m4/strchrnul.m4: Update.
4632 * gnulib/import/m4/strdup.m4: Update.
4633 * gnulib/import/m4/strerror.m4: Update.
4634 * gnulib/import/m4/string_h.m4: Update.
4635 * gnulib/import/m4/strstr.m4: Update.
4636 * gnulib/import/m4/strtok_r.m4: Update.
4637 * gnulib/import/m4/sys_socket_h.m4: Update.
4638 * gnulib/import/m4/sys_stat_h.m4: Update.
4639 * gnulib/import/m4/sys_time_h.m4: Update.
4640 * gnulib/import/m4/sys_types_h.m4: Update.
4641 * gnulib/import/m4/tempname.m4: Update.
4642 * gnulib/import/m4/time_h.m4: Update.
4643 * gnulib/import/m4/unistd-safer.m4: Update.
4644 * gnulib/import/m4/unistd_h.m4: Update.
4645 * gnulib/import/m4/warn-on-use.m4: Update.
4646 * gnulib/import/m4/wchar_h.m4: Update.
4647 * gnulib/import/m4/wchar_t.m4: Update.
4648 * gnulib/import/m4/wctype_h.m4: Update.
4649 * gnulib/import/m4/wint_t.m4: Update.
4650 * gnulib/import/malloc.c: Update.
4651 * gnulib/import/malloc/scratch_buffer.h: Update.
4652 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4653 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4654 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4655 * gnulib/import/malloca.c: Update.
4656 * gnulib/import/malloca.h: Update.
4657 * gnulib/import/malloca.valgrind: Update.
4658 * gnulib/import/math.in.h: Update.
4659 * gnulib/import/mbrtowc.c: Update.
4660 * gnulib/import/mbsinit.c: Update.
4661 * gnulib/import/mbsrtowcs-impl.h: Update.
4662 * gnulib/import/mbsrtowcs-state.c: Update.
4663 * gnulib/import/mbsrtowcs.c: Update.
4664 * gnulib/import/memchr.c: Update.
4665 * gnulib/import/memmem.c: Update.
4666 * gnulib/import/mempcpy.c: Update.
4667 * gnulib/import/memrchr.c: Update.
4668 * gnulib/import/mkdir.c: Update.
4669 * gnulib/import/mkstemp.c: Update.
4670 * gnulib/import/msvc-inval.c: Update.
4671 * gnulib/import/msvc-inval.h: Update.
4672 * gnulib/import/msvc-nothrow.c: Update.
4673 * gnulib/import/msvc-nothrow.h: Update.
4674 * gnulib/import/open.c: Update.
4675 * gnulib/import/openat-die.c: Update.
4676 * gnulib/import/openat-priv.h: Update.
4677 * gnulib/import/openat-proc.c: Update.
4678 * gnulib/import/openat.c: Update.
4679 * gnulib/import/openat.h: Update.
4680 * gnulib/import/opendir.c: Update.
4681 * gnulib/import/pathmax.h: Update.
4682 * gnulib/import/pipe-safer.c: Update.
4683 * gnulib/import/rawmemchr.c: Update.
4684 * gnulib/import/readdir.c: Update.
4685 * gnulib/import/readlink.c: Update.
4686 * gnulib/import/realloc.c: Update.
4687 * gnulib/import/ref-add.sin: Update.
4688 * gnulib/import/ref-del.sin: Update.
4689 * gnulib/import/rename.c: Update.
4690 * gnulib/import/rewinddir.c: Update.
4691 * gnulib/import/rmdir.c: Update.
4692 * gnulib/import/same-inode.h: Update.
4693 * gnulib/import/save-cwd.c: Update.
4694 * gnulib/import/save-cwd.h: Update.
4695 * gnulib/import/scratch_buffer.h: Update.
4696 * gnulib/import/secure_getenv.c: Update.
4697 * gnulib/import/setenv.c: Update.
4698 * gnulib/import/signal.in.h: Update.
4699 * gnulib/import/stat-time.c: Update.
4700 * gnulib/import/stat-time.h: Update.
4701 * gnulib/import/stat-w32.c: Update.
4702 * gnulib/import/stat-w32.h: Update.
4703 * gnulib/import/stat.c: Update.
4704 * gnulib/import/stdbool.in.h: Update.
4705 * gnulib/import/stddef.in.h: Update.
4706 * gnulib/import/stdint.in.h: Update.
4707 * gnulib/import/stdio.in.h: Update.
4708 * gnulib/import/stdlib.in.h: Update.
4709 * gnulib/import/str-two-way.h: Update.
4710 * gnulib/import/strchrnul.c: Update.
4711 * gnulib/import/strdup.c: Update.
4712 * gnulib/import/streq.h: Update.
4713 * gnulib/import/strerror-override.c: Update.
4714 * gnulib/import/strerror-override.h: Update.
4715 * gnulib/import/strerror.c: Update.
4716 * gnulib/import/string.in.h: Update.
4717 * gnulib/import/stripslash.c: Update.
4718 * gnulib/import/strnlen1.c: Update.
4719 * gnulib/import/strnlen1.h: Update.
4720 * gnulib/import/strstr.c: Update.
4721 * gnulib/import/strtok_r.c: Update.
4722 * gnulib/import/sys_stat.in.h: Update.
4723 * gnulib/import/sys_time.in.h: Update.
4724 * gnulib/import/sys_types.in.h: Update.
4725 * gnulib/import/tempname.c: Update.
4726 * gnulib/import/tempname.h: Update.
4727 * gnulib/import/time.in.h: Update.
4728 * gnulib/import/unistd--.h: Update.
4729 * gnulib/import/unistd-safer.h: Update.
4730 * gnulib/import/unistd.in.h: Update.
4731 * gnulib/import/unsetenv.c: Update.
4732 * gnulib/import/verify.h: Update.
4733 * gnulib/import/extra/snippet/warn-on-use.h: Update.
4734 * gnulib/import/wchar.in.h: Update.
4735 * gnulib/import/wctype.in.h: Update.
4736 * gnulib/import/xalloc-oversized.h: Update.
4737 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4738 "53e2c179f26a890fa6685af4b6c1397ee370433b".
4739
4740 2018-08-16 Gary Benson <gbenson@redhat.com>
4741
4742 PR gdb/13000:
4743 * gdb/main.c (captured_main_1): Exit with nonzero status
4744 in batch mode if the last command to be executed failed.
4745 * NEWS: Mention the above.
4746
4747 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
4748
4749 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4750 end of warning message.
4751
4752 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4753
4754 PR gdb/22943:
4755 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4756 (aarch64_extract_return_value): Use
4757 aapcs_is_vfp_call_or_return_candidate.
4758 (aarch64_return_in_memory): Likewise.
4759 (aarch64_store_return_value): Likewise.
4760
4761 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4762
4763 * aarch64-tdep.c
4764 (aapcs_is_vfp_call_or_return_candidate): Make static
4765 (pass_in_v_or_stack): Remove function.
4766 (pass_in_v_vfp_candidate): New function.
4767 (aarch64_push_dummy_call): Check for float register candidates.
4768
4769 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4770
4771 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4772 (aapcs_is_vfp_call_or_return_candidate_1): New function.
4773 (aapcs_is_vfp_call_or_return_candidate): Likewise.
4774
4775 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4776
4777 PR build/23399
4778 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4779 (struct ipa_sym_addresses): Rename to...
4780 (struct ipa_sym_addresses_common): ... this.
4781 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4782
4783 2018-08-28 Tom Tromey <tom@tromey.com>
4784
4785 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4786 (token_fifo): Now a std::vector.
4787 (yylex, c_parse): Update.
4788 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4789 (token_fifo): Now a std::vector.
4790 (yylex, d_parse): Update.
4791 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4792 (token_fifo): Now a std::vector.
4793 (yylex, go_parse): Update.
4794
4795 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
4796
4797 * parser-defs.h (struct type_stack) <elements>: Change type to
4798 std::vector<union type_stack_elt>.
4799 <depth, size>: Remove.
4800 * parse.c (parse_exp_in_context_1): Adjust.
4801 (type_stack_reserve): Remove.
4802 (check_type_stack_depth): Remove.
4803 (insert_into_type_stack): Adjust to std::vector.
4804 (insert_type): Likewise.
4805 (push_type): Likewise.
4806 (push_type_int): Likewise.
4807 (insert_type_address_space): Likewise.
4808 (pop_type): Likewise.
4809 (pop_type_int): Likewise.
4810 (pop_typelist): Likewise.
4811 (pop_type_stack): Likewise.
4812 (append_type_stack): Likewise.
4813 (push_type_stack): Likewise.
4814 (get_type_stack): Likewise.
4815 (type_stack_cleanup): Likewise.
4816 (push_typelist): Likewise.
4817 (follow_types): Likewise.
4818 (_initialize_parse): Likewise.
4819
4820 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
4821
4822 * NEWS: Mention csky target.
4823
4824 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
4825 Hafiz Abid Qadeer <abidh@codesourcery.com>
4826 Don Breazeal <donb@codesourcery.com>
4827
4828 * csky-linux-tdep.c: New file.
4829 * csky-tdep.c: Likewise.
4830 * csky-tdep.h: Likewise.
4831 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4832 csky-tdep.o.
4833 (HFILES_NO_SRCDIR): Add csky-tdep.h.
4834 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4835 * configure.tgt: Add csky support.
4836
4837 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
4838
4839 * python/py-framefilter.c (py_print_frame): Print frame architecture
4840 when printing on an MI output.
4841
4842 2018-08-27 Tom Tromey <tom@tromey.com>
4843
4844 PR build/23087:
4845 * configure: Rebuild.
4846 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4847
4848 2018-08-27 Tom Tromey <tom@tromey.com>
4849
4850 * aarch64-linux-tdep.c
4851 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4852 casts to int.
4853
4854 2018-08-27 Tom Tromey <tom@tromey.com>
4855
4856 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4857 unsigned.
4858 (ppc64_standard_linkage1, ppc64_standard_linkage2)
4859 (ppc64_standard_linkage3, ppc64_standard_linkage4)
4860 (ppc64_standard_linkage5, ppc64_standard_linkage6)
4861 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4862 unsigned.
4863
4864 2018-08-27 Tom Tromey <tom@tromey.com>
4865
4866 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4867 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4868
4869 2018-08-27 Tom Tromey <tom@tromey.com>
4870
4871 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4872 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4873 ULONGEST_MAX.
4874 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4875 ULONGEST_MAX.
4876 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4877 ULONGEST_MAX.
4878 * sparc-linux-tdep.c (sparc32_linux_sigframe)
4879 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4880 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4881 ULONGEST_MAX.
4882 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4883 (ppc64_linux_sigaction_tramp_frame)
4884 (ppc32_linux_sighandler_tramp_frame)
4885 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4886 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4887 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4888 * mn10300-linux-tdep.c (am33_linux_sigframe)
4889 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4890 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4891 * mips-linux-tdep.c (mips_linux_o32_sigframe)
4892 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4893 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4894 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4895 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4896 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4897 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4898 * microblaze-linux-tdep.c
4899 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4900 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4901 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4902 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4903 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4904 * common/common-types.h (ULONGEST_MAX): New define.
4905 (CORE_ADDR_MAX): Fix formatting.
4906 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4907 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4908 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4909 (arm_linux_rt_sigreturn_tramp_frame)
4910 (arm_eabi_linux_sigreturn_tramp_frame)
4911 (arm_eabi_linux_rt_sigreturn_tramp_frame)
4912 (thumb2_eabi_linux_sigreturn_tramp_frame)
4913 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4914 (arm_linux_restart_syscall_tramp_frame)
4915 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4916 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4917 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4918 ULONGEST_MAX.
4919 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4920
4921 2018-08-27 Tom Tromey <tom@tromey.com>
4922
4923 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4924 CORE_ADDR_MAX.
4925 * mips-tdep.c (mips_deal_with_atomic_sequence)
4926 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4927 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4928 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4929 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4930 CORE_ADDR_MAX.
4931 * aarch64-tdep.c (aarch64_software_single_step): Use
4932 CORE_ADDR_MAX.
4933
4934 2018-08-27 Tom Tromey <tom@tromey.com>
4935
4936 * linespec.c (complete_linespec_component): Add cast to "char".
4937 * completer.c (completion_tracker::build_completion_result): Add
4938 cast to "char".
4939
4940 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4941
4942 * solist.h (struct solist, struct target_so_ops): Fix
4943 indentation.
4944
4945 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4946
4947 * ada-tasks.c (ada_task_info_s): Remove typedef.
4948 (DEF_VEC_O(ada_task_info_s)): Remove.
4949 (struct ada_tasks_inferior_data): Initialize fields.
4950 <task_list>: Make an std::vector.
4951 (get_ada_tasks_inferior_data): Allocate with new.
4952 (ada_get_task_number): Adjust.
4953 (get_task_number_from_id): Likewise.
4954 (valid_task_id): Likewise.
4955 (ada_get_task_info_from_ptid): Likewise.
4956 (iterate_over_live_ada_tasks): Likewise.
4957 (add_ada_task): Likewise.
4958 (read_known_tasks): Likewise.
4959 (ada_build_task_list): Likewise.
4960 (print_ada_task_info): Likewise.
4961 (info_task): Likewise.
4962 (task_command_1): Likewise.
4963
4964 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4965
4966 * ada-lang.c (add_angle_brackets): Return std::string.
4967
4968 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
4969
4970 * python/py-threadevent.c (py_get_event_thread): Initialize
4971 pythread.
4972
4973 2018-08-24 Pedro Alves <palves@redhat.com>
4974
4975 * python/py-bpevent.c (create_breakpoint_event_object): Use
4976 copy-initialization.
4977 * python/py-continueevent.c (emit_continue_event): Use
4978 copy-initialization.
4979 * python/py-exitedevent.c (create_exited_event_object): Return a
4980 gdbpy_ref<>.
4981 (emit_exited_event): Use copy-initialization.
4982 * python/py-inferior.c (python_new_inferior)
4983 (python_inferior_deleted, add_thread_object): Use
4984 copy-initialization.
4985 * python/py-infevents.c (create_inferior_call_event_object)
4986 (create_register_changed_event_object)
4987 (create_memory_changed_event_object): Return a gdbpy_ref<>.
4988 (emit_inferior_call_event, emit_memory_changed_event)
4989 (emit_register_changed_event): Use copy-initialization.
4990 * python/py-newobjfileevent.c (create_new_objfile_event_object):
4991 Return a gdbpy_ref<>.
4992 (emit_new_objfile_event): Use copy-initialization.
4993 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4994 (emit_clear_objfiles_event): Use copy-initialization.
4995 * python/py-signalevent.c (create_signal_event_object): Use
4996 copy-initialization.
4997 * python/py-threadevent.c (create_thread_event_object): Use
4998 copy-initialization.
4999
5000 2018-08-24 Pedro Alves <palves@redhat.com>
5001 Simon Marchi <simon.marchi@ericsson.com>
5002
5003 PR gdb/23379
5004 * python/py-continueevent.c: Include "gdbthread.h".
5005 (create_continue_event_object): Add intro comment. Add 'ptid'
5006 parameter. Use it to find thread to pass to
5007 create_thread_event_object.
5008 (emit_continue_event): Pass PTID down to
5009 create_continue_event_object.
5010 * python/py-event.h (py_get_event_thread): Declare.
5011 (create_thread_event_object): Remove default from 'thread'
5012 parameter.
5013 * python/py-stopevent.c (create_stop_event_object): Use
5014 py_get_event_thread.
5015 * python/py-threadevent.c (get_event_thread): Rename to ...
5016 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
5017 and use it to find the thread.
5018 (create_thread_event_object): Assert that THREAD isn't null.
5019 Don't find the event thread here.
5020
5021 2018-08-23 Kevin Buettner <kevinb@redhat.com>
5022
5023 * block.h (blockrange, blockranges): New struct declarations.
5024 (struct block): Add new field named `ranges'.
5025 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
5026 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
5027 macros for accessing ranges in struct block.
5028 (make_blockranges): New declaration.
5029 block.c (make_blockranges): New function.
5030 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5031 for block.
5032 * symtab.h (find_pc_partial_function): Add new parameter `block'.
5033 * blockframe.c (cache_pc_function_block): New static global.
5034 (clear_pc_function_cache): Clear cache_pc_function_block.
5035 (find_pc_partial_function): Move comment to symtab.h. Add
5036 support for non-contiguous blocks.
5037 * cli/cli-cmds.c (block.h): Include.
5038 (print_disassembly): Handle printing of non-contiguous blocks.
5039 (disassemble_current_function): Likewise.
5040 (disassemble_command): Likewise.
5041
5042 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5043 BLOCK_START.
5044 * blockframe.c (get_pc_function_start): Likewise.
5045 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5046 (gcc_symbol_address): Likewise.
5047 * compile/compile-object-run.c (compile_object_run): Likewise.
5048 * compile/compile.c (get_expr_block_and_pc): Likewise.
5049 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5050 (func_addr_to_tail_call_list): Likewise.
5051 * findvar.c (default_read_var_value): Likewise.
5052 * inline-frame.c (inline_frame_this_id): Likewise.
5053 (skip-inline_frames): Likewise.
5054 * infcmd.c (until_next_command): Likewise.
5055 * linespec.c (convert_linespec_to_sals): Likewise.
5056 * parse.c (parse_exp_in_context_1): Likewise.
5057 * printcmd.c (build_address_symbolic): likewise.
5058 (info_address_command): Likewise.
5059 symtab.c (find_function_start_sal): Likewise.
5060 (skip_prologue_sal): Likewise.
5061 (find_function_alias_target): Likewise.
5062 (find_gnu_ifunc): Likewise.
5063 * stack.c (find_frame_funname): Likewise.
5064 * symtab.c (fixup_symbol_section): Likewise.
5065 (find_function_start_sal): Likewise.
5066 (skip_prologue_sal): Likewsie.
5067 (find_function_alias_target): Likewise.
5068 (find_gnu_ifunc): Likewise.
5069 * tracepoint.c (info_scope_command): Likewise.
5070 * value.c (value_fn_field): Likewise.
5071
5072 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5073 in place of find_pc_partial_function.
5074 * blockframe.c (find_function_entry_range_from_pc): New function.
5075 * symtab.h (find_function_entry_range_from_pc): Declare and document.
5076 * objfiles.c (objfile_relocate1): Relocate start and end addresses
5077 for each range in a block.
5078
5079
5080 2018-08-23 Xavier Roirand <roirand@adacore.com>
5081
5082 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5083 incrementation.
5084
5085 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5086
5087 * solib-svr4.c (read_program_headers_from_bfd): Return
5088 gdb::optional<gdb::byte_vector>.
5089 (svr4_exec_displacement): Adjust.
5090
5091 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5092
5093 * solib-svr4.c (read_program_header): Return
5094 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5095 (find_program_interpreter): Return
5096 gdb::optional<gdb::byte_vector>.
5097 (scan_dyntag_auxv): Adjust.
5098 (enable_break): Adjust.
5099 (svr4_exec_displacement): Adjust.
5100
5101 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5102
5103 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5104 * inf-child.c (inf_child_target::terminal_save_inferior): New.
5105
5106 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5107
5108 * guile/scm-string.c (gdbscm_scm_from_printf): Use
5109 string_vprintf.
5110 * guile/scm-utils.c (gdbscm_printf): Likewise.
5111 * serial.c (serial_printf): Likewise.
5112 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5113
5114 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
5115
5116 * stack.c (print_frame): Print frame architecture when printing on
5117 an MI output.
5118 * NEWS: Mention new "arch" attribute in frame output.
5119
5120 2018-08-21 Alan Hayward <alan.hayward@arm.com>
5121
5122 * arch/aarch64.h (aarch64_regnum): Update comment.
5123
5124 2018-08-21 Alan Hayward <alan.hayward@arm.com>
5125
5126 * NEWS: Add SVE to 8.2 section.
5127
5128 2018-08-21 Pedro Alves <palves@redhat.com>
5129
5130 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5131 out from gdbscm_parse_function_args.
5132 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5133 gdbscm_parse_function_args_1.
5134
5135 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
5136
5137 PR gdb/17816
5138 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5139 operator.
5140
5141 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
5142
5143 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5144
5145 2018-08-19 Michael Spang <spang@google.com>
5146
5147 PR gdb/11786
5148 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5149 for PT_TLS segments.
5150
5151 2018-08-18 Kevin Buettner <kevinb@redhat.com>
5152
5153 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5154 dwarf_variable_value.
5155 * dwarf2-frame.c (class dwarf_expr_executor):
5156 Add override for dwarf_variable_value.
5157 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5158 (class symbol_needs_eval_context): Likewise.
5159 (indirect_synthetic_pointer): Add forward declaration.
5160 (sect_variable_value): New function.
5161 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5162 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5163 for DW_OP_GNU_variable_value.
5164
5165 2018-08-16 Tom Tromey <tom@tromey.com>
5166
5167 * top.c (read_command_file): Update.
5168 (command_line_input): Remove "repeat" argument.
5169 * ada-lang.c (get_selections): Update.
5170 * linespec.c (decode_line_2): Update.
5171 * defs.h (command_line_input): Remove argument.
5172 * cli/cli-script.c (read_next_line): Update.
5173 * python/py-gdb-readline.c: Update.
5174
5175 2018-08-17 Tom Tromey <tom@tromey.com>
5176
5177 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5178 command_line_input.
5179
5180 2018-08-15 Tom Tromey <tom@tromey.com>
5181
5182 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5183
5184 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
5185
5186 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5187 If used, use find_pc_partial_function to find address range
5188 to disassemble.
5189 * mi/mi-main.c (mi_cmd_list_features): Report
5190 "data-disassemble-a-option" feature.
5191 * NEWS: Mention new -data-disassemble option -a.
5192
5193 2018-08-13 Tom Tromey <tom@tromey.com>
5194
5195 * common/common-defs.h (_FORTIFY_SOURCE): Define.
5196
5197 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5198
5199 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5200 (aarch64_linux_collect_sve_regset): Likewise.
5201 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5202 * regcache.h (regcache_map_entry_size): New function.
5203
5204 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5205
5206 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5207 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5208 (SVE_HEADER_VL_LENGTH): Likewise.
5209 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5210 (SVE_HEADER_FLAGS_LENGTH): Likewise.
5211 (SVE_HEADER_RESERVED_LENGTH): Likewise.
5212 (SVE_HEADER_SIZE_OFFSET): Likewise.
5213 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5214 (SVE_HEADER_VL_OFFSET): Likewise.
5215 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5216 (SVE_HEADER_FLAGS_OFFSET): Likewise.
5217 (SVE_HEADER_RESERVED_OFFSET): Likewise.
5218 (SVE_HEADER_SIZE): Likewise.
5219 (aarch64_linux_core_read_vq): Add function.
5220 (aarch64_linux_core_read_description): Check for SVE section.
5221
5222 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5223
5224 * aarch64-fbsd-tdep.c
5225 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5226 collect_size.
5227 * aarch64-linux-tdep.c
5228 (aarch64_linux_iterate_over_regset_sections): Likewise.
5229 * alpha-linux-tdep.c
5230 (alpha_linux_iterate_over_regset_sections):
5231 * alpha-nbsd-tdep.c
5232 (alphanbsd_iterate_over_regset_sections): Likewise.
5233 * amd64-fbsd-tdep.c
5234 (amd64fbsd_iterate_over_regset_sections): Likewise.
5235 * amd64-linux-tdep.c
5236 (amd64_linux_iterate_over_regset_sections): Likewise.
5237 * arm-bsd-tdep.c
5238 (armbsd_iterate_over_regset_sections): Likewise.
5239 * arm-fbsd-tdep.c
5240 (arm_fbsd_iterate_over_regset_sections): Likewise.
5241 * arm-linux-tdep.c
5242 (arm_linux_iterate_over_regset_sections): Likewise.
5243 * corelow.c (get_core_registers_cb): Likewise.
5244 (core_target::fetch_registers): Likewise.
5245 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5246 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5247 * gdbarch.h (void): Regenerate.
5248 * gdbarch.sh: Add supply_size and collect_size.
5249 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5250 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5251 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5252 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5253 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5254 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5255 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5256 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5257 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5258 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5259 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5260 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5261 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5262 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5263 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5264 Likewise.
5265 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5266 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5267 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5268 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5269 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5270 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5271 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5272 Likewise.
5273 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5274 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5275 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5276 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5277 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5278 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5279 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5280 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5281
5282 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
5283
5284 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5285 with string_printf.
5286
5287 2018-08-10 Keith Seitz <keiths@redhat.com>
5288
5289 * compile/compile-c-support.c (add_code_header, add_code_footer):
5290 Move into policy class.
5291 (c_push_user_expression, pop_user_expression_nop)
5292 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5293 (compile_program): New host class.
5294 (c_compile_program): New typedef.
5295 (c_compute_porgram): Use c_compile_program.
5296
5297 2018-08-10 Keith Seitz <keiths@redhat.com>
5298
5299 * compile/compile-internal.h (compile_instance::~compile_instance):
5300 Remove calls to htab_delete.
5301 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5302 * compile.c (compile_instance::compile_instance): Initialize
5303 htab unique pointers.
5304 (compile_instance::get_cached_type, compile_instance::insert_type)
5305 (compile_instance::error_symbol_once): Update for unique_ptr.
5306
5307 2018-08-10 Keith Seitz <keiths@redhat.com>
5308
5309 * compile/compile-c-symbols.c (struct symbol_error)
5310 (hash_symbol_error, eq_symbol_error, del_symbol_error)
5311 (compile_instance::insert_symbol_error)
5312 (compile_instance::error_symbol_once): Move to ...
5313 * compile/compile.c: ... here.
5314
5315 2018-08-10 Keith Seitz <keiths@redhat.com>
5316
5317 * compile/compile-c-support.c (c_get_compile_context): Use `new'
5318 instead of `new_compile_instance'.
5319 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5320 Update description.
5321 If the symbol error map is not initialized, create it.
5322 (generate_c_for_for_one_symbol): Do not check/initialize
5323 the symbol error map.
5324 * compile/compile-c-types.c (compile_c_instance): Make a class.
5325 Update all callers.
5326 (compile_instance::compile_instance): Initialize the type cache.
5327 (get_cached_type): New function.
5328 (insert_type): Update description.
5329 (compile_c_instance::m_default_cflags): Define.
5330 (convert_type): Update description. Use get_cached_type.
5331 (delete_instance): Moved to destructor.
5332 (new_compile_instance): Moved to constructor.
5333 * compile/compile-c.h (compile_c_instance): Make class inheriting
5334 from compile_instance.
5335 <base>: Remove field.
5336 <type_map, symbol_err_map>: Move to base class.
5337 <c_plugin>: Rename to `m_plugin' and remove pointer type.
5338 * compile/compile-internal.h (compile_instance): Make class.
5339 <type_map_t, symbol_err_map_t>: Define.
5340 <fe>: Rename to `m_gcc_fe'.
5341 <scope, block, gcc_target_options>: Add `m_' prefix.
5342 <m_type_map, m_symbol_err_map>: New fields, moved from
5343 compile_c_instance.
5344 <destroy>: Remove.
5345 (convert_type, new_compile_instance): Remove.
5346 * compile/compile.c (cleanup_compile_instance): Remove.
5347 (compile_to_object): Use unique_ptr to eliminate cleanups.
5348 (compile_instance::set_print_callback, compile_instance::version)
5349 (compile_instance::set_verbose)
5350 (compile_instance::set_driver_filename)
5351 (compile_instance::set_triplet_regexp)
5352 (compile_instance::set_arguments)
5353 (compile_instance::set_source_file)
5354 (compile_instance::compile): Define.
5355
5356 2018-08-10 Keith Seitz <keiths@redhat.com>
5357
5358 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5359 * compile/compile-c-types.c: Define GCC_METHODN macros and include
5360 gcc-c-fe.def to define C plugin.
5361 (delete_instance): Delete `c_plugin'.
5362 (new_compile_instance): Initialize `c_plugin'.
5363 * compile/compile-c.h: Include gcc_c_plugin.h.
5364 (struct compile_c_instance) <c_plugin>: New member.
5365 * gcc-c-plugin.h: New file.
5366 Update all callers with API change.
5367
5368 2018-08-10 Keith Seitz <keiths@redhat.com>
5369
5370 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5371 (HFILES_NO_SRCDIR): ... to here.
5372 Add compile-internal.h and compile-c.h.
5373 * compile/compile-c-support.c: Include compile-c.h.
5374 * compile/compile-c-symbols.c: Include compile-c.h.
5375 (generate_c_for_variable_locations): Update comment.
5376 * compile/compile-c-types.c: Include compile-c.h.
5377 * compile/compile-c.h: New file -- moved C language declarations
5378 from other files here.
5379 * compile/compile-internal.h: Do not include hashtab.h or
5380 common/enum-flags.h.
5381 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5382 (gcc_convert_symbol, gcc_symbol_address)
5383 (generate_c_for_variable_locations, c_get_mode_for_size)
5384 (c_get_range_decl_name): Definitions moved to compile-c.h.
5385 * compile/compile-loc2c.c: Include compile-c.h.
5386
5387 2018-08-10 Keith Seitz <keiths@redhat.com>
5388
5389 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5390 (c_symbol_substitution_name): ... this.
5391 Update all callers.
5392
5393 2018-08-10 Keith Seitz <keiths@redhat.com>
5394
5395 * compile/compile-c-support.c (c_compute_program): Use
5396 unique_xmalloc_ptr to eliminate cleanup.
5397 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5398 Return a unique_xmalloc_ptr and eliminate cleanup.
5399 * compile/compile-internal.h (generate_c_for_variable_locations):
5400 Return unique_xmalloc_ptr and update description.
5401
5402 2018-08-10 Alan Hayward <alan.hayward@arm.com>
5403
5404 * corelow.c (core_target::get_core_register_section): Rename
5405 min_size to section_min_size.
5406
5407 2018-08-09 Jim Wilson <jimw@sifive.com>
5408
5409 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5410 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5411 * NEWS: Mention new GNU/Linux RISC-V target.
5412 * configure.host: Add riscv*-*-linux*.
5413 * configure.nat: Add riscv*.
5414 * configure.tgt: Add riscv*-*-linux*.
5415 * riscv-linux-nat.c: New file.
5416 * riscv-linux-tdep.c: New file.
5417
5418 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5419
5420 * infrun.c (resume): Make static, add forward declaration.
5421 (proceed): Update header comment.
5422 * infrun.h (resume): Delete declaration.
5423
5424 2018-08-09 Tom Tromey <tom@tromey.com>
5425
5426 * riscv-tdep.h: Minor formatting fixes.
5427
5428 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
5429
5430 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5431 * dwarf-index-cache.c (create_dir_and_check): Likewise.
5432 (test_mkdir_recursive): Likewise.
5433 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5434
5435 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5436
5437 * valarith.c (value_subscripted_rvalue): If an array is not in
5438 memory, and we don't know the upper bound, then we can't know that
5439 the requested element exists or not.
5440
5441 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
5442
5443 * target.c (str_comma_list_concat_elem): Fix typo in comment.
5444 (target_options_to_string): Add comment.
5445
5446 2018-08-08 Tom Tromey <tom@tromey.com>
5447
5448 * unittests/scoped_mmap-selftests.c: Check result of "write".
5449
5450 2018-08-08 Jim Wilson <jimw@sifive.com>
5451
5452 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5453 (decode_register_index_short): New.
5454 (decode_j_type_insn, decode_cj_type_insn): New.
5455 (decode_b_type_insn, decode_cb_type_insn): New.
5456 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
5457 local xlen. Check xlen when decoding ambiguous compressed insns. In
5458 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5459 is_c_sw_insn instead of is_sw_insn.
5460 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5461 (riscv_software_single_step): New.
5462 * riscv-tdep.h (riscv_software_single_step): Declare.
5463
5464 * riscv-tdep.c (riscv_isa_xlen): Drop static.
5465 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5466
5467 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
5468
5469 PR gdb/18050:
5470 * target.c (dispose_inferior): Don't dispose of inferiors that are
5471 already killed.
5472
5473 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
5474
5475 * remote.c (remote_target::download_tracepoint): Change char* to
5476 const char*.
5477
5478 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
5479
5480 * target.h (target_options_to_string): Return an std::string.
5481 * target.c (str_comma_list_concat_elem): Return void, use
5482 std::string.
5483 (do_option): Likewise.
5484 (target_options_to_string): Return an std::string.
5485 * linux-nat.c (linux_nat_target::wait): Adjust.
5486 * target-debug.h (target_debug_print_options): Adjust.
5487
5488 2018-08-07 Tom Tromey <tom@tromey.com>
5489
5490 * Makefile.in (CPPFLAGS): New variable.
5491 (INTERNAL_CPPFLAGS): Use it.
5492
5493 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5494
5495 * NEWS: Mention the index cache.
5496
5497 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5498
5499 * common/pathstuff.h (get_standard_cache_dir): New.
5500 * common/pathstuff.c (get_standard_cache_dir): New.
5501 * build-id.h (build_id_to_string): New.
5502 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5503 DEBUG_STR_SUFFIX): Move to here.
5504 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5505 DEBUG_STR_SUFFIX): Move from there.
5506 (write_psymtabs_to_index): Make non-static, add basename
5507 parameter. Write to temporary files, rename when done.
5508 (save_gdb_index_command): Adjust call to
5509 write_psymtabs_to_index.
5510 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5511 field.
5512 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5513 (get_gdb_index_contents_from_cache): New.
5514 (get_gdb_index_contents_from_cache_dwz): New.
5515 (dwarf2_initialize_objfile): Read index from cache.
5516 (dwarf2_build_psymtabs): Save to index.
5517 * dwarf-index-cache.h: New file.
5518 * dwarf-index-cache.c: New file.
5519 * dwarf-index-write.h: New file.
5520
5521 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5522
5523 * gnulib/aclocal.m4: Re-generate.
5524 * gnulib/config.in: Re-generate.
5525 * gnulib/configure: Re-generate.
5526 * gnulib/import/Makefile.am: Re-generate.
5527 * gnulib/import/Makefile.in: Re-generate.
5528 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5529 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5530 * gnulib/import/m4/mkdir.m4: New file.
5531 * gnulib/import/mkdir.c: New file.
5532 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5533 module.
5534
5535 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5536
5537 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5538 * common/scoped_mmap.c: New file.
5539 * common/scoped_mmap.h (destroy): New method.
5540 (~scoped_mmap, reset): Use destroy.
5541 (scoped_mmap): New move constructor.
5542 (mmap_file): New declaration.
5543 * unittests/scoped_mmap-selftests.c (test_normal,
5544 test_invalid_filename, run_tests): New functions.
5545 (_initialize_scoped_mmap_selftests): Register selftest.
5546
5547 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5548
5549 * dwarf2read.c (read_gdb_index_from_section): Rename to...
5550 (read_gdb_index_from_buffer): ... this. Remove section
5551 parameter, add buffer parameter.
5552 (get_gdb_index_contents_ftype,
5553 get_gdb_index_contents_dwz_ftype): New typedefs.
5554 (dwarf2_read_gdb_index): Add callback parameters to get the
5555 index contents.
5556 (get_gdb_index_contents_from_section): New.
5557 (dwarf2_initialize_objfile): Update call to
5558 dwarf2_read_gdb_index.
5559
5560 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5561
5562 * common/filestuff.h (gdb_fopen_cloexec): New overload.
5563 (gdb_open_cloexec): Likewise.
5564 * nat/linux-osdata.c (command_from_pid): Use string_printf.
5565 (commandline_from_pid): Likewise.
5566 (linux_xfer_osdata_threads): Likewise.
5567 (linux_xfer_osdata_fds): Likewise.
5568 * ada-lang.c (is_package_name): Likewise.
5569 * auxv.c (procfs_xfer_auxv): Likewise.
5570 * breakpoint.c (print_one_breakpoint_location): Use
5571 uiout::field_fmt.
5572 (print_one_catch_solib): Use string_printf.
5573 * coff-pe-read.c (add_pe_exported_sym): Likewise.
5574 (add_pe_forwarded_sym): Likewise.
5575 * dwarf2read.c (create_type_unit_group): Likewise.
5576 (build_error_marker_type): Likewise.
5577 * infcall.c (get_function_name): Likewise.
5578 * valprint.c (print_converted_chars_to_obstack): Likewise.
5579 * xtensa-tdep.c (xtensa_register_type): Likewise.
5580
5581 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
5582
5583 * remote.c (remote_target::download_tracepoint): Fix format
5584 string errors.
5585
5586 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5587
5588 * tracefile.c: Include common/byte-vector.h.
5589 (trace_save): Change type of buf to gdb::byte_vector. Initialize
5590 with trace_regblock_size if needed. Update uses of buf.
5591
5592 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5593
5594 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5595 std::vector<unsigned char>.
5596 * tracepoint.c (collection_list::collection_list): Remove
5597 m_regs_mask initializer from initializer list. Resize
5598 m_regs_mask using the largest remote register number.
5599 (collection_list::add_remote_register): Remove size check on
5600 m_regs_mask. Use at to access element.
5601 (collection_list::stringify): Change type of temp_buf to
5602 gdb::char_vector. Update uses of temp_buf. Resize if needed to
5603 stringify the register mask. Use pack_hex_byte for the register
5604 mask.
5605
5606 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5607
5608 * tracepoint.h (class collection_list) <add_register>: Remove.
5609 <add_remote_register, add_ax_registers, add_local_register>:
5610 Declare.
5611 <add_memrange>: Add scope parameter.
5612 * tracepoint.c (encode_actions_1): Likewise.
5613 (collection_list::add_register): Rename to ...
5614 (collection_list::add_remote_register): ... this. Update
5615 comment.
5616 (collection_list::add_ax_registers, add_local_register): New
5617 methods.
5618 (collection_list::add_memrange): Add scope parameter. Call
5619 add_local_register instead of add_register.
5620 (finalize_tracepoint_aexpr): New function.
5621 (collection_list::collect_symbol): Update calls to add_memrange.
5622 Call add_local_register instead of add_register. Call
5623 add_ax_registers. Call finalize_tracepoint_aexpr.
5624 (encode_actions_1): Get remote regnos for $reg action. Call
5625 add_remote_register, add_ax_registers, and add_local_register.
5626 Update call to add_memrange. Call finalize_tracepoint_aexpr.
5627 (validate_actionline): Call finalize_tracepoint_aexpr.
5628
5629 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5630
5631 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5632 Replace array buf with gdb::char_vector buf, of size
5633 get_remote_packet_size (). Replace references to buf and
5634 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
5635 and xsnprintf with snprintf. Raise errors if the buffer is too
5636 small.
5637
5638 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5639
5640 * remote.c (remote_target::download_tracepoint): Fix the has_more
5641 predicate in the QTDP action list iteration.
5642
5643 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5644
5645 * remote.c (remote_target::download_tracepoint): Fix indentation
5646 in for block.
5647
5648 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5649
5650 * proc-api.c (_initialize_proc_api): Remove c, unused.
5651 * procfs.c (procfs_init_inferior): Remove signals, unused.
5652 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5653 unused.
5654
5655 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
5656 Andrew Burgess <andrew.burgess@embecosm.com>
5657
5658 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5659 'W_STOPCODE (0)' as this could be ambiguous.
5660
5661 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
5662
5663 * ser-tcp.c (net_open): Fix thinko when deciding whether to
5664 disable TCP's Nagle algorithm (use "ai_protocol" instead of
5665 "ai_socktype").
5666
5667 2018-08-02 Tom Tromey <tom@tromey.com>
5668
5669 PR symtab/16842.
5670 * dwarf2read.c (read_func_scope): Set symtab on template parameter
5671 symbols.
5672 (process_structure_scope): Likewise.
5673
5674 2018-08-02 Xavier Roirand <roirand@adacore.com>
5675
5676 PR gdb/22629:
5677 * darwin-nat.c (darwin_kill_inferior): Fix handling of
5678 kill inferior.
5679
5680 2018-08-02 Tom Tromey <tom@tromey.com>
5681
5682 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5683 (darwin_suspend_inferior, darwin_resume_inferior)
5684 (darwin_decode_notify_message, darwin_resume_inferior_threads)
5685 (darwin_check_new_threads): Check result of get_darwin_inferior.
5686
5687 2018-07-31 Joel Brobecker <brobecker@adacore.com>
5688
5689 GDB 8.1.1 released.
5690
5691 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
5692
5693 * varobj.c (varobj_get_path_expr_parent): Report an error if
5694 parent is a dynamic varobj.
5695
5696 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5697
5698 * gnulib/aclocal.m4: Re-generate.
5699 * gnulib/config.in: Re-generate.
5700 * gnulib/configure: Re-generate.
5701 * gnulib/import/Makefile.in: Re-generate.
5702 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5703 * gnulib/import/m4/onceonly.m4: Re-generate.
5704
5705 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5706
5707 * target-descriptions.c (struct xml_test_tdesc): New.
5708 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5709 (record_xml_tdesc): Update.
5710 (maintenance_check_xml_descriptions): Update.
5711 * target-descriptions.h (record_xml_tdesc): Update comment.
5712
5713 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
5714
5715 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5716 checking array bounds are defined.
5717
5718 2018-07-30 Tom Tromey <tom@tromey.com>
5719
5720 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5721 irreflexivity violation.
5722
5723 2018-07-30 Tom Tromey <tom@tromey.com>
5724
5725 * cli/cli-decode.c (lookup_cmd): Remove lint code.
5726 * value.c (unpack_long): Remove lint code.
5727 * valops.c (value_ind): Remove lint code.
5728 * valarith.c (value_x_binop, value_x_unop, value_equal)
5729 (value_pos): Remove lint code.
5730
5731 2018-07-28 Tom de Vries <tdevries@suse.de>
5732
5733 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5734 with undefined upper bound as <optimized out>.
5735
5736 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
5737
5738 * gcore.in: Rename variable "name" to "prefix". Expand
5739 "usage" text.
5740
5741 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
5742
5743 * windows-nat.c (windows_nat_target::create_inferior): Update to
5744 call close() in global namespace.
5745
5746 2018-07-26 Tom Tromey <tom@tromey.com>
5747
5748 * dwarf-index-write.c (add_address_entry): Don't add objfile
5749 offsets.
5750 * dbxread.c (find_stab_function): Rename from
5751 find_stab_function_addr. Return a bound_minimal_symbol.
5752 (read_dbx_symtab): Use raw_text_low, raw_text_high.
5753 Don't add objfile offsets.
5754 (end_psymtab): Use raw_text_low, raw_text_high,
5755 MSYMBOL_VALUE_RAW_ADDRESS.
5756 (read_ofile_symtab): Update.
5757 (process_one_symbol): Update.
5758 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5759 offsets.
5760 (dw2_relocate): Remove.
5761 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5762 searching addrmap.
5763 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5764 Update.
5765 (process_psymtab_comp_unit_reader, add_partial_symbol)
5766 (add_partial_subprogram, dwarf2_ranges_read): Update.
5767 (load_partial_dies): Update.
5768 (add_address_entry): Don't add objfile offsets.
5769 (dwarf2_build_include_psymtabs): Update.
5770 (create_addrmap_from_aranges): Don't add objfile offsets.
5771 (dw2_find_pc_sect_compunit_symtab): Update.
5772 * mdebugread.c (parse_symbol): Don't add objfile offsets.
5773 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5774 Update.
5775 (parse_partial_symbols): Don't add objfile offsets. Use
5776 raw_text_low, raw_text_high. Update.
5777 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5778 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5779 or call 'relocate' quick function. Clear psymbol_map.
5780 * psympriv.h (struct partial_symbol) <address>: Add section
5781 offset.
5782 <set_unrelocated_address>: Rename from set_address.
5783 <raw_text_low, raw_text_high>: New methods.
5784 <text_low, text_high>: Add objfile parameter.
5785 (add_psymbol_to_bcache): Add 'section' parameter. Call
5786 set_unrelocated_address.
5787 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5788 (find_pc_psymbol): Update.
5789 (fixup_psymbol_section, relocate_psymtabs): Remove.
5790 (dump_psymtab, psym_functions): Update.
5791 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5792 parameter.
5793 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5794 (start_psymtab_common): Update.
5795 * symfile-debug.c (debug_qf_relocate): Remove.
5796 (debug_sym_quick_functions): Update.
5797 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5798 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5799 Update.
5800
5801 2018-07-26 Tom Tromey <tromey@redhat.com>
5802
5803 * dbxread.c (end_psymtab): Use text_high_valid and
5804 text_low_valid.
5805 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5806 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5807 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5808 Update comment.
5809 <text_low_valid, text_high_valid>: New fields.
5810 <set_text_low, set_text_high>: Update.
5811 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5812
5813 2018-07-26 Tom Tromey <tom@tromey.com>
5814
5815 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5816 Update.
5817 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5818 textlow and texthigh fields.
5819 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5820 Update.
5821 * mdebugread.c (parse_lines, parse_partial_symbols)
5822 (psymtab_to_symtab_1): Update.
5823 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5824 Rename fields. Update comment. Now private.
5825 <text_low, text_high, set_text_low, set_text_high>: New methods.
5826 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5827 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5828 (start_psymtab_common, maintenance_info_psymtabs)
5829 (maintenance_check_psymtabs): Update.
5830 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5831 texthigh fields.
5832 (scan_xcoff_symtab): Update.
5833
5834 2018-07-26 Tom Tromey <tromey@redhat.com>
5835
5836 * psympriv.h (struct partial_symbol) <unrelocated_address,
5837 address, set_address>: New methods.
5838 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5839 (fixup_psymbol_section, relocate_psymtabs): Update.
5840 (print_partial_symbols): Add 'objfile' parameter. Update.
5841 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5842 Update.
5843
5844 2018-07-26 Tom Tromey <tom@tromey.com>
5845
5846 * dwarf-index-write.c (write_psymbols, debug_names::insert)
5847 (debug_names::write_psymbols): Update.
5848 * psympriv.h (struct partial_symbol): Derive from
5849 general_symbol_info.
5850 <obj_section>: New method.
5851 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5852 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5853 (find_pc_sect_psymbol, fixup_psymbol_section)
5854 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5855 (print_partial_symbols, recursively_search_psymtabs)
5856 (compare_psymbols, psymbol_hash, psymbol_compare)
5857 (add_psymbol_to_bcache, maintenance_check_psymtabs)
5858 (psymbol_name_matches, psym_fill_psymbol_map): Update.
5859
5860 2018-07-26 Tom Tromey <tromey@redhat.com>
5861
5862 * dbxread.c (end_psymtab): Remove dead code.
5863
5864 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
5865
5866 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5867 DWARF unwinders are disabled.
5868 * dwarf2-frame.c: Add dwarf2read.h include.
5869 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5870 disabled.
5871 (dwarf2_frame_unwinders_enabled_p): Define.
5872 (show_dwarf_unwinders_enabled_p): New function.
5873 (_initialize_dwarf2_frame): Register switch to control DWARF
5874 unwinder use.
5875 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5876 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5877 (show_dwarf_cmdlist): Remove static keyword.
5878 * dwarf2read.h (set_dwarf_cmdlist): Declare.
5879 (show_dwarf_cmdlist): Declare.
5880 * NEWS: Document new feature.
5881
5882 2018-07-26 Tom de Vries <tdevries@suse.de>
5883
5884 PR breakpoints/23366
5885 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5886
5887 2018-07-26 Tom de Vries <tdevries@suse.de>
5888
5889 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5890 DW_AT_count can't be translated to a dynamic prop.
5891
5892 2018-07-25 Tom de Vries <tdevries@suse.de>
5893
5894 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5895 try/catch.
5896
5897 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
5898
5899 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5900
5901 2018-07-25 Joel Brobecker <brobecker@adacore.com>
5902
5903 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5904
5905 2018-07-24 Keith Seitz <keiths@redhat.comt
5906
5907 PR symtab/23010
5908 * dwarf2read.c (dw2_add_symbol_to_list): New function.
5909 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5910 instead of add_symbol_to_list.
5911 (read_file_scope): Call prepare_one_comp_unit before reading
5912 any other DIEs.
5913
5914 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
5915
5916 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5917
5918 2018-07-24 Tom Tromey <tom@tromey.com>
5919
5920 * utils.c (malloc, realloc, free): Don't declare.
5921 * configure, config.in: Rebuild.
5922 * configure.ac: Don't check for declarations of free, malloc, or
5923 realloc.
5924
5925 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5926
5927 * aarch64-linux-nat.c
5928 (aarch64_linux_nat_target::stopped_data_address): Remove unused
5929 variable.
5930 * arm-linux-nat.c (fetch_regs): Likewise.
5931 (store_regs): Likewise.
5932 (fetch_vfp_regs): Likewise.
5933 (store_vfp_regs): Likewise.
5934 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5935 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5936 (arm_linux_nat_target::insert_watchpoint): Likewise.
5937 (arm_linux_nat_target::remove_watchpoint): Likewise.
5938 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5939 Likewise.
5940 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5941 Likewise.
5942 * ppc-linux-nat.c (fetch_register): Likewise.
5943 (fetch_all_gp_regs): Likewise.
5944 (fetch_ppc_registers): Likewise.
5945 (store_all_gp_regs): Likewise.
5946 (store_ppc_registers): Likewise.
5947 (hwdebug_insert_point): Likewise.
5948 (can_use_watchpoint_cond_accel): Likewise.
5949 * remote-sim.c (gdb_os_write_stdout): Likewise.
5950
5951 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5952 Tom Tromey <tom@tromey.com>
5953
5954 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5955 test for it.
5956 * configure: Rebuild.
5957
5958 2018-07-22 Tom Tromey <tom@tromey.com>
5959
5960 * regformats/regdat.sh: Define xmltarget_${name} inside
5961 #ifndef IN_PROCESS_AGENT.
5962
5963 2018-07-22 Tom Tromey <tom@tromey.com>
5964
5965 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5966
5967 2018-07-22 Tom Tromey <tom@tromey.com>
5968
5969 * symfile.c (reread_symbols): Notify iter, not objfile.
5970
5971 2018-07-22 Tom Tromey <tom@tromey.com>
5972
5973 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5974 Use arch_ops.
5975 (ravenscar_thread_target::prepare_to_store): Likewise.
5976
5977 2018-07-22 Tom Tromey <tom@tromey.com>
5978
5979 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5980 unused variable. Call value_fetch_lazy when needed.
5981 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5982 Remove unused variable. Call value_fetch_lazy when needed.
5983
5984 2018-07-22 Tom Tromey <tom@tromey.com>
5985
5986 * m32c-tdep.c (mark_dma): Return void.
5987 (make_regs): Remove unused declarations.
5988
5989 2018-07-22 Tom Tromey <tom@tromey.com>
5990
5991 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5992 cmdscm_get_valid_command_smob_arg_unsafe for effect.
5993 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5994 bkscm_get_valid_block_smob_arg_unsafe for effect.
5995
5996 2018-07-22 Tom Tromey <tom@tromey.com>
5997
5998 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5999 value_type.
6000
6001 2018-07-22 Tom Tromey <tom@tromey.com>
6002
6003 * windows-nat.c (saved_context): Conditionally define.
6004 * remote.c (remote_target::remote_btrace_maybe_reopen):
6005 Conditionally declare "warned".
6006 * inflow.c (sigquit_ours): Conditionally define.
6007 (new_tty): Move "tty" declaration inside #if.
6008 * guile/guile.c (guile_datadir): Conditionally define.
6009 * charset.c (set_be_le_names): Move some declarations inside #if.
6010 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
6011 #if.
6012 (parse_xml_btrace_conf): Likewise.
6013
6014 2018-07-22 Tom Tromey <tom@tromey.com>
6015
6016 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
6017
6018 2018-07-22 Tom Tromey <tom@tromey.com>
6019
6020 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
6021 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
6022 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
6023 * buildsym-legacy.c (get_macro_table): Remove unused variable.
6024 * stack.c (frame_apply_level_command): Remove unused variable.
6025 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
6026 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
6027 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6028 unused variable.
6029 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6030 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6031 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6032 variable.
6033 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6034 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6035 variable.
6036 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6037 Remove unused variable.
6038 * cli/cli-script.c (recurse_read_control_structure): Remove unused
6039 variable.
6040 * common/tdesc.c (print_xml_feature::visit): Remove unused
6041 variable.
6042 * compile/compile-object-load.c (store_regs): Remove unused
6043 variables.
6044 * complaints.c (clear_complaints): Remove unused variable.
6045 * corelow.c (core_target_open): Remove unused variable.
6046 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6047 variable.
6048 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6049 variable.
6050 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6051 variable.
6052 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6053 variable.
6054 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6055 variable.
6056 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6057 variable.
6058 * ia64-tdep.c (examine_prologue): Remove unused variable.
6059 * infcall.c (run_inferior_call): Remove unused variable.
6060 * inferior.c (exit_inferior): Remove unused variable.
6061 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6062 * linespec.c (decode_line_2): Remove unused variable.
6063 * linux-nat.c (super_close): Remove.
6064 * linux-tdep.c (linux_info_proc): Remove unused variable.
6065 * mi/mi-main.c (mi_execute_command): Remove unused variable.
6066 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6067 Remove unused variable.
6068 * parse.c (find_minsym_type_and_address): Remove unused variable.
6069 * printcmd.c (info_symbol_command, printf_floating): Remove unused
6070 variable.
6071 * python/py-breakpoint.c (bppy_set_commands): Remove unused
6072 variable.
6073 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6074 variables.
6075 * record-btrace.c (record_btrace_target::store_registers): Remove
6076 unused variable.
6077 (cmd_show_record_btrace_cpu): Remove unused variable.
6078 * riscv-tdep.c (riscv_register_reggroup_p)
6079 (riscv_push_dummy_call, riscv_return_value): Remove unused
6080 variable.
6081 * rust-exp.y (literal): Remove unused variable.
6082 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6083 unused variable.
6084 <STRUCTOP_ANONYMOUS>: Likewise.
6085 * s390-linux-tdep.c (s390_linux_init_abi_31)
6086 (s390_linux_init_abi_64): Remove unused variable.
6087 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6088 (file_select_thread, net_windows_open, _initialize_ser_windows):
6089 Remove unused variables.
6090 * symtab.c (find_pc_sect_line): Remove unused variable.
6091 * target-memory.c (compute_garbled_blocks): Remove unused
6092 variable.
6093 (target_write_memory_blocks): Remove unused variable.
6094 * target.c (target_stack::unpush): Remove unused variables.
6095 * tracepoint.c (start_tracing, all_tracepoint_actions)
6096 (merge_uploaded_trace_state_variables)
6097 (print_one_static_tracepoint_marker): Remove unused variable.
6098 * unittests/basic_string_view/element_access/char/1.cc (test01):
6099 Remove unused variable.
6100 * windows-nat.c (windows_continue, windows_add_all_dlls)
6101 (do_initial_windows_stuff, windows_nat_target::create_inferior):
6102 Remove unused variables.
6103
6104 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
6105
6106 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6107 attr_profile in HAVE_ELF.
6108 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6109 HAVE_ELF.
6110
6111 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
6112
6113 * frame.c (frame_register_unwind): Change parameter name.
6114 (frame_unwind_register): Likewise.
6115 (frame_unwind_register_value): Likewise.
6116 (frame_unwind_register_signed): Likewise.
6117 (frame_unwind_register_unsigned): Likewise.
6118 * frame.h (frame_register_unwind): Likewise.
6119 (frame_unwind_register): Likewise.
6120 (frame_unwind_register_value): Likewise.
6121 (frame_unwind_register_signed): Likewise.
6122 (frame_unwind_register_unsigned): Likewise.
6123 (frame_unwind_arch): Likewise.
6124
6125 2018-07-20 Maciej W. Rozycki <macro@mips.com>
6126
6127 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6128 ISA maintenance.
6129
6130 2018-07-20 Maciej W. Rozycki <macro@mips.com>
6131
6132 * mips-linux-nat.c (mips_linux_nat_target::read_description):
6133 Call `get_ptrace_pid' rather than extracting the ptrace PID by
6134 hand.
6135
6136 2018-07-20 Keith Seitz <keiths@redhat.com>
6137
6138 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6139 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6140 m_compunit_symtab, m_language>: Add "m_" prefix.
6141 Update all uses.
6142 * buildsym.c: Update all uses.
6143
6144 2018-07-20 Tom Tromey <tom@tromey.com>
6145
6146 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6147 * buildsym.h (record_line_ftype): Remove typedef.
6148
6149 2018-07-20 Tom Tromey <tom@tromey.com>
6150
6151 * buildsym-legacy.h (augment_type_symtab): Don't declare.
6152 (end_expandable_symtab): Likewise.
6153 (end_symtab_get_static_block): Likewise.
6154 (end_symtab_from_static_block): Likewise.
6155 * buildsym-legacy.c (augment_type_symtab): Remove.
6156 (end_expandable_symtab): Remove.
6157 (end_symtab_get_static_block): Remove.
6158 (end_symtab_from_static_block): Remove.
6159
6160 2018-07-20 Tom Tromey <tom@tromey.com>
6161
6162 * dwarf2read.c: Include buildsym.h.
6163 (struct dwarf2_cu) <builder>: New method.
6164 (fixup_go_packaging): Update.
6165 (process_full_comp_unit, process_full_type_unit): Update. Don't
6166 use scoped_free_pendings.
6167 (using_directives): Add "cu" parameter, remove "language".
6168 (read_import_statement, setup_type_unit_groups, )
6169 (read_func_scope, read_lexical_block_scope)
6170 (dwarf2_record_block_ranges, read_namespace): Update.
6171 (lnp_state_machine::lnp_state_machine): Add cu parameter.
6172 (lnp_state_machine::handle_end_sequence): Update.
6173 (class lnp_state_machine) <m_cu>: New member.
6174 <m_record_line_callback>: Remove.
6175 <m_currently_recording_lines>: New member.
6176 (lnp_state_machine::handle_set_file): Update.
6177 (noop_record_line): Remove.
6178 (dwarf_record_line_p): Add cu parameter.
6179 (dwarf_record_line_1, dwarf_finish_line): Likewise.
6180 (lnp_state_machine::record_line)
6181 (lnp_state_machine::lnp_state_machine)
6182 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6183 (dwarf_decode_lines): Update.
6184 (dwarf2_start_subfile): Add cu parameter.
6185 (dwarf2_start_symtab, new_symbol): Update.
6186 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6187 Remove dwarf2_per_objfile parameter.
6188 (dwarf_decode_macros): Update.
6189
6190 2018-07-20 Tom Tromey <tom@tromey.com>
6191
6192 * stabsread.c (define_symbol): Update.
6193 * buildsym-legacy.h (get_buildsym_compunit): Declare.
6194 * dwarf2read.c (new_symbol): Update.
6195 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6196 * cp-namespace.c: Include buildsym.h.
6197 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6198 * buildsym-legacy.c (get_buildsym_compunit): New function.
6199
6200 2018-07-20 Tom Tromey <tom@tromey.com>
6201
6202 * xcoffread.c: Include buildsym-legacy.h.
6203 * windows-nat.c: Include buildsym-legacy.h.
6204 * stabsread.c: Include buildsym-legacy.h.
6205 * mdebugread.c: Include buildsym-legacy.h.
6206 * buildsym-legacy.h: New file.
6207 * buildsym-legacy.c: New file, from buildsym.c.
6208 * go32-nat.c: Include buildsym-legacy.h.
6209 * dwarf2read.c: Include buildsym-legacy.h.
6210 * dbxread.c: Include buildsym-legacy.h.
6211 * cp-namespace.c: Include buildsym-legacy.h.
6212 * coffread.c: Include buildsym-legacy.h.
6213 * buildsym.h: Move some contents to buildsym-legacy.h.
6214 * buildsym.c: Include buildsym-legacy.h. Move many functions to
6215 buildsym-legacy.c.
6216 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6217
6218 2018-07-20 Tom Tromey <tom@tromey.com>
6219
6220 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6221 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6222 (buildsym_compunit::buildsym_compunit)
6223 (buildsym_compunit::~buildsym_compunit)
6224 (buildsym_compunit::get_macro_table): Define.
6225
6226 2018-07-20 Tom Tromey <tom@tromey.com>
6227
6228 * buildsym.c (reset_symtab_globals): Remove.
6229 (buildsym_compunit::end_symtab_from_static_block): Update.
6230 (buildsym_compunit::augment_type_symtab): Update.
6231 (end_symtab_from_static_block): Call free_buildsym_compunit.
6232 (augment_type_symtab, end_symtab, end_expandable_symtab):
6233 Likewise.
6234
6235 2018-07-20 Tom Tromey <tom@tromey.com>
6236
6237 * arch-utils.c: Do not include buildsym.h.
6238 * mipsread.c: Do not include buildsym.h.
6239 * machoread.c: Do not include buildsym.h.
6240 * elfread.c: Do not include buildsym.h.
6241
6242 2018-07-20 Tom Tromey <tom@tromey.com>
6243
6244 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6245 initialization.
6246 (buildsym_compunit): Add new constructor.
6247 (struct buildsym_compunit) <get_last_source_file, finish_block,
6248 record_block_range, start_subfile, patch_subfile_names,
6249 push_subfile, pop_subfile, record_line, get_compunit_symtab,
6250 set_last_source_start_addr, get_last_source_start_addr,
6251 get_local_using_directives, set_local_using_directives,
6252 get_global_using_directives, outermost_context_p,
6253 get_current_context_stack, get_context_stack_depth,
6254 get_current_subfile, get_local_symbols, get_file_symbols,
6255 get_global_symbols, record_debugformat, record_producer,
6256 push_context, pop_context, end_symtab_get_static_block,
6257 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6258 New public methods.
6259 <record_pending_block, finish_block_internal, make_blockvector,
6260 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6261 private methods.
6262 Update all users.
6263
6264 2018-05-22 Tom Tromey <tom@tromey.com>
6265
6266 * buildsym.c (record_pending_block): Move earlier. Remove objfile
6267 parameter.
6268 (finish_block_internal): Update.
6269
6270 2018-07-20 Tom Tromey <tom@tromey.com>
6271
6272 * buildsym.c (record_pending_block): Move earlier. Remove objfile
6273 parameter.
6274 (finish_block_internal): Update.
6275
6276 2018-07-20 Tom Tromey <tom@tromey.com>
6277
6278 * buildsym.h (EXTERN): Don't define or undef.
6279 * buildsym.c (EXTERN): Don't define.
6280
6281 2018-07-20 Tom Tromey <tom@tromey.com>
6282
6283 * buildsym.c: Remove TODO comment.
6284
6285 2018-07-20 Tom Tromey <tom@tromey.com>
6286
6287 * coffread.c (coff_symtab_read): Update.
6288 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6289 (xcoff_new_init): Update.
6290 * mipsread.c (mipscoff_new_init): Update.
6291 * mdebugread.c (mdebug_build_psymtabs): Update.
6292 * elfread.c (elf_new_init): Update.
6293 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6294 Update.
6295 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6296 (coffstab_build_psymtabs, elfstab_build_psymtabs)
6297 (stabsect_build_psymtabs): Update.
6298 * buildsym.h (buildsym_init): Don't declare.
6299 * buildsym.c: Update comment.
6300 (prepare_for_building): Remove.
6301 (start_symtab, restart_symtab): Update.
6302 (reset_symtab_globals): Update comment.
6303 (buildsym_init): Remove.
6304
6305 2018-07-20 Tom Tromey <tom@tromey.com>
6306
6307 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6308 * stabsread.c (patch_block_stabs, define_symbol, read_type)
6309 (read_enum_type, common_block_start, common_block_end)
6310 (cleanup_undefined_types_1, finish_global_stabs): Update.
6311 * mdebugread.c (psymtab_to_symtab_1): Update.
6312 * dwarf2read.c (fixup_go_packaging, read_func_scope)
6313 (read_lexical_block_scope, new_symbol): Update.
6314 * dbxread.c (process_one_symbol): Update.
6315 * coffread.c (coff_symtab_read, process_coff_symbol)
6316 (coff_read_enum_type): Update.
6317 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6318 declare.
6319 (get_local_symbols, get_file_symbols, get_global_symbols): New
6320 functions.
6321 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6322 m_global_symbols.
6323 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6324 (~scoped_free_pendings): Update.
6325 (finish_block, prepare_for_building, reset_symtab_globals)
6326 (end_symtab_get_static_block, end_symtab_with_blockvector)
6327 (augment_type_symtab, push_context): Update.
6328 (get_local_symbols, get_file_symbols, get_global_symbols): New
6329 functions.
6330 (buildsym_init): Update.
6331
6332 2018-07-20 Tom Tromey <tom@tromey.com>
6333
6334 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6335 (process_full_type_unit): Likewise.
6336 (dwarf2_start_symtab): Set list_in_scope.
6337
6338 2018-07-20 Tom Tromey <tom@tromey.com>
6339
6340 * dwarf2read.c (process_psymtab_comp_unit_reader)
6341 (build_type_psymtabs_reader): Do not set list_in_scope.
6342
6343 2018-07-20 Tom Tromey <tom@tromey.com>
6344
6345 * buildsym.c (free_pendings): Remove.
6346 (add_symbol_to_list, scoped_free_pendings)
6347 (finish_block_internal, buildsym_init): Update.
6348
6349 2018-07-20 Tom Tromey <tom@tromey.com>
6350
6351 * xcoffread.c (read_xcoff_symtab): Update.
6352 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6353 Update.
6354 * dbxread.c (process_one_symbol): Update.
6355 * coffread.c (coff_symtab_read): Update.
6356 * buildsym.h (finish_block): Update.
6357 * buildsym.c (finish_block): Remove "listhead" argument.
6358 (end_symtab_get_static_block): Update.
6359
6360 2018-07-20 Tom Tromey <tom@tromey.com>
6361
6362 * buildsym.h (class scoped_free_pendings): Remove constructor.
6363 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6364 method.
6365 <m_pending_block_obstack, m_pending_blocks>: New members.
6366 (pending_block_obstack, pending_blocks): Remove.
6367 (scoped_free_pendings::scoped_free_pendings): Default.
6368 (~scoped_free_pendings): Update.
6369 (free_pending_blocks): Remove.
6370 (finish_block_internal, record_pending_block, make_blockvector)
6371 (end_symtab_get_static_block, augment_type_symtab, push_context)
6372 (buildsym_init): Update.
6373
6374 2018-07-20 Tom Tromey <tom@tromey.com>
6375
6376 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6377 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6378 members.
6379 (pending_addrmap, pending_addrmap_obstack)
6380 (pending_addrmap_interesting): Remove.
6381 (scoped_free_pendings, record_block_range, make_blockvector)
6382 (prepare_for_building, reset_symtab_globals, buildsym_init):
6383 Update.
6384
6385 2018-07-20 Tom Tromey <tom@tromey.com>
6386
6387 * xcoffread.c (process_linenos): Update.
6388 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6389 * mdebugread.c (psymtab_to_symtab_1): Update.
6390 * dwarf2read.c (setup_type_unit_groups)
6391 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6392 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6393 * dbxread.c (process_one_symbol): Update.
6394 * coffread.c (coff_symtab_read, enter_linenos)
6395 (process_coff_symbol): Update.
6396 * buildsym.h (current_subfile): Don't declare.
6397 (get_current_subfile): Declare.
6398 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6399 member.
6400 (start_subfile, free_buildsym_compunit, push_subfile)
6401 (prepare_for_building, start_symtab): Update.
6402 (get_current_subfile): New function.
6403
6404 2018-07-20 Tom Tromey <tom@tromey.com>
6405
6406 * coffread.c (coff_symtab_read): Update.
6407 * xcoffread.c (read_xcoff_symtab): Update.
6408 * dwarf2read.c (new_symbol): Update.
6409 (read_func_scope, read_lexical_block_scope): Update.
6410 * dbxread.c (process_one_symbol): Update.
6411 * buildsym.h (context_stack, context_stack_depth): Don't declare.
6412 (outermost_context_p): Remove macro.
6413 (outermost_context_p, get_current_context_stack)
6414 (get_context_stack_depth): Declare.
6415 (pop_context): Return struct context_stack.
6416 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6417 member.
6418 (context_stack_size): Remove.
6419 (INITIAL_CONTEXT_STACK_SIZE): Remove.
6420 (prepare_for_building, end_symtab_get_static_block)
6421 (augment_type_symtab, push_context): Update.
6422 (pop_context): Return struct context_stack.
6423 (outermost_context_p, get_current_context_stack)
6424 (get_context_stack_depth): New functions.
6425 (buildsym_init): Update.
6426
6427 2018-07-20 Tom Tromey <tom@tromey.com>
6428
6429 * rust-exp.y: Now a pure parser. Update all rules.
6430 (%union): Move earlier.
6431 (current_parser, work_obstack): Remove globals.
6432 (rust_parser, ~rust_parser): Update.
6433 (class rust_parser) <copy_name, concat3, crate_name, super_name,
6434 lex_character, lex_number, lex_string, lex_identifier,
6435 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6436 convert_name, convert_params_to_expression,
6437 convert_ast_to_expression, ast_basic_type, ast_operation,
6438 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6439 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6440 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6441 ast_array_type, ast_slice_type, ast_reference_type,
6442 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6443 (rust_parse): Update.
6444 (rustyyerror, rustyylex): Add parser parameter.
6445 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6446 (rust_lex_stringish_test, rust_lex_test_sequence)
6447 (rust_lex_test_trailing_dot, rust_lex_test_completion)
6448 (rust_lex_test_push_back, rust_lex_tests): Update.
6449
6450 2018-07-19 Pedro Alves <palves@redhat.com>
6451
6452 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6453 gdb::unique_xmalloc_ptr.
6454 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6455 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6456 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6457 copy-initialization.
6458 * guile/scm-pretty-print.c (ppscm_print_children): Use
6459 gdb::unique_xmalloc_ptr instead of cleanups.
6460 (gdbscm_apply_val_pretty_printer): Remove cleanups.
6461 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6462 gdb::unique_xmalloc_ptr.
6463 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6464 Adjust to use gdb::unique_xmalloc_ptr.
6465 * guile/scm-utils.c (extract_arg): Adjust.
6466 * guile/scm-value.c (gdbscm_value_field): Adjust to use
6467 gdb::unique_xmalloc_ptr instead of a cleanup.
6468
6469 2018-07-19 Tom Tromey <tom@tromey.com>
6470
6471 * utils.c (do_value_free_to_mark)
6472 (make_cleanup_value_free_to_mark): Remove.
6473 * utils.h (make_cleanup_value_free_to_mark): Remove.
6474
6475 2018-07-19 Pedro Alves <palves@redhat.com>
6476
6477 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6478 forwarding reference.
6479
6480 2018-07-18 Pedro Alves <palves@redhat.com>
6481
6482 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6483 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
6484 cleanup.
6485
6486 2018-07-18 Pedro Alves <palves@redhat.com>
6487
6488 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6489 exceptions.
6490 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6491 (gdbscm_wrap): New.
6492 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6493 directly instead of a cleanup.
6494 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6495 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
6496 (vlscm_binop_gdbthrow): New, factored out from ...
6497 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
6498 (vlscm_rich_compare): Use gdbscm_wrap.
6499 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6500 instead of a cleanup.
6501 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6502 cleanup.
6503 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6504 Use xfree directly instead of a cleanup.
6505 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6506 Adjust to use gdbscm_wrap and scoped_value_mark.
6507 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6508 (gdbscm_value_address, gdbscm_value_dereference)
6509 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6510 scoped_value_mark.
6511 (gdbscm_value_dynamic_type): Use scoped_value_mark.
6512 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6513 scoped_value_mark.
6514 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6515 gdbscm_wrap and scoped_value_mark.
6516 (gdbscm_value_to_string): Use xfree directly instead of a
6517 cleanup. Move 'buffer' unique_ptr to TRY scope.
6518 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6519 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
6520 scoped_value_mark.
6521 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6522 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6523 scoped_value_mark.
6524 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6525 gdbscm_wrap.
6526
6527 2018-07-18 Tom de Vries <tdevries@suse.de>
6528
6529 * findvar.c (default_read_var_value): Also resolve dynamic type for
6530 LOC_OPTIMIZED_OUT vars.
6531
6532 2018-07-18 Maciej W. Rozycki <macro@mips.com>
6533
6534 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6535 decoding.
6536
6537 2018-07-17 Tom Tromey <tom@tromey.com>
6538
6539 * guile/scm-param.c (pascm_set_func, pascm_show_func)
6540 (compute_enum_list, pascm_set_param_value_x)
6541 (gdbscm_parameter_value): Update.
6542 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6543 (gdbscm_scm_to_host_string): Update.
6544 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6545 Update.
6546 * guile/scm-cmd.c (cmdscm_add_completion): Update.
6547 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6548 * guile/scm-string.c (gdbscm_scm_to_string): Return
6549 unique_xmalloc_ptr.
6550 (gdbscm_scm_to_host_string): Likewise.
6551
6552 2018-07-17 Tom Tromey <tom@tromey.com>
6553
6554 * guile/guile.c (gdbscm_eval_from_control_command): Update.
6555 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6556 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6557 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6558 unique_xmalloc_ptr.
6559
6560 2018-07-17 Tom Tromey <tom@tromey.com>
6561
6562 * guile/scm-param.c (pascm_signal_setshow_error): Update.
6563 * guile/guile-internal.h (gdbscm_exception_message_to_string):
6564 Update.
6565 * guile/scm-cmd.c (cmdscm_function): Update.
6566 * guile/scm-pretty-print.c
6567 (ppscm_print_exception_unless_memory_error): Update.
6568 * guile/scm-exception.c (gdbscm_exception_message_to_string):
6569 Return unique_xmalloc_ptr.
6570
6571 2018-07-17 Tom Tromey <tom@tromey.com>
6572
6573 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6574 Use string_printf.
6575
6576 2018-07-17 Jim Wilson <jimw@sifive.com>
6577
6578 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6579 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
6580 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
6581 unecessary braces after EF_RISCV_RVC test. Delete call to
6582 set_gdbarch_decr_pc_after_break.
6583
6584 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6585 RISCV_LAST_FP_REGNUM + 1.
6586 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6587
6588 2018-07-17 Tom Tromey <tom@tromey.com>
6589
6590 * configure.ac: Remove --disable-gdbcli.
6591 * configure: Rebuild.
6592 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6593 (SUBDIR_CLI_CFLAGS): Remove.
6594 (SFILES): Use SUBDIR_CLI_SRCS.
6595 (COMMON_OBS): Use SUBDIR_CLI_OBS.
6596
6597 2018-07-17 Tom Tromey <tom@tromey.com>
6598
6599 PR gdb/18624:
6600 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6601
6602 2018-07-16 Jim Wilson <jimw@sifive.com>
6603
6604 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6605
6606 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6607
6608 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6609 variable.
6610 (libunwind_frame_sniffer): Likewise.
6611 (libunwind_frame_prev_register): Likewise.
6612 (libunwind_sigtramp_frame_sniffer): Likewise.
6613 * ia64-tdep.c (ia64_access_reg): Likewise.
6614 (ia64_access_rse_reg): Likewise.
6615 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6616 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6617
6618 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6619
6620 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6621
6622 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6623
6624 * remote-sim.c (gdbsim_target::close,
6625 gdbsim_target::mourn_inferior): Remove unused variables.
6626
6627 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
6628
6629 * ia64-tdep.c (ktab_buf): New global.
6630 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6631 (get_kernel_table): Adjust.
6632
6633 2018-07-16 Tom Tromey <tom@tromey.com>
6634
6635 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6636 * dwarf2read.c (using_directives, new_symbol): Use
6637 outermost_context_p.
6638 * dbxread.c (process_one_symbol): Use outermost_context_p.
6639 * coffread.c (coff_symtab_read): Use outermost_context_p.
6640
6641 2018-07-16 Tom Tromey <tom@tromey.com>
6642
6643 * dwarf2read.c (using_directives, read_func_scope)
6644 (read_lexical_block_scope): Update.
6645 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6646 * buildsym.h (local_using_directives, global_using_directives):
6647 Don't declare.
6648 (get_local_using_directives, set_local_using_directives)
6649 (get_global_using_directives): Declare.
6650 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6651 m_global_using_directives>: New members.
6652 (finish_block_internal, prepare_for_building)
6653 (reset_symtab_globals, end_symtab_get_static_block)
6654 (push_context): Update.
6655 (get_local_using_directives, set_local_using_directives)
6656 (get_global_using_directives): New functions.
6657 (buildsym_init): Update.
6658
6659 2018-07-16 Tom Tromey <tom@tromey.com>
6660
6661 * xcoffread.c (xcoff_initial_scan): Don't call
6662 free_pending_blocks.
6663 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6664 * buildsym.h (class scoped_free_pendings): Add constructor.
6665 (free_pending_blocks): Don't declare.
6666 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6667 (free_pending_blocks): Now static.
6668
6669 2018-07-16 Tom Tromey <tom@tromey.com>
6670
6671 * buildsym.h (push_subfile, pop_subfile): Update declarations.
6672 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6673 member.
6674 (struct subfile_stack): Remove.
6675 (subfile_stack): Remove.
6676 (push_subfile, pop_subfile, buildsym_init): Update.
6677
6678 2018-07-16 Tom Tromey <tom@tromey.com>
6679
6680 * buildsym.c (push_subfile): Use gdb_assert.
6681 (pop_subfile): Use gdb_assert.
6682
6683 2018-07-16 Tom Tromey <tom@tromey.com>
6684
6685 * buildsym.h (merge_symbol_lists): Remove.
6686 * buildsym.c (merge_symbol_lists): Remove.
6687
6688 2018-07-16 Tom Tromey <tom@tromey.com>
6689
6690 * stabsread.c (scan_file_globals): Update comment.
6691 * stabsread.h (scan_file_globals): Move from buildsym.h.
6692 * buildsym.h (scan_file_globals): Move to stabsread.h.
6693
6694 2018-07-16 Tom Tromey <tom@tromey.com>
6695
6696 * xcoffread.c (xcoff_new_init): Update.
6697 * mipsread.c (mipscoff_new_init): Update.
6698 * mdebugread.c (mdebug_build_psymtabs): Update.
6699 * elfread.c (elf_new_init): Update.
6700 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6701 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6702 * buildsym.h (buildsym_new_init): Don't declare.
6703 * buildsym.c (buildsym_new_init): Remove.
6704
6705 2018-07-16 Tom Tromey <tom@tromey.com>
6706
6707 * stabsread.h (within_function): Move from buildsym.h.
6708 * stabsread.c (start_stabs): Clear within_function.
6709 * coffread.c (coff_start_symtab): Clear within_function.
6710 * buildsym.h (within_function): Move to stabsread.h.
6711 * buildsym.c (prepare_for_building): Update.
6712
6713 2018-07-16 Tom Tromey <tom@tromey.com>
6714
6715 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6716 * dwarf2read.c (dwarf2_start_symtab): Don't set
6717 processing_gcc_compilation.
6718 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6719
6720 2018-07-16 Tom Tromey <tom@tromey.com>
6721
6722 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6723 (next_symbol_text_func): Move from buildsym.h.
6724 * stabsread.c (hashname): Move from buildsym.c.
6725 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6726 (next_symbol_text_func, hashname): Move to stabsread.h.
6727 * buildsym.c: Don't include bcache.h
6728 (hashname): Move to stasbread.c.
6729
6730 2018-07-16 Tom Tromey <tom@tromey.com>
6731
6732 * buildsym.h (context_stack_size): Don't declare.
6733 * buildsym.c (context_stack_size): New global.
6734
6735 2018-07-16 Tom Tromey <tom@tromey.com>
6736
6737 * dbxread.c (processing_acc_compilation): New global.
6738 * buildsym.h (processing_acc_compilation): Don't declare.
6739
6740 2018-07-16 Tom Tromey <tom@tromey.com>
6741
6742 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6743 * dbxread.c (read_ofile_symtab): Update.
6744 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6745 * buildsym.h (last_source_start_addr): Remove.
6746 (set_last_source_start_addr, get_last_source_start_addr):
6747 Declare.
6748 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6749 parameter.
6750 (struct buildsym_compunit) <m_last_source_start_addr>: New
6751 member.
6752 (prepare_for_building): Remove start_addr parameter.
6753 (start_symtab, restart_symtab, end_symtab_get_static_block)
6754 (end_symtab_with_blockvector): Update.
6755 (set_last_source_start_addr, get_last_source_start_addr): New
6756 functions.
6757
6758 2018-07-16 Tom Tromey <tom@tromey.com>
6759
6760 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6761 member.
6762 (have_line_numbers): Remove.
6763 (record_line, prepare_for_building, end_symtab_get_static_block)
6764 (augment_type_symtab): Update.
6765
6766 2018-07-16 Tom Tromey <tom@tromey.com>
6767
6768 * buildsym.c (~buildsym_compunit): Free the macro table.
6769 (struct buildsym_compunit) <get_macro_table, release_macros>: New
6770 methods.
6771 <m_pending_macros>: New member.
6772 (pending_macros): Remove.
6773 (~scoped_free_pendings, get_macro_table, prepare_for_building)
6774 (reset_symtab_globals, end_symtab_get_static_block)
6775 (end_symtab_with_blockvector, augment_type_symtab)
6776 (buildsym_init): Update.
6777
6778 2018-07-16 Tom Tromey <tom@tromey.com>
6779
6780 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6781 parameter.
6782 (buildsym_compunit::set_last_source_file): New method.
6783 <m_last_source_file>: New member.
6784 (prepare_for_building): Remove "name" parameter.
6785 (start_symtab, restart_symtab, reset_symtab_globals): Update.
6786 (last_source_file): Remove.
6787 (set_last_source_file, get_last_source_file): Update.
6788
6789 2018-07-16 Tom Tromey <tom@tromey.com>
6790
6791 * buildsym.c (prepare_for_building): Add assert.
6792
6793 2018-07-16 Tom Tromey <tom@tromey.com>
6794
6795 * buildsym.c (~buildsym_compunit): Update.
6796 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6797 (start_subfile, patch_subfile_names)
6798 (end_symtab_with_blockvector): Update.
6799
6800 2018-07-16 Tom Tromey <tom@tromey.com>
6801
6802 * buildsym.c (struct buildsym_compunit): Add constructor,
6803 destructor, initializers.
6804 (start_buildsym_compunit): Remove.
6805 (free_buildsym_compunit): Use "delete".
6806 (start_symtab, restart_symtab): Use "new".
6807
6808 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
6809
6810 * symfile.c (set_objfile_default_section_offset): Remove struct
6811 keyword.
6812
6813 2018-07-14 Stafford Horne <shorne@gmail.com>
6814
6815 * (Responsible Maintainers): Add myself as or1k maintainer.
6816
6817 2018-07-13 Tom Tromey <tom@tromey.com>
6818
6819 * symfile.c (set_objfile_default_section_offset): Use extra braces
6820 around initializer.
6821
6822 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6823
6824 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6825 non-branching basr.
6826
6827 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6828
6829 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6830 unittests/cli-utils-selftests.c
6831 * unittests/cli-utils-selftests.c: New file.
6832
6833 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6834
6835 * NEWS: Mention new commands. Mention change to 'thread apply'.
6836
6837 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6838
6839 * thread.c (thr_try_catch_cmd): New function.
6840 (thread_apply_all_command): Handle qcs flags.
6841 (thread_apply_command): Handle qcs flags.
6842 (taas_command): New function.
6843 (tfaas_command): New function.
6844 (_initialize_thread): Update to setup the new commands 'taas
6845 and 'tfaas'. Change doc string for 'thread apply'.
6846
6847 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6848
6849 * stack.c: (trailing_outermost_frame): New function, mostly
6850 extracted from backtrace_command_1.
6851 (leading_innermost_frame): New function.
6852 (backtrace_command_1): Update to call trailing_outermost_frame.
6853 (frame_apply_command_count): New function.
6854 (frame_apply_level_command): New function.
6855 (frame_apply_all_command): New function.
6856 (frame_apply_command): New function.
6857 (faas_command): New function.
6858 (frame_cmd_list): New variable.
6859 (_initialize_stack): Update to setup the new commands 'frame apply'
6860 and 'faas'.
6861
6862 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6863
6864 * cli-utils.c (number_or_range_parser::get_number): Only handle
6865 numbers or convenience var as numbers.
6866 (parse_flags): New function.
6867 (parse_flags_qcs): New function.
6868 (number_or_range_parser::finished): Ensure parsing end is detected
6869 before end of string.
6870 * cli-utils.h (parse_flags): New function.
6871 (parse_flags_qcs): New function.
6872 (number_or_range_parser): Remove m_finished bool.
6873 (number_or_range_parser::skip_range): Set m_in_range to false.
6874
6875 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
6876
6877 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6878 on Windows.
6879
6880 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6881 Jan Kratochvil <jan.kratochvil@redhat.com>
6882 Paul Fertser <fercerpav@gmail.com>
6883 Tsutomu Seki <sekiriki@gmail.com>
6884 Pedro Alves <palves@redhat.com>
6885
6886 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6887 'unittests/parse-connection-spec-selftests.c'.
6888 (COMMON_SFILES): Add 'common/netstuff.c'.
6889 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6890 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6891 * common/netstuff.c: New file.
6892 * common/netstuff.h: New file.
6893 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6894 (wait_for_connect): Update comment. New parameter
6895 'gdb::optional<int> sock' instead of 'struct serial *scb'.
6896 Use 'sock' directly instead of 'scb->fd'.
6897 (try_connect): New function, with code from 'net_open'.
6898 (net_open): Rewrite main loop to deal with multiple
6899 sockets/addresses. Handle IPv6-style hostnames; implement
6900 support for IPv6 connections.
6901 * unittests/parse-connection-spec-selftests.c: New file.
6902
6903 2018-07-11 Pedro Alves <palves@redhat.com>
6904
6905 PR gdb/23377
6906 * remote.c (remote_target::remote_detach_pid): Call
6907 set_current_process.
6908
6909 2018-07-11 Pedro Alves <palves@redhat.com>
6910
6911 * h8300-tdep.c (h8300_gdbarch_init): Remove
6912 set_gdbarch_ecoff_reg_to_regnum calls.
6913
6914 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6915
6916 PR c++/23373
6917 * c-typeprint.c (c_type_print_base_struct_union): Don't print
6918 offsets/sizes for static members of a class/struct.
6919
6920 2018-07-11 Alan Hayward <alan.hayward@arm.com>
6921
6922 * target-descriptions.c (tdesc_register_bitsize): Rename.
6923 * target-descriptions.h (tdesc_register_bitsize): Likewise.
6924 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6925 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6926
6927 2018-07-10 Tom Tromey <tom@tromey.com>
6928
6929 * breakpoint.c (moribund_locations): Now static and a
6930 std::vector.
6931 (breakpoint_init_inferior, moribund_breakpoint_here_p)
6932 (build_bpstat_chain, update_global_location_list)
6933 (breakpoint_retire_moribund): Update.
6934 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
6935 VEC.
6936
6937 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
6938
6939 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6940 (riscv_register_reggroup_p): Use new function, remove unneeded
6941 parenthesis.
6942 (riscv_push_dummy_call): Extend assert to compare against xlen or
6943 flen based on register type.
6944
6945 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
6946
6947 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6948
6949 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
6950
6951 * remote.c (show_hardware_watchpoint_limit): New function.
6952 (show_hardware_watchpoint_length_limit): New function.
6953 (show_hardware_breakpoint_limit): New function.
6954 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6955 where appropriate, update help text.
6956
6957 2018-07-09 Tom Tromey <tom@tromey.com>
6958
6959 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6960 (CLIBS): Don't mention NAT_CLIBS.
6961
6962 2018-07-09 Tom Tromey <tom@tromey.com>
6963
6964 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6965 (LIBGDB_OBS, clean mostlyclean): Update.
6966 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6967
6968 2018-07-09 Tom Tromey <tom@tromey.com>
6969
6970 * Makefile.in (%.c: %.y): Use ECHO_YACC.
6971 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
6972 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6973
6974 2018-07-09 Tom Tromey <tom@tromey.com>
6975
6976 * Makefile.in (ALLDEPFILES): Remove exec.c.
6977 (COMMON_OBS): Remove exec.o.
6978 (COMMON_SFILES): Add exec.c.
6979
6980 2018-07-09 Tom Tromey <tom@tromey.com>
6981
6982 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6983
6984 2018-07-09 Tom Tromey <tom@tromey.com>
6985
6986 * Makefile.in (clean mostlyclean): Remove stamp-version.
6987 (version.c): Depend on stamp-version.
6988 (stamp-version): New rule, from version.c rule.
6989
6990 2018-07-09 Tom Tromey <tom@tromey.com>
6991
6992 * Makefile.in (init.c): Depend on stamp-init.
6993 (stamp-init): New rule, from init.c rule.
6994 (clean mostlyclean): Remove stamp-init.
6995
6996 2018-07-09 Tom Tromey <tom@tromey.com>
6997
6998 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6999 SUBDIR_GCC_COMPILE_SRCS.
7000
7001 2018-07-09 Tom Tromey <tom@tromey.com>
7002
7003 * Makefile.in (init.c): Remove some unused sed rules.
7004
7005 2018-07-09 Tom Tromey <tom@tromey.com>
7006
7007 * Makefile.in (TSOBS): Remove.
7008 (INIT_FILES): Update.
7009 (LIBGDB_OBS): Update.
7010 (COMMON_SFILES): Add inflow.c.
7011 (SFILES): Remove inflow.c.
7012
7013 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7014
7015 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
7016
7017 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
7018
7019 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
7020 get_saveloc_name, is_signal_frame_name, step_name,
7021 init_remote_name, create_addr_space_name,
7022 destroy_addr_space_name, search_unwind_table_name,
7023 find_dyn_list_name): Constify.
7024
7025 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
7026
7027 * darwin-nat.c (darwin_pthread_kill): New function.
7028 (darwin_resume_thread): Use darwin_pthread_kill.
7029
7030 2018-07-05 Tom de Vries <tdevries@suse.de>
7031
7032 * macroexp.c (macro_buffer) <operator=>: New member function.
7033
7034 2018-07-04 Tom Tromey <tom@tromey.com>
7035
7036 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7037
7038 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
7039
7040 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7041 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7042 * maint.c: Likewise.
7043 * top.c: Likewise.
7044
7045 2018-07-04 Joel Brobecker <brobecker@adacore.com>
7046
7047 * NEWS: Create a new section for the next release branch.
7048 Rename the section of the current branch, now that it has
7049 been cut.
7050
7051 2018-07-04 Joel Brobecker <brobecker@adacore.com>
7052
7053 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7054 * version.in: Bump version to 8.2.50.DATE-git.
7055
7056 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
7057 Pedro Alves <palves@redhat.com>
7058
7059 * linux-nat.c (linux_init_ptrace): Rename to ...
7060 (linux_init_ptrace_procfs): ... this. Call
7061 linux_proc_init_warnings.
7062 (linux_nat_target::post_attach)
7063 (linux_nat_target::post_startup_inferior): Adjust.
7064 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7065 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7066
7067 2018-07-04 Tom de Vries <tdevries@suse.de>
7068
7069 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7070 check ...
7071 (read_comp_unit_head): ... here.
7072
7073 2018-07-03 Tom Tromey <tom@tromey.com>
7074
7075 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7076 (stop_tracing, tstatus_command)
7077 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7078 (print_one_static_tracepoint_marker): Update.
7079 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7080 std::vector.
7081 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
7082 VEC.
7083 (all_tracepoints, static_tracepoints_here): Return std::vector.
7084
7085 2018-07-03 Tom Tromey <tom@tromey.com>
7086
7087 * common/ptid.c (ptid_equal): Remove.
7088 * common/ptid.h (ptid_equal): Don't declare.
7089 * ada-tasks.c: Update.
7090 * breakpoint.c: Update.
7091 * common/agent.c: Update.
7092 * corelow.c: Update.
7093 * darwin-nat-info.c: Update.
7094 * darwin-nat.c: Update.
7095 * dcache.c: Update.
7096 * dtrace-probe.c: Update.
7097 * dummy-frame.c: Update.
7098 * fbsd-nat.c: Update.
7099 * frame.c: Update.
7100 * gdbthread.h: Update.
7101 * gnu-nat.c: Update.
7102 * go32-nat.c: Update.
7103 * inf-loop.c: Update.
7104 * inf-ptrace.c: Update.
7105 * infcall.c: Update.
7106 * infcmd.c: Update.
7107 * inflow.c: Update.
7108 * infrun.c: Update.
7109 * linux-fork.c: Update.
7110 * linux-nat.c: Update.
7111 * linux-thread-db.c: Update.
7112 * mi/mi-cmd-var.c: Update.
7113 * mi/mi-interp.c: Update.
7114 * mi/mi-main.c: Update.
7115 * nto-procfs.c: Update.
7116 * ppc-linux-tdep.c: Update.
7117 * procfs.c: Update.
7118 * python/py-inferior.c: Update.
7119 * python/py-record-btrace.c: Update.
7120 * python/py-record.c: Update.
7121 * ravenscar-thread.c: Update.
7122 * regcache.c: Update.
7123 * remote-sim.c: Update.
7124 * remote.c: Update.
7125 * sol-thread.c: Update.
7126 * solib.c: Update.
7127 * target.c: Update.
7128 * tui/tui-stack.c: Update.
7129 * varobj.c: Update.
7130 * windows-nat.c: Update.
7131 * windows-tdep.c: Update.
7132
7133 2018-07-03 Tom Tromey <tom@tromey.com>
7134
7135 * common/ptid.c (ptid_match): Remove.
7136 * common/ptid.h (ptid_match): Don't declare.
7137 * fbsd-nat.c: Update.
7138 * infcmd.c: Update.
7139 * infrun.c: Update.
7140 * linux-nat.c: Update.
7141 * record-btrace.c: Update.
7142 * regcache.c: Update.
7143 * remote.c: Update.
7144
7145 2018-07-03 Tom Tromey <tom@tromey.com>
7146
7147 * common/ptid.c (ptid_tid_p): Remove.
7148 * common/ptid.h (ptid_tid_p): Don't declare.
7149 * sol-thread.c: Update.
7150
7151 2018-07-03 Tom Tromey <tom@tromey.com>
7152
7153 * common/ptid.c (ptid_lwp_p): Remove.
7154 * common/ptid.h (ptid_lwp_p): Don't declare.
7155 * fbsd-nat.c: Update.
7156 * linux-nat.c: Update.
7157 * nat/linux-procfs.c: Update.
7158 * nat/x86-linux-dregs.c: Update.
7159 * sol-thread.c: Update.
7160
7161 2018-07-03 Tom Tromey <tom@tromey.com>
7162
7163 * common/ptid.c (ptid_is_pid): Remove.
7164 * common/ptid.h (ptid_is_pid): Don't declare.
7165 * infrun.c: Update.
7166 * linux-nat.c: Update.
7167 * mi/mi-interp.c: Update.
7168 * remote.c: Update.
7169 * thread.c: Update.
7170
7171 2018-07-03 Tom Tromey <tom@tromey.com>
7172
7173 * common/ptid.c (ptid_get_tid): Remove.
7174 * common/ptid.h (ptid_get_tid): Don't declare.
7175 * ada-tasks.c: Update.
7176 * aix-thread.c: Update.
7177 * bsd-uthread.c: Update.
7178 * darwin-nat.c: Update.
7179 * fbsd-nat.c: Update.
7180 * i386-darwin-nat.c: Update.
7181 * infrun.c: Update.
7182 * linux-tdep.c: Update.
7183 * nto-procfs.c: Update.
7184 * ppc-ravenscar-thread.c: Update.
7185 * python/py-infthread.c: Update.
7186 * ravenscar-thread.c: Update.
7187 * sol-thread.c: Update.
7188 * sparc-ravenscar-thread.c: Update.
7189 * windows-nat.c: Update.
7190
7191 2018-07-03 Tom Tromey <tom@tromey.com>
7192
7193 * common/ptid.c (ptid_get_lwp): Remove.
7194 * common/ptid.h (ptid_get_lwp): Don't declare.
7195 * aarch64-linux-nat.c: Update.
7196 * ada-tasks.c: Update.
7197 * aix-thread.c: Update.
7198 * amd64-linux-nat.c: Update.
7199 * arm-linux-nat.c: Update.
7200 * corelow.c: Update.
7201 * fbsd-nat.c: Update.
7202 * fbsd-tdep.c: Update.
7203 * gnu-nat.c: Update.
7204 * i386-cygwin-tdep.c: Update.
7205 * i386-gnu-nat.c: Update.
7206 * i386-linux-nat.c: Update.
7207 * ia64-linux-nat.c: Update.
7208 * inf-ptrace.c: Update.
7209 * infrun.c: Update.
7210 * linux-fork.c: Update.
7211 * linux-nat.c: Update.
7212 * linux-tdep.c: Update.
7213 * linux-thread-db.c: Update.
7214 * mips-linux-nat.c: Update.
7215 * nat/aarch64-linux-hw-point.c: Update.
7216 * nat/aarch64-linux.c: Update.
7217 * nat/linux-btrace.c: Update.
7218 * nat/linux-osdata.c: Update.
7219 * nat/linux-procfs.c: Update.
7220 * nat/x86-linux-dregs.c: Update.
7221 * obsd-nat.c: Update.
7222 * ppc-fbsd-nat.c: Update.
7223 * ppc-linux-nat.c: Update.
7224 * procfs.c: Update.
7225 * python/py-infthread.c: Update.
7226 * ravenscar-thread.c: Update.
7227 * remote.c: Update.
7228 * s390-linux-nat.c: Update.
7229 * sol-thread.c: Update.
7230 * sol2-tdep.c: Update.
7231 * spu-linux-nat.c: Update.
7232 * x86-linux-nat.c: Update.
7233 * xtensa-linux-nat.c: Update.
7234
7235 2018-07-03 Tom Tromey <tom@tromey.com>
7236
7237 * common/ptid.c (ptid_get_pid): Remove.
7238 * common/ptid.h (ptid_get_pid): Don't declare.
7239 * aarch64-linux-nat.c: Update.
7240 * ada-lang.c: Update.
7241 * aix-thread.c: Update.
7242 * alpha-bsd-nat.c: Update.
7243 * amd64-fbsd-nat.c: Update.
7244 * amd64-linux-nat.c: Update.
7245 * arm-linux-nat.c: Update.
7246 * arm-nbsd-nat.c: Update.
7247 * auxv.c: Update.
7248 * break-catch-syscall.c: Update.
7249 * breakpoint.c: Update.
7250 * bsd-uthread.c: Update.
7251 * corelow.c: Update.
7252 * ctf.c: Update.
7253 * darwin-nat.c: Update.
7254 * fbsd-nat.c: Update.
7255 * fbsd-tdep.c: Update.
7256 * gcore.c: Update.
7257 * gnu-nat.c: Update.
7258 * hppa-nbsd-nat.c: Update.
7259 * hppa-obsd-nat.c: Update.
7260 * i386-fbsd-nat.c: Update.
7261 * ia64-linux-nat.c: Update.
7262 * inf-ptrace.c: Update.
7263 * infcmd.c: Update.
7264 * inferior.c: Update.
7265 * inferior.h: Update.
7266 * inflow.c: Update.
7267 * infrun.c: Update.
7268 * linux-fork.c: Update.
7269 * linux-nat.c: Update.
7270 * linux-tdep.c: Update.
7271 * linux-thread-db.c: Update.
7272 * m68k-bsd-nat.c: Update.
7273 * mi/mi-interp.c: Update.
7274 * mi/mi-main.c: Update.
7275 * mips-linux-nat.c: Update.
7276 * mips-nbsd-nat.c: Update.
7277 * mips64-obsd-nat.c: Update.
7278 * nat/aarch64-linux-hw-point.c: Update.
7279 * nat/aarch64-linux.c: Update.
7280 * nat/linux-btrace.c: Update.
7281 * nat/linux-osdata.c: Update.
7282 * nat/linux-procfs.c: Update.
7283 * nat/x86-linux-dregs.c: Update.
7284 * nto-procfs.c: Update.
7285 * obsd-nat.c: Update.
7286 * ppc-linux-nat.c: Update.
7287 * ppc-nbsd-nat.c: Update.
7288 * ppc-obsd-nat.c: Update.
7289 * proc-service.c: Update.
7290 * procfs.c: Update.
7291 * python/py-inferior.c: Update.
7292 * python/py-infthread.c: Update.
7293 * ravenscar-thread.c: Update.
7294 * record.c: Update.
7295 * remote-sim.c: Update.
7296 * remote.c: Update.
7297 * rs6000-nat.c: Update.
7298 * s390-linux-nat.c: Update.
7299 * sh-nbsd-nat.c: Update.
7300 * sol-thread.c: Update.
7301 * sparc-nat.c: Update.
7302 * sparc64-tdep.c: Update.
7303 * spu-linux-nat.c: Update.
7304 * spu-tdep.c: Update.
7305 * target-debug.h: Update.
7306 * target.c: Update.
7307 * thread.c: Update.
7308 * tid-parse.c: Update.
7309 * tracefile-tfile.c: Update.
7310 * vax-bsd-nat.c: Update.
7311 * windows-nat.c: Update.
7312 * x86-linux-nat.c: Update.
7313 * x86-nat.c: Update.
7314
7315 2018-07-03 Tom Tromey <tom@tromey.com>
7316
7317 * common/ptid.c (pid_to_ptid): Remove.
7318 * common/ptid.h (pid_to_ptid): Don't declare.
7319 * aix-thread.c: Update.
7320 * arm-linux-nat.c: Update.
7321 * common/ptid.c: Update.
7322 * common/ptid.h: Update.
7323 * corelow.c: Update.
7324 * ctf.c: Update.
7325 * darwin-nat.c: Update.
7326 * fbsd-nat.c: Update.
7327 * fork-child.c: Update.
7328 * gnu-nat.c: Update.
7329 * go32-nat.c: Update.
7330 * inf-ptrace.c: Update.
7331 * infcmd.c: Update.
7332 * inferior.c: Update.
7333 * infrun.c: Update.
7334 * linux-fork.c: Update.
7335 * linux-nat.c: Update.
7336 * nat/aarch64-linux-hw-point.c: Update.
7337 * nat/fork-inferior.c: Update.
7338 * nat/x86-linux-dregs.c: Update.
7339 * nto-procfs.c: Update.
7340 * obsd-nat.c: Update.
7341 * procfs.c: Update.
7342 * progspace.c: Update.
7343 * remote.c: Update.
7344 * rs6000-nat.c: Update.
7345 * s390-linux-nat.c: Update.
7346 * sol-thread.c: Update.
7347 * spu-linux-nat.c: Update.
7348 * target.c: Update.
7349 * top.c: Update.
7350 * tracefile-tfile.c: Update.
7351 * windows-nat.c: Update.
7352
7353 2018-07-03 Tom Tromey <tom@tromey.com>
7354
7355 * common/ptid.h (ptid_build): Don't declare.
7356 * common/ptid.c (ptid_build): Remove.
7357 * aix-thread.c: Update.
7358 * bsd-kvm.c: Update.
7359 * bsd-uthread.c: Update.
7360 * common/agent.c: Update.
7361 * common/ptid.c: Update.
7362 * common/ptid.h: Update.
7363 * corelow.c: Update.
7364 * darwin-nat.c: Update.
7365 * fbsd-nat.c: Update.
7366 * gnu-nat.c: Update.
7367 * linux-fork.c: Update.
7368 * linux-nat.c: Update.
7369 * linux-thread-db.c: Update.
7370 * nat/linux-osdata.c: Update.
7371 * nat/linux-procfs.c: Update.
7372 * nto-procfs.c: Update.
7373 * obsd-nat.c: Update.
7374 * proc-service.c: Update.
7375 * procfs.c: Update.
7376 * ravenscar-thread.c: Update.
7377 * remote-sim.c: Update.
7378 * remote.c: Update.
7379 * sol-thread.c: Update.
7380 * target.c: Update.
7381 * windows-nat.c: Update.
7382
7383 2018-07-03 Tom Tromey <tom@tromey.com>
7384
7385 * infrun.c (follow_exec): Use exit_inferior_silent.
7386 * inferior.c (exit_inferior_num_silent): Remove.
7387 * inferior.h (exit_inferior_num_silent): Don't declare.
7388
7389 2018-07-03 Tom Tromey <tom@tromey.com>
7390
7391 PR cli/23340:
7392 * darwin-nat.c (darwin_attach_pid): Reset inferior and
7393 inferior_ptid on error.
7394
7395 2018-07-02 Maciej W. Rozycki <macro@mips.com>
7396 Simon Marchi <simon.marchi@polymtl.ca>
7397
7398 PR tdep/8282
7399 * disasm.h (gdb_disassembler): Add
7400 `m_disassembler_options_holder'. member
7401 * disasm.c (get_all_disassembler_options): New function.
7402 (gdb_disassembler::gdb_disassembler): Use it.
7403 (gdb_buffered_insn_length_init_dis): Likewise.
7404 (gdb_buffered_insn_length): Adjust accordingly.
7405 (set_disassembler_options): Handle options with arguments.
7406 (show_disassembler_options_sfunc): Likewise. Add a leading new
7407 line if showing options with descriptions.
7408 (disassembler_options_completer): Adapt to using the
7409 `disasm_options_and_args_t' structure.
7410 * mips-tdep.c (mips_disassembler_options): New variable.
7411 (mips_disassembler_options_o32): Likewise.
7412 (mips_disassembler_options_n32): Likewise.
7413 (mips_disassembler_options_n64): Likewise.
7414 (gdb_print_insn_mips): Don't set `disassembler_options'.
7415 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7416 functions.
7417 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7418 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
7419 `gdbarch_disassembler_options_implicit' and
7420 `gdbarch_valid_disassembler_options'.
7421 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7422 `disasm_options_and_args_t' structure.
7423 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7424 method.
7425 (valid_disassembler_options): Switch from `disasm_options_t' to
7426 the `disasm_options_and_args_t' structure.
7427 * NEWS: Document `set disassembler-options' support for the MIPS
7428 target.
7429 * gdbarch.h: Regenerate.
7430 * gdbarch.c: Regenerate.
7431
7432 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
7433
7434 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7435
7436 2018-06-29 Joel Brobecker <brobecker@adacore.com>
7437
7438 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7439 parameter in call to amd64_target_description.
7440 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7441 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7442 (amd64fbsd_init_abi): Likewise.
7443 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7444 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7445 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7446 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7447
7448 2018-06-29 Pedro Alves <palves@redhat.com>
7449
7450 * gdb/amd64-tdep.h (amd64_create_target_description): Add
7451 "segments" parameter.
7452 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7453 (_initialize_amd64_tdep): Update call to
7454 amd64_create_target_description.
7455 (amd64_target_description): Add "segments" parameter. Adjust
7456 the implementation to use it.
7457 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7458 call to amd64_create_target_description.
7459 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7460 * gdb/arch/amd64.h (amd64_create_target_description): Add
7461 "segments" register.
7462 * gdb/arch/amd64.c (amd64_create_target_description): Add
7463 "segments" parameter. Call create_feature_i386_64bit_segments
7464 only if SEGMENTS is true.
7465 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7466 call to amd64_create_target_description.
7467
7468 2018-06-29 Pedro Alves <palves@redhat.com>
7469
7470 * thread.c (thread_target_id_str): New, factored out from ...
7471 (print_thread_info_1): ... here. Use it to compute the max
7472 "Target Id" column width.
7473
7474 2018-06-29 Pedro Alves <palves@redhat.com>
7475
7476 * remote.c (remote_target::extra_thread_info): Delete
7477 'display_buf' and 'n' locals. from the cache, regardless of
7478 packet mechanims is in use. Use cache for qThreadExtra and qP
7479 methods too.
7480
7481 2018-06-29 Pedro Alves <palves@redhat.com>
7482
7483 * blockframe.c (find_pc_sect_containing_function): New function.
7484 * breakpoint.c (print_breakpoint_location): Don't call
7485 find_pc_sect_function.
7486 * linespec.c (create_sals_line_offset): Record the location's
7487 symbol in the sal.
7488 * linespec.c (convert_address_location_to_sals): Fill in sal's
7489 symbol with find_pc_sect_containing_function.
7490 * symtab.c (find_function_start_sal): Rename to ...
7491 (find_function_start_sal_1): ... this.
7492 (find_function_start_sal): Reimplement as wrapper around
7493 find_function_start_sal_1, and use
7494 find_pc_sect_containing_function to fill in the sal's symbol.
7495 (find_function_start_sal(symbol*, bool)): Adjust.
7496 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7497 comments.
7498 (find_pc_sect_containing_function): Declare.
7499
7500 2018-06-29 Pedro Alves <palves@redhat.com>
7501
7502 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7503 true if the the location has no symbol.
7504
7505 2018-06-28 Tom Tromey <tom@tromey.com>
7506
7507 * NEWS: Mention --enable-codesign.
7508 * silent-rules.mk (ECHO_SIGN): New variable.
7509 * configure.ac: Add --enable-codesign.
7510 * configure: Rebuild.
7511 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7512 (gdb$(EXEEXT)): Optionally invoke codesign.
7513
7514 2018-06-28 Pedro Alves <palves@redhat.com>
7515
7516 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7517 comments.
7518 (switch_to_thread_no_regs): Adjust comment.
7519 * infcmd.c (stop_pc): Delete.
7520 (post_create_inferior, info_program_command): Replace references
7521 to stop_pc with references to thread_info->suspend.stop_pc.
7522 * inferior.h (stop_pc): Delete declaration.
7523 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7524 (handle_inferior_event_1, handle_signal_stop)
7525 (process_event_stop_test, keep_going_stepped_thread)
7526 (handle_step_into_function, handle_step_into_function_backward)
7527 (print_stop_location): Replace references to stop_pc with
7528 references to thread_info->suspend.stop_pc.
7529 (struct infcall_suspend_state) <stop_pc>: Delete field.
7530 (save_infcall_suspend_state, restore_infcall_suspend_state):
7531 Remove references to inf_stat->stop_pc.
7532 * linux-fork.c (fork_load_infrun_state): Likewise.
7533 * record-btrace.c (record_btrace_set_replay): Likewise.
7534 * record-full.c (record_full_goto_entry): Likewise.
7535 * remote.c (print_one_stopped_thread): Likewise.
7536 * target.c (target_resume): Extend comment.
7537 * thread.c (set_executing_thread): New.
7538 (set_executing): Use it.
7539 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7540 Remove references to stop_pc.
7541
7542 2018-06-28 Pedro Alves <palves@redhat.com>
7543
7544 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7545 Moving fetching stop_pc until after ecs->event_thread is refreshed.
7546
7547 2018-06-28 Tom Tromey <tom@tromey.com>
7548
7549 * coffread.c (coff_symfile_finish): Update.
7550 * xcoffread.c (xcoff_symfile_finish): Update.
7551 * elfread.c (elf_symfile_finish): Update.
7552 * symfile.h (dwarf2_free_objfile): Don't declare.
7553 * dwarf2read.c (_initialize_dwarf2_read): Use
7554 register_objfile_data_with_cleanup.
7555 (dwarf2_free_objfile): Now static. Change signature.
7556
7557 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7558
7559 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7560 option "-o" to add-symbol-file-load to add an offset to each
7561 section's load address.
7562 * symfile.c (set_objfile_default_section_offset): New function.
7563
7564 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7565
7566 * symfile.c (add_symbol_file_command): Make sure that sections
7567 with the same name are sorted in the same order.
7568
7569 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7570
7571 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7572 require the second argument. If omitted, load sections at the
7573 addresses specified in the file.
7574
7575 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7576
7577 * symfile.c (symbol_file_command, symbol_file_add_main_1)
7578 (_initialize_symfile): Add option "-o" to symbol-file to add an
7579 offset to each section of the symbol file.
7580
7581 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7582
7583 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7584
7585 2018-06-27 Tom Tromey <tom@tromey.com>
7586
7587 * stack.c (_initialize_stack): Update "func" help text.
7588
7589 2018-06-27 Tom Tromey <tom@tromey.com>
7590
7591 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7592 std::vector.
7593 (unwind_infopy_str, pyuw_create_unwind_info)
7594 (unwind_infopy_add_saved_register, pyuw_sniffer)
7595 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7596 Update.
7597 (struct saved_reg): Add constructor.
7598 <value>: Now a gdbpy_ref<>.
7599
7600 2018-06-27 Tom Tromey <tom@tromey.com>
7601
7602 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7603
7604 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7605
7606 * gdb-gdb.py.in: Format using autopep8.
7607
7608 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7609
7610 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7611 (type_lookup_function): Recognize CORE_ADDR values.
7612
7613 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7614
7615 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7616 print tag_name.
7617
7618 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7619
7620 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7621 <__lt__>: Add.
7622
7623 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7624
7625 * gdb-gdb.py: Move to...
7626 * gdb-gdb.py.in: ... here.
7627 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7628 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7629 dependencies.
7630 (distclean): Remove gdb-gdb.py when cleaning.
7631 (gdb-gdb.py, gdb-gdb.gdb): New rules.
7632 * configure: Re-generate.
7633
7634 2018-06-27 Pedro Alves <palves@redhat.com>
7635
7636 * proc-service.c (get_ps_regcache): New.
7637 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7638 (ps_lsetfpregs): Use it.
7639
7640 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
7641
7642 PR gdb/21695
7643 * dwarf2read.c (lnp_state_machine::check_line_address): Update
7644 declaration.
7645 (dwarf_decode_lines_1): Adjust.
7646
7647 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7648
7649 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7650 override.
7651 <info_proc>: Likewise.
7652
7653 2018-06-26 Joel Brobecker <brobecker@adacore.com>
7654
7655 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7656 to windows_fetch_one_register, and only handle the case of
7657 fetching one register. Move the code that reloads the context
7658 and iterates over all registers if R is negative to...
7659 (windows_nat_target::fetch_registers): ... here.
7660 (do_windows_store_inferior_registers): Rename to
7661 windows_store_one_register, and only handle the case of storing
7662 one register. Move the code that handles the case where r is
7663 negative to...
7664 (windows_nat_target::store_registers) ... here.
7665
7666 2018-06-26 Tom Tromey <tom@tromey.com>
7667
7668 PR rust/22574:
7669 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7670 * rust-lang.c (rust_print_struct_def): Add podata parameter.
7671 Update.
7672 (rust_internal_print_type): Add podata parameter.
7673 (rust_print_type): Update.
7674
7675 2018-06-26 Tom Tromey <tom@tromey.com>
7676
7677 * typeprint.h (struct print_offset_data) <update, finish,
7678 maybe_print_hole>: New methods.
7679 <indentation>: New constant.
7680 * typeprint.c (print_offset_data::indentation): Define.
7681 (print_offset_data::maybe_print_hole, print_offset_data::update)
7682 (print_offset_data::finish): Move from c-typeprint.c and rename.
7683 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7684 (print_spaces_filtered_with_print_options): Update.
7685 (c_print_type_union_field_offset, maybe_print_hole)
7686 (c_print_type_struct_field_offset): Move to typeprint.c and
7687 rename.
7688 (c_type_print_base_struct_union): Update.
7689
7690 2018-06-25 Pedro Alves <palves@redhat.com>
7691
7692 * gdbthread.h (thread_info_ref, delete_thread)
7693 (delete_thread_silent, first_thread_of_inferior)
7694 (any_thread_of_inferior, switch_to_thread)
7695 (enable_thread_stack_temporaries)
7696 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7697 (get_last_thread_stack_temporary)
7698 (value_in_thread_stack_temporaries, can_access_registers_thread):
7699 Spell out "struct thread_info" instead of just "thread_info".
7700 * inferior.h (notice_new_inferior): Likewise.
7701
7702 2018-06-25 Pedro Alves <palves@redhat.com>
7703
7704 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7705 pass thread_info pointer to delete_thread.
7706 (windows_nat_target::detach): Pass inferior pointer to
7707 detach_inferior.
7708 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7709 delete_thread.
7710 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7711 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7712 and pass a thread_info pointer to delete_thread.
7713 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7714 pass thread_info pointer to delete_thread.
7715 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7716 delete_thread_silent call.
7717 * procfs.c (procfs_target::detach): Pass inferior pointer to
7718 detach_inferior.
7719 (procfs_target::wait): Pass thread_info pointer to delete_thread.
7720 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7721 delete_thread_silent call.
7722 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7723 pass thread_info pointer to delete_thread.
7724 (windows_nat_target::detach): Pass inferior pointer to
7725 delete_inferior.
7726
7727 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7728
7729 * regcache.c (readable_regcache::read_part): Fix asserts.
7730 (reg_buffer::raw_collect_part): New function.
7731 (regcache::write_part): Fix asserts.
7732 (reg_buffer::raw_supply_part): New function.
7733 (regcache::transfer_regset_register): New helper function.
7734 (regcache::transfer_regset): Call new functions.
7735 (regcache_supply_regset): Use gdb_byte*.
7736 (regcache::supply_regset): Likewise.
7737 (regcache_collect_regset): Likewise.
7738 (regcache::collect_regset): Likewise.
7739 * regcache.h (reg_buffer::raw_collect_part): New declaration.
7740 (reg_buffer::raw_supply_part): Likewise.
7741 (regcache::transfer_regset_register): Likewise.
7742 (regcache::transfer_regset): Use gdb_byte*.
7743
7744 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7745
7746 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7747
7748 2018-06-21 Pedro Alves <palves@redhat.com>
7749
7750 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7751 instead of a ptid_t. All callers adjusted.
7752 * ada-tasks.c (ada_get_task_number): Likewise. All callers
7753 adjusted.
7754 (print_ada_task_info, display_current_task_id, task_command_1):
7755 Adjust.
7756 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7757 inferior_thread.
7758 (breakpoint_kind): Adjust.
7759 (remove_breakpoints_pid): Rename to ...
7760 (remove_breakpoints_inf): ... this. Adjust to take an inferior
7761 pointer. All callers adjusted.
7762 (bpstat_clear_actions): Use inferior_thread.
7763 (get_bpstat_thread): New.
7764 (bpstat_do_actions): Use it.
7765 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7766 to take a thread_info pointer. All callers adjusted.
7767 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7768 (breakpoint_re_set_thread): Use inferior_thread.
7769 * breakpoint.h (struct inferior): Forward declare.
7770 (bpstat_stop_status): Update.
7771 (remove_breakpoints_pid): Delete.
7772 (remove_breakpoints_inf): New.
7773 * bsd-uthread.c (bsd_uthread_target::wait)
7774 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7775 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7776 (maint_btrace_packet_history_cmd)
7777 (maint_btrace_clear_packet_history_cmd): Adjust.
7778 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7779 inferior_thread.
7780 * cli/cli-interp.c: Include "inferior.h".
7781 * common/refcounted-object.h (struct
7782 refcounted_object_ref_policy): New.
7783 * compile/compile-object-load.c: Include gdbthread.h.
7784 (store_regs): Use inferior_thread.
7785 * corelow.c (core_target::close): Use current_inferior.
7786 (core_target_open): Adjust to use first_thread_of_inferior and use
7787 the current inferior.
7788 * ctf.c (ctf_target::close): Adjust to use current_inferior.
7789 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7790 <thread>: ... this new field. All references adjusted.
7791 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7792 Take a thread_info pointer instead of a ptid_t.
7793 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7794 (dummy_frame_discard, register_dummy_frame_dtor): Take a
7795 thread_info pointer instead of a ptid_t.
7796 * elfread.c: Include "inferior.h".
7797 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7798 Use inferior_thread.
7799 * eval.c (evaluate_subexp): Likewise.
7800 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7801 inferior_thread.
7802 * gdb_proc_service.h (struct thread_info): Forward declare.
7803 (struct ps_prochandle) <ptid>: Delete, replaced by ...
7804 <thread>: ... this new field. All references adjusted.
7805 * gdbarch.h, gdbarch.c: Regenerate.
7806 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7807 'thread' parameter. All implementations and callers adjusted.
7808 * gdbthread.h (thread_info) <set_running>: New method.
7809 (delete_thread, delete_thread_silent): Take a thread_info pointer
7810 instead of a ptid.
7811 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7812 (first_thread_of_process): Delete, replaced by ...
7813 (first_thread_of_inferior): ... this new function. All callers
7814 adjusted.
7815 (any_live_thread_of_process): Delete, replaced by ...
7816 (any_live_thread_of_inferior): ... this new function. All callers
7817 adjusted.
7818 (switch_to_thread, switch_to_no_thread): Declare.
7819 (is_executing): Delete.
7820 (enable_thread_stack_temporaries): Update comment.
7821 <enable_thread_stack_temporaries>: Take a thread_info pointer
7822 instead of a ptid_t. Incref the thread.
7823 <~enable_thread_stack_temporaries>: Decref the thread.
7824 <m_ptid>: Delete
7825 <m_thr>: New.
7826 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7827 (get_last_thread_stack_temporary)
7828 (value_in_thread_stack_temporaries, can_access_registers_thread):
7829 Take a thread_info pointer instead of a ptid_t. All callers
7830 adjusted.
7831 * infcall.c (get_call_return_value): Use inferior_thread.
7832 (run_inferior_call): Work with thread pointers instead of ptid_t.
7833 (call_function_by_hand_dummy): Work with thread pointers instead
7834 of ptid_t. Use thread_info_ref.
7835 * infcmd.c (proceed_thread_callback): Access thread's state
7836 directly.
7837 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7838 access thread's state directly.
7839 (continue_command): Use inferior_thread.
7840 (info_program_command): Use find_thread_ptid and access thread
7841 state directly.
7842 (proceed_after_attach_callback): Use thread state directly.
7843 (notice_new_inferior): Take a thread_info pointer instead of a
7844 ptid_t. All callers adjusted.
7845 (exit_inferior): Take an inferior pointer instead of a pid. All
7846 callers adjusted.
7847 (exit_inferior_silent): New.
7848 (detach_inferior): Delete.
7849 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7850 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7851 (detach_inferior_command, kill_inferior_command): Use
7852 find_inferior_id instead of valid_gdb_inferior_id and
7853 gdb_inferior_id_to_pid.
7854 (inferior_command): Use inferior and thread pointers.
7855 * inferior.h (struct thread_info): Forward declare.
7856 (notice_new_inferior): Take a thread_info pointer instead of a
7857 ptid_t. All callers adjusted.
7858 (detach_inferior): Delete declaration.
7859 (exit_inferior, exit_inferior_silent): Take an inferior pointer
7860 instead of a pid. All callers adjusted.
7861 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7862 (valid_gdb_inferior_id): Delete.
7863 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7864 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7865 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7866 ...
7867 <inf>: ... this new field.
7868 <step_ptid>: Delete, replaced by ...
7869 <step_thread>: ... this new field.
7870 (get_displaced_stepping_state): Take an inferior pointer instead
7871 of a pid. All callers adjusted.
7872 (displaced_step_in_progress_any_inferior): Adjust.
7873 (displaced_step_in_progress_thread): Take a thread pointer instead
7874 of a ptid_t. All callers adjusted.
7875 (displaced_step_in_progress, add_displaced_stepping_state): Take
7876 an inferior pointer instead of a pid. All callers adjusted.
7877 (get_displaced_step_closure_by_addr): Adjust.
7878 (remove_displaced_stepping_state): Take an inferior pointer
7879 instead of a pid. All callers adjusted.
7880 (displaced_step_prepare_throw, displaced_step_prepare)
7881 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7882 All callers adjusted.
7883 (start_step_over): Adjust.
7884 (infrun_thread_ptid_changed): Remove bit updating ptids in the
7885 displaced step queue.
7886 (do_target_resume): Adjust.
7887 (fetch_inferior_event): Use inferior_thread.
7888 (context_switch, get_inferior_stop_soon): Take an
7889 execution_control_state pointer instead of a ptid_t. All callers
7890 adjusted.
7891 (switch_to_thread_cleanup): Delete.
7892 (stop_all_threads): Use scoped_restore_current_thread.
7893 * inline-frame.c: Include "gdbthread.h".
7894 (inline_state) <inline_state>: Take a thread pointer instead of a
7895 ptid_t. All callers adjusted.
7896 <ptid>: Delete, replaced by ...
7897 <thread>: ... this new field.
7898 (find_inline_frame_state): Take a thread pointer instead of a
7899 ptid_t. All callers adjusted.
7900 (skip_inline_frames, step_into_inline_frame)
7901 (inline_skipped_frames, inline_skipped_symbol): Take a thread
7902 pointer instead of a ptid_t. All callers adjusted.
7903 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7904 (inline_skipped_frames, inline_skipped_symbol): Likewise.
7905 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7906 pointers directly.
7907 * linux-nat.c (get_detach_signal): Likewise.
7908 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7909 (thread_db_notice_clone): Adjust.
7910 (thread_db_find_new_threads_silently)
7911 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7912 a thread pointer instead of a ptid_t. All callers adjusted.
7913 * mi/mi-cmd-var.c: Include "inferior.h".
7914 (mi_cmd_var_update_iter): Update to use thread pointers.
7915 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7916 inferior directly.
7917 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7918 out to ...
7919 (mi_output_running): ... this new function.
7920 (mi_on_resume_1): Adjust to use it.
7921 (mi_user_selected_context_changed): Adjust to use inferior_thread.
7922 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7923 directly.
7924 (interrupt_thread_callback): : Adjust to use thread and inferior
7925 pointers.
7926 * proc-service.c: Include "gdbthread.h".
7927 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7928 * progspace-and-thread.c: Include "inferior.h".
7929 * progspace.c: Include "inferior.h".
7930 * python/py-exitedevent.c (create_exited_event_object): Adjust to
7931 hold a reference to an inferior_object.
7932 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7933 inferior_thread.
7934 * python/py-inferior.c (struct inferior_object): Give the type a
7935 tag name instead of a typedef.
7936 (python_on_normal_stop): No need to check if the current thread is
7937 listed.
7938 (inferior_to_inferior_object): Change return type to
7939 inferior_object. All callers adjusted.
7940 (find_thread_object): Delete, bits factored out to ...
7941 (thread_to_thread_object): ... this new function.
7942 * python/py-infthread.c (create_thread_object): Use
7943 inferior_to_inferior_object.
7944 (thpy_is_stopped): Use thread pointer directly.
7945 (gdbpy_selected_thread): Use inferior_thread.
7946 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7947 field, replaced with ...
7948 <thread>: ... this new field. All users adjusted.
7949 (btpy_insn_or_gap_new): Drop const.
7950 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
7951 callers adjusted.
7952 * python/py-record.c: Include "gdbthread.h".
7953 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7954 a ptid_t. All callers adjusted.
7955 (gdbpy_current_recording): Use inferior_thread.
7956 * python/py-record.h (recpy_record_object) <ptid>: Delete
7957 field, replaced with ...
7958 <thread>: ... this new field. All users adjusted.
7959 (recpy_element_object) <ptid>: Delete
7960 field, replaced with ...
7961 <thread>: ... this new field. All users adjusted.
7962 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7963 a ptid_t. All callers adjusted.
7964 * python/py-threadevent.c: Include "gdbthread.h".
7965 (get_event_thread): Use thread_to_thread_object.
7966 * python/python-internal.h (struct inferior_object): Forward
7967 declare.
7968 (find_thread_object, find_inferior_object): Delete declarations.
7969 (thread_to_thread_object, inferior_to_inferior_object): New
7970 declarations.
7971 * record-btrace.c: Include "inferior.h".
7972 (require_btrace_thread): Use inferior_thread.
7973 (record_btrace_frame_sniffer)
7974 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7975 (get_thread_current_frame): Use scoped_restore_current_thread and
7976 switch_to_thread.
7977 (get_thread_current_frame): Use thread pointer directly.
7978 (record_btrace_replay_at_breakpoint): Use thread's inferior
7979 pointer directly.
7980 * record-full.c: Include "inferior.h".
7981 * regcache.c: Include "gdbthread.h".
7982 (get_thread_arch_regcache): Use the inferior's address space
7983 directly.
7984 (get_thread_regcache, registers_changed_thread): New.
7985 * regcache.h (get_thread_regcache(thread_info *thread)): New
7986 overload.
7987 (registers_changed_thread): New.
7988 (remote_target) <remote_detach_1>: Swap order of parameters.
7989 (remote_add_thread): <remote_add_thread>: Return the new thread.
7990 (get_remote_thread_info(ptid_t)): New overload.
7991 (remote_target::remote_notice_new_inferior): Use thread pointers
7992 directly.
7993 (remote_target::process_initial_stop_replies): Use
7994 thread_info::set_running.
7995 (remote_target::remote_detach_1, remote_target::detach)
7996 (extended_remote_target::detach): Adjust.
7997 * stack.c (frame_show_address): Use inferior_thread.
7998 * target-debug.h (target_debug_print_thread_info_pp): New.
7999 * target-delegates.c: Regenerate.
8000 * target.c (default_thread_address_space): Delete.
8001 (memory_xfer_partial_1): Use current_inferior.
8002 (target_detach): Use current_inferior.
8003 (target_thread_address_space): Delete.
8004 (generic_mourn_inferior): Use current_inferior.
8005 * target.h (struct target_ops) <thread_address_space>: Delete.
8006 (target_thread_address_space): Delete.
8007 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
8008 pointers directly.
8009 (delete_thread_1, delete_thread, delete_thread_silent): Take a
8010 thread pointer instead of a ptid_t. Adjust all callers.
8011 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
8012 (first_thread_of_process): Delete, replaced by ...
8013 (first_thread_of_inferior): ... this new function. All callers
8014 adjusted.
8015 (any_thread_of_process): Rename to ...
8016 (any_thread_of_inferior): ... this, and take an inferior pointer.
8017 (any_live_thread_of_process): Rename to ...
8018 (any_live_thread_of_inferior): ... this, and take an inferior
8019 pointer.
8020 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8021 (value_in_thread_stack_temporaries)
8022 (get_last_thread_stack_temporary): Take a thread pointer instead
8023 of a ptid_t. Adjust all callers.
8024 (thread_info::set_running): New.
8025 (validate_registers_access): Use inferior_thread.
8026 (can_access_registers_ptid): Rename to ...
8027 (can_access_registers_thread): ... this, and take a thread
8028 pointer.
8029 (print_thread_info_1): Adjust to compare thread pointers instead
8030 of ptids.
8031 (switch_to_no_thread, switch_to_thread): Make extern.
8032 (scoped_restore_current_thread::~scoped_restore_current_thread):
8033 Use m_thread pointer directly.
8034 (scoped_restore_current_thread::scoped_restore_current_thread):
8035 Use inferior_thread.
8036 (thread_command): Use thread pointer directly.
8037 (thread_num_make_value_helper): Use inferior_thread.
8038 * top.c (execute_command): Use inferior_thread.
8039 * tui/tui-interp.c: Include "inferior.h".
8040 * varobj.c (varobj_create): Use inferior_thread.
8041 (value_of_root_1): Use find_thread_global_id instead of
8042 global_thread_id_to_ptid.
8043
8044 2018-06-21 Alan Hayward <alan.hayward@arm.com>
8045
8046 * regcache.c (readable_regcache::read_part): Avoid memcpy when
8047 possible.
8048 (regcache::write_part): Likewise.
8049 (readable_regcache::cooked_read_part): Update comment.
8050 (readable_regcache::cooked_write_part): Likewise.
8051 * regcache.h: (readable_regcache::read_part): Likewise.
8052 (regcache::write_part): Likewise.
8053
8054 2018-06-21 Richard Bunt <richard.bunt@arm.com>
8055 Dirk Schubert <dirk.schubert@arm.com>
8056
8057 * aarch64-linux-nat.c (post_attach): New.
8058 (aarch64_linux_nat_target::post_attach): Override post_attach to
8059 record the number of hardware debug registers.
8060
8061 2018-06-20 Tom Tromey <tom@tromey.com>
8062
8063 * python/py-param.c (add_setshow_generic): Make parameters const.
8064 (parmpy_init): Update.
8065
8066 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
8067
8068 * regcache.h (regcache_cooked_read_ftype): Rename to...
8069 (register_read_ftype): ...this, change type to function_view.
8070 (class reg_buffer) <save>: Remove src parameter.
8071 (readonly_detached_regcache) <readonly_detached_regcache>: Make
8072 parameter non-const in first overload. Remove src parameter in
8073 second overload.
8074 * regcache.c (do_cooked_read): Remove.
8075 (readonly_detached_regcache::readonly_detached_regcache): Make
8076 parameter non-const, adjust call to other constructor.
8077 (reg_buffer::save): Remove src parameter.
8078 * frame.c (do_frame_register_read): Remove.
8079 (frame_save_as_regcache): Use lambda function.
8080 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8081 parameter to ppu2spu_data *.
8082 (ppu2spu_sniffer): Use lambda function.
8083
8084 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
8085
8086 * record-full.c (record_full_target::insert_breakpoint): Remove
8087 "struct" keyword, add const.
8088
8089 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
8090
8091 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8092 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8093 * configure.ac: Remove AC_PREREQ, add missing quoting.
8094 * gnulib/configure.ac: Modernize usage of
8095 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
8096 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8097 (AUTOMAKE_VERSION): Bump to 1.15.1.
8098 * configure: Re-generate.
8099 * config.in: Re-generate.
8100 * aclocal.m4: Re-generate.
8101 * gnulib/aclocal.m4: Re-generate.
8102 * gnulib/config.in: Re-generate.
8103 * gnulib/configure: Re-generate.
8104 * gnulib/import/Makefile.in: Re-generate.
8105
8106 2018-06-19 Pedro Alves <palves@redhat.com>
8107
8108 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8109 (lookup_minimal_symbol_by_pc_section): ... here with
8110 gdb_assert_not_reached added.
8111
8112 2018-06-19 Pedro Alves <palves@redhat.com>
8113
8114 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8115 parameter with a block parameter. Compare location's block symbol
8116 with the frame's block instead of addresses.
8117 (skip_inline_frames): Pass the current block instead of the
8118 frame's address. Break out as soon as we determine the frame
8119 should not be skipped.
8120
8121 2018-06-18 Tom Tromey <tom@tromey.com>
8122
8123 * solib-aix.c (solib_aix_get_section_offsets): Return
8124 unique_xmalloc_ptr.
8125 (solib_aix_solib_create_inferior_hook): Update.
8126
8127 2018-06-18 Tom Tromey <tom@tromey.com>
8128
8129 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8130
8131 2018-06-18 Tom Tromey <tom@tromey.com>
8132
8133 * solib-frv.c (frv_relocate_main_executable): Use
8134 unique_xmalloc_ptr.
8135 * solib-dsbt.c (dsbt_relocate_main_executable): Use
8136 unique_xmalloc_ptr.
8137
8138 2018-06-18 Tom Tromey <tom@tromey.com>
8139
8140 * objfiles.h (inhibit_section_map_updates): Update.
8141 (resume_section_map_updates, resume_section_map_updates_cleanup):
8142 Remove.
8143 * solib-svr4.c (svr4_handle_solib_event): Update.
8144 * objfiles.c (inhibit_section_map_updates): Return
8145 scoped_restore_tmpl<int>.
8146 (resume_section_map_updates, resume_section_map_updates_cleanup):
8147 Remove.
8148
8149 2018-06-18 Tom Tromey <tom@tromey.com>
8150
8151 * valprint.h (read_string): Update.
8152 * valprint.c (read_string): Change type of "buffer".
8153 (val_print_string): Update.
8154 * python/py-value.c (valpy_string): Update.
8155 * language.h (struct language_defn) <la_get_string>: Change
8156 type of "buffer".
8157 (default_get_string, c_get_string): Update.
8158 * language.c (default_get_string): Change type of "buffer".
8159 * guile/scm-value.c (gdbscm_value_to_string): Update.
8160 * c-lang.c (c_get_string): Change type of "buffer".
8161
8162 2018-06-18 Tom Tromey <tom@tromey.com>
8163
8164 * ser-mingw.c (struct pipe_state_destroyer): New.
8165 (pipe_state_up): New typedef.
8166 (cleanup_pipe_state): Remove.
8167 (pipe_windows_open): Use pipe_state_up. Don't release argv.
8168
8169 2018-06-18 Tom Tromey <tom@tromey.com>
8170
8171 * rust-lang.h (rust_yyerror): Don't declare.
8172 * rust-lang.c (rust_language_defn): Update.
8173 * rust-exp.y (yyerror): Now static.
8174 * parse.c (parse_exp_in_context_1): Update.
8175 * p-lang.h (p_yyerror): Don't declare.
8176 * p-lang.c (p_language_defn): Update.
8177 * p-exp.y (yyerror): Now static.
8178 * opencl-lang.c (opencl_language_defn): Update.
8179 * objc-lang.c (objc_language_defn): Update.
8180 * m2-lang.h (m2_yyerror): Don't declare.
8181 * m2-lang.c (m2_language_defn): Update.
8182 * m2-exp.y (yyerror): Now static.
8183 * language.h (struct language_defn) <la_error>: Remove.
8184 * language.c (unk_lang_error): Remove.
8185 (unknown_language_defn, auto_language_defn): Remove.
8186 * go-lang.h (go_yyerror): Don't declare.
8187 * go-lang.c (go_language_defn): Update.
8188 * go-exp.y (yyerror): Now static.
8189 * f-lang.h (f_yyerror): Don't declare.
8190 * f-lang.c (f_language_defn): Update.
8191 * f-exp.y (yyerror): Now static.
8192 * d-lang.h (d_yyerror): Don't declare.
8193 * d-lang.c (d_language_defn): Update.
8194 * d-exp.y (yyerror): Now static.
8195 * c-lang.h (c_yyerror): Don't declare.
8196 * c-lang.c (c_language_defn, cplus_language_defn)
8197 (asm_language_defn, minimal_language_defn): Update.
8198 * c-exp.y (yyerror): Now static.
8199 * ada-lang.h (ada_yyerror): Don't declare.
8200 * ada-lang.c (ada_language_defn): Update.
8201 * ada-exp.y (yyerror): Now static.
8202
8203 2018-06-18 Alan Hayward <alan.hayward@arm.com>
8204
8205 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8206 (store_sveregs_to_thread): Likewise.
8207 (aarch64_linux_fetch_inferior_registers): Check for SVE.
8208 (aarch64_linux_store_inferior_registers): Likewise.
8209 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8210 function.
8211 (aarch64_sve_regs_copy_to_regcache): Likewise.
8212 (aarch64_sve_regs_copy_from_regcache): Likewise.
8213 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8214 declaration.
8215 (aarch64_sve_regs_copy_to_regcache): Likewise.
8216 (aarch64_sve_regs_copy_from_regcache): Likewise.
8217 (sve_context): Structure from Linux headers.
8218 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8219 (SVE_SIG_ZREG_SIZE): Likewise.
8220 (SVE_SIG_PREG_SIZE): Likewise.
8221 (SVE_SIG_FFR_SIZE): Likewise.
8222 (SVE_SIG_REGS_OFFSET): Likewise.
8223 (SVE_SIG_ZREGS_OFFSET): Likewise.
8224 (SVE_SIG_ZREG_OFFSET): Likewise.
8225 (SVE_SIG_ZREGS_SIZE): Likewise.
8226 (SVE_SIG_PREGS_OFFSET): Likewise.
8227 (SVE_SIG_PREG_OFFSET): Likewise.
8228 (SVE_SIG_PREGS_SIZE): Likewise.
8229 (SVE_SIG_FFR_OFFSET): Likewise.
8230 (SVE_SIG_REGS_SIZE): Likewise.
8231 (SVE_SIG_CONTEXT_SIZE): Likewise.
8232 (SVE_PT_REGS_MASK): Likewise.
8233 (SVE_PT_REGS_FPSIMD): Likewise.
8234 (SVE_PT_REGS_SVE): Likewise.
8235 (SVE_PT_VL_INHERIT): Likewise.
8236 (SVE_PT_VL_ONEXEC): Likewise.
8237 (SVE_PT_REGS_OFFSET): Likewise.
8238 (SVE_PT_FPSIMD_OFFSET): Likewise.
8239 (SVE_PT_FPSIMD_SIZE): Likewise.
8240 (SVE_PT_SVE_ZREG_SIZE): Likewise.
8241 (SVE_PT_SVE_PREG_SIZE): Likewise.
8242 (SVE_PT_SVE_FFR_SIZE): Likewise.
8243 (SVE_PT_SVE_FPSR_SIZE): Likewise.
8244 (SVE_PT_SVE_FPCR_SIZE): Likewise.
8245 (__SVE_SIG_TO_PT): Likewise.
8246 (SVE_PT_SVE_OFFSET): Likewise.
8247 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8248 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8249 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8250 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8251 (SVE_PT_SVE_PREG_OFFSET): Likewise.
8252 (SVE_PT_SVE_PREGS_SIZE): Likewise.
8253 (SVE_PT_SVE_FFR_OFFSET): Likewise.
8254 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8255 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8256 (SVE_PT_SVE_SIZE): Likewise.
8257 (SVE_PT_SIZE): Likewise.
8258 (HAS_SVE_STATE): New define.
8259
8260 2018-06-18 Alan Hayward <alan.hayward@arm.com>
8261
8262 * nat/aarch64-sve-linux-sigcontext.h: New file.
8263 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8264 new files.
8265 (SVE_VQ_MIN): Likewise.
8266 (SVE_VQ_MAX): Likewise.
8267 (SVE_VL_MIN): Likewise.
8268 (SVE_VL_MAX): Likewise.
8269 (SVE_NUM_ZREGS): Likewise.
8270 (SVE_NUM_PREGS): Likewise.
8271 (sve_vl_valid): Likewise.
8272 (struct user_sve_header): Likewise.
8273
8274 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
8275 Richard Bunt <Richard.Bunt@arm.com>
8276
8277 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8278 was requested by GDB.
8279
8280 2018-06-15 Tom de Vries <tdevries@suse.de>
8281
8282 * MAINTAINERS (Write After Approval): Add Tom de Vries.
8283
8284 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
8285
8286 * gnulib/update-gnulib.sh: Print expected versions of
8287 autoconf/aclocal.
8288
8289 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
8290
8291 * arch-utils.c (default_type_align): Use type_length_units.
8292 * gdbtypes.c (type_align): Use type_length_units.
8293
8294 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8295
8296 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8297 of 'define' command.
8298
8299 2018-06-14 Tom de Vries <tdevries@suse.de>
8300
8301 PR cli/22573
8302 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8303 get_no_prettyformat_print_options.
8304
8305 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
8306
8307 * sparc-nat.h: Include target.h.
8308 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8309 <fetch_registers>: Remove this argument in function call.
8310 <store_registers>: Remove this argument in function call, remove
8311 extra semicolon.
8312 <low_forget_process>: Call sparc64_forget_process instead of
8313 sparc_forget_process.
8314
8315 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8316
8317 * procfs.c (_initialize_procfs): Use add_inf_child_target.
8318 (procfs_target::make_corefile_notes): Adjust to new
8319 target_read_alloc return type.
8320
8321 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8322 Stephen Roberts <stephen.roberts@arm.com>
8323
8324 PR gdb/22882
8325 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8326 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8327 Move should_notify_stop local into more inner scope.
8328
8329 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8330 Stephen Roberts <stephen.roberts@arm.com>
8331
8332 PR gdb/22882
8333 * infrun.c (resume_1): Add call to mark_async_event_handler.
8334
8335 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8336
8337 * infrun.c (do_target_wait): Change old version of $pc printed.
8338
8339 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
8340
8341 * dwarf2read.c (read_index_from_section): Rename to...
8342 (read_gdb_index_from_section): ... this, update all callers.
8343 (dwarf2_read_index): Rename to...
8344 (dwarf2_read_gdb_index): ... this, update all callers.
8345
8346 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
8347
8348 * hppa-linux-nat.c
8349 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8350 hppa_linux_nat_target::fetch_registers.
8351
8352 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8353
8354 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8355 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8356 (AARCH64_DWARF_SVE_FFR): Likewise.
8357 (AARCH64_DWARF_SVE_P0): Likewise.
8358 (AARCH64_DWARF_SVE_Z0): Likewise.
8359
8360 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8361
8362 * common/common-regcache.h (raw_compare): New function.
8363 * regcache.c (regcache::raw_compare): Likewise.
8364 * regcache.h (regcache::raw_compare): New declaration.
8365
8366 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8367
8368 * common/common-regcache.h (reg_buffer_common): New structure.
8369 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8370 (reg_buffer::raw_supply): Likewise.
8371 (reg_buffer::raw_supply_integer): Likewise.
8372 (reg_buffer::raw_supply_zeroed): Likewise.
8373 (reg_buffer::raw_collect): Likewise.
8374 (reg_buffer::raw_collect_integer): Likewise.
8375 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8376 (reg_buffer::raw_supply): Likewise.
8377 (reg_buffer::raw_supply_integer): Likewise.
8378 (reg_buffer::raw_supply_zeroed): Likewise.
8379 (reg_buffer::raw_collect): Likewise.
8380 (reg_buffer::raw_collect_integer): Likewise.
8381
8382 2018-06-10 Tom Tromey <tom@tromey.com>
8383
8384 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
8385 (class remote_state) <stop_reply_queue>: Now std::vector.
8386 (remote_state::~remote_state)
8387 (remote_target::stop_reply_queue_length): Update.
8388 (struct queue_iter_param, remove_child_of_pending_fork)
8389 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8390 (check_pending_event_prevents_wildcard_vcont_callback)
8391 (remove_stop_reply_for_inferior)
8392 (remove_stop_reply_of_remote_state)
8393 (remote_notif_remove_once_on_match)
8394 (stop_reply_match_ptid_and_ws)
8395 (remote_kill_child_of_pending_fork): Remove.
8396 (remote_target::remove_new_fork_children)
8397 (remote_target::check_pending_events_prevent_wildcard_vcont)
8398 (remote_target::discard_pending_stop_replies)
8399 (remote_target::discard_pending_stop_replies_in_queue)
8400 (remote_target::remote_notif_remove_queued_reply)
8401 (remote_target::queued_stop_reply)
8402 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8403 (remote_target::wait, remote_target::kill_new_fork_children)
8404 (remote_target::async): Update.
8405
8406 2018-06-10 Tom Tromey <tom@tromey.com>
8407
8408 * record-full.c (record_full_arch_list_cleanups): Remove.
8409 (record_full_message): Use try/catch.
8410 (record_full_wait_cleanups): Remove.
8411 (record_full_wait_1): Use try/catch.
8412 (record_full_restore): Likewise.
8413
8414 2018-06-10 Tom Tromey <tom@tromey.com>
8415
8416 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
8417 declare VEC. Add constructor.
8418 <in_target_beneath>: Now bool.
8419 (record_full_breakpoints): Now a std::vector, static.
8420 (record_full_sync_record_breakpoints)
8421 (record_full_init_record_breakpoints)
8422 (record_full_target::insert_breakpoint)
8423 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
8424
8425 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8426
8427 * dwarf2read.c (process_cu_includes): Remove struct keyword.
8428 * serial.c (serial_interface_lookup): Remove struct keyword.
8429
8430 2018-06-10 Tom Tromey <tom@tromey.com>
8431
8432 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8433 method.
8434 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8435 a method.
8436 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8437 method.
8438 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8439 "beneath" as a method.
8440 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8441 Use "beneath" as a method.
8442
8443 2018-06-10 Tom Tromey <tom@tromey.com>
8444
8445 * tracefile.c (struct trace_file_writer_deleter): New.
8446 <operator()>: Rename from trace_file_writer_xfree.
8447 (trace_file_writer_up): New typedef.
8448 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8449
8450 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8451
8452 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8453 <m_registers, m_register_status>: Change type to
8454 std::unique_ptr.
8455 * regcache.c (reg_buffer::reg_buffer): Use new instead of
8456 XCNEWVEC.
8457
8458 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8459
8460 * common/common-regcache.h (enum register_status): Add
8461 underlying type "signed char".
8462 * regcache.h (reg_buffer) <m_register_status>: Change type to
8463 register_status *.
8464 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8465 register_status instead of signed char.
8466 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8467 (reg_buffer::get_register_status): Remove cast.
8468 (readable_regcache::raw_read): Remove cast.
8469 (readable_regcache::cooked_read): Remove cast.
8470
8471 2018-06-09 Tom Tromey <tom@tromey.com>
8472
8473 * source.c (reverse_search_command, forward_search_command): Use
8474 scoped_fd.
8475
8476 2018-06-09 Tom Tromey <tom@tromey.com>
8477
8478 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
8479 (serial_ops_list): Now static, std::vector.
8480 (serial_interface_lookup, serial_add_interface): Update.
8481
8482 2018-06-09 Tom Tromey <tom@tromey.com>
8483
8484 * dwarf2read.c (process_cu_includes): Update.
8485 (process_full_comp_unit): Update.
8486 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8487 std::vector.
8488
8489 2018-06-08 Paul Koning <paul_koning@dell.com>
8490
8491 PR gdb/23252
8492
8493 * python/python.c (do_start_initialization):
8494 Avoid call to internal Python API.
8495 (init__gdb_module): New function.
8496
8497 2018-06-08 Gary Benson <gbenson@redhat.com>
8498
8499 * linux-thread-db.c (valprint.h): New include.
8500 (struct check_thread_db_info): New structure.
8501 (check_thread_db_on_load, tdb_testinfo): New static globals.
8502 (check_thread_db, check_thread_db_callback): New functions.
8503 (try_thread_db_load_1): Run integrity checks if requested.
8504 (maintenance_check_libthread_db): New function.
8505 (_initialize_thread_db): Register "maint check libthread-db"
8506 and "maint set/show check-libthread-db".
8507 * NEWS: Mention the above new commands.
8508
8509 2018-06-08 Tom Tromey <tom@tromey.com>
8510
8511 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8512 now a method.
8513
8514 2018-06-08 Tom Tromey <tom@tromey.com>
8515
8516 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8517
8518 2018-06-08 Tom Tromey <tom@tromey.com>
8519
8520 * common/btrace-common.h (struct btrace_data): Add constructor,
8521 destructor, move assignment operator.
8522 <empty, clear, fini>: New methods.
8523 <format>: Initialize.
8524 (btrace_data_init, btrace_data_fini, btrace_data_clear)
8525 (btrace_data_empty): Don't declare.
8526 * common/btrace-common.c (btrace_data_init): Remove.
8527 (btrace_data::fini): Rename from btrace_data_fini.
8528 (btrace_data::empty): Rename from btrace_data_empty.
8529 (btrace_data::clear): Rename from btrace_data_clear. Return
8530 bool.
8531 * btrace.h (make_cleanup_btrace_data): Don't declare.
8532 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8533 (parse_xml_btrace): Update.
8534 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8535 (maint_btrace_clear_packet_history_cmd): Update.
8536
8537 2018-06-07 Pedro Alves <palves@redhat.com>
8538
8539 * target.h (target_ops) <beneath>: Now a method. All references
8540 updated.
8541 (class target_stack): New.
8542 * target.c (g_target_stack): New.
8543 (g_current_top_target): Delete.
8544 (current_top_target): Get the top target out of g_target_stack.
8545 (target_stack::push, target_stack::unpush): New.
8546 (push_target, unpush_target): Reimplement.
8547 (target_is_pushed): Reimplement in terms of g_target_stack.
8548 (target_ops::beneath, target_stack::find_beneath): New.
8549
8550 2018-06-07 Pedro Alves <palves@redhat.com>
8551
8552 * target.h (find_target_beneath): Delete declaration.
8553 * target.c (find_target_beneath): Delete definition.
8554 * aix-thread.c: All callers of find_target_beneath adjusted to
8555 call target_ops::beneath instead.
8556 * bsd-uthread.c: Likewise.
8557 * linux-thread-db.c: Likewise.
8558 * ravenscar-thread.c: Likewise.
8559 * sol-thread.c: Likewise.
8560 * spu-multiarch.c: Likewise.
8561
8562 2018-06-07 Pedro Alves <palves@redhat.com>
8563
8564 * target.h (target_ops) <beneath>: Now a method. All references
8565 updated.
8566 (target_ops) <m_beneath>: New.
8567 * target.c (target_ops::beneath): New.
8568 * corelow.c: Adjust all references to target_ops::beneath.
8569 * linux-thread-db.c: Likewise.
8570 * make-target-delegates: Likewise.
8571 * record-btrace.c: Likewise.
8572 * record-full.c: Likewise.
8573 * remote.c: Likewise.
8574 * target.c: Likewise.
8575 * target-delegates.c: Regenerate.
8576
8577 2018-06-07 Pedro Alves <palves@redhat.com>
8578
8579 * target.h (target_stack): Delete.
8580 (current_top_target): Declare function.
8581 * target.c (target_stack): Delete.
8582 (g_current_top_target): New.
8583 (current_top_target): New function.
8584 * auxv.c: Use current_top_target instead of target_stack
8585 throughout.
8586 * avr-tdep.c: Likewise.
8587 * breakpoint.c: Likewise.
8588 * corefile.c: Likewise.
8589 * elfread.c: Likewise.
8590 * eval.c: Likewise.
8591 * exceptions.c: Likewise.
8592 * frame.c: Likewise.
8593 * gdbarch-selftests.c: Likewise.
8594 * gnu-v3-abi.c: Likewise.
8595 * ia64-tdep.c: Likewise.
8596 * ia64-vms-tdep.c: Likewise.
8597 * infcall.c: Likewise.
8598 * infcmd.c: Likewise.
8599 * infrun.c: Likewise.
8600 * linespec.c: Likewise.
8601 * linux-tdep.c: Likewise.
8602 * minsyms.c: Likewise.
8603 * ppc-linux-nat.c: Likewise.
8604 * ppc-linux-tdep.c: Likewise.
8605 * procfs.c: Likewise.
8606 * regcache.c: Likewise.
8607 * remote.c: Likewise.
8608 * rs6000-tdep.c: Likewise.
8609 * s390-linux-nat.c: Likewise.
8610 * s390-tdep.c: Likewise.
8611 * solib-aix.c: Likewise.
8612 * solib-darwin.c: Likewise.
8613 * solib-dsbt.c: Likewise.
8614 * solib-spu.c: Likewise.
8615 * solib-svr4.c: Likewise.
8616 * solib-target.c: Likewise.
8617 * sparc-tdep.c: Likewise.
8618 * sparc64-tdep.c: Likewise.
8619 * spu-tdep.c: Likewise.
8620 * symfile.c: Likewise.
8621 * symtab.c: Likewise.
8622 * target-descriptions.c: Likewise.
8623 * target-memory.c: Likewise.
8624 * target.c: Likewise.
8625 * target.h: Likewise.
8626 * tracefile-tfile.c: Likewise.
8627 * tracepoint.c: Likewise.
8628 * valops.c: Likewise.
8629 * valprint.c: Likewise.
8630 * value.c: Likewise.
8631 * windows-tdep.c: Likewise.
8632 * mi/mi-main.c: Likewise.
8633
8634 2018-06-07 Tom Tromey <tom@tromey.com>
8635
8636 * valprint.h (build_address_symbolic): Declare.
8637 * printcmd.c (print_address_symbolic): Update.
8638 (build_address_symbolic): Change "name" and "filename" to
8639 std::string.
8640 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8641 Update.
8642 * defs.h (build_address_symbolic): Remove declaration.
8643
8644 2018-06-07 Alan Hayward <alan.hayward@arm.com>
8645
8646 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8647 (aarch64_vnv_type): Add function.
8648 (aarch64_pseudo_register_name): Add V regs for SVE.
8649 (aarch64_pseudo_register_type): Likewise.
8650 (aarch64_pseudo_register_reggroup_p): Likewise.
8651 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8652 (aarch64_pseudo_read_value): Add V regs for SVE.
8653 (aarch64_pseudo_write_2): Use V0 offset for SVE
8654 (aarch64_pseudo_write): Add V regs for SVE.
8655 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8656
8657 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
8658
8659 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8660 (sve_vl_from_vq): Likewise.
8661
8662 2018-06-05 Tom Tromey <tom@tromey.com>
8663
8664 * cli/cli-cmds.c (show_version): Update.
8665 * top.c (print_gdb_version): Add "interactive" parameter.
8666 Update.
8667 * main.c (captured_main_1): Update.
8668 * top.h (print_gdb_version): Add "interactive" parameter and a
8669 comment.
8670
8671 2018-06-05 David Malcolm <dmalcolm@redhat.com>
8672
8673 * common/enum-flags.h: Add trailing semicolon to example in
8674 comment.
8675
8676 2018-06-05 Tom Tromey <tom@tromey.com>
8677
8678 PR cli/12326:
8679 * NEWS: Add entry about pager.
8680 * utils.c (pagination_disabled_for_command): New global.
8681 (prompt_for_continue): Allow "c" response to prompt.
8682 (reinitialize_more_filter): Clear
8683 pagination_disabled_for_command.
8684 (fputs_maybe_filtered): Check pagination_disabled_for_command.
8685
8686 2018-06-04 Tom Tromey <tom@tromey.com>
8687
8688 * ada-lang.h (ada_lookup_symbol_list): Update.
8689 * ada-lang.c (resolve_subexp): Update.
8690 (symbols_are_identical_enums): Change type of syms. Remove nsyms
8691 parameter.
8692 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8693 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8694 results parameter to std::vector.
8695 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8696 Update.
8697 * ada-exp.y (block_lookup): Update.
8698 (select_possible_type_sym): Change type of syms. Remove nsyms
8699 parameter.
8700 (write_var_or_type, write_name_assoc): Update.
8701
8702 2018-06-04 Joel Brobecker <brobecker@adacore.com>
8703
8704 * windows-nat.c (windows_nat_target::xfer_partial): Return
8705 TARGET_XFER_E_IO if we need to delegate to the target beneath
8706 but BENEATH is NULL.
8707
8708 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
8709
8710 * Makefile.in (config.status): Add configure.nat as a
8711 dependency.
8712
8713 2018-06-04 Tom Tromey <tom@tromey.com>
8714
8715 * cp-name-parser.y (cpname_state): Add method declarations.
8716 (HANDLE_QUAL): Update.
8717 (cpname_state::d_grab, cpname_state::fill_comp)
8718 (cpname_state::make_operator, cpname_state::make_dtor)
8719 (cpname_state::make_builtin_type, cpname_state::make_name)
8720 (cpname_state::d_qualify, cpname_state::d_int_type)
8721 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8722 (%union): Move earlier.
8723
8724 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8725
8726 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8727
8728 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8729
8730 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8731 (aarch64_pseudo_write_1): Likewise.
8732 (aarch64_pseudo_read_value): Use helper.
8733 (aarch64_pseudo_write): Likewise.
8734
8735 2018-06-04 Pedro Alves <palves@redhat.com>
8736
8737 * darwin-nat.c (darwin_ops): Delete.
8738 (darwin_attach_pid): Use get_native_target.
8739
8740 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8741
8742 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8743 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8744
8745 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8746
8747 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8748 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8749 (aarch64_gdbarch_init): Check for SVE.
8750 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8751
8752 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8753
8754 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8755 * aarch64-tdep.h (aarch64_read_description): Likewise.
8756 * arch/aarch64.c (aarch64_create_target_description): Likewise.
8757 * arch/aarch64.h (aarch64_create_target_description): Likewise.
8758 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8759 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8760 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8761
8762 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
8763
8764 * value.c (value_fetch_lazy_bitfield): New.
8765 (value_fetch_lazy_memory): New.
8766 (value_fetch_lazy_register): New.
8767 (value_fetch_lazy): Factor out to smaller functions.
8768
8769 2018-06-01 Tom Tromey <tom@tromey.com>
8770
8771 * cp-name-parser.y (backslashable, represented): Now const.
8772
8773 2018-06-01 Tom Tromey <tom@tromey.com>
8774
8775 * cp-name-parser.y: Include parser-defs.h.
8776 (parser_fprintf): Remove declaration.
8777
8778 2018-06-01 Tom Tromey <tom@tromey.com>
8779
8780 * cp-name-parser.y: Use %pure-parser, %lex-param, and
8781 %parse-param.
8782 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8783 (global_result): Remove globals.
8784 (struct cpname_state): New.
8785 (yyparse): Don't declare.
8786 (yylex, yyerror): Move declarations after %union.
8787 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8788 (make_name): Add state parameter.
8789 Update all callers.
8790 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8791 parameter.
8792 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8793 Update.
8794 (yylex): Add lvalp, state parameters.
8795 (yyerror): Add state parameter.
8796 (cp_demangled_name_to_comp): Update.
8797
8798 2018-06-01 Tom Tromey <tom@tromey.com>
8799
8800 * cp-name-parser.y (parser_fprintf): Declare.
8801 (GDB_YY_REMAP_PREFIX): Define.
8802 Include yy-remap.h. Don't redefine yy* identifiers.
8803
8804 2018-06-01 Tom Tromey <tom@tromey.com>
8805
8806 * python/py-type.c (typy_legacy_template_argument): Update.
8807 * cp-support.h (cp_demangled_name_to_comp): Update.
8808 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8809 parameter to be a "std::string *".
8810 (main): Update.
8811
8812 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
8813
8814 * ada-lex.l: Include "diagnostics.h" instead of
8815 "common/diagnostics.h".
8816 * unittests/environ-selftests.c: Likewise.
8817 * common/diagnostics.h: Moved to ../include.
8818
8819 2018-06-01 Joel Brobecker <brobecker@adacore.com>
8820
8821 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8822 to language_mode_manual while calling breakpoint_re_set_one.
8823
8824 2018-06-01 Tom Tromey <tom@tromey.com>
8825
8826 * valops.c (value_cast_structs, destructor_name_p): Update.
8827 * symtab.c (gdb_mangle_name): Update.
8828 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8829 Update.
8830 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8831 (pascal_object_print_value_fields, pascal_object_print_value):
8832 Update.
8833 * p-typeprint.c (pascal_type_print_derivation_info): Update.
8834 * linespec.c (find_methods): Update.
8835 * gdbtypes.h (type_name_no_tag): Remove.
8836 (type_name_or_error): Rename from type_name_no_tag_or_error.
8837 * gdbtypes.c (type_name_no_tag): Remove.
8838 (type_name_or_error): Rename from type_name_no_tag_or_error.
8839 (lookup_struct_elt_type, check_typedef): Update.
8840 * expprint.c (print_subexp_standard): Update.
8841 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8842 * d-namespace.c (d_lookup_nested_symbol): Update.
8843 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8844 (cp_print_class_member): Update.
8845 * cp-namespace.c (cp_lookup_nested_symbol): Update.
8846 * completer.c (add_struct_fields): Update.
8847 * c-typeprint.c (cp_type_print_derivation_info)
8848 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8849 Update.
8850 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8851 (ada_prefer_type, ada_is_exception_sym): Update.
8852
8853 2018-06-01 Tom Tromey <tom@tromey.com>
8854
8855 * valops.c (enum_constant_from_type, value_namespace_elt)
8856 (value_maybe_namespace_elt): Update.
8857 * valarith.c (find_size_for_pointer_math): Update.
8858 * target-descriptions.c (make_gdb_type): Update.
8859 * symmisc.c (print_symbol): Update.
8860 * stabsread.c (define_symbol, read_type)
8861 (complain_about_struct_wipeout, add_undefined_type)
8862 (cleanup_undefined_types_1): Update.
8863 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8864 (rust_range_type_p, val_print_struct, rust_print_struct_def)
8865 (rust_internal_print_type, rust_composite_type)
8866 (rust_evaluate_funcall, rust_evaluate_subexp)
8867 (rust_inclusive_range_type_p): Update.
8868 * python/py-type.c (typy_get_tag): Update.
8869 * p-typeprint.c (pascal_type_print_base): Update.
8870 * mdebugread.c (parse_symbol, parse_type): Update.
8871 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8872 Update.
8873 * guile/scm-type.c (gdbscm_type_tag): Update.
8874 * go-lang.c (sixg_string_p): Update.
8875 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8876 Update.
8877 * gdbtypes.h (struct main_type) <tag_name>: Remove.
8878 (TYPE_TAG_NAME): Remove.
8879 * gdbtypes.c (type_name_no_tag): Simplify.
8880 (check_typedef, check_types_equal, recursive_dump_type)
8881 (copy_type_recursive, arch_composite_type): Update.
8882 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
8883 in summary mode when needed.
8884 * eval.c (evaluate_funcall): Update.
8885 * dwarf2read.c (fixup_go_packaging, read_structure_type)
8886 (process_structure_scope, read_enumeration_type)
8887 (read_namespace_type, read_module_type, determine_prefix): Update.
8888 * cp-support.c (inspect_type): Update.
8889 * coffread.c (process_coff_symbol, decode_base_type): Update.
8890 * c-varobj.c (c_is_path_expr_parent): Update.
8891 * c-typeprint.c (c_type_print_base_struct_union): Update.
8892 (c_type_print_base_1): Update. Print struct/class/union/enum in
8893 summary when using C language.
8894 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8895 (gen_maybe_namespace_elt): Update.
8896 * ada-lang.c (ada_type_name): Simplify.
8897 (empty_record, ada_template_to_fixed_record_type_1)
8898 (template_to_static_fixed_type)
8899 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8900
8901 2018-06-01 Tom Tromey <tom@tromey.com>
8902
8903 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8904 c_print_type.
8905 * c-typeprint.c (c_print_type_1): Add "language" parameter.
8906 (c_print_type): Update.
8907 (c_print_type): New overload.
8908 (c_type_print_varspec_prefix, c_type_print_args)
8909 (c_type_print_varspec_suffix, c_print_type_no_offsets)
8910 (c_type_print_base_struct_union, c_type_print_base_1)
8911 (cp_type_print_method_args): Add "language" parameter.
8912 (c_type_print_base): Update.
8913 * c-lang.h (c_print_type): Add new overload.
8914
8915 2018-06-01 Tom Tromey <tom@tromey.com>
8916
8917 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8918 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8919
8920 2018-06-01 Alan Hayward <alan.hayward@arm.com>
8921
8922 * aarch64-tdep.c (aarch64_sve_register_names): New const
8923 var.
8924 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8925 (AARCH64_SVE_Z_REGS_NUM): New define.
8926 (AARCH64_SVE_P_REGS_NUM): Likewise.
8927 (AARCH64_SVE_NUM_REGS): Likewise.
8928
8929 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
8930
8931 * nat/linux-ptrace.h [__alpha__]
8932 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8933 definitions.
8934
8935 2018-05-31 Maciej W. Rozycki <macro@mips.com>
8936
8937 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8938 the endianness selected.
8939 * NEWS: Document `set endian auto' mode operation update.
8940
8941 2018-05-31 Alan Hayward <alan.hayward@arm.com>
8942
8943 * Makefile.in: Add new header.
8944 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8945 (sve_vl_from_vg): Likewise.
8946 (sve_vq_from_vl): Likewise.
8947 (sve_vl_from_vq): Likewise.
8948 (sve_vq_from_vg): Likewise.
8949 (sve_vg_from_vq): Likewise.
8950 * configure.nat: Add new c file.
8951 * nat/aarch64-sve-linux-ptrace.c: New file.
8952 * nat/aarch64-sve-linux-ptrace.h: New file.
8953
8954 2018-05-31 Alan Hayward <alan.hayward@arm.com>
8955
8956 * aarch64-linux-nat.c (aarch64_linux_read_description):
8957 Add parmeter zero.
8958 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8959 Likewise.
8960 * aarch64-tdep.c (tdesc_aarch64_list): Add.
8961 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8962 (aarch64_gdbarch_init): Add parmeter zero.
8963 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8964 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8965 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8966 parmeter.
8967 * doc/gdb.texinfo: Describe SVE feature
8968 * features/aarch64-sve.c: New file.
8969
8970 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
8971
8972 PR gdb/23210
8973 * gdbarch.sh (significant_addr_bit): Default to zero when
8974 not set by target architecture.
8975 * gdbarch.c: Re-generated.
8976 * utils.c (address_significant): Update.
8977
8978 2018-05-30 Joel Brobecker <brobecker@adacore.com>
8979
8980 * stack.c (func_command): Remove trailing newline in call to error.
8981
8982 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8983
8984 * regcache.h (regcache_raw_collect): Remove, update callers to
8985 use regcache::raw_collect.
8986 * regcache.c (regcache_raw_collect): Remove.
8987
8988 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8989
8990 * regcache.h (regcache_raw_supply): Remove, update callers to
8991 use detached_regcache::raw_supply.
8992 * regcache.c (regcache_raw_supply): Remove.
8993
8994 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8995
8996 * regcache.h (regcache_cooked_write_part): Remove, update
8997 callers to use regcache::cooked_write_part.
8998 * regcache.c (regcache_cooked_write_part): Remove.
8999
9000 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9001
9002 * regcache.h (regcache_cooked_read_part): Remove, update callers
9003 to use readable_regcache::cooked_read_part.
9004 * regcache.c (regcache_cooked_read_part): Remove.
9005
9006 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9007
9008 * regcache.h (regcache_cooked_read_value): Remove, update
9009 callers to use readable_regcache::cooked_read_value.
9010 * regcache.c (regcache_cooked_read_value): Remove.
9011
9012 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9013
9014 * regcache.h (regcache_cooked_write): Remove, update callers to
9015 use regcache::cooked_write.
9016 * regcache.c (regcache_cooked_write): Remove.
9017
9018 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9019
9020 * regcache.h (regcache_invalidate): Remove, update callers to
9021 use detached_regcache::invalidate instead.
9022 * regcache.c (regcache_invalidate): Remove.
9023
9024 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9025
9026 * regcache.h (regcache_raw_write_part): Remove, update callers
9027 to use regcache::raw_write_part instead.
9028 * regcache.c (regcache_raw_write_part): Remove.
9029
9030 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9031
9032 * regcache.h (regcache_raw_read_part): Remove, update callers to
9033 use readable_regcache::raw_read_part instead.
9034 * regcache.c (regcache_raw_read_part): Remove.
9035
9036 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9037
9038 * regcache.h (regcache_cooked_read): Remove, update callers to
9039 use readable_regcache::cooked_read instead.
9040 * regcache.c (regcache_cooked_read): Remove.
9041
9042 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9043
9044 * regcache.h (regcache_raw_write): Remove, update callers to use
9045 regcache::raw_write instead.
9046 * regcache.c (regcache_raw_write): Remove.
9047
9048 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9049
9050 * regcache.h (regcache_raw_read): Remove, update callers to use
9051 readable_regcache::raw_read instead.
9052 * regcache.c (regcache_raw_read): Remove.
9053
9054 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9055
9056 * regcache.h (regcache_raw_update): Remove, update callers to
9057 use readable_regcache::raw_update instead.
9058 * regcache.c (regcache_raw_update): Remove.
9059
9060 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9061
9062 * regcache.h (regcache_register_status): Remove, update callers
9063 to use reg_buffer::get_register_status directly instead.
9064 * regcache.c (regcache_register_status): Remove.
9065
9066 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9067
9068 * regcache.h (regcache_get_ptid): Remove, update all callers to
9069 call regcache::ptid instead.
9070 * regcache.c (regcache_get_ptid): Remove.
9071
9072 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9073
9074 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9075
9076 2018-05-30 Pedro Alves <palves@redhat.com>
9077
9078 * common/common-exceptions.h (exception_rethrow): Use
9079 ATTRIBUTE_NORETURN.
9080
9081 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
9082
9083 * breakpoint.c (print_solib_event, check_status_catch_solib):
9084 Remove struct keyword in range-based for loops.
9085 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9086 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9087 Likewise.
9088 * linespec.c (find_superclass_methods, search_minsyms_for_name):
9089 Likewise.
9090 * symfile.c (addr_info_make_relative): Likewise.
9091 * thread.c (value_in_thread_stack_temporaries): Likewise.
9092
9093 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
9094
9095 PR gdb/16841
9096 * valops.c (value_struct_elt_for_reference): Call check_typedef on
9097 aggregate type to get its real type before accessing it.
9098
9099 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
9100
9101 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9102 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9103 * coff-pe-read.c (add_pe_forwarded_sym): Replace
9104 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9105 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9106 * jit.c (jit_breakpoint_re_set_internal): Likewise.
9107 * printcmd.c (info_address_command): Likewise.
9108
9109 2018-05-29 Tom Tromey <tom@tromey.com>
9110
9111 * windows-nat.c (handle_exception): Update fall-through comment.
9112
9113 2018-05-29 Tom Tromey <tom@tromey.com>
9114
9115 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
9116 (struct program_space) <added_solibs>: Now a std::vector.
9117 * breakpoint.c (print_solib_event): Update.
9118 (check_status_catch_solib): Update.
9119 * progspace.c (clear_program_space_solib_cache): Update.
9120 * solib.c (update_solib_list): Update.
9121
9122 2018-05-29 Tom Tromey <tom@tromey.com>
9123
9124 * python/py-type.c (typy_richcompare): Update.
9125 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9126 * gdbtypes.h (types_deeply_equal): Return bool.
9127 (types_equal): Likewise.
9128 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
9129 declare VEC.
9130 (check_types_equal): Change worklist to std::vector. Return
9131 bool.
9132 (struct type_equality_entry): Add constructor.
9133 (compare_maybe_null_strings): Return bool.
9134 (check_types_worklist): Return bool. Change worklist to
9135 std::vector.
9136 (types_deeply_equal): Use std::vector.
9137 (types_equal): Return bool.
9138 (compare_maybe_null_strings): Simplify.
9139
9140 2018-05-29 Tom Tromey <tom@tromey.com>
9141
9142 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
9143
9144 2018-05-29 Tom Tromey <tom@tromey.com>
9145
9146 * objc-lang.h: Don't include cp-support.h.
9147 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
9148 declare VEC.
9149
9150 2018-05-27 Tom Tromey <tom@tromey.com>
9151
9152 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9153
9154 2018-05-25 Tom Tromey <tom@tromey.com>
9155
9156 * value.c (value::location): Initialize.
9157
9158 2018-05-25 Tom Tromey <tom@tromey.com>
9159
9160 * dbxread.c (init_bincl_list): Remove.
9161 (bincl_list): Now a std::vector.
9162 (bincls_allocated, next_bincl): Remove.
9163 (free_bincl_list, do_free_bincl_list_cleanup)
9164 (make_cleanup_free_bincl_list): Remove.
9165 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9166 unique_xmalloc_ptr.
9167 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9168 (struct header_file_location): Add constructor.
9169 (add_bincl_to_list): Remove.
9170
9171 2018-05-25 Tom Tromey <tom@tromey.com>
9172
9173 * tui/tui.c (tui_enable): Update.
9174 * mi/mi-interp.c (mi_interp::init): Update.
9175 * interps.h (class interp) <name>: New method.
9176 <m_name>: Rename from name.
9177 (~scoped_restore_interp): Update.
9178 * interps.c (interp::interp): Update.
9179 (interp_add, interp_set, interp_lookup_existing)
9180 (current_interp_named_p): Update.
9181
9182 2018-05-25 Tom Tromey <tom@tromey.com>
9183
9184 * interps.c (interp_name): Remove.
9185 * mi/mi-interp.c (mi_interp::init): Update.
9186 * interps.h (interp_name): Remove.
9187 (~scoped_restore_interp): Update.
9188 * tui/tui.c (tui_enable): Update.
9189
9190 2018-05-25 Tom Tromey <tom@tromey.com>
9191
9192 * utils.c (fputs_maybe_filtered): Update.
9193 * linespec.c (decode_line_full): Update.
9194 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9195 (mi_print_breakpoint_for_event, mi_solib_loaded)
9196 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9197 (mi_user_selected_context_changed): Update.
9198 * mi/mi-main.c (mi_execute_command): Update.
9199 * cli/cli-script.c (execute_control_command): Update.
9200 * python/python.c (execute_gdb_command): Update.
9201 * solib.c (info_sharedlibrary_command): Update.
9202 * interps.c (interp_ui_out): Remove.
9203 * interps.h (interp_ui_out): Remove.
9204
9205 2018-05-25 Tom Tromey <tom@tromey.com>
9206
9207 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9208 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9209 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9210
9211 2018-05-25 Tom Tromey <tom@tromey.com>
9212
9213 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9214 * interps.c (interp_exec): Use scoped_restore.
9215
9216 2018-05-25 Tom Tromey <tom@tromey.com>
9217
9218 * remote.c (remote_target::remote_file_get): Use
9219 gdb::byte_vector.
9220 (remote_target::remote_file_put): Likewise.
9221
9222 2018-05-25 Tom Tromey <tom@tromey.com>
9223
9224 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9225 a std::string.
9226 (get_pe_section_index, add_pe_exported_sym): Update.
9227 (read_pe_exported_syms): Use gdb::def_vector.
9228
9229 2018-05-25 Tom Tromey <tom@tromey.com>
9230
9231 * frame.c (remove_prev_frame): Remove.
9232 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9233
9234 2018-05-25 Maciej W. Rozycki <macro@mips.com>
9235
9236 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9237 Remove prototypes.
9238 * mips-linux-nat.c (supply_fpregset): Always call
9239 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9240 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9241 `mips_fill_fpregset'.
9242 * mips-linux-tdep.c (mips_supply_fpregset)
9243 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9244 (mips_fill_fpregset_wrapper): Remove functions.
9245 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9246 (mips_linux_fpregset): Remove variable.
9247 (mips_linux_iterate_over_regset_sections): Use
9248 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9249 (mips_linux_o32_sigframe_init): Remove comment.
9250
9251 2018-05-25 Pedro Alves <palves@redhat.com>
9252
9253 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9254 (struct readahead_cache, struct packet_reg, struct
9255 remote_arch_state, class remote_state): Move higher up in the
9256 file.
9257 (remote_target::m_remote_state): Now an object instead of a pointer.
9258 (remote_target::get_remote_state): Adjust.
9259
9260 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
9261
9262 * stack.c (select_and_print_frame): Delete.
9263 (struct function_bounds): Move struct within function.
9264 (func_command): Most content moved into new function
9265 find_frame_for_function, use new function, print result, add
9266 function comment.
9267 (find_frame_for_function): New function, now returns a result.
9268
9269 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9270
9271 * stack.c (iterate_over_block_arg_vars): Fix comment.
9272 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9273
9274 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
9275
9276 PR gdb/23203
9277 * frame.c
9278 (scoped_restore_selected_frame::scoped_restore_selected_frame):
9279 Define.
9280 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9281 Define.
9282 * frame.h (class scoped_restore_selected_frame): New class.
9283 * stack.c (print_frame_local_vars): Remove catching and rethrowing
9284 of any exception, use scoped_restore_selected_frame to restore the
9285 frame instead.
9286
9287 2018-05-24 Pedro Alves <palves@redhat.com>
9288
9289 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9290 override.
9291
9292 2018-05-23 Tom Tromey <tom@tromey.com>
9293
9294 * complaints.c (struct complaints): Remove.
9295 (symfile_complaint_book): Remove.
9296 (series): New global.
9297 (complaint_internal): Update.
9298 (clear_complaints): Update.
9299
9300 2018-05-23 Tom Tromey <tom@tromey.com>
9301
9302 * complaints.c (counters): New global.
9303 (struct complain): Remove.
9304 (struct complaints) <root>: Remove.
9305 (complaint_sentinel): Remove.
9306 (symfile_complaint_book): Update.
9307 (find_complaint) Remove.
9308 (complaint_internal, clear_complaints): Update.
9309
9310 2018-05-23 Tom Tromey <tom@tromey.com>
9311
9312 * complaints.c (struct complain) <file, line>: Remove.
9313 (find_complaint): Remove file, line parameters.
9314 (complaint_internal): Update.
9315
9316 2018-05-23 Tom Tromey <tom@tromey.com>
9317
9318 * complaints.c (vcomplaint): Remove.
9319 (complaint_internal) Merge in contents of vcomplaint.
9320
9321 2018-05-23 Tom Tromey <tom@tromey.com>
9322
9323 * complaints.c (struct complaints) <explanation>: Remove.
9324 (symfile_explanations): Remove.
9325 (symfile_complaint_book): Update.
9326 (vcomplaint): Update.
9327 (struct explanation): Remove.
9328
9329 2018-05-23 Tom Tromey <tom@tromey.com>
9330
9331 * complaints.c (symfile_complaints): Remove.
9332 (complaint_internal): Remove "complaints" parameter.
9333 (clear_complaints, vcomplaint): Remove "c" parameter.
9334 (get_complaints): Remove.
9335 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9336 (dwarf2_debug_line_missing_file_complaint)
9337 (dwarf2_debug_line_missing_end_sequence_complaint)
9338 (dwarf2_complex_location_expr_complaint)
9339 (dwarf2_const_value_length_mismatch_complaint)
9340 (dwarf2_section_buffer_overflow_complaint)
9341 (dwarf2_macro_malformed_definition_complaint)
9342 (dwarf2_invalid_attrib_class_complaint)
9343 (create_addrmap_from_index, dw2_symtab_iter_next)
9344 (dw2_expand_marked_cus)
9345 (dw2_debug_names_iterator::find_vec_in_debug_names)
9346 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9347 (create_debug_type_hash_table, init_cutu_and_read_dies)
9348 (partial_die_parent_scope, add_partial_enumeration)
9349 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9350 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9351 (read_import_statement, read_file_scope, create_dwo_cu_reader)
9352 (create_cus_hash_table, create_dwp_hash_table)
9353 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9354 (dwarf2_rnglists_process, dwarf2_ranges_process)
9355 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9356 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9357 (handle_struct_member_die, process_structure_scope)
9358 (read_array_type, read_common_block, read_module_type)
9359 (read_tag_pointer_type, read_typedef, read_base_type)
9360 (read_subrange_type, load_partial_dies, partial_die_info::read)
9361 (partial_die_info::read, partial_die_info::read)
9362 (partial_die_info::read, read_checked_initial_length_and_offset)
9363 (dwarf2_string_attr, read_formatted_entries)
9364 (dwarf_decode_line_header)
9365 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9366 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9367 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9368 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9369 (get_signatured_type, get_DW_AT_signature_type)
9370 (decode_locdesc, file_file_name, consume_improper_spaces)
9371 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9372 (dwarf_decode_macro_bytes, dwarf_decode_macros)
9373 (dwarf2_symbol_mark_computed, set_die_type)
9374 (read_attribute_value): Update.
9375 * stap-probe.c (handle_stap_probe, get_stap_base_address):
9376 Update.
9377 * dbxread.c (unknown_symtype_complaint)
9378 (lbrac_mismatch_complaint, repeated_header_complaint)
9379 (set_namestring, function_outside_compilation_unit_complaint)
9380 (read_dbx_symtab, process_one_symbol): Update.
9381 * gdbtypes.c (stub_noname_complaint): Update.
9382 * windows-nat.c (handle_unload_dll): Update.
9383 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9384 (decode_base_type): Update.
9385 * xcoffread.c (bf_notfound_complaint, ef_complaint)
9386 (eb_complaint, record_include_begin, record_include_end)
9387 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9388 (process_xcoff_symbol, read_symbol)
9389 (function_outside_compilation_unit_complaint)
9390 (scan_xcoff_symtab): Update.
9391 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9392 * buildsym.c (finish_block_internal, make_blockvector)
9393 (end_symtab_get_static_block, augment_type_symtab): Update.
9394 * dtrace-probe.c (dtrace_process_dof)
9395 (dtrace_static_probe_ops::get_probes): Update.
9396 * complaints.h (struct complaint): Don't declare.
9397 (symfile_complaints): Remove.
9398 (complaint_internal): Remove "complaints" parameter.
9399 (complaint): Likewise.
9400 (clear_complaints): Likewise.
9401 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9402 (reread_symbols): Update.
9403 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9404 (dwarf2_frame_cache, decode_frame_entry): Update.
9405 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9406 * objc-lang.c (lookup_objc_class, lookup_child_selector)
9407 (info_selectors_command): Update.
9408 * macrotab.c (macro_include, check_for_redefinition)
9409 (macro_undef): Update.
9410 * objfiles.c (filter_overlapping_sections): Update.
9411 * stabsread.c (invalid_cpp_abbrev_complaint)
9412 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9413 (define_symbol, error_type, read_type, rs6000_builtin_type)
9414 (stabs_method_name_from_physname, read_member_functions)
9415 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9416 (attach_fields_to_type, complain_about_struct_wipeout)
9417 (read_range_type, read_args, common_block_start)
9418 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9419 Update.
9420 * mdebugread.c (index_complaint, unknown_ext_complaint)
9421 (basic_type_complaint, bad_tag_guess_complaint)
9422 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9423 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9424 (parse_procedure, parse_lines)
9425 (function_outside_compilation_unit_complaint)
9426 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9427 (bad_tag_guess_complaint, reg_value_complaint): Update.
9428 * cp-support.c (demangled_name_complaint): Update.
9429 * macroscope.c (sal_macro_scope): Update.
9430 * dwarf-index-write.c (class debug_names): Update.
9431
9432 2018-05-23 Tom Tromey <tom@tromey.com>
9433
9434 * complaints.c (clear_complaints): Remove "noisy" parameter.
9435 * complaints.h (clear_complaints): Update.
9436 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9437 (reread_symbols): Update.
9438
9439 2018-05-23 Tom Tromey <tom@tromey.com>
9440
9441 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9442 SUBSEQUENT_MESSAGE.
9443 (vcomplaint, clear_complaints): Update.
9444 (symfile_explanations): Remove some messages.
9445
9446 2018-05-23 Tom Tromey <tom@tromey.com>
9447
9448 * complaints.c (internal_complaint): Remove.
9449 * complaints.h (internal_complaint): Remove.
9450
9451 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9452
9453 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9454
9455 2018-05-22 Pedro Alves <palves@redhat.com>
9456
9457 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9458 (remote_fileio_badfd, remote_fileio_return_errno)
9459 (remote_fileio_return_success, remote_fileio_func_open)
9460 (remote_fileio_func_open, remote_fileio_func_close)
9461 (remote_fileio_func_read, remote_fileio_func_write)
9462 (remote_fileio_func_lseek, remote_fileio_func_rename)
9463 (remote_fileio_func_unlink, remote_fileio_func_stat)
9464 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9465 (remote_fileio_func_isatty, remote_fileio_func_system): Add
9466 remote_target parameter.
9467 (remote_fio_func_map) <func>: Add remote_target parameter.
9468 (do_remote_fileio_request, remote_fileio_request):
9469 * remote-fileio.h (remote_fileio_request):
9470 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9471 remote_target parameter.
9472 (remote_notif_process, handle_notification): Adjust to pass down
9473 the remote.
9474 (remote_notif_state_allocate): Add remote_target parameter. Save
9475 it.
9476 * remote-notif.h (struct remote_target): Forward declare.
9477 (struct notif_client) <parse, ack, can_get_pending_events>: Add
9478 remote_target parameter.
9479 (struct remote_notif_state) <remote>: New field.
9480 (remote_notif_ack, remote_notif_parse): Add remote_target
9481 parameter.
9482 (remote_notif_state_allocate, remote_notif_state_allocate): Add
9483 remote_target parameter.
9484 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9485 (threads_listing_context, rmt_thread_action, protocol_feature)
9486 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9487 (packet_result, struct threads_listing_context, remote_state):
9488 Move definitions and declarations higher up.
9489 (remote_target) <~remote_target>: Declare.
9490 (remote_download_command_source, remote_file_put, remote_file_get)
9491 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9492 (remote_hostio_pread_vFile, remote_hostio_send_command)
9493 (remote_hostio_set_filesystem, remote_hostio_open)
9494 (remote_hostio_close, remote_hostio_unlink, remote_state)
9495 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9496 (get_memory_write_packet_size, get_memory_read_packet_size)
9497 (append_pending_thread_resumptions, remote_detach_1)
9498 (append_resumption, remote_resume_with_vcont)
9499 (add_current_inferior_and_thread, wait_ns, wait_as)
9500 (process_stop_reply, remote_notice_new_inferior)
9501 (process_initial_stop_replies, remote_add_thread)
9502 (btrace_sync_conf, remote_btrace_maybe_reopen)
9503 (remove_new_fork_children, kill_new_fork_children)
9504 (discard_pending_stop_replies, stop_reply_queue_length)
9505 (check_pending_events_prevent_wildcard_vcont)
9506 (discard_pending_stop_replies_in_queue, stop_reply)
9507 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9508 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9509 (remote_interrupt_as, remote_interrupt_ns)
9510 (remote_get_noisy_reply, remote_query_attached)
9511 (remote_add_inferior, remote_current_thread, get_current_thread)
9512 (set_thread, set_general_thread, set_continue_thread)
9513 (set_general_process, write_ptid)
9514 (remote_unpack_thread_info_response, remote_get_threadinfo)
9515 (parse_threadlist_response, remote_get_threadlist)
9516 (remote_threadlist_iterator, remote_get_threads_with_ql)
9517 (remote_get_threads_with_qxfer)
9518 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9519 (get_offsets, remote_check_symbols, remote_supported_packet)
9520 (remote_query_supported, remote_packet_size)
9521 (remote_serial_quit_handler, remote_detach_pid)
9522 (remote_vcont_probe, remote_resume_with_hc)
9523 (send_interrupt_sequence, interrupt_query)
9524 (remote_notif_get_pending_events, fetch_register_using_p)
9525 (send_g_packet, process_g_packet, fetch_registers_using_g)
9526 (store_register_using_P, store_registers_using_G)
9527 (set_remote_traceframe, check_binary_download)
9528 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9529 (remote_xfer_live_readonly_partial, remote_read_bytes)
9530 (remote_send_printf, remote_flash_write, readchar)
9531 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9532 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9533 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9534 (extended_remote_disable_randomization, extended_remote_run)
9535 (send_environment_packet, extended_remote_environment_support)
9536 (extended_remote_set_inferior_cwd, remote_write_qxfer)
9537 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9538 (packet_command): Now methods of ...
9539 (remote_target): ... this class.
9540 (m_remote_state) <remote_target>: New field.
9541 (struct remote_state) <stop_reply_queue,
9542 remote_async_inferior_event_token, wait_forever_enabled_p>: New
9543 fields.
9544 (remote_state::remote_state): Allocate stop_reply_queue.
9545 (remote_state): Delete global.
9546 (get_remote_state_raw): Delete.
9547 (remote_target::get_remote_state): Allocate m_remote_state on
9548 demand.
9549 (get_current_remote_target): New.
9550 (remote_ops, extended_remote_ops): Delete.
9551 (wait_forever_enabled_p, remote_async_inferior_event_token):
9552 Delete, moved to struct remote_state.
9553 (remote_target::close): Delete self. Destruction bits split to
9554 ...
9555 (remote_target::~remote_target): ... this.
9556 (show_memory_packet_size): Adjust to use
9557 get_current_remote_target.
9558 (struct protocol_feature) <func>: Add remote_target parameter.
9559 All callers adjusted.
9560 (curr_quit_handler_target): New.
9561 (remote_serial_quit_handler): Reimplement.
9562 (remote_target::open_1): Adjust to use get_current_remote_target.
9563 Heap-allocate remote_target/extended_remote_target instances.
9564 (vcont_builder::vcont_builder): Add remote_target parameter, and
9565 save it in m_remote. All callers adjusted.
9566 (vcont_builder::m_remote): New field.
9567 (vcont_builder::restart, vcont_builder::flush)
9568 (vcont_builder::push_action): Use it.
9569 (remote_target::commit_resume): Use it.
9570 (struct queue_iter_param) <remote>: New field.
9571 (remote_target::remove_new_fork_children): Fill in 'remote' field.
9572 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9573 (check_pending_event_prevents_wildcard_vcont_callback)
9574 (remote_target::check_pending_events_prevent_wildcard_vcont)
9575 (remote_target::discard_pending_stop_replies)
9576 (remote_target::discard_pending_stop_replies_in_queue)
9577 (remote_target::remote_notif_remove_queued_reply): Fill in
9578 'remote' field.
9579 (remote_notif_get_pending_events): New.
9580 (remote_target::readchar, remote_target::remote_serial_write):
9581 Save/restore curr_quit_handler_target.
9582 (putpkt): New.
9583 (kill_new_fork_children): Fill in 'remote' field.
9584 (packet_command): Use get_current_remote_target, defer to
9585 remote_target method of same name.
9586 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9587 parameter, and save it in m_remote. All callers adjusted.
9588 (scoped_remote_fd::release): Use m_remote.
9589 (scoped_remote_fd::m_remote): New field.
9590 (remote_file_put, remote_file_get, remote_file_delete): Use
9591 get_current_remote_target, defer to remote_target method of same
9592 name.
9593 (remote_btrace_reset): Add remote_state paremeter. Update all
9594 callers.
9595 (remote_async_inferior_event_handler). Pass down 'data'.
9596 (remote_new_objfile): Use get_current_remote_target.
9597 (remote_target::vcont_r_supported): New.
9598 (set_range_stepping): Use get_current_remote_target and
9599 remote_target::vcont_r_supported.
9600 (_initialize_remote): Don't allocate 'remote_state' and
9601 'stop_reply_queue' globals.
9602 * remote.h (struct remote_target): Forward declare.
9603 (getpkt, putpkt, remote_notif_get_pending_events): Add
9604 'remote_target' parameter.
9605
9606 2018-05-22 Pedro Alves <palves@redhat.com>
9607
9608 * remote.c (vcont_builder): Now a class. Make all data members
9609 private.
9610 (vcont_builder) <vcont_builder, restart, flush, push_action>:
9611 Declare methods.
9612 (vcont_builder_restart): Rename to ...
9613 (vcont_builder::restart): ... this.
9614 (vcont_builder_flush): Rename to ...
9615 (vcont_builder::flush): ... this.
9616 (vcont_builder_push_action): Rename to ...
9617 (vcont_builder::push_action): ... this.
9618 (remote_target::commit_resume): Adjust.
9619
9620 2018-05-22 Pedro Alves <palves@redhat.com>
9621
9622 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9623 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9624 (get_fixed_memory_packet_size): New.
9625 (get_memory_packet_size): Use it.
9626 (set_memory_packet_size): Don't override the config size with
9627 DEFAULT_MAX_MEMORY_PACKET_SIZE.
9628 (show_memory_packet_size): Use get_fixed_memory_packet_size.
9629 Don't refer to get_memory_packet_size if not connected to a remote
9630 target. Show "(default)" if configured size is 0.
9631
9632 2018-05-22 Pedro Alves <palves@redhat.com>
9633
9634 * remote.c (remote_target::mourn_inferior): Move
9635 discard_pending_stop_replies call here from ...
9636 (_initialize_remote): ... here.
9637
9638 2018-05-22 Pedro Alves <palves@redhat.com>
9639
9640 * remote.c (compare_section_command): Remove set_general_process
9641 call.
9642
9643 2018-05-22 Pedro Alves <palves@redhat.com>
9644
9645 * remote.c (struct packet_reg, struct remote_arch_state):
9646 Move higher up in the file.
9647 (remote_state) <m_arch_states>: Store remote_arch_state values
9648 instead of remote_arch_state pointers.
9649 (remote_state::get_remote_arch_state): Adjust.
9650
9651 2018-05-22 Pedro Alves <palves@redhat.com>
9652
9653 * remote.c: Include <unordered_map>.
9654 (remote_state): Now a class.
9655 (remote_state) <get_remote_arch_state>: Declare method.
9656 <get_remote_arch_state>: New field.
9657 (remote_arch_state) <remote_arch_state>: Declare ctor.
9658 <regs>: Now a unique_ptr.
9659 (remote_gdbarch_data_handle): Delete.
9660 (get_remote_arch_state): Delete.
9661 (remote_state::get_remote_arch_state): New.
9662 (get_remote_state): Adjust to call remote_state's
9663 get_remote_arch_state method.
9664 (init_remote_state): Delete, bits factored out to ...
9665 (remote_arch_state::remote_arch_state): ... this new method.
9666 (get_remote_packet_size, get_memory_packet_size)
9667 (process_g_packet, remote_target::fetch_registers)
9668 (remote_target::prepare_to_store, store_registers_using_G)
9669 (remote_target::store_registers, remote_target::get_trace_status):
9670 Adjust to call remote_state's method.
9671 (_initialize_remote): Remove reference to
9672 remote_gdbarch_data_handle.
9673
9674 2018-05-22 Pedro Alves <palves@redhat.com>
9675
9676 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9677 pread>: New method declarations.
9678 (remote_target::open_1): Adjust.
9679 (readahead_cache_invalidate): Rename to ...
9680 (readahead_cache::invalidate): ... this, and adjust to be a class
9681 method.
9682 (readahead_cache_invalidate_fd): Rename to ...
9683 (readahead_cache::invalidate_fd): ... this, and adjust to be a
9684 class method.
9685 (remote_hostio_pwrite): Adjust.
9686 (remote_hostio_pread_from_cache): Rename to ...
9687 (readahead_cache::pread): ... this, and adjust to be a class
9688 method.
9689 (remote_hostio_close): Adjust.
9690
9691 2018-05-22 Pedro Alves <palves@redhat.com>
9692
9693 * remote.c (remote_hostio_close_cleanup): Delete.
9694 (class scoped_remote_fd): New.
9695 (remote_file_put, remote_file_get): Use it.
9696
9697 2018-05-22 Pedro Alves <palves@redhat.com>
9698
9699 (struct vCont_action_support): Use bool and initialize all fields.
9700 (struct readahead_cache): Initialize all fields.
9701 (remote_state): Use bool and initialize all fields.
9702 (remote_state::remote_state, remote_state::~remote_state): New.
9703 (new_remote_state): Delete.
9704 (_initialize_remote): Use new to allocate remote_state.
9705
9706 2018-05-22 Pedro Alves <palves@redhat.com>
9707 張俊芝 <zjz@zjz.name>
9708
9709 PR gdb/22973
9710 * c-exp.y: Include "c-support.h".
9711 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9712 of tolower. Use c_ident_is_alpha to scan names.
9713 * c-lang.c: Include "c-support.h".
9714 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9715 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9716 * c-support.h: New file, with bits factored out from ...
9717 * cp-name-parser.y: ... this file.
9718 Include "c-support.h".
9719 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9720 c-support.h and renamed.
9721 (symbol_end, yylex): Adjust.
9722
9723 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9724
9725 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9726 parameter type to CORE_ADDR.
9727 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9728 parameter type in declaration to CORE_ADDR.
9729 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9730 target_auxv_search to get AT_HWCAP and use the result to get the
9731 target description.
9732 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9733 to CORE_ADDR. Remove the cast of the return value to unsigned
9734 long. Fix error predicate of target_auxv_search.
9735 (ppc_linux_nat_target::read_description): Change the type of the
9736 hwcap variable to CORE_ADDR.
9737
9738 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9739
9740 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9741 if the size of fpscr is larger than 32 bits.
9742
9743 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9744
9745 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9746 (ppc32_linux_vsxregmap): New global.
9747 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9748 regcache_supply_regset, and regcache_collect_regset.
9749 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9750 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9751 (fetch_vsx_register, store_vsx_register): Remove.
9752 (fetch_vsx_registers): Add regno parameter. Get regset using
9753 ppc_linux_vsxregset. Use regset to supply registers.
9754 (store_vsx_registers): Add regno parameter. Get regset using
9755 ppc_linux_vsxregset. Use regset to collect registers.
9756 (fetch_register): Call fetch_vsx_registers instead of
9757 fetch_vsx_register.
9758 (store_register): Call store_vsx_registers instead of
9759 store_vsx_register.
9760 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9761 new regno parameter.
9762 (store_ppc_registers): Call store_vsx_registers with -1 for the
9763 new regno parameter.
9764 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9765 (ppc_collect_vsxregset): Remove.
9766
9767 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9768
9769 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9770 offset fields.
9771 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9772 for vector register offset fields.
9773 (ppc64_fbsd_reg_offsets): Likewise.
9774 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9775 to vector register offset fields.
9776 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9777 to vector register offset fields.
9778 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9779 vector register offset fields.
9780 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9781 initializers for vector register offset fields.
9782 (rs6000_aix64_reg_offsets): Likewise.
9783 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9784 (ppc_supply_vrregset): Remove.
9785 (ppc_collect_vrregset): Remove.
9786 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9787 (ppc_linux_vrregset) : New function.
9788 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9789 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9790 (ppc32_linux_vrregset): Remove.
9791 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9792 and use result instead of ppc32_linux_vrregset.
9793 (ppc32_linux_reg_offsets): Remove initializers for vector register
9794 offset fields.
9795 (ppc64_linux_reg_offsets): Likewise.
9796 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9797 * ppc-linux-nat.c: Include regset.h.
9798 (gdb_vrregset_t): Adjust comment to account for little-endian
9799 mode.
9800 (supply_vrregset, fill_vrregset): Remove.
9801 (fetch_altivec_register, store_altivec_register): Remove.
9802 (fetch_altivec_registers): Add regno parameter. Get regset using
9803 ppc_linux_vrregset. Use regset to supply registers.
9804 (store_altivec_registers): Add regno parameter. Get regset using
9805 ppc_linux_vrregset. Use regset to collect registers.
9806 (fetch_register): Call fetch_altivec_registers instead of
9807 fetch_altivec_register.
9808 (store_register): Call store_altivec_registers instead of
9809 store_altivec_register.
9810 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9811 the new regno parameter.
9812 (store_ppc_registers): Call store_altivec_registers with -1 for
9813 the new regno parameter.
9814
9815 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9816
9817 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9818 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9819 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9820 (gdb_vrregset_t): Change array type size to
9821 PPC_LINUX_SIZEOF_VRREGSET.
9822 (gdb_vsxregset_t): Change array type size to
9823 PPC_LINUX_SIZEOF_VSXREGSET.
9824 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9825 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9826 PPC_LINUX_SIZEOF_VSXREGSET.
9827
9828 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9829
9830 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9831 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9832 nat/ppc-linux.c.
9833 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9834 ppc_linux_target_wordsize with tid.
9835 (ppc_linux_nat_target::read_description): Call ppc_linux_target
9836 wordsize with tid.
9837 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9838 (ppc64_64bit_inferior_p): Add static and inline specifiers.
9839 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9840 tid parameter. Remove static specifier.
9841 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9842 (ppc_linux_target_wordsize): New declaration.
9843
9844 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9845
9846 * arch/ppc-linux-common.c: New file.
9847 * arch/ppc-linux-common.h: New file.
9848 * arch/ppc-linux-tdesc.h: New file.
9849 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9850 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9851 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9852 arch/ppc-linux-tdesc.h.
9853 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9854 arch/ppc-linux-tdesc.h.
9855 (ppc_linux_nat_target::read_description): Remove target
9856 description matching code. Fill a ppc_linux_features struct and
9857 call ppc_linux_match_description with it. Move comment about ISA
9858 2.05 to ppc-linux-common.c.
9859 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9860 arch/ppc-linux-tdesc.h.
9861 (ppc_linux_core_read_description): Remove target description
9862 matching code. Fill a ppc_linux_features struct and call
9863 ppc_linux_match_description with it.
9864 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9865 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9866 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9867 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9868 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9869 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9870 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9871 (tdesc_powerpc_e500l): Remove.
9872
9873 2018-05-22 Joel Brobecker <brobecker@adacore.com>
9874
9875 * ada-lang.c (catch_assert_command): Pass empty string instead
9876 of NULL for excep_string argument.
9877
9878 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9879
9880 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9881 the width of the requested register exceeds the width of the
9882 `ptrace' data type.
9883
9884 2018-05-21 Tom Tromey <tom@tromey.com>
9885
9886 * printcmd.c (output_command): Remove.
9887 (output_command_const): Rename to output_command.
9888 * valprint.h (output_command): Rename from output_command_const.
9889 * tracepoint.c (trace_dump_actions): Call output_command.
9890
9891 2018-05-21 Tom Tromey <tom@tromey.com>
9892
9893 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9894 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9895 * ada-lang.h (create_ada_exception_catchpoint): Update.
9896 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9897 std::string.
9898 (create_excep_cond_exprs, ~ada_catchpoint)
9899 (should_stop_exception, print_one_exception)
9900 (print_mention_exception, print_recreate_exception): Update.
9901 (ada_get_next_arg): Remove.
9902 (catch_ada_exception_command_split): Use std::string. Change type
9903 of "excep_string", "cond_string".
9904 (catch_ada_exception_command): Update.
9905 (create_ada_exception_catchpoint): Change type of excep_string.
9906 (ada_exception_sal): Remove excep_string parameter.
9907 (~ada_catchpoint): Remove.
9908
9909 2018-05-21 Tom Tromey <tom@tromey.com>
9910
9911 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9912 cleanup.
9913
9914 2018-05-21 Tom Tromey <tom@tromey.com>
9915
9916 * ada-lang.c (ada_exception_message_1, ada_exception_message):
9917 Return unique_xmalloc_ptr.
9918 (print_it_exception): Update.
9919
9920 2018-05-21 Tom Tromey <tom@tromey.com>
9921
9922 * tracepoint.c (trace_dump_actions): Use std::string.
9923
9924 2018-05-21 Tom Tromey <tom@tromey.com>
9925
9926 * symfile.c (reread_symbols): Use std::string for original_name.
9927
9928 2018-05-21 Tom Tromey <tom@tromey.com>
9929
9930 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9931 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
9932 constructor.
9933
9934 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
9935
9936 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9937 instance to...
9938 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9939 * objfiles.c (get_objfile_bfd_data): Allocate
9940 objfile_per_bfd_storage with obstack_new when allocating on
9941 obstack.
9942
9943 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
9944
9945 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9946 OBSTACK_ZALLOC.
9947 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9948 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9949 * mdebugread.c (mdebug_build_psymtabs): Likewise.
9950 (add_pending): Likewise.
9951 (parse_symbol): Likewise.
9952 (parse_partial_symbols): Likewise.
9953 (psymtab_to_symtab_1): Likewise.
9954 (new_psymtab): Likewise.
9955 (elfmdebug_build_psymtabs): Likewise.
9956 * minsyms.c (terminate_minimal_symbol_table): Likewise.
9957 * objfiles.c (get_objfile_bfd_data): Likewise.
9958 (objfile_register_static_link): Likewise.
9959 * psymtab.c (allocate_psymtab): Likewise.
9960 * stabsread.c (read_member_functions): Likewise.
9961 * xcoffread.c (xcoff_end_psymtab): Likewise.
9962
9963 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
9964
9965 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9966 compiler supports std::is_trivially_constructible.
9967 * common/poison.h: Include obstack.h.
9968 (IsMallocable): Define to is_trivially_constructible if the
9969 compiler supports it, define to true_type otherwise.
9970 (xobnew): New.
9971 (XOBNEW): Redefine.
9972 (xobnewvec): New.
9973 (XOBNEWVEC): Redefine.
9974 * gdb_obstack.h (obstack_zalloc): New.
9975 (OBSTACK_ZALLOC): Redefine.
9976 (obstack_calloc): New.
9977 (OBSTACK_CALLOC): Redefine.
9978 (obstack_new): New.
9979 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9980 (gdbarch_obstack): New declaration in gdbarch.h, definition in
9981 gdbarch.c.
9982 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9983 obstack_calloc/obstack_zalloc.
9984 (gdbarch_obstack_zalloc): Remove.
9985 * target-descriptions.c (tdesc_data_init): Use obstack_new.
9986
9987 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9988
9989 * stack.c (backtrace_command_1): Remove useless variable int i.
9990
9991 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9992
9993 * stack.c (print_frame_info): Fix comment.
9994
9995 2018-05-18 Tom Tromey <tom@tromey.com>
9996
9997 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9998 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9999 (~dwarf2_per_objfile): Update
10000 (dwarf2_get_dwz_file): Use new.
10001 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
10002 unique_ptr.
10003
10004 2018-05-18 Tom Tromey <tom@tromey.com>
10005
10006 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
10007 unique_ptr.
10008 * dwarf2read.c (struct dwp_file): Add constructor and
10009 initializers.
10010 (open_and_init_dwp_file): Return a unique_ptr.
10011 (dwarf2_per_objfile, create_dwp_hash_table)
10012 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
10013 (lookup_dwo_unit_in_dwp): Update.
10014 (open_and_init_dwp_file, get_dwp_file): Update.
10015
10016 2018-05-18 Tom Tromey <tom@tromey.com>
10017
10018 * dwarf2read.c (dwarf2_per_objfile): Update.
10019 (struct mapped_index): Add initializers.
10020 (dwarf2_read_index): Use new.
10021 (dw2_symtab_iter_init): Update.
10022 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
10023 unique_ptr.
10024
10025 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
10026
10027 * dwarf2read.c (mapped_index) <total_size>: Remove.
10028
10029 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
10030
10031 * unittests/format_pieces-selftests.c (test_format_specifier):
10032 Add ARI comments.
10033
10034 2018-05-18 Tom Tromey <tom@tromey.com>
10035
10036 * c-typeprint.c (maybe_print_hole): New function.
10037 (c_print_type_struct_field_offset): Update.
10038 (c_type_print_base_struct_union): Call maybe_print_hole.
10039
10040 2018-05-17 Keith Seitz <keiths@redhat.com>
10041
10042 * breakpoint.c (build_bpstat_chain): New function, moved from
10043 bpstat_stop_status.
10044 (bpstat_stop_status): Add optional parameter, `stop_chain'.
10045 If no stop chain is passed, call build_bpstat_chain to build it.
10046 * breakpoint.h (build_bpstat_chain): Declare.
10047 (bpstat_stop_status): Move documentation here from breakpoint.c.
10048 * infrun.c (handle_signal_stop): Before eliding inlined frames,
10049 build the stop chain and pass it to skip_inline_frames.
10050 Pass this stop chain to bpstat_stop_status.
10051 * inline-frame.c: Include breakpoint.h.
10052 (stopped_by_user_bp_inline_frame): New function.
10053 (skip_inline_frames): Add parameter `stop_chain'.
10054 Move documention to inline-frame.h.
10055 If non-NULL, use stopped_by_user_bp_inline_frame to determine
10056 whether the frame should be elided.
10057 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10058 Add moved documentation and update for new parameter.
10059
10060 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
10061
10062 PR cli/14975
10063 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10064 unittests/format_pieces-selftests.c.
10065 * common/format.h (format_piece) <operator==>: New.
10066 (format_pieces) <operator[]>: Remove.
10067 * common/format.c (format_pieces::format_pieces): Handle \e.
10068 * unittests/format_pieces-selftests.c: New.
10069
10070 2018-05-17 Tom Tromey <tom@tromey.com>
10071
10072 PR symtab/23010:
10073 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10074 (dw2_instantiate_symtab): Add skip_partial parameter.
10075 (dw2_find_last_source_symtab, dw2_map_expand_apply)
10076 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10077 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10078 (dw2_expand_symtabs_matching_one)
10079 (dw2_find_pc_sect_compunit_symtab)
10080 (dw2_debug_names_lookup_symbol)
10081 (dw2_debug_names_expand_symtabs_for_function): Update.
10082 (init_cutu_and_read_dies): Add skip_partial parameter.
10083 (process_psymtab_comp_unit, build_type_psymtabs_1)
10084 (process_skeletonless_type_unit, load_partial_comp_unit)
10085 (psymtab_to_symtab_1): Update.
10086 (load_full_comp_unit): Add skip_partial parameter.
10087 (process_imported_unit_die, dwarf2_read_addr_index)
10088 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10089 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10090 (read_signatured_type): Update.
10091
10092 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
10093
10094 * value.c (release_value): Remove unused variable.
10095 (record_latest_value): Likewise.
10096 (access_value_history): Likewise.
10097 (preserve_values): Likewise.
10098
10099 2018-05-17 Tom Tromey <tom@tromey.com>
10100
10101 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10102 Initialize.
10103
10104 2018-05-16 Maciej W. Rozycki <macro@mips.com>
10105
10106 PR gdb/22286
10107 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10108 Also handle registers whose width is not a multiple of
10109 PTRACE_TYPE_RET.
10110 (linux_nat_trad_target::store_register): Likewise.
10111
10112 2018-05-16 Tom Tromey <tom@tromey.com>
10113
10114 * gdbcore.h (core_bfd): Redefine.
10115 * corelow.c (core_target::close): Update.
10116 (core_target_open): Update.
10117 * progspace.h (struct program_space) <cbfd>: Now a
10118 gdb_bfd_ref_ptr.
10119
10120 2018-05-16 Tom Tromey <tom@tromey.com>
10121
10122 PR cli/19551:
10123 * symfile-add-flags.h (enum symfile_add_flags)
10124 <SYMFILE_NOT_FILENAME>: New constant.
10125 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
10126 objfile name from BFD.
10127 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10128 * minidebug.c (find_separate_debug_file_in_section): Put
10129 ".gnu_debugdata" into BFD's file name.
10130
10131 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
10132
10133 * regcache.c (regcache_read_ftype, regcache_write_ftype):
10134 Remove.
10135
10136 2018-05-15 Tamar Christina <tamar.christina@arm.com>
10137
10138 PR binutils/21446
10139 * aarch64-tdep.c (aarch64_analyze_prologue,
10140 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10141 Indicate not interested in errors.
10142
10143 2018-05-15 Maciej W. Rozycki <macro@mips.com>
10144
10145 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10146 Supply the MIPS_ZERO_REGNUM register.
10147
10148 2018-05-15 Maciej W. Rozycki <macro@mips.com>
10149
10150 * mips-tdep.c (mask_address_var): Make variable static.
10151
10152 2018-05-14 Tom Tromey <tom@tromey.com>
10153
10154 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10155
10156 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
10157
10158 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10159 FXSAVE_ADDR for the mxcsr register.
10160
10161 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
10162
10163 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10164
10165 2018-05-11 Pedro Alves <palves@redhat.com>
10166
10167 * corelow.c (core_target) <core_target>: No longer inline.
10168 Initialize m_core_gdbarch, m_core_vec and build the section table
10169 here.
10170 <~core_target>: New.
10171 <core_gdbarch, get_core_register_section>: New methods.
10172 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10173 factored out from ...
10174 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10175 (core_ops): Delete.
10176 (sniff_core_bfd): Add gdbarch parameter.
10177 (core_close): Delete, merged into ...
10178 (core_target::close): ... here. Delete self.
10179 (core_close_cleanup): Delete.
10180 (core_target_open): Allocate a core_target on the heap. Use a
10181 unique_ptr instead of a cleanup. Bits moved into the core_target
10182 ctor. Adjust to use core_target methods instead of globals.
10183 (get_core_register_section): Rename to ...
10184 (core_target::get_core_register_section): ... this and adjust.
10185 (struct get_core_registers_cb_data): New.
10186 (get_core_registers_cb): Use it. Use bool.
10187 (core_target::fetch_registers, core_target::files_info)
10188 (core_target::xfer_partial, core_target::read_description)
10189 (core_target::pid_to, core_target::thread_name): Adjust to
10190 reference class fields instead of globals.
10191 * target.h (struct target_ops_deleter, target_ops_up): New.
10192
10193 2018-05-11 Pedro Alves <palves@redhat.com>
10194
10195 * corefile.c (core_file_command): Move to corelow.c.
10196 * corelow.c (the_core_target): Delete.
10197 (core_file_command): Moved from corefile.c. Check exec_bfd
10198 instead of the_core_target. Use target_detach instead of calling
10199 into the_core_target directly.
10200 (maybe_say_no_core_file_now): New.
10201 (core_target::detach): Use it.
10202 (_initialize_corelow): Remove references to the_core_target.
10203 * gdbcore.h (the_core_target): Delete.
10204
10205 2018-05-11 Tom Tromey <tromey@redhat.com>
10206 Pedro Alves <palves@redhat.com>
10207
10208 * corefile.c (core_bfd): Remove.
10209 * gdbcore.h (core_bfd): Now a macro.
10210 * progspace.h (struct program_space) <cbfd>: New field.
10211
10212 2018-05-11 Tom Tromey <tom@tromey.com>
10213
10214 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10215 gdb::def_vector.
10216
10217 2018-05-10 Tom Tromey <tom@tromey.com>
10218
10219 * configure: Rebuild.
10220 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10221
10222 2018-05-10 Joel Brobecker <brobecker@adacore.com>
10223
10224 PR server/23158:
10225 * regformats/regdat.sh: Adjust script, following the addition
10226 of the new expedite_regs parameter to init_target_desc.
10227
10228 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
10229
10230 PR gdb/23127
10231 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10232 set_gdbarch_significant_addr_bit.
10233 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10234 set_gdbarch_significant_addr_bit.
10235 * utils.c (address_significant): Update to sign extend addr.
10236
10237 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
10238
10239 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10240 (xtensa_linux_init_abi): Limit tdep->num_regs by
10241 tdep->num_nopriv_regs.
10242 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10243 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10244 not initialized.
10245
10246 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
10247
10248 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10249
10250 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
10251
10252 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10253 (I387_MXCSR_INIT_VAL): New constant.
10254 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10255 buffer if it was supplied by the inferior.
10256 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10257 (i387_xsave_get_clear_bv): New function.
10258 (i387_supply_xsave): Only read x87 control registers from the
10259 xsave buffer if the feature is enabled, and the state will have
10260 been written, otherwise, provide a suitable default.
10261 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10262 including x87 control registers. Update control registers if they
10263 have changed from the default value, and mark features as enabled
10264 as required.
10265 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10266
10267 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10268
10269 * spu-tdep.c (info_spu_event_command): Fix output formatting.
10270
10271 2018-05-07 Tom Tromey <tom@tromey.com>
10272
10273 * configure: Rebuild.
10274 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10275
10276 2018-05-07 Tom Tromey <tom@tromey.com>
10277
10278 PR tdep/20362:
10279 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10280 bit. Use correct value for VDIV.
10281
10282 2018-05-04 Tom Tromey <tom@tromey.com>
10283
10284 * configure: Rebuild.
10285 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10286
10287 2018-05-04 Tom Tromey <tom@tromey.com>
10288
10289 * linux-record.c (record_linux_system_call) <case
10290 RECORD_SYS_RECVFROM>: Add "break".
10291
10292 2018-05-04 Tom Tromey <tom@tromey.com>
10293
10294 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10295 Add missing "break".
10296 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10297 Add missing "break".
10298
10299 2018-05-04 Tom Tromey <tom@tromey.com>
10300
10301 * rs6000-tdep.c (ppc_process_record_op4)
10302 (ppc_process_record_op63): Add fall-through comment.
10303
10304 2018-05-04 Tom Tromey <tom@tromey.com>
10305
10306 * i386-tdep.c (i386_process_record): Add fall-through comment.
10307
10308 2018-05-04 Tom Tromey <tom@tromey.com>
10309
10310 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10311 comment.
10312
10313 2018-05-04 Tom Tromey <tom@tromey.com>
10314
10315 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10316 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10317 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10318 comment.
10319 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10320 comment.
10321 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10322 comment.
10323
10324 2018-05-04 Tom Tromey <tom@tromey.com>
10325
10326 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10327
10328 2018-05-04 Tom Tromey <tom@tromey.com>
10329
10330 * s390-tdep.c (s390_process_record): Fix fall-through comments.
10331 * xcoffread.c (scan_xcoff_symtab): Move comment later.
10332 * symfile.c (section_is_mapped): Fix fall-through comment.
10333 * stabsread.c (define_symbol, read_member_functions): Fix
10334 fall-through comment.
10335 * s390-linux-tdep.c (s390_process_record): Fix fall-through
10336 comment.
10337 * remote.c (remote_wait_as): Fix fall-through comment.
10338 * p-exp.y (yylex): Fix fall-through comment.
10339 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10340 comment.
10341 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10342 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10343 * jv-exp.y (yylex): Fix fall-through comment.
10344 * go-exp.y (lex_one_token): Fix fall-through comment.
10345 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10346 fall-through comment.
10347 * f-exp.y (yylex): Fix fall-through comment.
10348 * dwarf2read.c (process_die): Fix fall-through comments.
10349 * dbxread.c (process_one_symbol): Fix fall-through comment.
10350 * d-exp.y (lex_one_token): Fix fall-through comment.
10351 * cp-name-parser.y (yylex): Fix fall-through comment.
10352 * coffread.c (coff_symtab_read): Fix fall-through comment.
10353 * c-exp.y (lex_one_token): Fix fall-through comment.
10354 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10355 comment.
10356 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10357 comment.
10358
10359 2018-05-04 Tom Tromey <tom@tromey.com>
10360
10361 PR python/22730:
10362 * NEWS: Mention gdb.execute change.
10363 * gdbcmd.h (execute_control_command): Don't declare.
10364 * python/python.c (execute_gdb_command): Use read_command_lines_1,
10365 execute_control_commands, execute_control_commands_to_string.
10366 * cli/cli-script.h (execute_control_commands)
10367 (execute_control_commands_to_string): Declare.
10368 (execute_control_command): Add from_tty parameter.
10369 * cli/cli-script.c (execute_control_commands)
10370 (execute_control_commands_to_string): New functions.
10371 (execute_user_command): Use execute_control_commands.
10372 (execute_control_command_1): Add "from_tty" parameter. Update.
10373 (execute_control_command): Likewise.
10374
10375 2018-05-04 Tom Tromey <tom@tromey.com>
10376
10377 PR python/22731:
10378 * NEWS: Mention that breakpoint commands are writable.
10379 * python/py-breakpoint.c (bppy_set_commands): New function.
10380 (breakpoint_object_getset) <"commands">: Use it.
10381
10382 2018-05-04 Tom Tromey <tom@tromey.com>
10383
10384 * tracepoint.c (actions_command): Update.
10385 * mi/mi-cmd-break.c (mi_command_line_array)
10386 (mi_command_line_array_cnt, mi_command_line_array_ptr)
10387 (mi_read_next_line): Remove.
10388 (mi_cmd_break_commands): Update.
10389 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10390 function_view.
10391 * cli/cli-script.c (get_command_line): Update.
10392 (process_next_line): Use function_view. Constify.
10393 (recurse_read_control_structure, read_command_lines)
10394 (read_command_lines_1): Change argument types to function_view.
10395 (do_define_command, document_command): Update.
10396 * breakpoint.h (check_tracepoint_command): Don't declare.
10397 * breakpoint.c (check_tracepoint_command): Remove.
10398 (commands_command_1, create_tracepoint_from_upload): Update.
10399
10400 2018-05-04 Tom Tromey <tom@tromey.com>
10401
10402 PR gdb/11750:
10403 * cli/cli-script.h (enum command_control_type) <define_control>:
10404 New constant.
10405 * cli/cli-script.c (multi_line_command_p): Handle define_control.
10406 (build_command_line, execute_control_command_1)
10407 (process_next_line): Likewise.
10408 (do_define_command): New function, extracted from define_command.
10409 (define_command): Use it.
10410
10411 2018-05-04 Tom Tromey <tom@tromey.com>
10412
10413 * tracepoint.c (actions_command): Update.
10414 * cli/cli-script.h (read_command_lines): Update.
10415 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10416 (MAX_TMPBUF): Remove define.
10417 (define_command): Use string_printf.
10418 (document_command): Likewise.
10419 * breakpoint.c (commands_command_1): Update.
10420
10421 2018-05-04 Tom Tromey <tom@tromey.com>
10422
10423 * top.c (execute_command): Update.
10424 * cli/cli-script.h (print_command_lines): Now varargs.
10425 * cli/cli-script.c (print_command_lines): Now varargs.
10426 (execute_control_command_1) <case while_control, case if_control>:
10427 Update.
10428
10429 2018-05-04 Tom Tromey <tom@tromey.com>
10430
10431 * tracepoint.c (all_tracepoint_actions): Rename from
10432 all_tracepoint_actions_and_cleanup. Change return type.
10433 (actions_command, encode_actions_1, encode_actions)
10434 (trace_dump_actions, tdump_command): Update.
10435 * remote.c (remote_download_command_source): Update.
10436 * python/python.c (gdbpy_eval_from_control_command)
10437 (python_command, python_interactive_command): Update.
10438 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10439 * guile/guile.c (guile_command)
10440 (gdbscm_eval_from_control_command, guile_command): Update.
10441 * compile/compile.c (compile_code_command)
10442 (compile_print_command, compile_to_object): Update.
10443 * cli/cli-script.h (struct command_lines_deleter): New.
10444 (counted_command_line): New typedef.
10445 (struct command_line): Add constructor, destructor.
10446 <body_list>: Remove.
10447 <body_list_0, body_list_1>: New members.
10448 (command_line_up): Remove typedef.
10449 (read_command_lines, read_command_lines_1, get_command_line):
10450 Update.
10451 (copy_command_lines): Don't declare.
10452 * cli/cli-script.c (build_command_line): Use "new".
10453 (get_command_line): Return counted_command_line.
10454 (print_command_lines, execute_user_command)
10455 (execute_control_command_1, while_command, if_command): Update.
10456 (realloc_body_list): Remove.
10457 (process_next_line, recurse_read_control_structure): Update.
10458 (read_command_lines, read_command_lines_1): Return counted_command_line.
10459 (free_command_lines): Use "delete".
10460 (copy_command_lines): Remove.
10461 (define_command, document_command, show_user_1): Update.
10462 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10463 a counted_command_line.
10464 * breakpoint.h (counted_command_line): Remove typedef.
10465 (breakpoint_set_commands): Update.
10466 * breakpoint.c (check_no_tracepoint_commands)
10467 (validate_commands_for_breakpoint): Update.
10468 (breakpoint_set_commands): Change commands to be a
10469 counted_command_line.
10470 (commands_command_1, update_dprintf_command_list)
10471 (create_tracepoint_from_upload): Update.
10472
10473 2018-05-04 Tom Tromey <tom@tromey.com>
10474
10475 * cli/cli-decode.h (cmd_list_element): New constructor.
10476 (~cmd_list_element): New destructor.
10477 (struct cmd_list_element): Add initializers.
10478 * cli/cli-decode.c (do_add_cmd): Use "new".
10479 (delete_cmd): Use "delete".
10480
10481 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
10482 Pedro Alves <palves@redhat.com>
10483
10484 PR breakpoints/19806 and support for PR external/20207.
10485 * NEWS: Mention Aarch64 watchpoint improvements.
10486 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10487 watchpoints and PR external/20207 watchpoints.
10488 * nat/aarch64-linux-hw-point.c
10489 (kernel_supports_any_contiguous_range): New.
10490 (aarch64_watchpoint_offset): New.
10491 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10492 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10493 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10494 (aarch64_align_watchpoint): New parameters aligned_offset_p and
10495 next_addr_orig_p. Support PR external/20207 watchpoints.
10496 (aarch64_downgrade_regs): New.
10497 (aarch64_dr_state_insert_one_point): New parameters offset and
10498 addr_orig.
10499 (aarch64_dr_state_remove_one_point): Likewise.
10500 (aarch64_handle_breakpoint): Update caller.
10501 (aarch64_handle_aligned_watchpoint): Likewise.
10502 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10503 aligned_offset.
10504 (aarch64_linux_set_debug_regs): Remove const from state. Call
10505 aarch64_downgrade_regs.
10506 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10507 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10508 (DR_CONTROL_MASK): ... this.
10509 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10510 (unsigned int aarch64_watchpoint_offset): New prototype.
10511 (aarch64_linux_set_debug_regs): Remove const from state.
10512 * utils.c (align_up, align_down): Move to ...
10513 * common/common-utils.c (align_up, align_down): ... here.
10514 * utils.h (align_up, align_down): Move to ...
10515 * common/common-utils.h (align_up, align_down): ... here.
10516
10517 2018-05-04 Joel Brobecker <brobecker@adacore.com>
10518
10519 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10520 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10521 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10522 Re-implement to match the ABI as summarized in GCC's
10523 gcc/config/sparc/sparc.c. All callers updated.
10524 (sparc32_store_arguments): Remove assertion.
10525
10526 2018-05-04 Tom Tromey <tom@tromey.com>
10527
10528 * printcmd.c: Don't include tui.h.
10529 (decode_format): Use skip_spaces.
10530
10531 2018-05-04 Tom Tromey <tom@tromey.com>
10532
10533 PR gdb/22619:
10534 * printcmd.c (last_count): New global.
10535 (x_command): Use saved count when repeating.
10536
10537 2018-05-04 Tom Tromey <tom@tromey.com>
10538
10539 * nto-procfs.c (do_closedir_cleanup): Remove.
10540 (procfs_pidlist): Use gdb_dir_up.
10541 * procfs.c (do_closedir_cleanup): Remove.
10542 (proc_update_threads): Use gdb_dir_up.
10543 * common/filestuff.h (struct gdb_dir_deleter): New.
10544 (gdb_dir_up): New typedef.
10545
10546 2018-05-04 Tom Tromey <tom@tromey.com>
10547
10548 * ada-lang.c (print_mention_exception): Use std::string.
10549
10550 2018-05-04 Tom Tromey <tom@tromey.com>
10551
10552 * ada-lang.c (create_excep_cond_exprs): Update.
10553 (ada_exception_catchpoint_cond_string): Use std::string.
10554
10555 2018-05-04 Tom Tromey <tom@tromey.com>
10556
10557 * ada-lang.c (xget_renaming_scope): Return std::string.
10558 (old_renaming_is_invisible): Update.
10559
10560 2018-05-04 Tom Tromey <tom@tromey.com>
10561
10562 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10563 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10564
10565 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
10566
10567 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10568
10569 2018-05-04 Tom Tromey <tom@tromey.com>
10570
10571 * remote.c (remote_query_supported_append): Change type.
10572 (remote_check_symbols): Update.
10573
10574 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
10575
10576 PR gdb/11420
10577 * configure.ac: Prepend libpython.
10578 * python/python-config.py: Likewise.
10579 * configure: Regenerate.
10580
10581 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
10582
10583 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10584
10585 2018-05-03 Pedro Alves <palves@redhat.com>
10586
10587 * s390-linux-nat.c
10588 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10589 override. Write 'true' instead of '1'.
10590 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10591 declaration.
10592
10593 2018-05-02 Pedro Alves <palves@redhat.com>
10594
10595 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10596 add_inf_child_target.
10597 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10598 add_inf_child_target.
10599 * aix-thread.c (aix_thread_target_info): New.
10600 (aix_thread_target) <shortname, longname, doc>: Delete.
10601 <info>: New.
10602 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10603 add_inf_child_target.
10604 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10605 add_inf_child_target.
10606 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10607 add_inf_child_target.
10608 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10609 add_inf_child_target.
10610 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10611 add_inf_child_target.
10612 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10613 add_inf_child_target.
10614 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10615 add_inf_child_target.
10616 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10617 add_inf_child_target.
10618 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10619 add_inf_child_target.
10620 * bfd-target.c (target_bfd_target_info): New.
10621 (target_bfd) <shortname, longname, doc>: Delete.
10622 <info>: New.
10623 * bsd-kvm.c (bsd_kvm_target_info): New.
10624 (bsd_kvm_target) <shortname, longname, doc>: Delete.
10625 <info>: New.
10626 (bsd_kvm_target::open): Rename to ...
10627 (bsd_kvm_target_open): ... this. Adjust.
10628 * bsd-uthread.c (bsd_uthread_target_info): New.
10629 (bsd_uthread_target) <shortname, longname, doc>: Delete.
10630 <info>: New.
10631 * corefile.c (core_file_command): Adjust.
10632 * corelow.c (core_target_info): New.
10633 (core_target) <shortname, longname, doc>: Delete.
10634 <info>: New.
10635 (core_target::open): Rename to ...
10636 (core_target_open): ... this. Adjust.
10637 * ctf.c (ctf_target_info): New.
10638 (ctf_target) <shortname, longname, doc>: Delete.
10639 <info>: New.
10640 (ctf_target::open): Rename to ...
10641 (ctf_target_open): ... this.
10642 (_initialize_ctf): Adjust.
10643 * exec.c (exec_target_info): New.
10644 (exec_target) <shortname, longname, doc>: Delete.
10645 <info>: New.
10646 (exec_target::open): Rename to ...
10647 (exec_target_open): ... this.
10648 * gdbcore.h (core_target_open): Declare.
10649 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10650 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10651 add_inf_child_target.
10652 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10653 add_inf_child_target.
10654 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10655 add_inf_child_target.
10656 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10657 add_inf_child_target.
10658 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10659 add_inf_child_target.
10660 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10661 add_inf_child_target.
10662 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10663 add_inf_child_target.
10664 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10665 add_inf_child_target.
10666 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10667 add_inf_child_target.
10668 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10669 add_inf_child_target.
10670 * inf-child.c (inf_child_target_info): New.
10671 (inf_child_target::info): New.
10672 (inf_child_open_target): Remove 'target' parameter. Use
10673 get_native_target instead.
10674 (inf_child_target::open): Delete.
10675 (add_inf_child_target): New.
10676 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10677 Delete.
10678 <info>: New.
10679 (add_inf_child_target): Declare.
10680 (inf_child_open_target): Declare.
10681 * linux-thread-db.c (thread_db_target_info): New.
10682 (thread_db_target) <shortname, longname, doc>: Delete.
10683 <info>: New.
10684 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10685 add_inf_child_target.
10686 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10687 add_inf_child_target.
10688 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10689 add_inf_child_target.
10690 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10691 add_inf_child_target.
10692 * make-target-delegates (print_class): Adjust.
10693 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10694 add_inf_child_target.
10695 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10696 add_inf_child_target.
10697 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10698 add_inf_child_target.
10699 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10700 add_inf_child_target.
10701 * nto-procfs.c (nto_native_target_info): New.
10702 (nto_procfs_target_native) <shortname, longname, doc>:
10703 Delete.
10704 <info>: New.
10705 (nto_procfs_target_info): New.
10706 (nto_procfs_target_procfs) <shortname, longname, doc>:
10707 Delete.
10708 <info>: New.
10709 (init_procfs_targets): Adjust.
10710 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10711 add_inf_child_target.
10712 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10713 add_inf_child_target.
10714 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10715 add_inf_child_target.
10716 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10717 add_inf_child_target.
10718 * ravenscar-thread.c (ravenscar_target_info): New.
10719 (ravenscar_thread_target) <shortname, longname, doc>:
10720 Delete.
10721 <info>: New.
10722 * record-btrace.c (record_btrace_target_info):
10723 (record_btrace_target) <shortname, longname, doc>: Delete.
10724 <info>: New.
10725 (record_btrace_target::open): Rename to ...
10726 (record_btrace_target_open): ... this. Adjust.
10727 * record-full.c (record_longname, record_doc): New.
10728 (record_full_base_target) <shortname, longname, doc>: Delete.
10729 <info>: New.
10730 (record_full_target_info): New.
10731 (record_full_target): <shortname>: Delete.
10732 <info>: New.
10733 (record_full_core_open_1, record_full_open_1): Update comments.
10734 (record_full_base_target::open): Rename to ...
10735 (record_full_open): ... this.
10736 (cmd_record_full_restore): Update.
10737 (_initialize_record_full): Update.
10738 * remote-sim.c (remote_sim_target_info): New.
10739 (gdbsim_target) <shortname, longname, doc>: Delete.
10740 <info>: New.
10741 (gdbsim_target::open): Rename to ...
10742 (gdbsim_target_open): ... this.
10743 (_initialize_remote_sim): Adjust.
10744 * remote.c (remote_doc): New.
10745 (remote_target_info): New.
10746 (remote_target) <shortname, longname, doc>: Delete.
10747 <info>: New.
10748 (extended_remote_target_info): New.
10749 (extended_remote_target) <shortname, longname, doc>: Delete.
10750 <info>: New.
10751 (remote_target::open_1): Make static. Adjust.
10752 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10753 * s390-linux-nat.c (_initialize_s390_nat): Use
10754 add_inf_child_target.
10755 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10756 add_inf_child_target.
10757 * sol-thread.c (thread_db_target_info): New.
10758 (sol_thread_target) <shortname, longname, doc>: Delete.
10759 <info>: New.
10760 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10761 add_inf_child_target.
10762 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10763 add_inf_child_target.
10764 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10765 add_inf_child_target.
10766 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10767 add_inf_child_target.
10768 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10769 add_inf_child_target.
10770 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10771 add_inf_child_target.
10772 * spu-linux-nat.c (_initialize_spu_nat): Use
10773 add_inf_child_target.
10774 * spu-multiarch.c (spu_multiarch_target_info): New.
10775 (spu_multiarch_target) <shortname, longname, doc>: Delete.
10776 <info>: New.
10777 * target-delegates.c: Regenerate.
10778 * target.c: Include <unordered_map>.
10779 (target_ops_p): Delete.
10780 (DEF_VEC_P(target_ops_p)): Delete.
10781 (target_factories): New.
10782 (test_target_info): New.
10783 (test_target_ops::info): New.
10784 (open_target): Adjust to use target_factories.
10785 (add_target_with_completer): Rename to ...
10786 (add_target): ... this. Change prototype. Register target_info
10787 and open callback in target_factories. Register target_info in
10788 command context instead of target_ops.
10789 (add_target): Delete old implementation.
10790 (add_deprecated_target_alias): Change prototype. Adjust.
10791 (the_native_target): New.
10792 (set_native_target, get_native_target): New.
10793 (find_default_run_target): Use the_native_target.
10794 (find_attach_target, find_run_target): Simplify.
10795 (target_ops::open): Delete.
10796 (dummy_target_info): New.
10797 (dummy_target::shortname, dummy_target::longname)
10798 (dummy_target::doc): Delete.
10799 (dummy_target::info): New.
10800 (debug_target::shortname, debug_target::longname)
10801 (debug_target::doc): Delete.
10802 (debug_target::info): New.
10803 * target.h (struct target_info): New.
10804 (target_ops::~target_ops): Add comment.
10805 (target_ops::info): New.
10806 (target_ops::shortname, target_ops::longname, target_ops::doc): No
10807 longer virtual. Implement in terms of target_info.
10808 (set_native_target, get_native_target): Declare.
10809 (target_open_ftype): New.
10810 (add_target, add_target_with_completer)
10811 (add_deprecated_target_alias): Change prototype.
10812 (test_target) <shortname, longname, doc>: Delete.
10813 <info>: New.
10814 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10815 add_inf_child_target.
10816 * tracefile-tfile.c (tfile_target_info): New.
10817 (tfile_target) <shortname, longname, doc>: Delete.
10818 <info>: New.
10819 (tfile_target::open): Rename to ...
10820 (tfile_target_open): ... this.
10821 (_initialize_tracefile_tfile): Adjust.
10822 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10823 add_inf_child_target.
10824 * windows-nat.c (_initialize_windows_nat): Use
10825 add_inf_child_target.
10826 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10827 add_inf_child_target.
10828
10829 2018-05-02 Pedro Alves <palves@redhat.com>
10830
10831 * linux-nat.h (linux_nat_target) <low_new_thread,
10832 low_delete_thread, low_new_fork, low_forget_process,
10833 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10834 New virtual methods.
10835 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10836 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10837 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10838 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10839 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10840 Delete.
10841 * linux-fork.c (delete_fork): Adjust to call low method.
10842 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10843 (linux_nat_new_fork, linux_nat_forget_process_hook)
10844 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10845 (linux_nat_status_is_event):
10846 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10847 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10848 to call low method.
10849 (sigtrap_is_event): Rename to ...
10850 (linux_nat_target::low_status_is_event): ... this.
10851 (linux_nat_set_status_is_event): Delete.
10852 (save_stop_reason, linux_nat_wait_1)
10853 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10854 low methods.
10855 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10856 (linux_nat_set_new_fork, linux_nat_set_forget_process)
10857 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10858 (linux_nat_set_prepare_to_resume): Delete.
10859 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10860 low virtual methods.
10861 * amd64-linux-nat.c: Likewise.
10862 * arm-linux-nat.c: Likewise.
10863 * i386-linux-nat.c: Likewise.
10864 * ia64-linux-nat.c: Likewise.
10865 * mips-linux-nat.c: Likewise.
10866 * ppc-linux-nat.c: Likewise.
10867 * s390-linux-nat.c: Likewise.
10868 * sparc64-linux-nat.c: Likewise.
10869 * x86-linux-nat.c: Likewise.
10870 * x86-linux-nat.h: Include "nat/x86-linux.h".
10871 (x86_linux_nat_target) <low_new_fork, low_forget_process,
10872 low_prepare_to_resume, low_new_thread, low_delete_thread>:
10873 Override methods.
10874
10875 2018-05-02 Pedro Alves <palves@redhat.com>
10876
10877 * target.h (target_ops)
10878 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10879 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10880 stopped_by_watchpoint, have_continuable_watchpoint,
10881 stopped_data_address, watchpoint_addr_within_range,
10882 can_accel_watchpoint_condition, can_run, thread_alive,
10883 has_all_memory, has_memory, has_stack, has_registers,
10884 has_execution, can_async_p, is_async_p, supports_non_stop,
10885 always_non_stop_p, can_execute_reverse, supports_multi_process,
10886 supports_enable_disable_tracepoint,
10887 supports_disable_randomization, supports_string_tracing,
10888 supports_evaluation_of_breakpoint_conditions,
10889 can_run_breakpoint_commands, filesystem_is_local,
10890 can_download_tracepoint, get_trace_state_variable_value,
10891 set_trace_notes, get_tib_address, use_agent, can_use_agent,
10892 record_is_replaying, record_will_replay,
10893 augmented_libraries_svr4_read>: Adjust to return bool.
10894 * aarch64-linux-nat.c: All implementations adjusted.
10895 * aix-thread.c: All implementations adjusted.
10896 * arm-linux-nat.c: All implementations adjusted.
10897 * breakpoint.c: All implementations adjusted.
10898 * bsd-kvm.c: All implementations adjusted.
10899 * bsd-uthread.c: All implementations adjusted.
10900 * corelow.c: All implementations adjusted.
10901 * ctf.c: All implementations adjusted.
10902 * darwin-nat.c: All implementations adjusted.
10903 * darwin-nat.h: All implementations adjusted.
10904 * exec.c: All implementations adjusted.
10905 * fbsd-nat.c: All implementations adjusted.
10906 * fbsd-nat.h: All implementations adjusted.
10907 * gnu-nat.c: All implementations adjusted.
10908 * gnu-nat.h: All implementations adjusted.
10909 * go32-nat.c: All implementations adjusted.
10910 * ia64-linux-nat.c: All implementations adjusted.
10911 * inf-child.c: All implementations adjusted.
10912 * inf-child.h: All implementations adjusted.
10913 * inf-ptrace.c: All implementations adjusted.
10914 * inf-ptrace.h: All implementations adjusted.
10915 * linux-nat.c: All implementations adjusted.
10916 * linux-nat.h: All implementations adjusted.
10917 * mips-linux-nat.c: All implementations adjusted.
10918 * nto-procfs.c: All implementations adjusted.
10919 * ppc-linux-nat.c: All implementations adjusted.
10920 * procfs.c: All implementations adjusted.
10921 * ravenscar-thread.c: All implementations adjusted.
10922 * record-btrace.c: All implementations adjusted.
10923 * record-full.c: All implementations adjusted.
10924 * remote-sim.c: All implementations adjusted.
10925 * remote.c: All implementations adjusted.
10926 * s390-linux-nat.c: All implementations adjusted.
10927 * sol-thread.c: All implementations adjusted.
10928 * spu-multiarch.c: All implementations adjusted.
10929 * target-delegates.c: All implementations adjusted.
10930 * target.c: All implementations adjusted.
10931 * target.h: All implementations adjusted.
10932 * tracefile-tfile.c: All implementations adjusted.
10933 * tracefile.c: All implementations adjusted.
10934 * tracefile.h: All implementations adjusted.
10935 * windows-nat.c: All implementations adjusted.
10936 * x86-linux-nat.h: All implementations adjusted.
10937 * x86-nat.h: All implementations adjusted.
10938
10939 2018-05-02 Pedro Alves <palves@redhat.com>
10940
10941 * make-target-delegates (scan_target_h): Don't trim lines here.
10942 Replace sequences of tabs and/or whitespace with a single
10943 whitespace.
10944 (top level, parsing methods): Trim each line before processing it
10945 here.
10946
10947 2018-05-02 Pedro Alves <palves@redhat.com>
10948 John Baldwin <jhb@freebsd.org>
10949
10950 * target.h (enum strata) <debug_stratum>: New.
10951 (struct target_ops) <all delegation methods>: Replace by C++
10952 virtual methods, and drop "to_" prefix. All references updated
10953 throughout.
10954 <to_shortname, to_longname, to_doc, to_data,
10955 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10956 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10957 virtual methods. All references updated throughout.
10958 <can_attach, supports_terminal_ours, can_create_inferior,
10959 get_thread_control_capabilities, attach_no_wait>: New
10960 virtual methods.
10961 <insert_breakpoint, remove_breakpoint>: Now
10962 TARGET_DEFAULT_NORETURN methods.
10963 <info_proc>: Now returns bool.
10964 <to_magic>: Delete.
10965 (OPS_MAGIC): Delete.
10966 (current_target): Delete. All references replaced by references
10967 to ...
10968 (target_stack): ... this. New.
10969 (target_shortname, target_longname): Adjust.
10970 (target_can_run): Now a function declaration.
10971 (default_child_has_all_memory, default_child_has_memory)
10972 (default_child_has_stack, default_child_has_registers)
10973 (default_child_has_execution): Remove target_ops parameter.
10974 (complete_target_initialization): Delete.
10975 (memory_breakpoint_target): New template class.
10976 (test_target_ops): Refactor as a C++ class with virtual methods.
10977 * make-target-delegates (NAME_PART): Tighten.
10978 (POINTER_PART, CP_SYMBOL): New.
10979 (SIMPLE_RETURN_PART): Reimplement.
10980 (VEC_RETURN_PART): Expect less.
10981 (RETURN_PART, VIRTUAL_PART): New.
10982 (METHOD): Adjust to C++ virtual methods.
10983 (scan_target_h): Remove reference to C99.
10984 (dname): Output "target_ops::" prefix.
10985 (write_function_header): Adjust to output a C++ class method.
10986 (write_declaration): New.
10987 (write_delegator): Adjust to output a C++ class method.
10988 (tdname): Output "dummy_target::" prefix.
10989 (write_tdefault, write_debugmethod): Adjust to output a C++ class
10990 method.
10991 (tdefault_names, debug_names): Delete.
10992 (return_types, tdefaults, styles, argtypes_array): New.
10993 (top level): All methods are delegators.
10994 (print_class): New.
10995 (top level): Print dummy_target and debug_target classes.
10996 * target-delegates.c: Regenerate.
10997 * target-debug.h (target_debug_print_enum_info_proc_what)
10998 (target_debug_print_thread_control_capabilities)
10999 (target_debug_print_thread_info_p): New.
11000 * target.c (dummy_target): Delete.
11001 (the_dummy_target, the_debug_target): New.
11002 (target_stack): Now extern.
11003 (set_targetdebug): Push/unpush debug target.
11004 (default_child_has_all_memory, default_child_has_memory)
11005 (default_child_has_stack, default_child_has_registers)
11006 (default_child_has_execution): Remove target_ops parameter.
11007 (complete_target_initialization): Delete.
11008 (add_target_with_completer): No longer call
11009 complete_target_initialization.
11010 (target_supports_terminal_ours): Use regular delegation.
11011 (update_current_target): Delete.
11012 (push_target): No longer check magic number. Don't call
11013 update_current_target.
11014 (unpush_target): Don't call update_current_target.
11015 (target_is_pushed): No longer check magic number.
11016 (target_require_runnable): Skip for all stratums over
11017 process_stratum.
11018 (target_ops::info_proc): New.
11019 (target_info_proc): Use find_target_at and
11020 find_default_run_target.
11021 (target_supports_disable_randomization): Use regular delegation.
11022 (target_get_osdata): Use find_target_at.
11023 (target_ops::open, target_ops::close, target_ops::can_attach)
11024 (target_ops::attach, target_ops::can_create_inferior)
11025 (target_ops::create_inferior, target_ops::can_run)
11026 (target_can_run): New.
11027 (default_fileio_target): Use regular delegation.
11028 (target_ops::fileio_open, target_ops::fileio_pwrite)
11029 (target_ops::fileio_pread, target_ops::fileio_fstat)
11030 (target_ops::fileio_close, target_ops::fileio_unlink)
11031 (target_ops::fileio_readlink): New.
11032 (target_fileio_open_1, target_fileio_unlink)
11033 (target_fileio_readlink): Always call the target method. Handle
11034 FILEIO_ENOSYS.
11035 (return_zero, return_zero_has_execution): Delete.
11036 (init_dummy_target): Delete.
11037 (dummy_target::dummy_target, dummy_target::shortname)
11038 (dummy_target::longname, dummy_target::doc)
11039 (debug_target::debug_target, debug_target::shortname)
11040 (debug_target::longname, debug_target::doc): New.
11041 (target_supports_delete_record): Use regular delegation.
11042 (setup_target_debug): Delete.
11043 (maintenance_print_target_stack): Skip debug_stratum.
11044 (initialize_targets): Instantiate the_dummy_target and
11045 the_debug_target.
11046 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
11047 use target_stack.
11048 (target_auxv_search, fprint_target_auxv): Adjust.
11049 (info_auxv_command): Adjust to use target_stack.
11050 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11051 * exceptions.c (print_flush): Handle a NULL target_stack.
11052 * regcache.c (target_ops_no_register): Refactor as class with
11053 virtual methods.
11054
11055 * exec.c (exec_target): New class.
11056 (exec_ops): Now an exec_target.
11057 (exec_open, exec_close_1, exec_get_section_table)
11058 (exec_xfer_partial, exec_files_info, exec_has_memory)
11059 (exec_make_note_section): Refactor as exec_target methods.
11060 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11061 Delete.
11062 (exec_target::find_memory_regions): New.
11063 (_initialize_exec): Don't call init_exec_ops.
11064 * gdbcore.h (exec_file_clear): Delete.
11065
11066 * corefile.c (core_target): Delete.
11067 (core_file_command): Adjust.
11068 * corelow.c (core_target): New class.
11069 (the_core_target): New.
11070 (core_close): Remove target_ops parameter.
11071 (core_close_cleanup): Adjust.
11072 (core_target::close): New.
11073 (core_open, core_detach, get_core_registers, core_files_info)
11074 (core_xfer_partial, core_thread_alive, core_read_description)
11075 (core_pid_to_str, core_thread_name, core_has_memory)
11076 (core_has_stack, core_has_registers, core_info_proc): Rework as
11077 core_target methods.
11078 (ignore, core_remove_breakpoint, init_core_ops): Delete.
11079 (_initialize_corelow): Initialize the_core_target.
11080 * gdbcore.h (core_target): Delete.
11081 (the_core_target): New.
11082
11083 * ctf.c: (ctf_target): New class.
11084 (ctf_ops): Now a ctf_target.
11085 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11086 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11087 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11088 methods.
11089 (init_ctf_ops): Delete.
11090 (_initialize_ctf): Don't call it.
11091 * tracefile-tfile.c (tfile_target): New class.
11092 (tfile_ops): Now a tfile_target.
11093 (tfile_open, tfile_close, tfile_files_info)
11094 (tfile_get_tracepoint_status, tfile_trace_find)
11095 (tfile_fetch_registers, tfile_xfer_partial)
11096 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11097 Refactor as tfile_target methods.
11098 (tfile_xfer_partial_features): Remove target_ops parameter.
11099 (init_tfile_ops): Delete.
11100 (_initialize_tracefile_tfile): Don't call it.
11101 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11102 (tracefile_has_stack, tracefile_has_registers)
11103 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11104 tracefile_target methods.
11105 (init_tracefile_ops): Delete.
11106 (tracefile_target::tracefile_target): New.
11107 * tracefile.h: Include "target.h".
11108 (tracefile_target): New class.
11109 (init_tracefile_ops): Delete.
11110
11111 * spu-multiarch.c (spu_multiarch_target): New class.
11112 (spu_ops): Now a spu_multiarch_target.
11113 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11114 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11115 (spu_search_memory, spu_mourn_inferior): Refactor as
11116 spu_multiarch_target methods.
11117 (init_spu_ops): Delete.
11118 (_initialize_spu_multiarch): Remove references to init_spu_ops,
11119 complete_target_initialization.
11120
11121 * ravenscar-thread.c (ravenscar_thread_target): New class.
11122 (ravenscar_ops): Now a ravenscar_thread_target.
11123 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11124 (ravenscar_thread_alive, ravenscar_pid_to_str)
11125 (ravenscar_fetch_registers, ravenscar_store_registers)
11126 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11127 (ravenscar_stopped_by_hw_breakpoint)
11128 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11129 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11130 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11131 methods.
11132 (init_ravenscar_thread_ops): Delete.
11133 (_initialize_ravenscar): Remove references to
11134 init_ravenscar_thread_ops and complete_target_initialization.
11135
11136 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11137 (bsd_uthread_target): New class.
11138 (bsd_uthread_ops): Now a bsd_uthread_target.
11139 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11140 (bsd_uthread_close, bsd_uthread_mourn_inferior)
11141 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11142 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11143 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11144 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11145 (bsd_uthread_target): Delete function.
11146 (_initialize_bsd_uthread): Remove reference to
11147 complete_target_initialization.
11148
11149 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
11150 (target_bfd): ... this new class.
11151 (target_bfd_xfer_partial, target_bfd_get_section_table)
11152 (target_bfd_close): Refactor as target_bfd methods.
11153 (target_bfd::~target_bfd): New.
11154 (target_bfd_reopen): Adjust.
11155 (target_bfd::close): New.
11156
11157 * record-btrace.c (record_btrace_target): New class.
11158 (record_btrace_ops): Now a record_btrace_target.
11159 (record_btrace_open, record_btrace_stop_recording)
11160 (record_btrace_disconnect, record_btrace_close)
11161 (record_btrace_async, record_btrace_info)
11162 (record_btrace_insn_history, record_btrace_insn_history_range)
11163 (record_btrace_insn_history_from, record_btrace_call_history)
11164 (record_btrace_call_history_range)
11165 (record_btrace_call_history_from, record_btrace_record_method)
11166 (record_btrace_is_replaying, record_btrace_will_replay)
11167 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11168 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11169 (record_btrace_store_registers, record_btrace_prepare_to_store)
11170 (record_btrace_to_get_unwinder)
11171 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11172 (record_btrace_commit_resume, record_btrace_wait)
11173 (record_btrace_stop, record_btrace_can_execute_reverse)
11174 (record_btrace_stopped_by_sw_breakpoint)
11175 (record_btrace_supports_stopped_by_sw_breakpoint)
11176 (record_btrace_stopped_by_hw_breakpoint)
11177 (record_btrace_supports_stopped_by_hw_breakpoint)
11178 (record_btrace_update_thread_list, record_btrace_thread_alive)
11179 (record_btrace_goto_begin, record_btrace_goto_end)
11180 (record_btrace_goto, record_btrace_stop_replaying_all)
11181 (record_btrace_execution_direction)
11182 (record_btrace_prepare_to_generate_core)
11183 (record_btrace_done_generating_core): Refactor as
11184 record_btrace_target methods.
11185 (init_record_btrace_ops): Delete.
11186 (_initialize_record_btrace): Remove reference to
11187 init_record_btrace_ops.
11188 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11189 the execution_direction global.
11190 (record_full_base_target, record_full_target)
11191 (record_full_core_target): New classes.
11192 (record_full_ops): Now a record_full_target.
11193 (record_full_core_ops): Now a record_full_core_target.
11194 (record_full_target::detach, record_full_target::disconnect)
11195 (record_full_core_target::disconnect)
11196 (record_full_target::mourn_inferior, record_full_target::kill):
11197 New.
11198 (record_full_open, record_full_close, record_full_async): Refactor
11199 as methods of the record_full_base_target class.
11200 (record_full_resume, record_full_commit_resume): Refactor
11201 as methods of the record_full_target class.
11202 (record_full_wait, record_full_stopped_by_watchpoint)
11203 (record_full_stopped_data_address)
11204 (record_full_stopped_by_sw_breakpoint)
11205 (record_full_supports_stopped_by_sw_breakpoint)
11206 (record_full_stopped_by_hw_breakpoint)
11207 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11208 methods of the record_full_base_target class.
11209 (record_full_store_registers, record_full_xfer_partial)
11210 (record_full_insert_breakpoint, record_full_remove_breakpoint):
11211 Refactor as methods of the record_full_target class.
11212 (record_full_can_execute_reverse, record_full_get_bookmark)
11213 (record_full_goto_bookmark, record_full_execution_direction)
11214 (record_full_record_method, record_full_info, record_full_delete)
11215 (record_full_is_replaying, record_full_will_replay)
11216 (record_full_goto_begin, record_full_goto_end, record_full_goto)
11217 (record_full_stop_replaying): Refactor as methods of the
11218 record_full_base_target class.
11219 (record_full_core_resume, record_full_core_kill)
11220 (record_full_core_fetch_registers)
11221 (record_full_core_prepare_to_store)
11222 (record_full_core_store_registers, record_full_core_xfer_partial)
11223 (record_full_core_insert_breakpoint)
11224 (record_full_core_remove_breakpoint)
11225 (record_full_core_has_execution): Refactor
11226 as methods of the record_full_core_target class.
11227 (record_full_base_target::supports_delete_record): New.
11228 (init_record_full_ops): Delete.
11229 (init_record_full_core_ops): Delete.
11230 (record_full_save): Refactor as method of the
11231 record_full_base_target class.
11232 (_initialize_record_full): Remove references to
11233 init_record_full_ops and init_record_full_core_ops.
11234
11235 * remote.c (remote_target, extended_remote_target): New classes.
11236 (remote_ops): Now a remote_target.
11237 (extended_remote_ops): Now an extended_remote_target.
11238 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11239 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11240 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11241 (remote_pass_signals, remote_set_syscall_catchpoint)
11242 (remote_program_signals, )
11243 (remote_thread_always_alive): Remove target_ops parameter.
11244 (remote_thread_alive, remote_thread_name)
11245 (remote_update_thread_list, remote_threads_extra_info)
11246 (remote_static_tracepoint_marker_at)
11247 (remote_static_tracepoint_markers_by_strid)
11248 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11249 (remote_open): Refactor as methods of remote_target.
11250 (extended_remote_open, extended_remote_detach)
11251 (extended_remote_attach, extended_remote_post_attach):
11252 (extended_remote_supports_disable_randomization)
11253 (extended_remote_create_inferior): : Refactor as method of
11254 extended_remote_target.
11255 (remote_set_permissions, remote_open_1, remote_detach)
11256 (remote_follow_fork, remote_follow_exec, remote_disconnect)
11257 (remote_resume, remote_commit_resume, remote_stop)
11258 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11259 (remote_terminal_ours, remote_wait, remote_fetch_registers)
11260 (remote_prepare_to_store, remote_store_registers)
11261 (remote_flash_erase, remote_flash_done, remote_files_info)
11262 (remote_kill, remote_mourn, remote_insert_breakpoint)
11263 (remote_remove_breakpoint, remote_insert_watchpoint)
11264 (remote_watchpoint_addr_within_range)
11265 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11266 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11267 (remote_supports_stopped_by_sw_breakpoint)
11268 (remote_stopped_by_hw_breakpoint)
11269 (remote_supports_stopped_by_hw_breakpoint)
11270 (remote_stopped_by_watchpoint, remote_stopped_data_address)
11271 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11272 (remote_verify_memory): Refactor as methods of remote_target.
11273 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11274 parameter.
11275 (remote_xfer_partial, remote_get_memory_xfer_limit)
11276 (remote_search_memory, remote_rcmd, remote_memory_map)
11277 (remote_pid_to_str, remote_get_thread_local_address)
11278 (remote_get_tib_address, remote_read_description): Refactor as
11279 methods of remote_target.
11280 (remote_target::fileio_open, remote_target::fileio_pwrite)
11281 (remote_target::fileio_pread, remote_target::fileio_close): New.
11282 (remote_hostio_readlink, remote_hostio_fstat)
11283 (remote_filesystem_is_local, remote_can_execute_reverse)
11284 (remote_supports_non_stop, remote_supports_disable_randomization)
11285 (remote_supports_multi_process, remote_supports_cond_breakpoints)
11286 (remote_supports_enable_disable_tracepoint)
11287 (remote_supports_string_tracing)
11288 (remote_can_run_breakpoint_commands, remote_trace_init)
11289 (remote_download_tracepoint, remote_can_download_tracepoint)
11290 (remote_download_trace_state_variable, remote_enable_tracepoint)
11291 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11292 (remote_trace_start, remote_get_trace_status)
11293 (remote_get_tracepoint_status, remote_trace_stop)
11294 (remote_trace_find, remote_get_trace_state_variable_value)
11295 (remote_save_trace_data, remote_get_raw_trace_data)
11296 (remote_set_disconnected_tracing, remote_core_of_thread)
11297 (remote_set_circular_trace_buffer, remote_traceframe_info)
11298 (remote_get_min_fast_tracepoint_insn_len)
11299 (remote_set_trace_buffer_size, remote_set_trace_notes)
11300 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11301 (remote_disable_btrace, remote_teardown_btrace)
11302 (remote_read_btrace, remote_btrace_conf)
11303 (remote_augmented_libraries_svr4_read, remote_load)
11304 (remote_pid_to_exec_file, remote_can_do_single_step)
11305 (remote_execution_direction, remote_thread_handle_to_thread_info):
11306 Refactor as methods of remote_target.
11307 (init_remote_ops, init_extended_remote_ops): Delete.
11308 (remote_can_async_p, remote_is_async_p, remote_async)
11309 (remote_thread_events, remote_upload_tracepoints)
11310 (remote_upload_trace_state_variables): Refactor as methods of
11311 remote_target.
11312 (_initialize_remote): Remove references to init_remote_ops and
11313 init_extended_remote_ops.
11314
11315 * remote-sim.c (gdbsim_target): New class.
11316 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11317 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11318 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11319 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11320 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11321 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11322 Refactor as methods of gdbsim_target.
11323 (gdbsim_ops): Now a gdbsim_target.
11324 (init_gdbsim_ops): Delete.
11325 (gdbsim_cntrl_c): Adjust.
11326 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11327
11328 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11329 (the_amd64_linux_nat_target): New.
11330 (amd64_linux_fetch_inferior_registers)
11331 (amd64_linux_store_inferior_registers): Refactor as methods of
11332 amd64_linux_nat_target.
11333 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
11334 * i386-linux-nat.c: Don't include "linux-nat.h".
11335 (i386_linux_nat_target): New class.
11336 (the_i386_linux_nat_target): New.
11337 (i386_linux_fetch_inferior_registers)
11338 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11339 as methods of i386_linux_nat_target.
11340 (_initialize_i386_linux_nat): Adjust. Set linux_target.
11341 * inf-child.c (inf_child_ops): Delete.
11342 (inf_child_fetch_inferior_registers)
11343 (inf_child_store_inferior_registers): Delete.
11344 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11345 methods of inf_child_target.
11346 (inf_child_target::supports_terminal_ours)
11347 (inf_child_target::terminal_init)
11348 (inf_child_target::terminal_inferior)
11349 (inf_child_target::terminal_ours_for_output)
11350 (inf_child_target::terminal_ours, inf_child_target::interrupt)
11351 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11352 New.
11353 (inf_child_open, inf_child_disconnect, inf_child_close)
11354 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11355 (inf_child_post_startup_inferior, inf_child_can_run)
11356 (inf_child_pid_to_exec_file): Refactor as methods of
11357 inf_child_target.
11358 (inf_child_follow_fork): Delete.
11359 (inf_child_target::can_create_inferior)
11360 (inf_child_target::can_attach): New.
11361 (inf_child_target::has_all_memory, inf_child_target::has_memory)
11362 (inf_child_target::has_stack, inf_child_target::has_registers)
11363 (inf_child_target::has_execution): New.
11364 (inf_child_fileio_open, inf_child_fileio_pwrite)
11365 (inf_child_fileio_pread, inf_child_fileio_fstat)
11366 (inf_child_fileio_close, inf_child_fileio_unlink)
11367 (inf_child_fileio_readlink, inf_child_use_agent)
11368 (inf_child_can_use_agent): Refactor as methods of
11369 inf_child_target.
11370 (return_zero, inf_child_target): Delete.
11371 (inf_child_target::inf_child_target): New.
11372 * inf-child.h: Include "target.h".
11373 (inf_child_target): Delete function prototype.
11374 (inf_child_target): New class.
11375 (inf_child_open_target, inf_child_mourn_inferior)
11376 (inf_child_maybe_unpush_target): Delete.
11377 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11378 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11379 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11380 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11381 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11382 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11383 (inf_ptrace_wait, inf_ptrace_xfer_partial)
11384 (inf_ptrace_thread_alive, inf_ptrace_files_info)
11385 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11386 methods of inf_ptrace_target.
11387 (inf_ptrace_target): Delete function.
11388 * inf-ptrace.h: Include "inf-child.h".
11389 (inf_ptrace_target): Delete function declaration.
11390 (inf_ptrace_target): New class.
11391 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11392 * linux-nat.c (linux_target): New.
11393 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11394 (linux_nat_target::~linux_nat_target): New.
11395 (linux_child_post_attach, linux_child_post_startup_inferior)
11396 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11397 (linux_child_remove_fork_catchpoint)
11398 (linux_child_insert_vfork_catchpoint)
11399 (linux_child_remove_vfork_catchpoint)
11400 (linux_child_insert_exec_catchpoint)
11401 (linux_child_remove_exec_catchpoint)
11402 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11403 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11404 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11405 (linux_nat_stopped_data_address)
11406 (linux_nat_stopped_by_sw_breakpoint)
11407 (linux_nat_supports_stopped_by_sw_breakpoint)
11408 (linux_nat_stopped_by_hw_breakpoint)
11409 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11410 (linux_nat_kill, linux_nat_mourn_inferior)
11411 (linux_nat_xfer_partial, linux_nat_thread_alive)
11412 (linux_nat_update_thread_list, linux_nat_pid_to_str)
11413 (linux_nat_thread_name, linux_child_pid_to_exec_file)
11414 (linux_child_static_tracepoint_markers_by_strid)
11415 (linux_nat_is_async_p, linux_nat_can_async_p)
11416 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11417 (linux_nat_supports_multi_process)
11418 (linux_nat_supports_disable_randomization, linux_nat_async)
11419 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11420 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11421 (linux_nat_fileio_open, linux_nat_fileio_readlink)
11422 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11423 methods of linux_nat_target.
11424 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11425 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11426 parameter.
11427 (check_stopped_by_watchpoint): Adjust.
11428 (linux_xfer_partial): Delete.
11429 (linux_target_install_ops, linux_target, linux_nat_add_target):
11430 Delete.
11431 (linux_nat_target::linux_nat_target): New.
11432 * linux-nat.h: Include "inf-ptrace.h".
11433 (linux_nat_target): New.
11434 (linux_target, linux_target_install_ops, linux_nat_add_target):
11435 Delete function declarations.
11436 (linux_target): Declare global.
11437 * linux-thread-db.c (thread_db_target): New.
11438 (thread_db_target::thread_db_target): New.
11439 (thread_db_ops): Delete.
11440 (the_thread_db_target): New.
11441 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11442 (thread_db_update_thread_list, thread_db_pid_to_str)
11443 (thread_db_extra_thread_info)
11444 (thread_db_thread_handle_to_thread_info)
11445 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11446 (thread_db_resume): Refactor as methods of thread_db_target.
11447 (init_thread_db_ops): Delete.
11448 (_initialize_thread_db): Remove reference to init_thread_db_ops.
11449 * x86-linux-nat.c: Don't include "linux-nat.h".
11450 (super_post_startup_inferior): Delete.
11451 (x86_linux_nat_target::~x86_linux_nat_target): New.
11452 (x86_linux_child_post_startup_inferior)
11453 (x86_linux_read_description, x86_linux_enable_btrace)
11454 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11455 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11456 methods of x86_linux_nat_target.
11457 (x86_linux_create_target): Delete. Bits folded ...
11458 (x86_linux_add_target): ... here. Now takes a linux_nat_target
11459 pointer.
11460 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11461 (x86_linux_nat_target): New class.
11462 (x86_linux_create_target): Delete.
11463 (x86_linux_add_target): Now takes a linux_nat_target pointer.
11464 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11465 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11466 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11467 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11468 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11469 make extern.
11470 (x86_use_watchpoints): Delete.
11471 * x86-nat.h: Include "breakpoint.h" and "target.h".
11472 (x86_use_watchpoints): Delete.
11473 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11474 (x86_stopped_by_watchpoint, x86_stopped_data_address)
11475 (x86_insert_watchpoint, x86_remove_watchpoint)
11476 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11477 (x86_stopped_by_hw_breakpoint): New declarations.
11478 (x86_nat_target): New template class.
11479
11480 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11481 (the_ppc_linux_nat_target): New.
11482 (ppc_linux_fetch_inferior_registers)
11483 (ppc_linux_can_use_hw_breakpoint)
11484 (ppc_linux_region_ok_for_hw_watchpoint)
11485 (ppc_linux_ranged_break_num_registers)
11486 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11487 (ppc_linux_insert_mask_watchpoint)
11488 (ppc_linux_remove_mask_watchpoint)
11489 (ppc_linux_can_accel_watchpoint_condition)
11490 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11491 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11492 (ppc_linux_watchpoint_addr_within_range)
11493 (ppc_linux_masked_watch_num_registers)
11494 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11495 (ppc_linux_read_description): Refactor as methods of
11496 ppc_linux_nat_target.
11497 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
11498
11499 * procfs.c (procfs_xfer_partial): Delete forward declaration.
11500 (procfs_target): New class.
11501 (the_procfs_target): New.
11502 (procfs_target): Delete function.
11503 (procfs_auxv_parse, procfs_attach, procfs_detach)
11504 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11505 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11506 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11507 (procfs_create_inferior, procfs_update_thread_list)
11508 (procfs_thread_alive, procfs_pid_to_str)
11509 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11510 (procfs_stopped_data_address, procfs_insert_watchpoint)
11511 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11512 (proc_find_memory_regions, procfs_info_proc)
11513 (procfs_make_note_section): Refactor as methods of procfs_target.
11514 (_initialize_procfs): Adjust.
11515 * sol-thread.c (sol_thread_target): New class.
11516 (sol_thread_ops): Now a sol_thread_target.
11517 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11518 (sol_thread_fetch_registers, sol_thread_store_registers)
11519 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11520 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11521 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11522 (init_sol_thread_ops): Delete.
11523 (_initialize_sol_thread): Adjust. Remove references to
11524 init_sol_thread_ops and complete_target_initialization.
11525
11526 * windows-nat.c (windows_nat_target): New class.
11527 (windows_fetch_inferior_registers)
11528 (windows_store_inferior_registers, windows_resume, windows_wait)
11529 (windows_attach, windows_detach, windows_pid_to_exec_file)
11530 (windows_files_info, windows_create_inferior)
11531 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11532 (windows_close, windows_pid_to_str, windows_xfer_partial)
11533 (windows_get_tib_address, windows_get_ada_task_ptid)
11534 (windows_thread_name, windows_thread_alive): Refactor as
11535 windows_nat_target methods.
11536 (do_initial_windows_stuff): Adjust.
11537 (windows_target): Delete function.
11538 (_initialize_windows_nat): Adjust.
11539
11540 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11541 (darwin_mourn_inferior, darwin_kill_inferior)
11542 (darwin_create_inferior, darwin_attach, darwin_detach)
11543 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11544 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11545 (darwin_supports_multi_process): Refactor as darwin_nat_target
11546 methods.
11547 (darwin_resume_to, darwin_files_info): Delete.
11548 (_initialize_darwin_inferior): Rename to ...
11549 (_initialize_darwin_nat): ... this. Adjust to C++ification.
11550 * darwin-nat.h: Include "inf-child.h".
11551 (darwin_nat_target): New class.
11552 (darwin_complete_target): Delete.
11553 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11554 (darwin_target): New.
11555 (i386_darwin_fetch_inferior_registers)
11556 (i386_darwin_store_inferior_registers): Refactor as methods of
11557 darwin_nat_target.
11558 (darwin_complete_target): Delete, with ...
11559 (_initialize_i386_darwin_nat): ... bits factored out here.
11560
11561 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11562 (the_alpha_linux_nat_target): New.
11563 (alpha_linux_register_u_offset): Refactor as
11564 alpha_linux_nat_target method.
11565 (_initialize_alpha_linux_nat): Adjust.
11566 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11567 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11568 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11569 methods of linux_nat_trad_target.
11570 (linux_trad_target): Delete.
11571 * linux-nat-trad.h (linux_trad_target): Delete function.
11572 (linux_nat_trad_target): New class.
11573 * mips-linux-nat.c (mips_linux_nat_target): New class.
11574 (super_fetch_registers, super_store_registers, super_close):
11575 Delete.
11576 (the_mips_linux_nat_target): New.
11577 (mips64_linux_regsets_fetch_registers)
11578 (mips64_linux_regsets_store_registers)
11579 (mips64_linux_fetch_registers, mips64_linux_store_registers)
11580 (mips_linux_register_u_offset, mips_linux_read_description)
11581 (mips_linux_can_use_hw_breakpoint)
11582 (mips_linux_stopped_by_watchpoint)
11583 (mips_linux_stopped_data_address)
11584 (mips_linux_region_ok_for_hw_watchpoint)
11585 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11586 (mips_linux_close): Refactor as methods of mips_linux_nat.
11587 (_initialize_mips_linux_nat): Adjust to C++ification.
11588
11589 * aix-thread.c (aix_thread_target): New class.
11590 (aix_thread_ops): Now an aix_thread_target.
11591 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11592 (aix_thread_fetch_registers, aix_thread_store_registers)
11593 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11594 (aix_thread_thread_alive, aix_thread_pid_to_str)
11595 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11596 Refactor as methods of aix_thread_target.
11597 (init_aix_thread_ops): Delete.
11598 (_initialize_aix_thread): Remove references to init_aix_thread_ops
11599 and complete_target_initialization.
11600 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11601 (rs6000_nat_target): New class.
11602 (the_rs6000_nat_target): New.
11603 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11604 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11605 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11606 (super_create_inferior): Delete.
11607 (_initialize_rs6000_nat): Adjust to C++ification.
11608
11609 * arm-linux-nat.c (arm_linux_nat_target): New class.
11610 (the_arm_linux_nat_target): New.
11611 (arm_linux_fetch_inferior_registers)
11612 (arm_linux_store_inferior_registers, arm_linux_read_description)
11613 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11614 (arm_linux_remove_hw_breakpoint)
11615 (arm_linux_region_ok_for_hw_watchpoint)
11616 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11617 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11618 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11619 arm_linux_nat_target.
11620 (_initialize_arm_linux_nat): Adjust to C++ification.
11621
11622 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11623 (the_aarch64_linux_nat_target): New.
11624 (aarch64_linux_fetch_inferior_registers)
11625 (aarch64_linux_store_inferior_registers)
11626 (aarch64_linux_child_post_startup_inferior)
11627 (aarch64_linux_read_description)
11628 (aarch64_linux_can_use_hw_breakpoint)
11629 (aarch64_linux_insert_hw_breakpoint)
11630 (aarch64_linux_remove_hw_breakpoint)
11631 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11632 (aarch64_linux_region_ok_for_hw_watchpoint)
11633 (aarch64_linux_stopped_data_address)
11634 (aarch64_linux_stopped_by_watchpoint)
11635 (aarch64_linux_watchpoint_addr_within_range)
11636 (aarch64_linux_can_do_single_step): Refactor as methods of
11637 aarch64_linux_nat_target.
11638 (super_post_startup_inferior): Delete.
11639 (_initialize_aarch64_linux_nat): Adjust to C++ification.
11640
11641 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11642 (the_hppa_linux_nat_target): New.
11643 (hppa_linux_fetch_inferior_registers)
11644 (hppa_linux_store_inferior_registers): Refactor as methods of
11645 hppa_linux_nat_target.
11646 (_initialize_hppa_linux_nat): Adjust to C++ification.
11647
11648 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11649 (the_ia64_linux_nat_target): New.
11650 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11651 (ia64_linux_stopped_data_address)
11652 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11653 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11654 ia64_linux_nat_target methods.
11655 (super_xfer_partial): Delete.
11656 (_initialize_ia64_linux_nat): Adjust to C++ification.
11657
11658 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11659 (the_m32r_linux_nat_target): New.
11660 (m32r_linux_fetch_inferior_registers)
11661 (m32r_linux_store_inferior_registers): Refactor as
11662 m32r_linux_nat_target methods.
11663 (_initialize_m32r_linux_nat): Adjust to C++ification.
11664
11665 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11666 (the_m68k_linux_nat_target): New.
11667 (m68k_linux_fetch_inferior_registers)
11668 (m68k_linux_store_inferior_registers): Refactor as
11669 m68k_linux_nat_target methods.
11670 (_initialize_m68k_linux_nat): Adjust to C++ification.
11671
11672 * s390-linux-nat.c (s390_linux_nat_target): New class.
11673 (the_s390_linux_nat_target): New.
11674 (s390_linux_fetch_inferior_registers)
11675 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11676 (s390_insert_watchpoint, s390_remove_watchpoint)
11677 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11678 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11679 (s390_auxv_parse, s390_read_description): Refactor as methods of
11680 s390_linux_nat_target.
11681 (_initialize_s390_nat): Adjust to C++ification.
11682
11683 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11684 (the_sparc_linux_nat_target): New.
11685 (_initialize_sparc_linux_nat): Adjust to C++ification.
11686 * sparc-nat.c (sparc_fetch_inferior_registers)
11687 (sparc_store_inferior_registers): Remove target_ops parameter.
11688 * sparc-nat.h (sparc_fetch_inferior_registers)
11689 (sparc_store_inferior_registers): Remove target_ops parameter.
11690 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11691 (the_sparc64_linux_nat_target): New.
11692 (_initialize_sparc64_linux_nat): Adjust to C++ification.
11693
11694 * spu-linux-nat.c (spu_linux_nat_target): New class.
11695 (the_spu_linux_nat_target): New.
11696 (spu_child_post_startup_inferior, spu_child_post_attach)
11697 (spu_child_wait, spu_fetch_inferior_registers)
11698 (spu_store_inferior_registers, spu_xfer_partial)
11699 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11700 methods.
11701 (_initialize_spu_nat): Adjust to C++ification.
11702
11703 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11704 (the_tilegx_linux_nat_target): New.
11705 (fetch_inferior_registers, store_inferior_registers):
11706 Refactor as methods.
11707 (_initialize_tile_linux_nat): Adjust to C++ification.
11708
11709 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11710 (the_xtensa_linux_nat_target): New.
11711 (xtensa_linux_fetch_inferior_registers)
11712 (xtensa_linux_store_inferior_registers): Refactor as
11713 xtensa_linux_nat_target methods.
11714 (_initialize_xtensa_linux_nat): Adjust to C++ification.
11715
11716 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11717 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11718 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11719 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11720 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11721 (fbsd_stopped_by_sw_breakpoint)
11722 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11723 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11724 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11725 (fbsd_post_startup_inferior, fbsd_post_attach)
11726 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11727 (fbsd_set_syscall_catchpoint)
11728 (super_xfer_partial, super_resume, super_wait)
11729 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11730 (fbsd_handle_debug_trap): Remove target_ops parameter.
11731 (fbsd_nat_add_target): Delete.
11732 * fbsd-nat.h: Include "inf-ptrace.h".
11733 (fbsd_nat_add_target): Delete.
11734 (USE_SIGTRAP_SIGINFO): Define.
11735 (fbsd_nat_target): New class.
11736
11737 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11738 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11739 (amd64bsd_target): Delete.
11740 * amd64-bsd-nat.h: New file.
11741 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11742 "x86-bsd-nat.h".
11743 (amd64_fbsd_nat_target): New class.
11744 (the_amd64_fbsd_nat_target): New.
11745 (amd64fbsd_read_description): Refactor as method of
11746 amd64_fbsd_nat_target.
11747 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11748 (_initialize_amd64fbsd_nat): Adjust to C++ification.
11749 * amd64-nat.h (amd64bsd_target): Delete function declaration.
11750 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11751 (i386bsd_store_inferior_registers): Remove target_ops parameter.
11752 (i386bsd_target): Delete.
11753 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11754 (i386bsd_fetch_inferior_registers)
11755 (i386bsd_store_inferior_registers): Declare.
11756 (i386_bsd_nat_target): New class.
11757 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11758 (the_i386_fbsd_nat_target): New.
11759 (i386fbsd_resume, i386fbsd_read_description): Refactor as
11760 i386_fbsd_nat_target methods.
11761 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11762 (_initialize_i386fbsd_nat): Adjust to C++ification.
11763 * x86-bsd-nat.c (super_mourn_inferior): Delete.
11764 (x86bsd_mourn_inferior, x86bsd_target): Delete.
11765 (_initialize_x86_bsd_nat): Adjust to C++ification.
11766 * x86-bsd-nat.h: Include "x86-nat.h".
11767 (x86bsd_target): Delete declaration.
11768 (x86bsd_nat_target): New class.
11769
11770 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11771 (the_aarch64_fbsd_nat_target): New.
11772 (aarch64_fbsd_fetch_inferior_registers)
11773 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11774 aarch64_fbsd_nat_target.
11775 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11776 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11777 (the_alpha_bsd_nat_target): New.
11778 (alphabsd_fetch_inferior_registers)
11779 (alphabsd_store_inferior_registers): Refactor as
11780 alpha_bsd_nat_target methods.
11781 (_initialize_alphabsd_nat): Refactor as methods of
11782 alpha_bsd_nat_target.
11783 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11784 (the_amd64_nbsd_nat_target): New.
11785 (_initialize_amd64nbsd_nat): Adjust to C++ification.
11786 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11787 (the_amd64_obsd_nat_target): New.
11788 (_initialize_amd64obsd_nat): Adjust to C++ification.
11789 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11790 (the_arm_fbsd_nat_target): New.
11791 (arm_fbsd_fetch_inferior_registers)
11792 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11793 (_initialize_arm_fbsd_nat): Refactor as methods of
11794 arm_fbsd_nat_target.
11795 (_initialize_arm_fbsd_nat): Adjust to C++ification.
11796 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11797 (the_arm_netbsd_nat_target): New.
11798 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11799 arm_netbsd_nat_target.
11800 (_initialize_arm_netbsd_nat): Adjust to C++ification.
11801 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11802 (the_hppa_nbsd_nat_target): New.
11803 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11804 hppa_nbsd_nat_target methods.
11805 (_initialize_hppanbsd_nat): Adjust to C++ification.
11806 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11807 (the_hppa_obsd_nat_target): New.
11808 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11809 methods of hppa_obsd_nat_target.
11810 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
11811 add_target.
11812 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11813 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
11814 add_target.
11815 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11816 (_initialize_i386obsd_nat): Use add_target.
11817 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11818 (the_m68k_bsd_nat_target): New.
11819 (m68kbsd_fetch_inferior_registers)
11820 (m68kbsd_store_inferior_registers): Refactor as methods of
11821 m68k_bsd_nat_target.
11822 (_initialize_m68kbsd_nat): Adjust to C++ification.
11823 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11824 (the_mips_fbsd_nat_target): New.
11825 (mips_fbsd_fetch_inferior_registers)
11826 (mips_fbsd_store_inferior_registers): Refactor as methods of
11827 mips_fbsd_nat_target.
11828 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
11829 add_target.
11830 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11831 (the_mips_nbsd_nat_target): New.
11832 (mipsnbsd_fetch_inferior_registers)
11833 (mipsnbsd_store_inferior_registers): Refactor as methods of
11834 mips_nbsd_nat_target.
11835 (_initialize_mipsnbsd_nat): Adjust to C++ification.
11836 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11837 (the_mips64_obsd_nat_target): New.
11838 (mips64obsd_fetch_inferior_registers)
11839 (mips64obsd_store_inferior_registers): Refactor as methods of
11840 mips64_obsd_nat_target.
11841 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
11842 add_target.
11843 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11844 nbsd_nat_target.
11845 * nbsd-nat.h: Include "inf-ptrace.h".
11846 (nbsd_nat_target): New class.
11847 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11848 (obsd_wait): Refactor as methods of obsd_nat_target.
11849 (obsd_add_target): Delete.
11850 * obsd-nat.h: Include "inf-ptrace.h".
11851 (obsd_nat_target): New class.
11852 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11853 (the_ppc_fbsd_nat_target): New.
11854 (ppcfbsd_fetch_inferior_registers)
11855 (ppcfbsd_store_inferior_registers): Refactor as methods of
11856 ppc_fbsd_nat_target.
11857 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
11858 add_target.
11859 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11860 (the_ppc_nbsd_nat_target): New.
11861 (ppcnbsd_fetch_inferior_registers)
11862 (ppcnbsd_store_inferior_registers): Refactor as methods of
11863 ppc_nbsd_nat_target.
11864 (_initialize_ppcnbsd_nat): Adjust to C++ification.
11865 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11866 (the_ppc_obsd_nat_target): New.
11867 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11868 methods of ppc_obsd_nat_target.
11869 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
11870 add_target.
11871 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11872 (the_sh_nbsd_nat_target): New.
11873 (shnbsd_fetch_inferior_registers)
11874 (shnbsd_store_inferior_registers): Refactor as methods of
11875 sh_nbsd_nat_target.
11876 (_initialize_shnbsd_nat): Adjust to C++ification.
11877 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11878 (inf_ptrace_xfer_partial): Delete.
11879 (sparc_xfer_partial, sparc_target): Delete.
11880 * sparc-nat.h (sparc_fetch_inferior_registers)
11881 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11882 (sparc_target): Delete function declaration.
11883 (sparc_target): New template class.
11884 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11885 (_initialize_sparcnbsd_nat): Adjust to C++ification.
11886 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11887 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
11888 add_target.
11889 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11890 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11891 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11892 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
11893 add_target.
11894 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11895 (the_vax_bsd_nat_target): New.
11896 (vaxbsd_fetch_inferior_registers)
11897 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11898 methods.
11899 (_initialize_vaxbsd_nat): Adjust to C++ification.
11900
11901 * bsd-kvm.c (bsd_kvm_target): New class.
11902 (bsd_kvm_ops): Now a bsd_kvm_target.
11903 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11904 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11905 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11906 bsd_kvm_target.
11907 (bsd_kvm_return_one): Delete.
11908 (bsd_kvm_add_target): Adjust to C++ification.
11909
11910 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11911 (nto_procfs_target_procfs): New classes.
11912 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11913 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11914 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11915 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11916 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11917 (procfs_remove_hw_breakpoint, procfs_resume)
11918 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11919 (procfs_kill_inferior, procfs_store_registers)
11920 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11921 as methods of nto_procfs_target.
11922 (nto_procfs_ops): Now an nto_procfs_target_procfs.
11923 (nto_native_ops): Delete.
11924 (procfs_open, procfs_native_open): Delete.
11925 (nto_native_ops): Now an nto_procfs_target_native.
11926 (init_procfs_targets): Adjust to C++ification.
11927 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11928 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11929 Refactor as methods of nto_procfs_target.
11930
11931 * go32-nat.c (go32_nat_target): New class.
11932 (the_go32_nat_target): New.
11933 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11934 (go32_store_registers, go32_xfer_partial, go32_files_info)
11935 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11936 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11937 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11938 (go32_pid_to_str): Refactor as methods of go32_nat_target.
11939 (go32_target): Delete.
11940 (_initialize_go32_nat): Adjust to C++ification.
11941
11942 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11943 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11944 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11945 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11946 gnu_nat_target.
11947 (gnu_target): Delete.
11948 * gnu-nat.h (gnu_target): Delete.
11949 (gnu_nat_target): New class.
11950 * i386-gnu-nat.c (gnu_base_target): New.
11951 (i386_gnu_nat_target): New class.
11952 (the_i386_gnu_nat_target): New.
11953 (_initialize_i386gnu_nat): Adjust to C++ification.
11954
11955 2018-05-02 Pedro Alves <palves@redhat.com>
11956
11957 * bfd-target.c (target_bfd_xclose): Rename to ...
11958 (target_bfd_close): ... this.
11959 (target_bfd_reopen): Adjust.
11960 * target.c (target_close): Remove references to to_xclose.
11961 * target.h (target_ops::to_xclose): Delete.
11962 (target_ops::to_close): Update comments.
11963
11964 2018-05-02 Pedro Alves <palves@redhat.com>
11965
11966 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11967 "linux-nat.h".
11968 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11969 * inf-ptrace.c (inf_ptrace_register_u_offset)
11970 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11971 (inf_ptrace_store_register, inf_ptrace_store_registers)
11972 (inf_ptrace_trad_target): Move to ...
11973 * linux-nat-trad.c: ... this new file.
11974 * linux-nat-trad.h: New file.
11975 * linux-nat.c (linux_target_install_ops): Make extern.
11976 (linux_trad_target): Delete.
11977 * linux-nat.h (linux_trad_target): Delete declaration.
11978 (linux_target_install_ops): Declare.
11979 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11980 "linux-nat.h".
11981
11982 2018-05-02 Pedro Alves <palves@redhat.com>
11983
11984 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11985 procfs_target/add_target here.
11986 * procfs.c (procfs_target): Make static.
11987 (_initialize_procfs): Call add_target here.
11988 * procfs.h (struct target_ops): Remove forward declaration.
11989 (procfs_target): Remove declaration.
11990 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11991
11992 2018-05-02 Pedro Alves <palves@redhat.com>
11993
11994 * procfs.c (procfs_stopped_by_watchpoint)
11995 (procfs_insert_watchpoint, procfs_remove_watchpoint)
11996 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11997 Forward declare.
11998 (procfs_use_watchpoints): Delete, move contents...
11999 (procfs_target): ... here.
12000 * procfs.h (procfs_use_watchpoints): Delete declaration.
12001 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12002 procfs_use_watchpoints.
12003 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
12004 procfs_use_watchpoints.
12005
12006 2018-05-02 Tom Tromey <tom@tromey.com>
12007
12008 PR python/20084:
12009 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
12010 and var_zuinteger_unlimited.
12011 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
12012 and PARAM_ZUINTEGER_UNLIMITED.
12013 (set_parameter_value): Handle var_zuinteger and
12014 var_zuinteger_unlimited.
12015 (add_setshow_generic): Likewise.
12016 (parmpy_init): Likewise.
12017
12018 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
12019
12020 PR rust/23124
12021 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
12022 pointer is not null before dereferencing it.
12023
12024 2018-04-30 Tom Tromey <tom@tromey.com>
12025
12026 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
12027 is_mi_like_p.
12028
12029 2018-04-30 Tom Tromey <tom@tromey.com>
12030
12031 * breakpoint.c (mention): Remove use of is_mi_like_p.
12032 (print_mention_ranged_breakpoint): Likewise.
12033 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12034 of is_mi_like_p.
12035
12036 2018-04-30 Tom Tromey <tom@tromey.com>
12037
12038 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12039
12040 2018-04-30 Tom Tromey <tom@tromey.com>
12041
12042 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12043 (info_spu_event_command): Remove some uses of is_mi_like_p.
12044
12045 2018-04-30 Tom Tromey <tom@tromey.com>
12046
12047 * python/py-framefilter.c (py_print_single_arg)
12048 (enumerate_locals, py_print_args, py_print_frame): Remove some
12049 uses of is_mi_like_p.
12050
12051 2018-04-30 Tom Tromey <tom@tromey.com>
12052
12053 * ui-out.c: Update.
12054 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12055 * ui-out.h (ui_out::is_mi_like_p): Now const.
12056 (ui_out::do_is_mi_like_p): Now const.
12057 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12058
12059 2018-04-30 Tom Tromey <tom@tromey.com>
12060
12061 * varobj.c (varobj_set_visualizer): Use new_reference.
12062 * python/python.c (gdbpy_decode_line): Use new_reference.
12063 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12064 new_reference.
12065
12066 2018-04-30 Tom Tromey <tom@tromey.com>
12067
12068 * varobj.c (install_new_value): Use new_reference.
12069 * value.h (value_incref): Return void. Swap intro comment with
12070 value_decref.
12071 * value.c (set_value_parent): Use new_reference.
12072 (value_incref): Return void. Update intro comment.
12073 (release_value): Use new_reference.
12074 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12075
12076 2018-04-30 Tom Tromey <tom@tromey.com>
12077
12078 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12079 * gdb_bfd.h (new_bfd_ref): Remove.
12080 (gdb_bfd_open): Update comment.
12081 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12082 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12083 (gdb_bfd_fdopenr): Use new_reference.
12084 * exec.c (exec_file_attach): Use new_reference.
12085
12086 2018-04-30 Tom Tromey <tom@tromey.com>
12087
12088 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12089 method.
12090
12091 2018-04-30 Tom Tromey <tom@tromey.com>
12092
12093 * jit.c (jit_read_code_entry): Use type_align.
12094 * i386-tdep.c (i386_gdbarch_init): Don't call
12095 set_gdbarch_long_long_align_bit.
12096 * gdbarch.sh: Remove long_long_align_bit.
12097 * gdbarch.c, gdbarch.h: Rebuild.
12098 * arc-tdep.c (arc_type_align): New function.
12099 (arc_gdbarch_init): Use arc_type_align. Don't call
12100 set_gdbarch_long_long_align_bit.
12101
12102 2018-04-30 Tom Tromey <tom@tromey.com>
12103
12104 * rust-lang.c (rust_type_alignment): Remove.
12105 (rust_composite_type): Use type_align.
12106
12107 2018-04-30 Tom Tromey <tom@tromey.com>
12108
12109 * NEWS: Mention Type.align.
12110 * python/py-type.c (typy_get_alignof): New function.
12111 (type_object_getset): Add "alignof".
12112
12113 2018-04-30 Tom Tromey <tom@tromey.com>
12114
12115 PR exp/17095:
12116 * NEWS: Update.
12117 * std-operator.def (UNOP_ALIGNOF): New operator.
12118 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12119 New.
12120 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12121 * c-lang.c (c_op_print_tab): Add alignof.
12122 * c-exp.y (ALIGNOF): New token.
12123 (exp): Add "ALIGNOF" production.
12124 (ident_tokens): Add _Alignof and alignof.
12125
12126 2018-04-30 Tom Tromey <tom@tromey.com>
12127
12128 * i386-tdep.c (i386_type_align): New function.
12129 (i386_gdbarch_init): Update.
12130 * gdbarch.sh (type_align): New method.
12131 * gdbarch.c, gdbarch.h: Rebuild.
12132 * arch-utils.h (default_type_align): Declare.
12133 * arch-utils.c (default_type_align): New function.
12134 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12135 (struct type) <align_log2>: New field.
12136 <instance_flags>: Now a bitfield.
12137 (TYPE_RAW_ALIGN): New macro.
12138 (type_align, type_raw_align, set_type_align): Declare.
12139 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12140 functions.
12141 * dwarf2read.c (quirk_rust_enum): Set type alignment.
12142 (get_alignment, maybe_set_alignment): New functions.
12143 (read_structure_type, read_enumeration_type, read_array_type)
12144 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12145 (read_subrange_type, read_base_type): Set type alignment.
12146
12147 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
12148
12149 * dwarf2read.c (read_index_from_section): Use bool.
12150
12151 2018-04-29 Fabian Groffen <grobian@gentoo.org>
12152
12153 PR gdb/22950
12154 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12155 with #ifdef.
12156
12157 2018-04-29 John Reiser <jreiser@BitWagon.com>
12158
12159 PR build/22873
12160 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12161 last step, and do it atomically.
12162
12163 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
12164
12165 * compile/compile-c-types.c (convert_int, convert_float):
12166 Update for C FE v1.
12167
12168 2018-04-27 Tom Tromey <tom@tromey.com>
12169
12170 PR rust/22545:
12171 * rust-lang.c (rust_inclusive_range_type_p): New function.
12172 (rust_range): Handle inclusive ranges.
12173 (rust_compute_range): Likewise.
12174 * rust-exp.y (struct rust_op) <inclusive>: New field.
12175 (DOTDOTEQ): New constant.
12176 (range_expr): Add "..=" productions.
12177 (operator_tokens): Add "..=" token.
12178 (ast_range): Add "inclusive" parameter.
12179 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12180 ranges.
12181 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12182 bounds values.
12183 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12184 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12185 Update comments.
12186 * expprint.c (print_subexp_standard): Handle new bounds values.
12187 (dump_subexp_body_standard): Likewise.
12188
12189 2018-04-27 Tom Tromey <tom@tromey.com>
12190
12191 * configure: Rebuild.
12192 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12193 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12194 "OVERRIDE".
12195 (class symbol_needs_eval_context): Likewise.
12196 * dwarf2read.c (mock_mapped_index::symbol_name_count)
12197 (mock_mapped_index::symbol_name_at): Use "override". Remove
12198 "virtual".
12199 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12200 "override".
12201 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12202 * aarch64-tdep.c (instruction_reader::read): Use "override".
12203 (instruction_reader_test::read): Likewise.
12204 * arm-tdep.c (instruction_reader::read): Use "override".
12205 (instruction_reader_thumb::read): Likewise.
12206
12207 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
12208
12209 PR remote/9665
12210 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12211 instead of remote_send.
12212 (remote_send): Remove.
12213
12214 2018-04-26 Pedro Alves <palves@redhat.com>
12215
12216 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12217 find_function_start_sal instead of find_pc_line.
12218
12219 2018-04-26 Pedro Alves <palves@redhat.com>
12220
12221 * breakpoint.c (set_breakpoint_location_function): Handle
12222 mst_data_gnu_ifunc.
12223 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12224 * elfread.c (elf_symtab_read): Give data symbols with
12225 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12226 (elf_rel_plt_read): Update comment.
12227 * linespec.c (convert_linespec_to_sals): Handle
12228 mst_data_gnu_ifunc.
12229 (minsym_found): Handle mst_data_gnu_ifunc.
12230 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12231 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12232 * parse.c (find_minsym_type_and_address): Handle
12233 mst_data_gnu_ifunc.
12234 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12235 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12236 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12237 comment.
12238 <mst_data_gnu_ifunc>: New enumerator.
12239
12240 2018-04-26 Pedro Alves <palves@redhat.com>
12241
12242 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12243 (lookup_minimal_symbol_by_pc_section): ... this. Replace
12244 'want_trampoline' parameter by a lookup_msym_prefer parameter.
12245 Handle it.
12246 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12247 (lookup_minimal_symbol_by_pc): Adjust.
12248 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12249 (lookup_solib_trampoline_symbol_by_pc): Adjust.
12250 * minsyms.h (lookup_msym_prefer): New enum.
12251 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12252 parameter by a lookup_msym_prefer parameter.
12253
12254 2018-04-26 Pedro Alves <palves@redhat.com>
12255
12256 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12257 ends in "@plt" instead of looking at the symbol's section.
12258
12259 2018-04-26 Pedro Alves <palves@redhat.com>
12260
12261 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
12262 all references.
12263 (find_pc_partial_function_gnu_ifunc): Rename to ...
12264 (find_pc_partial_function): ... this, and remove references to
12265 'is_gnu_ifunc_p'.
12266 (find_pc_partial_function): Delete old implementation.
12267 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12268
12269 2018-04-26 Pedro Alves <palves@redhat.com>
12270
12271 * linespec.c (struct bound_minimal_symbol_search_key): New.
12272 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
12273 skip first line if we found a GNU ifunc minimal symbol by name.
12274 (compare_msymbols): Change parameters to work with a destructured
12275 lhs minsym.
12276 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12277 functions.
12278
12279 2018-04-26 Pedro Alves <palves@redhat.com>
12280
12281 * breakpoint.c (set_breakpoint_location_function): Don't resolve
12282 ifunc targets here. Instead, if we have an ifunc minsym, use its
12283 address/name.
12284 (add_location_to_breakpoint): Store the minsym and the objfile in
12285 the breakpoint location.
12286 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12287 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12288 Record the minsym in the sal.
12289 * symtab.h (symtab_and_line) <msymbol>: New field.
12290
12291 2018-04-26 Pedro Alves <palves@redhat.com>
12292
12293 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12294 unless we actually resolved the ifunc.
12295
12296 2018-04-26 Pedro Alves <palves@redhat.com>
12297
12298 * c-exp.y (variable production): Prefer ifunc minsyms over
12299 regular function symbols.
12300 * symtab.c (find_gnu_ifunc): New function.
12301 * minsyms.h (lookup_msym_prefer): New enum.
12302 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12303 parameter by a lookup_msym_prefer parameter.
12304 * symtab.h (find_gnu_ifunc): New declaration.
12305
12306 2018-04-26 Pedro Alves <palves@redhat.com>
12307
12308 * blockframe.c (find_gnu_ifunc_target_type): New function.
12309 (find_function_type): New.
12310 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12311 return a value with a memory address.
12312 (eval_call): For calls to GNU ifunc functions, try to find the
12313 type of the target function from the type that the resolver
12314 returns.
12315 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12316 symbols.
12317 * infcall.c (find_function_return_type): Delete.
12318 (find_function_addr): Add 'function_type' parameter. For calls to
12319 GNU ifunc functions, try to find the type of the target function
12320 from the type that the resolver returns, and return it via
12321 FUNCTION_TYPE.
12322 (call_function_by_hand_dummy): Adjust to use the function type
12323 returned by find_function_addr.
12324 (find_function_addr): Add 'function_type' parameter and move
12325 description here.
12326 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12327 declarations.
12328
12329 2018-04-26 Pedro Alves <palves@redhat.com>
12330
12331 * c-exp.y (variable production): Skip finding an alias for ifunc
12332 symbols.
12333
12334 2018-04-26 Pedro Alves <palves@redhat.com>
12335
12336 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12337
12338 2018-04-25 Pedro Alves <palves@redhat.com>
12339
12340 * infcmd.c (kill_command): Print the pid as string, not the whole
12341 thread's ptid. Add comment. s/has been killed/killed/ in output
12342 message.
12343 * remote.c (remote_detach_1): Print the pid as string, not the
12344 whole thread's ptid.
12345
12346 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12347 Sergio Durigan Junior <sergiodj@redhat.com>
12348 Pedro Alves <palves@redhat.com>
12349
12350 * infcmd.c (kill_command): Print message when inferior has
12351 been killed.
12352 * inferior.c (print_inferior_events): Remove 'static'. Set as
12353 '1'.
12354 (add_inferior): Improve message printed when
12355 'print_inferior_events' is on.
12356 (exit_inferior): Remove message printed when
12357 'print_inferior_events' is on.
12358 (detach_inferior): Improve message printed when
12359 'print_inferior_events' is on.
12360 (initialize_inferiors): Use 'add_inferior_silent' to set
12361 'current_inferior_'.
12362 * inferior.h (print_inferior_events): Declare here as
12363 'extern'.
12364 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12365 '[Detaching...]' messages when 'print_inferior_events' is on.
12366 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
12367 as prefix/suffix for messages. Remove periods. Fix erroneous
12368 'Detaching after fork from child...', replace it by '... from
12369 parent...'.
12370 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12371 prefix/suffix when printing 'Detaching...' messages. Print
12372 them when 'print_inferior_events' is on.
12373 * remote.c (remote_detach_1): Print message when detaching
12374 from inferior and '!is_fork_parent'.
12375
12376 2018-04-24 Tom Tromey <tom@tromey.com>
12377
12378 * cli-out.h: Reindent.
12379
12380 2018-04-24 Tom Tromey <tom@tromey.com>
12381
12382 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12383 (cli_ui_out::do_field_string): Use fputs_filtered.
12384 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12385
12386 2018-04-23 Tom Tromey <tom@tromey.com>
12387
12388 * guile/scm-frame.c (gdbscm_frame_read_var): Use
12389 gdb::unique_xmalloc_ptr.
12390
12391 2018-04-23 Tom Tromey <tom@tromey.com>
12392
12393 * configure: Rebuild.
12394
12395 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
12396
12397 PR gdb/23095
12398 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12399 prepare_for_testing. Set normal_bp to r_debug_state if target
12400 is bsd.
12401
12402 2018-04-21 Pedro Alves <palves@redhat.com>
12403 Rajendra SY <rajendra.sy@gmail.com>
12404
12405 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12406 * remote.c (extended_remote_attach): In all-stop mode, mark the
12407 thread as executing.
12408
12409 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
12410
12411 * thread.c (thread_apply_all_command): Fix comment.
12412 (thread_command): Fix comment.
12413
12414 2018-04-10 Alan Hayward <alan.hayward@arm.com>
12415
12416 * common/tdesc.h (tdesc_create_feature): Remove xml filename
12417 parameter.
12418 * features/aarch64-core.c (create_feature_aarch64_core):
12419 Regenerate.
12420 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12421 Likewise.
12422 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12423 Likewise.
12424 * features/i386/32bit-avx512.c
12425 (create_feature_i386_32bit_avx512): Likewise.
12426 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12427 Likewise.
12428 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12429 Likewise.
12430 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12431 Likewise.
12432 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12433 Likewise.
12434 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12435 Likewise.
12436 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12437 Likewise.
12438 * features/i386/64bit-avx512.c
12439 (create_feature_i386_64bit_avx512): Likewise.
12440 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12441 Likewise.
12442 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12443 Likewise.
12444 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12445 Likewise.
12446 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12447 Likewise.
12448 * features/i386/64bit-segments.c
12449 (create_feature_i386_64bit_segments): Likewise.
12450 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12451 Likewise.
12452 * features/i386/x32-core.c
12453 (create_feature_i386_x32_core): Likewise.
12454 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12455 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12456 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12457 * target-descriptions.c: In generated code, don't pass xml
12458 filename.
12459
12460 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12461
12462 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12463 (print_xml_feature::visit_post): Likewise.
12464 (print_xml_feature::visit): Likewise.
12465 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12466 (print_xml_feature): Add new class.
12467 * regformats/regdat.sh: Null xmltarget on feature targets.
12468 * target-descriptions.c (struct target_desc): Add xmltarget.
12469 (maintenance_check_tdesc_xml_convert): Add unittest function.
12470 (tdesc_get_features_xml): Add function to get xml.
12471 (maintenance_check_xml_descriptions): Test xml generation.
12472 * xml-tdesc.c (string_read_description_xml): Add function.
12473 * xml-tdesc.h (string_read_description_xml): Add declaration.
12474
12475 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12476
12477 * features/Makefile: Add feature marker to targets with new style
12478 target descriptions.
12479 * regformats/aarch64.dat: Regenerate.
12480 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12481 * regformats/i386/amd64-avx-linux.dat: Likewise.
12482 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12483 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12484 * regformats/i386/amd64-linux.dat: Likewise.
12485 * regformats/i386/amd64-mpx-linux.dat: Likewise.
12486 * regformats/i386/amd64.dat: Likewise.
12487 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12488 * regformats/i386/i386-avx-linux.dat: Likewise.
12489 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12490 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12491 * regformats/i386/i386-linux.dat: Likewise.
12492 * regformats/i386/i386-mmx-linux.dat: Likewise.
12493 * regformats/i386/i386-mpx-linux.dat: Likewise.
12494 * regformats/i386/i386.dat: Likewise.
12495 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12496 * regformats/i386/x32-avx-linux.dat: Likewise.
12497 * regformats/i386/x32-linux.dat: Likewise.
12498 * regformats/tic6x-c62x-linux.dat: Likewise.
12499 * regformats/tic6x-c64x-linux.dat: Likewise.
12500 * regformats/tic6x-c64xp-linux.dat: Likewise.
12501 * regformats/regdat.sh: Parse feature marker.
12502
12503 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12504
12505 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12506 (tdesc_osabi_name): Likewise.
12507 * target-descriptions.c (tdesc_architecture_name): Add new
12508 function.
12509 (tdesc_osabi_name): Likewise.
12510
12511 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12512
12513 * common/tdesc.c (tdesc_predefined_type): Move to here.
12514 (tdesc_named_type): Likewise.
12515 (tdesc_create_vector): Likewise.
12516 (tdesc_create_struct): Likewise.
12517 (tdesc_set_struct_size): Likewise.
12518 (tdesc_create_union): Likewise.
12519 (tdesc_create_flags): Likewise.
12520 (tdesc_create_enum): Likewise.
12521 (tdesc_add_field): Likewise.
12522 (tdesc_add_typed_bitfield): Likewise.
12523 (tdesc_add_bitfield): Likewise.
12524 (tdesc_add_flag): Likewise.
12525 (tdesc_add_enum_value): Likewise.
12526 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12527 (struct tdesc_type_vector): Likewise.
12528 (struct tdesc_type_field): Likewise.
12529 (struct tdesc_type_with_fields): Likewise.
12530 (tdesc_create_enum): Add declaration.
12531 (tdesc_add_typed_bitfield): Likewise.
12532 (tdesc_add_enum_value): Likewise.
12533 * target-descriptions.c (tdesc_type_field): Move from here.
12534 (tdesc_type_builtin): Likewise.
12535 (tdesc_type_vector): Likewise.
12536 (tdesc_type_with_fields): Likewise.
12537 (tdesc_predefined_types): Likewise.
12538 (tdesc_named_type): Likewise.
12539 (tdesc_create_vector): Likewise.
12540 (tdesc_create_struct): Likewise.
12541 (tdesc_set_struct_size): Likewise.
12542 (tdesc_create_union): Likewise.
12543 (tdesc_create_flags): Likewise.
12544 (tdesc_create_enum): Likewise.
12545 (tdesc_add_field): Likewise.
12546 (tdesc_add_typed_bitfield): Likewise.
12547 (tdesc_add_bitfield): Likewise.
12548 (tdesc_add_flag): Likewise.
12549 (tdesc_add_enum_value): Likewise.
12550 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12551 (tdesc_add_typed_bitfield): Likewise.
12552 (tdesc_add_enum_value): Likewise.
12553
12554 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12555
12556 * common/tdesc.c (tdesc_feature::accept): Move to here.
12557 (tdesc_feature::operator==): Likewise.
12558 (tdesc_create_reg): Likewise.
12559 * common/tdesc.h (tdesc_type_kind): Likewise.
12560 (struct tdesc_type): Likewise.
12561 (struct tdesc_feature): Likewise.
12562 * regformats/regdat.sh: Create a feature.
12563 * target-descriptions.c (tdesc_type_kind): Move from here.
12564 (tdesc_type): Likewise.
12565 (tdesc_type_up): Likewise.
12566 (tdesc_feature): Likewise.
12567 (tdesc_create_reg): Likewise.
12568
12569 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12570
12571 * Makefile.in: Add arch/tdesc.c
12572 * common/tdesc.c: New file.
12573 * common/tdesc.h (tdesc_element_visitor): Move to here.
12574 (tdesc_element): Likewise.
12575 (tdesc_reg): Likewise.
12576 (tdesc_reg_up): Likewise.
12577 * regformats/regdef.h (reg): Add offset to constructors.
12578 * target-descriptions.c (tdesc_element_visitor): Move from here.
12579 (tdesc_element): Likewise.
12580 (tdesc_reg): Likewise.
12581 (tdesc_reg_up): Likewise.
12582
12583 2018-04-17 Tom Tromey <tom@tromey.com>
12584
12585 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12586 discriminant field.
12587
12588 2018-04-17 Tom Tromey <tom@tromey.com>
12589
12590 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12591
12592 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
12593
12594 * symtab.c (print_symbol_info): Skip printing filename and line
12595 number when `last' is NULL.
12596 (symtab_symbol_info): Use empty string instead of NULL for first
12597 invocation of print_symbol_info.
12598 (rbreak_command): Pass NULL to `last' parameter of
12599 print_symbol_info.
12600
12601 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
12602
12603 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12604 instead of nullptr.
12605
12606 2018-04-16 Pedro Alves <palves@redhat.com>
12607
12608 * MAINTAINERS (sh): Remove.
12609 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12610 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12611 (ALLDEPFILES): Remove sh64-tdep.c.
12612 * NEWS: Mentions that support for SH-5/SH64 is removed.
12613 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12614 (sh*-*-openbsd*): Ditto.
12615 (sh64-*-elf*): Remove.
12616 (sh*): Remove.
12617 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12618 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12619 * sh-tdep.c: No longer include "sh64-tdep.h".
12620 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12621 * sh64-tdep.c, sh64-tdep.h: Remove files.
12622
12623 2018-04-16 Pedro Alves <palves@redhat.com>
12624
12625 * MAINTAINERS: Remove m88k.
12626 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12627 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12628 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12629 * NEWS: Mention that support for m88k was removed.
12630 * configure.host (m88*-*-*): Remove support.
12631 * configure.nat (m88k-*-*): Remove support.
12632 * configure.tgt (m88*-*-openbsd*): Remove.
12633 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12634
12635 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
12636
12637 * configure.tgt (x86_tobjs): New variable.
12638 (amd64_tobjs, i386_tobjs): Use it.
12639
12640 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12641
12642 * symtab.c (print_symbol_info): Precede the symbol definition by
12643 the line number when available.
12644 * NEWS: Advertise this enhancement.
12645
12646 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12647
12648 * NEWS (New options): announce set/show record btrace cpu.
12649 * btrace.c: Include record-btrace.h.
12650 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12651 the vendor is unknown.
12652 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
12653 Maybe overwrite the btrace configuration's cpu.
12654 (btrace_compute_ftrace): Add cpu parameter. Update callers.
12655 (btrace_fetch): Add cpu parameter. Update callers.
12656 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12657 Maybe overwrite the btrace configuration's cpu. Skip enabling
12658 errata workarounds if the vendor is unknown.
12659 * python/py-record-btrace.c: Include record-btrace.h.
12660 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12661 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12662 * record-btrace.c (record_btrace_cpu_state_kind): New.
12663 (record_btrace_cpu): New.
12664 (set_record_btrace_cpu_cmdlist): New.
12665 (record_btrace_get_cpu): New.
12666 (require_btrace_thread, record_btrace_info)
12667 (record_btrace_resume_thread): Call record_btrace_get_cpu.
12668 (cmd_set_record_btrace_cpu_none): New.
12669 (cmd_set_record_btrace_cpu_auto): New.
12670 (cmd_set_record_btrace_cpu): New.
12671 (cmd_show_record_btrace_cpu): New.
12672 (_initialize_record_btrace): Initialize set/show record btrace cpu
12673 commands.
12674 * record-btrace.h (record_btrace_get_cpu): New.
12675
12676 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12677
12678 * record.c (set_record_command): Fix typo in message.
12679
12680 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12681
12682 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12683
12684 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12685
12686 * infrun.c (process_event_stop_test): Call
12687 gdbarch_in_indirect_branch_thunk.
12688 * gdbarch.sh (in_indirect_branch_thunk): New.
12689 * gdbarch.c: Regenerated.
12690 * gdbarch.h: Regenerated.
12691 * x86-tdep.h: New.
12692 * x86-tdep.c: New.
12693 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12694 (HFILES_NO_SRCDIR): Add x86-tdep.h.
12695 (ALLDEPFILES): Add x86-tdep.c.
12696 * arch-utils.h (default_in_indirect_branch_thunk): New.
12697 * arch-utils.c (default_in_indirect_branch_thunk): New.
12698 * i386-tdep: Include x86-tdep.h.
12699 (i386_in_indirect_branch_thunk): New.
12700 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12701 function.
12702 * amd64-tdep: Include x86-tdep.h.
12703 (amd64_in_indirect_branch_thunk): New.
12704 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12705
12706 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
12707
12708 PR gdb/23053
12709 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12710 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12711 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12712 regression.
12713
12714 2018-04-12 Tom Tromey <tom@tromey.com>
12715
12716 * rust-lang.c (rust_print_struct_def): Remove univariant code.
12717 (rust_evaluate_subexp): Likewise.
12718
12719 2018-04-12 Pedro Alves <palves@redhat.com>
12720
12721 * procfs.c (procfs_detach): Make forward declaration's prototype
12722 match definition's protototype.
12723 (proc_get_LDT_entry): Remove stale do_cleanups call.
12724
12725 2018-04-12 Pedro Alves <palves@redhat.com>
12726
12727 * target.h (target_ops::to_has_exited): Delete.
12728 (target_has_exited): Delete.
12729 * target-delegates.c: Regenerate.
12730
12731 2018-04-11 Pedro Alves <palves@redhat.com>
12732
12733 * target.c (fileio_fh_t::t): Add comment.
12734 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12735 (target_fileio_close): Handle a NULL target.
12736 (invalidate_fileio_fh): New.
12737 (target_close): Call it.
12738 * remote.c (remote_hostio_send_command): No longer check whether
12739 remote_desc is open.
12740
12741 2018-04-11 Pedro Alves <palves@redhat.com>
12742
12743 * target.c (fileio_fh_t): Make it a named struct instead of a
12744 typedef.
12745 (fileio_fh_t::is_closed): New method.
12746 (DEF_VEC_O (fileio_fh_t)): Remove.
12747 (fileio_fhandles): Now a std::vector.
12748 (is_closed_fileio_fh): Delete.
12749 (acquire_fileio_fd): Adjust. Rename parameters.
12750 (release_fileio_fd): Adjust.
12751 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12752 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12753 (target_fileio_close): Adjust.
12754
12755 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
12756
12757 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12758 index.
12759
12760 2018-04-10 Pedro Alves <palves@redhat.com>
12761
12762 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12763 (scoped_finish_thread_state): New class.
12764 * infcmd.c (run_command_1): Use it instead of finish_thread_state
12765 cleanup.
12766 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12767 (fetch_inferior_event, normal_stop): Likewise.
12768 * thread.c (finish_thread_state_cleanup): Delete.
12769
12770 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12771 Pedro Alves <palves@redhat.com>
12772
12773 * value.c: Include "selftest.h" and "common/array-view.h".
12774 (struct range) <operator ==>: New.
12775 (test_ranges_contain): New.
12776 (check_ranges_vector): New.
12777 (test_insert_into_bit_range_vector): New.
12778 (_initialize_values): Register selftests.
12779 * common/array-view.h (operator==, operator!=): New.
12780
12781 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12782
12783 * common/gdb_vecs.h (unordered_remove): Add overload that takes
12784 an iterator.
12785 * inline-frame.c: Include <algorithm>.
12786 (struct inline_state): Add constructor.
12787 (inline_state_s): Remove.
12788 (DEF_VEC_O(inline_state_s)): Remove.
12789 (inline_states): Change type to std::vector.
12790 (find_inline_frame_state): Adjust to std::vector.
12791 (allocate_inline_frame_state): Remove.
12792 (clear_inline_frame_state): Adjust to std::vector.
12793 (skip_inline_frames): Adjust to std::vector.
12794
12795 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12796
12797 * tracepoint.h (struct trace_state_variable): Add constructor.
12798 <name>: Change type to std::string.
12799 * tracepoint.c (tsv_s): Remove.
12800 (DEF_VEC_O(tsv_s)): Remove.
12801 (tvariables): Change to std::vector.
12802 (create_trace_state_variable): Adjust to std::vector.
12803 (find_trace_state_variable): Likewise.
12804 (find_trace_state_variable_by_number): Likewise.
12805 (delete_trace_state_variable): Likewise.
12806 (trace_variable_command): Adjust to std::string.
12807 (delete_trace_variable_command): Likewise.
12808 (tvariables_info_1): Adjust to std::vector.
12809 (save_trace_state_variables): Likewise.
12810 (start_tracing): Likewise.
12811 (merge_uploaded_trace_state_variables): Adjust to std::vector
12812 and std::string.
12813 * target.h (struct target_ops)
12814 <to_download_trace_state_variable>: Pass reference to
12815 trace_state_variable.
12816 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12817 * target-delegates.c: Re-generate.
12818 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12819 (mi_tsv_deleted): Likewise.
12820 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12821 * remote.c (remote_download_trace_state_variable): Change
12822 pointer to reference and adjust.
12823 * make-target-delegates (parse_argtypes): Handle references.
12824 (write_function_header): Likewise.
12825 (munge_type): Likewise.
12826
12827 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12828
12829 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12830 string_view-selftests.c.
12831 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12832 testsuite.
12833 * unittests/basic_string_view/cons/char/1.cc: Likewise.
12834 * unittests/basic_string_view/cons/char/2.cc: Likewise.
12835 * unittests/basic_string_view/cons/char/3.cc: Likewise.
12836 * unittests/basic_string_view/element_access/char/1.cc:
12837 Likewise.
12838 * unittests/basic_string_view/element_access/char/empty.cc:
12839 Likewise.
12840 * unittests/basic_string_view/element_access/char/front_back.cc:
12841 Likewise.
12842 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12843 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12844 Likewise.
12845 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12846 Likewise.
12847 * unittests/basic_string_view/modifiers/swap/char/1.cc:
12848 Likewise.
12849 * unittests/basic_string_view/operations/compare/char/1.cc:
12850 Likewise.
12851 * unittests/basic_string_view/operations/compare/char/13650.cc:
12852 Likewise.
12853 * unittests/basic_string_view/operations/copy/char/1.cc:
12854 Likewise.
12855 * unittests/basic_string_view/operations/data/char/1.cc:
12856 Likewise.
12857 * unittests/basic_string_view/operations/find/char/1.cc:
12858 Likewise.
12859 * unittests/basic_string_view/operations/find/char/2.cc:
12860 Likewise.
12861 * unittests/basic_string_view/operations/find/char/3.cc:
12862 Likewise.
12863 * unittests/basic_string_view/operations/find/char/4.cc:
12864 Likewise.
12865 * unittests/basic_string_view/operations/rfind/char/1.cc:
12866 Likewise.
12867 * unittests/basic_string_view/operations/rfind/char/2.cc:
12868 Likewise.
12869 * unittests/basic_string_view/operations/rfind/char/3.cc:
12870 Likewise.
12871 * unittests/basic_string_view/operations/substr/char/1.cc:
12872 Likewise.
12873 * unittests/basic_string_view/operators/char/2.cc: Likewise.
12874 * unittests/string_view-selftests.c: New file.
12875
12876 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12877
12878 * unittests/basic_string_view/capacity/1.cc: New file.
12879 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12880 * unittests/basic_string_view/cons/char/1.cc: New file.
12881 * unittests/basic_string_view/cons/char/2.cc: New file.
12882 * unittests/basic_string_view/cons/char/3.cc: New file.
12883 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12884 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12885 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12886 * unittests/basic_string_view/element_access/char/1.cc: New file.
12887 * unittests/basic_string_view/element_access/char/2.cc: New file.
12888 * unittests/basic_string_view/element_access/char/empty.cc: New file.
12889 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12890 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12891 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12892 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12893 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12894 * unittests/basic_string_view/include.cc: New file.
12895 * unittests/basic_string_view/inserters/char/1.cc: New file.
12896 * unittests/basic_string_view/inserters/char/2.cc: New file.
12897 * unittests/basic_string_view/inserters/char/3.cc: New file.
12898 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12899 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12900 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12901 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12902 * unittests/basic_string_view/literals/types.cc: New file.
12903 * unittests/basic_string_view/literals/values.cc: New file.
12904 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12905 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12906 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12907 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12908 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12909 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12910 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12911 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12912 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12913 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12914 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12915 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12916 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12917 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12918 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12919 * unittests/basic_string_view/operations/data/char/1.cc: New file.
12920 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12921 * unittests/basic_string_view/operations/find/char/1.cc: New file.
12922 * unittests/basic_string_view/operations/find/char/2.cc: New file.
12923 * unittests/basic_string_view/operations/find/char/3.cc: New file.
12924 * unittests/basic_string_view/operations/find/char/4.cc: New file.
12925 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12926 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12927 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12928 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12929 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12930 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12931 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12932 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12933 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12934 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12935 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12936 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12937 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12938 * unittests/basic_string_view/operators/char/2.cc: New file.
12939 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12940 * unittests/basic_string_view/range_access/char/1.cc: New file.
12941 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12942 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12943 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12944 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12945 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12946 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12947 * unittests/basic_string_view/requirements/typedefs.cc: New file.
12948 * unittests/basic_string_view/typedefs.cc: New file.
12949 * unittests/basic_string_view/types/1.cc: New file.
12950
12951 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12952
12953 * common/gdb_string_view.h: Remove libstdc++ implementation
12954 details, adjust to gdb reality.
12955 * common/gdb_string_view.tcc: Likewise.
12956 * cli/cli-script.c (struct string_view): Remove.
12957 (user_args) <m_args>: Change element type to gdb::string_view.
12958 (user_args::insert_args): Adjust.
12959
12960 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12961
12962 * common/gdb_string_view.h: New file.
12963 * common/gdb_string_view.tcc: New file.
12964
12965 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12966
12967 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12968 * configure: Re-generate.
12969
12970 2018-04-09 Pedro Alves <palves@redhat.com>
12971
12972 * gdbarch.sh: Include "observable.h" instead of "observer.h".
12973 (set_target_gdbarch): Call
12974 gdb::observers::architecture_changed.notify instead of
12975 observer_notify_architecture_changed.
12976
12977 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12978
12979 * tracepoint.c (struct current_traceframe_cleanup): Remove.
12980 (do_restore_current_traceframe_cleanup): Remove.
12981 (restore_current_traceframe_cleanup_dtor): Remove.
12982 (make_cleanup_restore_current_traceframe): Remove.
12983 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12984 New.
12985 * tracepoint.h (struct scoped_restore_current_traceframe): New.
12986 * infrun.c (fetch_inferior_event): Use
12987 scoped_restore_current_traceframe.
12988
12989 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12990
12991 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12992 Remove.
12993 <n_allocated_type_units>: Remove.
12994 <all_type_units>: Change to std::vector.
12995 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12996 to std::vector change.
12997 (dwarf2_per_objfile::get_cutu): Likewise.
12998 (dwarf2_per_objfile::get_tu): Likewise.
12999 (create_signatured_type_table_from_index): Likewise.
13000 (create_signatured_type_table_from_debug_names): Likewise.
13001 (dw2_symtab_iter_next): Likewise.
13002 (dw2_print_stats): Likewise.
13003 (dw2_expand_all_symtabs): Likewise.
13004 (dw2_expand_marked_cus): Likewise.
13005 (dw2_debug_names_iterator::next): Likewise.
13006 (dwarf2_initialize_objfile): Likewise.
13007 (add_signatured_type_cu_to_table): Likewise.
13008 (create_all_type_units): Likewise.
13009 (add_type_unit): Likewise.
13010 (struct tu_abbrev_offset): Add constructor.
13011 (build_type_psymtabs_1): Adjust to std::vector change.
13012 (print_tu_stats): Likewise.
13013 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13014 (write_debug_names): Likewise.
13015
13016 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13017
13018 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
13019 Make an std::vector.
13020 <n_comp_units>: Remove.
13021 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13022 to std::vector change.
13023 (dwarf2_per_objfile::get_cutu): Likewise.
13024 (dwarf2_per_objfile::get_cu): Likewise.
13025 (create_cus_from_index): Likewise.
13026 (create_addrmap_from_index): Likewise.
13027 (create_addrmap_from_aranges): Likewise.
13028 (dwarf2_read_index): Likewise.
13029 (dw2_find_last_source_symtab): Likewise.
13030 (dw2_map_symtabs_matching_filename): Likewise.
13031 (dw2_symtab_iter_next): Likewise.
13032 (dw2_print_stats): Likewise.
13033 (dw2_expand_all_symtabs): Likewise.
13034 (dw2_expand_symtabs_with_fullname): Likewise.
13035 (dw2_expand_marked_cus): Likewise.
13036 (dw2_map_symbol_filenames): Likewise.
13037 (create_cus_from_debug_names): Likewise.
13038 (dwarf2_read_debug_names): Likewise.
13039 (dw2_debug_names_iterator::next): Likewise.
13040 (dwarf2_initialize_objfile): Likewise.
13041 (set_partial_user): Likewise.
13042 (dwarf2_build_psymtabs_hard): Likewise.
13043 (read_comp_units_from_section): Remove arguments, adjust to
13044 std::vector change.
13045 (create_all_comp_units): Adjust to std::vector and
13046 read_comp_units_from_section changes.
13047 (dwarf2_find_containing_comp_unit): Adjust to std::vector
13048 change.
13049 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13050 (psyms_seen_size): Likewise.
13051 (write_gdbindex): Likewise.
13052 (write_debug_names): Likewise.
13053
13054 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13055
13056 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13057 with dwarf2_per_objfile.
13058 (create_cus_from_index): Likewise.
13059 (create_signatured_type_table_from_index): Likewise.
13060 (dwarf2_read_index): Likewise.
13061 (dwarf2_initialize_objfile): Likewise.
13062 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
13063 per_cu rather than get_dwarf2_per_objfile.
13064
13065 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13066
13067 * dwarf2read.h (struct signatured_type): Forward declare.
13068 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13069 New methods.
13070 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13071 (dw2_get_cutu): ...this.
13072 (dwarf2_per_objfile::get_cu): Rename from...
13073 (dw2_get_cu): ...this.
13074 (dwarf2_per_objfile::get_tu): New.
13075 (create_addrmap_from_index): Adjust.
13076 (create_addrmap_from_aranges): Adjust.
13077 (dw2_find_last_source_symtab): Adjust.
13078 (dw2_map_symtabs_matching_filename): Adjust.
13079 (dw2_symtab_iter_next): Adjust.
13080 (dw2_print_stats): Adjust.
13081 (dw2_expand_all_symtabs): Adjust.
13082 (dw2_expand_symtabs_with_fullname): Adjust.
13083 (dw2_expand_marked_cus): Adjust.
13084 (dw_expand_symtabs_matching_file_matcher): Adjust.
13085 (dw2_map_symbol_filenames): Adjust.
13086 (dw2_debug_names_iterator::next): Adjust.
13087 (dwarf2_initialize_objfile): Adjust.
13088 (set_partial_user): Adjust.
13089 (dwarf2_build_psymtabs_hard): Adjust.
13090
13091 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13092
13093 * dwarf2read.c (create_signatured_type_table_from_debug_names):
13094 Remove unused variables.
13095 (dw2_map_symtabs_matching_filename): Likewise.
13096 (dwarf2_record_block_ranges): Likewise.
13097 (dwarf2_read_addr_index): Likewise.
13098 (follow_die_offset): Likewise.
13099
13100 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13101
13102 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13103 to symbol_file_add_main.
13104
13105 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13106
13107 PR mi/22299
13108 * mi/mi-console.c (do_fputc_async_safe): New.
13109 (mi_console_file::write_async_safe): New.
13110 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13111 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13112 New.
13113 * ui-file.c (ui_file::putstrn): Adjust call to
13114 fputstrn_unfiltered.
13115 * utils.c (printchar): Replace do_fputs and do_fprintf
13116 parameters by do_fputc.
13117 (fputstr_filtered): Adjust call to printchar.
13118 (fputstr_unfiltered): Likewise.
13119 (fputstrn_filtered): Likewise.
13120 (fputstrn_unfiltered): Add do_fputc parameter, pass to
13121 printchar.
13122 * utils.h (do_fputc_ftype): New typedef.
13123 (fputstrn_unfiltered): Add do_fputc parameter.
13124
13125 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13126
13127 * regformats/i386/i386-avx.dat: Remove.
13128
13129 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13130
13131 PR gdb/22979
13132 * amd64-tdep.c (amd64_none_init_abi): New function.
13133 (amd64_x32_none_init_abi): New function.
13134 (_initialize_amd64_tdep): Register handlers for x86-64 and
13135 x64_32 with GDB_OSABI_NONE.
13136 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13137 GDB_OSABI_NONE osabi.
13138
13139 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13140
13141 PR gdb/22980
13142 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13143 GDB_OSABI_NONE.
13144 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13145 * osabi.c (gdb_osabi_names): Add "unknown" entry.
13146
13147 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13148
13149 * common/byte-vector.h (char_vector): New type.
13150 * target.h (target_read_alloc): Return
13151 gdb::optional<byte_vector>.
13152 (target_read_stralloc): Return gdb::optional<char_vector>.
13153 (target_get_osdata): Return gdb::optional<char_vector>.
13154 * target.c (target_read_alloc_1): Templatize. Replacement
13155 manual memory management with vector.
13156 (target_read_alloc): Change return type, adjust.
13157 (target_read_stralloc): Change return type, adjust.
13158 (target_get_osdata): Change return type, adjust.
13159 * auxv.c (struct auxv_info) <length>: Remove.
13160 <data>: Change type to gdb::optional<byte_vector>.
13161 (auxv_inferior_data_cleanup): Free auxv_info with delete.
13162 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13163 (target_auxv_search): Adjust.
13164 (fprint_target_auxv): Adjust.
13165 * avr-tdep.c (avr_io_reg_read_command): Adjust.
13166 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13167 (linux_make_corefile_notes): Adjust.
13168 * osdata.c (get_osdata): Adjust.
13169 * remote.c (remote_get_threads_with_qxfer): Adjust.
13170 (remote_memory_map): Adjust.
13171 (remote_traceframe_info): Adjust.
13172 (btrace_read_config): Adjust.
13173 (remote_read_btrace): Adjust.
13174 (remote_pid_to_exec_file): Adjust.
13175 * solib-aix.c (solib_aix_get_library_list): Adjust.
13176 * solib-dsbt.c (decode_loadmap): Don't free buf.
13177 (dsbt_get_initial_loadmaps): Adjust.
13178 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13179 * solib-target.c (solib_target_current_sos): Adjust.
13180 * tracepoint.c (sdata_make_value): Adjust.
13181 * xml-support.c (xinclude_start_include): Adjust.
13182 (xml_fetch_content_from_file): Adjust.
13183 * xml-support.h (xml_fetch_another): Change return type.
13184 (xml_fetch_content_from_file): Change return type.
13185 * xml-syscall.c (xml_init_syscalls_info): Adjust.
13186 * xml-tdesc.c (file_read_description_xml): Adjust.
13187 (fetch_available_features_from_target): Change return type.
13188 (target_fetch_description_xml): Adjust.
13189 (target_read_description_xml): Adjust.
13190
13191 2018-04-06 Tom Tromey <tom@tromey.com>
13192
13193 * value.c (~value): Update.
13194 (struct value) <contents>: Now unique_xmalloc_ptr.
13195 (value_contents_bits_eq, allocate_value_contents)
13196 (value_contents_raw, value_contents_all_raw)
13197 (value_contents_for_printing, value_contents_for_printing_const)
13198 (set_value_enclosing_type): Update.
13199
13200 2018-04-06 Tom Tromey <tom@tromey.com>
13201
13202 * value.c (range_s): Remove typedef, VEC.
13203 (struct range): Add operator<.
13204 (range_lessthan): Remove.
13205 (ranges_contain): Change type.
13206 (~value): Update.
13207 (struct value) <unavailable, optimized_out>: Now std::vector.
13208 (value_entirely_available)
13209 (value_entirely_covered_by_range_vector)
13210 (value_entirely_unavailable, value_entirely_optimized_out):
13211 Update.
13212 (insert_into_bit_range_vector): Change argument type.
13213 (find_first_range_overlap): Likewise.
13214 (struct ranges_and_idx, value_contents_bits_eq)
13215 (require_not_optimized_out, require_available): Update.
13216 (ranges_copy_adjusted): Change argument types.
13217 (value_optimized_out, value_copy, value_fetch_lazy): Update.
13218
13219 2018-04-06 Tom Tromey <tom@tromey.com>
13220
13221 * value.c (~value): Update.
13222 (struct value) <parent>: Now a value_ref_ptr.
13223 (value_parent, set_value_parent, value_address, value_copy):
13224 Update.
13225
13226 2018-04-06 Tom Tromey <tom@tromey.com>
13227
13228 * value.c (struct value): Add constructor, destructor, and member
13229 initializers.
13230 (allocate_value_lazy, value_decref): Update.
13231
13232 2018-04-06 Tom Tromey <tom@tromey.com>
13233
13234 * value.c (struct value) <released, next>: Remove.
13235 (all_values): Now a std::vector.
13236 (allocate_value_lazy): Update.
13237 (value_next): Remove.
13238 (value_mark, value_free_to_mark, release_value)
13239 (value_release_to_mark): Update.
13240
13241 2018-04-06 Tom Tromey <tom@tromey.com>
13242
13243 * value.h (fetch_subexp_value, value_release_to_mark): Update.
13244 (free_value_chain): Remove.
13245 * value.c (free_value_chain): Remove.
13246 (value_release_to_mark): Return a std::vector.
13247 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13248 std::vector.
13249 (check_condition): Update.
13250 * eval.c (fetch_subexp_value): Change "val_chain" to a
13251 std::vector.
13252 * breakpoint.c (update_watchpoint): Update.
13253 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13254
13255 2018-04-06 Tom Tromey <tom@tromey.com>
13256
13257 * value.h (free_all_values): Remove.
13258 * value.c (free_all_values): Remove.
13259
13260 2018-04-06 Tom Tromey <tom@tromey.com>
13261
13262 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13263 (value_history_chain, value_history_count): Remove.
13264 (value_history): New global.
13265 (record_latest_value, access_value_history, show_values)
13266 (preserve_values): Update.
13267
13268 2018-04-06 Tom Tromey <tom@tromey.com>
13269
13270 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13271 * varobj.c (varobj_set_display_format, varobj_set_value)
13272 (install_default_visualizer, construct_visualizer)
13273 (install_new_value, ~varobj, varobj_get_value_type)
13274 (my_value_of_variable, varobj_editable_p): Update.
13275 * c-varobj.c (c_describe_child, c_value_of_variable)
13276 (cplus_number_of_children, cplus_describe_child): Update.
13277 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13278 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13279 (ada_value_of_variable, ada_value_is_changeable_p): Update.
13280
13281 2018-04-06 Tom Tromey <tom@tromey.com>
13282
13283 * printcmd.c (last_examine_address): Change type to
13284 value_ref_ptr.
13285 (do_examine, x_command): Update.
13286
13287 2018-04-06 Tom Tromey <tom@tromey.com>
13288
13289 * value.c (release_value): Update.
13290 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13291 (struct bpstats) <val>: Now a value_ref_ptr.
13292 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13293 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13294 (~watchpoint, print_it_watchpoint, watch_command_1)
13295 (invalidate_bp_value_on_memory_change): Update.
13296
13297 2018-04-06 Tom Tromey <tom@tromey.com>
13298
13299 * varobj.c (varobj_clear_saved_item)
13300 (update_dynamic_varobj_children, install_new_value, ~varobj):
13301 Update.
13302 * value.h (value_incref): Move declaration earlier.
13303 (value_decref): Rename from value_free.
13304 (struct value_ref_policy): New.
13305 (value_ref_ptr): New typedef.
13306 (struct value_deleter): Remove.
13307 (gdb_value_up): Remove typedef.
13308 (release_value): Change return type.
13309 (release_value_or_incref): Remove.
13310 * value.c (set_value_parent): Update.
13311 (value_incref): Change return type.
13312 (value_decref): Rename from value_free.
13313 (value_free_to_mark, free_all_values, free_value_chain): Update.
13314 (release_value): Return value_ref_ptr.
13315 (release_value_or_incref): Remove.
13316 (record_latest_value, set_internalvar, clear_internalvar):
13317 Update.
13318 * stack.c (info_frame_command): Don't call value_free.
13319 * python/py-value.c (valpy_dealloc, valpy_new)
13320 (value_to_value_object): Update.
13321 * printcmd.c (do_examine): Update.
13322 * opencl-lang.c (lval_func_free_closure): Update.
13323 * mi/mi-main.c (register_changed_p): Don't call value_free.
13324 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13325 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13326 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13327 value_free.
13328 * guile/scm-value.c (vlscm_free_value_smob)
13329 (vlscm_scm_from_value): Update.
13330 * frame.c (frame_register_unwind, frame_unwind_register_signed)
13331 (frame_unwind_register_unsigned, get_frame_register_bytes)
13332 (put_frame_register_bytes): Don't call value_free.
13333 * findvar.c (address_from_register): Don't call value_free.
13334 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13335 * dwarf2loc.c (entry_data_value_free_closure)
13336 (value_of_dwarf_reg_entry, free_pieced_value_closure)
13337 (dwarf2_evaluate_loc_desc_full): Update.
13338 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13339 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13340 (~watchpoint, watch_command_1)
13341 (invalidate_bp_value_on_memory_change): Update.
13342 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13343
13344 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
13345
13346 PR gdb/23022
13347 * warning.m4: Add -Wno-error=deprecated-register.
13348 * configure: Re-generate.
13349
13350 2018-04-05 Tom Tromey <tom@tromey.com>
13351
13352 * linespec.h: Remove include of "vec.h".
13353
13354 2018-04-05 Tom Tromey <tom@tromey.com>
13355
13356 * linespec.c (typep): Remove typedef.
13357 (find_methods, find_superclass_methods): Take a std::vector.
13358 (find_method): Use std::vector.
13359
13360 2018-04-05 Tom Tromey <tom@tromey.com>
13361
13362 * utils.c (compare_strings): Remove.
13363 * utils.h (compare_strings): Remove.
13364 * objc-lang.h (find_imps): Update.
13365 * objc-lang.c (find_methods): Take a std::vector.
13366 (uniquify_strings, find_imps): Likewise.
13367 * linespec.c (find_methods): Take a std::vector.
13368 (decode_objc): Use std::vector.
13369 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13370 a std::vector.
13371 (find_method, find_function_symbols): Use std::vector.
13372
13373 2018-04-05 Tom Tromey <tom@tromey.com>
13374
13375 * completer.c (completion_tracker::completion_tracker): Remove
13376 cast.
13377 (completion_tracker::discard_completions): Likewise.
13378 * breakpoint.c (ambiguous_names_p): Remove cast.
13379 * ada-lang.c (_initialize_ada_language): Remove cast.
13380 * utils.h (streq): Update.
13381 (streq_hash): Add new declaration.
13382 * utils.c (streq): Return bool.
13383 (streq_hash): New function.
13384
13385 2018-04-05 Tom Tromey <tom@tromey.com>
13386
13387 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13388 Remove a string copy.
13389
13390 2018-04-05 Tom Tromey <tom@tromey.com>
13391
13392 * linespec.c (filter_results): Use std::vector.
13393 (decode_line_2, decode_line_full): Update.
13394
13395 2018-04-05 Tom Tromey <tom@tromey.com>
13396
13397 * linespec.c (canonical_to_fullform): Return std::string.
13398 (filter_results): Update.
13399 (struct decode_line_2_item): Add constructor.
13400 <fullform, displayform>: Now std::string.
13401 (decode_line_2_compare_items): Now a std::sort comparator.
13402 (decode_line_2): Update.
13403
13404 2018-04-05 Tom Tromey <tom@tromey.com>
13405
13406 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13407 (unexpected_linespec_error): Update.
13408 (linespec_parse_basic, parse_linespec): Update.
13409
13410 2018-04-05 Tom Tromey <tom@tromey.com>
13411
13412 * linespec.c (linespec_parse_basic): Reindent.
13413
13414 2018-04-05 Tom Tromey <tom@tromey.com>
13415
13416 * minsyms.h (iterate_over_minimal_symbols): Update.
13417 * minsyms.c (iterate_over_minimal_symbols): Take a
13418 gdb::function_view.
13419 * linespec.c (struct collect_minsyms): Remove.
13420 (compare_msyms): Now a std::sort comparator.
13421 (add_minsym): Add parameters.
13422 (search_minsyms_for_name): Update. Use std::vector.
13423
13424 2018-04-03 Tom Tromey <tom@tromey.com>
13425
13426 * mipsread.c (read_alphacoff_dynamic_symtab): Use
13427 gdb::byte_vector.
13428
13429 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13430
13431 * MAINTAINERS (Write After Approval): Add Weimin Pan.
13432
13433 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13434
13435 PR gdb/16959
13436 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
13437 printing static type.
13438
13439 2018-04-01 Tom Tromey <tom@tromey.com>
13440
13441 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13442 (rs6000_xfer_shared_libraries): Update.
13443
13444 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
13445
13446 * common/gdb_vecs.h (char_ptr): Remove.
13447 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13448
13449 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13450
13451 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13452 with std::vector.
13453 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13454
13455 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13456
13457 * tracepoint.h (struct uploaded_tp): Initialize fields.
13458 <actions, step_actions, cmd_strings>: Change type to
13459 std::vector<char *>.
13460 * tracepoint.c (get_uploaded_tp): Allocate with new.
13461 (free_uploaded_tps): Free with delete.
13462 (parse_tracepoint_definition): Adjust to std::vector change.
13463 * breakpoint.c (read_uploaded_action): Likewise.
13464 (create_tracepoint_from_upload): Likewise.
13465 * ctf.c (ctf_write_uploaded_tp): Likewise.
13466 (SET_ARRAY_FIELD): Likewise.
13467 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13468
13469 2018-03-30 Tom Tromey <tom@tromey.com>
13470
13471 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
13472 std::unique_ptr.
13473 (svr4_keep_data_in_core): Update.
13474 (svr4_read_so_list): Update.
13475
13476 2018-03-30 Tom Tromey <tom@tromey.com>
13477
13478 * windows-nat.c (handle_output_debug_string, handle_exception):
13479 Update.
13480 * target.h (target_read_string): Update.
13481 * target.c (target_read_string): Change "string" to
13482 unique_xmalloc_ptr.
13483 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13484 Update.
13485 * solib-frv.c (frv_current_sos): Update.
13486 * solib-dsbt.c (dsbt_current_sos): Update.
13487 * solib-darwin.c (darwin_current_sos): Update.
13488 * linux-thread-db.c (inferior_has_bug): Update.
13489 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13490 Update. Remove alloca.
13491 * ada-lang.c (ada_main_name): Update.
13492
13493 2018-03-30 Tom Tromey <tom@tromey.com>
13494
13495 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13496 (struct dwo_file_deleter): New.
13497 (dwo_file_up): New typedef.
13498 (open_and_init_dwo_file): Use dwo_file_up.
13499 (free_dwo_file_cleanup): Remove.
13500
13501 2018-03-30 Tom Tromey <tom@tromey.com>
13502
13503 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13504 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13505
13506 2018-03-30 Tom Tromey <tom@tromey.com>
13507
13508 * dwarf2read.c (class free_cached_comp_units): New class.
13509 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13510 (free_cached_comp_units): Remove function.
13511
13512 2018-03-30 Tom Tromey <tom@tromey.com>
13513
13514 * utils.h (make_cleanup_unpush_target): Remove.
13515 * inf-ptrace.c (struct target_unpusher): New.
13516 (target_unpush_up) New typedef.
13517 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13518 target_unpush_up.
13519 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13520
13521 2018-03-27 Tom Tromey <tom@tromey.com>
13522
13523 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13524
13525 2018-03-27 Pedro Alves <palves@redhat.com>
13526 Tom Tromey <tom@tromey.com>
13527
13528 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13529 destructor. Now a class.
13530 (gdb_readline_wrapper_cleanup): Remove function.
13531 (gdb_readline_wrapper): Remove cleanups.
13532
13533 2018-03-27 Tom Tromey <tom@tromey.com>
13534
13535 * typeprint.h (struct type_print_options) <local_typedefs,
13536 global_typedefs>: Remove "struct" keyword.
13537 (class typedef_hash_table): New class.
13538 (recursively_update_typedef_hash, add_template_parameters)
13539 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13540 (find_typedef_in_hash): Don't declare.
13541 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13542 (typedef_hash_table::recursively_update): Rename from
13543 recursively_update_typedef_hash. Now a member.
13544 (typedef_hash_table::add_template_parameters): Rename from
13545 add_template_parameters. Now a member.
13546 (typedef_hash_table::typedef_hash_table): Now a constructor;
13547 rename from create_typedef_hash.
13548 (typedef_hash_table::~typedef_hash_table): Now a destructor;
13549 rename from free_typedef_hash.
13550 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13551 (do_free_global_table): Remove.
13552 (typedef_hash_table::typedef_hash_table): New constructor; renamed
13553 from copy_type_recursive.
13554 (create_global_typedef_table): Remove.
13555 (typedef_hash_table::find_global_typedef): Now a member of
13556 typedef_hash_table.
13557 (typedef_hash_table::find_typedef): Rename from
13558 find_typedef_in_hash; now a member.
13559 (whatis_exp): Update.
13560 * extension.h (struct ext_lang_type_printers): Add constructor and
13561 destructor.
13562 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13563 declare.
13564 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13565 Now a constructor; rename from start_ext_lang_type_printers.
13566 (ext_lang_type_printers): Now a destructor; rename from
13567 free_ext_lang_type_printers.
13568 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13569 Update.
13570 (c_type_print_base_struct_union): Update. Remove cleanups.
13571
13572 2018-03-27 Tom Tromey <tom@tromey.com>
13573
13574 * dwarf-index-write.c: Include <cmath>.
13575
13576 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13577
13578 * NEWS: Add entry describing new "set|show varsize-limit" command.
13579 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13580 command.
13581 * printcmd.c (_initialize_printcmd): Add "set var" alias of
13582 "set variable".
13583
13584 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
13585
13586 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13587 dwarf-index-write.c
13588 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13589 * dwarf-index-common.c: New file.
13590 * dwarf-index-common.h: New file.
13591 * dwarf-index-write.c: New file.
13592 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13593 (struct dwarf2_section_info): Move from here.
13594 (dwarf2_section_info_def): Likewise.
13595 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13596 (offset_type): Likewise.
13597 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13598 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13599 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13600 (byte_swap): Likewise.
13601 (MAYBE_SWAP): Likewise.
13602 (dwarf2_per_cu_ptr): Likewise.
13603 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13604 (struct tu_stats): Likewise.
13605 (struct dwarf2_per_objfile): Likewise.
13606 (struct dwarf2_per_cu_data): Likewise.
13607 (struct signatured_type): Likewise.
13608 (sig_type_ptr): Likewise.
13609 (DEF_VEC_P (sig_type_ptr)): Likewise.
13610 (INDEX4_SUFFIX): Likewise.
13611 (INDEX5_SUFFIX): Likewise.
13612 (DEBUG_STR_SUFFIX): Likewise.
13613 (dwarf2_read_section): Make non-static.
13614 (mapped_index_string_hash): Move from here.
13615 (dwarf5_djb_hash): Likewise.
13616 (file_write): Likewise.
13617 (class data_buf): Likewise.
13618 (struct symtab_index_entry): Likewise.
13619 (struct mapped_symtab): Likewise.
13620 (find_slot): Likewise.
13621 (hash_expand): Likewise.
13622 (add_index_entry): Likewise.
13623 (uniquify_cu_indices): Likewise.
13624 (class c_str_view): Likewise.
13625 (class c_str_view_hasher): Likewise.
13626 (class vector_hasher): Likewise.
13627 (write_hash_table): Likewise.
13628 (psym_index_map): Likewise.
13629 (struct addrmap_index_data): Likewise.
13630 (add_address_entry): Likewise.
13631 (add_address_entry_worker): Likewise.
13632 (write_address_map): Likewise.
13633 (symbol_kind): Likewise.
13634 (write_psymbols): Likewise.
13635 (struct signatured_type_index_data): Likewise.
13636 (write_one_signatured_type): Likewise.
13637 (recursively_count_psymbols): Likewise.
13638 (recursively_write_psymbols): Likewise.
13639 (class debug_names): Likewise.
13640 (check_dwarf64_offsets): Likewise.
13641 (psyms_seen_size): Likewise.
13642 (write_gdbindex): Likewise.
13643 (write_debug_names): Likewise.
13644 (assert_file_size): Likewise.
13645 (write_psymtabs_to_index): Likewise.
13646 (save_gdb_index_command): Likewise.
13647 (_initialize_dwarf2_read): Don't register the "save gdb-index"
13648 command.
13649 * dwarf2read.h: New file.
13650
13651 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13652
13653 PR gdb/22670
13654 * dwarf2read.c (dwarf2_physname): Do not return the demangled
13655 symbol name if the CU's language stores symbol names in linkage
13656 format.
13657 * language.h (struct language_defn)
13658 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
13659 all instances of this struct.
13660
13661 2018-03-26 Tom Tromey <tom@tromey.com>
13662
13663 * stack.c (backtrace_command_1): Remove verbose code.
13664
13665 2018-03-26 Tom Tromey <tom@tromey.com>
13666
13667 * python/py-framefilter.c (py_print_type): Don't catch
13668 exceptions. Return void.
13669 (py_print_value): Likewise.
13670 (py_print_single_arg): Likewise.
13671 (enumerate_args): Don't catch exceptions.
13672 (py_print_args): Likewise.
13673 (py_print_frame): Likewise.
13674 (gdbpy_apply_frame_filter): Catch exceptions here.
13675
13676 2018-03-26 Tom Tromey <tom@tromey.com>
13677
13678 * stack.c (_initialize_stack): Remove trailing newlines from help
13679 text. Add "Usage" line to "backtrace" help.
13680
13681 2018-03-26 Tom Tromey <tom@tromey.com>
13682
13683 PR python/16486:
13684 * python/py-framefilter.c (py_print_args): Call wrap_hint.
13685
13686 2018-03-26 Tom Tromey <tom@tromey.com>
13687
13688 * python/py-framefilter.c (py_print_single_arg): Return
13689 EXT_LANG_BT_ERROR from catch.
13690
13691 2018-03-26 Tom Tromey <tom@tromey.com>
13692
13693 PR backtrace/15584:
13694 * stack.c (backtrace_command_1): Move some code into no-filters
13695 "if".
13696
13697 2018-03-26 Tom Tromey <tom@tromey.com>
13698
13699 * python/py-framefilter.c (throw_quit_or_print_exception): New
13700 function.
13701 (gdbpy_apply_frame_filter): Use it.
13702
13703 2018-03-26 Tom Tromey <tom@tromey.com>
13704
13705 PR cli/17716:
13706 * python/py-framefilter.c (py_print_type, py_print_value)
13707 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13708 RETURN_MASK_ERROR.
13709
13710 2018-03-26 Tom Tromey <tom@tromey.com>
13711
13712 * python/py-framefilter.c (enumerate_args): Use
13713 gdb::unique_xmalloc_ptr.
13714
13715 2018-03-26 Tom Tromey <tom@tromey.com>
13716
13717 * python/py-framefilter.c (py_print_frame): Return
13718 EXT_LANG_BT_OK.
13719 (gdbpy_apply_frame_filter): Update comment.
13720 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13721 Remove.
13722 <EXT_LANG_BT_NO_FILTERS>: Change value.
13723
13724 2018-03-26 Tom Tromey <tom@tromey.com>
13725
13726 PR backtrace/15582:
13727 * stack.c (backtrace_command): Parse "hide" argument.
13728 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13729 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13730 constant.
13731
13732 2018-03-26 Tom Tromey <tom@tromey.com>
13733
13734 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13735 add "flags".
13736 (backtrace_command): Remove "fulltrace", add "flags".
13737
13738 2018-03-26 Tom Tromey <tom@tromey.com>
13739
13740 * stack.c (backtrace_command): Rewrite command line parsing.
13741
13742 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13743
13744 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13745
13746 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13747
13748 * filename-seen-cache.h: Add include guard.
13749
13750 2018-03-26 Keith Seitz <keiths@redhat.com>
13751
13752 * symfile.c (place_section): Remove "struct" from section_addr_info
13753 in comment.
13754 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13755 "struct" keyword from section_addr_info.
13756
13757 2018-03-26 Alan Hayward <alan.hayward@arm.com>
13758
13759 * regformats/regdef.h (reg): Add constructors.
13760
13761 2018-03-25 Pedro Alves <palves@redhat.com>
13762
13763 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13764 if then/else bodies in var_func_name extraction.
13765
13766 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
13767
13768 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13769 lookup_minimal_symbol() to find symbol entry.
13770 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13771
13772 2018-03-23 Keith Seitz <keiths@redhat.com>
13773
13774 PR c++/22968
13775 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13776 nested type definitions for C++, too.
13777
13778 2018-03-23 Tom Tromey <tom@tromey.com>
13779
13780 * machoread.c (struct oso_el): Add a constructor. Don't define as
13781 a typedef.
13782 (macho_register_oso): Remove.
13783 (macho_symtab_read): Take a std::vector.
13784 (oso_el_compare_name): Now a std::sort comparator.
13785 (macho_symfile_read_all_oso): Take a std::vector.
13786 (macho_symfile_read): Use std::vector. Remove cleanups.
13787
13788 2018-03-22 Tom Tromey <tom@tromey.com>
13789
13790 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13791 (record_full_goto_bookmark): Use std::string.
13792
13793 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13794
13795 PR tdep/18295
13796 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13797 a single mask.
13798
13799 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13800
13801 * rs6000-tdep.c (store_insn_p): New function.
13802 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13803 and cr_reg to their unshifted values. Use store_insn_p to
13804 match LR saves using either R1 or fdata->alloca_reg. Use
13805 store_insn_p to match CR saves. Set alloca_reg_offset
13806 when alloca_reg and framep are set. Remove lr_reg shift
13807 when assigning to fdata->lr_register.
13808
13809 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
13810
13811 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13812 command line args instead of emitting a warning.
13813
13814 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13815
13816 * tracepoint.h (struct static_tracepoint_marker): Initialize
13817 fields, define default constructor, move constructor and move
13818 assignment, disable the rest.
13819 <str_id, extra>: Make std::string.
13820 (release_static_tracepoint_marker): Remove.
13821 (free_current_marker): Remove.
13822 * tracepoint.c (free_current_marker): Remove.
13823 (parse_static_tracepoint_marker_definition): Adjust to
13824 std::string, use new hex2str overload.
13825 (release_static_tracepoint_marker): Remove.
13826 (print_one_static_tracepoint_marker): Get marker by reference
13827 and adjust to std::string.
13828 (info_static_tracepoint_markers_command): Adjust to std::vector
13829 changes
13830 * target.h (static_tracepoint_marker_p): Remove typedef.
13831 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13832 (struct target_ops) <to_static_tracepoint_marker_at>: Return
13833 bool.
13834 <to_static_tracepoint_markers_by_strid>: Return std::vector.
13835 * target-debug.h
13836 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13837 (target_debug_print_std_vector_static_tracepoint_marker): New.
13838 (target_debug_print_struct_static_tracepoint_marker_p): Rename
13839 to...
13840 (target_debug_print_static_tracepoint_marker_p): ... this.
13841 * target-delegates.c: Re-generate.
13842 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13843 Make std::string.
13844 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13845 (decode_static_tracepoint_spec): Adjust to std::vector.
13846 (tracepoint_print_one_detail): Adjust to std::string.
13847 (strace_marker_decode_location): Adjust to std::string.
13848 (update_static_tracepoint): Adjust to std::string, remove call
13849 to release_static_tracepoint_marker.
13850 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13851 Adjust to std::vector.
13852 * remote.c (remote_static_tracepoint_marker_at): Return bool.
13853 (remote_static_tracepoint_markers_by_strid): Adjust to
13854 std::vector.
13855 * common/rsp-low.h (hex2str): New overload with explicit count
13856 of bytes.
13857 * common/rsp-low.c (hex2str): New overload with explicit count
13858 of bytes.
13859 * unittests/rsp-low-selftests.c (test_hex2str): New function.
13860 (_initialize_rsp_low_selftests): Add test_hex2str test.
13861 * unittests/tracepoint-selftests.c
13862 (test_parse_static_tracepoint_marker_definition): Adjust to
13863 std::string.
13864
13865 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13866
13867 * tracepoint.c (parse_static_tracepoint_marker_definition):
13868 Consider case where the definition is followed by more
13869 definitions.
13870 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13871 tracepoint-selftests.c.
13872 * unittests/tracepoint-selftests.c: New.
13873
13874 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13875
13876 * MAINTAINERS (Write After Approval): Add Pedro Franco de
13877 Carvalho.
13878
13879 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13880
13881 * symtab.c (find_pc_sect_line): fixed indentation.
13882
13883 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13884
13885 * symtab.c (find_pc_sect_line): now uses binary search.
13886
13887 2018-03-19 Tom Tromey <tom@tromey.com>
13888
13889 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13890 "IDENT" production.
13891
13892 2018-03-19 Pedro Alves <palves@redhat.com>
13893 Tom Tromey <tom@tromey.com>
13894
13895 * unittests/observable-selftests.c: New file.
13896 * common/observable.h: New file.
13897 * observable.h: New file.
13898 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13899 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13900 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13901 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13902 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13903 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13904 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13905 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13906 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13907 python/py-breakpoint.c, python/py-finishbreakpoint.c,
13908 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13909 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13910 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13911 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13912 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13913 tui/tui-interp.c, valops.c: Update all users.
13914 * tui/tui-hooks.c (tui_bp_created_observer)
13915 (tui_bp_deleted_observer, tui_bp_modified_observer)
13916 (tui_inferior_exit_observer, tui_before_prompt_observer)
13917 (tui_normal_stop_observer, tui_register_changed_observer):
13918 Remove.
13919 (tui_observers_token): New global.
13920 (attach_or_detach, tui_attach_detach_observers): New functions.
13921 (tui_install_hooks, tui_remove_hooks): Use
13922 tui_attach_detach_observers.
13923 * record-btrace.c (record_btrace_thread_observer): Remove.
13924 (record_btrace_thread_observer_token): New global.
13925 * observer.sh: Remove.
13926 * observer.c: Rename to observable.c.
13927 * observable.c (namespace gdb_observers): Define new objects.
13928 (observer_debug): Move into gdb_observers namespace.
13929 (struct observer, struct observer_list, xalloc_observer_list_node)
13930 (xfree_observer_list_node, generic_observer_attach)
13931 (generic_observer_detach, generic_observer_notify): Remove.
13932 (_initialize_observer): Update.
13933 Don't include observer.inc.
13934 * Makefile.in (generated_files): Remove observer.h, observer.inc.
13935 (clean mostlyclean): Likewise.
13936 (observer.h, observer.inc): Remove targets.
13937 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13938 (COMMON_SFILES): Use observable.c, not observer.c.
13939 * .gitignore: Remove observer.h.
13940
13941 2018-03-18 Tom Tromey <tom@tromey.com>
13942
13943 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13944 gdb::def_vector.
13945 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13946
13947 2018-03-17 Tom Tromey <tom@tromey.com>
13948
13949 * auto-load.c (auto_load_objfile_script_1): Use std::string.
13950
13951 2018-03-17 Tom Tromey <tom@tromey.com>
13952
13953 * target.c (class scoped_target_fd): New.
13954 (target_fileio_close_cleanup): Remove.
13955 (target_fileio_read_alloc_1): Use scoped_target_fd.
13956
13957 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
13958
13959 * silent-rules.mk: New.
13960 * Makefile.in: Include silent-rules.mk
13961 (srcdir, VPATH, top_srcdir): Move up.
13962 (COMPILE): Add ECHO_CXX.
13963 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13964 (init.c): Add ECHO_INIT_C.
13965 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13966 (version.c): Add ECHO_GEN.
13967 (printcmd.o): Add ECHO_CXX.
13968 (target-float.o): Add ECHO_CXX.
13969 (ada-exp.o): Add ECHO_CXX.
13970 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13971 (insight$(EXEEXT)): Add ECHO_CXXLD.
13972 * gnulib/configure.ac: Add AM_SILENT_RULES.
13973 * gnulib/aclocal.m4: Re-generate.
13974 * gnulib/configure: Re-generate.
13975 * gnulib/import/Makefile.in: Re-generate.
13976
13977 2018-03-16 Tom Tromey <tom@tromey.com>
13978
13979 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13980 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13981 * utils.c (do_free_section_addr_info)
13982 (make_cleanup_free_section_addr_info): Remove.
13983 * symfile.h (struct other_sections): Add constructor.
13984 (struct section_addr_info): Remove.
13985 (section_addr_info): New typedef.
13986 (struct sym_fns) <sym_offsets>: Change type of parameter.
13987 (build_section_addr_info_from_objfile)
13988 (relative_addr_info_to_section_offsets, addr_info_make_relative)
13989 (default_symfile_offsets, symbol_file_add)
13990 (symbol_file_add_from_bfd)
13991 (build_section_addr_info_from_section_table): Update.
13992 (alloc_section_addr_info, free_section_addr_info): Don't declare.
13993 * symfile.c (alloc_section_addr_info): Remove.
13994 (build_section_addr_info_from_section_table): Change return type.
13995 Update.
13996 (build_section_addr_info_from_bfd)
13997 (build_section_addr_info_from_objfile): Likewise.
13998 (free_section_addr_info): Remove.
13999 (relative_addr_info_to_section_offsets): Change type of "addrs".
14000 (addrs_section_compar): Now a std::sort comparator.
14001 (addrs_section_sort): Change return type.
14002 (addr_info_make_relative): Change type of "addrs". Update.
14003 (default_symfile_offsets, syms_from_objfile_1)
14004 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
14005 (symbol_file_add_separate): Update.
14006 (symbol_file_add): Change type of "addrs". Update.
14007 (add_symbol_file_command): Update. Remove cleanups.
14008 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
14009 cleanups.
14010 * symfile-debug.c (debug_sym_offsets): Change type of "info".
14011 * solib.c (solib_read_symbols): Update.
14012 * objfiles.c (objfile_relocate): Update. Remove cleanups.
14013 * machoread.c (macho_symfile_offsets): Update.
14014 * jit.c (jit_bfd_try_read_symtab): Update.
14015
14016 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
14017
14018 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14019 unittests/utils-selftests.c.
14020 * unittests/utils-selftests.c: New file.
14021
14022 2018-03-14 Tom Tromey <tom@tromey.com>
14023
14024 PR cli/14977:
14025 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
14026 for NULL.
14027
14028 2018-03-14 Tom Tromey <tom@tromey.com>
14029
14030 PR cli/19918:
14031 * printcmd.c (printf_pointer): Allow "-" in format.
14032
14033 2018-03-14 Tom Tromey <tom@tromey.com>
14034
14035 * printcmd.c (_initialize_printcmd): Add usage to printf.
14036
14037 2018-03-14 Yao Qi <qiyao@sourceware.org>
14038
14039 * MAINTAINERS: Update my email address.
14040
14041 2018-03-13 Tom Tromey <tom@tromey.com>
14042
14043 * machoread.c (macho_check_dsym): Change filenamep to a
14044 std::string*.
14045 (macho_symfile_read): Update.
14046 * symfile.c (load_command): Use std::string.
14047
14048 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
14049
14050 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14051 to error message string.
14052 (riscv_register_name): Use xsnprintf instead of sprintf.
14053 (riscv_insn::fetch_instruction): Use gdb_assert instead of
14054 internal_error.
14055 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14056 error.
14057 (riscv_push_dummy_call): Likewise.
14058
14059 2018-03-12 Tom Tromey <tom@tromey.com>
14060
14061 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14062 Use gdb::byte_vector.
14063 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14064
14065 2018-03-12 Yao Qi <yao.qi@linaro.org>
14066
14067 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14068 parameter type to readable_regcache.
14069 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14070 the declaration.
14071
14072 2018-03-11 Tom Tromey <tom@tromey.com>
14073
14074 * dwarf2read.c (struct nextfield): Add initializers.
14075 (struct nextfnfield): Remove.
14076 (struct fnfieldlist): Add initializers. Remove "length" and
14077 "head", use std::vector.
14078 (struct decl_field_list): Remove.
14079 (struct field_info): Add initializers.
14080 <fields, baseclasses>: Now std::vector.
14081 <nbaseclasses, nfnfields, typedef_field_list_count,
14082 nested_types_list_count>: Remove.
14083 (dwarf2_add_field, dwarf2_add_type_defn)
14084 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14085 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14086 (process_structure_scope): Update.
14087
14088 2018-03-11 Tom Tromey <tom@tromey.com>
14089
14090 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14091 for use by std::sort.
14092 (build_type_psymtabs_1): Use std::vector.
14093
14094 2018-03-09 Eli Zaretskii <eliz@gnu.org>
14095
14096 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14097 and LIBMPFR in the printed configuration.
14098
14099 2018-03-08 Tom Tromey <tom@tromey.com>
14100
14101 * source.c (get_filename_and_charpos): Use scoped_fd.
14102 * nto-procfs.c (procfs_open_1): Use scoped_fd.
14103 (procfs_pidlist): Likewise.
14104 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14105 (iterate_over_mappings): Likewise.
14106
14107 2018-03-08 Tom Tromey <tom@tromey.com>
14108
14109 * infcall.c (struct call_return_meta_info)
14110 <stack_temporaries_enabled>: Remove.
14111 (get_call_return_value, call_function_by_hand_dummy): Update.
14112 * thread.c (disable_thread_stack_temporaries): Remove.
14113 (enable_thread_stack_temporaries): Remove.
14114 (thread_stack_temporaries_enabled_p): Return bool.
14115 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14116 (get_last_thread_stack_temporary): Update.
14117 * eval.c (evaluate_subexp): Update.
14118 * gdbthread.h (class enable_thread_stack_temporaries): Now a
14119 class, not a function.
14120 (value_ptr, value_vec): Remove typedefs.
14121 (class thread_info) <stack_temporaries_enabled>: Now bool.
14122 <stack_temporaries>: Now a std::vector.
14123 (thread_stack_temporaries_enabled_p)
14124 (value_in_thread_stack_temporaries): Return bool.
14125
14126 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
14127
14128 * remote.c (putpkt_binary): Fix omitted bytes reporting.
14129 (getpkt_or_notif_sane_1): Likewise.
14130
14131 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14132
14133 * build-id.c (build_id_to_debug_bfd): Use std::string.
14134
14135 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14136
14137 * build-id.c (find_separate_debug_file_by_buildid): Return
14138 std::string.
14139 * build-id.h (find_separate_debug_file_by_buildid): Return
14140 std::string.
14141 * coffread.c (coff_symfile_read): Adjust to std::string.
14142 * elfread.c (elf_symfile_read): Adjust to std::string.
14143 * symfile.c (separate_debug_file_exists): Change parameter to
14144 std::string.
14145 (find_separate_debug_file): Return std::string.
14146 (find_separate_debug_file_by_debuglink): Return std::string.
14147 * symfile.h (find_separate_debug_file_by_debuglink): Return
14148 std::string.
14149
14150 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14151
14152 * common/xml-utils.c (xml_escape_text): Move code to...
14153 (xml_escape_text_append): ... this new function.
14154 * common/xml-utils.h (xml_escape_text_append): New declaration.
14155 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14156 New function.
14157 (_initialize_xml_utils): register test_xml_escape_text_append as
14158 a selftest.
14159
14160 2018-03-07 Alan Hayward <alan.hayward@arm.com>
14161
14162 * defs.h: Remove MAX_REGISTER_SIZE.
14163 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14164 asserts.
14165 * python/py-unwind.c (pyuw_sniffer): Likewise.
14166
14167 2018-03-07 Tom Tromey <tom@tromey.com>
14168
14169 * linux-tdep.c (linux_info_proc): Update.
14170 * target.h (struct target_ops) <to_fileio_readlink>: Return
14171 optional<string>.
14172 (target_fileio_readlink): Return optional<string>.
14173 * remote.c (remote_hostio_readlink): Return optional<string>.
14174 * inf-child.c (inf_child_fileio_readlink): Return
14175 optional<string>.
14176 * target.c (target_fileio_readlink): Return optional<string>.
14177
14178 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
14179
14180 * regcache.c (cooked_read_test): Add riscv to the list of
14181 architectures that have a save_reggroup.
14182
14183 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
14184
14185 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14186 value is not a dynamic class object.
14187
14188 2018-03-06 Tom Tromey <tom@tromey.com>
14189
14190 * rust-exp.y: Formatting fixes.
14191
14192 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14193
14194 * riscv-tdep.c (riscv_register_name): Remove target description
14195 support.
14196 (riscv_gdbarch_init): Remove target description check.
14197
14198 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14199
14200 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14201 comment.
14202 * riscv-tdep.h: Likewise.
14203
14204 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14205
14206 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14207 (riscv_pseudo_register_write): Delete.
14208 (riscv_gdbarch_init): Remove all use of pseudo registers.
14209
14210 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14211
14212 * record-btrace.c (btrace_print_lines): Replace cleanup
14213 parameter with RAII equivalents.
14214 (btrace_insn_history): Replace cleanup with RAII equivalents.
14215 * ui-out.h (make_cleanup_ui_out_list_begin_end,
14216 make_cleanup_ui_out_tuple_begin_end): Remove.
14217 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14218 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14219 make_cleanup_ui_out_list_begin_end): Remove.
14220
14221 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14222
14223 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14224 parameter types to std::vector. Use bool.
14225 (record_btrace_wait): Replace VEC(tp_t) with
14226 std::vector<thread_info *>.
14227 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14228
14229 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14230
14231 * record-btrace.c (record_btrace_disable_callback): Remove.
14232 (struct scoped_btrace_disable): New.
14233 (record_btrace_open): Use scoped_btrace_disable.
14234
14235 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14236
14237 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14238 reading values from registers.
14239
14240 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14241
14242 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14243 where appropriate.
14244
14245 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14246
14247 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14248 change parameter type. Use GDB's print functions, and use
14249 core_addr_to_string where appropriate.
14250 (riscv_push_dummy_call): Use core_addr_to_string where
14251 appropriate, update call to riscv_print_arg_location, and reindent
14252 a few lines.
14253 (riscv_return_value): Update call to riscv_print_arg_location.
14254
14255 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14256 Tim Newsome <tim@sifive.com>
14257 Albert Ou <a0u@eecs.berkeley.edu>
14258 Darius Rad <darius@bluespec.com>
14259
14260 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14261 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14262 (ALLDEPFILES): Add riscv-tdep.c
14263 * configure.tgt: Add riscv support.
14264 * riscv-tdep.c: New file.
14265 * riscv-tdep.h: New file.
14266 * NEWS: Mention new target.
14267 * MAINTAINERS: Add entry for riscv.
14268
14269 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14270
14271 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14272 fields within aggregates.
14273
14274 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
14275
14276 * record-btrace.c (btrace_print_lines): Change type of flags to
14277 gdb_disassembly_flags.
14278
14279 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14280
14281 * fbsd-nat.c: Include "inf-ptrace.h".
14282 (USE_SIGTRAP_SIGINFO): Conditionally define.
14283 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14284 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14285 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14286 function.
14287 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14288 Likewise.
14289 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14290 Likewise.
14291 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14292 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14293 "supports_stopped_by_hw_breakpoint" target methods.
14294
14295 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14296
14297 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14298 * fbsd-nat.c (debug_fbsd_nat): New variable.
14299 (show_fbsd_nat_debug): New function.
14300 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14301 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14302
14303 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14304
14305 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14306 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14307 prototype.
14308 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14309 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14310 method.
14311
14312 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14313
14314 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14315 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14316
14317 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14318
14319 * charset.c (struct charset_vector): New.
14320 (charsets): Change type to charset_vector.
14321 (find_charset_names): Adjust.
14322 (add_one): Adjust.
14323 (_initialize_charset): Adjust.
14324
14325 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14326
14327 * progspace.h (struct program_space) <deleted_solibs>: Change
14328 type to std::vector<std::string>.
14329 * progspace.c (clear_program_space_solib_cache): Adjust.
14330 * breakpoint.c (print_solib_event): Adjust.
14331 (check_status_catch_solib): Adjust.
14332 * solib.c (update_solib_list): Adjust.
14333 * ui-out.h (class ui_out) <field_string>: New overload.
14334 * ui-out.c (ui_out::field_string): New overload.
14335
14336 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14337
14338 * progspace.h (struct program_space): Add constructor and
14339 destructor, initialize fields.
14340 (add_program_space): Remove.
14341 * progspace.c (add_program_space): Rename to...
14342 (program_space::program_space): ... this.
14343 (release_program_space): Rename to...
14344 (program_space::~program_space): ... this.
14345 (delete_program_space): Use delete to delete program_space.
14346 (initialize_progspace): Use new to allocate program_space.
14347 * inferior.c (add_inferior_with_spaces): Likewise.
14348 (clone_inferior_command): Likewise.
14349 * infrun.c (follow_fork_inferior): Likewise.
14350 (handle_vfork_child_exec_or_exit): Likewise.
14351
14352 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14353
14354 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14355 (delim_string_to_char_ptr_vec): Return std::vector of
14356 gdb::unique_xmalloc_ptr.
14357 (dirnames_to_char_ptr_vec_append): Take std::vector of
14358 gdb::unique_xmalloc_ptr.
14359 (dirnames_to_char_ptr_vec): Return std::vector of
14360 gdb::unique_xmalloc_ptr.
14361 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14362 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14363 (delim_string_to_char_ptr_vec): Return an std::vector of
14364 gdb::unique_xmalloc_ptr, adjust the code.
14365 (dirnames_to_char_ptr_vec_append): Take an std::vector of
14366 gdb::unique_xmalloc_ptr, adjust the code.
14367 (dirnames_to_char_ptr_vec): Return an std::vector of
14368 gdb::unique_xmalloc_ptr, adjust the code.
14369 * auto-load.c (auto_load_safe_path_vec): Change type to
14370 std::vector of gdb::unique_xmalloc_ptr.
14371 (auto_load_expand_dir_vars): Return an std::vector of
14372 gdb::unique_xmalloc_ptr, adjust the code.
14373 (auto_load_safe_path_vec_update): Adjust.
14374 (filename_is_in_auto_load_safe_path_vec): Adjust.
14375 (auto_load_objfile_script_1): Adjust.
14376 * build-id.c (build_id_to_debug_bfd): Adjust.
14377 * linux-thread-db.c (thread_db_load_search): Adjust.
14378 * source.c (add_path): Adjust.
14379 (openp): Adjust.
14380 * symfile.c (find_separate_debug_file): Adjust.
14381 * utils.c (do_free_char_ptr_vec): Remove.
14382 (make_cleanup_free_char_ptr_vec): Remove.
14383
14384 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
14385
14386 PR gdb/22907
14387 * common/pathstuff.c: Conditionally include "<windows.h>".
14388
14389 2018-03-01 Georg Sauthoff <mail@georg.so>
14390
14391 PR gdb/22888
14392 * gcore.in: Quote variables and switch interpreter to bash.
14393
14394 2018-03-01 Tom Tromey <tom@tromey.com>
14395
14396 * dwarf2read.c (alloc_discriminant_info): Fix default_index
14397 assertion. Add assertion for discriminant_index.
14398 (quirk_rust_enum): Use correct base type name in univariant case.
14399
14400 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
14401
14402 * record.c (get_call_history_modifiers): Return a
14403 record_print_flags.
14404 (cmd_record_call_history): Adjust.
14405 * record-btrace.c (record_btrace_call_history): Adjust.
14406 (record_btrace_call_history_range): Adjust.
14407 (record_btrace_call_history_from): Adjust.
14408 * target-debug.h (target_debug_print_record_print_flags): New.
14409 * target-delegates.c: Re-generate.
14410 * target.c (target_call_history): Change flags type.
14411 (target_call_history_from): Likewise.
14412 (target_call_history_range): Likewise.
14413 * target.h (struct target_ops) <target_call_history>: Likewise.
14414 (target_call_history_from): Likewise.
14415 (target_call_history_range): Likewise.
14416
14417 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14418 Simon Marchi <simon.marchi@polymtl.ca>
14419
14420 * common/common-utils.c: Include "sys/stat.h".
14421 (is_regular_file): Move here from "source.c"; change return
14422 type to "bool".
14423 * common/common-utils.h (is_regular_file): New prototype.
14424 * common/pathstuff.c (contains_dir_separator): New function.
14425 * common/pathstuff.h (contains_dir_separator): New prototype.
14426 * source.c: Don't include "sys/stat.h".
14427 (is_regular_file): Move to "common/common-utils.c".
14428
14429 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14430
14431 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14432 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14433 * auto-load.c: Include "common/pathstuff.h".
14434 * common/common-def.h (current_directory): Move here.
14435 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14436 function.
14437 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14438 prototype.
14439 * common/pathstuff.c: New file.
14440 * common/pathstuff.h: New file.
14441 * compile/compile.c: Include "common/pathstuff.h".
14442 * defs.h (current_directory): Move to "common/common-defs.h".
14443 * dwarf2read.c: Include "common/pathstuff.h".
14444 * exec.c: Likewise.
14445 * guile/scm-safe-call.c: Likewise.
14446 * linux-thread-db.c: Likewise.
14447 * main.c: Likewise.
14448 * nto-tdep.c: Likewise.
14449 * objfiles.c: Likewise.
14450 * source.c: Likewise.
14451 * symtab.c: Likewise.
14452 * utils.c: Include "common/pathstuff.h".
14453 (gdb_realpath): Move to "common/pathstuff.c".
14454 (gdb_realpath_keepfile): Likewise.
14455 (gdb_abspath): Likewise.
14456 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14457 (gdb_realpath_keepfile): Likewise.
14458 (gdb_abspath): Likewise.
14459
14460 2018-02-28 John Baldwin <jhb@FreeBSD.org>
14461
14462 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14463 wildcard process pid for super_resume for kernels with a
14464 specific bug.
14465
14466 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
14467
14468 * compile/compile.c (get_args): Add additional comments
14469 explaining function.
14470
14471 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
14472 Tom Tromey <tom@tromey.com>
14473
14474 * target.h (memory_write_request_s): Remove typedef. Don't define
14475 VEC.
14476 (target_write_memory_blocks): Change argument to std::vector.
14477 (struct memory_write_request): Add constructor.
14478 * target-memory.c (compare_block_starting_address): Return bool.
14479 Change argument types.
14480 (claim_memory): Change arguments to use std::vector.
14481 (split_regular_and_flash_blocks, blocks_to_erase)
14482 (compute_garbled_blocks): Likewise.
14483 (cleanup_request_data, cleanup_write_requests_vector): Remove.
14484 (target_write_memory_blocks): Change argument to std::vector.
14485 * symfile.c (struct load_section_data): Add constructor and
14486 destructor. Use std::vector for "requests".
14487 (struct load_progress_data): Add initializers.
14488 (load_section_callback): Update. Use "new".
14489 (clear_memory_write_data): Remove.
14490 (generic_load): Update.
14491
14492 2018-02-27 Alan Hayward <alan.hayward@arm.com>
14493
14494 * arch/aarch64.h: Use common/tdesc.h.
14495
14496 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14497
14498 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14499 architecture with a 64-bit ABI.
14500
14501 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14502
14503 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14504 ahead of target description loading.
14505
14506 2018-02-26 Tom Tromey <tom@tromey.com>
14507
14508 * stack.c (backtrace_command_1): Update.
14509 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14510 of "flags".
14511 * python/py-framefilter.c (py_print_frame)
14512 (gdbpy_apply_frame_filter): Change type of "flags".
14513 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14514 of "flags".
14515 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14516 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14517 * extension.h (enum frame_filter_flag): Rename from
14518 frame_filter_flags.
14519 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14520 (apply_ext_lang_frame_filter): Change type of "flags".
14521 * extension.c (apply_ext_lang_frame_filter): Change type of
14522 "flags".
14523 * extension-priv.h (struct extension_language_ops)
14524 <apply_frame_filter>: Change type of "flags".
14525
14526 2018-02-26 Tom Tromey <tom@tromey.com>
14527
14528 PR python/16497:
14529 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
14530 off-by-one in py_end computation.
14531 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14532 PRINT_MORE_FRAMES.
14533 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14534 constant.
14535
14536 2018-02-26 Tom Tromey <tom@tromey.com>
14537
14538 * dwarf2read.c (struct variant_field): New.
14539 (struct nextfield) <variant>: New field.
14540 (dwarf2_add_field): Handle DW_TAG_variant_part.
14541 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14542 discriminated union.
14543 (read_structure_type): Handle DW_TAG_variant_part.
14544 (handle_struct_member_die): New function, extracted from
14545 process_structure_scope. Handle DW_TAG_variant.
14546 (process_structure_scope): Handle discriminated unions. Call
14547 handle_struct_member_die.
14548
14549 2018-02-26 Tom Tromey <tom@tromey.com>
14550
14551 * rust-lang.h (rust_last_path_segment): Declare.
14552 * rust-lang.c (rust_last_path_segment): Now public. Change
14553 contract.
14554 (struct disr_info): Remove.
14555 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14556 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14557 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14558 (rust_enum_p, rust_enum_variant): New function.
14559 (rust_underscore_fields): Remove "offset" parameter.
14560 (rust_print_enum): New function.
14561 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14562 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14563 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
14564 enums.
14565 (rust_internal_print_type): New function, from rust_print_type.
14566 Remove enum code.
14567 (rust_print_type): Call rust_internal_print_type.
14568 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14569 Update enum handling.
14570 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14571 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14572 (rust_union_quirks): New functions.
14573 (process_full_comp_unit, process_full_type_unit): Call
14574 rust_union_quirks.
14575 (process_structure_scope): Update rust_unions if necessary.
14576
14577 2018-02-26 Tom Tromey <tom@tromey.com>
14578
14579 * value.h (value_union_variant): Declare.
14580 * valops.c (value_union_variant): New function.
14581 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14582 (struct discriminant_info): New.
14583 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14584 enumerator.
14585 (struct main_type) <flag_discriminated_union>: New field.
14586
14587 2018-02-26 Tom Tromey <tom@tromey.com>
14588
14589 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14590 unittests/unpack-selftests.c.
14591 * unittests/unpack-selftests.c: New file.
14592 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14593
14594 2018-02-26 Yao Qi <yao.qi@linaro.org>
14595
14596 * dwarf2read.c (struct partial_die_info) <read>: New method.
14597 (read_partial_die): Remove the declaration.
14598 (load_partial_dies): Update.
14599 (partial_die_info::partial_die_info):
14600 (read_partial_die): Change it to partial_die_info::read.
14601
14602 2018-02-26 Yao Qi <yao.qi@linaro.org>
14603
14604 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14605 (fixup_partial_die): Remove declaration.
14606 (scan_partial_symbols): Update.
14607 (partial_die_parent_scope): Likewise.
14608 (partial_die_full_name): Likewise.
14609 (fixup_partial_die): Change it to partial_die_info::fixup.
14610
14611 2018-02-26 Yao Qi <yao.qi@linaro.org>
14612
14613 * dwarf2read.c (read_partial_die): Update the declaration.
14614 (load_partial_dies): Caller update.
14615 (read_partial_die): Remove one argument abbrev_len.
14616
14617 2018-02-26 Yao Qi <yao.qi@linaro.org>
14618
14619 * dwarf2read.c (struct partial_die_info): Add ctor, delete
14620 assignment operator.
14621 (load_partial_dies): Use ctor and copy ctor.
14622 (read_partial_die): Update.
14623 (dwarf2_cu::find_partial_die): Use ctor.
14624
14625 2018-02-26 Yao Qi <yao.qi@linaro.org>
14626
14627 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14628 (find_partial_die_in_comp_unit): Change it to
14629 dwarf2_cu::find_partial_die.
14630 (find_partial_die): Update.
14631
14632 2018-02-26 Yao Qi <yao.qi@linaro.org>
14633
14634 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14635 is NULL.
14636
14637 2018-02-26 Yao Qi <yao.qi@linaro.org>
14638
14639 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14640
14641 2018-02-26 Alan Hayward <alan.hayward@arm.com>
14642
14643 * arch/amd64.h: Use common/tdesc.h.
14644 * arch/i386.c: Likewise.
14645 * arch/i386.h: Likewise.
14646 * arch/tic6x.c: Likewise.
14647 * arch/tdesc.h: Move file from here...
14648 * common/tdesc.h: ...to here.
14649 * features/aarch64-core.c: Regenerate.
14650 * features/aarch64-fpu.c: Regenerate.
14651 * features/i386/32bit-avx.c: Regenerate.
14652 * features/i386/32bit-avx512.c: Regenerate.
14653 * features/i386/32bit-core.c: Regenerate.
14654 * features/i386/32bit-linux.c: Regenerate.
14655 * features/i386/32bit-mpx.c: Regenerate.
14656 * features/i386/32bit-pkeys.c: Regenerate.
14657 * features/i386/32bit-sse.c: Regenerate.
14658 * features/i386/64bit-avx.c: Regenerate.
14659 * features/i386/64bit-avx512.c: Regenerate.
14660 * features/i386/64bit-core.c: Regenerate.
14661 * features/i386/64bit-linux.c: Regenerate.
14662 * features/i386/64bit-mpx.c: Regenerate.
14663 * features/i386/64bit-pkeys.c: Regenerate.
14664 * features/i386/64bit-segments.c: Regenerate.
14665 * features/i386/64bit-sse.c: Regenerate.
14666 * features/i386/x32-core.c: Regenerate.
14667 * features/tic6x-c6xp.c: Regenerate.
14668 * features/tic6x-core.c: Regenerate.
14669 * features/tic6x-gp.c: Regenerate.
14670 * target-descriptions.c: Use common/tdesc.h.
14671 * target-descriptions.h: Likewise.
14672
14673 2018-02-24 Tom Tromey <tom@tromey.com>
14674
14675 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14676 (try_thread_db_load_from_dir, thread_db_load_search): Use
14677 std::string.
14678 (info_auto_load_libthread_db_compare): Return bool. Change
14679 argument types.
14680 (info_auto_load_libthread_db): Use std::vector, std::string.
14681 Remove cleanups.
14682
14683 2018-02-24 Tom Tromey <tom@tromey.com>
14684
14685 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14686 std::string.
14687 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14688 std::string*.
14689 * gdbarch.c: Rebuild.
14690 * gdbarch.h: Rebuild.
14691 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14692 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14693 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14694 std::string*.
14695
14696 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
14697
14698 * gdbtypes.h (sect_offset): Change type to uint64_t.
14699 (sect_offset_str): New function.
14700 * dwarf2read.c (create_addrmap_from_aranges): Use
14701 sect_offset_str.
14702 (error_check_comp_unit_head): Likewise.
14703 (create_debug_type_hash_table): Likewise.
14704 (read_cutu_die_from_dwo): Likewise.
14705 (init_cutu_and_read_dies): Likewise.
14706 (init_cutu_and_read_dies_no_follow): Likewise.
14707 (process_psymtab_comp_unit_reader): Likewise.
14708 (partial_die_parent_scope): Likewise.
14709 (peek_die_abbrev): Likewise.
14710 (process_queue): Likewise.
14711 (dwarf2_physname): Likewise.
14712 (read_namespace_alias): Likewise.
14713 (read_import_statement): Likewise.
14714 (create_dwo_cu_reader): Likewise.
14715 (create_cus_hash_table): Likewise.
14716 (lookup_dwo_cutu): Likewise.
14717 (inherit_abstract_dies): Likewise.
14718 (read_func_scope): Likewise.
14719 (read_call_site_scope): Likewise.
14720 (dwarf2_add_member_fn): Likewise.
14721 (read_common_block): Likewise.
14722 (read_module_type): Likewise.
14723 (read_typedef): Likewise.
14724 (read_subrange_type): Likewise.
14725 (load_partial_dies): Likewise.
14726 (read_partial_die): Likewise.
14727 (find_partial_die): Likewise.
14728 (read_str_index): Likewise.
14729 (dwarf2_string_attr): Likewise.
14730 (build_error_marker_type): Likewise.
14731 (lookup_die_type): Likewise.
14732 (dump_die_shallow): Likewise.
14733 (follow_die_ref): Likewise.
14734 (dwarf2_fetch_die_loc_sect_off): Likewise.
14735 (dwarf2_fetch_constant_bytes): Likewise.
14736 (follow_die_sig): Likewise.
14737 (get_signatured_type): Likewise.
14738 (get_DW_AT_signature_type): Likewise.
14739 (dwarf2_find_containing_comp_unit): Likewise.
14740 (set_die_type): Likewise.
14741
14742 2018-02-21 John Baldwin <jhb@FreeBSD.org>
14743
14744 * arch/aarch64.c: Include "common-defs.h".
14745 * arch/amd64.c: Likewise.
14746 * arch/i386.c: Likewise.
14747
14748 2018-02-21 Tom Tromey <tom@tromey.com>
14749
14750 * value.h: (extract_field_op): Update.
14751 * eval.c (extract_field_op): Return a const char *.
14752 * expression.h (parse_expression_for_completion): Update.
14753 * completer.c (complete_expression): Update.
14754 (add_struct_fields): Make fieldname const.
14755 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14756 (mark_completion_tag, parse_exp_in_context_1): Update.
14757 (parse_expression_for_completion): Change "name" to
14758 unique_xmalloc_ptr*.
14759
14760 2018-02-21 Tom Tromey <tom@tromey.com>
14761
14762 * infcall.c (call_function_by_hand_dummy): Use std::vector.
14763
14764 2018-02-21 Yao Qi <yao.qi@linaro.org>
14765
14766 * avr-tdep.c (avr_read_pc): Change parameter type to
14767 readable_regcache.
14768 * gdbarch.sh (read_pc): Likewise.
14769 * gdbarch.c: Re-generated.
14770 * gdbarch.h: Re-generated.
14771 * hppa-tdep.c (hppa_read_pc): Change parameter type to
14772 readable_regcache.
14773 * ia64-tdep.c (ia64_read_pc): Likewise.
14774 * mips-tdep.c (mips_read_pc): Likewise.
14775 * spu-tdep.c (spu_read_pc): Likewise.
14776
14777 2018-02-21 Yao Qi <yao.qi@linaro.org>
14778
14779 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14780 * regcache-dump.c: New file.
14781 * regcache.c: Move register_dump to regcache-dump.c.
14782 (maintenance_print_registers): Likewise.
14783 (maintenance_print_raw_registers): Likewise.
14784 (maintenance_print_cooked_registers): Likewise.
14785 (maintenance_print_register_groups): Likewise.
14786 (maintenance_print_remote_registers): Likewise.
14787 (_initialize_regcache): Likewise.
14788 * regcache.h (register_dump): Moved from regcache.c.
14789
14790 2018-02-21 Yao Qi <yao.qi@linaro.org>
14791
14792 * regcache.c (regcache::regcache): Update.
14793 (regcache::invalidate): Move it to detached_regcache::invalidate.
14794 (get_thread_arch_aspace_regcache): Update.
14795 (regcache::raw_update): Update.
14796 (regcache::cooked_read): Remove some code.
14797 (regcache::cooked_read_value): Likewise.
14798 (regcache::raw_write): Remove assert on m_readonly_p.
14799 (regcache::raw_supply_integer): Move it to
14800 detached_regcache::raw_supply_integer.
14801 (regcache::raw_supply_zeroed): Likewise.
14802 * regcache.h (detached_regcache) <raw_supply_integer>: New
14803 declaration.
14804 <raw_supply_zeroed, invalidate>: Likewise.
14805 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14806 <invalidate>: Likewise.
14807 <m_readonly_p>: Removed.
14808
14809 2018-02-21 Yao Qi <yao.qi@linaro.org>
14810
14811 * infcmd.c (get_return_value): Let stop_regs point to
14812 get_current_regcache.
14813 * regcache.c (regcache::regcache): Remove.
14814 (register_dump_reg_buffer): New class.
14815 (regcache_print): Adjust.
14816 * regcache.h (regcache): Remove constructors.
14817
14818 2018-02-21 Yao Qi <yao.qi@linaro.org>
14819
14820 * regcache.c (class register_dump): New class.
14821 (register_dump_regcache, register_dump_none): New class.
14822 (register_dump_remote, register_dump_groups): New class.
14823 (regcache_print): Update.
14824 * regcache.h (regcache_dump_what): Move it to regcache.c.
14825 (regcache) <dump>: Remove.
14826
14827 2018-02-21 Yao Qi <yao.qi@linaro.org>
14828
14829 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14830 reg_buffer_rw *.
14831 (jit_unwind_reg_set_impl): Call raw_supply.
14832 (jit_frame_sniffer): Use reg_buffer_rw.
14833 * record-full.c (record_full_core_regbuf): Change its type.
14834 (record_full_core_open_1): Use reg_buffer_rw.
14835 (record_full_close): Likewise.
14836 (record_full_core_fetch_registers): Use regcache->raw_supply.
14837 (record_full_core_store_registers): Likewise.
14838 * regcache.c (regcache::get_register_status): Move it to
14839 reg_buffer.
14840 (regcache_raw_set_cached_value): Remove.
14841 (regcache::raw_set_cached_value): Remove.
14842 (regcache::raw_write): Call raw_supply.
14843 (regcache::raw_supply): Move it to reg_buffer_rw.
14844 * regcache.h (regcache_raw_set_cached_value): Remove.
14845 (reg_buffer_rw): New class.
14846
14847 2018-02-21 Yao Qi <yao.qi@linaro.org>
14848
14849 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14850 readonly_detached_regcache.
14851 (dummy_frame_prev_register): Use regcache->cooked_read.
14852 * frame.c (frame_save_as_regcache): Change return type.
14853 (frame_pop): Update.
14854 * frame.h (frame_save_as_regcache): Update declaration.
14855 * inferior.h (get_infcall_suspend_state_regcache): Update
14856 declaration.
14857 * infrun.c (infcall_suspend_state) <registers>: use
14858 readonly_detached_regcache.
14859 (save_infcall_suspend_state): Don't use regcache_dup.
14860 (get_infcall_suspend_state_regcache): Change return type.
14861 * linux-fork.c (struct fork_info) <savedregs>: Change to
14862 readonly_detached_regcache.
14863 <pc>: New field.
14864 (fork_save_infrun_state): Don't use regcache_dup.
14865 (info_checkpoints_command): Adjust.
14866 * mi/mi-main.c (register_changed_p): Update declaration.
14867 (mi_cmd_data_list_changed_registers): Use
14868 readonly_detached_regcache.
14869 (register_changed_p): Change parameter type to
14870 readonly_detached_regcache.
14871 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14872 readonly_detached_regcache.
14873 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14874 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14875 New.
14876 (regcache::save): Move it to reg_buffer.
14877 (regcache::restore): Change parameter type.
14878 (regcache_dup): Remove.
14879 * regcache.h (reg_buffer) <save>: New method.
14880 (readonly_detached_regcache): New class.
14881 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14882 readonly_detached_regcache.
14883 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14884
14885 2018-02-21 Yao Qi <yao.qi@linaro.org>
14886
14887 * frame.c (frame_save_as_regcache): Use regcache method save.
14888 (frame_pop): Use regcache method restore.
14889 * infrun.c (restore_infcall_suspend_state): Likewise.
14890 * linux-fork.c (fork_load_infrun_state): Likewise.
14891 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14892 save.
14893 * regcache.c (regcache_save): Remove.
14894 (regcache::restore): More asserts.
14895 (regcache_cpy): Remove.
14896 * regcache.h (regcache_save): Remove the declaration.
14897 (regcache::restore): Move from private to public.
14898 Remove the friend declaration of regcache_cpy.
14899 (regcache_cpy): Remove declaration.
14900
14901 2018-02-21 Yao Qi <yao.qi@linaro.org>
14902
14903 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14904 parameter type to 'readable_regcache *'.
14905 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14906 * arm-tdep.c (arm_neon_quad_read): Likewise.
14907 (arm_pseudo_read): Likewise.
14908 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14909 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14910 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14911 * gdbarch.c: Re-generated.
14912 * gdbarch.h: Re-generated.
14913 * gdbarch.sh (pseudo_register_read): Change parameter type to
14914 'readable_regcache *'.
14915 (pseudo_register_read_value): Likewise.
14916 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14917 (h8300_pseudo_register_read): Likewise.
14918 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14919 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14920 (i386_pseudo_register_read_into_value): Likewise.
14921 (i386_pseudo_register_read_value): Likewise.
14922 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14923 declaration.
14924 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14925 * m32c-tdep.c (m32c_raw_read): Likewise.
14926 (m32c_read_flg): Likewise.
14927 (m32c_banked_register): Likewise.
14928 (m32c_banked_read): Likewise.
14929 (m32c_sb_read): Likewise.
14930 (m32c_part_read): Likewise.
14931 (m32c_cat_read): Likewise.
14932 (m32c_r3r2r1r0_read): Likewise.
14933 (m32c_pseudo_register_read): Likewise.
14934 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14935 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14936 (mep_pseudo_cr64_read): Likewise.
14937 (mep_pseudo_register_read): Likewise.
14938 * mips-tdep.c (mips_pseudo_register_read): Likewise.
14939 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14940 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14941 * regcache.c (regcache::raw_read): Move it to readable_regcache.
14942 (regcache::cooked_read): Likewise.
14943 (regcache::cooked_read_value): Likewise.
14944 (regcache_cooked_read_signed):
14945 (regcache::cooked_read): Likewise.
14946 * regcache.h (readable_regcache): New class.
14947 (regcache): Inherit readable_regcache. Move some methods to
14948 readable_regcache.
14949 * rl78-tdep.c (rl78_pseudo_register_read): Change
14950 parameter type to 'readable_regcache *'.
14951 * rs6000-tdep.c (do_regcache_raw_read): Remove.
14952 (e500_pseudo_register_read): Change parameter type to
14953 'readable_regcache *'.
14954 (dfp_pseudo_register_read): Likewise.
14955 (vsx_pseudo_register_read): Likewise.
14956 (efpr_pseudo_register_read): Likewise.
14957 * s390-tdep.c (s390_pseudo_register_read): Likewise.
14958 * sh-tdep.c (sh_pseudo_register_read): Likewise.
14959 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14960 (sh64_pseudo_register_read): Likewise.
14961 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14962 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14963 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14964 (spu_pseudo_register_read): Likewise.
14965 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14966 (xtensa_pseudo_register_read): Likewise.
14967
14968 2018-02-21 Yao Qi <yao.qi@linaro.org>
14969
14970 * regcache.c (regcache::regcache): Call reg_buffer ctor.
14971 (regcache::arch): Move it to reg_buffer::arch.
14972 (regcache::register_buffer): Likewise.
14973 (regcache::assert_regnum): Likewise.
14974 (regcache::num_raw_registers): Likewise.
14975 * regcache.h (reg_buffer): New class.
14976 (regcache): Inherit reg_buffer.
14977
14978 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
14979
14980 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14981 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14982
14983 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
14984
14985 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14986
14987 2018-02-19 Alan Hayward <alan.hayward@arm.com>
14988
14989 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14990 (SFILES): Remove common/*.c files.
14991 (COMMON_OBS): Remove some *.o files built from common/*.c files.
14992 * common/common.host: Add common reference.
14993 * configure.ac: Likewise.
14994 * configure: Regenerate.
14995
14996 2018-02-16 Yao Qi <yao.qi@linaro.org>
14997
14998 * block.c (block_namespace_info): Inherit allocate_on_obstack.
14999 (block_initialize_namespace): Use new.
15000 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
15001 (dwarf2_free_objfile): Use delete.
15002 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
15003 (copy_type_recursive): Use new.
15004 * gdb_obstack.h (allocate_on_obstack): New.
15005
15006 2018-02-15 Yao Qi <yao.qi@linaro.org>
15007
15008 PR gdb/22849
15009 * inferior.c (exit_inferior_1): Reset inf->control.
15010
15011 2018-02-15 Joel Brobecker <brobecker@adacore.com>
15012
15013 * ada-lang.c (ada_to_fixed_value_create): Delete advance
15014 declaration.
15015
15016 2018-02-14 Pedro Alves <palves@redhat.com>
15017
15018 * frame-unwind.c (frame_unwind_try_unwinder): Always call
15019 frame_cleanup_after_sniffer on exception.
15020
15021 2018-02-14 Tom Tromey <tom@tromey.com>
15022
15023 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
15024 const.
15025 (solib_bfd_open): Make pathname const.
15026 * solib.c (solib_bfd_open): Make pathname const.
15027 * solib-spu.c (spu_bfd_fopen): Make name const.
15028 (spu_bfd_open): Make pathname const.
15029 * solib-darwin.c (darwin_bfd_open): Make pathname const.
15030 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15031
15032 2018-02-14 Tom Tromey <tom@tromey.com>
15033
15034 * symfile.c (symfile_bfd_open): Update.
15035 * source.h (openp, source_full_path_of, find_and_open_source):
15036 Change argument type to unique_xmalloc_ptr.
15037 * source.c (openp): Take a unique_xmalloc_ptr.
15038 (source_full_path_of, find_and_open_source): Likewise.
15039 (open_source_file, symtab_to_fullname): Update.
15040 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15041 unique_xmalloc_ptr.
15042 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15043 (exec_file_find): Update.
15044 * psymtab.c (psymtab_to_fullname): Update.
15045 * nto-tdep.h (nto_find_and_open_solib): Update.
15046 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15047 unique_xmalloc_ptr.
15048 * exec.c (exec_file_attach): Update.
15049 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15050 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15051
15052 2018-02-14 Tom Tromey <tom@tromey.com>
15053
15054 * solib.c: Include source.h.
15055 * nto-tdep.c: Include source.h.
15056 * mi/mi-cmd-env.c: Include source.h.
15057 * infcmd.c: Include source.h.
15058 * exec.c: Include source.h.
15059 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15060 (add_path, directory_switch, source_path, init_source_path): Move
15061 declarations...
15062 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15063 (add_path, directory_switch, source_path, init_source_path):
15064 ...here.
15065
15066 2018-02-14 Tom Tromey <tom@tromey.com>
15067
15068 * solist.h (exec_file_find, solib_find): Return
15069 unique_xmalloc_ptr.
15070 (solib_bfd_fopen): Take a const char *.
15071 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15072 (exec_file_find, solib_find): Likewise.
15073 (solib_bfd_fopen): Do not take ownership of "pathname".
15074 (solib_bfd_open): Use unique_xmalloc_ptr.
15075 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15076 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15077 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15078 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15079
15080 2018-02-14 Joel Brobecker <brobecker@adacore.com>
15081
15082 * ada-lang.c (name_match_type_from_name): Remove reference to
15083 ada_name_for_lookup in function's documentation.
15084 * ada-lang.h (ada_name_for_lookup): Delete declaration.
15085
15086 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
15087
15088 * defs.h (enum openp_flags): New enum.
15089 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15090 Move to enum openp_flags.
15091 (openp_flags): New enum flags.
15092 (openp): Change parameter type to openp_flags.
15093 * source.c (openp): Change parameter type to openp_flags.
15094 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15095 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15096
15097 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
15098
15099 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15100 per-command.
15101
15102 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
15103
15104 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15105 into...
15106 (class dwarf2_queue_guard): ...the destructor of this new class.
15107 (dw2_do_instantiate_symtab): Create instance of the new class
15108 dwarf2_queue_guard, remove cleanup.
15109
15110 2018-02-09 Tom Tromey <tom@tromey.com>
15111
15112 * source.c (find_source_lines): Don't reference past the end of
15113 the vector.
15114
15115 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15116
15117 * remote.c (remote_btrace_maybe_reopen): Change error message.
15118 * btrace.c (btrace_enable): Likewise.
15119 (parse_xml_btrace): Likewise.
15120 (parse_xml_btrace_conf): Likewise.
15121
15122 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15123
15124 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15125 (linux_enable_pt, linux_enable_bts): Call
15126 diagnose_perf_event_open_fail.
15127
15128 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15129
15130 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15131 Remove parameter and change return type. Update callers. Move it.
15132 (linux_enable_bts, linux_enable_pt): Improve error message.
15133 (linux_enable_pt): Remove zero buffer size check.
15134 (linux_enable_btrace): Improve error messages. Remove NULL return
15135 check.
15136
15137 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15138
15139 * btrace.c (btrace_enable): Remove target_supports_btrace call.
15140 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15141 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15142 (linux_supports_pt, linux_supports_btrace): Remove.
15143 (linux_enable_bts): Call cpu_supports_bts.
15144 * nat/linux-btrace.h (linux_supports_btrace): Remove.
15145 * remote.c (remote_supports_btrace): Remove.
15146 (init_remote_ops): Remove remote_supports_btrace.
15147 * target-delegates.c: Regenerated.
15148 * target.c (target_supports_btrace): Remove.
15149 * target.h (target_ops) <to_supports_btrace>: Remove
15150 (target_supports_btrace): Remove.
15151 * x86-linux-nat.c (x86_linux_create_target): Remove
15152 linux_supports_btrace.
15153
15154 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15155
15156 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15157 btrace failed.
15158 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15159 exception and use message in own exception.
15160
15161 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15162
15163 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15164 (perf_event_pt_event_type): Use gdb_file_up.
15165 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15166 scoped_fd, and scoped_mmap.
15167
15168 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15169
15170 * common/scoped_mmap.h: New.
15171 * unittests/scoped_mmap-selftest.c: New.
15172 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15173 unittests/scoped_mmap-selftest.c.
15174
15175 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15176
15177 * common/scoped_fd.h: New.
15178 * unittests/scoped_fd-selftest.c: New.
15179 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15180 unittests/scoped_fd-selftest.c.
15181
15182 2018-02-09 Tom Tromey <tom@tromey.com>
15183
15184 * auto-load.c (auto_load_section_scripts): Use
15185 gdb::unique_xmalloc_ptr.
15186
15187 2018-02-09 Tom Tromey <tom@tromey.com>
15188
15189 * auto-load.c (execute_script_contents): Use std::string.
15190
15191 2018-02-09 Joel Brobecker <brobecker@adacore.com>
15192
15193 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15194 Python function, rather than a new command.
15195
15196 2018-02-08 Tom Tromey <tom@tromey.com>
15197
15198 * solib.c (solib_find_1): Use std::string.
15199 (solib_bfd_fopen): Use unique_xmalloc_ptr.
15200
15201 2018-02-08 Tom Tromey <tom@tromey.com>
15202
15203 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15204
15205 2018-02-08 Tom Tromey <tom@tromey.com>
15206
15207 * source.c (find_source_lines): Use gdb::def_vector.
15208
15209 2018-02-08 Tom Tromey <tom@tromey.com>
15210
15211 * macrocmd.c (struct temporary_macro_definition): New.
15212 (macro_define_command): Use temporary_macro_definition. Remove
15213 cleanups.
15214 (free_macro_definition_ptr): Remove.
15215
15216 2018-02-08 Tom Tromey <tom@tromey.com>
15217
15218 * macroexp.c (maybe_expand): Use std::string.
15219
15220 2018-02-08 Tom Tromey <tom@tromey.com>
15221
15222 * macroexp.c (struct macro_buffer): Add initializers for some
15223 members.
15224 (init_buffer, init_shared_buffer, free_buffer)
15225 (free_buffer_return_text): Remove.
15226 (macro_buffer): New constructors.
15227 (~macro_buffer): New destructor.
15228 (macro_buffer::set_shared): New method.
15229 (macro_buffer::resize_buffer, macro_buffer::appendc)
15230 (macro_buffer::appendmem): Now methods, not free functions.
15231 (set_token, append_tokens_without_splicing, stringify)
15232 (macro_stringify): Update.
15233 (gather_arguments): Change return type. Remove argc_p argument,
15234 add args_ptr argument. Use std::vector.
15235 (substitute_args): Remove argc argument. Accept std::vector.
15236 (expand): Update. Use std::vector.
15237 (scan, macro_expand, macro_expand_next): Update.
15238
15239 2018-02-08 Tom Tromey <tom@tromey.com>
15240
15241 * symtab.c (default_collect_symbol_completion_matches_break_on):
15242 Use unique_xmalloc_ptr.
15243 * macroscope.h: (sal_macro_scope, user_macro_scope)
15244 (default_macro_scope): Return unique_xmalloc_ptr.
15245 * macroscope.c (sal_macro_scope, user_macro_scope)
15246 (default_macro_scope): Return unique_xmalloc_ptr.
15247 * macroexp.h (macro_expand, macro_expand_once): Return
15248 unique_xmalloc_ptr.
15249 * macroexp.c (macro_expand, macro_expand_once): Return
15250 unique_xmalloc_ptr.
15251 * macrocmd.c (macro_expand_command, macro_expand_once_command)
15252 (info_macro_command, info_macros_command): Use
15253 unique_xmalloc_ptr.
15254 * compile/compile-c-support.c (write_macro_definitions): Use
15255 unique_xmalloc_ptr.
15256 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15257
15258 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
15259
15260 * value.c (value_static_field): Assign field type instead of
15261 containing type when returning an optimized out value.
15262
15263 2018-02-06 Yao Qi <yao.qi@linaro.org>
15264
15265 * ft32-tdep.c (ft32_read_pc): Remove.
15266 (ft32_write_pc): Remove.
15267 (ft32_gdbarch_init): Update.
15268 * m32r-tdep.c (m32r_read_pc): Remove.
15269 (m32r_gdbarch_init): Update.
15270 * mep-tdep.c (mep_read_pc): Remove.
15271 (mep_gdbarch_init): Update.
15272 * microblaze-tdep.c (microblaze_write_pc): Remove.
15273 (microblaze_gdbarch_init): Update.
15274 * mn10300-tdep.c (mn10300_read_pc): Remove.
15275 (mn10300_write_pc): Remove.
15276 (mn10300_gdbarch_init): Update.
15277 * moxie-tdep.c (moxie_read_pc): Remove.
15278 (moxie_write_pc): Remove.
15279 (moxie_gdbarch_init): Update.
15280
15281 2018-02-06 Yao Qi <yao.qi@linaro.org>
15282
15283 * expprint.c (print_subexp_standard): Handle
15284 OP_F77_UNDETERMINED_ARGLIST.
15285 (dump_subexp_body_standard): Likewise.
15286
15287 2018-02-05 Alan Hayward <alan.hayward@arm.com>
15288
15289 * target-descriptions.c (tdesc_element_visitor) Add empty
15290 implementations.
15291 (tdesc_type): Move make_gdb_type from here.
15292 (tdesc_type_builtin): Likewise.
15293 (tdesc_type_vector): Likewise.
15294 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15295 (make_gdb_type_struct): Move from tdesc_type_with_fields.
15296 (make_gdb_type_union): Likewise.
15297 (make_gdb_type_flags): Likewise.
15298 (make_gdb_type_enum): Likewise.
15299 (make_gdb_type): New function.
15300 (tdesc_register_type): Use static make_gdb_type.
15301
15302 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
15303
15304 * infcmd.c (default_print_one_register_info): Align natural-format
15305 column values consistently one under another.
15306 (pad_to_column): New function.
15307
15308 2018-02-05 Joel Brobecker <brobecker@adacore.com>
15309
15310 * dwarf2read.c (dwarf2_physname): Move commment.
15311
15312 2018-02-01 Leszek Swirski <leszeks@google.com>
15313
15314 * varobj.c (varobj_formatted_print_options): Allow recursive
15315 pretty printing if pretty printing is enabled.
15316
15317 2018-02-01 Leszek Swirski <leszeks@google.com>
15318
15319 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15320 names after a structop as a filename.
15321
15322 2018-02-01 Yao Qi <yao.qi@linaro.org>
15323
15324 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15325 (arm_record_coproc_data_proc): Likewise.
15326
15327 2018-02-01 Yao Qi <yao.qi@linaro.org>
15328
15329 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15330
15331 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
15332
15333 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15334 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15335
15336 2018-01-31 Pedro Alves <palves@redhat.com>
15337
15338 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15339 * inflow.c (child_terminal_save_inferior): Wrap reference to
15340 tcgetpgrp in HAVE_TERMIOS_H.
15341 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15342 _WIN32.
15343 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15344 always iterate over all inferiors.
15345 (gdbsim_cntrl_c): Adjust.
15346 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15347
15348 2018-01-31 Joel Brobecker <brobecker@adacore.com>
15349
15350 * gdbtypes.c (lookup_array_range_type): Make sure the array's
15351 index type is objfile-owned if the element type is as well.
15352
15353 2018-01-31 Joel Brobecker <brobecker@adacore.com>
15354
15355 GDB 8.1 released.
15356
15357 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
15358
15359 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15360 "features/s390x-linux64.c".
15361 (_initialize_s390_linux_tdep): Remove initialization of tdescs
15362 s390_linux32 and s390x_linux64.
15363 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15364 default tdesc.
15365 * s390-tdep.c: Include "features/s390-linux32.c" and
15366 "features/s390x-linux64.c".
15367 (s390_tdesc_valid): Add check for tdesc_has_registers.
15368 (s390_gdbarch_init): Make sure there is always a valid tdesc.
15369 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15370 tdesc_s390x_linux64.
15371 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15372 tdesc_s390x_linux64 to...
15373 * s390-tdep.h: ...here.
15374
15375 2018-01-30 Pedro Alves <palves@redhat.com>
15376
15377 PR gdb/13211
15378 * config.in, configure: Regenerate.
15379 * configure.ac: Check for getpgid.
15380 * go32-nat.c (go32_pass_ctrlc): New.
15381 (go32_target): Install it.
15382 * inf-child.c (inf_child_target): Install
15383 child_terminal_save_inferior, child_pass_ctrlc and
15384 child_interrupt.
15385 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15386 (inf_ptrace_target): No longer install it.
15387 * infcmd.c (interrupt_target_1): Adjust.
15388 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15389 (child_interrupt): Declare.
15390 (inferior::terminal_state): New.
15391 * inflow.c (struct terminal_info): Update comments.
15392 (inferior_process_group): Delete.
15393 (terminal_is_ours): Delete.
15394 (gdb_tty_state): New.
15395 (child_terminal_init): Adjust.
15396 (is_gdb_terminal, sharing_input_terminal_1)
15397 (sharing_input_terminal): New functions.
15398 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
15399 Set the process's actual process group in the foreground if
15400 possible. Handle is_ours_for_output/is_ours distinction. Don't
15401 mark terminal as the inferior's if not sharing GDB's terminal.
15402 Don't check attach_flag.
15403 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15404 pass down a target_terminal_state.
15405 (child_terminal_save_inferior): New, factored out from ...
15406 (child_terminal_ours_1): ... this. Handle
15407 target_terminal_state::is_ours_for_output.
15408 (child_interrupt, child_pass_ctrlc): New.
15409 (inflow_inferior_exit): Clear the inferior's terminal_state.
15410 (copy_terminal_info): Copy the inferior's terminal state.
15411 (_initialize_inflow): Remove reference to terminal_is_ours.
15412 * inflow.h (inferior_process_group): Delete.
15413 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15414 * procfs.c (procfs_target): Don't install procfs_interrupt.
15415 (procfs_interrupt): Delete.
15416 * remote.c (remote_serial_quit_handler): Adjust.
15417 (remote_interrupt): Remove ptid parameter. Adjust.
15418 * target-delegates.c: Regenerate.
15419 * target.c: Include "terminal.h".
15420 (target_terminal::terminal_state): Rename to ...
15421 (target_terminal::m_terminal_state): ... this.
15422 (target_terminal::init): Adjust.
15423 (target_terminal::inferior): Adjust to per-inferior
15424 terminal_state.
15425 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15426 (target_terminal::ours, target_terminal::ours_for_output): Use
15427 target_terminal_is_ours_kind.
15428 (target_interrupt): Remove ptid parameter. Adjust.
15429 (default_target_pass_ctrlc): Adjust.
15430 * target.h (target_ops::to_terminal_save_inferior): New field.
15431 (target_ops::to_interrupt): Remove ptid_t parameter.
15432 (target_interrupt): Remove ptid_t parameter. Update comment.
15433 (target_pass_ctrlc): Update comment.
15434 * target/target.h (target_terminal_state): New scoped enum,
15435 factored out of ...
15436 (target_terminal::terminal_state): ... here.
15437 (target_terminal::inferior): Update comments.
15438 (target_terminal::restore_inferior): New.
15439 (target_terminal::is_inferior, target_terminal::is_ours)
15440 (target_terminal::is_ours_for_output): Adjust.
15441 (target_terminal::scoped_restore_terminal_state): Adjust to
15442 rename, and call restore_inferior() instead of inferior().
15443 (target_terminal::scoped_restore_terminal_state::m_state): Change
15444 type.
15445 (target_terminal::terminal_state): Rename to ...
15446 (target_terminal::m_terminal_state): ... this and change type.
15447
15448 2018-01-30 Pedro Alves <palves@redhat.com>
15449
15450 * linux-nat.c (wait_for_signal): New function.
15451 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15452 directly.
15453 (async_terminal_is_ours)
15454 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15455 (linux_nat_add_target): Don't override
15456 to_terminal_inferior/to_terminal_ours.
15457
15458 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
15459
15460 * remote.c (remote_follow_fork): Don't call "detach_inferior".
15461
15462 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
15463
15464 * dwarf2read.c (free_dwo_files): Add forward-declaration.
15465 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15466 dwarf2_per_objfile_free here.
15467 (dwarf2_per_objfile_free): Remove.
15468 (_initialize_dwarf2_read): Don't register
15469 dwarf2_per_objfile_free as a registry cleanup.
15470
15471 2018-01-27 Eli Zaretskii <eliz@gnu.org>
15472
15473 Avoid compilation errors in MinGW native builds
15474
15475 The error is triggered by including python-internal.h, and the
15476 error message is:
15477
15478 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15479 from build-gnulib/import/math.h:27,
15480 from d:/usr/Python26/include/pyport.h:235,
15481 from d:/usr/Python26/include/Python.h:58,
15482 from python/python-internal.h:94,
15483 from python/py-arch.c:24:
15484 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15485 using ::hypot;
15486 ^~~~~
15487
15488 This happens because Python headers define 'hypot' to expand t
15489 '_hypot' in the Windows builds.
15490 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15491 'hypoth'. This avoids a compilation error.
15492
15493 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15494
15495 * MAINTAINERS (Write After Approval): Fix ordering.
15496
15497 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15498
15499 * MAINTAINERS (Write After Approval): Add Alan Hayward.
15500
15501 2018-01-26 Alan Modra <amodra@gmail.com>
15502
15503 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15504 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15505 Remove nop. Make const. Comment.
15506 (powerpc32_plt_stub_so_2): New.
15507 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15508 Correct count. Update uses.
15509 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15510 Move common code reading PLT entry word. Correct
15511 powerpc32_plt_stub PLT address calculation.
15512 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15513 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15514 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15515 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15516 (ppc64_standard_linkage8): Likewise.
15517 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15518 Correct insns description.
15519 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15520
15521 2018-01-24 Pedro Alves <palves@redhat.com>
15522
15523 GCC PR libstdc++/83906
15524 * gdbtypes.c (operator==(const dynamic_prop &,
15525 const dynamic_prop &)): New.
15526 (operator==(const range_bounds &, const range_bounds &)): New.
15527 (check_types_equal): Use them instead of memcmp.
15528 * gdbtypes.h (operator==(const dynamic_prop &,
15529 const dynamic_prop &)): Declare.
15530 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15531 (operator==(const range_bounds &, const range_bounds &)): Declare.
15532 (operator!=(const range_bounds &, const range_bounds &)): Declare.
15533
15534 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15535
15536 * s390-linux-tdep.c (s390_record_address_mask)
15537 (s390_record_calc_disp_common, s390_record_calc_disp)
15538 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15539 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15540 (s390_process_record): Move to s390-tdep.c.
15541 (s390_linux_init_abi_any): Adjust.
15542 * s390-tdep.c (s390_record_address_mask)
15543 (s390_record_calc_disp_common, s390_record_calc_disp)
15544 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15545 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15546 (s390_process_record): Moved from s390-linux-tdep.c
15547 (s390_gdbarch_init): Adjust.
15548
15549 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15550
15551 * s390-linux-nat.c (s390-tdep.h): New include.
15552 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15553 (HFILES_NO_SRCDIR): Add s390-tdep.h.
15554 (ALLDEPFILES): Add s390-tdep.c.
15555 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15556 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15557 * s390-tdep.h: ...this. New file.
15558 * s390-linux-tdep.c (s390-tdep.h): New include.
15559 (_initialize_s390_tdep): Rename to...
15560 (_initialize_s390_linux_tdep): ...this and adjust.
15561 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15562 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15563 s390-tdep.h.
15564 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15565 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15566 (s390_is_partial_instruction, s390_software_single_step)
15567 (is_non_branch_ril, s390_displaced_step_copy_insn)
15568 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15569 (s390_prologue_data, s390_addr, s390_store, s390_load)
15570 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15571 (s390_register_call_saved, s390_guess_tracepoint_registers)
15572 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15573 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15574 (s390_pseudo_register_name, s390_pseudo_register_type)
15575 (s390_pseudo_register_read, s390_pseudo_register_write)
15576 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15577 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15578 (s390_addr_bits_remove, s390_address_class_type_flags)
15579 (s390_address_class_type_flags_to_name)
15580 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15581 (s390_function_arg_float, s390_function_arg_vector)
15582 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15583 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15584 (s390_frame_align, s390_register_return_value, s390_return_value)
15585 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15586 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15587 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15588 (s390_trad_frame_prev_register, s390_unwind_cache)
15589 (s390_prologue_frame_unwind_cache)
15590 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15591 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15592 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15593 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15594 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15595 (s390_frame_base_address, s390_local_base_address)
15596 (s390_frame_base, s390_gcc_target_options)
15597 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15598 (s390_validate_reg_range, s390_tdesc_valid)
15599 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15600 * s390-tdep.c: ...this. New file.
15601
15602 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15603
15604 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15605 (s390_process_record, s390_gdbarch_tdep_alloc)
15606 (s390_linux_init_abi_any): Use/set new hook.
15607
15608 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15609
15610 * s390-linux-tdep.c (osabi.h): New include.
15611 (s390_linux_init_abi_31, s390_linux_init_abi_64)
15612 (s390_linux_init_abi_any): New functions.
15613 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15614
15615 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15616
15617 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15618 tdesc_has_registers check
15619
15620 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15621
15622 * s390-linux-tdep.c (s390_tdesc_valid): New function.
15623 (s390_validate_reg_range): New macro.
15624 (s390_gdbarch_init): Adjust.
15625
15626 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15627
15628 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15629 (s390_gdbarch_tdep_alloc): Adjust.
15630 (s390_gdbarch_init): Adjust.
15631
15632 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15633
15634 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15635 <have_tdb>: Change type to bool.
15636 (s390_gdbarch_tdep_alloc): Adjust.
15637 (s390_gdbarch_init): Adjust.
15638
15639 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15640
15641 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15642 (gdbarch_tdep) <have_upper, have_vx>: New fields.
15643 (s390_gdbarch_tdep_alloc): New function.
15644 (s390_gdbarch_init): Allocate tdep at start and use its fields
15645 instead of separate variables.
15646
15647 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15648
15649 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15650 when looking for cached gdbarch and add comment for remaining.
15651
15652 2018-01-22 Pedro Alves <palves@redhat.com>
15653 Sergio Durigan Junior <sergiodj@redhat.com>
15654
15655 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15656 case.
15657
15658 2018-01-22 Maciej W. Rozycki <macro@mips.com>
15659
15660 * MAINTAINERS: Update my company e-mail address.
15661
15662 2018-01-22 Yao Qi <yao.qi@linaro.org>
15663
15664 * regcache.c (cooked_write_test): New function.
15665 (_initialize_regcache): Register the test.
15666
15667 2018-01-22 Yao Qi <yao.qi@linaro.org>
15668
15669 * ia64-tdep.c (ia64_pseudo_register_read): Call
15670 regcache->cooked_read instead of regcache_cooked_read_unsigned.
15671 * m32c-tdep.c (m32c_cat_read): Likewise.
15672 (m32c_r3r2r1r0_read): Likewise.
15673 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15674 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15675
15676 2018-01-22 Yao Qi <yao.qi@linaro.org>
15677
15678 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15679 method raw_read instead of regcache_raw_read.
15680 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15681 * arm-tdep.c (arm_neon_quad_read): Likewise.
15682 * avr-tdep.c (avr_pseudo_register_read): Likewise.
15683 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15684 * frv-tdep.c (frv_pseudo_register_read): Likewise.
15685 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15686 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15687 (i386_pseudo_register_read_into_value): Likewise.
15688 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15689 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15690 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15691 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15692 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15693 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15694 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15695 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15696 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15697
15698 2018-01-22 Yao Qi <yao.qi@linaro.org>
15699
15700 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15701 * configure.tgt: Remove target mt.
15702 * mt-tdep.c: Remove.
15703 * regcache.c (cooked_read_test): Remove the check for mt.
15704
15705 2018-01-22 Yao Qi <yao.qi@linaro.org>
15706
15707 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15708 instead of gdbarch_pseudo_register_read_value.
15709
15710 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15711
15712 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15713 language is Ada.
15714
15715 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15716
15717 * linespec.c (create_sals_line_offset): Remove code that preserved
15718 the symtab_and_line's line number.
15719
15720 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15721
15722 * varobj.c (varobj_create): Don't set valid_block when creating a
15723 floating varobj.
15724
15725 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15726
15727 * varobj.c (varobj_create): Remove out of date comment.
15728
15729 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15730
15731 PR mi/20395
15732 * ada-exp.y (write_var_from_sym): Pass extra parameter when
15733 updating innermost block.
15734 * parse.c (innermost_block_tracker::update): Take extra type
15735 parameter, and check types match before updating innermost block.
15736 (write_dollar_variable): Update innermost block for registers.
15737 * parser-defs.h (enum innermost_block_tracker_type): New enum.
15738 (innermost_block_tracker::innermost_block_tracker): Initialise
15739 m_types member.
15740 (innermost_block_tracker::reset): Take type parameter.
15741 (innermost_block_tracker::update): Take type parameter, and pass
15742 type through as needed.
15743 (innermost_block_tracker::m_types): New member.
15744 * varobj.c (varobj_create): Pass type when reseting innermost
15745 block.
15746
15747 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15748
15749 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15750 * ada-lang.c (resolve_subexp): Likewise.
15751 * breakpoint.c (set_breakpoint_condition) Likewise.
15752 (watch_command_1) Likewise.
15753 * c-exp.y (variable): Likewise.
15754 * d-exp.y (PrimaryExpression): Likewise.
15755 * f-exp.y (variable): Likewise.
15756 * go-exp.y (variable): Likewise.
15757 * m2-exp.y (variable): Likewise.
15758 * objfiles.c (objfile::~objfile): Likewise.
15759 * p-exp.y (variable): Likewise.
15760 * parse.c (innermost_block): Change type.
15761 * parser-defs.h (class innermost_block_tracker): New.
15762 (innermost_block): Change to innermost_block_tracker.
15763 * printcmd.c (display_command): Switch to innermost_block API.
15764 (do_one_display): Likewise.
15765 * rust-exp.y (do_one_display): Likewise.
15766 * symfile.c (clear_symtab_users): Likewise.
15767 * varobj.c (varobj_create): Switch to innermost_block API, replace
15768 use of innermost_block with block stored on varobj object.
15769
15770 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15771
15772 * expression.h (innermost_block): Remove declaration.
15773 * varobj.c: Add 'parser-defs.h' include.
15774
15775 2018-01-19 Tom Tromey <tom@tromey.com>
15776
15777 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15778 symbols in the static and global blocks.
15779
15780 2018-01-19 James Clarke <jrtc27@jrtc27.com>
15781
15782 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15783 gdb_ptrace.h, and move including gdb_wait.h ...
15784 * nat/linux-ptrace.h: ... to here.
15785
15786 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15787
15788 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15789 inf_ptrace_detach_success.
15790 (inf_ptrace_detach_success): Add inferior parameter, use it
15791 instead of inferior_ptid, pass it to detach_inferior.
15792 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15793 parameter.
15794 * inferior.c (detach_inferior): Add overload that takes an
15795 inferior object.
15796 * inferior.h (detach_inferior): Likewise.
15797 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15798 use inferior_ptid, adjust call to inf_ptrace_detach_success.
15799 * linux-thread-db.c (thread_db_detach): Use inf parameter.
15800
15801 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15802
15803 * target.h (struct target_ops) <to_detach>: Add inferior
15804 parameter.
15805 (target_detach): Likewise.
15806 * target.c (dispose_inferior): Pass inferior down.
15807 (target_detach): Pass inferior down. Assert that it is equal to
15808 the current inferior.
15809 * aix-thread.c (aix_thread_detach): Pass inferior down.
15810 * corefile.c (core_file_command): Pass current_inferior() down.
15811 * corelow.c (core_detach): Add inferior parameter.
15812 * darwin-nat.c (darwin_detach): Likewise.
15813 * gnu-nat.c (gnu_detach): Likewise.
15814 * inf-ptrace.c (inf_ptrace_detach): Likewise.
15815 * infcmd.c (detach_command): Pass current_inferior() down to
15816 target_detach.
15817 * infrun.c (follow_fork_inferior): Pass parent_inf to
15818 target_detach.
15819 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15820 target_detach.
15821 * linux-nat.c (linux_nat_detach): Add inferior parameter.
15822 * linux-thread-db.c (thread_db_detach): Likewise.
15823 * nto-procfs.c (procfs_detach): Likewise.
15824 * procfs.c (procfs_detach): Likewise.
15825 * record.c (record_detach): Likewise.
15826 * record.h (struct inferior): Forward-declare.
15827 (record_detach): Add inferior parameter.
15828 * remote-sim.c (gdbsim_detach): Likewise.
15829 * remote.c (remote_detach_1): Likewise.
15830 (remote_detach): Likewise.
15831 (extended_remote_detach): Likewise.
15832 * sol-thread.c (sol_thread_detach): Likewise.
15833 * target-debug.h (target_debug_print_inferior_p): New macro.
15834 * target-delegates.c: Re-generate.
15835 * top.c (kill_or_detach): Pass inferior down to target_detach.
15836 * windows-nat.c (windows_detach): Add inferior parameter.
15837
15838 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15839
15840 * target.h (struct target_ops) <to_detach>: Remove args
15841 parameter.
15842 (target_detach): Likewise.
15843 * target.c (dispose_inferior): Adjust.
15844 (target_detach): Remove args parameter, adjust.
15845 * aix-thread.c (aix_thread_detach): Adjust.
15846 * corefile.c (core_file_command): Adjust.
15847 * corelow.c (core_detach): Adjust.
15848 * darwin-nat.c (darwin_detach): Adjust.
15849 * gnu-nat.c (gnu_detach): Adjust.
15850 * inf-ptrace.c (inf_ptrace_detach): Adjust.
15851 * infcmd.c (detach_command): Adjust
15852 * infrun.c (follow_fork_inferior): Adjust.
15853 (handle_vfork_child_exec_or_exit): Adjust.
15854 * linux-fork.c (linux_fork_detach): Remove args parameter.
15855 * linux-fork.h (linux_fork_detach): Likewise.
15856 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15857 * linux-thread-db.c (thread_db_detach): Likewise.
15858 * nto-procfs.c (procfs_detach): Likewise.
15859 * procfs.c (procfs_detach): Likewise.
15860 (do_detach): Remove signo parameter.
15861 * record.c (record_detach): Remove args parameter.
15862 * record.h (record_detach): Likewise.
15863 * remote-sim.c (gdbsim_detach): Likewise.
15864 * remote.c (remote_detach_1): Likewise.
15865 (remote_detach): Likewise.
15866 (extended_remote_detach): Likewise.
15867 * sol-thread.c (sol_thread_detach): Likewise.
15868 * target-delegates.c: Re-generate.
15869 * top.c (struct qt_args) <args>: Remove field.
15870 (kill_or_detach): Don't pass args.
15871 (quit_force): Don't set args.
15872 * windows-nat.c (windows_detach): Remove args parameter.
15873
15874 2018-01-19 Yao Qi <yao.qi@linaro.org>
15875
15876 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15877 (arm_linux_init_abi): Install it.
15878
15879 2018-01-19 Yao Qi <yao.qi@linaro.org>
15880
15881 * osabi.c (gdb_osabi_names): Extend the regexp for
15882 arm-linux-gnueabihf.
15883
15884 2018-01-18 Yao Qi <yao.qi@linaro.org>
15885
15886 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15887 m_abbrevs.
15888 (abbrev_table::add_abbrev): Update.
15889 (abbrev_table::lookup_abbrev): Update.
15890
15891 2018-01-18 Yao Qi <yao.qi@linaro.org>
15892
15893 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15894
15895 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
15896
15897 * compile/compile.c (compile_to_object): Convert "triplet_rx"
15898 to "std::string".
15899
15900 2018-01-17 Tom Tromey <tom@tromey.com>
15901
15902 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
15903
15904 2018-01-17 Tom Tromey <tom@tromey.com>
15905
15906 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15907 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15908 (create_array_type_with_stride): Update.
15909 * dwarf2read.c (set_die_type): Update.
15910
15911 2018-01-17 Tom Tromey <tom@tromey.com>
15912
15913 * dwarf2read.c (delayed_method_info): Remove typedef.
15914 (dwarf2_cu::method_info): Now a std::vector.
15915 (add_to_method_list): Update.
15916 (free_delayed_list): Remove.
15917 (compute_delayed_physnames): Update.
15918 (process_full_comp_unit, process_full_type_unit): Clear the method
15919 list. Remove cleanups.
15920 (psymtab_include_file_name): Add name_holder parameter. Use
15921 unique_xmalloc_ptr.
15922 (dwarf_decode_lines): Update.
15923
15924 2018-01-17 Tom Tromey <tom@tromey.com>
15925 Simon Marchi <simon.marchi@ericsson.com>
15926
15927 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15928 (dwarf2_per_objfile::free_cached_comp_units)
15929 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15930 (init_cutu_and_read_dies_no_follow): Update.
15931 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15932 (dwarf2_cu::~dwarf2_cu): New.
15933 (free_heap_comp_unit, free_stack_comp_unit): Remove.
15934 (age_cached_comp_units, free_one_cached_comp_unit): 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) <abbrev_table>: Remove.
15940 (struct die_reader_specs) <abbrev_table>: New member.
15941 (struct abbrev_table): Add constructor.
15942 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15943 <abbrev_obstack>: Now an auto_obstack.
15944 (abbrev_table_up): New typedef.
15945 (init_cu_die_reader): Add abbrev_table parameter.
15946 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15947 Add result_dwo_abbrev_table.
15948 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15949 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15950 Update.
15951 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15952 parameter.
15953 (skip_children): Update.
15954 (abbrev_table::alloc_abbrev): Rename from
15955 abbrev_table_alloc_abbrev.
15956 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15957 (abbrev_table::lookup_abbrev): Rename from
15958 abbrev_table_lookup_abbrev.
15959 (abbrev_table_read_table): Return abbrev_table_up.
15960 (abbrev_table_free, abbrev_table_free_cleanup)
15961 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15962 (load_partial_dies): Update.
15963
15964 2018-01-17 Tom Tromey <tom@tromey.com>
15965
15966 * dwarf2read.c (dwarf2_compute_name): Update comment.
15967 (read_func_scope, read_variable): Update.
15968 (new_symbol): Remove.
15969 (new_symbol_full): Rename to new_symbol.
15970
15971 2018-01-17 Mike Gulick <mgulick@mathworks.com>
15972
15973 PR gdb/16577
15974 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15975 a warning instead of throwing an error, set section size to 0 and return
15976 NULL.
15977 * gdb_bfd.h (gdb_bfd_map_section): Update description.
15978
15979 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
15980
15981 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15982 std::string.
15983 (linux_ptrace_attach_fail_reason_string): Likewise.
15984 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15985 Likewise.
15986 (linux_ptrace_attach_fail_reason_string): Likewise.
15987 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15988
15989 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
15990
15991 * linux-nat.c (linux_nat_attach): Remove xstrdup.
15992
15993 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
15994
15995 PR gdb/21559
15996 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15997 checking for fs_base/gs_base fields in struct user_regs_struct.
15998 * configure: Regenerate.
15999
16000 2018-01-17 Yao Qi <yao.qi@linaro.org>
16001
16002 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
16003 function.
16004 (aarch64_linux_init_abi): Install it to gdbarch hook
16005 gcc_target_options.
16006
16007 2018-01-15 Pedro Alves <palves@redhat.com>
16008
16009 * common/signals-state-save-restore.c
16010 (save_original_signals_state): Fix typos.
16011
16012 2017-01-12 Tom Tromey <tom@tromey.com>
16013 Sergio Durigan Junior <sergiodj@redhat.com>
16014
16015 * Makefile.in (install-only): Install gdb-add-index.
16016
16017 2018-01-12 John Baldwin <jhb@FreeBSD.org>
16018
16019 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
16020
16021 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
16022
16023 * infrun.c (keep_going_pass_signal): Clear step-over info when
16024 insert_breakpoints fails.
16025
16026 2018-01-11 Pedro Alves <palves@redhat.com>
16027
16028 PR gdb/22583
16029 * infrun.c (resume): Rename to ...
16030 (resume_1): ... this.
16031 (resume): Reimplement as wrapper around resume_1.
16032
16033 2018-01-11 Pedro Alves <palves@redhat.com>
16034
16035 PR remote/22597
16036 * remote.c (remote_parse_stop_reply): Default to the last-set
16037 general thread instead of to 'magic_null_ptid'.
16038
16039 2018-01-10 Pedro Alves <palves@redhat.com>
16040
16041 * language.h (language_get_symbol_name_matcher): Rename ...
16042 (get_symbol_name_matcher): ... this.
16043 * language.c (language_get_symbol_name_matcher): Ditto.
16044 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16045 callers adjusted.
16046
16047 2018-01-10 Pedro Alves <palves@redhat.com>
16048
16049 PR gdb/22670
16050 * dwarf2read.c
16051 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16052 Adjust to use language_get_symbol_name_matcher instead of
16053 language_defn::la_get_symbol_name_matcher.
16054 * language.c (language_get_symbol_name_matcher): If in Ada mode
16055 and the lookup name is a verbatim match, return Ada's matcher.
16056 * language.h (language_get_symbol_name_matcher): Adjust comment.
16057 (ada_lookup_name_info::verbatim_p):: New method.
16058
16059 2018-01-10 Pedro Alves <palves@redhat.com>
16060
16061 PR gdb/22670
16062 * ada-lang.c (ada_collect_symbol_completion_matches): If the
16063 minsym's language is language_auto or language_cplus, pass down
16064 language_ada instead.
16065 * symtab.c (compare_symbol_name): Don't frob symbol language here.
16066
16067 2018-01-10 Pedro Alves <palves@redhat.com>
16068
16069 PR gdb/22670
16070 * minsyms.c (linkage_name_str): New function.
16071 (iterate_over_minimal_symbols): Use it.
16072
16073 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16074
16075 * NEWS: Document that 'info proc' now works on FreeBSD.
16076
16077 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16078
16079 * configure.ac: Check for kinfo_getfile in libutil.
16080 * configure: Regenerate.
16081 * config.in: Regenerate.
16082 * fbsd-nat.c: Include "fbsd-tdep.h".
16083 (fbsd_fetch_cmdline): New.
16084 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16085 rather than calling error.
16086 (fbsd_info_proc): New.
16087 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16088 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16089 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16090
16091 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16092
16093 * fbsd-nat.c (struct free_deleter): Remove.
16094 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16095
16096 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16097
16098 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16099 NULL for an empty pathname.
16100
16101 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16102
16103 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16104 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16105 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16106 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16107 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16108 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16109 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16110 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16111 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16112 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16113 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16114 (fbsd_core_fetch_timeval, fbsd_print_sigset)
16115 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16116 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
16117 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16118
16119 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
16120
16121 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16122 (gnu_xfer_auxv): New function.
16123 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16124 TARGET_OBJECT_AUXV.
16125
16126 2018-01-08 Yao Qi <yao.qi@linaro.org>
16127 Simon Marchi <simon.marchi@ericsson.com>
16128
16129 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16130 common/selftest.c.
16131 (COMMON_OBS): Remove selftest.o.
16132 * configure.ac: Append selftest-arch.c and common/selftest.c to
16133 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
16134 * configure: Re-generated.
16135 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16136 GDB_SELF_TEST.
16137 (maintenance_info_selftests): Likewise.
16138
16139 2018-01-08 Xavier Roirand <roirand@adacore.com>
16140
16141 * ada-valprint.c (val_print_packed_array_elements): Use
16142 proper number of elements when printing an array indexed
16143 by an enumeration type.
16144
16145 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16146
16147 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16148 (dw2_get_file_names_reader): Adjust.
16149 (lookup_dwo_signatured_type): Adjust.
16150 (lookup_dwp_signatured_type): Adjust.
16151 (lookup_signatured_type): Adjust.
16152 (create_type_unit_group): Adjust.
16153 (get_type_unit_group): Adjust.
16154 (process_psymtab_comp_unit_reader): Adjust.
16155 (build_type_psymtabs_reader): Adjust.
16156 (scan_partial_symbols): Adjust.
16157 (add_partial_symbol): Adjust.
16158 (add_partial_subprogram): Adjust.
16159 (peek_die_abbrev): Adjust.
16160 (fixup_go_packaging): Adjust.
16161 (process_imported_unit_die): Adjust.
16162 (dwarf2_compute_name): Adjust.
16163 (dwarf2_physname): Adjust.
16164 (read_import_statement): Adjust.
16165 (handle_DW_AT_stmt_list): Adjust.
16166 (read_file_scope): Adjust.
16167 (read_func_scope): Adjust.
16168 (read_lexical_block_scope): Adjust.
16169 (read_call_site_scope): Adjust.
16170 (read_variable): Adjust.
16171 (dwarf2_rnglists_process): Adjust.
16172 (dwarf2_ranges_process): Adjust.
16173 (dwarf2_ranges_read): Adjust.
16174 (dwarf2_get_pc_bounds): Adjust.
16175 (dwarf2_record_block_ranges): Adjust.
16176 (dwarf2_add_field): Adjust.
16177 (dwarf2_add_member_fn): Adjust.
16178 (read_structure_type): Adjust.
16179 (process_structure_scope): Adjust.
16180 (read_enumeration_type): Adjust.
16181 (read_array_type): Adjust.
16182 (mark_common_block_symbol_computed): Adjust.
16183 (read_common_block): Adjust.
16184 (read_namespace_type): Adjust.
16185 (read_namespace): Adjust.
16186 (read_module_type): Adjust.
16187 (read_tag_pointer_type): Adjust.
16188 (read_tag_ptr_to_member_type): Adjust.
16189 (read_tag_string_type): Adjust.
16190 (read_subroutine_type): Adjust.
16191 (read_typedef): Adjust.
16192 (read_base_type): Adjust.
16193 (attr_to_dynamic_prop): Adjust.
16194 (read_subrange_type): Adjust.
16195 (read_unspecified_type): Adjust.
16196 (dwarf2_read_abbrevs): Adjust.
16197 (load_partial_dies): Adjust.
16198 (read_partial_die): Adjust.
16199 (find_partial_die): Adjust.
16200 (guess_partial_die_structure_name): Adjust.
16201 (fixup_partial_die): Adjust.
16202 (read_attribute_value): Adjust.
16203 (read_addr_index): Adjust.
16204 (read_addr_index_from_leb128): Adjust.
16205 (read_str_index): Adjust.
16206 (dwarf2_string_attr): Adjust.
16207 (get_debug_line_section): Adjust.
16208 (dwarf_decode_line_header): Adjust.
16209 (lnp_state_machine::check_line_address): Adjust.
16210 (dwarf_decode_lines_1): Adjust.
16211 (dwarf_decode_lines): Adjust.
16212 (dwarf2_start_symtab): Adjust.
16213 (var_decode_location): Adjust.
16214 (new_symbol_full): Adjust.
16215 (dwarf2_const_value_data): Adjust.
16216 (dwarf2_const_value_attr): Adjust.
16217 (dwarf2_const_value): Adjust.
16218 (die_type): Adjust.
16219 (die_containing_type): Adjust.
16220 (build_error_marker_type): Adjust.
16221 (lookup_die_type): Adjust.
16222 (guess_full_die_structure_name): Adjust.
16223 (anonymous_struct_prefix): Adjust.
16224 (determine_prefix): Adjust.
16225 (dwarf2_name): Adjust.
16226 (follow_die_ref_or_sig): Adjust.
16227 (follow_die_offset): Adjust.
16228 (follow_die_ref): Adjust.
16229 (follow_die_sig_1): Adjust.
16230 (follow_die_sig): Adjust.
16231 (get_signatured_type): Adjust.
16232 (get_DW_AT_signature_type): Adjust.
16233 (decode_locdesc): Adjust.
16234 (dwarf_decode_macros): Adjust.
16235 (cu_debug_loc_section): Adjust.
16236 (fill_in_loclist_baton): Adjust.
16237 (dwarf2_symbol_mark_computed): Adjust.
16238 (init_one_comp_unit): Don't assign
16239 dwarf2_cu::dwarf2_per_objfile.
16240 (set_die_type): Adjust.
16241
16242 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16243
16244 * dwarf2read.c (struct mapped_debug_names): Add constructor.
16245 <dwarf2_per_objfile>: New field.
16246 (dwarf2_per_objfile): Remove global.
16247 (get_dwarf2_per_objfile): New function.
16248 (set_dwarf2_per_objfile): New function.
16249 (dwarf2_build_psymtabs_hard): Change objfile parameter to
16250 dwarf2_per_objfile.
16251 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16252 (read_abbrev_offset): Likewise.
16253 (read_indirect_string): Likewise.
16254 (read_indirect_line_string): Likewise.
16255 (read_indirect_string_at_offset): Likewise.
16256 (read_indirect_string_from_dwz): Likewise.
16257 (dwarf2_find_containing_comp_unit): Change objfile parameter to
16258 dwarf2_per_objfile.
16259 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16260 (create_all_comp_units): Change objfile parameter to
16261 dwarf2_per_objfile.
16262 (create_all_type_units): Likewise.
16263 (process_queue): Add dwarf2_per_objfile parameter.
16264 (read_and_check_comp_unit_head): Likewise.
16265 (lookup_dwo_unit_in_dwp): Likewise.
16266 (get_dwp_file): Likewise.
16267 (process_cu_includes): Likewise.
16268 (struct free_dwo_file_cleanup_data): New struct.
16269 (dwarf2_has_info): Use get_dwarf2_per_objfile and
16270 set_dwarf2_per_objfile.
16271 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16272 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16273 context, adjust calls.
16274 (dw2_instantiate_symtab): Likewise.
16275 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16276 (dw2_get_cu): Likewise.
16277 (create_cu_from_index_list): Change objfile parameter to
16278 dwarf2_per_objfile.
16279 (create_cus_from_index_list): Get dwarf2_per_objfile from
16280 context, adjust calls.
16281 (create_cus_from_index): Likewise.
16282 (create_signatured_type_table_from_index): Change objfile
16283 parameter to dwarf2_per_objfile.
16284 (create_signatured_type_table_from_debug_names): Change objfile
16285 parameter to dwarf2_per_objfile.
16286 (create_addrmap_from_index): Likewise.
16287 (create_addrmap_from_aranges): Likewise.
16288 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16289 (dw2_setup): Remove.
16290 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16291 context.
16292 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16293 get_dwarf2_per_objfile.
16294 (dw2_forget_cached_source_info): Likewise.
16295 (dw2_map_symtabs_matching_filename): Likewise.
16296 (struct dw2_symtab_iterator) <index>: Remove.
16297 <dwarf2_per_objfile>: New field.
16298 (dw2_symtab_iter_init): Replace index parameter with
16299 dwarf2_per_objfile.
16300 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16301 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16302 (dw2_print_stats): Likewise.
16303 (dw2_dump): Likewise.
16304 (dw2_expand_symtabs_for_function): Likewise.
16305 (dw2_expand_all_symtabs): Likewise.
16306 (dw2_expand_symtabs_with_fullname): Likewise.
16307 (dw2_expand_marked_cus): Replace index and objfile parameters
16308 with dwarf2_per_objfile.
16309 (dw_expand_symtabs_matching_file_matcher): Add
16310 dwarf2_per_objfile parameter and adjust calls.
16311 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16312 adjust calls.
16313 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16314 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16315 adjust calls.
16316 (create_cus_from_debug_names_list): Replace objfile parameter
16317 with dwarf2_per_objfile and adjust calls.
16318 (create_cus_from_debug_names): Likewise.
16319 (dwarf2_read_debug_names): Likewise.
16320 (mapped_debug_names::namei_to_name): Adjust call.
16321 (dw2_debug_names_iterator::next): Likewise.
16322 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16323 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16324 (dw2_debug_names_dump): Likewise.
16325 (dw2_debug_names_expand_symtabs_for_function): Likewise.
16326 (dw2_debug_names_expand_symtabs_matching): Likewise.
16327 (dwarf2_initialize_objfile): Likewise.
16328 (dwarf2_build_psymtabs): Likewise.
16329 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16330 this_cu.
16331 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16332 (read_and_check_comp_unit_head): Likewise.
16333 (read_abbrev_offset): Likewise.
16334 (create_debug_type_hash_table): Likewise.
16335 (create_debug_types_hash_table): Likewise.
16336 (create_all_type_units): Replace objfile parameter with
16337 dwarf2_per_objfile.
16338 (add_type_unit): Add dwarf2_per_objfile parameter.
16339 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16340 with dwarf2_per_objfile.
16341 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16342 (lookup_dwp_signatured_type): Likewise.
16343 (lookup_signatured_type): Likewise.
16344 (read_cutu_die_from_dwo): Likewise.
16345 (init_tu_and_read_dwo_dies): Likewise.
16346 (init_cutu_and_read_dies): Likewise.
16347 (init_cutu_and_read_dies_no_follow): Likewise.
16348 (allocate_type_unit_groups_table): Add objfile parameter.
16349 (create_type_unit_group): Use dwarf2_per_objfile from cu.
16350 (get_type_unit_group): Likewise.
16351 (process_psymtab_comp_unit): Update call.
16352 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16353 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16354 (print_tu_stats): Likewise.
16355 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16356 in void* parameter.
16357 (build_type_psymtabs): Change objfile parameter to
16358 dwarf2_per_objfile.
16359 (process_skeletonless_type_unit): Use dwarf2_per_objfile
16360 passed in void* parameter.
16361 (process_skeletonless_type_units): Change objfile parameter to
16362 dwarf2_per_objfile.
16363 (set_partial_user): Likewise.
16364 (dwarf2_build_psymtabs_hard): Likewise.
16365 (read_comp_units_from_section): Likewise.
16366 (create_all_comp_units): Likewise.
16367 (scan_partial_symbols): Update calls.
16368 (add_partial_symbol): Likewise.
16369 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16370 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16371 (process_queue): Add dwarf2_per_objfile parameter.
16372 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16373 (compute_compunit_symtab_includes): Likewise.
16374 (process_cu_includes): Add dwarf2_per_objfile parameter.
16375 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16376 (process_full_type_unit): Likewise.
16377 (process_imported_unit_die): Update call.
16378 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16379 (read_file_scope): Likewise.
16380 (allocate_dwo_file_hash_table): Add objfile parameter.
16381 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16382 (create_cus_hash_table): Likewise.
16383 (create_dwp_hash_table): Likewise.
16384 (create_dwo_unit_in_dwp_v1): Likewise.
16385 (create_dwp_v2_section): Likewise.
16386 (create_dwo_unit_in_dwp_v2): Likewise.
16387 (lookup_dwo_unit_in_dwp): Likewise.
16388 (try_open_dwop_file): Likewise.
16389 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16390 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16391 cleanup to include a reference to dwarf2_per_objfile.
16392 (open_dwp_file): Add dwarf2_per_objfile parameter.
16393 (open_and_init_dwp_file): Likewise.
16394 (get_dwp_file): Likewise.
16395 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16396 (queue_and_load_all_dwo_tus): Update call.
16397 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16398 data.
16399 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16400 (dwarf2_ranges_process): Likewise.
16401 (dwarf2_get_pc_bounds): Likewise.
16402 (mark_common_block_symbol_computed): Likewise.
16403 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16404 (dwarf2_read_abbrevs): Update call.
16405 (read_partial_die): Use dwarf2_per_objfile from cu.
16406 (find_partial_die): Likewise.
16407 (fixup_partial_die): Likewise.
16408 (read_attribute_value): Likewise.
16409 (read_indirect_string_at_offset_from): Add objfile parameter.
16410 (read_indirect_string_at_offset): Add dwarf2_per_objfile
16411 parameter.
16412 (read_indirect_string_from_dwz): Add objfile parameter.
16413 (read_indirect_string): Add objfile parameter.
16414 (read_addr_index_1): Add dwarf2_per_objfile parameter.
16415 (read_addr_index): Use dwarf2_per_objfile from cu.
16416 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16417 call dw2_setup.
16418 (read_str_index): Use dwarf2_per_objfile from cu.
16419 (get_debug_line_section): Likewise.
16420 (read_formatted_entries): Add dwarf2_per_objfile parameter.
16421 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16422 (new_symbol_full): Use dwarf2_per_objfile from cu.
16423 (build_error_marker_type): Likewise.
16424 (lookup_die_type): Likewise.
16425 (determine_prefix): Likewise.
16426 (follow_die_offset): Likewise.
16427 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16428 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16429 (dwarf2_fetch_die_type_sect_off): Likewise.
16430 (dwarf2_get_die_type): Likewise.
16431 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16432 (get_signatured_type): Likewise.
16433 (get_DW_AT_signature_type): Likewise.
16434 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16435 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16436 (cu_debug_loc_section): Likewise.
16437 (fill_in_loclist_baton): Likewise.
16438 (dwarf2_symbol_mark_computed): Likewise.
16439 (dwarf2_find_containing_comp_unit): Change objfile parameter to
16440 dwarf2_per_objfile.
16441 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16442 parameter.
16443 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16444 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16445 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16446 (set_die_type): Use dwarf2_free_objfile from cu.
16447 (get_die_type_at_offset): Likewise.
16448 (dwarf2_per_objfile_free): Don't assign global variable.
16449 (debug_names) <constructor>: Add dwarf2_per_objfile
16450 parameter, update m_debugstrlookup construction.
16451 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16452 parameter.
16453 <m_dwarf2_per_objfile>: New field.
16454 <lookup>: Use m_dwarf2_per_objfile.
16455 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16456 (psyms_seen_size): Likewise.
16457 (write_gdbindex): Replace objfile parameter with
16458 dwarf2_per_objfile.
16459 (write_debug_names): Likewise.
16460 (write_psymtabs_to_index): Likewise.
16461 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16462 calls.
16463
16464 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16465
16466 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16467 <dwarf2_per_objfile>: New field.
16468 (struct dwarf2_per_cu_data) <objfile>: Remove.
16469 <dwarf2_per_objfile>: New field.
16470 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16471 of objfile.
16472 (create_signatured_type_table_from_index): Likewise.
16473 (create_debug_type_hash_table): Likewise.
16474 (fill_in_sig_entry_from_dwo_entry): Likewise.
16475 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16476 (create_type_unit_group): Assign dwarf2_per_objfile instead of
16477 objfile.
16478 (create_partial_symtab): Access objfile through
16479 dwarf2_per_objfile.
16480 (process_psymtab_comp_unit_reader): Likewise.
16481 (read_comp_units_from_section): Likewise.
16482 (scan_partial_symbols): Likewise.
16483 (add_partial_symbol): Likewise.
16484 (add_partial_subprogram): Likewise.
16485 (peek_die_abbrev): Likewise.
16486 (fixup_go_packaging): Likewise.
16487 (process_full_comp_unit): Likewise.
16488 (process_full_type_unit): Likewise.
16489 (process_imported_unit_die): Likewise.
16490 (dwarf2_compute_name): Likewise.
16491 (dwarf2_physname): Likewise.
16492 (read_import_statement): Likewise.
16493 (create_cus_hash_table): Assign dwarf2_physname instead of
16494 objfile.
16495 (read_func_scope): Access objfile through dwarf2_per_objfile.
16496 (read_lexical_block_scope): Likewise.
16497 (read_call_site_scope): Likewise.
16498 (read_variable): Likewise.
16499 (dwarf2_rnglists_process): Likewise.
16500 (dwarf2_ranges_process): Likewise.
16501 (dwarf2_ranges_read): Likewise.
16502 (dwarf2_record_block_ranges): Likewise.
16503 (dwarf2_add_field): Likewise.
16504 (dwarf2_add_member_fn): Likewise.
16505 (read_structure_type): Likewise.
16506 (process_structure_scope): Likewise.
16507 (read_enumeration_type): Likewise.
16508 (read_array_type): Likewise.
16509 (read_common_block): Likewise.
16510 (read_namespace_type): Likewise.
16511 (read_namespace): Likewise.
16512 (read_module_type): Likewise.
16513 (read_tag_pointer_type): Likewise.
16514 (read_tag_ptr_to_member_type): Likewise.
16515 (read_tag_string_type): Likewise.
16516 (read_subroutine_type): Likewise.
16517 (read_typedef): Likewise.
16518 (read_base_type): Likewise.
16519 (attr_to_dynamic_prop): Likewise.
16520 (read_subrange_type): Likewise.
16521 (read_unspecified_type): Likewise.
16522 (load_partial_dies): Likewise.
16523 (read_partial_die): Likewise.
16524 (find_partial_die): Likewise.
16525 (guess_partial_die_structure_name): Likewise.
16526 (fixup_partial_die): Likewise.
16527 (read_attribute_value): Likewise.
16528 (read_addr_index_from_leb128): Likewise.
16529 (dwarf2_read_addr_index): Likewise.
16530 (dwarf2_string_attr): Likewise.
16531 (lnp_state_machine::check_line_address): Likewise.
16532 (dwarf_decode_lines_1): Likewise.
16533 (dwarf_decode_lines): Likewise.
16534 (dwarf2_start_symtab): Likewise.
16535 (var_decode_location): Likewise.
16536 (new_symbol_full): Likewise.
16537 (dwarf2_const_value_data): Likewise.
16538 (dwarf2_const_value_attr): Likewise.
16539 (dwarf2_const_value): Likewise.
16540 (die_type): Likewise.
16541 (die_containing_type): Likewise.
16542 (lookup_die_type): Likewise.
16543 (guess_full_die_structure_name): Likewise.
16544 (anonymous_struct_prefix): Likewise.
16545 (dwarf2_name): Likewise.
16546 (follow_die_ref_or_sig): Likewise.
16547 (follow_die_offset): Likewise.
16548 (follow_die_ref): Likewise.
16549 (dwarf2_fetch_die_loc_sect_off): Likewise.
16550 (dwarf2_fetch_constant_bytes): Likewise.
16551 (dwarf2_fetch_die_type_sect_off): Likewise.
16552 (dwarf2_get_die_type): Likewise.
16553 (follow_die_sig): Likewise.
16554 (decode_locdesc): Likewise.
16555 (dwarf2_per_cu_objfile): Likewise.
16556 (dwarf2_per_cu_text_offset): Likewise.
16557 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16558 objfile.
16559 (set_die_type): Access objfile through
16560 dwarf2_per_objfile.
16561
16562 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16563
16564 * valprint.c (converted_character_d): Remove typedef.
16565 (DEF_VEC_O (converted_character_d)): Remove.
16566 (count_next_character): Use std::vector.
16567 (print_converted_chars_to_obstack): Likewise.
16568 (generic_printstr): Likewise.
16569
16570 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16571
16572 * xml-support.h (struct gdb_xml_value): Add constructor.
16573 <value>: Change type to unique_xmalloc_ptr.
16574 (gdb_xml_value_s): Remove typedef.
16575 (DEF_VEC_O (gdb_xml_value_s)): Remove.
16576 (gdb_xml_element_start_handler): Change parameter type to
16577 std::vector.
16578 (xml_find_attribute): Likewise.
16579 * xml-support.c (xml_find_attribute): Change parameter type to
16580 std::vector and adjust.
16581 (gdb_xml_values_cleanup): Remove.
16582 (gdb_xml_parser::start_element): Adjust to std::vector.
16583 (xinclude_start_include): Change paraeter type to std::vector
16584 and adjust.
16585 * btrace.c (check_xml_btrace_version): Likewise.
16586 (parse_xml_btrace_block): Likewise.
16587 (parse_xml_btrace_pt_config_cpu): Likewise.
16588 (parse_xml_btrace_pt): Likewise.
16589 (parse_xml_btrace_conf_bts): Likewise.
16590 (parse_xml_btrace_conf_pt): Likewise.
16591 * memory-map.c (memory_map_start_memory): Likewise.
16592 (memory_map_start_property): Likewise.
16593 * osdata.c (osdata_start_osdata): Likewise.
16594 (osdata_start_item): Likewise.
16595 (osdata_start_column): Likewise.
16596 * remote.c (start_thread): Likewise.
16597 * solib-aix.c (library_list_start_library): Likewise.
16598 (library_list_start_list): Likewise.
16599 * solib-svr4.c (library_list_start_library): Likewise.
16600 (svr4_library_list_start_list): Likewise.
16601 * solib-target.c (library_list_start_segment): Likewise.
16602 (library_list_start_section): Likewise.
16603 (library_list_start_library): Likewise.
16604 (library_list_start_list): Likewise.
16605 * tracepoint.c (traceframe_info_start_memory): Likewise.
16606 (traceframe_info_start_tvar): Likewise.
16607 * xml-syscall.c (syscall_start_syscall): Likewise.
16608 * xml-tdesc.c (tdesc_start_target): Likewise.
16609 (tdesc_start_feature): Likewise.
16610 (tdesc_start_reg): Likewise.
16611 (tdesc_start_union): Likewise.
16612 (tdesc_start_struct): Likewise.
16613 (tdesc_start_flags): Likewise.
16614 (tdesc_start_enum): Likewise.
16615 (tdesc_start_field): Likewise.
16616 (tdesc_start_enum_value): Likewise.
16617 (tdesc_start_vector): Likewise.
16618
16619 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16620
16621 * extension.h (struct xmethod_worker) <clone>: Remove.
16622 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16623 Remove.
16624 (python_xmethod_worker::clone): Remove.
16625 * valops.c (find_overload_match): Use std::move instead of
16626 clone.
16627
16628 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16629
16630 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16631 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16632 <free_xmethod_worker_data>: Remove.
16633 <get_matching_xmethod_workers>: Chance VEC to std::vector.
16634 <get_xmethod_arg_types>: Remove.
16635 <get_xmethod_result_type>: Remove.
16636 <invoke_xmethod>: Remove.
16637 * extension.c (new_xmethod_worker): Remove.
16638 (clone_xmethod_worker): Remove.
16639 (get_matching_xmethod_workers): Return void, pass std::vector by
16640 pointer.
16641 (get_xmethod_arg_types): Rename to...
16642 (xmethod_worker::get_arg_types): ... this, and adjust.
16643 (get_xmethod_result_type): Rename to...
16644 (xmethod_worker::get_result_type): ... this, and adjust.
16645 (invoke_xmethod): Remove.
16646 (free_xmethod_worker): Remove.
16647 (free_xmethod_worker_vec): Remove.
16648 * extension.h (enum ext_lang_rc): Move here from
16649 extension-priv.h.
16650 (struct xmethod_worker): Add constructor and destructor.
16651 <data>: Remove.
16652 <value>: Remove.
16653 <invoke, clone, do_get_result_type, do_get_arg_types>: New
16654 virtual pure methods.
16655 <get_arg_types, get_result_type>: New methods.
16656 (xmethod_worker_ptr): Remove typedef.
16657 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16658 (xmethod_worker_vec): Remove typedef.
16659 (xmethod_worker_up): New typedef.
16660 (invoke_xmethod): Remove.
16661 (clone_xmethod_worker): Remove.
16662 (free_xmethod_worker): Remove.
16663 (free_xmethod_worker_vec): Remove.
16664 (get_xmethod_arg_types): Remove.
16665 (get_xmethod_result_type): Remove.
16666 * valops.c (find_method_list): Use std::vector, don't use
16667 intermediate vector.
16668 (value_find_oload_method_list): Use std::vector.
16669 (find_overload_match): Use std::vector.
16670 (find_oload_champ): Use std::vector.
16671 * value.c (value_free): Use operator delete.
16672 (value_of_xmethod): Rename to...
16673 (value_from_xmethod): ... this. Don't assign
16674 xmethod_worker::value, take rvalue-reference.
16675 (result_type_of_xmethod): Adjust.
16676 (call_xmethod): Adjust.
16677 * value.h: Include extension.h.
16678 (struct xmethod_worker): Don't forward-declare.
16679 (value_of_xmethod): Rename to...
16680 (value_from_xmethod): ... this, take rvalue-reference.
16681 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16682 (struct python_xmethod_worker): ... this, add constructor and
16683 destructor.
16684 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16685 (gdbpy_free_xmethod_worker_data): Rename to...
16686 (python_xmethod_worker::~python_xmethod_worker): ... this and
16687 adjust.
16688 (gdbpy_clone_xmethod_worker_data): Rename to...
16689 (python_xmethod_worker::clone): ... this and adjust.
16690 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16691 temporary vector.
16692 (gdbpy_get_xmethod_arg_types): Rename to...
16693 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16694 (gdbpy_get_xmethod_result_type): Rename to...
16695 (python_xmethod_worker::do_get_result_type): ... this and
16696 adjust.
16697 (gdbpy_invoke_xmethod): Rename to...
16698 (python_xmethod_worker::invoke): ... this and adjust.
16699 (new_python_xmethod_worker): Rename to...
16700 (python_xmethod_worker::python_xmethod_worker): ... this and
16701 adjust.
16702 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16703 Remove.
16704 (gdbpy_free_xmethod_worker_data): Remove.
16705 (gdbpy_get_matching_xmethod_workers): Use std::vector.
16706 (gdbpy_get_xmethod_arg_types): Remove.
16707 (gdbpy_get_xmethod_result_type): Remove.
16708 (gdbpy_invoke_xmethod): Remove.
16709 * python/python.c (python_extension_ops): Remove obsolete
16710 callbacks.
16711
16712 2018-01-05 Pedro Alves <palves@redhat.com>
16713
16714 PR gdb/18653
16715 * common/signals-state-save-restore.c
16716 (save_original_signals_state): New parameter 'quiet'. Warn if we
16717 find a custom handler preinstalled, instead of internal erroring.
16718 But only warn if !quiet.
16719 * common/signals-state-save-restore.h
16720 (save_original_signals_state): New parameter 'quiet'.
16721 * main.c (captured_main_1): Move save_original_signals_state call
16722 after option handling, and pass QUIET.
16723
16724 2018-01-05 Pedro Alves <palves@redhat.com>
16725
16726 * spu-tdep.c (spu_catch_start): Pass
16727 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16728
16729 2018-01-05 Pedro Alves <palves@redhat.com>
16730
16731 PR gdb/22670
16732 * ada-lang.c (literal_symbol_name_matcher): New function.
16733 (ada_get_symbol_name_matcher): Use it for
16734 symbol_name_match_type::SEARCH_NAME.
16735 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
16736 it down instead of assuming symbol_name_match_type::FULL.
16737 * block.h (block_lookup_symbol): New parameter 'match_type'.
16738 * c-valprint.c (print_unpacked_pointer): Use
16739 lookup_symbol_search_name instead of lookup_symbol.
16740 * compile/compile-object-load.c (get_out_value_type): Pass down
16741 symbol_name_match_type::SEARCH_NAME.
16742 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16743 symbol_name_match_type::FULL.
16744 * cp-support.c (cp_get_symbol_name_matcher): Handle
16745 symbol_name_match_type::SEARCH_NAME.
16746 * infrun.c (insert_exception_resume_breakpoint): Use
16747 lookup_symbol_search_name.
16748 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16749 * psymtab.c (maintenance_check_psymtabs): Use
16750 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16751 * stack.c (print_frame_args): Use lookup_symbol_search_name and
16752 SYMBOL_SEARCH_NAME.
16753 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16754 if symbol_name_match_type::SEARCH_NAME.
16755 (lookup_symbol_in_language): Pass down
16756 symbol_name_match_type::FULL.
16757 (lookup_symbol_search_name): New.
16758 (lookup_language_this): Pass down
16759 symbol_name_match_type::SEARCH_NAME.
16760 (lookup_symbol_aux, lookup_local_symbol): New parameter
16761 'match_type'. Pass it down.
16762 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16763 (lookup_symbol_search_name): New declaration.
16764 (lookup_symbol_in_block): New 'match_type' parameter.
16765
16766 2018-01-05 Pedro Alves <palves@redhat.com>
16767
16768 PR gdb/22670
16769 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16770 ada_lookup_symbol.
16771 (ada_lookup_symbol): Reimplement in terms of
16772 ada_lookup_symbol_list, bits factored out from
16773 ada_lookup_encoded_symbol.
16774
16775 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16776
16777 * ada-exp.y (write_object_renaming): When subscripting an array
16778 using a symbol as the index, pass the block in call to
16779 ada_lookup_encoded_symbol when looking that symbol up.
16780
16781 2018-01-05 Jerome Guitton <guitton@adacore.com>
16782
16783 * ada-lang.c (ada_array_length): Use ada_index_type instead of
16784 TYPE_INDEX_TYPE.
16785
16786 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16787
16788 * ada-lang.c (ada_to_fixed_value_create): Add handling of
16789 the case where VALUE_LVAL (val0) is not lval_memory.
16790
16791 2018-01-05 Xavier Roirand <roirand@adacore.com>
16792
16793 * ada-valprint.c (print_optional_low_bound): Handle
16794 character-indexed array printing like boolean-indexed array
16795 printing.
16796
16797 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16798
16799 * NEWS: Create a new section for the next release branch.
16800 Rename the section of the current branch, now that it has
16801 been cut.
16802
16803 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16804
16805 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16806 * version.in: Bump version to 8.1.50.DATE-git.
16807
16808 2018-01-03 Xavier Roirand <roirand@adacore.com>
16809
16810 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16811 Add field.
16812 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16813 Add field.
16814 (default_exception_support_info) <catch_handlers_sym>: Add field.
16815 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16816 (ada_exception_name_addr_1): Add "catch handlers" handling.
16817 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16818 Update all callers.
16819 (create_excep_cond_exprs) <ex>: Add parameter.
16820 (re_set_exception): Update create_excep_cond_exprs call.
16821 (print_it_exception, print_one_exception, print_mention_exception)
16822 (print_recreate_exception): Add "catch handler" handling.
16823 (allocate_location_catch_handlers, re_set_catch_handlers)
16824 (check_status_catch_handlers, print_it_catch_handlers)
16825 (print_one_catch_handlers, print_mention_catch_handlers)
16826 (print_recreate_catch_handlers): New function.
16827 (catch_handlers_breakpoint_ops): New variable.
16828 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16829 Add parameter. Add "catch handler" handling.
16830 (ada_exception_sym_name, ada_exception_breakpoint_ops):
16831 Add "catch handler" handling.
16832 (ada_exception_catchpoint_cond_string): Add "catch handler"
16833 handling.
16834 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16835 call.
16836 (catch_ada_handlers_command): New function.
16837 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16838 operations structure.
16839 (_initialize_ada_language): Add "catch handlers" command entry.
16840 * NEWS: Document "catch handlers" feature.
16841
16842 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16843
16844 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16845 account when creating the array type of the slice.
16846 (ada_value_slice): Likewise.
16847
16848 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16849
16850 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16851 New enum value.
16852 (create_array_type_with_stride): Add byte_stride_prop parameter.
16853 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16854 New parameter. Update all callers in this file.
16855 (array_type_has_dynamic_stride): New function.
16856 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16857 of arrays with dynamic byte strides.
16858 * dwarf2read.c (read_array_type): Add support for dynamic
16859 DW_AT_byte_stride attributes.
16860
16861 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16862
16863 * dwarf2read.c (read_unspecified_type): Treat
16864 DW_TAG_enumeration_type DIEs from Ada units as stubs.
16865
16866 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16867
16868 Update copyright year range in all GDB files.
16869
16870 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
16871
16872 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16873 and gdb/testsuite/gdb.base/step-line.c.
16874
16875 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16876
16877 * copyright.py (main): Dump the contents of
16878 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16879 even if BY_HAND is empty.
16880
16881 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16882
16883 * top.c (print_gdb_version): Update Copyright year in version
16884 message.
16885
16886 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16887
16888 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16889
16890 For older changes see ChangeLog-2017.
16891 \f
16892 Local Variables:
16893 mode: change-log
16894 left-margin: 8
16895 fill-column: 74
16896 version-control: never
16897 coding: utf-8
16898 End: