Use gdbpy_convert_exception in a few more spots
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-12-27 Tom Tromey <tom@tromey.com>
2
3 * python/py-value.c (convert_value_from_python): Use
4 gdbpy_convert_exception.
5 * python/py-param.c (parmpy_init): Use gdbpy_convert_exception.
6 * python/py-cmd.c (cmdpy_init): Use gdbpy_convert_exception.
7 * python/py-breakpoint.c (bppy_init): Use
8 gdbpy_convert_exception.
9
10 2018-12-27 Tom Tromey <tom@tromey.com>
11
12 * configure.nat (NATDEPFILES): Use nat/ prefix.
13 * Makefile.in (CONFIG_SRC_SUBDIR): Add nat.
14 (%.o: ${srcdir}/nat/%.c): Remove rule.
15 (INIT_FILES): Do not filter out NATDEPFILES.
16
17 2018-12-27 Tom Tromey <tom@tromey.com>
18
19 * Makefile.in (INIT_FILES): Redefine.
20 (stamp-init): Remove sed, tr invocations. Use for loop. Don't
21 set LANG or LC_ALL.
22
23 2018-12-27 Tom Tromey <tom@tromey.com>
24
25 * Makefile.in (stamp-init): Remove gdbtypes special case.
26
27 2018-12-27 John Baldwin <jhb@FreeBSD.org>
28
29 * config/i386/nm-fbsd.h: Remove file.
30 * Makefile.in (HFILES_NO_SRCDIR): Remove config/i386/nm-fbsd.h.
31 * configure.nat: Remove NAT_FILE for FreeBSD/i386.
32
33 2018-12-27 Tom Tromey <tom@tromey.com>
34
35 * minsyms.h (class minimal_symbol_reader): Use
36 DISABLE_COPY_AND_ASSIGN.
37
38 2018-12-27 Tom Tromey <tom@tromey.com>
39
40 * python/python.c (python_interactive_command): Use std::string.
41 (gdbpy_parameter): Likewise.
42 * python/py-utils.c (unicode_to_encoded_string): Update comment.
43 * python/py-symtab.c (salpy_str): Use PyString_FromFormat.
44 * python/py-record-btrace.c (recpy_bt_insn_data): Use
45 byte_vector.
46 * python/py-objfile.c (objfpy_get_build_id): Use
47 unique_xmalloc_ptr.
48 * python/py-inferior.c (infpy_read_memory): Use
49 unique_xmalloc_ptr.
50 * python/py-cmd.c (gdbpy_parse_command_name): Use std::string.
51
52 2018-12-26 Simon Marchi <simon.marchi@polymtl.ca>
53
54 * target.c (target_terminal::restore_inferior): Remove struct keyword.
55
56 2018-12-26 Simon Marchi <simon.marchi@ericsson.com>
57
58 * build-id.c (build_id_to_debug_bfd): Enhance debug output.
59 * symfile.c (separate_debug_file_exists): Likewise.
60
61 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
62
63 * c-exp.y (field_name): Allow DOUBLE_KEYWORD, INT_KEYWORD, LONG,
64 SHORT, SIGNED_KEYWORD, and UNSIGNED tokens to act as a field
65 names.
66 (typename_stoken): New function.
67
68 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
69
70 * c-exp.y (field_name): New %token, and new rule.
71 (exp): Replace uses of 'name' with 'field_name' where appropriate.
72
73 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
74
75 PR gdb/13368
76 * c-exp.y (typebase): Extend the comment.
77 (ident_tokens): Likewise.
78
79 2018-12-18 Tom Tromey <tom@tromey.com>
80
81 * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take
82 address of sect_off.
83
84 2018-12-23 Joel Brobecker <brobecker@adacore.com>
85
86 GDB 8.2.1 released.
87
88 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
89
90 * riscv-tdep.c (riscv_call_arg_struct): Don't adjust size before
91 assigning locations.
92 (riscv_return_value): Take more care not to read/write outside of
93 argument buffer. Cast return value between the declared type and
94 the abi type.
95
96 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
97
98 * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
99 fflags, and frm registers.
100
101 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
102
103 * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
104 (riscv_gdbarch_init): Register new function with gdbarch.
105 * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
106
107 2018-12-21 Simon Marchi <simon.marchi@ericsson.com>
108
109 * minsyms.c (mst_str): New.
110 (minimal_symbol_reader::record_full): Add debug output.
111
112 2018-12-21 John Baldwin <jhb@FreeBSD.org>
113
114 * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
115 equal PL_FLAG_SI.
116 (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
117
118 2018-12-21 Paul Marechal <paul.marechal@ericsson.com>
119
120 PR gdb/23974
121 * target.c (target_read_stralloc): Check for empty vector.
122
123 2018-12-21 Дилян Палаузов <dilyan.palauzov@aegee.org>
124
125 * top.c (print_gdb_configuration): Print "--without-python"
126 if GDB was configured without Python.
127
128 2018-12-21 Andrew Burgess <andrew.burgess@embecosm.com>
129
130 * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
131 a signed offset as a string.
132
133 2018-12-21 Dave Murphy <davem@devkitpro.org>
134
135 * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
136 initialise.
137 * probe.c (any_static_probe_ops): Ditto.
138 * record-btrace.c (record_btrace_thread_observer_token): Ditto.
139 * stap-probe.c (stap_static_probe_ops): Ditto.
140 * tui/tui-hooks.c (tui_observers_token): Ditto.
141 * unittests/observable-selftests.c (token1, token2, token3): Ditto.
142
143 2018-12-19 Andrew Burgess <andrew.burgess@embecosm.com>
144
145 * gdb/dummy-frame.c (default_dummy_id): Defined new function.
146 * gdb/dummy-frame.h (default_dummy_id): Declare new function.
147 * gdb/frame-unwind.c (default_unwind_pc): Define new function.
148 (default_unwind_sp): Define new function.
149 * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
150 (default_unwind_sp): Declare new function.
151 * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
152 available.
153 (get_frame_sp): Assume that gdbarch_unwind_sp is available.
154 * gdb/gdbarch.c: Regenerate.
155 * gdb/gdbarch.h: Regenerate.
156 * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
157 unwind_sp. Add additional header files to be included in
158 generated file.
159
160 2018-12-19 Dimitar Dimitrov <dimitar@dinux.eu>
161
162 * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
163 sp clobbers.
164
165 2018-12-17 Andrew Burgess <andrew.burgess@embecosm.com>
166
167 * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
168 'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
169 'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
170 'processing_has_namespace_info' from unsigned int to bool. Update
171 comments.
172 (producer_is_icc_lt_14): Update return type.
173 (producer_is_gcc_lt_4_3): Likewise.
174 (producer_is_gxx_lt_4_6): Likewise.
175 (process_die): Write true instead of 1 into predicate fields.
176 (dwarf2_start_symtab): Likewise.
177 (var_decode_location): Likewise.
178 (dwarf2_mark_helper): Likewise.
179 (dwarf2_mark): Likewise.
180 (dwarf2_clear_marks): Write false instead of 0 into predicate
181 field.
182 (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
183 0.
184
185 2018-12-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
186
187 * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
188 asm/sigcontext.h.
189
190 2018-12-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
191
192 * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
193 warning trailing new line.
194
195 2018-12-16 Philippe Waroquiers <philippe.waroquiers@skynet.be>
196
197 * nat/linux-ptrace.c (kill_child): New function.
198 (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
199 Add a call to kill_child in case of early return after fork.
200 (linux_check_ptrace_features): Use kill_child instead of local code.
201 (linux_test_for_tracefork): Likewise.
202
203 2018-12-14 Tom Tromey <tom@tromey.com>
204
205 * Makefile.in: Remove "alloca" comment.
206 (INFOFILES): Remove.
207 (local-maintainer-clean): Don't use INFOFILES.
208
209 2018-12-13 John Baldwin <jhb@FreeBSD.org>
210
211 * syscalls/update-freebsd.sh: New file.
212 * syscalls/freebsd.xml: Regenerate.
213
214 2018-12-13 John Baldwin <jhb@FreeBSD.org>
215
216 * NEWS: Add entry documenting system call aliases.
217 * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
218 to get_syscalls_by_name.
219 * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
220 * gdbarch.h: Regenerate.
221 * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
222 * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
223 from get_syscall_by_name. Now accepts a pointer to a vector of
224 integers and returns a bool.
225 [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
226 (syscall_create_syscall_desc): Add alias parameter and pass it to
227 syscall_desc constructor.
228 (syscall_start_syscall): Handle alias attribute.
229 (syscall_attr): Add alias attribute.
230 (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
231 Now accepts a pointer to a vector of integers and returns a
232 bool. Add syscalls whose alias or name matches the requested
233 name.
234 (get_syscalls_by_name): Rename from get_syscall_by_name. Now
235 accepts a pointer to a vector of integers and returns a bool.
236 * xml-syscall.h (get_syscalls_by_name): Likewise.
237
238 2018-12-13 John Baldwin <jhb@FreeBSD.org>
239
240 * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
241 to get_syscalls_by_group.
242 * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
243 false.
244 [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
245 numbers to an existing vector of integers and return a bool.
246 (get_syscalls_by_group): Accept pointer to vector of integers
247 and change return type to bool.
248 * xml-syscall.h (get_syscalls_by_group): Likewise.
249
250 2018-12-13 Jim Wilson <jimw@sifive.com>
251
252 * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
253 comment for SD field, and correct xlen calculation. For MISA, add
254 comment for MXL field, add call to register_size, and correct base
255 calculation.
256
257 2018-12-13 Stafford Horne <shorne@gmail.com>
258
259 * NEWS(New targets): Add or1k*-*-linux*.
260
261 2018-12-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
262
263 * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
264 declare on one line to fix ARI warning.
265
266 2018-12-12 Andrew Burgess <andrew.burgess@embecosm.com>
267
268 * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
269 (infcall_suspend_state::registers): New.
270 (infcall_suspend_state::restore): New.
271 (infcall_suspend_state::thread_suspend): Rename to...
272 (infcall_suspend_state::m_thread_suspend): ...this.
273 (infcall_suspend_state::registers): Rename to...
274 (infcall_suspend_state::m_registers): ...this.
275 (infcall_suspend_state::siginfo_gdbarch): Rename to...
276 (infcall_suspend_state::m_siginfo_gdbarch): ...this.
277 (infcall_suspend_state::siginfo_data): Rename to...
278 (infcall_suspend_state::m_siginfo_data): ...this.
279 (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
280 constructor.
281 (restore_infcall_suspend_state): Rewrite to use
282 infcall_suspend_state::restore method.
283 (get_infcall_suspend_state_regcache): Use
284 infcall_suspend_state::registers method.
285
286 2018-12-12 Andrew Burgess <andrew.burgess@embecosm.com>
287
288 * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
289 arguments are passed in integer registers.
290 (riscv_call_arg_complex_float): Likewise.
291
292 2018-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
293
294 * nat/linux-osdata.c (common_getter): New function.
295 (struct osdata_type): Change getter to take_snapshot.
296 Add LONGEST len_avail and struct buffer buffer.
297 Change all elements in the initializer.
298 Add an element for the list of types.
299 (linux_xfer_osdata_info_os_types): New function.
300 (linux_common_xfer_osdata): Use common_getter for the list of types.
301 Replace getter call by common_getter.
302 (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
303 Add arg BUFFER. Only keep the code that adds data in BUFFER.
304 (linux_xfer_osdata_fds): Likewise.
305 (linux_xfer_osdata_modules): Likewise.
306 (linux_xfer_osdata_msg): Likewise.
307 (linux_xfer_osdata_processes): Likewise.
308 (linux_xfer_osdata_processgroups): Likewise.
309 (linux_xfer_osdata_sem): Likewise.
310 (linux_xfer_osdata_shm): Likewise.
311 (linux_xfer_osdata_isockets): Likewise.
312 (linux_xfer_osdata_threads): Likewise.
313
314 2018-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
315
316 * nat/linux-osdata.c: Removed various trailing spaces.
317
318 2018-12-10 Andrew Burgess <andrew.burgess@embecosm.com>
319
320 * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
321 leading whitespace before #include line.
322
323 2018-12-08 Simon Marchi <simon.marchi@ericsson.com>
324 Дилян Палаузов <dilyan.palauzov@aegee.org>
325
326 PR gdb/23950
327 * configure.ac: Search for tgetent in libtinfow.
328 * configure: Re-generate.
329
330 2018-12-08 Philippe Waroquiers <philippe.waroquiers@skynet.be>
331
332 * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
333 (thread_db_err_str): Forward declare.
334 (delete_thread_db_info): Call td_ta_delete_p if available.
335 (try_thread_db_load_1): Acquire td_ta_delete address.
336 * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
337
338 2018-12-08 Pedro Alves <palves@redhat.com>
339
340 * source.c (forward_search_command): Rename to ...
341 (search_command_helper): ... this. Add 'forward' parameter.
342 Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
343 buffer. Handle backward searches too.
344 (forward_search_command, reverse_search_command): Reimplement by
345 calling search_command_helper.
346
347 2018-12-07 Andrew Burgess <andrew.burgess@embecosm.com>
348
349 * .dir-locals.el: Copy most of the settings from c-mode over to
350 c++-mode.
351
352 2018-12-08 Stafford Horne <shorne@gmail.com>
353
354 * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
355 * configure.tgt: Add or1k*-*-linux*.
356 * or1k-linux-tdep.c: New file.
357 * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
358
359 2018-12-07 Pedro Alves <palves@redhat.com>
360
361 * dwarf2read.c (get_gdb_index_contents_from_section): Use
362 gdb::make_array_view.
363
364 2018-12-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
365
366 * language.c (_initialize_language): Fix leak by assigning
367 a static string to language. Same for range and case_sensitive,
368 even if no leak is detected for these variables.
369
370 2018-12-05 John Baldwin <jhb@FreeBSD.org>
371
372 * configure: Re-generate.
373 * configure.ac: Use separate sed expressions to escape variables
374 in auto-load directories.
375
376 2018-12-05 Andrew Burgess <andrew.burgess@embecosm.com>
377
378 * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
379 (riscv_find_default_target_description): Use new function to
380 extract feature from gdbarch_info.
381 (riscv_gdbarch_init): Add error checks for xlen and flen between
382 target description and bfd headers. Be smarter about when we
383 think the hardware floating point abi should be used.
384
385 2018-12-05 Alan Hayward <alan.hayward@arm.com>
386
387 * nat/aarch64-linux-hw-point.c
388 (aarch64_linux_any_set_debug_regs_state): New function.
389 * nat/aarch64-linux-hw-point.h
390 (aarch64_linux_any_set_debug_regs_state): New declaration.
391 * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
392 BPs or WPs are set.
393
394 2018-11-30 John Baldwin <jhb@FreeBSD.org>
395
396 * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
397 (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
398
399 2018-11-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
400 Simon Marchi <simon.marchi@ericsson.com>
401
402 * linespec.c (symtab_vector_up): Remove.
403 (symtabs_from_filename): Change return type to std::vector.
404 (collect_symtabs_from_filename): Likewise.
405 (create_sals_line_offset): Assign return value of
406 collect_symtabs_from_filename to *ls->file_symtabs.
407 (convert_explicit_location_to_linespec): Remove call to release.
408 (parse_linespec): Likewise.
409 (symtab_collector) <symtab_collector>: Remove initialization of
410 m_symtabs.
411 <release_symtabs>: Change return type to std::vector<symtab *>.
412 <operator ()>: Adjust.
413
414 2018-11-30 John Baldwin <jhb@FreeBSD.org>
415
416 * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
417 defined.
418 (union sigval32, struct siginfo32, fbsd_siginfo_size)
419 (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
420 of KERN_PROC_AUXV and PT_LWPINFO.
421 (fbsd_nat_target::xfer_partial): Define method unconditionally.
422 Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
423 Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
424 Make TARGET_OBJECT_FREEBSD_VMMAP and
425 TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
426 and KERN_PROC_PS_STRINGS.
427 * fbsd-nat.h: Include <sys/proc.h>.
428 (fbsd_nat_target::xfer_partial): Declare method unconditionally.
429
430 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
431
432 * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
433 header files.
434 (riscv_linux_nat_target::read_description): New method.
435
436 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
437
438 * arch/riscv.h (riscv_gdbarch_features::hash): New method.
439 * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
440 (riscv_tdesc_cache): New global.
441 (riscv_create_target_description): Look in the cache before
442 creating a new target description.
443
444 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
445
446 * arch/riscv.h (riscv_gdb_features::operator==): New.
447 (riscv_gdb_features::operator!=): New.
448 * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
449 operator.
450
451 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
452
453 * arch/riscv.h (riscv_create_target_description): Make return type
454 const.
455 * arch/riscv.c (riscv_create_target_description): Likewise.
456 * riscv-tdep.c (riscv_find_default_target_description): Likewise.
457
458 2018-11-30 Jan Kratochvil <jan.kratochvil@redhat.com>
459 Keith Seitz <keiths@redhat.com>
460 Tom Tromey <tom@tromey.com>
461 Sergio Durigan Junior <sergiodj@redhat.com>
462
463 https://bugzilla.redhat.com/show_bug.cgi?id=1613614
464 * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
465 'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
466 inside the CU.
467
468 2018-11-30 Pedro Alves <palves@redhat.com>
469
470 * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
471 <stratum>: New override.
472 * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
473 <stratum>: New override.
474 * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
475 <stratum>: New override.
476 * exec.c (exec_target) <exec_target>: Delete.
477 <stratum>: New override.
478 * gdbarch-selftests.c (register_to_value_test): Adjust to use the
479 stratum method instead of the to_stratum field.
480 * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
481 <stratum>: New override.
482 (thread_db_target::thread_db_target): Delete.
483 * make-target-delegates (print_class): Don't print a ctor
484 declaration. Print a stratum method override declaration.
485 * process-stratum-target.h (process_stratum_target)
486 <process_stratum_target>: Delete.
487 <stratum>: New override.
488 * ravenscar-thread.c (ravenscar_thread_target)
489 <ravenscar_thread_target>: Delete.
490 <stratum>: New override.
491 * record-btrace.c (record_btrace_target)
492 <record_btrace_target>: Delete.
493 <stratum>: New override.
494 * record-full.c (record_full_base_target)
495 <record_full_base_target>: Delete.
496 <stratum>: New override.
497 * record.c (record_disconnect, record_detach)
498 (record_mourn_inferior, record_kill): Adjust to use the stratum
499 method instead of the to_stratum field.
500 * regcache.c (cooked_read_test, cooked_write_test): Likewise.
501 * sol-thread.c (sol_thread_target)
502 <sol_thread_target>: Delete.
503 <stratum>: New override.
504 * spu-multiarch.c (spu_multiarch_target)
505 <spu_multiarch_target>: Delete.
506 <stratum>: New override.
507 * target-delegates.c: Regenerate.
508 * target.c (target_stack::push, target_stack::unpush)
509 (pop_all_targets_above, pop_all_targets_at_and_above)
510 (info_target_command, target_require_runnable)
511 (target_stack::find_beneath): Adjust to use the stratum method
512 instead of the to_stratum field.
513 (dummy_target::dummy_target): Delete.
514 (dummy_target::stratum): New.
515 (debug_target::debug_target): Delete.
516 (debug_target::stratum): New.
517 (maintenance_print_target_stack): Adjust to use the stratum method
518 instead of the to_stratum field.
519 * target.h (struct target_ops) <stratum>: New method.
520 <to_stratum>: Delete.
521 <is_pushed>: Adjust to use the stratum method
522 instead of the to_stratum field.
523
524 2018-11-30 Pedro Alves <palves@redhat.com>
525
526 * corelow.c (core_target) <has_all_memory, has_execution>: New
527 overrides.
528 * inf-child.c (inf_child_target::has_all_memory)
529 (inf_child_target::has_memory, inf_child_target::has_stack)
530 (inf_child_target::has_registers)
531 (inf_child_target::has_execution): Delete.
532 * inf-child.h (inf_child_target) <has_all_memory, has_memory,
533 has_stack, has_registers, has_execution>: Delete.
534 * process-stratum-target.c
535 (process_stratum_target::has_all_memory)
536 (process_stratum_target::has_memory)
537 (process_stratum_target::has_stack)
538 (process_stratum_target::has_registers)
539 (process_stratum_target::has_execution): New.
540 * process-stratum-target.h (process_stratum_target)
541 <has_all_memory, has_memory, has_stack, has_registers,
542 has_execution>: New method overrides.
543 * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
544 has_memory, has_stack, has_registers, has_execution>: Delete.
545 * remote-sim.c (gdbsim_target) <has_stack, has_registers,
546 has_execution>: Delete.
547 * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
548 has_registers, has_execution>: Delete.
549 * target.c (default_child_has_all_memory)
550 (default_child_has_memory, default_child_has_stack)
551 (default_child_has_registers, default_child_has_execution):
552 Delete.
553 * target.h (default_child_has_all_memory)
554 (default_child_has_memory, default_child_has_stack)
555 (default_child_has_registers, default_child_has_execution):
556 Delete.
557 * tracefile.h (tracefile_target) <has_execution>: New override.
558
559 2018-11-30 Pedro Alves <palves@redhat.com>
560
561 * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
562 * bsd-kvm.c: Include "process-stratum-target.h".
563 (bsd_kvm_target): Now inherits from process_stratum_target.
564 (bsd_kvm_target::bsd_kvm_target): Default it.
565 * corelow.c: Include "process-stratum-target.h".
566 (core_target): Now inherits from process_stratum_target.
567 (core_target::core_target): Don't set to_stratum here.
568 * inf-child.c (inf_child_target::inf_child_target): Delete.
569 * inf-child.h: Include "process-stratum-target.h".
570 (inf_child_target): Inherit from process_stratum_target.
571 (inf_child_target) <inf_child_target>: Default it.
572 <can_async_p, supports_non_stop, supports_disable_randomization>:
573 Delete overrides.
574 * process-stratum-target.c: New file.
575 * process-stratum-target.h: New file.
576 * remote-sim.c: Include "process-stratum-target.h".
577 (gdbsim_target): Inherit from process_stratum_target.
578 <gdbsim_target>: Default it.
579 * remote.c: Include "process-stratum-target.h".
580 (remote_target): Inherit from process_stratum_target.
581 <remote_target>: Default it.
582 * target.c (default_thread_address_space)
583 (default_thread_architecture): Delete.
584 * target.h (target_ops) <thread_architecture>: Now returns NULL by
585 default.
586 <thread_address_space>: Ditto.
587 * test-target.h: Include "process-stratum-target.h" instead of
588 "target.h".
589 (test_target_ops): Inherit from process_stratum_target.
590 <test_target_ops>: Default it.
591 * tracefile.c (tracefile_target::tracefile_target): Delete.
592 * tracefile.h: Include "process-stratum-target.h".
593 (tracefile_target): Inherit from process_stratum_target.
594 <tracefile_target>: Default it.
595 * target-delegates.c: Regenerate.
596
597 2018-11-30 Pedro Alves <palves@redhat.com>
598
599 * Makefile.in (COMMON_SFILES): Add test-target.c.
600 * gdbarch-selftests.c: Include "test-target.h".
601 * regcache.c: Include "test-target.h".
602 * target.c (test_target_info, test_target_ops::info): Move to ...
603 * test-target.c: ... this new file.
604 * target.h (test_target_ops): Move to ...
605 * test-target.h: ... this new file.
606
607 2018-11-29 Philippe Waroquiers <philippe.waroquiers@skynet.be>
608
609 * source.c (forward_search_command): Fix leak by using
610 xrealloc even for the first allocation in the loop, as buf
611 is static.
612
613 2018-11-29 Rajendra SY <rajendra.sy@gmail.com>
614
615 PR gdb/23093
616 * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
617 (fbsd_gdb_signal_to_target): New.
618 (fbsd_init_abi): Install gdbarch "signal_from_target" and
619 "signal_to_target" methods.
620
621 2018-11-29 Tom Tromey <tom@tromey.com>
622
623 * valarith.c (value_x_unop): Don't set argvec[3].
624
625 2018-11-26 Simon Marchi <simon.marchi@ericsson.com>
626
627 PR gdb/23917
628 * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
629 semicolon.
630
631 2018-11-26 Pedro Alves <palves@redhat.com>
632
633 * procfs.c (procfs_notice_thread): Replace uses of
634 in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
635 * sol-thread.c (sol_thread_target::wait)
636 (sol_update_thread_list_callback): Likewise.
637
638 2018-11-25 Tom Tromey <tom@tromey.com>
639
640 * ui-out.c (ui_out::field_fmt): Remove comment.
641 * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
642 * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
643
644 2018-11-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
645
646 * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
647 leak in open_source_file' has been partially undone by '2179fbc36d23
648 Return scoped_fd from open_source_file'. Re-add the transfer of
649 current s->fullname to the unique_xmalloc_ptr fullname given
650 to find_and_open_source.
651
652 2018-11-23 Pedro Alves <palves@redhat.com>
653
654 * gdbthread.h (enum thread_state): Move comments here.
655 (is_running, is_stopped, is_exited): Remove declarations.
656
657 2018-11-22 Pedro Alves <palves@redhat.com>
658
659 * Makefile.in (COMMON_SFILES): Add thread-iter.c.
660 * breakpoint.c (breakpoints_should_be_inserted_now): Replace
661 ALL_NON_EXITED_THREADS with all_non_exited_threads.
662 (print_one_breakpoint_location): Replace ALL_INFERIORS with
663 all_inferiors.
664 * bsd-kvm.c: Include inferior.h.
665 * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
666 with all_non_exited_threads.
667 * common/filtered-iterator.h: New.
668 * common/safe-iterator.h: New.
669 * corelow.c (core_target_open): Don't call init_thread_list here.
670 * darwin-nat.c (thread_info_from_private_thread_info): Replace
671 ALL_THREADS with all_threads.
672 * fbsd-nat.c (fbsd_nat_target::resume): Replace
673 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
674 * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
675 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
676 * fork-child.c (postfork_hook): Don't call init_thread_list here.
677 * gdbarch-selftests.c (register_to_value_test): Adjust.
678 * gdbthread.h: Don't include "inferior.h" here.
679 (struct inferior): Forward declare.
680 (enum step_over_calls_kind): Moved here from inferior.h.
681 (thread_info::deletable): Definition moved to thread.c.
682 (find_thread_ptid (inferior *, ptid_t)): Declare.
683 (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
684 Include "thread-iter.h".
685 (all_threads, all_non_exited_threads, all_threads_safe): New.
686 (any_thread_p): Declare.
687 (thread_list): Delete.
688 * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
689 all_non_exited_threads.
690 (proceed_after_attach_callback): Delete.
691 (proceed_after_attach): Take an inferior pointer instead of an
692 integer PID. Adjust to use range-for.
693 (attach_post_wait): Pass down inferior pointer instead of pid.
694 Use range-for instead of ALL_NON_EXITED_THREADS.
695 (detach_command): Remove init_thread_list call.
696 * inferior-iter.h: New.
697 * inferior.c (struct delete_thread_of_inferior_arg): Delete.
698 (delete_thread_of_inferior): Delete.
699 (delete_inferior, exit_inferior_1): Use range-for with
700 inf->threads_safe() instead of iterate_over_threads.
701 (inferior_appeared): Call init_thread_list here.
702 (discard_all_inferiors): Use all_non_exited_inferiors.
703 (find_inferior_id, find_inferior_pid): Use all_inferiors.
704 (iterate_over_inferiors): Use all_inferiors_safe.
705 (have_inferiors, number_of_live_inferiors): Use
706 all_non_exited_inferiors.
707 (number_of_inferiors): Use all_inferiors and std::distance.
708 (print_inferior): Use all_inferiors.
709 * inferior.h: Include gdbthread.h.
710 (enum step_over_calls_kind): Moved to gdbthread.h.
711 (struct inferior) <thread_list>: New field.
712 <threads, non_exited_threads, threads_safe>: New methods.
713 (ALL_INFERIORS): Delete.
714 Include "inferior-iter.h".
715 (ALL_NON_EXITED_INFERIORS): Delete.
716 (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
717 functions.
718 * inflow.c (child_interrupt, child_pass_ctrlc): Replace
719 ALL_NON_EXITED_THREADS with all_non_exited_threads.
720 * infrun.c (follow_exec): Use all_threads_safe.
721 (clear_proceed_status, proceed): Use all_non_exited_threads.
722 (init_wait_for_inferior): Don't clear inline frame state here.
723 (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
724 all_threads instead of ALL_NON_EXITED_THREADS.
725 (random_pending_event_thread): Use all_non_exited_threads instead
726 of ALL_NON_EXITED_THREADS. Use a lambda for repeated code.
727 (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
728 instead of ALL_NON_EXITED_THREADS.
729 (handle_no_resumed): Use all_non_exited_threads instead of
730 ALL_NON_EXITED_THREADS. Use all_inferiors instead of
731 ALL_INFERIORS.
732 (restart_threads, switch_back_to_stepped_thread): Use
733 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
734 * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
735 all_inferiors.
736 (kill_unfollowed_fork_children): Use inf->non_exited_threads
737 instead of ALL_NON_EXITED_THREADS.
738 * linux-tdep.c (linux_make_corefile_notes): Use
739 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
740 * linux-thread-db.c (thread_db_target::update_thread_list):
741 Replace ALL_INFERIORS with all_inferiors.
742 (thread_db_target::thread_handle_to_thread_info): Use
743 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
744 * mi/mi-interp.c (multiple_inferiors_p): New.
745 (mi_on_resume_1): Simplify using all_non_exited_threads and
746 multiple_inferiors_p.
747 * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
748 instead of ALL_NON_EXITED_THREADS.
749 * nto-procfs.c (nto_procfs_target::open): Don't call
750 init_thread_list here.
751 * record-btrace.c (record_btrace_target_open)
752 (record_btrace_target::stop_recording)
753 (record_btrace_target::close)
754 (record_btrace_target::record_is_replaying)
755 (record_btrace_target::resume, record_btrace_target::wait)
756 (record_btrace_target::record_stop_replaying): Use
757 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
758 * record-full.c (record_full_wait_1): Use all_non_exited_threads
759 instead of ALL_NON_EXITED_THREADS.
760 * regcache.c (cooked_read_test): Remove reference to global
761 thread_list.
762 * remote-sim.c (gdbsim_target::create_inferior): Don't call
763 init_thread_list here.
764 * remote.c (remote_target::update_thread_list): Use
765 all_threads_safe instead of ALL_NON_EXITED_THREADS.
766 (remote_target::process_initial_stop_replies): Replace
767 ALL_INFERIORS with all_non_exited_inferiors and use
768 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
769 (remote_target::open_1): Don't call init_thread_list here.
770 (remote_target::append_pending_thread_resumptions)
771 (remote_target::remote_resume_with_hc): Use all_non_exited_threads
772 instead of ALL_NON_EXITED_THREADS.
773 (remote_target::commit_resume)
774 (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
775 with all_non_exited_inferiors and use all_non_exited_threads
776 instead of ALL_NON_EXITED_THREADS.
777 (remote_target::kill_new_fork_children): Use
778 all_non_exited_threads instead of ALL_NON_EXITED_THREADS. Remove
779 init_thread_list and init_wait_for_inferior calls.
780 (remote_target::remote_btrace_maybe_reopen)
781 (remote_target::thread_handle_to_thread_info): Use
782 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
783 * target.c (target_terminal::restore_inferior)
784 (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
785 all_non_exited_inferiors.
786 * thread-iter.c: New file.
787 * thread-iter.h: New file.
788 * thread.c: Include "inline-frame.h".
789 (thread_list): Delete.
790 (clear_thread_inferior_resources): Call clear_inline_frame_state.
791 (init_thread_list): Use all_threads_safe instead of
792 ALL_THREADS_SAFE. Adjust to per-inferior thread lists.
793 (new_thread): Adjust to per-inferior thread lists.
794 (add_thread_silent): Pass inferior to find_thread_ptid.
795 (thread_info::deletable): New, moved from the header.
796 (delete_thread_1): Adjust to per-inferior thread lists.
797 (find_thread_global_id): Use inf->threads().
798 (find_thread_ptid): Use find_inferior_ptid and pass inferior to
799 find_thread_ptid.
800 (find_thread_ptid(inferior*, ptid_t)): New overload.
801 (iterate_over_threads): Use all_threads_safe.
802 (any_thread_p): New.
803 (thread_count): Use all_threads and std::distance.
804 (live_threads_count): Use all_non_exited_threads and
805 std::distance.
806 (valid_global_thread_id): Use all_threads.
807 (in_thread_list): Use find_thread_ptid.
808 (first_thread_of_inferior): Adjust to per-inferior thread lists.
809 (any_thread_of_inferior, any_live_thread_of_inferior): Use
810 inf->non_exited_threads().
811 (prune_threads, delete_exited_threads): Use all_threads_safe.
812 (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
813 (set_resumed, set_running): Use all_non_exited_threads.
814 (is_thread_state, is_stopped, is_exited, is_running)
815 (is_executing): Delete.
816 (set_executing, set_stop_requested, finish_thread_state): Use
817 all_non_exited_threads.
818 (print_thread_info_1): Use all_inferiors and all_threads.
819 (thread_apply_all_command): Use all_non_exited_threads.
820 (thread_find_command): Use all_threads.
821 (update_threads_executing): Use all_non_exited_threads.
822 * tid-parse.c (parse_thread_id): Use inf->threads.
823 * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
824
825 2018-11-22 Pedro Alves <palves@redhat.com>
826
827 * infrun.c (follow_exec) <set follow-exec new>: Add thread and
828 switch to it before calling into try_open_exec_file.
829
830 2018-11-22 Pedro Alves <palves@redhat.com>
831
832 * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
833 inferior_thread instead of find_thread_ptid, and only when
834 inferior_ptid is not null_ptid.
835 * inferior.c (add_inferior): Don't include target_pid_to_str
836 output when the inferior is not started.
837 * python/py-inferior.c (python_on_normal_stop): Don't use
838 find_thread_ptid.
839 (tui_on_user_selected_context_changed): Use inferior_thread
840 instead of find_thread_ptid, and only when inferior_ptid is not
841 null_ptid.
842
843 2018-11-21 Benno Fünfstück <benno.fuenfstueck@gmail.com>
844
845 PR python/23714
846 * gdb/python/python.c (execute_gdb_command): Call
847 prevent_dont_repeat earlier to avoid affecting dont_repeat.
848
849 2018-11-21 Andrew Burgess <andrew.burgess@embecosm.com>
850
851 * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
852 (HFILES_NO_SRCDIR): Add arch/riscv.h.
853 * arch/riscv.c: New file.
854 * arch/riscv.h: New file.
855 * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
856 this list, and add arch/riscv.o.
857 * features/Makefile: Add riscv features.
858 * features/riscv/32bit-cpu.c: New file.
859 * features/riscv/32bit-cpu.xml: New file.
860 * features/riscv/32bit-csr.c: New file.
861 * features/riscv/32bit-csr.xml: New file.
862 * features/riscv/32bit-fpu.c: New file.
863 * features/riscv/32bit-fpu.xml: New file.
864 * features/riscv/64bit-cpu.c: New file.
865 * features/riscv/64bit-cpu.xml: New file.
866 * features/riscv/64bit-csr.c: New file.
867 * features/riscv/64bit-csr.xml: New file.
868 * features/riscv/64bit-fpu.c: New file.
869 * features/riscv/64bit-fpu.xml: New file.
870 * features/riscv/rebuild-csr-xml.sh: New file.
871 * riscv-tdep.c: Add 'arch/riscv.h' include.
872 (riscv_gdb_reg_names): Delete.
873 (csr_reggroup): New global.
874 (struct riscv_register_alias): Delete.
875 (struct riscv_register_feature): New structure.
876 (riscv_register_aliases): Delete.
877 (riscv_xreg_feature): New global.
878 (riscv_freg_feature): New global.
879 (riscv_virtual_feature): New global.
880 (riscv_csr_feature): New global.
881 (riscv_create_csr_aliases): New function.
882 (riscv_read_misa_reg): Delete.
883 (riscv_has_feature): Delete.
884 (riscv_isa_xlen): Simplify, just return cached xlen.
885 (riscv_isa_flen): Simplify, just return cached flen.
886 (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
887 (riscv_register_name): Update to make use of tdesc_register_name.
888 Look up xreg and freg names in the new globals riscv_xreg_feature
889 and riscv_freg_feature. Don't supply csr aliases here.
890 (riscv_fpreg_q_type): Delete.
891 (riscv_register_type): Use tdesc_register_type in almost all
892 cases, override the returned type in a few specific cases only.
893 (riscv_print_one_register_info): Handle errors reading registers.
894 (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
895 registers that are otherwise unknown to GDB. Also check the
896 csr_reggroup.
897 (riscv_print_registers_info): Remove assert about upper register
898 number, and use gdbarch_register_reggroup_p instead of
899 short-cutting.
900 (riscv_find_default_target_description): New function.
901 (riscv_check_tdesc_feature): New function.
902 (riscv_add_reggroups): New function.
903 (riscv_setup_register_aliases): New function.
904 (riscv_init_reggroups): New function.
905 (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
906 setup register groups. Register new riscv debug variable.
907 * riscv-tdep.h: Add 'arch/riscv.h' include.
908 (struct gdbarch_tdep): Remove abi union, and add
909 riscv_gdbarch_features field. Remove cached quad floating point
910 type, and provide initialisation for double type field.
911 * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
912 the list of targets using the feature based target descriptions.
913 * NEWS: Mention target description support.
914
915 2018-11-21 Pedro Alves <palves@redhat.com>
916
917 * valops.c (find_method_list, value_find_oload_method_list)
918 (find_overload_match, find_oload_champ): Rename parameters and
919 locals.
920
921 2018-11-21 Pedro Alves <palves@redhat.com>
922
923 * valops.c (find_method_list): Replace pointer and length
924 parameters with an gdb::array_view. Adjust.
925 (value_find_oload_method_list): Likewise.
926 (find_overload_match): Use gdb::array_view for methods list.
927 Adjust to find_oload_champ interface change.
928 (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
929 'num_fns' parameter now a size_t. Eliminate 'fn_count' local.
930
931 2018-11-21 Pedro Alves <palves@redhat.com>
932
933 * gdbtypes.c (compare_badness): Change type of parameters to const
934 reference. Adjust to badness_vector being a std::vector now.
935 (rank_function): Adjust to badness_vector being a std::vector now.
936 * gdbtypes.h (badness_vector): Now a typedef to std::vector.
937 (LENGTH_MATCH): Delete.
938 (compare_badness): Change type of parameters to const reference.
939 (rank_function): Return a badness_vector by value now.
940 (find_overload_match): Adjust to badness_vector being a
941 std::vector now. Remove cleanups.
942 (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
943 badness_vector pointer.
944 (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
945 a badness_vector pointer. Adjust to badness_vector being a
946 std::vector now. Remove cleanups.
947 (find_oload_champ): 'oload_champ_bv' parameter now
948 a badness_vector pointer. Adjust to badness_vector being a
949 std::vector now. Remove cleanups.
950
951 2018-11-21 Pedro Alves <palves@redhat.com>
952
953 * cp-support.c (sym_return_val_size, sym_return_val_index)
954 (sym_return_val): Delete.
955 (overload_list_add_symbol): Add std::vector parameter. Adjust to
956 add to the vector.
957 (make_symbol_overload_list): Adjust to return a std::vector
958 instead of maintaining a global open coded vector.
959 (make_symbol_overload_list_block): Add std::vector parameter.
960 (make_symbol_overload_list_block): Rename to ...
961 (add_symbol_overload_list_block): ... this and add std::vector
962 parameter.
963 (make_symbol_overload_list_namespace): Rename to ...
964 (add_symbol_overload_list_namespace): ... this and add std::vector
965 parameter.
966 (make_symbol_overload_list_adl_namespace): Rename to ...
967 (add_symbol_overload_list_adl_namespace): ... this and add
968 std::vector parameter.
969 (make_symbol_overload_list_adl): Delete.
970 (add_symbol_overload_list_adl): New.
971 (make_symbol_overload_list_using): Rename to ...
972 (add_symbol_overload_list_using): ... this and add std::vector
973 parameter.
974 (make_symbol_overload_list_qualified): Rename to ...
975 (add_symbol_overload_list_qualified): ... this and add std::vector
976 parameter.
977 * cp-support.h: Include "common/array-view.h" and <vector>.
978 (make_symbol_overload_list): Change return type to std::vector.
979 (make_symbol_overload_list_adl): Delete declaration.
980 (add_symbol_overload_list_adl): New declaration.
981 * valops.c (find_overload_match): Local 'oload_syms' now a
982 std::vector.
983 (find_oload_champ_namespace): 'oload_syms' parameter now a
984 std::vector pointer.
985 (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
986 std::vector pointer. Adjust to new make_symbol_overload_list
987 interface.
988
989 2018-11-21 Pedro Alves <palves@redhat.com>
990
991 * common/array-view.h (array_view::splice(size_type, size_t)): New.
992 (array_view::splice(size_type)): New.
993 * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
994 * extension.c (xmethod_worker::get_arg_types): Adjust to return an
995 std::vector.
996 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
997 * extension.h: Include "common/array-view.h".
998 (xmethod_worker::invoke): Adjust to use gdb::array_view.
999 (xmethod_worker::get_arg_types): Adjust to return an std::vector.
1000 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
1001 (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
1002 (xmethod_worker::do_get_result_type): Adjust to use
1003 gdb::array_view.
1004 * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
1005 * gdbtypes.h: Include "common/array-view.h".
1006 (rank_function): Adjust to use gdb::array_view.
1007 * python/py-xmethods.c (python_xmethod_worker::invoke)
1008 (python_xmethod_worker::do_get_arg_types)
1009 (python_xmethod_worker::do_get_result_type)
1010 (python_xmethod_worker::invoke): Adjust to new interfaces.
1011 * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
1012 (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
1013 * valops.c (find_overload_match, find_oload_champ_namespace)
1014 (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
1015 gdb:array_view and the new xmethod_worker interfaces.
1016 * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
1017 gdb::array_view.
1018 * value.h (find_overload_match, result_type_of_xmethod)
1019 (call_xmethod): Adjust to use gdb::array_view.
1020 * unittests/array-view-selftests.c: Add slicing tests.
1021
1022 2018-11-21 Pedro Alves <palves@redhat.com>
1023
1024 * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
1025 * common/array-view.h (make_array_view): New.
1026 * compile/compile-object-run.c (compile_object_run): Adjust to
1027 pass an array_view.
1028 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
1029 * eval.c (eval_call): Adjust to pass an array_view.
1030 (evaluate_subexp_standard): Adjust to pass an array_view.
1031 * gcore.c (call_target_sbrk): Adjust to pass an array_view.
1032 * guile/scm-value.c (gdbscm_value_call): Likewise.
1033 * infcall.c (push_dummy_code): Replace pointer + size parameters
1034 with an array_view parameter.
1035 (call_function_by_hand, call_function_by_hand_dummy): Likewise and
1036 adjust.
1037 * infcall.h: Include "common/array-view.h".
1038 (call_function_by_hand, call_function_by_hand_dummy): Replace
1039 pointer + size parameters with an array_view parameter.
1040 * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
1041 * linux-tdep.c (linux_infcall_mmap): Likewise.
1042 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1043 (value_nsstring, print_object_command): Likewise.
1044 * python/py-value.c (valpy_call): Likewise.
1045 * rust-lang.c (rust_evaluate_funcall): Likewise.
1046 * spu-tdep.c (flush_ea_cache): Likewise.
1047 * valarith.c (value_x_binop, value_x_unop): Likewise.
1048 * valops.c (value_allocate_space_in_inferior): Likewise.
1049 * unittests/array-view-selftests.c (run_tests): Add
1050 gdb::make_array_view test.
1051
1052 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
1053
1054 * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
1055 than a fixed size buffer.
1056
1057 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
1058
1059 * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
1060 and remove insertion of extra spaces in GDB's output.
1061 * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
1062 Layout field into a temporary buffer, and then output it as a
1063 string field.
1064
1065 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1066
1067 * NEWS: Document the language choice done by
1068 'info [types|functions|variables]|rbreak'.
1069
1070 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1071
1072 * symtab.c (treg_matches_sym_type_name): Use
1073 scoped_switch_to_sym_language_if_auto instead of local logic.
1074 (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
1075 to switch to SYM language when language mode is auto.
1076
1077 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1078
1079 * language.h (scoped_switch_to_sym_language_if_auto): New class.
1080
1081 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1082
1083 * symtab.c (search_symbols): Properly check absence of type regexp
1084 before entering the loop scanning the minimal symbols.
1085
1086 2018-11-20 John Darrington <john@darrington.wattle.id.au>
1087
1088 * s12z-tdep.c (s12z_extract_return_value): New function.
1089 (inv_reg_perm) New array.
1090 (s12z_return_value): Populate readbuf if non-null.
1091
1092 2018-11-20 Eli Zaretskii <eliz@gnu.org>
1093
1094 * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
1095 with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
1096 to MinGW fixed by Gnulib.
1097 (O_NOINHERIT): Define if not defined.
1098
1099 2018-11-19 John Darrington <john@darrington.wattle.id.au>
1100
1101 * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1102
1103 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
1104
1105 * infrun.c (displaced_step_inferior_state) <next>: Remove.
1106
1107 2018-11-19 Tom Tromey <tom@tromey.com>
1108
1109 * source.c (get_filename_and_charpos): Return void.
1110
1111 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
1112
1113 * skip.c (_initialize_step_skip): Fix "info skip" help.
1114
1115 2018-11-16 Tom Tromey <tom@tromey.com>
1116
1117 PR rust/23625:
1118 * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1119
1120 2018-11-19 Simon Marchi <simon.marchi@ericsson.com>
1121
1122 * infrun.c (displaced_step_inferior_states): Change type to
1123 std::forward_list.
1124 (get_displaced_stepping_state): Adjust.
1125 (displaced_step_in_progress_any_inferior): Adjust.
1126 (add_displaced_stepping_state): Adjust.
1127 (remove_displaced_stepping_state): Adjust.
1128
1129 2018-11-18 Tom Tromey <tom@tromey.com>
1130
1131 PR build/23814:
1132 * target-delegates.c: Rebuild.
1133 * ia64-linux-nat.c (class ia64_linux_nat_target)
1134 <have_steppable_watchpoint>: Use override. Return true, not 1.
1135 (ia64_linux_nat_target::can_use_hw_breakpoint): Rename. Remove
1136 "self" argument.
1137 (ia64_linux_nat_target::low_new_thread): Rename.
1138 (class ia64_linux_nat_target) <read_description>: Don't declare.
1139 * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1140 bool.
1141
1142 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1143
1144 PR gdb/22736:
1145 * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1146 lang_struct_return code.
1147
1148 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1149
1150 * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1151 return_method.
1152 * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1153 * amd64-tdep.c (amd64_push_arguments): Likewise.
1154 (amd64_push_dummy_call): Likewise.
1155 * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1156 * arc-tdep.c (arc_push_dummy_call): Likewise.
1157 * arm-tdep.c (arm_push_dummy_call): Likewise.
1158 * avr-tdep.c (avr_push_dummy_call): Likewise.
1159 * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1160 * cris-tdep.c (cris_push_dummy_call): Likewise.
1161 * csky-tdep.c (csky_push_dummy_call): Likewise.
1162 * frv-tdep.c (frv_push_dummy_call): Likewise.
1163 * gdbarch.c: Regenerate.
1164 * gdbarch.h: Regenerate.
1165 * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1166 return_method.
1167 * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1168 * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1169 (hppa64_push_dummy_call): Likewise.
1170 * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1171 * i386-tdep.c (i386_push_dummy_call): Likewise.
1172 * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1173 * infcall.c (call_function_by_hand_dummy): Likewise.
1174 * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1175 * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1176 * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1177 * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1178 * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1179 * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1180 * mep-tdep.c (mep_push_dummy_call): Likewise.
1181 * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1182 (mips_n32n64_push_dummy_call): Likewise.
1183 (mips_o32_push_dummy_call): Likewise.
1184 (mips_o64_push_dummy_call): Likewise.
1185 * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1186 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1187 * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1188 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1189 * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1190 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1191 (ppc64_sysv_abi_push_dummy_call): Likewise.
1192 * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1193 (ppc64_sysv_abi_push_dummy_call): Likewise.
1194 * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1195 * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1196 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1197 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1198 * rx-tdep.c (rx_push_dummy_call): Likewise.
1199 * s390-tdep.c (s390_push_dummy_call): Likewise.
1200 * score-tdep.c (score_push_dummy_call): Likewise.
1201 * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1202 (sh_push_dummy_call_nofpu): Likewise.
1203 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1204 (sparc32_push_dummy_call): Likewise.
1205 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1206 (sparc64_push_dummy_call): Likewise.
1207 * spu-tdep.c (spu_push_dummy_call): Likewise.
1208 * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1209 * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1210 * v850-tdep.c (v850_push_dummy_call): Likewise.
1211 * vax-tdep.c (vax_push_dummy_call): Likewise.
1212 * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1213 * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1214
1215 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1216
1217 * gdbarch.sh (enum function_call_return_method): Add enum.
1218 * gdbarch.h: Regenerate.
1219 * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1220
1221 2018-11-15 Joel Brobecker <brobecker@adacore.com>
1222
1223 * unittests/copy_bitwise-selftests.c: New file.
1224 * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1225 (selftests::copy_bitwise_tests): Delete, moving this code to
1226 unittests/copy_bitwise-selftests.c instead.
1227 (_initialize_utils): Do not register copy_bitwise tests.
1228 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1229 unittests/copy_bitwise-selftests.c.
1230
1231 2018-11-14 Joel Brobecker <brobecker@adacore.com>
1232
1233 * ada-lang.c (move_bits): Delete. Update all callers to use
1234 copy_bitwise instead.
1235 * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1236 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1237 Move from here to utils.c.
1238 (_initialize_dwarf2loc): Remove call to register copy_bitwise
1239 selftests.
1240 * utils.h (copy_bitwise): Add declaration.
1241 * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1242 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1243 Moved here from dwarf2loc.c.
1244 (_initialize_utils): Register copy_bitwise selftests.
1245
1246 2018-11-14 Jim Wilson <jimw@sifive.com>
1247
1248 * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1249 (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1250 then increment next_regnum if odd.
1251 (riscv_arg_location): New arg is_unnamed. Set ainfo->is_unnamed.
1252 (riscv_push_dummy_call): New local ftype. Call check_typedef to set
1253 function type. Pass new arg to riscv_arg_location based on function
1254 type.
1255 (riscv_return_value): Pass new arg to riscv_arg_location.
1256
1257 * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1258 (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1259 of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1260
1261 * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1262 setting len. New local align, set to max of arg align and xlen,
1263 and pass to first riscv_assign_stack_location call.
1264
1265 2018-11-12 Simon Marchi <simon.marchi@polymtl.ca>
1266
1267 * skip.c (complete_skip_number): New function.
1268 (_initialize_step_skip): Add completers to some skip commands.
1269
1270 2018-11-09 Tom Tromey <tom@tromey.com>
1271
1272 * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1273 (struct remote_g_packet_data): Derive from allocate_on_obstack.
1274 <guesses>: Now a std::vector.
1275 (remote_g_packet_data_init, register_remote_g_packet_guess):
1276 Update.
1277 (remote_read_description_p): Update. Return bool.
1278 (remote_target::read_description): Update.
1279 (struct remote_g_packet_guess): Add constructor.
1280
1281 2018-11-09 Tom Tromey <tom@tromey.com>
1282
1283 * common/scoped_fd.h (class scoped_fd): Add move constructor and
1284 move assignment operator.
1285 * psymtab.c (psymtab_to_fullname): Update.
1286 * source.h (open_source_file): Return scoped_fd.
1287 (find_and_open_source): Likewise.
1288 * source.c (open_source_file): Return scoped_fd.
1289 (get_filename_and_charpos): Update.
1290 (print_source_lines_base): Update. Use scoped_fd::to_file.
1291 (forward_search_command): Likewise.
1292 (reverse_search_command): Likewise.
1293 (find_and_open_source): Return scoped_fd.
1294 * tui/tui-source.c (tui_set_source_content): Update. Use
1295 gdb_file_up.
1296
1297 2018-11-09 John Baldwin <jhb@FreeBSD.org>
1298
1299 * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1300 overflow.
1301
1302 2018-11-09 Hafiz Abid Qadeer <abidh@codesourcery.com>
1303
1304 * configure: Regenerate.
1305
1306 2018-11-09 Tom de Vries <tdevries@suse.de>
1307
1308 * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1309 unconditionally, to set the language of the symbol. Manage freeing
1310 returned pointer using gdb::unique_xmalloc_ptr.
1311
1312 2018-11-08 Tom Tromey <tom@tromey.com>
1313
1314 * record.c (require_record_target): Upper-case "<TAB>".
1315
1316 2018-11-08 Tom Tromey <tom@tromey.com>
1317
1318 * python/lib/gdb/command/pretty_printers.py
1319 (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1320
1321 2018-11-08 Tom Tromey <tom@tromey.com>
1322
1323 PR gdb/23555:
1324 PR gdb/23838:
1325 * target.h (target_supports_terminal_ours): Return bool.
1326 * target.c (target_supports_terminal_ours): Handle case where
1327 current_top_target returns nullptr. Return bool.
1328
1329 2018-11-08 Joel Brobecker <brobecker@adacore.com>
1330
1331 * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1332 return the correct count for potential HFAs.
1333
1334 2018-11-08 Jan Beulich <jbeulich@suse.com>
1335
1336 * i387-tdep.c (i387_supply_xsave): Split handling of
1337 X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1338 (i387_collect_xsave): Likewise.
1339
1340 2018-11-08 Andrew Burgess <andrew.burgess@embecosm.com>
1341
1342 * riscv-tdep.c (riscv_insn::decode): Update header comment.
1343 (riscv_frame_this_id): Catch errors thrown while building the
1344 frame cache, leave the frame id as the default, which is the outer
1345 frame id.
1346
1347 2018-11-07 Joel Brobecker <brobecker@adacore.com>
1348
1349 * ada-lang.c (read_atcb): Only set task_info->called_task if
1350 task_info->state == Entry_Caller_Sleep.
1351 (print_ada_task_info): Do not check task_info->state before
1352 checking task_info->called_task.
1353 (info_task): Likewise.
1354
1355 2018-11-07 Joel Brobecker <brobecker@adacore.com>
1356
1357 * ada-tasks.c (read_atcb): Clear task_info before computing
1358 the value of each of its fields.
1359
1360 2018-11-07 Andrew Burgess <andrew.burgess@embecosm.com>
1361
1362 * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1363 NULL before dereferencing it.
1364
1365 2018-11-06 Tom de Vries <tdevries@suse.de>
1366
1367 * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1368 program headers.
1369
1370 2018-11-06 Max Filippov <jcmvbkbc@gmail.com>
1371
1372 * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1373 so that it applies to uclinux as well.
1374
1375 2018-11-06 Marius Muench <marius.muench@eurecom.fr>
1376
1377 * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1378 when on AAPCS.
1379
1380 2018-11-06 John Baldwin <jhb@FreeBSD.org>
1381
1382 * riscv-fbsd-nat.c (getregs_supplies): Return true for
1383 RISCV_CSR_SSTATUS_REGNUM.
1384
1385 2018-11-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1386
1387 * source.c (open_source_file): Fix leak by transferring the
1388 current s->fullname to the unique_xmalloc_ptr fullname given
1389 to find_and_open_source.
1390
1391 2018-11-04 Tom Tromey <tom@tromey.com>
1392
1393 * varobj.c (install_default_visualizer): Update.
1394 * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1395 Return gdbpy_ref.
1396 * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1397 (find_pretty_printer_from_progspace)
1398 (find_pretty_printer_from_gdb, find_pretty_printer)
1399 (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1400 (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1401 Update.
1402
1403 2018-11-04 Tom Tromey <tom@tromey.com>
1404
1405 * python/python.c (gdbpy_parameter_value): Update.
1406 * python/python-internal.h (python_string_to_unicode)
1407 (python_string_to_target_python_string)
1408 (host_string_to_python_string): Return gdbpy_ref.
1409 * python/py-utils.c (python_string_to_unicode)
1410 (unicode_to_encoded_python_string)
1411 (unicode_to_target_python_string)
1412 (python_string_to_target_string)
1413 (python_string_to_target_python_string): Return gdbpy_ref.
1414 (python_string_to_host_string): Update.
1415 (host_string_to_python_string): Return gdbpy_ref.
1416 * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1417 (stpy_fullname): Update.
1418 * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1419 Update.
1420 * python/py-prettyprint.c (print_string_repr): Update.
1421 * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1422 (objfpy_get_build_id): Update.
1423 * python/py-breakpoint.c (bppy_get_location)
1424 (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1425 Update.
1426
1427 2018-11-04 Tom Tromey <tom@tromey.com>
1428
1429 * python/python-internal.h (gdb_py_object_from_longest)
1430 (gdb_py_object_from_ulongest): Return gdbpy_ref.
1431 * python/py-value.c (valpy_int): Update.
1432 * python/py-utils.c (gdb_py_object_from_longest): Return
1433 gdbpy_ref.
1434 (gdb_py_object_from_ulongest): Likewise.
1435 * python/py-type.c (typy_get_alignof): Update.
1436 * python/py-linetable.c (ltpy_get_all_source_lines)
1437 (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1438 * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1439
1440 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1441
1442 * ada-lang.c (_initialize_ada_language): Fix typo.
1443
1444 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1445
1446 * language.c (type): Remove.
1447 (_initialize_language): Remove assignment to type.
1448
1449 2018-11-02 Joel Brobecker <brobecker@adacore.com>
1450
1451 * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1452 * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1453 (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1454 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1455 (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1456 (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1457 * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1458 and aarch64-ravenscar-thread.o.
1459 * NEWS: Add entry documenting Ravenscar tasking support
1460 on AArch64 ELF.
1461
1462 2018-11-02 Matthew Malcomson <matthew.malcomson@arm.com>
1463
1464 * symtab.c (info_functions_command): Initialize quiet flag.
1465 * stack.c (info_args_command): Likewise.
1466
1467 2018-11-01 Jim Wilson <jimw@sifive.com>
1468
1469 * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1470 Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
1471 debugging messages.
1472
1473 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1474
1475 * ada-lang.c (ada_watch_location_expression): New function.
1476 (ada_language_defn): Set la_watch_location_expression to
1477 ada_watch_location_expression.
1478
1479 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1480
1481 * print-utils.c (int_string): Remove unnecessary trailing spaces.
1482
1483 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1484
1485 * rs6000-tdep.c (skip_prologue): Fix potential negative left
1486 shifting.
1487
1488 2018-11-01 Jerome Guitton <guitton@adacore.com>
1489 Joel Brobecker <brobecker@adacore.com>
1490
1491 * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1492 * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1493 * arm-pikeos-tdep.c: New file.
1494 * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1495 embedded system.
1496 * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1497
1498 2018-11-01 Simon Marchi <simon.marchi@ericsson.com>
1499
1500 * common/pathstuff.c (get_standard_temp_dir): New.
1501 * common/pathstuff.h (get_standard_temp_dir): New.
1502 * config.in: Re-generate.
1503 * configure: Re-generate.
1504 * configure.ac: Don't check for mkdtemp.
1505 * gnulib/aclocal-m4-deps.mk: Re-generate.
1506 * gnulib/aclocal.m4: Re-generate.
1507 * gnulib/config.in: Re-generate.
1508 * gnulib/configure: Re-generate.
1509 * gnulib/import/Makefile.am: Re-generate.
1510 * gnulib/import/Makefile.in: Re-generate.
1511 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1512 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1513 * gnulib/import/m4/mkdtemp.m4: New file.
1514 * gnulib/import/mkdtemp.c: New file.
1515 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1516 Add mkdtemp module.
1517 * unittests/mkdir-recursive-selftests.c (test): Use
1518 get_standard_temp_dir.
1519 (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1520 ifdef.
1521 * compile/compile.c (get_compile_file_tempdir): Likewise.
1522
1523 2018-11-01 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1524
1525 * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1526 (SIG_FRAME_LR_OFFSET64): New define.
1527 (SIG_FRAME_FP_OFFSET64): New define.
1528 (aix_sighandle_frame_cache): New Function.
1529 (aix_sighandle_frame_this_id): New Function.
1530 (aix_sighandle_frame_prev_register): New Function.
1531 (aix_sighandle_frame_sniffer): New Function.
1532 (aix_sighandle_frame_unwind): New global variable.
1533 (rs6000_aix_init_osabi): Install new frame unwinder.
1534
1535 2018-10-31 Sergio Durigan Junior <sergiodj@redhat.com>
1536
1537 PR gdb/23835
1538 * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1539 already defined.
1540
1541 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1542
1543 * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1544
1545 2018-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
1546
1547 * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1548 (producer_is_icc): New function.
1549 (check_producer): Set producer_is_icc field on dwarf2_cu.
1550 (dwarf2_init_integer_type): New function.
1551 (read_base_type): Call dwarf2_init_integer_type instead of
1552 init_integer_type in all cases.
1553 (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1554 * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1555 LEN is greater than 0.
1556
1557 2018-10-30 Tom Tromey <tom@tromey.com>
1558
1559 * main.c (captured_main_1): Check return value of bfd_init.
1560
1561 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
1562
1563 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1564 Adjust comments.
1565
1566 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1567
1568 * procfs.c: Include common/pathstuff.h.
1569
1570 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
1571
1572 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1573 Add missing braces. No functional change.
1574
1575 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1576
1577 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1578 to report a bad option and fix indentation.
1579 * demangle.c (demangle_command): Use report_unrecognized_option_error
1580 to report a bad option and correctly report the bad option.
1581
1582 2018-10-27 Tom Tromey <tom@tromey.com>
1583
1584 PR cli/23364:
1585 * darwin-nat.c (copied_shell): New global.
1586 (may_have_sip): Rename from should_disable_startup_with_shell.
1587 (copy_shell_to_cache, maybe_cache_shell): New functions.
1588 (darwin_nat_target::create_inferior): Update. Use
1589 copied_shell.
1590
1591 2018-10-27 Tom Tromey <tom@tromey.com>
1592
1593 * unittests/scoped_fd-selftests.c (test_to_file): New function.
1594 (run_tests): Call test_to_file.
1595 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1596 temporary files.
1597 * common/scoped_fd.h (scoped_fd::to_file): New method.
1598
1599 2018-10-27 Tom Tromey <tom@tromey.com>
1600
1601 * unittests/scoped_mmap-selftests.c (test_normal): Use
1602 gdb_mkostemp_cloexec.
1603 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1604 Use gdb_mkostemp_cloexec.
1605 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1606 gnulib/config.in, gnulib/configure,
1607 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1608 gnulib/import/m4/gnulib-cache.m4,
1609 gnulib/import/m4/gnulib-comp.m4: Update.
1610 * gnulib/import/m4/mkostemp.m4: New file.
1611 * gnulib/import/m4/mkstemp.m4: Remove.
1612 * gnulib/import/mkostemp.c: New file.
1613 * gnulib/import/mkstemp.m4: Remove.
1614 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1615 mkstemp, add mkostemp. Apply new patch.
1616 * gnulib/import/stdlib.in.h: Apply patch.
1617 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1618 New file.
1619 * dwarf-index-write.c (write_psymtabs_to_index): Use
1620 gdb_mkostemp_cloexec.
1621 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1622
1623 2018-10-27 Tom Tromey <tom@tromey.com>
1624
1625 * unittests/mkdir-recursive-selftests.c: New file.
1626 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1627 unittests/mkdir-recursive-selftests.c.
1628 * dwarf-index-cache.c (mkdir_recursive): Move to
1629 common/filestuff.c.
1630 (index_cache::store): Check return value of mkdir_recursive.
1631 (create_dir_and_check, test_mkdir_recursive): Move to new file.
1632 (_initialize_index_cache): Don't register test.
1633 * common/filestuff.h (mkdir_recursive): Declare.
1634 * common/filestuff.c (mkdir_recursive): Move from
1635 dwarf-index-cache.c. Return bool.
1636
1637 2018-10-27 Tom Tromey <tom@tromey.com>
1638
1639 * dwarf-index-write.c (write_psymtabs_to_index): Move
1640 make_temp_filename to common/pathstuff.c.
1641 * common/pathstuff.h (make_temp_filename): Declare.
1642 * common/pathstuff.c (make_temp_filename): New function, moved
1643 from dwarf-index-write.c.
1644
1645 2018-10-27 Tom Tromey <tom@tromey.com>
1646
1647 * procfs.c (procfs_target::create_inferior): Use get_shell.
1648 * cli/cli-cmds.c (shell_escape): Use get_shell.
1649 * windows-nat.c (windows_nat_target::create_inferior): Use
1650 get_shell.
1651 * common/pathstuff.c (get_shell): New function.
1652 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1653 (fork_inferior): Use get_shell.
1654 * common/pathstuff.h (get_shell): Declare.
1655
1656 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1657
1658 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1659
1660 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1661
1662 * stack.c (print_variable_and_value_data): Add preg and treg.
1663 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1664 and update callers.
1665 (print_frame_arg_vars): Likewise.
1666 (prepare_reg): New function.
1667 (info_locals_command): Extract info print args and use them.
1668 (info_args_command): Likewise.
1669 (_initialize_stack): Modify on-line help.
1670 * symtab.c (treg_matches_sym_type_name): New function.
1671 (search_symbols): New arg t_regexp.
1672 (symtab_symbol_info): New args quiet, regexp, t_regexp.
1673 (info_variables_command): Extract info print args and use them.
1674 (info_functions_command): Likewise.
1675 (info_types_command): Update call to symtab_symbol_info.
1676 (_initialize_symtab): Modify on-line help.
1677 * symtab.h (treg_matches_sym_type_name): New function.
1678 (search_symbols): New t_regexp arg.
1679
1680 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1681
1682 * cli-utils.c (extract_arg_maybe_quoted): New function.
1683 (extract_info_print_args): New function.
1684 (info_print_args_help): New function.
1685 (report_unrecognized_option_error): New function.
1686 * cli-utils.h (extract_arg_maybe_quoted): New function.
1687 (extract_info_print_args): New function.
1688 (info_print_args_help): New function.
1689 (report_unrecognized_option_error): New function.
1690
1691 2018-10-26 Tom Tromey <tom@tromey.com>
1692
1693 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1694 (compute_compunit_symtab_includes): Update.
1695 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
1696 (compunit_symtab_ptr): Likewise.
1697
1698 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1699
1700 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1701 default_print_auxv_entry for specific tag values.
1702
1703 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1704
1705 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1706
1707 2018-10-26 Jim Wilson <jimw@sifive.com>
1708
1709 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1710 (riscv_linux_sigframe_init): Declare.
1711 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1712 (riscv_linux_sigframe): New.
1713 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1714 (riscv_linux_sigframe_init): Define.
1715 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1716
1717 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1718 (riscv_isa_flen): Likewise. Drop static.
1719 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1720 (riscv_isa_flen): Likewise. Declare.
1721
1722 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1723 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1724
1725 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1726 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1727 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1728 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1729 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1730 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1731 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1732 Define.
1733 (struct ppc_linux_features) <htm>: New field.
1734 (ppc_linux_no_features): Add initializer for htm field.
1735 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1736 new tdescs.
1737 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1738 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1739 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1740 Define if not already defined.
1741 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1742 and rs6000/powerpc-isa207-htm-vsx64l.
1743 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1744 rs6000/powerpc-isa207-htm-vsx64l.xml.
1745 * features/rs6000/power-htm-spr.xml: New file.
1746 * features/rs6000/power-htm-core.xml: New file.
1747 * features/rs6000/power64-htm-core.xml: New file.
1748 * features/rs6000/power-htm-fpu.xml: New file.
1749 * features/rs6000/power-htm-altivec.xml: New file.
1750 * features/rs6000/power-htm-vsx.xml: New file.
1751 * features/rs6000/power-htm-ppr.xml: New file.
1752 * features/rs6000/power-htm-dscr.xml: New file.
1753 * features/rs6000/power-htm-tar.xml: New file.
1754 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1755 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1756 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1757 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1758 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1759 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1760 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1761 fetch_regset with HTM regsets.
1762 (store_register, store_ppc_registers): Call store_regset with HTM
1763 regsets.
1764 (ppc_linux_nat_target::read_description): Set htm field in the
1765 features struct if needed.
1766 * ppc-linux-tdep.c: Include
1767 features/rs6000/powerpc-isa207-htm-vsx32l.c and
1768 features/rs6000/powerpc-isa207-htm-vsx64l.c.
1769 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1770 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1771 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1772 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1773 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1774 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1775 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1776 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1777 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1778 (ppc32_linux_ctarregset): New globals.
1779 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1780 (ppc_linux_collect_core_cpgrregset): New function.
1781 (ppc_linux_iterate_over_regset_sections): Call back with the htm
1782 regsets.
1783 (ppc_linux_core_read_description): Check if the tm spr section is
1784 present and set htm in the features struct.
1785 (_initialize_ppc_linux_tdep): Call
1786 initialize_tdesc_powerpc_isa207_htm_vsx32l and
1787 initialize_tdesc_powerpc_isa207_htm_vsx64l.
1788 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1789 Declare.
1790 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1791 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1792 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1793 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1794 New fields.
1795 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1796 Likewise.
1797 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1798 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1799 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1800 New enum fields.
1801 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1802 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1803 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1804 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1805 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1806 <PPC_CTAR_REGNUM>: Likewise.
1807 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1808 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1809 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1810 (IS_CEFP_PSEUDOREG): Define.
1811 (rs6000_register_name): Hide the upper halves of checkpointed VSX
1812 registers. Return names for the checkpointed DFP, VSX, and EFP
1813 pseudo registers.
1814 (rs6000_pseudo_register_type): Remove initial assert and raise an
1815 internal error in the else clause instead. Return types for the
1816 checkpointed DFP, VSX, and EFP pseudo registers.
1817 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1818 checkpointed DFP pseudo registers.
1819 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1820 checkpointed VSX pseudo registers.
1821 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1822 from efpr_pseudo_register_read and
1823 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
1824 registers.
1825 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1826 Handle checkpointed DFP, VSX, and EFP registers.
1827 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1828 (efp_ax_pseudo_register_collect): New functions.
1829 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1830 register logic to new functions. Handle checkpointed DFP, VSX,
1831 and EFP pseudo registers.
1832 (rs6000_gdbarch_init): Look for and validate the htm features.
1833 Include checkpointed DFP, VSX and EFP pseudo-registers.
1834 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1835 HTM registers.
1836
1837 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1838
1839 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1840 without altivec or fpu.
1841
1842 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1843 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1844
1845 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1846 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1847 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1848 Define if not already defined.
1849 * features/rs6000/power-ebb.xml: New file.
1850 * features/rs6000/power-linux-pmu.xml: New file.
1851 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1852 features.
1853 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1854 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1855 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1856 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1857 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1858 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1859 fetch_regset with ebb and pmu regsets.
1860 (store_register, store_ppc_registers): Call store_regset with ebb
1861 and pmu regsets.
1862 (ppc_linux_nat_target::read_description): Set isa207 field in the
1863 features struct if ebb and pmu are avaiable.
1864 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1865 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1866 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1867 and pmu regsets.
1868 (ppc_linux_core_read_description): Check if the pmu section is
1869 present and set isa207 in the features struct.
1870 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1871 (ppc32_linux_pmuregset): Declare.
1872 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1873 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1874 <ppc_sier_regnum>: New field.
1875 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1876 New enum values.
1877 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1878 values.
1879 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1880 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1881 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1882 ebb and pmu features.
1883
1884 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1885 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1886
1887 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1888 (tdesc_powerpc_isa207_vsx64l): Declare.
1889 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1890 (struct ppc_linux_features) <isa207>: New field.
1891 (ppc_linux_no_features): Add initializer for isa207 field.
1892 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1893 new tdescs.
1894 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1895 (NT_PPC_TAR): Define if not already defined.
1896 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1897 rs6000/powerpc-isa207-vsx64l.
1898 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1899 rs6000/powerpc-isa207-vsx64l.xml.
1900 * features/rs6000/power-tar.xml: New file.
1901 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1902 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1903 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1904 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1905 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1906 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1907 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1908 fetch_regset with the TAR regset.
1909 (store_register, store_ppc_registers): Call store_regset with the
1910 TAR regset.
1911 (ppc_linux_nat_target::read_description): Set isa207 field in the
1912 features struct if needed.
1913 * ppc-linux-tdep.c: Include
1914 features/rs6000/powerpc-isa207-vsx32l.c and
1915 features/rs6000/powerpc-isa207-vsx64l.c.
1916 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1917 (ppc_linux_iterate_over_regset_sections): Call back with the tar
1918 regset.
1919 (ppc_linux_core_read_description): Check if the tar section is
1920 present and set isa207 in the features struct.
1921 (_initialize_ppc_linux_tdep): Call
1922 initialize_tdesc_powerpc_isa207_vsx32l and
1923 initialize_tdesc_powerpc_isa207_vsx64l.
1924 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1925 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1926 (enum) <PPC_TAR_REGNUM>: New enum value.
1927 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1928 feature.
1929 (ppc_process_record_op31): Record changes to TAR.
1930
1931 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1932 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1933
1934 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1935 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1936 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1937 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1938 (struct ppc_linux_features) <ppr_dscr>: New field.
1939 (ppc_linux_no_features): Add initializer for ppr_dscr field.
1940 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1941 new tdescs.
1942 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1943 Define if not already defined.
1944 * features/Makefile (WHICH): Add
1945 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1946 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1947 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1948 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1949 * features/rs6000/power-dscr.xml: New file.
1950 * features/rs6000/power-ppr.xml: New file.
1951 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1952 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1953 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1954 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1955 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1956 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1957 * ppc-linux-nat.c: Include <sys/uio.h>.
1958 (fetch_regset, store_regset, check_regset): New functions.
1959 (fetch_register, fetch_ppc_registers): Call fetch_regset with
1960 DSCR and PPR regsets.
1961 (store_register, store_ppc_registers): Call store_regset with
1962 DSCR and PPR regsets.
1963 (ppc_linux_get_hwcap2): New function.
1964 (ppc_linux_nat_target::read_description): Call
1965 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1966 features struct if needed.
1967 * ppc-linux-tdep.c: Include
1968 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1969 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1970 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1971 (ppc32_linux_dscrregset): New globals.
1972 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1973 and dscr regsets.
1974 (ppc_linux_core_read_description): Check if the ppr and dscr
1975 sections are present and set ppr_dscr in the features struct.
1976 (_initialize_ppc_linux_tdep): Call
1977 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1978 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1979 * ppc-linux-tdep.h (ppc32_linux_pprregset)
1980 (ppc32_linux_dscrregset): Declare.
1981 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1982 <ppc_dscr_regnum>: New field.
1983 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1984 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1985 and dscr features.
1986 (ppc_process_record_op31): Record changes to PPR and DSCR.
1987
1988 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1989
1990 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1991 second initializer line for the have_* variables. Initialize
1992 have_fpu to 0 instead of 1.
1993
1994 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1995
1996 * arch/ppc-linux-common.c (ppc_linux_match_description):
1997 Parenthesize tdesc assignements and indent them properly.
1998
1999 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2000
2001 * ppc-linux-nat.c (fetch_register): Change if statement to else
2002 if.
2003 (store_register): Likewise.
2004
2005 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2006
2007 * rs6000-tdep.c: Remove reggroups.h include.
2008 (rs6000_pseudo_register_reggroup_p): Remove.
2009 (rs6000_gdbarch_init): Remove call to
2010 set_tdesc_pseudo_register_reggroup_p.
2011
2012 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2013
2014 * reggroups.c (default_register_reggroup_p): Return true for
2015 decfloat registers and float_reggroup.
2016
2017 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2018
2019 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
2020 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
2021 ppc_linux_collect_vrregset by regcache_collect_regset.
2022
2023 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2024
2025 * linux-tdep.c (linux_collect_regset_section_cb): Use
2026 std::vector<gdb_byte> instead of char * and malloc for buf.
2027 Remove xfree.
2028
2029 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
2030
2031 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
2032 symtab_start instead of always using language_unknown.
2033
2034 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
2035
2036 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
2037 READ_P parameter, catch and ignore register access errors from
2038 either the old or new MISA location.
2039 (riscv_has_feature): Update call to riscv_read_misa_reg.
2040
2041 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
2042
2043 * python/py-function.c (convert_values_to_python): Return
2044 gdbpy_ref<>. Add header comment.
2045 (fnpy_call): Adjust.
2046
2047 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
2048
2049 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
2050 (cmdpy_completer_handle_brkchars): Adjust.
2051 (cmdpy_completer): Adjust.
2052
2053 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
2054
2055 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
2056 Pass correct regnum to raw_supply_zeroed.
2057
2058 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
2059
2060 * regcache.c (cooked_read_test): Add CSKY to the list of
2061 architectures with a save_reggroup
2062
2063 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
2064
2065 PR gdb/23368
2066 * infrun.c (follow_exec): In the follow_exec_mode_new case,
2067 transfer terminal state from old new new inferior.
2068 * terminal.h (swap_terminal_info): New function.
2069 * inflow.c (swap_terminal_info): New function.
2070
2071 2018-10-23 Tom Tromey <tom@tromey.com>
2072
2073 * record-btrace.c (get_thread_current_frame_id): Rename from
2074 get_thread_current_frame. Return a frame_id.
2075 (record_btrace_start_replaying): Update.
2076
2077 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
2078
2079 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
2080 for CSRs.
2081
2082 2018-10-23 Joel Brobecker <brobecker@adacore.com>
2083
2084 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
2085 have_nonsteppable_watchpoint attribute to 1.
2086
2087 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
2088
2089 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
2090 register names.
2091 (struct register_alias): Rename to...
2092 (struct riscv_register_alias): ...this, and update comment.
2093 (riscv_register_aliases): Update type, and alias names. Remove
2094 CSR names from this list.
2095 (riscv_register_name): Use riscv_gdb_reg_names for int and float
2096 register names. Add an extra assertion.
2097 (riscv_is_regnum_a_named_csr): New function.
2098 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
2099
2100 2018-10-23 John Darrington <john@darrington.wattle.id.au>
2101
2102 * configure.tgt: Add configuration for s12z.
2103 * s12z-tdep.c: New file.
2104 * NEWS: Mention new target.
2105
2106 2018-10-22 Jim Wilson <jimw@sifive.com>
2107
2108 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2109 FP reg smaller than FP reg size, and fill with -1 instead of 0.
2110
2111 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2112 (riscv_register_type): Use them.
2113 (riscv_print_one_register_info): Handle union of floats same as float.
2114 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2115 riscv_fpreg_q_type fields.
2116
2117 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
2118
2119 * gdbarch.sh (gdbarch_num_cooked_regs): New.
2120 * gdbarch.h: Re-generate.
2121 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2122 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2123 * eval.c (evaluate_subexp_standard): Likewise.
2124 * findvar.c (value_of_register): Likewise.
2125 (value_of_register_lazy): Likewise.
2126 (address_from_register): Likewise.
2127 * frame.c (get_frame_register_bytes): Likewise.
2128 * gdbarch-selftests.c (register_to_value_test): Likewise.
2129 * h8300-tdep.c (h8300_register_type): Likewise.
2130 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2131 (i386_svr4_reg_to_regnum): Likewise.
2132 * infcmd.c (default_print_registers_info): Likewise.
2133 (registers_info): Likewise.
2134 (print_vector_info): Likewise.
2135 (default_print_float_info): Likewise.
2136 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2137 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2138 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2139 (mi_cmd_data_list_changed_registers): Likewise.
2140 (mi_cmd_data_list_register_values): Likewise.
2141 (mi_cmd_data_write_register_values): Likewise.
2142 (mi_cmd_trace_frame_collected): Likewise.
2143 * mips-tdep.c (print_gp_register_row): Likewise.
2144 (mips_print_registers_info): Likewise.
2145 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2146 * regcache.c (init_regcache_descr): Likewise.
2147 (register_size): Likewise.
2148 (register_dump::dump): Likewise.
2149 (cooked_read_test): Likewise.
2150 (cooked_write_test): Likewise.
2151 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2152 (rs6000_gdbarch_init): Likewise.
2153 * stabsread.c (stab_reg_to_regnum): Likewise.
2154 * stack.c (info_frame_command): Likewise.
2155 * target-descriptions.c (tdesc_register_name): Likewise.
2156 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2157 * tui/tui-regs.c (tui_show_register_group): Likewise.
2158 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2159 (user_reg_map_regnum_to_name): Likewise.
2160 (value_of_user_reg): Likewise.
2161 (maintenance_print_user_registers): Likewise.
2162 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2163 (xtensa_register_name): Likewise.
2164 (xtensa_register_type): Likewise.
2165 (xtensa_reg_to_regnum): Likewise.
2166 (xtensa_pseudo_register_read): Likewise.
2167 (xtensa_pseudo_register_write): Likewise.
2168
2169 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2170
2171 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2172 correctly-sized buffer with raw_read.
2173 (amd64_pseudo_register_write): Use correctly-sized buffer for
2174 raw_read/raw_write.
2175
2176 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2177
2178 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2179 in add_prefix_cmd of set print type.
2180
2181 2018-10-19 Tom Tromey <tom@tromey.com>
2182
2183 PR tui/18388:
2184 * NEWS: Mention tabset deprecation.
2185 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2186 (update_tab_width): New function.
2187 (tui_set_tab_width, tui_show_tab_width): New functions.
2188 (tui_set_tab_width_command): Use update_tab_width.
2189 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
2190 Add new "set tui tab-width" command.
2191 * tui/tui-source.c (tui_set_source_content): Update.
2192 * tui/tui-disasm.c (tui_set_disassem_content): Update.
2193 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2194 Don't declare.
2195 (tui_tab_width): Declare.
2196 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2197 (tui_set_default_tab_len): Remove.
2198
2199 2018-10-19 Tom Tromey <tom@tromey.com>
2200
2201 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2202 (key_is_backspace, tui_getc): Don't declare.
2203 * tui/tui-io.c (key_is_start_sequence): Now static.
2204 (key_is_end_sequence, key_is_backspace): Remove.
2205 (tui_getc): Now static.
2206
2207 2018-10-19 Tom Tromey <tom@tromey.com>
2208
2209 * symfile.c (reread_symbols): Clear "static_links".
2210
2211 2018-10-19 Alan Hayward <alan.hayward@arm.com>
2212
2213 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2214 define.
2215 (aarch64_linux_sigframe_init): Extra boundary checks.
2216
2217 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
2218
2219 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2220 the possibly non-existent tdesc type 'vec128', but the type of raw
2221 register v16 instead.
2222
2223 2018-10-19 Gary Benson <gbenson@redhat.com>
2224
2225 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2226
2227 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
2228
2229 PR cli/23785
2230 * cli/cli-dump.c (restore_binary_file): Check if "file" is
2231 NULL.
2232
2233 2018-10-17 Paul Koning <paul_koning@dell.com>
2234
2235 * charset.c (convert_between_encodings): Fix unsigned overflow.
2236
2237 2018-10-17 John Baldwin <jhb@FreeBSD.org>
2238
2239 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2240 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2241 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2242 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2243 New functions.
2244 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2245 and fbsd_info_proc_mappings_header.
2246 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2247 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2248 New.
2249
2250 2018-10-17 Joel Brobecker <brobecker@adacore.com>
2251
2252 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2253 Solaris Maintainer.
2254
2255 2018-10-15 Tom Tromey <tom@tromey.com>
2256
2257 * tui/tui.c (strcat_to_buf): Remove casts.
2258 * tui/tui-winsource.c (tui_show_source_line)
2259 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2260 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2261 * tui/tui-windata.c (tui_first_data_item_displayed)
2262 (tui_delete_data_content_windows, tui_erase_data_content)
2263 (tui_display_all_data, tui_display_data_from)
2264 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2265 * tui/tui-win.c (tui_set_win_height)
2266 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2267 casts.
2268 * tui/tui-win.c (tui_resize_all): Remove casts.
2269 (tui_scroll_backward_command, tui_set_focus)
2270 (tui_set_tab_width_command): Likewise.
2271 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2272 * tui/tui-regs.c (tui_show_register_group): Remove cast.
2273 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2274 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2275 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2276 Remove casts.
2277
2278 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
2279
2280 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2281 AArch64/ARM maintainer.
2282
2283 2018-10-11 Gary Benson <gbenson@redhat.com>
2284
2285 * interps.h (interp::m_name): Make private and mutable.
2286 * interps.c (interp::~interp): Free m_name.
2287
2288 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2289 Simon Marchi <simark@simark.ca>
2290
2291 * README (`configure' options): Add documentation for new
2292 "--enable-unit-tests" option.
2293 * acinclude.m4: Include "selftest.m4".
2294 * configure: Regenerate.
2295 * configure.ac: Use "GDB_AC_SELFTEST".
2296 * maint.c (maintenance_selftest): Update message informing
2297 that selftests have been disabled.
2298 (maintenance_info_selftests): Likewise.
2299 * selftest.m4: New file.
2300
2301 2018-10-10 Gary Benson <gbenson@redhat.com>
2302
2303 * remote.c (remote_target::remote_send_printf): Add
2304 missing va_end found by Coverity.
2305
2306 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
2307
2308 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2309
2310 2018-10-09 Tom Tromey <tom@tromey.com>
2311
2312 * configure: Rebuild.
2313 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2314 * NEWS: Update --enable-ubsan documentation.
2315
2316 2018-10-09 Gary Benson <gbenson@redhat.com>
2317
2318 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2319 found by Coverity.
2320
2321 2018-10-08 Tom Tromey <tom@tromey.com>
2322
2323 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2324 variable.
2325 (riscv_fbsd_init_abi): Likewise.
2326
2327 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
2328 * valops.c (value_struct_elt_for_reference): Rename local variable
2329 to work around the shadowing a previous local warning.
2330
2331 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2332
2333 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2334 * NEWS: Mention new FreeBSD/riscv native configuration.
2335 * configure.host: Add riscv*-*-freebsd*.
2336 * configure.nat: Likewise.
2337 * riscv-fbsd-nat.c: New file.
2338
2339 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2340
2341 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2342 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2343 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2344 * NEWS: Mention new FreeBSD/riscv target.
2345 * configure.tgt: Add riscv*-*-freebsd*.
2346 * riscv-fbsd-tdep.c: New file.
2347 * riscv-fbsd-tdep.h: New file.
2348
2349 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2350
2351 * regcache.h (struct regcache_map_entry): Note that this type can
2352 be used with traditional frame caches.
2353 * trad-frame.c (trad_frame_set_reg_regmap): New.
2354 * trad-frame.h (trad_frame_set_reg_regmap): New.
2355
2356 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
2357
2358 PR c++/16841
2359 * valops.c (get_virtual_base_offset): New function.
2360 (value_struct_elt_for_reference): Use it to get virtual base offset
2361 and add it in calculating class member address.
2362
2363 2018-10-08 John Darrington <john@darrington.wattle.id.au>
2364
2365 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2366 (check_producer): Check if the producer is codewarrior.
2367 (producer_is_codewarrior): New function.
2368 (lnp_state_machine::record_line): Ignore is_stmt flag for records
2369 produced by codewarrior.
2370 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2371
2372 2018-10-06 Tom Tromey <tom@tromey.com>
2373
2374 PR python/19399:
2375 * python/py-inferior.c: Add "architecture" entry.
2376 (infpy_architecture): New function.
2377
2378 2018-10-06 Tom Tromey <tom@tromey.com>
2379
2380 PR python/21765:
2381 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2382 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2383 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
2384 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2385
2386 2018-10-06 Tom Tromey <tom@tromey.com>
2387
2388 PR build/17077:
2389 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2390 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2391 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2392 #include.
2393
2394 2018-10-06 Tom Tromey <tom@tromey.com>
2395
2396 * python/py-breakpoint.c (bppy_get_location): Handle a
2397 bp_breakpoint without a location.
2398
2399 2018-10-06 Tom Tromey <tom@tromey.com>
2400
2401 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2402 (_RegEx): Reformat help text.
2403 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2404 (AnyCallerIs, AnyCallerMatches): Reformat help text.
2405 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2406 text.
2407 * python/lib/gdb/command/xmethods.py (InfoXMethod)
2408 (EnableXMethod, DisableXMethod): Remove help indentation.
2409 Capitalize meta-syntactic variables.
2410 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2411 (EnableUnwinder, DisableUnwinder): Remove help indentation.
2412 Capitalize meta-syntactic variables.
2413 * python/lib/gdb/command/explore.py (ExploreCommand)
2414 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2415 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2416 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2417 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2418 Remove help indentation.
2419 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2420 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2421 (DisableFrameFilter, SetFrameFilterPriority)
2422 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2423
2424 2018-10-06 Tom Tromey <tom@tromey.com>
2425
2426 PR tui/28819:
2427 * tui/tui-io.c (gdb_wgetch): New function.
2428 (tui_mld_getc, tui_getc): Use it.
2429
2430 2018-10-05 Tom Tromey <tom@tromey.com>
2431
2432 * sol-thread.c (sol_thread_target::wait): Rename inner
2433 "save_ptid".
2434
2435 2018-10-04 Tom Tromey <tom@tromey.com>
2436
2437 * configure: Rebuild.
2438 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2439
2440 2018-10-04 Tom Tromey <tom@tromey.com>
2441
2442 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2443 declaration of "block".
2444
2445 2018-10-04 Tom Tromey <tom@tromey.com>
2446
2447 * common/filestuff.c (fdwalk): Remove inner declaration of
2448 "result".
2449
2450 2018-10-04 Tom Tromey <tom@tromey.com>
2451
2452 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2453 "structs_addr" and hoist declaration.
2454
2455 2018-10-04 Tom Tromey <tom@tromey.com>
2456
2457 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2458 variable "size".
2459
2460 2018-10-04 Tom Tromey <tom@tromey.com>
2461
2462 * mdebugread.c (parse_partial_symbols): Use std::string.
2463
2464 2018-10-04 Tom Tromey <tom@tromey.com>
2465
2466 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2467 * p-valprint.c (pascal_val_print): Split inner "i" variable.
2468 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2469 header.
2470 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2471 more inner scope.
2472 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2473 * varobj.c (varobj_update): Rename inner "newobj",
2474 "type_changed".
2475 * valprint.c (generic_emit_char): Rename inner "buf".
2476 * valops.c (find_overload_match): Rename inner "temp".
2477 (value_struct_elt_for_reference): Declare "v" in more inner
2478 scope.
2479 * v850-tdep.c (v850_push_dummy_call): Rename "len".
2480 * unittests/array-view-selftests.c (run_tests): Rename inner
2481 "vec".
2482 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2483 header.
2484 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2485 "tsv" in more inner scope.
2486 (print_one_static_tracepoint_marker): Rename inner
2487 "tuple_emitter".
2488 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2489 (tic6x_push_dummy_call): Don't redeclare "addr".
2490 * target-float.c: Declare "dto" lower.
2491 * symtab.c (lookup_local_symbol): Rename inner "sym".
2492 (find_pc_sect_line): Rename inner "pc".
2493 * stack.c (print_frame): Don't redeclare "gdbarch".
2494 (return_command): Rename inner "gdbarch".
2495 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2496 "sp".
2497 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2498 header.
2499 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2500 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2501 scope.
2502 * remote.c (remote_target::update_thread_list): Don't redeclare
2503 "tp".
2504 (remote_target::process_initial_stop_replies): Rename inner
2505 "thread".
2506 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2507 (remote_target::wait_as): Don't redeclare "stop_reply".
2508 (remote_target::get_thread_local_address): Rename inner
2509 "result".
2510 (remote_target::get_tib_address): Likewise.
2511
2512 * regcache.c (cooked_read_test): Rename "regnum".
2513 * record-btrace.c (cmd_record_btrace_start): Rename inner
2514 "exception".
2515 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2516 loop header.
2517 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2518 header.
2519 (ppu2spu_sniffer): Rename inner "buf".
2520 * parse.c (operator_check_standard): Rename inner "type",
2521 "objfile".
2522 * p-valprint.c (pascal_val_print): Introduce new scope for
2523 "low_bound", "high_bound".
2524 * p-exp.y (yylex): Declare "i" in loop header.
2525 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2526 Lower declaration of "s".
2527 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2528 header.
2529 (nios2_push_dummy_call): Rename "len".
2530 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2531 "buf".
2532 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2533 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2534 (linux_xfer_osdata_modules): Likewise.
2535 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2536 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2537 (mips_o64_push_dummy_call): Likewise.
2538 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2539 "op".
2540 * mi/mi-main.c (list_available_thread_groups): Rename inner
2541 "tuple_emitter".
2542 (mi_cmd_data_read_memory): Rename inner "opts".
2543 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2544 "tuple_emitter".
2545 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2546 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
2547 more inner scope.
2548 (parse_partial_symbols): Rename inner "pst", "p", "name"
2549 * main.c (captured_main_1): Rename inner "i"s.
2550 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2551 "oso2".
2552 * linux-tdep.c (linux_info_proc): Rename inner "filename".
2553 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2554 * infrun.c (handle_no_resumed): Don't redeclare "thread".
2555 (handle_signal_stop): Rename inner "gdbarch".
2556 (handle_command): Declare "signum" in loop header.
2557 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2558 "status".
2559 (examine_prologue): Rename inner "sol" and "sof".
2560 (ia64_extract_return_value): Rename inner "val". Declare another
2561 "val" in a more inner scope.
2562 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2563 inner scope.
2564 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2565 "except".
2566 * findvar.c (default_read_var_value): Don't redeclare "addr".
2567 * f-exp.y (yylex): Declare "i" in loop header.
2568 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2569 Rename inner "type", "expect_type".
2570 (evaluate_subexp_for_sizeof): Rename inner "pc".
2571 * elfread.c (elf_symfile_read): Rename inner "abfd".
2572 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2573 "bytes_read".
2574 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2575 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2576 (dwarf_decode_line_header): Rename inner "lh".
2577 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2578 "offset". Declare "i" in loop header.
2579 (disassemble_dwarf_expression): Rename inner "addr_size".
2580 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2581 inner "result".
2582 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2583 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2584 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2585 "inner_list_emitter".
2586 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2587 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2588 declaration in a block.
2589 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2590 * cp-valprint.c (cp_print_value_fields): Don't redeclare
2591 "obstack_final_size".
2592 * cp-support.c (inspect_type): Declare "i" in loop header.
2593 * compile/compile.c (compile_instance::insert_symbol_error):
2594 Rename inner "e".
2595 * common/agent.c (agent_run_command): Remove inner "ret"
2596 declaration.
2597 * coffread.c (coff_symfile_read): Rename inner "name".
2598 (coff_symfile_read): Rename inner "abfd".
2599 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2600 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2601 "high".
2602 * c-exp.y (lex_one_token): Move "len" declaration lower.
2603 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2604 "gdbarch".
2605 (create_exception_master_breakpoint): Likewise. Don't redeclare
2606 "b".
2607 (watch_command_1): Declare "mark" later.
2608 (clear_command): Don't shadow "a" or "b".
2609 (delete_command): Rename inner "b".
2610 (delete_trace_command): Likewise.
2611 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2612 "op".
2613 (arm_gdbarch_init): Remove inner "e_flags".
2614 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2615 "offset" in inner blocks.
2616
2617 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
2618
2619 * dwarf-index-write.c (file_write): Don't write if the vector is
2620 empty.
2621
2622 2018-10-05 Tom de Vries <tdevries@suse.de>
2623
2624 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2625 PyArg_ParseTuple call.
2626
2627 2018-10-05 Tom de Vries <tdevries@suse.de>
2628
2629 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2630 PyArg_ParseTuple call.
2631
2632 2018-10-04 Joel Brobecker <brobecker@adacore.com>
2633
2634 * psymtab.c (recursively_search_psymtabs): Reformat parameters
2635 to avoid exceeding 80 characters per line limit.
2636
2637 2018-10-04 Tom Tromey <tom@tromey.com>
2638
2639 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2640 (reread_symbols): Update.
2641 * complaints.h (clear_complaints): Remove argument.
2642 * complaints.c (enum complaint_series): Remove.
2643 (series): Remove global.
2644 (complaint_internal): Update.
2645 (clear_complaints): Remove argument.
2646
2647 2018-10-04 Tom Tromey <tom@tromey.com>
2648
2649 * symfile.c (symbol_file_add_with_addrs): Do not print "no
2650 debugging symbols" message if there is a separate debug objfile.
2651
2652 2018-10-04 Tom Tromey <tom@tromey.com>
2653
2654 PR cli/19551:
2655 * symfile.c (symbol_file_add_with_addrs): Update output.
2656 * psymtab.c (require_partial_symbols): Update output.
2657
2658 2018-10-04 Tom Tromey <tom@tromey.com>
2659
2660 PR cli/22234:
2661 * complaints.c: Emit \n.
2662
2663 2018-10-04 Tom Tromey <tom@tromey.com>
2664
2665 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2666 (separate_debug_file_exists, find_separate_debug_file)
2667 (add_symbol_file_command, reread_symbols, allocate_symtab)
2668 (allocate_compunit_symtab): Use filtered printing, not
2669 unfiltered.
2670 * psymtab.c (require_partial_symbols, dump_psymtab)
2671 (allocate_psymtab): Use filtered printing, not unfiltered.
2672
2673 2018-10-04 Tom Tromey <tom@tromey.com>
2674
2675 * complaints.c (complaint_internal): Correctly check complaint
2676 count.
2677
2678 2018-10-04 Tom Tromey <tom@tromey.com>
2679
2680 * complaints.h (struct complaints): Remove declaration.
2681 * complaints.c (clear_complaints): Remove an unused variable.
2682
2683 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2684
2685 * MAINTAINERS (Write After Approval): Add self.
2686
2687 2018-10-03 Tom Tromey <tom@tromey.com>
2688
2689 * guile/scm-value.c (gdbscm_value_to_string): Initialize
2690 "buffer_contents".
2691 * coffread.c (coff_symtab_read): Initialize "newobj".
2692
2693 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
2694
2695 * dwarf2read.c (read_func_scope): Remove struct keyword in
2696 range-based for.
2697
2698 2018-10-03 Tom Tromey <tom@tromey.com>
2699
2700 * README: Mention --enable-ubsan.
2701 * NEWS: Mention --enable-ubsan.
2702 * acinclude.m4: Include sanitize.m4.
2703 * configure: Rebuild.
2704 * configure.ac: Call AM_GDB_UBSAN.
2705 * sanitize.m4: New file.
2706
2707 2018-10-03 Tom Tromey <tom@tromey.com>
2708
2709 * expression.h (enum exp_opcode): Use uint8_t as base type.
2710 * expprint.c (op_name): Handle invalid opcodes.
2711
2712 2018-10-03 Tom Tromey <tom@tromey.com>
2713
2714 * parse.c (prefixify_expression): Add assert.
2715 (parse_exp_in_context_1): Throw exception if the expression is
2716 empty.
2717
2718 2018-10-03 Tom Tromey <tom@tromey.com>
2719
2720 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2721
2722 2018-10-03 Tom Tromey <tom@tromey.com>
2723
2724 * c-exp.y (parse_number): Work in unsigned. Remove casts.
2725
2726 2018-10-03 Tom Tromey <tom@tromey.com>
2727
2728 * dwarf2read.c (read_subrange_type): Make "negative_mask"
2729 unsigned.
2730
2731 2018-10-03 Tom Tromey <tom@tromey.com>
2732
2733 * findvar.c (extract_integer): Do work in an unsigned type.
2734
2735 2018-10-03 Tom Tromey <tom@tromey.com>
2736
2737 * common/enum-flags.h (enum_flags::operator~): Add static assert.
2738 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2739 base type.
2740 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2741 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2742 type.
2743 * c-lang.h (enum c_string_type_values): Use unsigned as base
2744 type.
2745 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2746
2747 2018-10-03 Tom Tromey <tom@tromey.com>
2748
2749 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2750 <~dwarf2_frame_state_reg_info>: Update.
2751 <dwarf2_frame_state_reg_info>: Update.
2752 <alloc_regs>: Add assertion. Update.
2753 <reg>: Now a std::vector.
2754 <num_regs>: Remove.
2755 <swap>: Update.
2756 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2757 (execute_cfa_program_test, dwarf2_frame_cache): Update.
2758
2759 2018-10-03 Tom Tromey <tom@tromey.com>
2760
2761 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2762
2763 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2764
2765 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2766
2767 2018-10-02 Tom Tromey <tom@tromey.com>
2768
2769 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2770
2771 2018-10-02 John Darrington <john@darrington.wattle.id.au>
2772
2773 * NEWS: Mention changed commands.
2774 * ser-uds.c: New file.
2775 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2776 * configure: Regenerate.
2777 * Makefile.in: Add new file.
2778 * serial.c (serial_open): Check if filename is a socket
2779 and lookup the appropriate interface accordingly.
2780
2781 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2782
2783 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2784 define.
2785 (AARCH64_EXTRA_MAGIC): Likewise.
2786 (AARCH64_FPSIMD_MAGIC): Likewise.
2787 (AARCH64_SVE_MAGIC): Likewise.
2788 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2789 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2790 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2791 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2792 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2793 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2794 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2795 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2796 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2797 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2798 (read_aarch64_ctx): Add function.
2799 (aarch64_linux_sigframe_init): Detect FP registers.
2800
2801 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2802
2803 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2804 (AARCH64_D0_REGNUM): Likewise.
2805 (AARCH64_S0_REGNUM): Likewise.
2806 (AARCH64_H0_REGNUM): Likewise.
2807 (AARCH64_B0_REGNUM): Likewise.
2808 (AARCH64_SVE_V0_REGNUM): Likewise.
2809 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2810 (AARCH64_D0_REGNUM): Likewise.
2811 (AARCH64_S0_REGNUM): Likewise.
2812 (AARCH64_H0_REGNUM): Likewise.
2813 (AARCH64_B0_REGNUM): Likewise.
2814 (AARCH64_SVE_V0_REGNUM): Likewise.
2815
2816 2018-10-01 Gary Benson <gbenson@redhat.com>
2817
2818 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2819 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2820 prfpregset_t instead of gdb_prfpregset_t.
2821 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2822 * configure, config.in: Rebuild.
2823
2824 2018-10-01 Gary Benson <gbenson@redhat.com>
2825
2826 * common/gdb_proc_service.h: New file, factored out from...
2827 * gdb_proc_service.h: Moved common code to the above file.
2828 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2829
2830 2018-10-01 Gary Benson <gbenson@redhat.com>
2831
2832 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2833 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
2834
2835 2018-10-01 Gary Benson <gbenson@redhat.com>
2836
2837 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2838 (AC_CHECK_HEADERS): Check for linux/elf.h.
2839 * configure, config.in: Rebuild.
2840 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2841 doesn't define elf_fpregset_t.
2842
2843 2018-10-01 Gary Benson <gbenson@redhat.com>
2844
2845 * gdb_proc_service.h: Whitespace change.
2846
2847 2018-10-01 Tom Tromey <tom@tromey.com>
2848
2849 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2850 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2851 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2852
2853 2018-10-01 Tom Tromey <tom@tromey.com>
2854
2855 * README: Minor change.
2856
2857 2018-09-30 Pedro Alves <palves@redhat.com>
2858
2859 * darwin-nat-info.c (darwin_debug_regions_recurse)
2860 (info_mach_exceptions_command): Remove unused local variables.
2861 * darwin-nat.c (darwin_decode_notify_message)
2862 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2863 (darwin_stop_inferior, darwin_setup_exceptions)
2864 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2865 (darwin_nat_target::attach, darwin_nat_target::detach)
2866 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2867 local variables.
2868 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2869 variables.
2870
2871 2018-09-29 Tom Tromey <tom@tromey.com>
2872
2873 * README: Remove some leftover text.
2874
2875 2018-09-29 Tom Tromey <tom@tromey.com>
2876
2877 * PROBLEMS: Rewrite.
2878 * README: Update.
2879
2880 2018-09-28 John Baldwin <jhb@FreeBSD.org>
2881
2882 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2883 case with explicit breakpoint kind.
2884 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2885 'additional_info' and related logic.
2886 (riscv_debug_breakpoints): New variable.
2887 (riscv_breakpoint_kind_from_pc): Use the length of the existing
2888 instruction to determine the breakpoint kind.
2889 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2890 flag. Update description of 'set/show riscv
2891 use-compressed-breakpoints' flag.
2892
2893 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
2894
2895 (NEWS): Mention changes to frame related commands.
2896 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2897 (add_prefix_cmd_suppress_notification): New function.
2898 (add_com_suppress_notification): Call
2899 add_cmd_suppress_notification.
2900 * command.h (add_cmd_suppress_notification): Declare.
2901 (add_prefix_cmd_suppress_notification): Declare.
2902 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2903 (parse_frame_specification): Moved from stack.c, with
2904 simplification to handle a single argument.
2905 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2906 switch to the selected frame. Add a header comment.
2907 * stack.c: Remove 'safe-ctype.h' include.
2908 (find_frame_for_function): Add declaration.
2909 (find_frame_for_address): New function.
2910 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2911 (frame_selection_by_function_completer): New function.
2912 (info_frame_command): Rename to...
2913 (info_frame_command_core): ...this, and update parameter types.
2914 (select_frame_command): Rename to...
2915 (select_frame_command_core): ...this, and update parameter types.
2916 (frame_command): Rename to...
2917 (frame_command_core): ...this, and update parameter types.
2918 (class frame_command_helper): New class to wrap implementations of
2919 frame related sub-commands.
2920 (frame_apply_cmd_list): New static global.
2921 (frame_cmd_list): Make static.
2922 (select_frame_cmd_list): New global for sub-commands.
2923 (info_frame_cmd_list): New global for sub-commands.
2924 (_initialize_stack): Register sub-commands for 'frame',
2925 'select-frame', and 'info frame'. Update 'frame apply' commands
2926 to use frame_apply_cmd_list. Move function local static
2927 frame_apply_list to file static frame_apply_cmd_list for
2928 consistency.
2929 * stack.h (select_frame_command): Delete declarationn.
2930 (select_frame_for_mi): Declare new function.
2931
2932 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
2933
2934 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2935 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2936 and NOP.
2937
2938 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
2939
2940 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2941
2942 2018-09-26 Tom Tromey <tom@tromey.com>
2943
2944 * valops.c (auto_abandon): Remove dead code.
2945
2946 2018-09-26 Tom Tromey <tom@tromey.com>
2947
2948 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2949
2950 2018-09-24 Tom Tromey <tom@tromey.com>
2951
2952 * common/pathstuff.c (get_standard_cache_dir): Make
2953 "xdg_cache_home" and "home" const.
2954 * top.c (init_history): Make "tmpenv" const.
2955 * main.c (get_init_files): Make "homedir" const.
2956
2957 2018-09-23 Tom Tromey <tom@tromey.com>
2958
2959 PR python/18852:
2960 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2961
2962 2018-09-23 Tom Tromey <tom@tromey.com>
2963
2964 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2965 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2966 * python/python-internal.h (gdbpy_handle_exception): Declare.
2967 * python/py-utils.c (gdbpy_handle_exception): New function.
2968
2969 2018-09-23 Tom Tromey <tom@tromey.com>
2970
2971 PR python/17284:
2972 * python/py-type.c (typy_template_argument): Check for negative
2973 argument number.
2974
2975 2018-09-23 Tom Tromey <tom@tromey.com>
2976
2977 PR python/14062:
2978 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2979
2980 2018-09-23 Tom Tromey <tom@tromey.com>
2981
2982 PR python/18170:
2983 * python/py-value.c (valpy_int): Allow conversion from pointer
2984 type.
2985
2986 2018-09-23 Tom Tromey <tom@tromey.com>
2987
2988 PR python/20126:
2989 * python/py-value.c (valpy_int): Respect type sign.
2990
2991 2018-09-23 Tom Tromey <tom@tromey.com>
2992
2993 PR python/18352;
2994 * python/py-value.c (valpy_float): Allow conversions from int or
2995 char.
2996 (valpy_int, valpy_long): Allow conversions from float.
2997
2998 2018-09-23 Tom Tromey <tom@tromey.com>
2999
3000 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
3001 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
3002
3003 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3004
3005 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
3006 __sighndlr.
3007 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
3008
3009 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
3010
3011 * windows-nat.c (windows_nat_target::wait): Remove a spurious
3012 target_terminal::ours().
3013
3014 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
3015
3016 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
3017 of vl to ULONGEST.
3018
3019 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
3020
3021 * breakpoint.c (update_inserted_breakpoint_locations): Remove
3022 redundant condition.
3023
3024 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3025
3026 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
3027
3028 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
3029 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
3030 * sol-thread.c (ps_pdmodel): Don't guard definition.
3031
3032 * procfs.c: Fix formatting.
3033
3034 * procfs.c (sysset_t_alloc): Remove.
3035 (create_procinfo): Use XNEW instead of sysset_t_alloc.
3036 (procfs_debug_inferior): Likewise.
3037 (procfs_set_exec_trap): Likewise.
3038 (proc_set_traced_sysentry): Don't allocate argp dynamically.
3039 (proc_set_traced_sysexit): Likewise.
3040
3041 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
3042 (dead_procinfo): Likewise.
3043 (proc_warn): Likewise.
3044 (proc_error): Likewise.
3045 (proc_get_LDT_entry): Likewise.
3046 (do_attach): Likewise.
3047 (procfs_target::pid_to_str): Likewise.
3048 (iterate_over_mappings): Likewise.
3049
3050 * procfs.c (create_procinfo): Fix ARI warning.
3051 (proc_get_status): Likewise.
3052 (proc_stop_process): Likewise.
3053 (proc_run_process): Likewise.
3054 (proc_kill): Likewise.
3055 (proc_get_LDT_entry): Likewise.
3056 (procfs_find_LDT_entry): Likewise.
3057 (proc_update_threads): Likewise.
3058 (proc_iterate_over_threads): Likewise.
3059 (do_attach): Likewise.
3060 (procfs_xfer_memory): Likewise.
3061 (invalidate_cache): Likewise.
3062 (procfs_target::resume): Likewise.
3063 (procfs_init_inferior): Likewise.
3064 (procfs_set_exec_trap): Likewise.
3065 (procfs_target::thread_alive): Likewise.
3066 (procfs_target::pid_to_exec_file): Likewise.
3067 (iterate_over_mappings): Likewise.
3068 (procfs_target::make_corefile_notes): Likewise.
3069 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
3070
3071 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
3072 (procfs_find_LDT_entry): Likewise.
3073 * sol-thread.c (ps_lgetLDT): Likewise.
3074
3075 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3076
3077 PR tdep/17903
3078 * procfs.c (procfs_target): Declare pid_to_exec_file.
3079 (procfs_target::pid_to_exec_file): New.
3080
3081 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3082
3083 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
3084 renaming.
3085 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
3086 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
3087
3088 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3089
3090 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
3091 (supply_fpregset, fill_fpregset): Move ...
3092 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
3093 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
3094 Remove references to ioctl-based procfs.
3095 Include <sys/reg.h>.
3096 Remove PR_MODEL_NATIVE guards.
3097 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
3098 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
3099
3100 2018-09-19 Xavier Roirand <roirand@adacore.com>
3101
3102 PR gdb/20981:
3103 * solib-darwin.c (darwin_get_dyld_bfd): New function.
3104 (darwin_solib_get_all_image_info_addr_at_init): Update call.
3105 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3106
3107 2018-09-19 John Baldwin <jhb@FreeBSD.org>
3108
3109 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3110 (fbsd_print_sockaddr_in6): Likewise.
3111
3112 2018-09-19 Richard Bunt <richard.bunt@arm.com>
3113 Chris January <chris.january@arm.com>
3114
3115 * eval.c (skip_undetermined_arglist): Skip argument list helper.
3116 (evaluate_subexp_standard): Return a dummy type when
3117 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3118 OP_F77_UNDETERMINED_ARGLIST case.
3119 * expression.h (enum noside): Update comment.
3120
3121 2018-09-19 George Vasick <george.vasick@oracle.com>
3122
3123 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3124
3125 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
3126 April Chin <april.chin@oracle.com>
3127 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3128
3129 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3130 uint_t lwpid_t.
3131 (create_procinfo): Print pids in /proc without leading zeros.
3132
3133 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
3134
3135 * nios2-tdep.c (nios2_gcc_target_options): New.
3136 (nios2_gdb_arch_init): Install new hook.
3137
3138 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
3139
3140 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3141 New file.
3142 * update-gnulib.sh: Apply patch.
3143 * configure: Re-generate.
3144
3145 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3146
3147 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3148 description. Make "info proc" command descriptions more
3149 consistent.
3150
3151 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3152
3153 * NEWS: Mention 'info proc files' command.
3154
3155 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3156
3157 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3158 descriptors for IP_FILES and IP_ALL.
3159
3160 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3161
3162 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3163 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3164 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3165 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3166 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3167 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3168 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3169 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3170 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3171 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3172 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3173 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3174 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3175 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3176 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3177 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3178 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3179 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3180 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3181 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3182 (struct fbsd_sockaddr_un): New types.
3183 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3184 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3185 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3186 (fbsd_core_info_proc_files): New functions.
3187 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3188 IP_ALL.
3189 * fbsd-tdep.h (fbsd_info_proc_files_header)
3190 (fbsd_info_proc_files_entry): New.
3191
3192 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3193
3194 * defs.h (enum info_proc_what) [IP_FILES]: New value.
3195 * infcmd.c (info_proc_cmd_files): New function.
3196 (_initialize_infcmd): Register 'info proc files' command.
3197
3198 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3199
3200 * gnulib/aclocal-m4-deps.mk: Re-generate.
3201 * gnulib/aclocal.m4: Re-generate.
3202 * gnulib/config.in: Re-generate.
3203 * gnulib/configure: Re-generate.
3204 * gnulib/import/Makefile.am: Re-generate.
3205 * gnulib/import/Makefile.in: Re-generate.
3206 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3207 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3208 * gnulib/import/arpa_inet.in.h: New file.
3209 * gnulib/import/inet_ntop.c: New file.
3210 * gnulib/import/m4/arpa_inet_h.m4: New file.
3211 * gnulib/import/m4/inet_ntop.m4: New file.
3212 * gnulib/import/m4/netinet_in_h.m4: New file.
3213 * gnulib/import/m4/socklen.m4: New file.
3214 * gnulib/import/m4/sockpfaf.m4: New file.
3215 * gnulib/import/m4/stdalign.m4: New file.
3216 * gnulib/import/m4/sys_uio_h.m4: New file.
3217 * gnulib/import/netinet_in.in.h: New file.
3218 * gnulib/import/stdalign.in.h: New file.
3219 * gnulib/import/sys_socket.c: New file.
3220 * gnulib/import/sys_socket.in.h: New file.
3221 * gnulib/import/sys_uio.in.h: New file.
3222 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3223 module.
3224
3225 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3226
3227 * gnulib/aclocal-m4-deps.mk: New file.
3228 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3229 deterministically.
3230
3231 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3232
3233 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3234 KVE_PATH.
3235
3236 2018-09-18 Tom Tromey <tom@tromey.com>
3237
3238 * compile/compile-object-load.c (struct
3239 link_hash_table_cleanup_data): Add constructor and destructor.
3240 Use DISABLE_COPY_AND_ASSIGN.
3241 (~link_hash_table_cleanup_data): Rename from
3242 link_hash_table_free. Now a destructor.
3243 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
3244
3245 2018-09-18 Tom Tromey <tom@tromey.com>
3246
3247 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3248 * compile/compile-object-load.c (struct munmap_list): Move to
3249 header file.
3250 (munmap_list::add): Rename from munmap_list_add; rewrite.
3251 (munmap_list::~munmap_list): Rename from munmap_list_free.
3252 (munmap_listp_free_cleanup): Remove.
3253 (compile_object_load): Update.
3254 * compile/compile-object-load.h (struct munmap_list): Move from
3255 compile-object-load.c. Rewrite.
3256
3257 2018-09-18 Alan Hayward <alan.hayward@arm.com>
3258
3259 * aarch64-tdep.c (pass_in_v): Use register size.
3260 (aarch64_extract_return_value): Likewise.
3261 (aarch64_store_return_value): Likewise.
3262
3263 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3264
3265 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3266 rlim_t.
3267
3268 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3269
3270 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3271 Fix short help line.
3272
3273 2018-09-17 Tom Tromey <tom@tromey.com>
3274
3275 PR python/20445:
3276 * configure: Rebuild.
3277 * configure.ac: Conditionally use -DNDEBUG for Python.
3278
3279 2018-09-17 Tom Tromey <tom@tromey.com>
3280
3281 * configure: Rebuild.
3282 * configure.ac: Use gmp as a library dependency when checking for
3283 mpfr.
3284
3285 2018-09-17 Pedro Alves <palves@redhat.com>
3286
3287 * python/py-inferior.c (find_inferior_object): Delete.
3288
3289 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
3290
3291 * compile/compile-cplus-types.c
3292 (compile_cplus_instance::enter_scope): Don't use new_scope after
3293 std::move.
3294
3295 2018-09-17 Tom Tromey <tom@tromey.com>
3296
3297 * common/pathstuff.c (get_standard_cache_dir): Use
3298 ~/Library/Caches on macOS.
3299 * common/pathstuff.h (get_standard_cache_dir): Update comment.
3300
3301 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
3302
3303 PR python/23669
3304 * breakpoint.c (commands_cmd_element): New.
3305 (_initialize_breakpoint): Assign commands_cmd_element.
3306 * breakpoint.h (commands_cmd_element): New.
3307 * cli/cli-script.c (while_cmd_element, if_command,
3308 define_cmd_element): New.
3309 (command_name_equals): Remove.
3310 (process_next_line): Compare commands by pointer, not by name.
3311 (_initialize_cli_script): Assign the various cmd_list_element
3312 variables.
3313 * compile/compile.c (compile_cmd_element): New.
3314 (_initialize_compile): Assign compile_cmd_element.
3315 * compile/compile.h (compile_cmd_element): New.
3316 * guile/guile.c (guile_cmd_element): New.
3317 (install_gdb_commands): Assign guile_cmd_element.
3318 * guile/guile.h (guile_cmd_element): New.
3319 * python/python.c (python_cmd_element): New.
3320 (_initialize_python): Assign python_cmd_element.
3321 * python/python.h (python_cmd_element): New.
3322 * tracepoint.c (while_stepping_cmd_element): New.
3323 (_initialize_tracepoint): Assign while_stepping_cmd_element.
3324 * tracepoint.h (while_stepping_cmd_element): New.
3325
3326 2018-09-17 Tom Tromey <tom@tromey.com>
3327
3328 * infrun.c (save_infcall_suspend_state): Return
3329 infcall_suspend_state_up.
3330 (save_infcall_control_state): Return infcall_control_state_up.
3331 * inferior.h (save_infcall_suspend_state)
3332 (save_infcall_control_state): Declare later. Return unique
3333 pointers.
3334
3335 2018-09-17 Tom Tromey <tom@tromey.com>
3336
3337 * infrun.c (struct stop_context): Declare constructor,
3338 destructor, "changed" method.
3339 (stop_context::stop_context): Rename from save_stop_context.
3340 (stop_context::~stop_context): Rename from
3341 release_stop_context_cleanup.
3342 (normal_stop): Update.
3343 (stop_context::changed): Rename from stop_context_changed. Return
3344 bool.
3345
3346 2018-09-17 Tom Tromey <tom@tromey.com>
3347
3348 * inferior.h (struct infcall_suspend_state_deleter): New.
3349 (infcall_suspend_state_up): New typedef.
3350 (struct infcall_control_state_deleter): New.
3351 (infcall_control_state_up): New typedef.
3352 (make_cleanup_restore_infcall_suspend_state)
3353 (make_cleanup_restore_infcall_control_state): Don't declare.
3354 * infcall.c (call_function_by_hand_dummy): Update.
3355 * infrun.c (do_restore_infcall_suspend_state_cleanup)
3356 (make_cleanup_restore_infcall_suspend_state): Remove.
3357 (do_restore_infcall_control_state_cleanup)
3358 (make_cleanup_restore_infcall_control_state): Remove.
3359
3360 2018-09-17 Tom Tromey <tom@tromey.com>
3361
3362 * gdbthread.h (struct thread_control_state): Add initializer.
3363 (class thread_info) <control>: Remove initializer.
3364 * inferior.h (struct inferior_control_state): Add initializer.
3365 (class inferior) <control>: Remove initializer.
3366 (exit_inferior_1): Update.
3367 * infrun.c (struct infcall_control_state): Add constructors.
3368 (save_infcall_control_state): Use new.
3369 (restore_infcall_control_state, discard_infcall_control_state):
3370 Use delete.
3371
3372 2018-09-17 Tom Tromey <tom@tromey.com>
3373
3374 * infrun.c (struct infcall_suspend_state) <registers>: Now a
3375 unique_ptr.
3376 <siginfo_data>: Now a unique_xmalloc_ptr.
3377 (save_infcall_suspend_state, restore_infcall_suspend_state)
3378 (discard_infcall_suspend_state)
3379 (get_infcall_suspend_state_regcache): Update.
3380
3381 2018-09-17 Tom Tromey <tom@tromey.com>
3382
3383 * gdbthread.h (struct thread_suspend_state): Add initializers.
3384 (class thread_info) <suspend>: Remove initializer.
3385 * infrun.c (struct infcall_suspend_state): Add initializers.
3386 (save_infcall_suspend_state): Use new.
3387 (discard_infcall_suspend_state): Use delete.
3388
3389 2018-09-16 Tom Tromey <tom@tromey.com>
3390
3391 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3392 Remove.
3393 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3394 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3395 (py_varobj_iter_new): Likewise.
3396 (py_varobj_get_iterator): Use gdbpy_ref.
3397
3398 2018-09-16 Tom Tromey <tom@tromey.com>
3399
3400 * python/py-threadevent.c (py_get_event_thread): Simplify.
3401 * python/py-inferior.c (infpy_thread_from_thread_handle):
3402 Return immediately after calling thread_to_thread_object. Use
3403 Py_RETURN_NONE.
3404 (thread_to_thread_object): Set the exception on a NULL return.
3405
3406 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
3407
3408 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3409
3410 2018-09-16 Tom Tromey <tom@tromey.com>
3411
3412 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3413 Remove.
3414
3415 2018-09-16 Tom Tromey <tom@tromey.com>
3416
3417 * python/python-internal.h (thread_to_thread_object): Change
3418 return type.
3419 * python/py-inferior.c (thread_to_thread_object): Return a new
3420 reference.
3421 (infpy_thread_from_thread_handle): Update.
3422 * python/py-infthread.c (gdbpy_selected_thread): Update.
3423 * python/py-stopevent.c (create_stop_event_object): Update.
3424 * python/py-threadevent.c (py_get_event_thread): Return a new
3425 reference.
3426 (py_get_event_thread): Update.
3427 * python/py-event.h (py_get_event_thread): Change return type.
3428 * python/py-continueevent.c (create_continue_event_object):
3429 Update.
3430
3431 2018-09-16 Tom Tromey <tom@tromey.com>
3432
3433 * python/py-progspace.c (pspy_get_objfiles): Update.
3434 * python/python-internal.h (objfile_to_objfile_object): Change
3435 return type.
3436 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3437 Update.
3438 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3439 Update.
3440 * python/python.c (gdbpy_get_current_objfile): Update.
3441 (gdbpy_objfiles): Update.
3442 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3443 Update.
3444 (objfile_to_objfile_object): Return a new reference.
3445 * python/py-symtab.c (stpy_get_objfile): Update.
3446 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3447 Update.
3448
3449 2018-09-16 Tom Tromey <tom@tromey.com>
3450
3451 * python/py-inferior.c (infpy_get_progspace): Update.
3452 * python/python-internal.h (pspace_to_pspace_object): Change
3453 return type.
3454 * python/py-newobjfileevent.c
3455 (create_clear_objfiles_event_object): Update.
3456 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3457 Update.
3458 * python/python.c (gdbpy_get_current_progspace): Update.
3459 (gdbpy_progspaces): Update.
3460 * python/py-progspace.c (pspace_to_pspace_object): Return a new
3461 reference.
3462 * python/py-objfile.c (objfpy_get_progspace): Update.
3463 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3464 Update.
3465
3466 2018-09-16 Tom Tromey <tom@tromey.com>
3467
3468 * python/lib/gdb/__init__.py (current_progspace, objfiles)
3469 (solib_name, block_for_pc, find_pc_line): New functions.
3470 (execute_unwinders): Update.
3471 * python/py-block.c (gdbpy_block_for_pc): Remove.
3472 * python/py-inferior.c (infpy_get_progspace): New function.
3473 (inferior_object_getset) <progspace>: Add.
3474 * python/py-progspace.c (pspy_objfiles): Rewrite.
3475 (pspy_solib_name, pspy_block_for_pc)
3476 (pspy_find_pc_line, pspy_is_valid): New functions.
3477 (progspace_object_methods): Add entries for solib_name,
3478 block_for_pc, find_pc_line, is_valid.
3479 * python/python-internal.h (gdbpy_block_for_pc)
3480 (build_objfiles_list): Don't declare.
3481 * python/python.c: Don't include solib.h.
3482 (gdbpy_solib_name, gdbpy_find_pc_line)
3483 (gdbpy_get_current_progspace, build_objfiles_list)
3484 (gdbpy_objfiles): Remove.
3485 (GdbMethods) <current_progspace, objfiles, block_for_pc,
3486 solib_name, find_pc_line>: Remove entries.
3487
3488 2018-09-16 Tom Tromey <tom@tromey.com>
3489
3490 * top.c (new_ui_command): Use GNU style for metasyntactic
3491 variables.
3492 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3493 variables.
3494 * maint.c (maintenance_translate_address): Remove "<>" around
3495 text.
3496 * interps.c (interpreter_exec_cmd): Use GNU style for
3497 metasyntactic variables.
3498 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3499 metasyntactic variables.
3500 * tracepoint.c (tfind_range_command): Use GNU style for
3501 metasyntactic variables.
3502 (tfind_outside_command): Likewise.
3503 (_initialize_tracepoint): Likewise.
3504 * remote.c (extended_remote_target::create_inferior): Use GNU
3505 style for metasyntactic variables.
3506 * sparc64-tdep.c (adi_examine_command): Use GNU style for
3507 metasyntactic variables.
3508 (adi_assign_command): Likewise.
3509
3510 2018-09-16 Tom Tromey <tom@tromey.com>
3511
3512 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3513 metasyntactic variables. Print message if no disassembler options
3514 are available.
3515
3516 2018-09-15 Tom Tromey <tom@tromey.com>
3517
3518 * infcmd.c (get_inferior_args): Return const char *.
3519 * inferior.h (get_inferior_args): Return type now const.
3520 * linux-tdep.c (linux_fill_prpsinfo): Update.
3521 * procfs.c (procfs_target::make_corefile_notes): Update.
3522
3523 2018-09-07 Tom Tromey <tom@tromey.com>
3524
3525 * python/python.c (execute_gdb_command): Call bpstat_do_actions
3526 inside the TRY.
3527
3528 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
3529
3530 * nios2-tdep.c (nios2_type_align): New.
3531 (nios2_gdb_arch_init): Install type_align hook.
3532
3533 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3534
3535 * eval.c (fake_method::fake_method): Call xzalloc directly for a
3536 type that is neither object file owned, nor gdbarch owned.
3537 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3538 gdbarch is non-NULL.
3539 (alloc_type_instance): Allocate non-objfile owned types on the
3540 gdbarch obstack.
3541 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3542 using TYPE_ALLOC to ensure memory is allocated on the correct
3543 obstack.
3544 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3545 obstack, or the gdbarch obstack.
3546 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3547
3548 2018-09-14 Tom Tromey <tom@tromey.com>
3549
3550 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3551 block.
3552
3553 2018-09-14 Tom Tromey <tom@tromey.com>
3554
3555 * nat/fork-inferior.c (get_startup_shell): Remove "static".
3556
3557 2018-09-13 Tom Tromey <tom@tromey.com>
3558
3559 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3560 static.
3561
3562 2018-09-13 Tom Tromey <tom@tromey.com>
3563
3564 * exec.c (try_open_exec_file): Use std::string.
3565
3566 2018-09-13 Tom Tromey <tom@tromey.com>
3567
3568 * utils.h (gdb_bfd_errmsg): Return std::string.
3569 * exec.c (exec_file_attach): Update.
3570 * compile/compile-object-load.c (compile_object_load): Update.
3571 * utils.c (gdb_bfd_errmsg): Return std::string.
3572
3573 2018-09-13 Tom Tromey <tom@tromey.com>
3574
3575 * procfs.c (struct procinfo_deleter): New.
3576 (procinfo_up): New typedef.
3577 (do_destroy_procinfo_cleanup): Remove.
3578 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
3579
3580 2018-09-13 Tom Tromey <tom@tromey.com>
3581
3582 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3583
3584 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3585 2018-09-13 Tom Tromey <tom@tromey.com>
3586
3587 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3588 (pspy_get_objfiles): New function.
3589 (progspace_object_methods): New.
3590 (pspace_object_type): Add tp_methods callback.
3591 * python/python-internal.h (build_objfiles_list): New
3592 declaration.
3593 * python/python.c (build_objfiles_list): New function.
3594 (gdbpy_objfiles): Implement using build_objfiles_list.
3595 * NEWS: Mention the Progspace.objfiles method.
3596
3597 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3598
3599 * python/py-inferior.c (infpy_get_progspace): New function.
3600 (inferior_object_getset): Add progspace property.
3601 * NEWS: Mention the new property.
3602
3603 2018-09-13 Tom Tromey <tom@tromey.com>
3604
3605 PR rust/23650:
3606 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3607
3608 2018-09-13 Tom Tromey <tom@tromey.com>
3609
3610 PR rust/23626:
3611 * rust-lang.c (rust_enum_variant): Now static.
3612 (rust_empty_enum_p): New function.
3613 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3614 Handle empty enum.
3615
3616 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3617
3618 * python/py-inferior.c (infpy_repr): New.
3619 (inferior_object_type): Register infpy_repr.
3620 * python/py-objfile.c (objfpy_repr): New.
3621 (objfile_object_type): Register objfpy_repr.
3622
3623 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3624
3625 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3626
3627 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3628
3629 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3630 typo.
3631
3632 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
3633
3634 * common/common-utils.c: Don't include '<sys/stat.h>'.
3635 (is_regular_file): Move to...
3636 * common/filestuff.c (is_regular_file): ... here.
3637 * common/common-utils.h (is_regular_file): Move to...
3638 * common/filestuff.h (is_regular_file): ... here.
3639
3640 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
3641
3642 * skip.c (debug_skip): New variable.
3643 (skiplist_entry::do_skip_file_p): Add debug output.
3644 (skiplist_entry::do_skip_gfile_p): Likewise.
3645 (skiplist_entry::skip_function_p): Likewise.
3646 (_initialize_step_skip): Create debug command.
3647 * NEWS: Mention set/show debug skip.
3648
3649 2018-09-11 Xavier Roirand <roirand@adacore.com>
3650
3651 * darwin-nat.c (should_disable_startup_with_shell):
3652 New function.
3653 (darwin_nat_target::create_inferior): Add call.
3654
3655 2018-09-11 Xavier Roirand <roirand@adacore.com>
3656
3657 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3658 inf_port, msg_state>: Initialize.
3659 (struct darwin_thread_info) <signaled, single_step>: Change
3660 type and initialize.
3661 (struct darwin_thread_info) <event>: Initialize.
3662
3663 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3664
3665 PR gdb/23555
3666 PR gdb/23558
3667 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3668 guesses.
3669
3670 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3671
3672 Revert:
3673 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
3674
3675 PR gdb/23555
3676 PR gdb/23558
3677 * gnulib/aclocal.m4: Regenerate.
3678 * gnulib/config.in: Regenerate.
3679 * gnulib/configure: Regenerate.
3680 * gnulib/import/Makefile.am: Update.
3681 * gnulib/import/Makefile.in: Update.
3682 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3683 * gnulib/import/_Noreturn.h: ... this.
3684 * gnulib/import/alloca.in.h: Update.
3685 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3686 * gnulib/import/arg-nonnull.h: ... this.
3687 * gnulib/import/assure.h: Update.
3688 * gnulib/import/at-func.c: Update.
3689 * gnulib/import/basename-lgpl.c: Update.
3690 * gnulib/import/extra/snippet/c++defs.h: Rename to...
3691 * gnulib/import/c++defs.h: ... this.
3692 * gnulib/import/canonicalize-lgpl.c: Update.
3693 * gnulib/import/cdefs.h: Update.
3694 * gnulib/import/chdir-long.c: Update.
3695 * gnulib/import/chdir-long.h: Update.
3696 * gnulib/import/cloexec.c: Update.
3697 * gnulib/import/cloexec.h: Update.
3698 * gnulib/import/close.c: Update.
3699 * gnulib/import/closedir.c: Update.
3700 * gnulib/import/config.charset: Update.
3701 * gnulib/import/dirent-private.h: Update.
3702 * gnulib/import/dirent.in.h: Update.
3703 * gnulib/import/dirfd.c: Update.
3704 * gnulib/import/dirname-lgpl.c: Update.
3705 * gnulib/import/dirname.h: Update.
3706 * gnulib/import/dosname.h: Update.
3707 * gnulib/import/dup-safer-flag.c: Update.
3708 * gnulib/import/dup-safer.c: Update.
3709 * gnulib/import/dup.c: Update.
3710 * gnulib/import/dup2.c: Update.
3711 * gnulib/import/errno.in.h: Update.
3712 * gnulib/import/error.c: Update.
3713 * gnulib/import/error.h: Update.
3714 * gnulib/import/exitfail.c: Update.
3715 * gnulib/import/exitfail.h: Update.
3716 * gnulib/import/extra/update-copyright: Update.
3717 * gnulib/import/fchdir.c: Update.
3718 * gnulib/import/fcntl.c: Update.
3719 * gnulib/import/fcntl.in.h: Update.
3720 * gnulib/import/fd-hook.c: Update.
3721 * gnulib/import/fd-hook.h: Update.
3722 * gnulib/import/fd-safer-flag.c: Update.
3723 * gnulib/import/fd-safer.c: Update.
3724 * gnulib/import/fdopendir.c: Update.
3725 * gnulib/import/filename.h: Update.
3726 * gnulib/import/filenamecat-lgpl.c: Update.
3727 * gnulib/import/filenamecat.h: Update.
3728 * gnulib/import/flexmember.h: Update.
3729 * gnulib/import/float+.h: Update.
3730 * gnulib/import/float.c: Update.
3731 * gnulib/import/float.in.h: Update.
3732 * gnulib/import/fnmatch.c: Update.
3733 * gnulib/import/fnmatch.in.h: Update.
3734 * gnulib/import/fnmatch_loop.c: Update.
3735 * gnulib/import/fpucw.h: Update.
3736 * gnulib/import/frexp.c: Update.
3737 * gnulib/import/frexpl.c: Update.
3738 * gnulib/import/fstat.c: Update.
3739 * gnulib/import/fstatat.c: Update.
3740 * gnulib/import/getcwd-lgpl.c: Update.
3741 * gnulib/import/getcwd.c: Update.
3742 * gnulib/import/getdtablesize.c: Update.
3743 * gnulib/import/getlogin_r.c: Update.
3744 * gnulib/import/getprogname.c: Update.
3745 * gnulib/import/getprogname.h: Update.
3746 * gnulib/import/gettext.h: Update.
3747 * gnulib/import/gettimeofday.c: Update.
3748 * gnulib/import/glob-libc.h: Update.
3749 * gnulib/import/glob.c: Update.
3750 * gnulib/import/glob.in.h: Update.
3751 * gnulib/import/glob_internal.h: Update.
3752 * gnulib/import/glob_pattern_p.c: Update.
3753 * gnulib/import/globfree.c: Update.
3754 * gnulib/import/hard-locale.c: Update.
3755 * gnulib/import/hard-locale.h: Update.
3756 * gnulib/import/intprops.h: Update.
3757 * gnulib/import/inttypes.in.h: Update.
3758 * gnulib/import/isnan.c: Update.
3759 * gnulib/import/isnand-nolibm.h: Update.
3760 * gnulib/import/isnand.c: Update.
3761 * gnulib/import/isnanl-nolibm.h: Update.
3762 * gnulib/import/isnanl.c: Update.
3763 * gnulib/import/itold.c: Update.
3764 * gnulib/import/libc-config.h: Update.
3765 * gnulib/import/limits.in.h: Update.
3766 * gnulib/import/localcharset.c: Update.
3767 * gnulib/import/localcharset.h: Update.
3768 * gnulib/import/localtime-buffer.c: Update.
3769 * gnulib/import/localtime-buffer.h: Update.
3770 * gnulib/import/lstat.c: Update.
3771 * gnulib/import/m4/00gnulib.m4: Update.
3772 * gnulib/import/m4/__inline.m4: Update.
3773 * gnulib/import/m4/absolute-header.m4: Update.
3774 * gnulib/import/m4/alloca.m4: Update.
3775 * gnulib/import/m4/builtin-expect.m4: Update.
3776 * gnulib/import/m4/canonicalize.m4: Update.
3777 * gnulib/import/m4/chdir-long.m4: Update.
3778 * gnulib/import/m4/close.m4: Update.
3779 * gnulib/import/m4/closedir.m4: Update.
3780 * gnulib/import/m4/configmake.m4: Update.
3781 * gnulib/import/m4/d-ino.m4: Update.
3782 * gnulib/import/m4/d-type.m4: Update.
3783 * gnulib/import/m4/dirent_h.m4: Update.
3784 * gnulib/import/m4/dirfd.m4: Update.
3785 * gnulib/import/m4/dirname.m4: Update.
3786 * gnulib/import/m4/double-slash-root.m4: Update.
3787 * gnulib/import/m4/dup.m4: Update.
3788 * gnulib/import/m4/dup2.m4: Update.
3789 * gnulib/import/m4/eealloc.m4: Update.
3790 * gnulib/import/m4/environ.m4: Update.
3791 * gnulib/import/m4/errno_h.m4: Update.
3792 * gnulib/import/m4/error.m4: Update.
3793 * gnulib/import/m4/exponentd.m4: Update.
3794 * gnulib/import/m4/exponentl.m4: Update.
3795 * gnulib/import/m4/extensions.m4: Update.
3796 * gnulib/import/m4/extern-inline.m4: Update.
3797 * gnulib/import/m4/fchdir.m4: Update.
3798 * gnulib/import/m4/fcntl-o.m4: Update.
3799 * gnulib/import/m4/fcntl.m4: Update.
3800 * gnulib/import/m4/fcntl_h.m4: Update.
3801 * gnulib/import/m4/fdopendir.m4: Update.
3802 * gnulib/import/m4/filenamecat.m4: Update.
3803 * gnulib/import/m4/flexmember.m4: Update.
3804 * gnulib/import/m4/float_h.m4: Update.
3805 * gnulib/import/m4/fnmatch.m4: Update.
3806 * gnulib/import/m4/fnmatch_h.m4: Update.
3807 * gnulib/import/m4/fpieee.m4: Update.
3808 * gnulib/import/m4/frexp.m4: Update.
3809 * gnulib/import/m4/frexpl.m4: Update.
3810 * gnulib/import/m4/fstat.m4: Update.
3811 * gnulib/import/m4/fstatat.m4: Update.
3812 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3813 * gnulib/import/m4/getcwd-path-max.m4: Update.
3814 * gnulib/import/m4/getcwd.m4: Update.
3815 * gnulib/import/m4/getdtablesize.m4: Update.
3816 * gnulib/import/m4/getlogin.m4: Update.
3817 * gnulib/import/m4/getlogin_r.m4: Update.
3818 * gnulib/import/m4/getpagesize.m4: Update.
3819 * gnulib/import/m4/getprogname.m4: Update.
3820 * gnulib/import/m4/gettimeofday.m4: Update.
3821 * gnulib/import/m4/glibc21.m4: Update.
3822 * gnulib/import/m4/glob.m4: Update.
3823 * gnulib/import/m4/glob_h.m4: Update.
3824 * gnulib/import/m4/gnulib-cache.m4: Update.
3825 * gnulib/import/m4/gnulib-common.m4: Update.
3826 * gnulib/import/m4/gnulib-comp.m4: Update.
3827 * gnulib/import/m4/gnulib-tool.m4: Update.
3828 * gnulib/import/m4/hard-locale.m4: Update.
3829 * gnulib/import/m4/include_next.m4: Update.
3830 * gnulib/import/m4/inttypes-pri.m4: Update.
3831 * gnulib/import/m4/inttypes.m4: Update.
3832 * gnulib/import/m4/isnand.m4: Update.
3833 * gnulib/import/m4/isnanl.m4: Update.
3834 * gnulib/import/m4/largefile.m4: Update.
3835 * gnulib/import/m4/limits-h.m4: Update.
3836 * gnulib/import/m4/localcharset.m4: Update.
3837 * gnulib/import/m4/locale-fr.m4: Update.
3838 * gnulib/import/m4/locale-ja.m4: Update.
3839 * gnulib/import/m4/locale-zh.m4: Update.
3840 * gnulib/import/m4/localtime-buffer.m4: Update.
3841 * gnulib/import/m4/longlong.m4: Update.
3842 * gnulib/import/m4/lstat.m4: Update.
3843 * gnulib/import/m4/malloc.m4: Update.
3844 * gnulib/import/m4/malloca.m4: Update.
3845 * gnulib/import/m4/math_h.m4: Update.
3846 * gnulib/import/m4/mbrtowc.m4: Update.
3847 * gnulib/import/m4/mbsinit.m4: Update.
3848 * gnulib/import/m4/mbsrtowcs.m4: Update.
3849 * gnulib/import/m4/mbstate_t.m4: Update.
3850 * gnulib/import/m4/memchr.m4: Update.
3851 * gnulib/import/m4/memmem.m4: Update.
3852 * gnulib/import/m4/mempcpy.m4: Update.
3853 * gnulib/import/m4/memrchr.m4: Update.
3854 * gnulib/import/m4/mkdir.m4: Update.
3855 * gnulib/import/m4/mkstemp.m4: Update.
3856 * gnulib/import/m4/mmap-anon.m4: Update.
3857 * gnulib/import/m4/mode_t.m4: Update.
3858 * gnulib/import/m4/msvc-inval.m4: Update.
3859 * gnulib/import/m4/msvc-nothrow.m4: Update.
3860 * gnulib/import/m4/multiarch.m4: Update.
3861 * gnulib/import/m4/nocrash.m4: Update.
3862 * gnulib/import/m4/off_t.m4: Update.
3863 * gnulib/import/m4/onceonly.m4: Update.
3864 * gnulib/import/m4/open-cloexec.m4: Update.
3865 * gnulib/import/m4/open.m4: Update.
3866 * gnulib/import/m4/openat.m4: Update.
3867 * gnulib/import/m4/opendir.m4: Update.
3868 * gnulib/import/m4/pathmax.m4: Update.
3869 * gnulib/import/m4/rawmemchr.m4: Update.
3870 * gnulib/import/m4/readdir.m4: Update.
3871 * gnulib/import/m4/readlink.m4: Update.
3872 * gnulib/import/m4/realloc.m4: Update.
3873 * gnulib/import/m4/rename.m4: Update.
3874 * gnulib/import/m4/rewinddir.m4: Update.
3875 * gnulib/import/m4/rmdir.m4: Update.
3876 * gnulib/import/m4/save-cwd.m4: Update.
3877 * gnulib/import/m4/secure_getenv.m4: Update.
3878 * gnulib/import/m4/setenv.m4: Update.
3879 * gnulib/import/m4/signal_h.m4: Update.
3880 * gnulib/import/m4/ssize_t.m4: Update.
3881 * gnulib/import/m4/stat-time.m4: Update.
3882 * gnulib/import/m4/stat.m4: Update.
3883 * gnulib/import/m4/std-gnu11.m4: Update.
3884 * gnulib/import/m4/stdbool.m4: Update.
3885 * gnulib/import/m4/stddef_h.m4: Update.
3886 * gnulib/import/m4/stdint.m4: Update.
3887 * gnulib/import/m4/stdio_h.m4: Update.
3888 * gnulib/import/m4/stdlib_h.m4: Update.
3889 * gnulib/import/m4/strchrnul.m4: Update.
3890 * gnulib/import/m4/strdup.m4: Update.
3891 * gnulib/import/m4/strerror.m4: Update.
3892 * gnulib/import/m4/string_h.m4: Update.
3893 * gnulib/import/m4/strstr.m4: Update.
3894 * gnulib/import/m4/strtok_r.m4: Update.
3895 * gnulib/import/m4/sys_socket_h.m4: Update.
3896 * gnulib/import/m4/sys_stat_h.m4: Update.
3897 * gnulib/import/m4/sys_time_h.m4: Update.
3898 * gnulib/import/m4/sys_types_h.m4: Update.
3899 * gnulib/import/m4/tempname.m4: Update.
3900 * gnulib/import/m4/time_h.m4: Update.
3901 * gnulib/import/m4/unistd-safer.m4: Update.
3902 * gnulib/import/m4/unistd_h.m4: Update.
3903 * gnulib/import/m4/warn-on-use.m4: Update.
3904 * gnulib/import/m4/wchar_h.m4: Update.
3905 * gnulib/import/m4/wchar_t.m4: Update.
3906 * gnulib/import/m4/wctype_h.m4: Update.
3907 * gnulib/import/m4/wint_t.m4: Update.
3908 * gnulib/import/malloc.c: Update.
3909 * gnulib/import/malloc/scratch_buffer.h: Update.
3910 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3911 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3912 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3913 * gnulib/import/malloca.c: Update.
3914 * gnulib/import/malloca.h: Update.
3915 * gnulib/import/malloca.valgrind: Update.
3916 * gnulib/import/math.in.h: Update.
3917 * gnulib/import/mbrtowc.c: Update.
3918 * gnulib/import/mbsinit.c: Update.
3919 * gnulib/import/mbsrtowcs-impl.h: Update.
3920 * gnulib/import/mbsrtowcs-state.c: Update.
3921 * gnulib/import/mbsrtowcs.c: Update.
3922 * gnulib/import/memchr.c: Update.
3923 * gnulib/import/memmem.c: Update.
3924 * gnulib/import/mempcpy.c: Update.
3925 * gnulib/import/memrchr.c: Update.
3926 * gnulib/import/mkdir.c: Update.
3927 * gnulib/import/mkstemp.c: Update.
3928 * gnulib/import/msvc-inval.c: Update.
3929 * gnulib/import/msvc-inval.h: Update.
3930 * gnulib/import/msvc-nothrow.c: Update.
3931 * gnulib/import/msvc-nothrow.h: Update.
3932 * gnulib/import/open.c: Update.
3933 * gnulib/import/openat-die.c: Update.
3934 * gnulib/import/openat-priv.h: Update.
3935 * gnulib/import/openat-proc.c: Update.
3936 * gnulib/import/openat.c: Update.
3937 * gnulib/import/openat.h: Update.
3938 * gnulib/import/opendir.c: Update.
3939 * gnulib/import/pathmax.h: Update.
3940 * gnulib/import/pipe-safer.c: Update.
3941 * gnulib/import/rawmemchr.c: Update.
3942 * gnulib/import/readdir.c: Update.
3943 * gnulib/import/readlink.c: Update.
3944 * gnulib/import/realloc.c: Update.
3945 * gnulib/import/ref-add.sin: Update.
3946 * gnulib/import/ref-del.sin: Update.
3947 * gnulib/import/rename.c: Update.
3948 * gnulib/import/rewinddir.c: Update.
3949 * gnulib/import/rmdir.c: Update.
3950 * gnulib/import/same-inode.h: Update.
3951 * gnulib/import/save-cwd.c: Update.
3952 * gnulib/import/save-cwd.h: Update.
3953 * gnulib/import/scratch_buffer.h: Update.
3954 * gnulib/import/secure_getenv.c: Update.
3955 * gnulib/import/setenv.c: Update.
3956 * gnulib/import/signal.in.h: Update.
3957 * gnulib/import/stat-time.c: Update.
3958 * gnulib/import/stat-time.h: Update.
3959 * gnulib/import/stat-w32.c: Update.
3960 * gnulib/import/stat-w32.h: Update.
3961 * gnulib/import/stat.c: Update.
3962 * gnulib/import/stdbool.in.h: Update.
3963 * gnulib/import/stddef.in.h: Update.
3964 * gnulib/import/stdint.in.h: Update.
3965 * gnulib/import/stdio.in.h: Update.
3966 * gnulib/import/stdlib.in.h: Update.
3967 * gnulib/import/str-two-way.h: Update.
3968 * gnulib/import/strchrnul.c: Update.
3969 * gnulib/import/strdup.c: Update.
3970 * gnulib/import/streq.h: Update.
3971 * gnulib/import/strerror-override.c: Update.
3972 * gnulib/import/strerror-override.h: Update.
3973 * gnulib/import/strerror.c: Update.
3974 * gnulib/import/string.in.h: Update.
3975 * gnulib/import/stripslash.c: Update.
3976 * gnulib/import/strnlen1.c: Update.
3977 * gnulib/import/strnlen1.h: Update.
3978 * gnulib/import/strstr.c: Update.
3979 * gnulib/import/strtok_r.c: Update.
3980 * gnulib/import/sys_stat.in.h: Update.
3981 * gnulib/import/sys_time.in.h: Update.
3982 * gnulib/import/sys_types.in.h: Update.
3983 * gnulib/import/tempname.c: Update.
3984 * gnulib/import/tempname.h: Update.
3985 * gnulib/import/time.in.h: Update.
3986 * gnulib/import/unistd--.h: Update.
3987 * gnulib/import/unistd-safer.h: Update.
3988 * gnulib/import/unistd.in.h: Update.
3989 * gnulib/import/unsetenv.c: Update.
3990 * gnulib/import/verify.h: Update.
3991 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3992 * gnulib/import/wchar.in.h: Update.
3993 * gnulib/import/wctype.in.h: Update.
3994 * gnulib/import/xalloc-oversized.h: Update.
3995 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3996 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3997
3998 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
3999
4000 * record-btrace.c (get_thread_current_frame): Remove
4001 old_inferior_ptid.
4002
4003 2018-09-10 Jerome Guitton <guitton@adacore.com>
4004
4005 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
4006 with check_tag to 1 if and only if the type is tagged and the
4007 component being searched cannot been found in the current
4008 view. Otherwise, always call ada_to_fixed_type with
4009 check_tag to 0.
4010
4011 2018-09-10 Xavier Roirand <roirand@adacore.com>
4012
4013 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
4014 declaration.
4015 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
4016 * ada-varobj.c (ada_varobj_get_number_of_children,
4017 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
4018
4019 2018-09-10 Xavier Roirand <roirand@adacore.com>
4020
4021 * ada-valprint.c (ada_value_print): Use type instead of
4022 enclosing type.
4023
4024 2018-09-10 Xavier Roirand <roirand@adacore.com>
4025
4026 * ada-lang.c (ada_value_subscript): Handle case when parameter is
4027 an array of access to unconstrained array.
4028
4029 2018-09-10 Xavier Roirand <roirand@adacore.com>
4030
4031 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
4032 (ada_check_typedef): Use it.
4033
4034 2018-09-10 Xavier Roirand <roirand@adacore.com>
4035
4036 * ada-varobj.c (ada_varobj_describe_struct_child)
4037 (ada_varobj_describe_child): Handle union case like struct one.
4038
4039 2018-09-10 Tom Tromey <tom@tromey.com>
4040
4041 PR python/18380:
4042 * python/python.c (_initialize_python): Make example in "python"
4043 help work in Python 3.
4044
4045 2018-09-10 Eli Zaretskii <eliz@gnu.org>
4046
4047 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
4048 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
4049 $(EXEEXT) to the script, as it is not a program.
4050
4051 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
4052
4053 * python/py-prettyprint.c (pretty_print_one_value): Return
4054 gdbpy_ref<>.
4055 (print_string_repr): Adjust.
4056 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
4057 * python/python-internal.h (apply_varobj_pretty_printer): Return
4058 gdbpy_ref<>.
4059 * varobj.c (varobj_value_get_print_value): Adjust.
4060
4061 2018-09-08 Tom Tromey <tom@tromey.com>
4062
4063 PR python/16047:
4064 * python/py-prettyprint.c (pretty_print_one_value): Check for
4065 to_string method.
4066
4067 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4068
4069 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
4070 replace_operator_with_call.
4071
4072 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4073
4074 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
4075
4076 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4077
4078 * ada-typeprint.c (print_range): Print the bounds using TYPE
4079 rather than its TYPE_TARGET_TYPE.
4080
4081 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4082
4083 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4084 call to ada_to_fixed_value_create.
4085
4086 2018-09-08 Jerome Guitton <guitton@adacore.com>
4087
4088 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
4089
4090 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4091
4092 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
4093 by calls to error.
4094
4095 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4096
4097 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
4098 Move update of loop variable "fi".
4099
4100 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4101
4102 * ada-lang.c (value_assign_to_component): In the case of
4103 big-endian targets, extract the bits of the given VAL
4104 using an src_offset of zero if container is not a scalar.
4105
4106 2018-09-06 Simon Ser <contact@emersion.fr>
4107
4108 PR gdb/23105
4109 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4110 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4111 * fbsd-tdep.c (fbsd_make_note_desc): New.
4112 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4113 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4114 * target.h (enum target_object) Add FreeBSD-specific
4115 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4116
4117 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4118
4119 * compile/compile-c.h (generate_c_for_variable_locations):
4120 Change reference to pointer.
4121 * compile/compile-c-support.c (compile_program) <compute>:
4122 Likewise.
4123 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4124 (generate_c_for_for_one_variable): Likewise
4125 (generate_c_for_variable_locations): Likewise
4126 * compile/compile-c-types.c (compile_c_instance::convert_type):
4127 Likewise
4128 * compile/compile-cplus-symbols.c (convert_one_symbol):
4129 std::move the scope passed to enter_scope.
4130 * compile/compile-cplus-types.c
4131 (compile_cplus_instance::enter_scope): Make parameter
4132 rvalue-reference.
4133 (compile_cplus_instance::new_scope): Change reference to
4134 pointer.
4135 (compile_cplus_instance::convert_type): Likewise
4136 (compile_cplus_convert_typedef): std::move the scope passed to
4137 enter_scope.
4138 (compile_cplus_convert_struct_or_union): Likewise.
4139 (compile_cplus_convert_enum): Likewise.
4140 (compile_cplus_convert_namespace): Likewise.
4141 * compile/compile-cplus.h (compile_cplus_instance)
4142 <enter_scope>: Make parameter rvalue-reference.
4143 * compile/compile-internal.h (compile_instance)
4144 <get_cached_type>: Likewise
4145 * compile/compile-loc2c.c (push): Likewise
4146 (pushf): Likewise
4147 (unary): Likewise
4148 (binary): Likewise
4149 (print_label): Likewise
4150 (pushf_register_address): Likewise
4151 (pushf_register): Likewise
4152 (do_compile_dwarf_expr_to_c): Likewise
4153 (compile_dwarf_expr_to_c): Likewise
4154 (compile_dwarf_bounds_to_c): Likewise
4155 * compile/compile.c (compile_instance::get_cached_type):
4156 Likewise
4157 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4158 (compile_dwarf_bounds_to_c): Likewise
4159 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4160 (dwarf2_compile_property_to_c): Likewise
4161 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4162 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4163 Likewise
4164
4165 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4166
4167 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4168 * tui/tui-data.c (init_content_element): Don't initialize it.
4169
4170 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4171
4172 * tui/tui-data.h (struct tui_win_info)
4173 <detail::opaque>: Remove.
4174 * tui/tui-data.c (init_win_info): Remove assignment.
4175
4176 2018-09-05 Tom Tromey <tom@tromey.com>
4177
4178 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4179 -Wformat-nonliteral.
4180 * target-float.c (host_float_ops<T>::to_string)
4181 (host_float_ops<T>::from_string): Use
4182 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4183 * configure: Rebuild.
4184
4185 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
4186
4187 * printcmd.c (printf_c_string): Use
4188 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4189 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4190
4191 2018-09-05 Tom Tromey <tom@tromey.com>
4192
4193 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4194
4195 2018-09-05 Tom de Vries <tdevries@suse.de>
4196
4197 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4198 with resolve_abstract_p == true.
4199 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4200 defaulting to false. Propagate resolve_abstract_p to
4201 dwarf2_fetch_die_loc_sect_off.
4202 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4203 parameter, defaulting to false.
4204 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4205 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4206 parameter.
4207 * dwarf2read.h (struct die_info): Forward-declare.
4208 (die_info_ptr): New typedef.
4209 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4210
4211 2018-09-05 Joel Brobecker <brobecker@adacore.com>
4212
4213 GDB 8.2 released.
4214
4215 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
4216 Pedro Alves <palves@redhat.com>
4217
4218 * gnulib/Makefile.in (aclocal_m4_deps): Move to
4219 "aclocal-m4-deps.mk". Include file here.
4220 $(srcdir)/aclocal.m4: Add "configure.ac".
4221 * gnulib/aclocal-m4-deps.mk: New file.
4222 * gnulib/update-gnulib.sh: Automatically update
4223 "aclocal-m4-deps.mk".
4224
4225 2018-09-04 Tom Tromey <tom@tromey.com>
4226
4227 * configure: Rebuild.
4228 * configure.ac: Remove multi-ice code.
4229
4230 2018-09-04 Tom Tromey <tom@tromey.com>
4231
4232 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4233 (ada-exp.o): Update.
4234
4235 2018-09-04 Tom Tromey <tom@tromey.com>
4236
4237 * Makefile.in (printcmd.o, target-float.o): Remove.
4238 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4239
4240 2018-09-04 Tom Tromey <tom@tromey.com>
4241
4242 * gnulib/Makefile.in: Remove obsolete comment.
4243 * Makefile.in: Remove obsolete comment.
4244
4245 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
4246
4247 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4248 line with '+'.
4249
4250 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
4251
4252 * riscv-tdep.c: Add 'prologue-value.h' include.
4253 (struct riscv_unwind_cache): New struct.
4254 (riscv_debug_unwinder): New global.
4255 (riscv_scan_prologue): Update arguments, capture register details
4256 from prologue scan.
4257 (riscv_skip_prologue): Reformat arguments line, move end of
4258 prologue calculation into riscv_scan_prologue.
4259 (riscv_frame_cache): Update return type, create
4260 riscv_unwind_cache, scan the prologue, and fill in remaining cache
4261 details.
4262 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4263 (riscv_frame_prev_register): Use the trad_frame within the
4264 riscv_unwind_cache.
4265 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4266 flag.
4267
4268 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
4269
4270 * trad-frame.h (trad_frame_set_realreg): Declare.
4271 (trad_frame_set_addr): Declare.
4272 * trad-frame.c (trad_frame_set_realreg): Define new function.
4273 (trad_frame_set_addr): Define new function.
4274 (trad_frame_set_reg_realreg): Use new function.
4275 (trad_frame_set_reg_addr): Use new function.
4276
4277 2018-09-01 Keith Seitz <keiths@redhat.com>
4278
4279 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4280 pulongest instead of "%lld".
4281 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4282 ATTRIBUTE_UNUSED.
4283
4284 2018-08-31 Tom Tromey <tom@tromey.com>
4285
4286 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4287 variant part type.
4288
4289 2018-08-31 Pedro Alves <palves@redhat.com>
4290
4291 * gdbarch.h: Regenerate.
4292
4293 2018-08-31 Pedro Alves <palves@redhat.com>
4294
4295 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4296 * target.h (Hardware watchpoint interfaces): Describe
4297 continuable/steppable/non-steppable watchpoints.
4298 * gdbarch.h, gdbarch.c: Regenerate.
4299
4300 2018-08-31 Pedro Alves <palves@redhat.com>
4301
4302 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4303 Delete.
4304 * s390-linux-nat.c
4305 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4306 * target.h (target_ops::have_continuable_watchpoint): Delete.
4307 (target_have_continuable_watchpoint): Delete.
4308 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4309 * target-delegates.c: Regenerate.
4310
4311 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4312
4313 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4314 the files present in "gnulib/import/m4/".
4315
4316 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
4317
4318 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4319 c.sw, c.swsp, and c.sdsp.
4320
4321 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
4322
4323 * riscv-tdep.c (struct riscv_inferior_data): Delete.
4324 (riscv_read_misa_reg): Don't cache value read into inferior data.
4325 (riscv_new_inferior_data): Delete.
4326 (riscv_inferior_data_cleanup): Delete.
4327 (riscv_inferior_data): Delete.
4328 (riscv_invalidate_inferior_data): Delete.
4329 (_initialize_riscv_tdep): Remove initialisation of inferior data.
4330
4331 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
4332
4333 * compile/compile-cplus-types.c
4334 (compile_cplus_instance::leave_scope): Take the address of scope
4335 object.
4336 (compile_cplus_instance::convert_qualified_base): Compare quals
4337 to 0.
4338
4339 2018-08-30 Keith Seitz <keiths@redhat.com>
4340
4341 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4342 Use "%s" and host_address_to_string instead of "%p" in printf.
4343
4344 2018-08-29 Keith Seitz <keiths@redhat.com>
4345
4346 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4347 and compile-cplus-types.c.
4348 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4349 * c-lang.c (cplus_language_defn): Set C++ compile functions.
4350 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4351 Declare.
4352 * compile/compile-c-support.c: Include compile-cplus.h.
4353 (load_libcompile): Templatize.
4354 (get_compile_context): "New" function.
4355 (c_get_compile_context): Use get_compile_context.
4356 (cplus_get_compile_context): New function.
4357 (cplus_push_user_expression, cplus_pop_user_expression)
4358 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4359 (cplus_compute_program): Define new structs/functions.
4360 * compile/compile-cplus-symmbols.c: New file.
4361 * compile/compile-cplus-types.c: New file.
4362 * compile/compile-cplus.h: New file.
4363 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4364 Declare.
4365 * compile/compile-object-load.c (get_out_value_type): Use
4366 strncmp_iw when comparing symbol names.
4367 (compile_object_load): Add mst_bss and mst_data.
4368 * compile/compile.c (_initialize_compile): Remove
4369 -Wno-implicit-function-declaration from `compile_args'.
4370 * compile/gcc-cp-plugin.h: New file.
4371 * NEWS: Mention C++ compile support and new debug options.
4372
4373 2018-08-29 Keith Seitz <keiths@redhat.com>
4374
4375 * linespec.c (collect_info::add_symbol): Make virtual.
4376 (struct symbol_searcher_collect_info): New struct.
4377 (symbol_searcher::find_all_symbols): New method.
4378 * symtab.h (class symbol_searcher): New class.
4379
4380 2018-08-29 Keith Seitz <keiths@redhat.com>
4381
4382 * linespec.c (struct linespec) <function_symbols, label_symbols>:
4383 Change to vector of block_symbol. Update all users.
4384 (struct collect_info) <symbols>: Likewise.
4385 (collect_info::add_symbol): Take block_symbol as argument.
4386 Update all callers.
4387 (decode_compound_collector) <m_symbols>: Change type to vector
4388 of block_symbol. Update all users.
4389 (decode_compound_collector::operator ()): Change parameter type
4390 to block_symbol.
4391 (find_method, find_function_symbols, find_linespec_symbols)
4392 (find_label_symbols_in_block, find_label_symbols): Change symbol
4393 vectors to block_symbol vectors.
4394 * symtab.h (symbol_found_callback_ftype): Change parameter type to
4395 block_symbol.
4396
4397 2018-08-29 Keith Seitz <keiths@redhat.com>
4398
4399 * linespec.c (symbolp): Remove typedef and VEC definitions.
4400 (bound_minimal_symbol_d): Likewise.
4401
4402 2018-08-29 Keith Seitz <keiths@redhat.com>
4403
4404 * linespec.c (decode_compound_collector::decode_compound_collector):
4405 Remove initialization for `m_symtabs'.
4406 (decode_compound_collector::release_symbols): Change return type
4407 to std::vector. Update all callers.
4408 (class decode_compound_collector) <m_symbols>: Change type to
4409 std::vector.
4410 (lookup_prefix_sym): Change return type to std::vector. Update all
4411 callers.
4412 (compare_symbols): Remove.
4413 (std_compare_symbols): Rename to `compare_symbols'.
4414 (find_method): Change `sym_classes' parameter to std::vector.
4415 Update all callers. Use std::sort to sort sym_classes.
4416 (find_linespec_symbols): Remove cleanup.
4417
4418 2018-08-29 Keith Seitz <keiths@redhat.com>
4419
4420 * linespec.c (struct linespec) <minimal_symbols>: Change type to
4421 std::vector. Update all users.
4422 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4423 (struct collect_info) <minimal_symbols>: Likewise.
4424 (compare_msymbols): Return bool. Change parameters to const
4425 bound_minimal_symbol references.
4426 (find_method, find_function_symbols, find_linespec_symbols): Change
4427 `minsyms' parameter to std::vector. Update all callers.
4428
4429 2018-08-29 Keith Seitz <keiths@redhat.com>
4430
4431 * linespec.c (struct linespec) <label_symbols>: Change type to
4432 std::vector. Update all users.
4433 (find_label_symbols_in_block): Change `result' parameter to
4434 std::vector. Update all callers.
4435 (find_label_symbols): Return std::vector. Update all callers.
4436
4437 2018-08-29 Keith Seitz <keiths@redhat.com>
4438
4439 * linespec.c (struct linespec) <function_symbols>: Change type to
4440 std::vector. Update all users.
4441 (struct collect_info) <function_symbols>: Likewise.
4442 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4443 (std_compare_symbols): New function.
4444 (find_method, find_function_symbols, find_linespec_symbols)
4445 (find_label_symbols_in_block): Change `symbols' parameter to
4446 std::vector. Update all callers.
4447 (find_label_symbols): Likewise for `function_symbols' and
4448 `label_funcs_ret'.
4449
4450 2018-08-29 Keith Seitz <keiths@redhat.com>
4451
4452 * linespec.c (symtab_vector_up): Define.
4453 (struct linespec) <file_symtabs>: Change type to std::vector *.
4454 Update all uses.
4455 (struct collect_info) <file_symtabs>: Likewise.
4456 (collect_symtabs_from_filename): Return symtab_vector_up.
4457 Update all callers.
4458 (decode_objc): Remove cleanup.
4459 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4460 (symtab_collector::release_symtabs): Return symtab_vector_up.
4461 Update all callers.
4462 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4463 Update all users.
4464 (collect_symtabs_from_filename, symtabs_from_filename): Return
4465 symtab_vector_up. Update all callers.
4466
4467 2018-08-29 Tom Tromey <tom@tromey.com>
4468
4469 * csky-tdep.c (csky_analyze_prologue): Use
4470 core_addr_to_string_nz.
4471
4472 2018-08-29 Tom Tromey <tom@tromey.com>
4473
4474 * windows-nat.c (struct xlate_exception) <them>: Change type to
4475 DWORD.
4476 (xlate): Fix formatting. Remove last entry.
4477 (struct xlate_exception, xlate): Comment out.
4478 (windows_nat_target::resume): Use ranged for.
4479
4480 2018-08-29 Jim Wilson <jimw@sifive.com>
4481
4482 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4483 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4484 of NT_PRFPREG.
4485 (riscv_linux_nat_target::store_registers): Likewise.
4486
4487 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
4488
4489 PR gdb/23555
4490 PR gdb/23558
4491 * gnulib/aclocal.m4: Regenerate.
4492 * gnulib/config.in: Regenerate.
4493 * gnulib/configure: Regenerate.
4494 * gnulib/import/Makefile.am: Update.
4495 * gnulib/import/Makefile.in: Update.
4496 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4497 * gnulib/import/_Noreturn.h: ... this.
4498 * gnulib/import/alloca.in.h: Update.
4499 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4500 * gnulib/import/arg-nonnull.h: ... this.
4501 * gnulib/import/assure.h: Update.
4502 * gnulib/import/at-func.c: Update.
4503 * gnulib/import/basename-lgpl.c: Update.
4504 * gnulib/import/extra/snippet/c++defs.h: Rename to...
4505 * gnulib/import/c++defs.h: ... this.
4506 * gnulib/import/canonicalize-lgpl.c: Update.
4507 * gnulib/import/cdefs.h: Update.
4508 * gnulib/import/chdir-long.c: Update.
4509 * gnulib/import/chdir-long.h: Update.
4510 * gnulib/import/cloexec.c: Update.
4511 * gnulib/import/cloexec.h: Update.
4512 * gnulib/import/close.c: Update.
4513 * gnulib/import/closedir.c: Update.
4514 * gnulib/import/config.charset: Update.
4515 * gnulib/import/dirent-private.h: Update.
4516 * gnulib/import/dirent.in.h: Update.
4517 * gnulib/import/dirfd.c: Update.
4518 * gnulib/import/dirname-lgpl.c: Update.
4519 * gnulib/import/dirname.h: Update.
4520 * gnulib/import/dosname.h: Update.
4521 * gnulib/import/dup-safer-flag.c: Update.
4522 * gnulib/import/dup-safer.c: Update.
4523 * gnulib/import/dup.c: Update.
4524 * gnulib/import/dup2.c: Update.
4525 * gnulib/import/errno.in.h: Update.
4526 * gnulib/import/error.c: Update.
4527 * gnulib/import/error.h: Update.
4528 * gnulib/import/exitfail.c: Update.
4529 * gnulib/import/exitfail.h: Update.
4530 * gnulib/import/extra/update-copyright: Update.
4531 * gnulib/import/fchdir.c: Update.
4532 * gnulib/import/fcntl.c: Update.
4533 * gnulib/import/fcntl.in.h: Update.
4534 * gnulib/import/fd-hook.c: Update.
4535 * gnulib/import/fd-hook.h: Update.
4536 * gnulib/import/fd-safer-flag.c: Update.
4537 * gnulib/import/fd-safer.c: Update.
4538 * gnulib/import/fdopendir.c: Update.
4539 * gnulib/import/filename.h: Update.
4540 * gnulib/import/filenamecat-lgpl.c: Update.
4541 * gnulib/import/filenamecat.h: Update.
4542 * gnulib/import/flexmember.h: Update.
4543 * gnulib/import/float+.h: Update.
4544 * gnulib/import/float.c: Update.
4545 * gnulib/import/float.in.h: Update.
4546 * gnulib/import/fnmatch.c: Update.
4547 * gnulib/import/fnmatch.in.h: Update.
4548 * gnulib/import/fnmatch_loop.c: Update.
4549 * gnulib/import/fpucw.h: Update.
4550 * gnulib/import/frexp.c: Update.
4551 * gnulib/import/frexpl.c: Update.
4552 * gnulib/import/fstat.c: Update.
4553 * gnulib/import/fstatat.c: Update.
4554 * gnulib/import/getcwd-lgpl.c: Update.
4555 * gnulib/import/getcwd.c: Update.
4556 * gnulib/import/getdtablesize.c: Update.
4557 * gnulib/import/getlogin_r.c: Update.
4558 * gnulib/import/getprogname.c: Update.
4559 * gnulib/import/getprogname.h: Update.
4560 * gnulib/import/gettext.h: Update.
4561 * gnulib/import/gettimeofday.c: Update.
4562 * gnulib/import/glob-libc.h: Update.
4563 * gnulib/import/glob.c: Update.
4564 * gnulib/import/glob.in.h: Update.
4565 * gnulib/import/glob_internal.h: Update.
4566 * gnulib/import/glob_pattern_p.c: Update.
4567 * gnulib/import/globfree.c: Update.
4568 * gnulib/import/hard-locale.c: Update.
4569 * gnulib/import/hard-locale.h: Update.
4570 * gnulib/import/intprops.h: Update.
4571 * gnulib/import/inttypes.in.h: Update.
4572 * gnulib/import/isnan.c: Update.
4573 * gnulib/import/isnand-nolibm.h: Update.
4574 * gnulib/import/isnand.c: Update.
4575 * gnulib/import/isnanl-nolibm.h: Update.
4576 * gnulib/import/isnanl.c: Update.
4577 * gnulib/import/itold.c: Update.
4578 * gnulib/import/libc-config.h: Update.
4579 * gnulib/import/limits.in.h: Update.
4580 * gnulib/import/localcharset.c: Update.
4581 * gnulib/import/localcharset.h: Update.
4582 * gnulib/import/localtime-buffer.c: Update.
4583 * gnulib/import/localtime-buffer.h: Update.
4584 * gnulib/import/lstat.c: Update.
4585 * gnulib/import/m4/00gnulib.m4: Update.
4586 * gnulib/import/m4/__inline.m4: Update.
4587 * gnulib/import/m4/absolute-header.m4: Update.
4588 * gnulib/import/m4/alloca.m4: Update.
4589 * gnulib/import/m4/builtin-expect.m4: Update.
4590 * gnulib/import/m4/canonicalize.m4: Update.
4591 * gnulib/import/m4/chdir-long.m4: Update.
4592 * gnulib/import/m4/close.m4: Update.
4593 * gnulib/import/m4/closedir.m4: Update.
4594 * gnulib/import/m4/configmake.m4: Update.
4595 * gnulib/import/m4/d-ino.m4: Update.
4596 * gnulib/import/m4/d-type.m4: Update.
4597 * gnulib/import/m4/dirent_h.m4: Update.
4598 * gnulib/import/m4/dirfd.m4: Update.
4599 * gnulib/import/m4/dirname.m4: Update.
4600 * gnulib/import/m4/double-slash-root.m4: Update.
4601 * gnulib/import/m4/dup.m4: Update.
4602 * gnulib/import/m4/dup2.m4: Update.
4603 * gnulib/import/m4/eealloc.m4: Update.
4604 * gnulib/import/m4/environ.m4: Update.
4605 * gnulib/import/m4/errno_h.m4: Update.
4606 * gnulib/import/m4/error.m4: Update.
4607 * gnulib/import/m4/exponentd.m4: Update.
4608 * gnulib/import/m4/exponentl.m4: Update.
4609 * gnulib/import/m4/extensions.m4: Update.
4610 * gnulib/import/m4/extern-inline.m4: Update.
4611 * gnulib/import/m4/fchdir.m4: Update.
4612 * gnulib/import/m4/fcntl-o.m4: Update.
4613 * gnulib/import/m4/fcntl.m4: Update.
4614 * gnulib/import/m4/fcntl_h.m4: Update.
4615 * gnulib/import/m4/fdopendir.m4: Update.
4616 * gnulib/import/m4/filenamecat.m4: Update.
4617 * gnulib/import/m4/flexmember.m4: Update.
4618 * gnulib/import/m4/float_h.m4: Update.
4619 * gnulib/import/m4/fnmatch.m4: Update.
4620 * gnulib/import/m4/fnmatch_h.m4: Update.
4621 * gnulib/import/m4/fpieee.m4: Update.
4622 * gnulib/import/m4/frexp.m4: Update.
4623 * gnulib/import/m4/frexpl.m4: Update.
4624 * gnulib/import/m4/fstat.m4: Update.
4625 * gnulib/import/m4/fstatat.m4: Update.
4626 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4627 * gnulib/import/m4/getcwd-path-max.m4: Update.
4628 * gnulib/import/m4/getcwd.m4: Update.
4629 * gnulib/import/m4/getdtablesize.m4: Update.
4630 * gnulib/import/m4/getlogin.m4: Update.
4631 * gnulib/import/m4/getlogin_r.m4: Update.
4632 * gnulib/import/m4/getpagesize.m4: Update.
4633 * gnulib/import/m4/getprogname.m4: Update.
4634 * gnulib/import/m4/gettimeofday.m4: Update.
4635 * gnulib/import/m4/glibc21.m4: Update.
4636 * gnulib/import/m4/glob.m4: Update.
4637 * gnulib/import/m4/glob_h.m4: Update.
4638 * gnulib/import/m4/gnulib-cache.m4: Update.
4639 * gnulib/import/m4/gnulib-common.m4: Update.
4640 * gnulib/import/m4/gnulib-comp.m4: Update.
4641 * gnulib/import/m4/gnulib-tool.m4: Update.
4642 * gnulib/import/m4/hard-locale.m4: Update.
4643 * gnulib/import/m4/include_next.m4: Update.
4644 * gnulib/import/m4/inttypes-pri.m4: Update.
4645 * gnulib/import/m4/inttypes.m4: Update.
4646 * gnulib/import/m4/isnand.m4: Update.
4647 * gnulib/import/m4/isnanl.m4: Update.
4648 * gnulib/import/m4/largefile.m4: Update.
4649 * gnulib/import/m4/limits-h.m4: Update.
4650 * gnulib/import/m4/localcharset.m4: Update.
4651 * gnulib/import/m4/locale-fr.m4: Update.
4652 * gnulib/import/m4/locale-ja.m4: Update.
4653 * gnulib/import/m4/locale-zh.m4: Update.
4654 * gnulib/import/m4/localtime-buffer.m4: Update.
4655 * gnulib/import/m4/longlong.m4: Update.
4656 * gnulib/import/m4/lstat.m4: Update.
4657 * gnulib/import/m4/malloc.m4: Update.
4658 * gnulib/import/m4/malloca.m4: Update.
4659 * gnulib/import/m4/math_h.m4: Update.
4660 * gnulib/import/m4/mbrtowc.m4: Update.
4661 * gnulib/import/m4/mbsinit.m4: Update.
4662 * gnulib/import/m4/mbsrtowcs.m4: Update.
4663 * gnulib/import/m4/mbstate_t.m4: Update.
4664 * gnulib/import/m4/memchr.m4: Update.
4665 * gnulib/import/m4/memmem.m4: Update.
4666 * gnulib/import/m4/mempcpy.m4: Update.
4667 * gnulib/import/m4/memrchr.m4: Update.
4668 * gnulib/import/m4/mkdir.m4: Update.
4669 * gnulib/import/m4/mkstemp.m4: Update.
4670 * gnulib/import/m4/mmap-anon.m4: Update.
4671 * gnulib/import/m4/mode_t.m4: Update.
4672 * gnulib/import/m4/msvc-inval.m4: Update.
4673 * gnulib/import/m4/msvc-nothrow.m4: Update.
4674 * gnulib/import/m4/multiarch.m4: Update.
4675 * gnulib/import/m4/nocrash.m4: Update.
4676 * gnulib/import/m4/off_t.m4: Update.
4677 * gnulib/import/m4/onceonly.m4: Update.
4678 * gnulib/import/m4/open-cloexec.m4: Update.
4679 * gnulib/import/m4/open.m4: Update.
4680 * gnulib/import/m4/openat.m4: Update.
4681 * gnulib/import/m4/opendir.m4: Update.
4682 * gnulib/import/m4/pathmax.m4: Update.
4683 * gnulib/import/m4/rawmemchr.m4: Update.
4684 * gnulib/import/m4/readdir.m4: Update.
4685 * gnulib/import/m4/readlink.m4: Update.
4686 * gnulib/import/m4/realloc.m4: Update.
4687 * gnulib/import/m4/rename.m4: Update.
4688 * gnulib/import/m4/rewinddir.m4: Update.
4689 * gnulib/import/m4/rmdir.m4: Update.
4690 * gnulib/import/m4/save-cwd.m4: Update.
4691 * gnulib/import/m4/secure_getenv.m4: Update.
4692 * gnulib/import/m4/setenv.m4: Update.
4693 * gnulib/import/m4/signal_h.m4: Update.
4694 * gnulib/import/m4/ssize_t.m4: Update.
4695 * gnulib/import/m4/stat-time.m4: Update.
4696 * gnulib/import/m4/stat.m4: Update.
4697 * gnulib/import/m4/std-gnu11.m4: Update.
4698 * gnulib/import/m4/stdbool.m4: Update.
4699 * gnulib/import/m4/stddef_h.m4: Update.
4700 * gnulib/import/m4/stdint.m4: Update.
4701 * gnulib/import/m4/stdio_h.m4: Update.
4702 * gnulib/import/m4/stdlib_h.m4: Update.
4703 * gnulib/import/m4/strchrnul.m4: Update.
4704 * gnulib/import/m4/strdup.m4: Update.
4705 * gnulib/import/m4/strerror.m4: Update.
4706 * gnulib/import/m4/string_h.m4: Update.
4707 * gnulib/import/m4/strstr.m4: Update.
4708 * gnulib/import/m4/strtok_r.m4: Update.
4709 * gnulib/import/m4/sys_socket_h.m4: Update.
4710 * gnulib/import/m4/sys_stat_h.m4: Update.
4711 * gnulib/import/m4/sys_time_h.m4: Update.
4712 * gnulib/import/m4/sys_types_h.m4: Update.
4713 * gnulib/import/m4/tempname.m4: Update.
4714 * gnulib/import/m4/time_h.m4: Update.
4715 * gnulib/import/m4/unistd-safer.m4: Update.
4716 * gnulib/import/m4/unistd_h.m4: Update.
4717 * gnulib/import/m4/warn-on-use.m4: Update.
4718 * gnulib/import/m4/wchar_h.m4: Update.
4719 * gnulib/import/m4/wchar_t.m4: Update.
4720 * gnulib/import/m4/wctype_h.m4: Update.
4721 * gnulib/import/m4/wint_t.m4: Update.
4722 * gnulib/import/malloc.c: Update.
4723 * gnulib/import/malloc/scratch_buffer.h: Update.
4724 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4725 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4726 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4727 * gnulib/import/malloca.c: Update.
4728 * gnulib/import/malloca.h: Update.
4729 * gnulib/import/malloca.valgrind: Update.
4730 * gnulib/import/math.in.h: Update.
4731 * gnulib/import/mbrtowc.c: Update.
4732 * gnulib/import/mbsinit.c: Update.
4733 * gnulib/import/mbsrtowcs-impl.h: Update.
4734 * gnulib/import/mbsrtowcs-state.c: Update.
4735 * gnulib/import/mbsrtowcs.c: Update.
4736 * gnulib/import/memchr.c: Update.
4737 * gnulib/import/memmem.c: Update.
4738 * gnulib/import/mempcpy.c: Update.
4739 * gnulib/import/memrchr.c: Update.
4740 * gnulib/import/mkdir.c: Update.
4741 * gnulib/import/mkstemp.c: Update.
4742 * gnulib/import/msvc-inval.c: Update.
4743 * gnulib/import/msvc-inval.h: Update.
4744 * gnulib/import/msvc-nothrow.c: Update.
4745 * gnulib/import/msvc-nothrow.h: Update.
4746 * gnulib/import/open.c: Update.
4747 * gnulib/import/openat-die.c: Update.
4748 * gnulib/import/openat-priv.h: Update.
4749 * gnulib/import/openat-proc.c: Update.
4750 * gnulib/import/openat.c: Update.
4751 * gnulib/import/openat.h: Update.
4752 * gnulib/import/opendir.c: Update.
4753 * gnulib/import/pathmax.h: Update.
4754 * gnulib/import/pipe-safer.c: Update.
4755 * gnulib/import/rawmemchr.c: Update.
4756 * gnulib/import/readdir.c: Update.
4757 * gnulib/import/readlink.c: Update.
4758 * gnulib/import/realloc.c: Update.
4759 * gnulib/import/ref-add.sin: Update.
4760 * gnulib/import/ref-del.sin: Update.
4761 * gnulib/import/rename.c: Update.
4762 * gnulib/import/rewinddir.c: Update.
4763 * gnulib/import/rmdir.c: Update.
4764 * gnulib/import/same-inode.h: Update.
4765 * gnulib/import/save-cwd.c: Update.
4766 * gnulib/import/save-cwd.h: Update.
4767 * gnulib/import/scratch_buffer.h: Update.
4768 * gnulib/import/secure_getenv.c: Update.
4769 * gnulib/import/setenv.c: Update.
4770 * gnulib/import/signal.in.h: Update.
4771 * gnulib/import/stat-time.c: Update.
4772 * gnulib/import/stat-time.h: Update.
4773 * gnulib/import/stat-w32.c: Update.
4774 * gnulib/import/stat-w32.h: Update.
4775 * gnulib/import/stat.c: Update.
4776 * gnulib/import/stdbool.in.h: Update.
4777 * gnulib/import/stddef.in.h: Update.
4778 * gnulib/import/stdint.in.h: Update.
4779 * gnulib/import/stdio.in.h: Update.
4780 * gnulib/import/stdlib.in.h: Update.
4781 * gnulib/import/str-two-way.h: Update.
4782 * gnulib/import/strchrnul.c: Update.
4783 * gnulib/import/strdup.c: Update.
4784 * gnulib/import/streq.h: Update.
4785 * gnulib/import/strerror-override.c: Update.
4786 * gnulib/import/strerror-override.h: Update.
4787 * gnulib/import/strerror.c: Update.
4788 * gnulib/import/string.in.h: Update.
4789 * gnulib/import/stripslash.c: Update.
4790 * gnulib/import/strnlen1.c: Update.
4791 * gnulib/import/strnlen1.h: Update.
4792 * gnulib/import/strstr.c: Update.
4793 * gnulib/import/strtok_r.c: Update.
4794 * gnulib/import/sys_stat.in.h: Update.
4795 * gnulib/import/sys_time.in.h: Update.
4796 * gnulib/import/sys_types.in.h: Update.
4797 * gnulib/import/tempname.c: Update.
4798 * gnulib/import/tempname.h: Update.
4799 * gnulib/import/time.in.h: Update.
4800 * gnulib/import/unistd--.h: Update.
4801 * gnulib/import/unistd-safer.h: Update.
4802 * gnulib/import/unistd.in.h: Update.
4803 * gnulib/import/unsetenv.c: Update.
4804 * gnulib/import/verify.h: Update.
4805 * gnulib/import/extra/snippet/warn-on-use.h: Update.
4806 * gnulib/import/wchar.in.h: Update.
4807 * gnulib/import/wctype.in.h: Update.
4808 * gnulib/import/xalloc-oversized.h: Update.
4809 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4810 "53e2c179f26a890fa6685af4b6c1397ee370433b".
4811
4812 2018-08-16 Gary Benson <gbenson@redhat.com>
4813
4814 PR gdb/13000:
4815 * gdb/main.c (captured_main_1): Exit with nonzero status
4816 in batch mode if the last command to be executed failed.
4817 * NEWS: Mention the above.
4818
4819 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
4820
4821 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4822 end of warning message.
4823
4824 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4825
4826 PR gdb/22943:
4827 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4828 (aarch64_extract_return_value): Use
4829 aapcs_is_vfp_call_or_return_candidate.
4830 (aarch64_return_in_memory): Likewise.
4831 (aarch64_store_return_value): Likewise.
4832
4833 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4834
4835 * aarch64-tdep.c
4836 (aapcs_is_vfp_call_or_return_candidate): Make static
4837 (pass_in_v_or_stack): Remove function.
4838 (pass_in_v_vfp_candidate): New function.
4839 (aarch64_push_dummy_call): Check for float register candidates.
4840
4841 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4842
4843 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4844 (aapcs_is_vfp_call_or_return_candidate_1): New function.
4845 (aapcs_is_vfp_call_or_return_candidate): Likewise.
4846
4847 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4848
4849 PR build/23399
4850 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4851 (struct ipa_sym_addresses): Rename to...
4852 (struct ipa_sym_addresses_common): ... this.
4853 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4854
4855 2018-08-28 Tom Tromey <tom@tromey.com>
4856
4857 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4858 (token_fifo): Now a std::vector.
4859 (yylex, c_parse): Update.
4860 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4861 (token_fifo): Now a std::vector.
4862 (yylex, d_parse): Update.
4863 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4864 (token_fifo): Now a std::vector.
4865 (yylex, go_parse): Update.
4866
4867 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
4868
4869 * parser-defs.h (struct type_stack) <elements>: Change type to
4870 std::vector<union type_stack_elt>.
4871 <depth, size>: Remove.
4872 * parse.c (parse_exp_in_context_1): Adjust.
4873 (type_stack_reserve): Remove.
4874 (check_type_stack_depth): Remove.
4875 (insert_into_type_stack): Adjust to std::vector.
4876 (insert_type): Likewise.
4877 (push_type): Likewise.
4878 (push_type_int): Likewise.
4879 (insert_type_address_space): Likewise.
4880 (pop_type): Likewise.
4881 (pop_type_int): Likewise.
4882 (pop_typelist): Likewise.
4883 (pop_type_stack): Likewise.
4884 (append_type_stack): Likewise.
4885 (push_type_stack): Likewise.
4886 (get_type_stack): Likewise.
4887 (type_stack_cleanup): Likewise.
4888 (push_typelist): Likewise.
4889 (follow_types): Likewise.
4890 (_initialize_parse): Likewise.
4891
4892 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
4893
4894 * NEWS: Mention csky target.
4895
4896 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
4897 Hafiz Abid Qadeer <abidh@codesourcery.com>
4898 Don Breazeal <donb@codesourcery.com>
4899
4900 * csky-linux-tdep.c: New file.
4901 * csky-tdep.c: Likewise.
4902 * csky-tdep.h: Likewise.
4903 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4904 csky-tdep.o.
4905 (HFILES_NO_SRCDIR): Add csky-tdep.h.
4906 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4907 * configure.tgt: Add csky support.
4908
4909 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
4910
4911 * python/py-framefilter.c (py_print_frame): Print frame architecture
4912 when printing on an MI output.
4913
4914 2018-08-27 Tom Tromey <tom@tromey.com>
4915
4916 PR build/23087:
4917 * configure: Rebuild.
4918 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4919
4920 2018-08-27 Tom Tromey <tom@tromey.com>
4921
4922 * aarch64-linux-tdep.c
4923 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4924 casts to int.
4925
4926 2018-08-27 Tom Tromey <tom@tromey.com>
4927
4928 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4929 unsigned.
4930 (ppc64_standard_linkage1, ppc64_standard_linkage2)
4931 (ppc64_standard_linkage3, ppc64_standard_linkage4)
4932 (ppc64_standard_linkage5, ppc64_standard_linkage6)
4933 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4934 unsigned.
4935
4936 2018-08-27 Tom Tromey <tom@tromey.com>
4937
4938 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4939 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4940
4941 2018-08-27 Tom Tromey <tom@tromey.com>
4942
4943 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4944 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4945 ULONGEST_MAX.
4946 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4947 ULONGEST_MAX.
4948 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4949 ULONGEST_MAX.
4950 * sparc-linux-tdep.c (sparc32_linux_sigframe)
4951 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4952 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4953 ULONGEST_MAX.
4954 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4955 (ppc64_linux_sigaction_tramp_frame)
4956 (ppc32_linux_sighandler_tramp_frame)
4957 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4958 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4959 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4960 * mn10300-linux-tdep.c (am33_linux_sigframe)
4961 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4962 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4963 * mips-linux-tdep.c (mips_linux_o32_sigframe)
4964 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4965 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4966 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4967 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4968 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4969 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4970 * microblaze-linux-tdep.c
4971 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4972 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4973 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4974 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4975 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4976 * common/common-types.h (ULONGEST_MAX): New define.
4977 (CORE_ADDR_MAX): Fix formatting.
4978 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4979 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4980 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4981 (arm_linux_rt_sigreturn_tramp_frame)
4982 (arm_eabi_linux_sigreturn_tramp_frame)
4983 (arm_eabi_linux_rt_sigreturn_tramp_frame)
4984 (thumb2_eabi_linux_sigreturn_tramp_frame)
4985 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4986 (arm_linux_restart_syscall_tramp_frame)
4987 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4988 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4989 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4990 ULONGEST_MAX.
4991 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4992
4993 2018-08-27 Tom Tromey <tom@tromey.com>
4994
4995 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4996 CORE_ADDR_MAX.
4997 * mips-tdep.c (mips_deal_with_atomic_sequence)
4998 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4999 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
5000 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
5001 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
5002 CORE_ADDR_MAX.
5003 * aarch64-tdep.c (aarch64_software_single_step): Use
5004 CORE_ADDR_MAX.
5005
5006 2018-08-27 Tom Tromey <tom@tromey.com>
5007
5008 * linespec.c (complete_linespec_component): Add cast to "char".
5009 * completer.c (completion_tracker::build_completion_result): Add
5010 cast to "char".
5011
5012 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
5013
5014 * solist.h (struct solist, struct target_so_ops): Fix
5015 indentation.
5016
5017 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
5018
5019 * ada-tasks.c (ada_task_info_s): Remove typedef.
5020 (DEF_VEC_O(ada_task_info_s)): Remove.
5021 (struct ada_tasks_inferior_data): Initialize fields.
5022 <task_list>: Make an std::vector.
5023 (get_ada_tasks_inferior_data): Allocate with new.
5024 (ada_get_task_number): Adjust.
5025 (get_task_number_from_id): Likewise.
5026 (valid_task_id): Likewise.
5027 (ada_get_task_info_from_ptid): Likewise.
5028 (iterate_over_live_ada_tasks): Likewise.
5029 (add_ada_task): Likewise.
5030 (read_known_tasks): Likewise.
5031 (ada_build_task_list): Likewise.
5032 (print_ada_task_info): Likewise.
5033 (info_task): Likewise.
5034 (task_command_1): Likewise.
5035
5036 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
5037
5038 * ada-lang.c (add_angle_brackets): Return std::string.
5039
5040 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
5041
5042 * python/py-threadevent.c (py_get_event_thread): Initialize
5043 pythread.
5044
5045 2018-08-24 Pedro Alves <palves@redhat.com>
5046
5047 * python/py-bpevent.c (create_breakpoint_event_object): Use
5048 copy-initialization.
5049 * python/py-continueevent.c (emit_continue_event): Use
5050 copy-initialization.
5051 * python/py-exitedevent.c (create_exited_event_object): Return a
5052 gdbpy_ref<>.
5053 (emit_exited_event): Use copy-initialization.
5054 * python/py-inferior.c (python_new_inferior)
5055 (python_inferior_deleted, add_thread_object): Use
5056 copy-initialization.
5057 * python/py-infevents.c (create_inferior_call_event_object)
5058 (create_register_changed_event_object)
5059 (create_memory_changed_event_object): Return a gdbpy_ref<>.
5060 (emit_inferior_call_event, emit_memory_changed_event)
5061 (emit_register_changed_event): Use copy-initialization.
5062 * python/py-newobjfileevent.c (create_new_objfile_event_object):
5063 Return a gdbpy_ref<>.
5064 (emit_new_objfile_event): Use copy-initialization.
5065 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
5066 (emit_clear_objfiles_event): Use copy-initialization.
5067 * python/py-signalevent.c (create_signal_event_object): Use
5068 copy-initialization.
5069 * python/py-threadevent.c (create_thread_event_object): Use
5070 copy-initialization.
5071
5072 2018-08-24 Pedro Alves <palves@redhat.com>
5073 Simon Marchi <simon.marchi@ericsson.com>
5074
5075 PR gdb/23379
5076 * python/py-continueevent.c: Include "gdbthread.h".
5077 (create_continue_event_object): Add intro comment. Add 'ptid'
5078 parameter. Use it to find thread to pass to
5079 create_thread_event_object.
5080 (emit_continue_event): Pass PTID down to
5081 create_continue_event_object.
5082 * python/py-event.h (py_get_event_thread): Declare.
5083 (create_thread_event_object): Remove default from 'thread'
5084 parameter.
5085 * python/py-stopevent.c (create_stop_event_object): Use
5086 py_get_event_thread.
5087 * python/py-threadevent.c (get_event_thread): Rename to ...
5088 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
5089 and use it to find the thread.
5090 (create_thread_event_object): Assert that THREAD isn't null.
5091 Don't find the event thread here.
5092
5093 2018-08-23 Kevin Buettner <kevinb@redhat.com>
5094
5095 * block.h (blockrange, blockranges): New struct declarations.
5096 (struct block): Add new field named `ranges'.
5097 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
5098 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
5099 macros for accessing ranges in struct block.
5100 (make_blockranges): New declaration.
5101 block.c (make_blockranges): New function.
5102 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5103 for block.
5104 * symtab.h (find_pc_partial_function): Add new parameter `block'.
5105 * blockframe.c (cache_pc_function_block): New static global.
5106 (clear_pc_function_cache): Clear cache_pc_function_block.
5107 (find_pc_partial_function): Move comment to symtab.h. Add
5108 support for non-contiguous blocks.
5109 * cli/cli-cmds.c (block.h): Include.
5110 (print_disassembly): Handle printing of non-contiguous blocks.
5111 (disassemble_current_function): Likewise.
5112 (disassemble_command): Likewise.
5113
5114 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5115 BLOCK_START.
5116 * blockframe.c (get_pc_function_start): Likewise.
5117 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5118 (gcc_symbol_address): Likewise.
5119 * compile/compile-object-run.c (compile_object_run): Likewise.
5120 * compile/compile.c (get_expr_block_and_pc): Likewise.
5121 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5122 (func_addr_to_tail_call_list): Likewise.
5123 * findvar.c (default_read_var_value): Likewise.
5124 * inline-frame.c (inline_frame_this_id): Likewise.
5125 (skip-inline_frames): Likewise.
5126 * infcmd.c (until_next_command): Likewise.
5127 * linespec.c (convert_linespec_to_sals): Likewise.
5128 * parse.c (parse_exp_in_context_1): Likewise.
5129 * printcmd.c (build_address_symbolic): likewise.
5130 (info_address_command): Likewise.
5131 symtab.c (find_function_start_sal): Likewise.
5132 (skip_prologue_sal): Likewise.
5133 (find_function_alias_target): Likewise.
5134 (find_gnu_ifunc): Likewise.
5135 * stack.c (find_frame_funname): Likewise.
5136 * symtab.c (fixup_symbol_section): Likewise.
5137 (find_function_start_sal): Likewise.
5138 (skip_prologue_sal): Likewsie.
5139 (find_function_alias_target): Likewise.
5140 (find_gnu_ifunc): Likewise.
5141 * tracepoint.c (info_scope_command): Likewise.
5142 * value.c (value_fn_field): Likewise.
5143
5144 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5145 in place of find_pc_partial_function.
5146 * blockframe.c (find_function_entry_range_from_pc): New function.
5147 * symtab.h (find_function_entry_range_from_pc): Declare and document.
5148 * objfiles.c (objfile_relocate1): Relocate start and end addresses
5149 for each range in a block.
5150
5151
5152 2018-08-23 Xavier Roirand <roirand@adacore.com>
5153
5154 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5155 incrementation.
5156
5157 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5158
5159 * solib-svr4.c (read_program_headers_from_bfd): Return
5160 gdb::optional<gdb::byte_vector>.
5161 (svr4_exec_displacement): Adjust.
5162
5163 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5164
5165 * solib-svr4.c (read_program_header): Return
5166 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5167 (find_program_interpreter): Return
5168 gdb::optional<gdb::byte_vector>.
5169 (scan_dyntag_auxv): Adjust.
5170 (enable_break): Adjust.
5171 (svr4_exec_displacement): Adjust.
5172
5173 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5174
5175 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5176 * inf-child.c (inf_child_target::terminal_save_inferior): New.
5177
5178 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5179
5180 * guile/scm-string.c (gdbscm_scm_from_printf): Use
5181 string_vprintf.
5182 * guile/scm-utils.c (gdbscm_printf): Likewise.
5183 * serial.c (serial_printf): Likewise.
5184 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5185
5186 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
5187
5188 * stack.c (print_frame): Print frame architecture when printing on
5189 an MI output.
5190 * NEWS: Mention new "arch" attribute in frame output.
5191
5192 2018-08-21 Alan Hayward <alan.hayward@arm.com>
5193
5194 * arch/aarch64.h (aarch64_regnum): Update comment.
5195
5196 2018-08-21 Alan Hayward <alan.hayward@arm.com>
5197
5198 * NEWS: Add SVE to 8.2 section.
5199
5200 2018-08-21 Pedro Alves <palves@redhat.com>
5201
5202 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5203 out from gdbscm_parse_function_args.
5204 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5205 gdbscm_parse_function_args_1.
5206
5207 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
5208
5209 PR gdb/17816
5210 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5211 operator.
5212
5213 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
5214
5215 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5216
5217 2018-08-19 Michael Spang <spang@google.com>
5218
5219 PR gdb/11786
5220 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5221 for PT_TLS segments.
5222
5223 2018-08-18 Kevin Buettner <kevinb@redhat.com>
5224
5225 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5226 dwarf_variable_value.
5227 * dwarf2-frame.c (class dwarf_expr_executor):
5228 Add override for dwarf_variable_value.
5229 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5230 (class symbol_needs_eval_context): Likewise.
5231 (indirect_synthetic_pointer): Add forward declaration.
5232 (sect_variable_value): New function.
5233 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5234 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5235 for DW_OP_GNU_variable_value.
5236
5237 2018-08-16 Tom Tromey <tom@tromey.com>
5238
5239 * top.c (read_command_file): Update.
5240 (command_line_input): Remove "repeat" argument.
5241 * ada-lang.c (get_selections): Update.
5242 * linespec.c (decode_line_2): Update.
5243 * defs.h (command_line_input): Remove argument.
5244 * cli/cli-script.c (read_next_line): Update.
5245 * python/py-gdb-readline.c: Update.
5246
5247 2018-08-17 Tom Tromey <tom@tromey.com>
5248
5249 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5250 command_line_input.
5251
5252 2018-08-15 Tom Tromey <tom@tromey.com>
5253
5254 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5255
5256 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
5257
5258 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5259 If used, use find_pc_partial_function to find address range
5260 to disassemble.
5261 * mi/mi-main.c (mi_cmd_list_features): Report
5262 "data-disassemble-a-option" feature.
5263 * NEWS: Mention new -data-disassemble option -a.
5264
5265 2018-08-13 Tom Tromey <tom@tromey.com>
5266
5267 * common/common-defs.h (_FORTIFY_SOURCE): Define.
5268
5269 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5270
5271 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5272 (aarch64_linux_collect_sve_regset): Likewise.
5273 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5274 * regcache.h (regcache_map_entry_size): New function.
5275
5276 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5277
5278 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5279 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5280 (SVE_HEADER_VL_LENGTH): Likewise.
5281 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5282 (SVE_HEADER_FLAGS_LENGTH): Likewise.
5283 (SVE_HEADER_RESERVED_LENGTH): Likewise.
5284 (SVE_HEADER_SIZE_OFFSET): Likewise.
5285 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5286 (SVE_HEADER_VL_OFFSET): Likewise.
5287 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5288 (SVE_HEADER_FLAGS_OFFSET): Likewise.
5289 (SVE_HEADER_RESERVED_OFFSET): Likewise.
5290 (SVE_HEADER_SIZE): Likewise.
5291 (aarch64_linux_core_read_vq): Add function.
5292 (aarch64_linux_core_read_description): Check for SVE section.
5293
5294 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5295
5296 * aarch64-fbsd-tdep.c
5297 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5298 collect_size.
5299 * aarch64-linux-tdep.c
5300 (aarch64_linux_iterate_over_regset_sections): Likewise.
5301 * alpha-linux-tdep.c
5302 (alpha_linux_iterate_over_regset_sections):
5303 * alpha-nbsd-tdep.c
5304 (alphanbsd_iterate_over_regset_sections): Likewise.
5305 * amd64-fbsd-tdep.c
5306 (amd64fbsd_iterate_over_regset_sections): Likewise.
5307 * amd64-linux-tdep.c
5308 (amd64_linux_iterate_over_regset_sections): Likewise.
5309 * arm-bsd-tdep.c
5310 (armbsd_iterate_over_regset_sections): Likewise.
5311 * arm-fbsd-tdep.c
5312 (arm_fbsd_iterate_over_regset_sections): Likewise.
5313 * arm-linux-tdep.c
5314 (arm_linux_iterate_over_regset_sections): Likewise.
5315 * corelow.c (get_core_registers_cb): Likewise.
5316 (core_target::fetch_registers): Likewise.
5317 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5318 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5319 * gdbarch.h (void): Regenerate.
5320 * gdbarch.sh: Add supply_size and collect_size.
5321 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5322 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5323 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5324 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5325 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5326 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5327 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5328 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5329 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5330 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5331 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5332 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5333 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5334 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5335 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5336 Likewise.
5337 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5338 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5339 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5340 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5341 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5342 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5343 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5344 Likewise.
5345 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5346 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5347 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5348 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5349 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5350 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5351 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5352 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5353
5354 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
5355
5356 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5357 with string_printf.
5358
5359 2018-08-10 Keith Seitz <keiths@redhat.com>
5360
5361 * compile/compile-c-support.c (add_code_header, add_code_footer):
5362 Move into policy class.
5363 (c_push_user_expression, pop_user_expression_nop)
5364 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5365 (compile_program): New host class.
5366 (c_compile_program): New typedef.
5367 (c_compute_porgram): Use c_compile_program.
5368
5369 2018-08-10 Keith Seitz <keiths@redhat.com>
5370
5371 * compile/compile-internal.h (compile_instance::~compile_instance):
5372 Remove calls to htab_delete.
5373 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5374 * compile.c (compile_instance::compile_instance): Initialize
5375 htab unique pointers.
5376 (compile_instance::get_cached_type, compile_instance::insert_type)
5377 (compile_instance::error_symbol_once): Update for unique_ptr.
5378
5379 2018-08-10 Keith Seitz <keiths@redhat.com>
5380
5381 * compile/compile-c-symbols.c (struct symbol_error)
5382 (hash_symbol_error, eq_symbol_error, del_symbol_error)
5383 (compile_instance::insert_symbol_error)
5384 (compile_instance::error_symbol_once): Move to ...
5385 * compile/compile.c: ... here.
5386
5387 2018-08-10 Keith Seitz <keiths@redhat.com>
5388
5389 * compile/compile-c-support.c (c_get_compile_context): Use `new'
5390 instead of `new_compile_instance'.
5391 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5392 Update description.
5393 If the symbol error map is not initialized, create it.
5394 (generate_c_for_for_one_symbol): Do not check/initialize
5395 the symbol error map.
5396 * compile/compile-c-types.c (compile_c_instance): Make a class.
5397 Update all callers.
5398 (compile_instance::compile_instance): Initialize the type cache.
5399 (get_cached_type): New function.
5400 (insert_type): Update description.
5401 (compile_c_instance::m_default_cflags): Define.
5402 (convert_type): Update description. Use get_cached_type.
5403 (delete_instance): Moved to destructor.
5404 (new_compile_instance): Moved to constructor.
5405 * compile/compile-c.h (compile_c_instance): Make class inheriting
5406 from compile_instance.
5407 <base>: Remove field.
5408 <type_map, symbol_err_map>: Move to base class.
5409 <c_plugin>: Rename to `m_plugin' and remove pointer type.
5410 * compile/compile-internal.h (compile_instance): Make class.
5411 <type_map_t, symbol_err_map_t>: Define.
5412 <fe>: Rename to `m_gcc_fe'.
5413 <scope, block, gcc_target_options>: Add `m_' prefix.
5414 <m_type_map, m_symbol_err_map>: New fields, moved from
5415 compile_c_instance.
5416 <destroy>: Remove.
5417 (convert_type, new_compile_instance): Remove.
5418 * compile/compile.c (cleanup_compile_instance): Remove.
5419 (compile_to_object): Use unique_ptr to eliminate cleanups.
5420 (compile_instance::set_print_callback, compile_instance::version)
5421 (compile_instance::set_verbose)
5422 (compile_instance::set_driver_filename)
5423 (compile_instance::set_triplet_regexp)
5424 (compile_instance::set_arguments)
5425 (compile_instance::set_source_file)
5426 (compile_instance::compile): Define.
5427
5428 2018-08-10 Keith Seitz <keiths@redhat.com>
5429
5430 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5431 * compile/compile-c-types.c: Define GCC_METHODN macros and include
5432 gcc-c-fe.def to define C plugin.
5433 (delete_instance): Delete `c_plugin'.
5434 (new_compile_instance): Initialize `c_plugin'.
5435 * compile/compile-c.h: Include gcc_c_plugin.h.
5436 (struct compile_c_instance) <c_plugin>: New member.
5437 * gcc-c-plugin.h: New file.
5438 Update all callers with API change.
5439
5440 2018-08-10 Keith Seitz <keiths@redhat.com>
5441
5442 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5443 (HFILES_NO_SRCDIR): ... to here.
5444 Add compile-internal.h and compile-c.h.
5445 * compile/compile-c-support.c: Include compile-c.h.
5446 * compile/compile-c-symbols.c: Include compile-c.h.
5447 (generate_c_for_variable_locations): Update comment.
5448 * compile/compile-c-types.c: Include compile-c.h.
5449 * compile/compile-c.h: New file -- moved C language declarations
5450 from other files here.
5451 * compile/compile-internal.h: Do not include hashtab.h or
5452 common/enum-flags.h.
5453 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5454 (gcc_convert_symbol, gcc_symbol_address)
5455 (generate_c_for_variable_locations, c_get_mode_for_size)
5456 (c_get_range_decl_name): Definitions moved to compile-c.h.
5457 * compile/compile-loc2c.c: Include compile-c.h.
5458
5459 2018-08-10 Keith Seitz <keiths@redhat.com>
5460
5461 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5462 (c_symbol_substitution_name): ... this.
5463 Update all callers.
5464
5465 2018-08-10 Keith Seitz <keiths@redhat.com>
5466
5467 * compile/compile-c-support.c (c_compute_program): Use
5468 unique_xmalloc_ptr to eliminate cleanup.
5469 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5470 Return a unique_xmalloc_ptr and eliminate cleanup.
5471 * compile/compile-internal.h (generate_c_for_variable_locations):
5472 Return unique_xmalloc_ptr and update description.
5473
5474 2018-08-10 Alan Hayward <alan.hayward@arm.com>
5475
5476 * corelow.c (core_target::get_core_register_section): Rename
5477 min_size to section_min_size.
5478
5479 2018-08-09 Jim Wilson <jimw@sifive.com>
5480
5481 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5482 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5483 * NEWS: Mention new GNU/Linux RISC-V target.
5484 * configure.host: Add riscv*-*-linux*.
5485 * configure.nat: Add riscv*.
5486 * configure.tgt: Add riscv*-*-linux*.
5487 * riscv-linux-nat.c: New file.
5488 * riscv-linux-tdep.c: New file.
5489
5490 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5491
5492 * infrun.c (resume): Make static, add forward declaration.
5493 (proceed): Update header comment.
5494 * infrun.h (resume): Delete declaration.
5495
5496 2018-08-09 Tom Tromey <tom@tromey.com>
5497
5498 * riscv-tdep.h: Minor formatting fixes.
5499
5500 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
5501
5502 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5503 * dwarf-index-cache.c (create_dir_and_check): Likewise.
5504 (test_mkdir_recursive): Likewise.
5505 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5506
5507 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5508
5509 * valarith.c (value_subscripted_rvalue): If an array is not in
5510 memory, and we don't know the upper bound, then we can't know that
5511 the requested element exists or not.
5512
5513 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
5514
5515 * target.c (str_comma_list_concat_elem): Fix typo in comment.
5516 (target_options_to_string): Add comment.
5517
5518 2018-08-08 Tom Tromey <tom@tromey.com>
5519
5520 * unittests/scoped_mmap-selftests.c: Check result of "write".
5521
5522 2018-08-08 Jim Wilson <jimw@sifive.com>
5523
5524 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5525 (decode_register_index_short): New.
5526 (decode_j_type_insn, decode_cj_type_insn): New.
5527 (decode_b_type_insn, decode_cb_type_insn): New.
5528 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
5529 local xlen. Check xlen when decoding ambiguous compressed insns. In
5530 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5531 is_c_sw_insn instead of is_sw_insn.
5532 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5533 (riscv_software_single_step): New.
5534 * riscv-tdep.h (riscv_software_single_step): Declare.
5535
5536 * riscv-tdep.c (riscv_isa_xlen): Drop static.
5537 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5538
5539 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
5540
5541 PR gdb/18050:
5542 * target.c (dispose_inferior): Don't dispose of inferiors that are
5543 already killed.
5544
5545 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
5546
5547 * remote.c (remote_target::download_tracepoint): Change char* to
5548 const char*.
5549
5550 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
5551
5552 * target.h (target_options_to_string): Return an std::string.
5553 * target.c (str_comma_list_concat_elem): Return void, use
5554 std::string.
5555 (do_option): Likewise.
5556 (target_options_to_string): Return an std::string.
5557 * linux-nat.c (linux_nat_target::wait): Adjust.
5558 * target-debug.h (target_debug_print_options): Adjust.
5559
5560 2018-08-07 Tom Tromey <tom@tromey.com>
5561
5562 * Makefile.in (CPPFLAGS): New variable.
5563 (INTERNAL_CPPFLAGS): Use it.
5564
5565 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5566
5567 * NEWS: Mention the index cache.
5568
5569 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5570
5571 * common/pathstuff.h (get_standard_cache_dir): New.
5572 * common/pathstuff.c (get_standard_cache_dir): New.
5573 * build-id.h (build_id_to_string): New.
5574 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5575 DEBUG_STR_SUFFIX): Move to here.
5576 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5577 DEBUG_STR_SUFFIX): Move from there.
5578 (write_psymtabs_to_index): Make non-static, add basename
5579 parameter. Write to temporary files, rename when done.
5580 (save_gdb_index_command): Adjust call to
5581 write_psymtabs_to_index.
5582 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5583 field.
5584 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5585 (get_gdb_index_contents_from_cache): New.
5586 (get_gdb_index_contents_from_cache_dwz): New.
5587 (dwarf2_initialize_objfile): Read index from cache.
5588 (dwarf2_build_psymtabs): Save to index.
5589 * dwarf-index-cache.h: New file.
5590 * dwarf-index-cache.c: New file.
5591 * dwarf-index-write.h: New file.
5592
5593 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5594
5595 * gnulib/aclocal.m4: Re-generate.
5596 * gnulib/config.in: Re-generate.
5597 * gnulib/configure: Re-generate.
5598 * gnulib/import/Makefile.am: Re-generate.
5599 * gnulib/import/Makefile.in: Re-generate.
5600 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5601 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5602 * gnulib/import/m4/mkdir.m4: New file.
5603 * gnulib/import/mkdir.c: New file.
5604 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5605 module.
5606
5607 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5608
5609 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5610 * common/scoped_mmap.c: New file.
5611 * common/scoped_mmap.h (destroy): New method.
5612 (~scoped_mmap, reset): Use destroy.
5613 (scoped_mmap): New move constructor.
5614 (mmap_file): New declaration.
5615 * unittests/scoped_mmap-selftests.c (test_normal,
5616 test_invalid_filename, run_tests): New functions.
5617 (_initialize_scoped_mmap_selftests): Register selftest.
5618
5619 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5620
5621 * dwarf2read.c (read_gdb_index_from_section): Rename to...
5622 (read_gdb_index_from_buffer): ... this. Remove section
5623 parameter, add buffer parameter.
5624 (get_gdb_index_contents_ftype,
5625 get_gdb_index_contents_dwz_ftype): New typedefs.
5626 (dwarf2_read_gdb_index): Add callback parameters to get the
5627 index contents.
5628 (get_gdb_index_contents_from_section): New.
5629 (dwarf2_initialize_objfile): Update call to
5630 dwarf2_read_gdb_index.
5631
5632 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5633
5634 * common/filestuff.h (gdb_fopen_cloexec): New overload.
5635 (gdb_open_cloexec): Likewise.
5636 * nat/linux-osdata.c (command_from_pid): Use string_printf.
5637 (commandline_from_pid): Likewise.
5638 (linux_xfer_osdata_threads): Likewise.
5639 (linux_xfer_osdata_fds): Likewise.
5640 * ada-lang.c (is_package_name): Likewise.
5641 * auxv.c (procfs_xfer_auxv): Likewise.
5642 * breakpoint.c (print_one_breakpoint_location): Use
5643 uiout::field_fmt.
5644 (print_one_catch_solib): Use string_printf.
5645 * coff-pe-read.c (add_pe_exported_sym): Likewise.
5646 (add_pe_forwarded_sym): Likewise.
5647 * dwarf2read.c (create_type_unit_group): Likewise.
5648 (build_error_marker_type): Likewise.
5649 * infcall.c (get_function_name): Likewise.
5650 * valprint.c (print_converted_chars_to_obstack): Likewise.
5651 * xtensa-tdep.c (xtensa_register_type): Likewise.
5652
5653 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
5654
5655 * remote.c (remote_target::download_tracepoint): Fix format
5656 string errors.
5657
5658 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5659
5660 * tracefile.c: Include common/byte-vector.h.
5661 (trace_save): Change type of buf to gdb::byte_vector. Initialize
5662 with trace_regblock_size if needed. Update uses of buf.
5663
5664 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5665
5666 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5667 std::vector<unsigned char>.
5668 * tracepoint.c (collection_list::collection_list): Remove
5669 m_regs_mask initializer from initializer list. Resize
5670 m_regs_mask using the largest remote register number.
5671 (collection_list::add_remote_register): Remove size check on
5672 m_regs_mask. Use at to access element.
5673 (collection_list::stringify): Change type of temp_buf to
5674 gdb::char_vector. Update uses of temp_buf. Resize if needed to
5675 stringify the register mask. Use pack_hex_byte for the register
5676 mask.
5677
5678 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5679
5680 * tracepoint.h (class collection_list) <add_register>: Remove.
5681 <add_remote_register, add_ax_registers, add_local_register>:
5682 Declare.
5683 <add_memrange>: Add scope parameter.
5684 * tracepoint.c (encode_actions_1): Likewise.
5685 (collection_list::add_register): Rename to ...
5686 (collection_list::add_remote_register): ... this. Update
5687 comment.
5688 (collection_list::add_ax_registers, add_local_register): New
5689 methods.
5690 (collection_list::add_memrange): Add scope parameter. Call
5691 add_local_register instead of add_register.
5692 (finalize_tracepoint_aexpr): New function.
5693 (collection_list::collect_symbol): Update calls to add_memrange.
5694 Call add_local_register instead of add_register. Call
5695 add_ax_registers. Call finalize_tracepoint_aexpr.
5696 (encode_actions_1): Get remote regnos for $reg action. Call
5697 add_remote_register, add_ax_registers, and add_local_register.
5698 Update call to add_memrange. Call finalize_tracepoint_aexpr.
5699 (validate_actionline): Call finalize_tracepoint_aexpr.
5700
5701 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5702
5703 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5704 Replace array buf with gdb::char_vector buf, of size
5705 get_remote_packet_size (). Replace references to buf and
5706 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
5707 and xsnprintf with snprintf. Raise errors if the buffer is too
5708 small.
5709
5710 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5711
5712 * remote.c (remote_target::download_tracepoint): Fix the has_more
5713 predicate in the QTDP action list iteration.
5714
5715 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5716
5717 * remote.c (remote_target::download_tracepoint): Fix indentation
5718 in for block.
5719
5720 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5721
5722 * proc-api.c (_initialize_proc_api): Remove c, unused.
5723 * procfs.c (procfs_init_inferior): Remove signals, unused.
5724 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5725 unused.
5726
5727 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
5728 Andrew Burgess <andrew.burgess@embecosm.com>
5729
5730 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5731 'W_STOPCODE (0)' as this could be ambiguous.
5732
5733 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
5734
5735 * ser-tcp.c (net_open): Fix thinko when deciding whether to
5736 disable TCP's Nagle algorithm (use "ai_protocol" instead of
5737 "ai_socktype").
5738
5739 2018-08-02 Tom Tromey <tom@tromey.com>
5740
5741 PR symtab/16842.
5742 * dwarf2read.c (read_func_scope): Set symtab on template parameter
5743 symbols.
5744 (process_structure_scope): Likewise.
5745
5746 2018-08-02 Xavier Roirand <roirand@adacore.com>
5747
5748 PR gdb/22629:
5749 * darwin-nat.c (darwin_kill_inferior): Fix handling of
5750 kill inferior.
5751
5752 2018-08-02 Tom Tromey <tom@tromey.com>
5753
5754 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5755 (darwin_suspend_inferior, darwin_resume_inferior)
5756 (darwin_decode_notify_message, darwin_resume_inferior_threads)
5757 (darwin_check_new_threads): Check result of get_darwin_inferior.
5758
5759 2018-07-31 Joel Brobecker <brobecker@adacore.com>
5760
5761 GDB 8.1.1 released.
5762
5763 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
5764
5765 * varobj.c (varobj_get_path_expr_parent): Report an error if
5766 parent is a dynamic varobj.
5767
5768 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5769
5770 * gnulib/aclocal.m4: Re-generate.
5771 * gnulib/config.in: Re-generate.
5772 * gnulib/configure: Re-generate.
5773 * gnulib/import/Makefile.in: Re-generate.
5774 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5775 * gnulib/import/m4/onceonly.m4: Re-generate.
5776
5777 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5778
5779 * target-descriptions.c (struct xml_test_tdesc): New.
5780 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5781 (record_xml_tdesc): Update.
5782 (maintenance_check_xml_descriptions): Update.
5783 * target-descriptions.h (record_xml_tdesc): Update comment.
5784
5785 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
5786
5787 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5788 checking array bounds are defined.
5789
5790 2018-07-30 Tom Tromey <tom@tromey.com>
5791
5792 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5793 irreflexivity violation.
5794
5795 2018-07-30 Tom Tromey <tom@tromey.com>
5796
5797 * cli/cli-decode.c (lookup_cmd): Remove lint code.
5798 * value.c (unpack_long): Remove lint code.
5799 * valops.c (value_ind): Remove lint code.
5800 * valarith.c (value_x_binop, value_x_unop, value_equal)
5801 (value_pos): Remove lint code.
5802
5803 2018-07-28 Tom de Vries <tdevries@suse.de>
5804
5805 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5806 with undefined upper bound as <optimized out>.
5807
5808 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
5809
5810 * gcore.in: Rename variable "name" to "prefix". Expand
5811 "usage" text.
5812
5813 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
5814
5815 * windows-nat.c (windows_nat_target::create_inferior): Update to
5816 call close() in global namespace.
5817
5818 2018-07-26 Tom Tromey <tom@tromey.com>
5819
5820 * dwarf-index-write.c (add_address_entry): Don't add objfile
5821 offsets.
5822 * dbxread.c (find_stab_function): Rename from
5823 find_stab_function_addr. Return a bound_minimal_symbol.
5824 (read_dbx_symtab): Use raw_text_low, raw_text_high.
5825 Don't add objfile offsets.
5826 (end_psymtab): Use raw_text_low, raw_text_high,
5827 MSYMBOL_VALUE_RAW_ADDRESS.
5828 (read_ofile_symtab): Update.
5829 (process_one_symbol): Update.
5830 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5831 offsets.
5832 (dw2_relocate): Remove.
5833 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5834 searching addrmap.
5835 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5836 Update.
5837 (process_psymtab_comp_unit_reader, add_partial_symbol)
5838 (add_partial_subprogram, dwarf2_ranges_read): Update.
5839 (load_partial_dies): Update.
5840 (add_address_entry): Don't add objfile offsets.
5841 (dwarf2_build_include_psymtabs): Update.
5842 (create_addrmap_from_aranges): Don't add objfile offsets.
5843 (dw2_find_pc_sect_compunit_symtab): Update.
5844 * mdebugread.c (parse_symbol): Don't add objfile offsets.
5845 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5846 Update.
5847 (parse_partial_symbols): Don't add objfile offsets. Use
5848 raw_text_low, raw_text_high. Update.
5849 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5850 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5851 or call 'relocate' quick function. Clear psymbol_map.
5852 * psympriv.h (struct partial_symbol) <address>: Add section
5853 offset.
5854 <set_unrelocated_address>: Rename from set_address.
5855 <raw_text_low, raw_text_high>: New methods.
5856 <text_low, text_high>: Add objfile parameter.
5857 (add_psymbol_to_bcache): Add 'section' parameter. Call
5858 set_unrelocated_address.
5859 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5860 (find_pc_psymbol): Update.
5861 (fixup_psymbol_section, relocate_psymtabs): Remove.
5862 (dump_psymtab, psym_functions): Update.
5863 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5864 parameter.
5865 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5866 (start_psymtab_common): Update.
5867 * symfile-debug.c (debug_qf_relocate): Remove.
5868 (debug_sym_quick_functions): Update.
5869 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5870 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5871 Update.
5872
5873 2018-07-26 Tom Tromey <tromey@redhat.com>
5874
5875 * dbxread.c (end_psymtab): Use text_high_valid and
5876 text_low_valid.
5877 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5878 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5879 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5880 Update comment.
5881 <text_low_valid, text_high_valid>: New fields.
5882 <set_text_low, set_text_high>: Update.
5883 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5884
5885 2018-07-26 Tom Tromey <tom@tromey.com>
5886
5887 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5888 Update.
5889 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5890 textlow and texthigh fields.
5891 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5892 Update.
5893 * mdebugread.c (parse_lines, parse_partial_symbols)
5894 (psymtab_to_symtab_1): Update.
5895 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5896 Rename fields. Update comment. Now private.
5897 <text_low, text_high, set_text_low, set_text_high>: New methods.
5898 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5899 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5900 (start_psymtab_common, maintenance_info_psymtabs)
5901 (maintenance_check_psymtabs): Update.
5902 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5903 texthigh fields.
5904 (scan_xcoff_symtab): Update.
5905
5906 2018-07-26 Tom Tromey <tromey@redhat.com>
5907
5908 * psympriv.h (struct partial_symbol) <unrelocated_address,
5909 address, set_address>: New methods.
5910 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5911 (fixup_psymbol_section, relocate_psymtabs): Update.
5912 (print_partial_symbols): Add 'objfile' parameter. Update.
5913 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5914 Update.
5915
5916 2018-07-26 Tom Tromey <tom@tromey.com>
5917
5918 * dwarf-index-write.c (write_psymbols, debug_names::insert)
5919 (debug_names::write_psymbols): Update.
5920 * psympriv.h (struct partial_symbol): Derive from
5921 general_symbol_info.
5922 <obj_section>: New method.
5923 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5924 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5925 (find_pc_sect_psymbol, fixup_psymbol_section)
5926 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5927 (print_partial_symbols, recursively_search_psymtabs)
5928 (compare_psymbols, psymbol_hash, psymbol_compare)
5929 (add_psymbol_to_bcache, maintenance_check_psymtabs)
5930 (psymbol_name_matches, psym_fill_psymbol_map): Update.
5931
5932 2018-07-26 Tom Tromey <tromey@redhat.com>
5933
5934 * dbxread.c (end_psymtab): Remove dead code.
5935
5936 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
5937
5938 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5939 DWARF unwinders are disabled.
5940 * dwarf2-frame.c: Add dwarf2read.h include.
5941 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5942 disabled.
5943 (dwarf2_frame_unwinders_enabled_p): Define.
5944 (show_dwarf_unwinders_enabled_p): New function.
5945 (_initialize_dwarf2_frame): Register switch to control DWARF
5946 unwinder use.
5947 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5948 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5949 (show_dwarf_cmdlist): Remove static keyword.
5950 * dwarf2read.h (set_dwarf_cmdlist): Declare.
5951 (show_dwarf_cmdlist): Declare.
5952 * NEWS: Document new feature.
5953
5954 2018-07-26 Tom de Vries <tdevries@suse.de>
5955
5956 PR breakpoints/23366
5957 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5958
5959 2018-07-26 Tom de Vries <tdevries@suse.de>
5960
5961 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5962 DW_AT_count can't be translated to a dynamic prop.
5963
5964 2018-07-25 Tom de Vries <tdevries@suse.de>
5965
5966 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5967 try/catch.
5968
5969 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
5970
5971 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5972
5973 2018-07-25 Joel Brobecker <brobecker@adacore.com>
5974
5975 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5976
5977 2018-07-24 Keith Seitz <keiths@redhat.comt
5978
5979 PR symtab/23010
5980 * dwarf2read.c (dw2_add_symbol_to_list): New function.
5981 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5982 instead of add_symbol_to_list.
5983 (read_file_scope): Call prepare_one_comp_unit before reading
5984 any other DIEs.
5985
5986 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
5987
5988 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5989
5990 2018-07-24 Tom Tromey <tom@tromey.com>
5991
5992 * utils.c (malloc, realloc, free): Don't declare.
5993 * configure, config.in: Rebuild.
5994 * configure.ac: Don't check for declarations of free, malloc, or
5995 realloc.
5996
5997 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5998
5999 * aarch64-linux-nat.c
6000 (aarch64_linux_nat_target::stopped_data_address): Remove unused
6001 variable.
6002 * arm-linux-nat.c (fetch_regs): Likewise.
6003 (store_regs): Likewise.
6004 (fetch_vfp_regs): Likewise.
6005 (store_vfp_regs): Likewise.
6006 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
6007 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
6008 (arm_linux_nat_target::insert_watchpoint): Likewise.
6009 (arm_linux_nat_target::remove_watchpoint): Likewise.
6010 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
6011 Likewise.
6012 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
6013 Likewise.
6014 * ppc-linux-nat.c (fetch_register): Likewise.
6015 (fetch_all_gp_regs): Likewise.
6016 (fetch_ppc_registers): Likewise.
6017 (store_all_gp_regs): Likewise.
6018 (store_ppc_registers): Likewise.
6019 (hwdebug_insert_point): Likewise.
6020 (can_use_watchpoint_cond_accel): Likewise.
6021 * remote-sim.c (gdb_os_write_stdout): Likewise.
6022
6023 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
6024 Tom Tromey <tom@tromey.com>
6025
6026 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
6027 test for it.
6028 * configure: Rebuild.
6029
6030 2018-07-22 Tom Tromey <tom@tromey.com>
6031
6032 * regformats/regdat.sh: Define xmltarget_${name} inside
6033 #ifndef IN_PROCESS_AGENT.
6034
6035 2018-07-22 Tom Tromey <tom@tromey.com>
6036
6037 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
6038
6039 2018-07-22 Tom Tromey <tom@tromey.com>
6040
6041 * symfile.c (reread_symbols): Notify iter, not objfile.
6042
6043 2018-07-22 Tom Tromey <tom@tromey.com>
6044
6045 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
6046 Use arch_ops.
6047 (ravenscar_thread_target::prepare_to_store): Likewise.
6048
6049 2018-07-22 Tom Tromey <tom@tromey.com>
6050
6051 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
6052 unused variable. Call value_fetch_lazy when needed.
6053 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
6054 Remove unused variable. Call value_fetch_lazy when needed.
6055
6056 2018-07-22 Tom Tromey <tom@tromey.com>
6057
6058 * m32c-tdep.c (mark_dma): Return void.
6059 (make_regs): Remove unused declarations.
6060
6061 2018-07-22 Tom Tromey <tom@tromey.com>
6062
6063 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
6064 cmdscm_get_valid_command_smob_arg_unsafe for effect.
6065 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
6066 bkscm_get_valid_block_smob_arg_unsafe for effect.
6067
6068 2018-07-22 Tom Tromey <tom@tromey.com>
6069
6070 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
6071 value_type.
6072
6073 2018-07-22 Tom Tromey <tom@tromey.com>
6074
6075 * windows-nat.c (saved_context): Conditionally define.
6076 * remote.c (remote_target::remote_btrace_maybe_reopen):
6077 Conditionally declare "warned".
6078 * inflow.c (sigquit_ours): Conditionally define.
6079 (new_tty): Move "tty" declaration inside #if.
6080 * guile/guile.c (guile_datadir): Conditionally define.
6081 * charset.c (set_be_le_names): Move some declarations inside #if.
6082 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
6083 #if.
6084 (parse_xml_btrace_conf): Likewise.
6085
6086 2018-07-22 Tom Tromey <tom@tromey.com>
6087
6088 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
6089
6090 2018-07-22 Tom Tromey <tom@tromey.com>
6091
6092 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
6093 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
6094 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
6095 * buildsym-legacy.c (get_macro_table): Remove unused variable.
6096 * stack.c (frame_apply_level_command): Remove unused variable.
6097 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
6098 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
6099 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6100 unused variable.
6101 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6102 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6103 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6104 variable.
6105 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6106 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6107 variable.
6108 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6109 Remove unused variable.
6110 * cli/cli-script.c (recurse_read_control_structure): Remove unused
6111 variable.
6112 * common/tdesc.c (print_xml_feature::visit): Remove unused
6113 variable.
6114 * compile/compile-object-load.c (store_regs): Remove unused
6115 variables.
6116 * complaints.c (clear_complaints): Remove unused variable.
6117 * corelow.c (core_target_open): Remove unused variable.
6118 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6119 variable.
6120 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6121 variable.
6122 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6123 variable.
6124 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6125 variable.
6126 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6127 variable.
6128 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6129 variable.
6130 * ia64-tdep.c (examine_prologue): Remove unused variable.
6131 * infcall.c (run_inferior_call): Remove unused variable.
6132 * inferior.c (exit_inferior): Remove unused variable.
6133 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6134 * linespec.c (decode_line_2): Remove unused variable.
6135 * linux-nat.c (super_close): Remove.
6136 * linux-tdep.c (linux_info_proc): Remove unused variable.
6137 * mi/mi-main.c (mi_execute_command): Remove unused variable.
6138 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6139 Remove unused variable.
6140 * parse.c (find_minsym_type_and_address): Remove unused variable.
6141 * printcmd.c (info_symbol_command, printf_floating): Remove unused
6142 variable.
6143 * python/py-breakpoint.c (bppy_set_commands): Remove unused
6144 variable.
6145 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6146 variables.
6147 * record-btrace.c (record_btrace_target::store_registers): Remove
6148 unused variable.
6149 (cmd_show_record_btrace_cpu): Remove unused variable.
6150 * riscv-tdep.c (riscv_register_reggroup_p)
6151 (riscv_push_dummy_call, riscv_return_value): Remove unused
6152 variable.
6153 * rust-exp.y (literal): Remove unused variable.
6154 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6155 unused variable.
6156 <STRUCTOP_ANONYMOUS>: Likewise.
6157 * s390-linux-tdep.c (s390_linux_init_abi_31)
6158 (s390_linux_init_abi_64): Remove unused variable.
6159 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6160 (file_select_thread, net_windows_open, _initialize_ser_windows):
6161 Remove unused variables.
6162 * symtab.c (find_pc_sect_line): Remove unused variable.
6163 * target-memory.c (compute_garbled_blocks): Remove unused
6164 variable.
6165 (target_write_memory_blocks): Remove unused variable.
6166 * target.c (target_stack::unpush): Remove unused variables.
6167 * tracepoint.c (start_tracing, all_tracepoint_actions)
6168 (merge_uploaded_trace_state_variables)
6169 (print_one_static_tracepoint_marker): Remove unused variable.
6170 * unittests/basic_string_view/element_access/char/1.cc (test01):
6171 Remove unused variable.
6172 * windows-nat.c (windows_continue, windows_add_all_dlls)
6173 (do_initial_windows_stuff, windows_nat_target::create_inferior):
6174 Remove unused variables.
6175
6176 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
6177
6178 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6179 attr_profile in HAVE_ELF.
6180 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6181 HAVE_ELF.
6182
6183 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
6184
6185 * frame.c (frame_register_unwind): Change parameter name.
6186 (frame_unwind_register): Likewise.
6187 (frame_unwind_register_value): Likewise.
6188 (frame_unwind_register_signed): Likewise.
6189 (frame_unwind_register_unsigned): Likewise.
6190 * frame.h (frame_register_unwind): Likewise.
6191 (frame_unwind_register): Likewise.
6192 (frame_unwind_register_value): Likewise.
6193 (frame_unwind_register_signed): Likewise.
6194 (frame_unwind_register_unsigned): Likewise.
6195 (frame_unwind_arch): Likewise.
6196
6197 2018-07-20 Maciej W. Rozycki <macro@mips.com>
6198
6199 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6200 ISA maintenance.
6201
6202 2018-07-20 Maciej W. Rozycki <macro@mips.com>
6203
6204 * mips-linux-nat.c (mips_linux_nat_target::read_description):
6205 Call `get_ptrace_pid' rather than extracting the ptrace PID by
6206 hand.
6207
6208 2018-07-20 Keith Seitz <keiths@redhat.com>
6209
6210 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6211 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6212 m_compunit_symtab, m_language>: Add "m_" prefix.
6213 Update all uses.
6214 * buildsym.c: Update all uses.
6215
6216 2018-07-20 Tom Tromey <tom@tromey.com>
6217
6218 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6219 * buildsym.h (record_line_ftype): Remove typedef.
6220
6221 2018-07-20 Tom Tromey <tom@tromey.com>
6222
6223 * buildsym-legacy.h (augment_type_symtab): Don't declare.
6224 (end_expandable_symtab): Likewise.
6225 (end_symtab_get_static_block): Likewise.
6226 (end_symtab_from_static_block): Likewise.
6227 * buildsym-legacy.c (augment_type_symtab): Remove.
6228 (end_expandable_symtab): Remove.
6229 (end_symtab_get_static_block): Remove.
6230 (end_symtab_from_static_block): Remove.
6231
6232 2018-07-20 Tom Tromey <tom@tromey.com>
6233
6234 * dwarf2read.c: Include buildsym.h.
6235 (struct dwarf2_cu) <builder>: New method.
6236 (fixup_go_packaging): Update.
6237 (process_full_comp_unit, process_full_type_unit): Update. Don't
6238 use scoped_free_pendings.
6239 (using_directives): Add "cu" parameter, remove "language".
6240 (read_import_statement, setup_type_unit_groups, )
6241 (read_func_scope, read_lexical_block_scope)
6242 (dwarf2_record_block_ranges, read_namespace): Update.
6243 (lnp_state_machine::lnp_state_machine): Add cu parameter.
6244 (lnp_state_machine::handle_end_sequence): Update.
6245 (class lnp_state_machine) <m_cu>: New member.
6246 <m_record_line_callback>: Remove.
6247 <m_currently_recording_lines>: New member.
6248 (lnp_state_machine::handle_set_file): Update.
6249 (noop_record_line): Remove.
6250 (dwarf_record_line_p): Add cu parameter.
6251 (dwarf_record_line_1, dwarf_finish_line): Likewise.
6252 (lnp_state_machine::record_line)
6253 (lnp_state_machine::lnp_state_machine)
6254 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6255 (dwarf_decode_lines): Update.
6256 (dwarf2_start_subfile): Add cu parameter.
6257 (dwarf2_start_symtab, new_symbol): Update.
6258 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6259 Remove dwarf2_per_objfile parameter.
6260 (dwarf_decode_macros): Update.
6261
6262 2018-07-20 Tom Tromey <tom@tromey.com>
6263
6264 * stabsread.c (define_symbol): Update.
6265 * buildsym-legacy.h (get_buildsym_compunit): Declare.
6266 * dwarf2read.c (new_symbol): Update.
6267 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6268 * cp-namespace.c: Include buildsym.h.
6269 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6270 * buildsym-legacy.c (get_buildsym_compunit): New function.
6271
6272 2018-07-20 Tom Tromey <tom@tromey.com>
6273
6274 * xcoffread.c: Include buildsym-legacy.h.
6275 * windows-nat.c: Include buildsym-legacy.h.
6276 * stabsread.c: Include buildsym-legacy.h.
6277 * mdebugread.c: Include buildsym-legacy.h.
6278 * buildsym-legacy.h: New file.
6279 * buildsym-legacy.c: New file, from buildsym.c.
6280 * go32-nat.c: Include buildsym-legacy.h.
6281 * dwarf2read.c: Include buildsym-legacy.h.
6282 * dbxread.c: Include buildsym-legacy.h.
6283 * cp-namespace.c: Include buildsym-legacy.h.
6284 * coffread.c: Include buildsym-legacy.h.
6285 * buildsym.h: Move some contents to buildsym-legacy.h.
6286 * buildsym.c: Include buildsym-legacy.h. Move many functions to
6287 buildsym-legacy.c.
6288 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6289
6290 2018-07-20 Tom Tromey <tom@tromey.com>
6291
6292 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6293 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6294 (buildsym_compunit::buildsym_compunit)
6295 (buildsym_compunit::~buildsym_compunit)
6296 (buildsym_compunit::get_macro_table): Define.
6297
6298 2018-07-20 Tom Tromey <tom@tromey.com>
6299
6300 * buildsym.c (reset_symtab_globals): Remove.
6301 (buildsym_compunit::end_symtab_from_static_block): Update.
6302 (buildsym_compunit::augment_type_symtab): Update.
6303 (end_symtab_from_static_block): Call free_buildsym_compunit.
6304 (augment_type_symtab, end_symtab, end_expandable_symtab):
6305 Likewise.
6306
6307 2018-07-20 Tom Tromey <tom@tromey.com>
6308
6309 * arch-utils.c: Do not include buildsym.h.
6310 * mipsread.c: Do not include buildsym.h.
6311 * machoread.c: Do not include buildsym.h.
6312 * elfread.c: Do not include buildsym.h.
6313
6314 2018-07-20 Tom Tromey <tom@tromey.com>
6315
6316 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6317 initialization.
6318 (buildsym_compunit): Add new constructor.
6319 (struct buildsym_compunit) <get_last_source_file, finish_block,
6320 record_block_range, start_subfile, patch_subfile_names,
6321 push_subfile, pop_subfile, record_line, get_compunit_symtab,
6322 set_last_source_start_addr, get_last_source_start_addr,
6323 get_local_using_directives, set_local_using_directives,
6324 get_global_using_directives, outermost_context_p,
6325 get_current_context_stack, get_context_stack_depth,
6326 get_current_subfile, get_local_symbols, get_file_symbols,
6327 get_global_symbols, record_debugformat, record_producer,
6328 push_context, pop_context, end_symtab_get_static_block,
6329 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6330 New public methods.
6331 <record_pending_block, finish_block_internal, make_blockvector,
6332 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6333 private methods.
6334 Update all users.
6335
6336 2018-05-22 Tom Tromey <tom@tromey.com>
6337
6338 * buildsym.c (record_pending_block): Move earlier. Remove objfile
6339 parameter.
6340 (finish_block_internal): Update.
6341
6342 2018-07-20 Tom Tromey <tom@tromey.com>
6343
6344 * buildsym.c (record_pending_block): Move earlier. Remove objfile
6345 parameter.
6346 (finish_block_internal): Update.
6347
6348 2018-07-20 Tom Tromey <tom@tromey.com>
6349
6350 * buildsym.h (EXTERN): Don't define or undef.
6351 * buildsym.c (EXTERN): Don't define.
6352
6353 2018-07-20 Tom Tromey <tom@tromey.com>
6354
6355 * buildsym.c: Remove TODO comment.
6356
6357 2018-07-20 Tom Tromey <tom@tromey.com>
6358
6359 * coffread.c (coff_symtab_read): Update.
6360 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6361 (xcoff_new_init): Update.
6362 * mipsread.c (mipscoff_new_init): Update.
6363 * mdebugread.c (mdebug_build_psymtabs): Update.
6364 * elfread.c (elf_new_init): Update.
6365 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6366 Update.
6367 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6368 (coffstab_build_psymtabs, elfstab_build_psymtabs)
6369 (stabsect_build_psymtabs): Update.
6370 * buildsym.h (buildsym_init): Don't declare.
6371 * buildsym.c: Update comment.
6372 (prepare_for_building): Remove.
6373 (start_symtab, restart_symtab): Update.
6374 (reset_symtab_globals): Update comment.
6375 (buildsym_init): Remove.
6376
6377 2018-07-20 Tom Tromey <tom@tromey.com>
6378
6379 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6380 * stabsread.c (patch_block_stabs, define_symbol, read_type)
6381 (read_enum_type, common_block_start, common_block_end)
6382 (cleanup_undefined_types_1, finish_global_stabs): Update.
6383 * mdebugread.c (psymtab_to_symtab_1): Update.
6384 * dwarf2read.c (fixup_go_packaging, read_func_scope)
6385 (read_lexical_block_scope, new_symbol): Update.
6386 * dbxread.c (process_one_symbol): Update.
6387 * coffread.c (coff_symtab_read, process_coff_symbol)
6388 (coff_read_enum_type): Update.
6389 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6390 declare.
6391 (get_local_symbols, get_file_symbols, get_global_symbols): New
6392 functions.
6393 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6394 m_global_symbols.
6395 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6396 (~scoped_free_pendings): Update.
6397 (finish_block, prepare_for_building, reset_symtab_globals)
6398 (end_symtab_get_static_block, end_symtab_with_blockvector)
6399 (augment_type_symtab, push_context): Update.
6400 (get_local_symbols, get_file_symbols, get_global_symbols): New
6401 functions.
6402 (buildsym_init): Update.
6403
6404 2018-07-20 Tom Tromey <tom@tromey.com>
6405
6406 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6407 (process_full_type_unit): Likewise.
6408 (dwarf2_start_symtab): Set list_in_scope.
6409
6410 2018-07-20 Tom Tromey <tom@tromey.com>
6411
6412 * dwarf2read.c (process_psymtab_comp_unit_reader)
6413 (build_type_psymtabs_reader): Do not set list_in_scope.
6414
6415 2018-07-20 Tom Tromey <tom@tromey.com>
6416
6417 * buildsym.c (free_pendings): Remove.
6418 (add_symbol_to_list, scoped_free_pendings)
6419 (finish_block_internal, buildsym_init): Update.
6420
6421 2018-07-20 Tom Tromey <tom@tromey.com>
6422
6423 * xcoffread.c (read_xcoff_symtab): Update.
6424 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6425 Update.
6426 * dbxread.c (process_one_symbol): Update.
6427 * coffread.c (coff_symtab_read): Update.
6428 * buildsym.h (finish_block): Update.
6429 * buildsym.c (finish_block): Remove "listhead" argument.
6430 (end_symtab_get_static_block): Update.
6431
6432 2018-07-20 Tom Tromey <tom@tromey.com>
6433
6434 * buildsym.h (class scoped_free_pendings): Remove constructor.
6435 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6436 method.
6437 <m_pending_block_obstack, m_pending_blocks>: New members.
6438 (pending_block_obstack, pending_blocks): Remove.
6439 (scoped_free_pendings::scoped_free_pendings): Default.
6440 (~scoped_free_pendings): Update.
6441 (free_pending_blocks): Remove.
6442 (finish_block_internal, record_pending_block, make_blockvector)
6443 (end_symtab_get_static_block, augment_type_symtab, push_context)
6444 (buildsym_init): Update.
6445
6446 2018-07-20 Tom Tromey <tom@tromey.com>
6447
6448 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6449 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6450 members.
6451 (pending_addrmap, pending_addrmap_obstack)
6452 (pending_addrmap_interesting): Remove.
6453 (scoped_free_pendings, record_block_range, make_blockvector)
6454 (prepare_for_building, reset_symtab_globals, buildsym_init):
6455 Update.
6456
6457 2018-07-20 Tom Tromey <tom@tromey.com>
6458
6459 * xcoffread.c (process_linenos): Update.
6460 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6461 * mdebugread.c (psymtab_to_symtab_1): Update.
6462 * dwarf2read.c (setup_type_unit_groups)
6463 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6464 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6465 * dbxread.c (process_one_symbol): Update.
6466 * coffread.c (coff_symtab_read, enter_linenos)
6467 (process_coff_symbol): Update.
6468 * buildsym.h (current_subfile): Don't declare.
6469 (get_current_subfile): Declare.
6470 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6471 member.
6472 (start_subfile, free_buildsym_compunit, push_subfile)
6473 (prepare_for_building, start_symtab): Update.
6474 (get_current_subfile): New function.
6475
6476 2018-07-20 Tom Tromey <tom@tromey.com>
6477
6478 * coffread.c (coff_symtab_read): Update.
6479 * xcoffread.c (read_xcoff_symtab): Update.
6480 * dwarf2read.c (new_symbol): Update.
6481 (read_func_scope, read_lexical_block_scope): Update.
6482 * dbxread.c (process_one_symbol): Update.
6483 * buildsym.h (context_stack, context_stack_depth): Don't declare.
6484 (outermost_context_p): Remove macro.
6485 (outermost_context_p, get_current_context_stack)
6486 (get_context_stack_depth): Declare.
6487 (pop_context): Return struct context_stack.
6488 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6489 member.
6490 (context_stack_size): Remove.
6491 (INITIAL_CONTEXT_STACK_SIZE): Remove.
6492 (prepare_for_building, end_symtab_get_static_block)
6493 (augment_type_symtab, push_context): Update.
6494 (pop_context): Return struct context_stack.
6495 (outermost_context_p, get_current_context_stack)
6496 (get_context_stack_depth): New functions.
6497 (buildsym_init): Update.
6498
6499 2018-07-20 Tom Tromey <tom@tromey.com>
6500
6501 * rust-exp.y: Now a pure parser. Update all rules.
6502 (%union): Move earlier.
6503 (current_parser, work_obstack): Remove globals.
6504 (rust_parser, ~rust_parser): Update.
6505 (class rust_parser) <copy_name, concat3, crate_name, super_name,
6506 lex_character, lex_number, lex_string, lex_identifier,
6507 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6508 convert_name, convert_params_to_expression,
6509 convert_ast_to_expression, ast_basic_type, ast_operation,
6510 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6511 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6512 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6513 ast_array_type, ast_slice_type, ast_reference_type,
6514 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6515 (rust_parse): Update.
6516 (rustyyerror, rustyylex): Add parser parameter.
6517 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6518 (rust_lex_stringish_test, rust_lex_test_sequence)
6519 (rust_lex_test_trailing_dot, rust_lex_test_completion)
6520 (rust_lex_test_push_back, rust_lex_tests): Update.
6521
6522 2018-07-19 Pedro Alves <palves@redhat.com>
6523
6524 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6525 gdb::unique_xmalloc_ptr.
6526 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6527 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6528 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6529 copy-initialization.
6530 * guile/scm-pretty-print.c (ppscm_print_children): Use
6531 gdb::unique_xmalloc_ptr instead of cleanups.
6532 (gdbscm_apply_val_pretty_printer): Remove cleanups.
6533 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6534 gdb::unique_xmalloc_ptr.
6535 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6536 Adjust to use gdb::unique_xmalloc_ptr.
6537 * guile/scm-utils.c (extract_arg): Adjust.
6538 * guile/scm-value.c (gdbscm_value_field): Adjust to use
6539 gdb::unique_xmalloc_ptr instead of a cleanup.
6540
6541 2018-07-19 Tom Tromey <tom@tromey.com>
6542
6543 * utils.c (do_value_free_to_mark)
6544 (make_cleanup_value_free_to_mark): Remove.
6545 * utils.h (make_cleanup_value_free_to_mark): Remove.
6546
6547 2018-07-19 Pedro Alves <palves@redhat.com>
6548
6549 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6550 forwarding reference.
6551
6552 2018-07-18 Pedro Alves <palves@redhat.com>
6553
6554 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6555 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
6556 cleanup.
6557
6558 2018-07-18 Pedro Alves <palves@redhat.com>
6559
6560 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6561 exceptions.
6562 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6563 (gdbscm_wrap): New.
6564 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6565 directly instead of a cleanup.
6566 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6567 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
6568 (vlscm_binop_gdbthrow): New, factored out from ...
6569 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
6570 (vlscm_rich_compare): Use gdbscm_wrap.
6571 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6572 instead of a cleanup.
6573 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6574 cleanup.
6575 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6576 Use xfree directly instead of a cleanup.
6577 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6578 Adjust to use gdbscm_wrap and scoped_value_mark.
6579 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6580 (gdbscm_value_address, gdbscm_value_dereference)
6581 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6582 scoped_value_mark.
6583 (gdbscm_value_dynamic_type): Use scoped_value_mark.
6584 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6585 scoped_value_mark.
6586 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6587 gdbscm_wrap and scoped_value_mark.
6588 (gdbscm_value_to_string): Use xfree directly instead of a
6589 cleanup. Move 'buffer' unique_ptr to TRY scope.
6590 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6591 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
6592 scoped_value_mark.
6593 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6594 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6595 scoped_value_mark.
6596 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6597 gdbscm_wrap.
6598
6599 2018-07-18 Tom de Vries <tdevries@suse.de>
6600
6601 * findvar.c (default_read_var_value): Also resolve dynamic type for
6602 LOC_OPTIMIZED_OUT vars.
6603
6604 2018-07-18 Maciej W. Rozycki <macro@mips.com>
6605
6606 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6607 decoding.
6608
6609 2018-07-17 Tom Tromey <tom@tromey.com>
6610
6611 * guile/scm-param.c (pascm_set_func, pascm_show_func)
6612 (compute_enum_list, pascm_set_param_value_x)
6613 (gdbscm_parameter_value): Update.
6614 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6615 (gdbscm_scm_to_host_string): Update.
6616 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6617 Update.
6618 * guile/scm-cmd.c (cmdscm_add_completion): Update.
6619 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6620 * guile/scm-string.c (gdbscm_scm_to_string): Return
6621 unique_xmalloc_ptr.
6622 (gdbscm_scm_to_host_string): Likewise.
6623
6624 2018-07-17 Tom Tromey <tom@tromey.com>
6625
6626 * guile/guile.c (gdbscm_eval_from_control_command): Update.
6627 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6628 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6629 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6630 unique_xmalloc_ptr.
6631
6632 2018-07-17 Tom Tromey <tom@tromey.com>
6633
6634 * guile/scm-param.c (pascm_signal_setshow_error): Update.
6635 * guile/guile-internal.h (gdbscm_exception_message_to_string):
6636 Update.
6637 * guile/scm-cmd.c (cmdscm_function): Update.
6638 * guile/scm-pretty-print.c
6639 (ppscm_print_exception_unless_memory_error): Update.
6640 * guile/scm-exception.c (gdbscm_exception_message_to_string):
6641 Return unique_xmalloc_ptr.
6642
6643 2018-07-17 Tom Tromey <tom@tromey.com>
6644
6645 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6646 Use string_printf.
6647
6648 2018-07-17 Jim Wilson <jimw@sifive.com>
6649
6650 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6651 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
6652 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
6653 unecessary braces after EF_RISCV_RVC test. Delete call to
6654 set_gdbarch_decr_pc_after_break.
6655
6656 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6657 RISCV_LAST_FP_REGNUM + 1.
6658 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6659
6660 2018-07-17 Tom Tromey <tom@tromey.com>
6661
6662 * configure.ac: Remove --disable-gdbcli.
6663 * configure: Rebuild.
6664 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6665 (SUBDIR_CLI_CFLAGS): Remove.
6666 (SFILES): Use SUBDIR_CLI_SRCS.
6667 (COMMON_OBS): Use SUBDIR_CLI_OBS.
6668
6669 2018-07-17 Tom Tromey <tom@tromey.com>
6670
6671 PR gdb/18624:
6672 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6673
6674 2018-07-16 Jim Wilson <jimw@sifive.com>
6675
6676 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6677
6678 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6679
6680 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6681 variable.
6682 (libunwind_frame_sniffer): Likewise.
6683 (libunwind_frame_prev_register): Likewise.
6684 (libunwind_sigtramp_frame_sniffer): Likewise.
6685 * ia64-tdep.c (ia64_access_reg): Likewise.
6686 (ia64_access_rse_reg): Likewise.
6687 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6688 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6689
6690 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6691
6692 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6693
6694 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6695
6696 * remote-sim.c (gdbsim_target::close,
6697 gdbsim_target::mourn_inferior): Remove unused variables.
6698
6699 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
6700
6701 * ia64-tdep.c (ktab_buf): New global.
6702 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6703 (get_kernel_table): Adjust.
6704
6705 2018-07-16 Tom Tromey <tom@tromey.com>
6706
6707 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6708 * dwarf2read.c (using_directives, new_symbol): Use
6709 outermost_context_p.
6710 * dbxread.c (process_one_symbol): Use outermost_context_p.
6711 * coffread.c (coff_symtab_read): Use outermost_context_p.
6712
6713 2018-07-16 Tom Tromey <tom@tromey.com>
6714
6715 * dwarf2read.c (using_directives, read_func_scope)
6716 (read_lexical_block_scope): Update.
6717 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6718 * buildsym.h (local_using_directives, global_using_directives):
6719 Don't declare.
6720 (get_local_using_directives, set_local_using_directives)
6721 (get_global_using_directives): Declare.
6722 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6723 m_global_using_directives>: New members.
6724 (finish_block_internal, prepare_for_building)
6725 (reset_symtab_globals, end_symtab_get_static_block)
6726 (push_context): Update.
6727 (get_local_using_directives, set_local_using_directives)
6728 (get_global_using_directives): New functions.
6729 (buildsym_init): Update.
6730
6731 2018-07-16 Tom Tromey <tom@tromey.com>
6732
6733 * xcoffread.c (xcoff_initial_scan): Don't call
6734 free_pending_blocks.
6735 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6736 * buildsym.h (class scoped_free_pendings): Add constructor.
6737 (free_pending_blocks): Don't declare.
6738 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6739 (free_pending_blocks): Now static.
6740
6741 2018-07-16 Tom Tromey <tom@tromey.com>
6742
6743 * buildsym.h (push_subfile, pop_subfile): Update declarations.
6744 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6745 member.
6746 (struct subfile_stack): Remove.
6747 (subfile_stack): Remove.
6748 (push_subfile, pop_subfile, buildsym_init): Update.
6749
6750 2018-07-16 Tom Tromey <tom@tromey.com>
6751
6752 * buildsym.c (push_subfile): Use gdb_assert.
6753 (pop_subfile): Use gdb_assert.
6754
6755 2018-07-16 Tom Tromey <tom@tromey.com>
6756
6757 * buildsym.h (merge_symbol_lists): Remove.
6758 * buildsym.c (merge_symbol_lists): Remove.
6759
6760 2018-07-16 Tom Tromey <tom@tromey.com>
6761
6762 * stabsread.c (scan_file_globals): Update comment.
6763 * stabsread.h (scan_file_globals): Move from buildsym.h.
6764 * buildsym.h (scan_file_globals): Move to stabsread.h.
6765
6766 2018-07-16 Tom Tromey <tom@tromey.com>
6767
6768 * xcoffread.c (xcoff_new_init): Update.
6769 * mipsread.c (mipscoff_new_init): Update.
6770 * mdebugread.c (mdebug_build_psymtabs): Update.
6771 * elfread.c (elf_new_init): Update.
6772 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6773 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6774 * buildsym.h (buildsym_new_init): Don't declare.
6775 * buildsym.c (buildsym_new_init): Remove.
6776
6777 2018-07-16 Tom Tromey <tom@tromey.com>
6778
6779 * stabsread.h (within_function): Move from buildsym.h.
6780 * stabsread.c (start_stabs): Clear within_function.
6781 * coffread.c (coff_start_symtab): Clear within_function.
6782 * buildsym.h (within_function): Move to stabsread.h.
6783 * buildsym.c (prepare_for_building): Update.
6784
6785 2018-07-16 Tom Tromey <tom@tromey.com>
6786
6787 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6788 * dwarf2read.c (dwarf2_start_symtab): Don't set
6789 processing_gcc_compilation.
6790 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6791
6792 2018-07-16 Tom Tromey <tom@tromey.com>
6793
6794 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6795 (next_symbol_text_func): Move from buildsym.h.
6796 * stabsread.c (hashname): Move from buildsym.c.
6797 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6798 (next_symbol_text_func, hashname): Move to stabsread.h.
6799 * buildsym.c: Don't include bcache.h
6800 (hashname): Move to stasbread.c.
6801
6802 2018-07-16 Tom Tromey <tom@tromey.com>
6803
6804 * buildsym.h (context_stack_size): Don't declare.
6805 * buildsym.c (context_stack_size): New global.
6806
6807 2018-07-16 Tom Tromey <tom@tromey.com>
6808
6809 * dbxread.c (processing_acc_compilation): New global.
6810 * buildsym.h (processing_acc_compilation): Don't declare.
6811
6812 2018-07-16 Tom Tromey <tom@tromey.com>
6813
6814 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6815 * dbxread.c (read_ofile_symtab): Update.
6816 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6817 * buildsym.h (last_source_start_addr): Remove.
6818 (set_last_source_start_addr, get_last_source_start_addr):
6819 Declare.
6820 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6821 parameter.
6822 (struct buildsym_compunit) <m_last_source_start_addr>: New
6823 member.
6824 (prepare_for_building): Remove start_addr parameter.
6825 (start_symtab, restart_symtab, end_symtab_get_static_block)
6826 (end_symtab_with_blockvector): Update.
6827 (set_last_source_start_addr, get_last_source_start_addr): New
6828 functions.
6829
6830 2018-07-16 Tom Tromey <tom@tromey.com>
6831
6832 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6833 member.
6834 (have_line_numbers): Remove.
6835 (record_line, prepare_for_building, end_symtab_get_static_block)
6836 (augment_type_symtab): Update.
6837
6838 2018-07-16 Tom Tromey <tom@tromey.com>
6839
6840 * buildsym.c (~buildsym_compunit): Free the macro table.
6841 (struct buildsym_compunit) <get_macro_table, release_macros>: New
6842 methods.
6843 <m_pending_macros>: New member.
6844 (pending_macros): Remove.
6845 (~scoped_free_pendings, get_macro_table, prepare_for_building)
6846 (reset_symtab_globals, end_symtab_get_static_block)
6847 (end_symtab_with_blockvector, augment_type_symtab)
6848 (buildsym_init): Update.
6849
6850 2018-07-16 Tom Tromey <tom@tromey.com>
6851
6852 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6853 parameter.
6854 (buildsym_compunit::set_last_source_file): New method.
6855 <m_last_source_file>: New member.
6856 (prepare_for_building): Remove "name" parameter.
6857 (start_symtab, restart_symtab, reset_symtab_globals): Update.
6858 (last_source_file): Remove.
6859 (set_last_source_file, get_last_source_file): Update.
6860
6861 2018-07-16 Tom Tromey <tom@tromey.com>
6862
6863 * buildsym.c (prepare_for_building): Add assert.
6864
6865 2018-07-16 Tom Tromey <tom@tromey.com>
6866
6867 * buildsym.c (~buildsym_compunit): Update.
6868 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6869 (start_subfile, patch_subfile_names)
6870 (end_symtab_with_blockvector): Update.
6871
6872 2018-07-16 Tom Tromey <tom@tromey.com>
6873
6874 * buildsym.c (struct buildsym_compunit): Add constructor,
6875 destructor, initializers.
6876 (start_buildsym_compunit): Remove.
6877 (free_buildsym_compunit): Use "delete".
6878 (start_symtab, restart_symtab): Use "new".
6879
6880 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
6881
6882 * symfile.c (set_objfile_default_section_offset): Remove struct
6883 keyword.
6884
6885 2018-07-14 Stafford Horne <shorne@gmail.com>
6886
6887 * (Responsible Maintainers): Add myself as or1k maintainer.
6888
6889 2018-07-13 Tom Tromey <tom@tromey.com>
6890
6891 * symfile.c (set_objfile_default_section_offset): Use extra braces
6892 around initializer.
6893
6894 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6895
6896 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6897 non-branching basr.
6898
6899 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6900
6901 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6902 unittests/cli-utils-selftests.c
6903 * unittests/cli-utils-selftests.c: New file.
6904
6905 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6906
6907 * NEWS: Mention new commands. Mention change to 'thread apply'.
6908
6909 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6910
6911 * thread.c (thr_try_catch_cmd): New function.
6912 (thread_apply_all_command): Handle qcs flags.
6913 (thread_apply_command): Handle qcs flags.
6914 (taas_command): New function.
6915 (tfaas_command): New function.
6916 (_initialize_thread): Update to setup the new commands 'taas
6917 and 'tfaas'. Change doc string for 'thread apply'.
6918
6919 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6920
6921 * stack.c: (trailing_outermost_frame): New function, mostly
6922 extracted from backtrace_command_1.
6923 (leading_innermost_frame): New function.
6924 (backtrace_command_1): Update to call trailing_outermost_frame.
6925 (frame_apply_command_count): New function.
6926 (frame_apply_level_command): New function.
6927 (frame_apply_all_command): New function.
6928 (frame_apply_command): New function.
6929 (faas_command): New function.
6930 (frame_cmd_list): New variable.
6931 (_initialize_stack): Update to setup the new commands 'frame apply'
6932 and 'faas'.
6933
6934 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6935
6936 * cli-utils.c (number_or_range_parser::get_number): Only handle
6937 numbers or convenience var as numbers.
6938 (parse_flags): New function.
6939 (parse_flags_qcs): New function.
6940 (number_or_range_parser::finished): Ensure parsing end is detected
6941 before end of string.
6942 * cli-utils.h (parse_flags): New function.
6943 (parse_flags_qcs): New function.
6944 (number_or_range_parser): Remove m_finished bool.
6945 (number_or_range_parser::skip_range): Set m_in_range to false.
6946
6947 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
6948
6949 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6950 on Windows.
6951
6952 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6953 Jan Kratochvil <jan.kratochvil@redhat.com>
6954 Paul Fertser <fercerpav@gmail.com>
6955 Tsutomu Seki <sekiriki@gmail.com>
6956 Pedro Alves <palves@redhat.com>
6957
6958 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6959 'unittests/parse-connection-spec-selftests.c'.
6960 (COMMON_SFILES): Add 'common/netstuff.c'.
6961 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6962 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6963 * common/netstuff.c: New file.
6964 * common/netstuff.h: New file.
6965 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6966 (wait_for_connect): Update comment. New parameter
6967 'gdb::optional<int> sock' instead of 'struct serial *scb'.
6968 Use 'sock' directly instead of 'scb->fd'.
6969 (try_connect): New function, with code from 'net_open'.
6970 (net_open): Rewrite main loop to deal with multiple
6971 sockets/addresses. Handle IPv6-style hostnames; implement
6972 support for IPv6 connections.
6973 * unittests/parse-connection-spec-selftests.c: New file.
6974
6975 2018-07-11 Pedro Alves <palves@redhat.com>
6976
6977 PR gdb/23377
6978 * remote.c (remote_target::remote_detach_pid): Call
6979 set_current_process.
6980
6981 2018-07-11 Pedro Alves <palves@redhat.com>
6982
6983 * h8300-tdep.c (h8300_gdbarch_init): Remove
6984 set_gdbarch_ecoff_reg_to_regnum calls.
6985
6986 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6987
6988 PR c++/23373
6989 * c-typeprint.c (c_type_print_base_struct_union): Don't print
6990 offsets/sizes for static members of a class/struct.
6991
6992 2018-07-11 Alan Hayward <alan.hayward@arm.com>
6993
6994 * target-descriptions.c (tdesc_register_bitsize): Rename.
6995 * target-descriptions.h (tdesc_register_bitsize): Likewise.
6996 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6997 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6998
6999 2018-07-10 Tom Tromey <tom@tromey.com>
7000
7001 * breakpoint.c (moribund_locations): Now static and a
7002 std::vector.
7003 (breakpoint_init_inferior, moribund_breakpoint_here_p)
7004 (build_bpstat_chain, update_global_location_list)
7005 (breakpoint_retire_moribund): Update.
7006 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
7007 VEC.
7008
7009 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
7010
7011 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
7012 (riscv_register_reggroup_p): Use new function, remove unneeded
7013 parenthesis.
7014 (riscv_push_dummy_call): Extend assert to compare against xlen or
7015 flen based on register type.
7016
7017 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
7018
7019 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
7020
7021 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
7022
7023 * remote.c (show_hardware_watchpoint_limit): New function.
7024 (show_hardware_watchpoint_length_limit): New function.
7025 (show_hardware_breakpoint_limit): New function.
7026 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
7027 where appropriate, update help text.
7028
7029 2018-07-09 Tom Tromey <tom@tromey.com>
7030
7031 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
7032 (CLIBS): Don't mention NAT_CLIBS.
7033
7034 2018-07-09 Tom Tromey <tom@tromey.com>
7035
7036 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
7037 (LIBGDB_OBS, clean mostlyclean): Update.
7038 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
7039
7040 2018-07-09 Tom Tromey <tom@tromey.com>
7041
7042 * Makefile.in (%.c: %.y): Use ECHO_YACC.
7043 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
7044 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
7045
7046 2018-07-09 Tom Tromey <tom@tromey.com>
7047
7048 * Makefile.in (ALLDEPFILES): Remove exec.c.
7049 (COMMON_OBS): Remove exec.o.
7050 (COMMON_SFILES): Add exec.c.
7051
7052 2018-07-09 Tom Tromey <tom@tromey.com>
7053
7054 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
7055
7056 2018-07-09 Tom Tromey <tom@tromey.com>
7057
7058 * Makefile.in (clean mostlyclean): Remove stamp-version.
7059 (version.c): Depend on stamp-version.
7060 (stamp-version): New rule, from version.c rule.
7061
7062 2018-07-09 Tom Tromey <tom@tromey.com>
7063
7064 * Makefile.in (init.c): Depend on stamp-init.
7065 (stamp-init): New rule, from init.c rule.
7066 (clean mostlyclean): Remove stamp-init.
7067
7068 2018-07-09 Tom Tromey <tom@tromey.com>
7069
7070 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
7071 SUBDIR_GCC_COMPILE_SRCS.
7072
7073 2018-07-09 Tom Tromey <tom@tromey.com>
7074
7075 * Makefile.in (init.c): Remove some unused sed rules.
7076
7077 2018-07-09 Tom Tromey <tom@tromey.com>
7078
7079 * Makefile.in (TSOBS): Remove.
7080 (INIT_FILES): Update.
7081 (LIBGDB_OBS): Update.
7082 (COMMON_SFILES): Add inflow.c.
7083 (SFILES): Remove inflow.c.
7084
7085 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7086
7087 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
7088
7089 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
7090
7091 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
7092 get_saveloc_name, is_signal_frame_name, step_name,
7093 init_remote_name, create_addr_space_name,
7094 destroy_addr_space_name, search_unwind_table_name,
7095 find_dyn_list_name): Constify.
7096
7097 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
7098
7099 * darwin-nat.c (darwin_pthread_kill): New function.
7100 (darwin_resume_thread): Use darwin_pthread_kill.
7101
7102 2018-07-05 Tom de Vries <tdevries@suse.de>
7103
7104 * macroexp.c (macro_buffer) <operator=>: New member function.
7105
7106 2018-07-04 Tom Tromey <tom@tromey.com>
7107
7108 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7109
7110 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
7111
7112 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7113 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7114 * maint.c: Likewise.
7115 * top.c: Likewise.
7116
7117 2018-07-04 Joel Brobecker <brobecker@adacore.com>
7118
7119 * NEWS: Create a new section for the next release branch.
7120 Rename the section of the current branch, now that it has
7121 been cut.
7122
7123 2018-07-04 Joel Brobecker <brobecker@adacore.com>
7124
7125 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7126 * version.in: Bump version to 8.2.50.DATE-git.
7127
7128 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
7129 Pedro Alves <palves@redhat.com>
7130
7131 * linux-nat.c (linux_init_ptrace): Rename to ...
7132 (linux_init_ptrace_procfs): ... this. Call
7133 linux_proc_init_warnings.
7134 (linux_nat_target::post_attach)
7135 (linux_nat_target::post_startup_inferior): Adjust.
7136 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7137 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7138
7139 2018-07-04 Tom de Vries <tdevries@suse.de>
7140
7141 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7142 check ...
7143 (read_comp_unit_head): ... here.
7144
7145 2018-07-03 Tom Tromey <tom@tromey.com>
7146
7147 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7148 (stop_tracing, tstatus_command)
7149 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7150 (print_one_static_tracepoint_marker): Update.
7151 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7152 std::vector.
7153 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
7154 VEC.
7155 (all_tracepoints, static_tracepoints_here): Return std::vector.
7156
7157 2018-07-03 Tom Tromey <tom@tromey.com>
7158
7159 * common/ptid.c (ptid_equal): Remove.
7160 * common/ptid.h (ptid_equal): Don't declare.
7161 * ada-tasks.c: Update.
7162 * breakpoint.c: Update.
7163 * common/agent.c: Update.
7164 * corelow.c: Update.
7165 * darwin-nat-info.c: Update.
7166 * darwin-nat.c: Update.
7167 * dcache.c: Update.
7168 * dtrace-probe.c: Update.
7169 * dummy-frame.c: Update.
7170 * fbsd-nat.c: Update.
7171 * frame.c: Update.
7172 * gdbthread.h: Update.
7173 * gnu-nat.c: Update.
7174 * go32-nat.c: Update.
7175 * inf-loop.c: Update.
7176 * inf-ptrace.c: Update.
7177 * infcall.c: Update.
7178 * infcmd.c: Update.
7179 * inflow.c: Update.
7180 * infrun.c: Update.
7181 * linux-fork.c: Update.
7182 * linux-nat.c: Update.
7183 * linux-thread-db.c: Update.
7184 * mi/mi-cmd-var.c: Update.
7185 * mi/mi-interp.c: Update.
7186 * mi/mi-main.c: Update.
7187 * nto-procfs.c: Update.
7188 * ppc-linux-tdep.c: Update.
7189 * procfs.c: Update.
7190 * python/py-inferior.c: Update.
7191 * python/py-record-btrace.c: Update.
7192 * python/py-record.c: Update.
7193 * ravenscar-thread.c: Update.
7194 * regcache.c: Update.
7195 * remote-sim.c: Update.
7196 * remote.c: Update.
7197 * sol-thread.c: Update.
7198 * solib.c: Update.
7199 * target.c: Update.
7200 * tui/tui-stack.c: Update.
7201 * varobj.c: Update.
7202 * windows-nat.c: Update.
7203 * windows-tdep.c: Update.
7204
7205 2018-07-03 Tom Tromey <tom@tromey.com>
7206
7207 * common/ptid.c (ptid_match): Remove.
7208 * common/ptid.h (ptid_match): Don't declare.
7209 * fbsd-nat.c: Update.
7210 * infcmd.c: Update.
7211 * infrun.c: Update.
7212 * linux-nat.c: Update.
7213 * record-btrace.c: Update.
7214 * regcache.c: Update.
7215 * remote.c: Update.
7216
7217 2018-07-03 Tom Tromey <tom@tromey.com>
7218
7219 * common/ptid.c (ptid_tid_p): Remove.
7220 * common/ptid.h (ptid_tid_p): Don't declare.
7221 * sol-thread.c: Update.
7222
7223 2018-07-03 Tom Tromey <tom@tromey.com>
7224
7225 * common/ptid.c (ptid_lwp_p): Remove.
7226 * common/ptid.h (ptid_lwp_p): Don't declare.
7227 * fbsd-nat.c: Update.
7228 * linux-nat.c: Update.
7229 * nat/linux-procfs.c: Update.
7230 * nat/x86-linux-dregs.c: Update.
7231 * sol-thread.c: Update.
7232
7233 2018-07-03 Tom Tromey <tom@tromey.com>
7234
7235 * common/ptid.c (ptid_is_pid): Remove.
7236 * common/ptid.h (ptid_is_pid): Don't declare.
7237 * infrun.c: Update.
7238 * linux-nat.c: Update.
7239 * mi/mi-interp.c: Update.
7240 * remote.c: Update.
7241 * thread.c: Update.
7242
7243 2018-07-03 Tom Tromey <tom@tromey.com>
7244
7245 * common/ptid.c (ptid_get_tid): Remove.
7246 * common/ptid.h (ptid_get_tid): Don't declare.
7247 * ada-tasks.c: Update.
7248 * aix-thread.c: Update.
7249 * bsd-uthread.c: Update.
7250 * darwin-nat.c: Update.
7251 * fbsd-nat.c: Update.
7252 * i386-darwin-nat.c: Update.
7253 * infrun.c: Update.
7254 * linux-tdep.c: Update.
7255 * nto-procfs.c: Update.
7256 * ppc-ravenscar-thread.c: Update.
7257 * python/py-infthread.c: Update.
7258 * ravenscar-thread.c: Update.
7259 * sol-thread.c: Update.
7260 * sparc-ravenscar-thread.c: Update.
7261 * windows-nat.c: Update.
7262
7263 2018-07-03 Tom Tromey <tom@tromey.com>
7264
7265 * common/ptid.c (ptid_get_lwp): Remove.
7266 * common/ptid.h (ptid_get_lwp): Don't declare.
7267 * aarch64-linux-nat.c: Update.
7268 * ada-tasks.c: Update.
7269 * aix-thread.c: Update.
7270 * amd64-linux-nat.c: Update.
7271 * arm-linux-nat.c: Update.
7272 * corelow.c: Update.
7273 * fbsd-nat.c: Update.
7274 * fbsd-tdep.c: Update.
7275 * gnu-nat.c: Update.
7276 * i386-cygwin-tdep.c: Update.
7277 * i386-gnu-nat.c: Update.
7278 * i386-linux-nat.c: Update.
7279 * ia64-linux-nat.c: Update.
7280 * inf-ptrace.c: Update.
7281 * infrun.c: Update.
7282 * linux-fork.c: Update.
7283 * linux-nat.c: Update.
7284 * linux-tdep.c: Update.
7285 * linux-thread-db.c: Update.
7286 * mips-linux-nat.c: Update.
7287 * nat/aarch64-linux-hw-point.c: Update.
7288 * nat/aarch64-linux.c: Update.
7289 * nat/linux-btrace.c: Update.
7290 * nat/linux-osdata.c: Update.
7291 * nat/linux-procfs.c: Update.
7292 * nat/x86-linux-dregs.c: Update.
7293 * obsd-nat.c: Update.
7294 * ppc-fbsd-nat.c: Update.
7295 * ppc-linux-nat.c: Update.
7296 * procfs.c: Update.
7297 * python/py-infthread.c: Update.
7298 * ravenscar-thread.c: Update.
7299 * remote.c: Update.
7300 * s390-linux-nat.c: Update.
7301 * sol-thread.c: Update.
7302 * sol2-tdep.c: Update.
7303 * spu-linux-nat.c: Update.
7304 * x86-linux-nat.c: Update.
7305 * xtensa-linux-nat.c: Update.
7306
7307 2018-07-03 Tom Tromey <tom@tromey.com>
7308
7309 * common/ptid.c (ptid_get_pid): Remove.
7310 * common/ptid.h (ptid_get_pid): Don't declare.
7311 * aarch64-linux-nat.c: Update.
7312 * ada-lang.c: Update.
7313 * aix-thread.c: Update.
7314 * alpha-bsd-nat.c: Update.
7315 * amd64-fbsd-nat.c: Update.
7316 * amd64-linux-nat.c: Update.
7317 * arm-linux-nat.c: Update.
7318 * arm-nbsd-nat.c: Update.
7319 * auxv.c: Update.
7320 * break-catch-syscall.c: Update.
7321 * breakpoint.c: Update.
7322 * bsd-uthread.c: Update.
7323 * corelow.c: Update.
7324 * ctf.c: Update.
7325 * darwin-nat.c: Update.
7326 * fbsd-nat.c: Update.
7327 * fbsd-tdep.c: Update.
7328 * gcore.c: Update.
7329 * gnu-nat.c: Update.
7330 * hppa-nbsd-nat.c: Update.
7331 * hppa-obsd-nat.c: Update.
7332 * i386-fbsd-nat.c: Update.
7333 * ia64-linux-nat.c: Update.
7334 * inf-ptrace.c: Update.
7335 * infcmd.c: Update.
7336 * inferior.c: Update.
7337 * inferior.h: Update.
7338 * inflow.c: Update.
7339 * infrun.c: Update.
7340 * linux-fork.c: Update.
7341 * linux-nat.c: Update.
7342 * linux-tdep.c: Update.
7343 * linux-thread-db.c: Update.
7344 * m68k-bsd-nat.c: Update.
7345 * mi/mi-interp.c: Update.
7346 * mi/mi-main.c: Update.
7347 * mips-linux-nat.c: Update.
7348 * mips-nbsd-nat.c: Update.
7349 * mips64-obsd-nat.c: Update.
7350 * nat/aarch64-linux-hw-point.c: Update.
7351 * nat/aarch64-linux.c: Update.
7352 * nat/linux-btrace.c: Update.
7353 * nat/linux-osdata.c: Update.
7354 * nat/linux-procfs.c: Update.
7355 * nat/x86-linux-dregs.c: Update.
7356 * nto-procfs.c: Update.
7357 * obsd-nat.c: Update.
7358 * ppc-linux-nat.c: Update.
7359 * ppc-nbsd-nat.c: Update.
7360 * ppc-obsd-nat.c: Update.
7361 * proc-service.c: Update.
7362 * procfs.c: Update.
7363 * python/py-inferior.c: Update.
7364 * python/py-infthread.c: Update.
7365 * ravenscar-thread.c: Update.
7366 * record.c: Update.
7367 * remote-sim.c: Update.
7368 * remote.c: Update.
7369 * rs6000-nat.c: Update.
7370 * s390-linux-nat.c: Update.
7371 * sh-nbsd-nat.c: Update.
7372 * sol-thread.c: Update.
7373 * sparc-nat.c: Update.
7374 * sparc64-tdep.c: Update.
7375 * spu-linux-nat.c: Update.
7376 * spu-tdep.c: Update.
7377 * target-debug.h: Update.
7378 * target.c: Update.
7379 * thread.c: Update.
7380 * tid-parse.c: Update.
7381 * tracefile-tfile.c: Update.
7382 * vax-bsd-nat.c: Update.
7383 * windows-nat.c: Update.
7384 * x86-linux-nat.c: Update.
7385 * x86-nat.c: Update.
7386
7387 2018-07-03 Tom Tromey <tom@tromey.com>
7388
7389 * common/ptid.c (pid_to_ptid): Remove.
7390 * common/ptid.h (pid_to_ptid): Don't declare.
7391 * aix-thread.c: Update.
7392 * arm-linux-nat.c: Update.
7393 * common/ptid.c: Update.
7394 * common/ptid.h: Update.
7395 * corelow.c: Update.
7396 * ctf.c: Update.
7397 * darwin-nat.c: Update.
7398 * fbsd-nat.c: Update.
7399 * fork-child.c: Update.
7400 * gnu-nat.c: Update.
7401 * go32-nat.c: Update.
7402 * inf-ptrace.c: Update.
7403 * infcmd.c: Update.
7404 * inferior.c: Update.
7405 * infrun.c: Update.
7406 * linux-fork.c: Update.
7407 * linux-nat.c: Update.
7408 * nat/aarch64-linux-hw-point.c: Update.
7409 * nat/fork-inferior.c: Update.
7410 * nat/x86-linux-dregs.c: Update.
7411 * nto-procfs.c: Update.
7412 * obsd-nat.c: Update.
7413 * procfs.c: Update.
7414 * progspace.c: Update.
7415 * remote.c: Update.
7416 * rs6000-nat.c: Update.
7417 * s390-linux-nat.c: Update.
7418 * sol-thread.c: Update.
7419 * spu-linux-nat.c: Update.
7420 * target.c: Update.
7421 * top.c: Update.
7422 * tracefile-tfile.c: Update.
7423 * windows-nat.c: Update.
7424
7425 2018-07-03 Tom Tromey <tom@tromey.com>
7426
7427 * common/ptid.h (ptid_build): Don't declare.
7428 * common/ptid.c (ptid_build): Remove.
7429 * aix-thread.c: Update.
7430 * bsd-kvm.c: Update.
7431 * bsd-uthread.c: Update.
7432 * common/agent.c: Update.
7433 * common/ptid.c: Update.
7434 * common/ptid.h: Update.
7435 * corelow.c: Update.
7436 * darwin-nat.c: Update.
7437 * fbsd-nat.c: Update.
7438 * gnu-nat.c: Update.
7439 * linux-fork.c: Update.
7440 * linux-nat.c: Update.
7441 * linux-thread-db.c: Update.
7442 * nat/linux-osdata.c: Update.
7443 * nat/linux-procfs.c: Update.
7444 * nto-procfs.c: Update.
7445 * obsd-nat.c: Update.
7446 * proc-service.c: Update.
7447 * procfs.c: Update.
7448 * ravenscar-thread.c: Update.
7449 * remote-sim.c: Update.
7450 * remote.c: Update.
7451 * sol-thread.c: Update.
7452 * target.c: Update.
7453 * windows-nat.c: Update.
7454
7455 2018-07-03 Tom Tromey <tom@tromey.com>
7456
7457 * infrun.c (follow_exec): Use exit_inferior_silent.
7458 * inferior.c (exit_inferior_num_silent): Remove.
7459 * inferior.h (exit_inferior_num_silent): Don't declare.
7460
7461 2018-07-03 Tom Tromey <tom@tromey.com>
7462
7463 PR cli/23340:
7464 * darwin-nat.c (darwin_attach_pid): Reset inferior and
7465 inferior_ptid on error.
7466
7467 2018-07-02 Maciej W. Rozycki <macro@mips.com>
7468 Simon Marchi <simon.marchi@polymtl.ca>
7469
7470 PR tdep/8282
7471 * disasm.h (gdb_disassembler): Add
7472 `m_disassembler_options_holder'. member
7473 * disasm.c (get_all_disassembler_options): New function.
7474 (gdb_disassembler::gdb_disassembler): Use it.
7475 (gdb_buffered_insn_length_init_dis): Likewise.
7476 (gdb_buffered_insn_length): Adjust accordingly.
7477 (set_disassembler_options): Handle options with arguments.
7478 (show_disassembler_options_sfunc): Likewise. Add a leading new
7479 line if showing options with descriptions.
7480 (disassembler_options_completer): Adapt to using the
7481 `disasm_options_and_args_t' structure.
7482 * mips-tdep.c (mips_disassembler_options): New variable.
7483 (mips_disassembler_options_o32): Likewise.
7484 (mips_disassembler_options_n32): Likewise.
7485 (mips_disassembler_options_n64): Likewise.
7486 (gdb_print_insn_mips): Don't set `disassembler_options'.
7487 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7488 functions.
7489 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7490 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
7491 `gdbarch_disassembler_options_implicit' and
7492 `gdbarch_valid_disassembler_options'.
7493 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7494 `disasm_options_and_args_t' structure.
7495 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7496 method.
7497 (valid_disassembler_options): Switch from `disasm_options_t' to
7498 the `disasm_options_and_args_t' structure.
7499 * NEWS: Document `set disassembler-options' support for the MIPS
7500 target.
7501 * gdbarch.h: Regenerate.
7502 * gdbarch.c: Regenerate.
7503
7504 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
7505
7506 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7507
7508 2018-06-29 Joel Brobecker <brobecker@adacore.com>
7509
7510 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7511 parameter in call to amd64_target_description.
7512 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7513 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7514 (amd64fbsd_init_abi): Likewise.
7515 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7516 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7517 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7518 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7519
7520 2018-06-29 Pedro Alves <palves@redhat.com>
7521
7522 * gdb/amd64-tdep.h (amd64_create_target_description): Add
7523 "segments" parameter.
7524 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7525 (_initialize_amd64_tdep): Update call to
7526 amd64_create_target_description.
7527 (amd64_target_description): Add "segments" parameter. Adjust
7528 the implementation to use it.
7529 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7530 call to amd64_create_target_description.
7531 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7532 * gdb/arch/amd64.h (amd64_create_target_description): Add
7533 "segments" register.
7534 * gdb/arch/amd64.c (amd64_create_target_description): Add
7535 "segments" parameter. Call create_feature_i386_64bit_segments
7536 only if SEGMENTS is true.
7537 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7538 call to amd64_create_target_description.
7539
7540 2018-06-29 Pedro Alves <palves@redhat.com>
7541
7542 * thread.c (thread_target_id_str): New, factored out from ...
7543 (print_thread_info_1): ... here. Use it to compute the max
7544 "Target Id" column width.
7545
7546 2018-06-29 Pedro Alves <palves@redhat.com>
7547
7548 * remote.c (remote_target::extra_thread_info): Delete
7549 'display_buf' and 'n' locals. from the cache, regardless of
7550 packet mechanims is in use. Use cache for qThreadExtra and qP
7551 methods too.
7552
7553 2018-06-29 Pedro Alves <palves@redhat.com>
7554
7555 * blockframe.c (find_pc_sect_containing_function): New function.
7556 * breakpoint.c (print_breakpoint_location): Don't call
7557 find_pc_sect_function.
7558 * linespec.c (create_sals_line_offset): Record the location's
7559 symbol in the sal.
7560 * linespec.c (convert_address_location_to_sals): Fill in sal's
7561 symbol with find_pc_sect_containing_function.
7562 * symtab.c (find_function_start_sal): Rename to ...
7563 (find_function_start_sal_1): ... this.
7564 (find_function_start_sal): Reimplement as wrapper around
7565 find_function_start_sal_1, and use
7566 find_pc_sect_containing_function to fill in the sal's symbol.
7567 (find_function_start_sal(symbol*, bool)): Adjust.
7568 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7569 comments.
7570 (find_pc_sect_containing_function): Declare.
7571
7572 2018-06-29 Pedro Alves <palves@redhat.com>
7573
7574 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7575 true if the the location has no symbol.
7576
7577 2018-06-28 Tom Tromey <tom@tromey.com>
7578
7579 * NEWS: Mention --enable-codesign.
7580 * silent-rules.mk (ECHO_SIGN): New variable.
7581 * configure.ac: Add --enable-codesign.
7582 * configure: Rebuild.
7583 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7584 (gdb$(EXEEXT)): Optionally invoke codesign.
7585
7586 2018-06-28 Pedro Alves <palves@redhat.com>
7587
7588 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7589 comments.
7590 (switch_to_thread_no_regs): Adjust comment.
7591 * infcmd.c (stop_pc): Delete.
7592 (post_create_inferior, info_program_command): Replace references
7593 to stop_pc with references to thread_info->suspend.stop_pc.
7594 * inferior.h (stop_pc): Delete declaration.
7595 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7596 (handle_inferior_event_1, handle_signal_stop)
7597 (process_event_stop_test, keep_going_stepped_thread)
7598 (handle_step_into_function, handle_step_into_function_backward)
7599 (print_stop_location): Replace references to stop_pc with
7600 references to thread_info->suspend.stop_pc.
7601 (struct infcall_suspend_state) <stop_pc>: Delete field.
7602 (save_infcall_suspend_state, restore_infcall_suspend_state):
7603 Remove references to inf_stat->stop_pc.
7604 * linux-fork.c (fork_load_infrun_state): Likewise.
7605 * record-btrace.c (record_btrace_set_replay): Likewise.
7606 * record-full.c (record_full_goto_entry): Likewise.
7607 * remote.c (print_one_stopped_thread): Likewise.
7608 * target.c (target_resume): Extend comment.
7609 * thread.c (set_executing_thread): New.
7610 (set_executing): Use it.
7611 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7612 Remove references to stop_pc.
7613
7614 2018-06-28 Pedro Alves <palves@redhat.com>
7615
7616 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7617 Moving fetching stop_pc until after ecs->event_thread is refreshed.
7618
7619 2018-06-28 Tom Tromey <tom@tromey.com>
7620
7621 * coffread.c (coff_symfile_finish): Update.
7622 * xcoffread.c (xcoff_symfile_finish): Update.
7623 * elfread.c (elf_symfile_finish): Update.
7624 * symfile.h (dwarf2_free_objfile): Don't declare.
7625 * dwarf2read.c (_initialize_dwarf2_read): Use
7626 register_objfile_data_with_cleanup.
7627 (dwarf2_free_objfile): Now static. Change signature.
7628
7629 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7630
7631 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7632 option "-o" to add-symbol-file-load to add an offset to each
7633 section's load address.
7634 * symfile.c (set_objfile_default_section_offset): New function.
7635
7636 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7637
7638 * symfile.c (add_symbol_file_command): Make sure that sections
7639 with the same name are sorted in the same order.
7640
7641 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7642
7643 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7644 require the second argument. If omitted, load sections at the
7645 addresses specified in the file.
7646
7647 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7648
7649 * symfile.c (symbol_file_command, symbol_file_add_main_1)
7650 (_initialize_symfile): Add option "-o" to symbol-file to add an
7651 offset to each section of the symbol file.
7652
7653 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7654
7655 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7656
7657 2018-06-27 Tom Tromey <tom@tromey.com>
7658
7659 * stack.c (_initialize_stack): Update "func" help text.
7660
7661 2018-06-27 Tom Tromey <tom@tromey.com>
7662
7663 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7664 std::vector.
7665 (unwind_infopy_str, pyuw_create_unwind_info)
7666 (unwind_infopy_add_saved_register, pyuw_sniffer)
7667 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7668 Update.
7669 (struct saved_reg): Add constructor.
7670 <value>: Now a gdbpy_ref<>.
7671
7672 2018-06-27 Tom Tromey <tom@tromey.com>
7673
7674 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7675
7676 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7677
7678 * gdb-gdb.py.in: Format using autopep8.
7679
7680 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7681
7682 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7683 (type_lookup_function): Recognize CORE_ADDR values.
7684
7685 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7686
7687 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7688 print tag_name.
7689
7690 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7691
7692 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7693 <__lt__>: Add.
7694
7695 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7696
7697 * gdb-gdb.py: Move to...
7698 * gdb-gdb.py.in: ... here.
7699 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7700 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7701 dependencies.
7702 (distclean): Remove gdb-gdb.py when cleaning.
7703 (gdb-gdb.py, gdb-gdb.gdb): New rules.
7704 * configure: Re-generate.
7705
7706 2018-06-27 Pedro Alves <palves@redhat.com>
7707
7708 * proc-service.c (get_ps_regcache): New.
7709 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7710 (ps_lsetfpregs): Use it.
7711
7712 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
7713
7714 PR gdb/21695
7715 * dwarf2read.c (lnp_state_machine::check_line_address): Update
7716 declaration.
7717 (dwarf_decode_lines_1): Adjust.
7718
7719 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7720
7721 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7722 override.
7723 <info_proc>: Likewise.
7724
7725 2018-06-26 Joel Brobecker <brobecker@adacore.com>
7726
7727 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7728 to windows_fetch_one_register, and only handle the case of
7729 fetching one register. Move the code that reloads the context
7730 and iterates over all registers if R is negative to...
7731 (windows_nat_target::fetch_registers): ... here.
7732 (do_windows_store_inferior_registers): Rename to
7733 windows_store_one_register, and only handle the case of storing
7734 one register. Move the code that handles the case where r is
7735 negative to...
7736 (windows_nat_target::store_registers) ... here.
7737
7738 2018-06-26 Tom Tromey <tom@tromey.com>
7739
7740 PR rust/22574:
7741 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7742 * rust-lang.c (rust_print_struct_def): Add podata parameter.
7743 Update.
7744 (rust_internal_print_type): Add podata parameter.
7745 (rust_print_type): Update.
7746
7747 2018-06-26 Tom Tromey <tom@tromey.com>
7748
7749 * typeprint.h (struct print_offset_data) <update, finish,
7750 maybe_print_hole>: New methods.
7751 <indentation>: New constant.
7752 * typeprint.c (print_offset_data::indentation): Define.
7753 (print_offset_data::maybe_print_hole, print_offset_data::update)
7754 (print_offset_data::finish): Move from c-typeprint.c and rename.
7755 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7756 (print_spaces_filtered_with_print_options): Update.
7757 (c_print_type_union_field_offset, maybe_print_hole)
7758 (c_print_type_struct_field_offset): Move to typeprint.c and
7759 rename.
7760 (c_type_print_base_struct_union): Update.
7761
7762 2018-06-25 Pedro Alves <palves@redhat.com>
7763
7764 * gdbthread.h (thread_info_ref, delete_thread)
7765 (delete_thread_silent, first_thread_of_inferior)
7766 (any_thread_of_inferior, switch_to_thread)
7767 (enable_thread_stack_temporaries)
7768 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7769 (get_last_thread_stack_temporary)
7770 (value_in_thread_stack_temporaries, can_access_registers_thread):
7771 Spell out "struct thread_info" instead of just "thread_info".
7772 * inferior.h (notice_new_inferior): Likewise.
7773
7774 2018-06-25 Pedro Alves <palves@redhat.com>
7775
7776 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7777 pass thread_info pointer to delete_thread.
7778 (windows_nat_target::detach): Pass inferior pointer to
7779 detach_inferior.
7780 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7781 delete_thread.
7782 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7783 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7784 and pass a thread_info pointer to delete_thread.
7785 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7786 pass thread_info pointer to delete_thread.
7787 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7788 delete_thread_silent call.
7789 * procfs.c (procfs_target::detach): Pass inferior pointer to
7790 detach_inferior.
7791 (procfs_target::wait): Pass thread_info pointer to delete_thread.
7792 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7793 delete_thread_silent call.
7794 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7795 pass thread_info pointer to delete_thread.
7796 (windows_nat_target::detach): Pass inferior pointer to
7797 delete_inferior.
7798
7799 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7800
7801 * regcache.c (readable_regcache::read_part): Fix asserts.
7802 (reg_buffer::raw_collect_part): New function.
7803 (regcache::write_part): Fix asserts.
7804 (reg_buffer::raw_supply_part): New function.
7805 (regcache::transfer_regset_register): New helper function.
7806 (regcache::transfer_regset): Call new functions.
7807 (regcache_supply_regset): Use gdb_byte*.
7808 (regcache::supply_regset): Likewise.
7809 (regcache_collect_regset): Likewise.
7810 (regcache::collect_regset): Likewise.
7811 * regcache.h (reg_buffer::raw_collect_part): New declaration.
7812 (reg_buffer::raw_supply_part): Likewise.
7813 (regcache::transfer_regset_register): Likewise.
7814 (regcache::transfer_regset): Use gdb_byte*.
7815
7816 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7817
7818 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7819
7820 2018-06-21 Pedro Alves <palves@redhat.com>
7821
7822 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7823 instead of a ptid_t. All callers adjusted.
7824 * ada-tasks.c (ada_get_task_number): Likewise. All callers
7825 adjusted.
7826 (print_ada_task_info, display_current_task_id, task_command_1):
7827 Adjust.
7828 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7829 inferior_thread.
7830 (breakpoint_kind): Adjust.
7831 (remove_breakpoints_pid): Rename to ...
7832 (remove_breakpoints_inf): ... this. Adjust to take an inferior
7833 pointer. All callers adjusted.
7834 (bpstat_clear_actions): Use inferior_thread.
7835 (get_bpstat_thread): New.
7836 (bpstat_do_actions): Use it.
7837 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7838 to take a thread_info pointer. All callers adjusted.
7839 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7840 (breakpoint_re_set_thread): Use inferior_thread.
7841 * breakpoint.h (struct inferior): Forward declare.
7842 (bpstat_stop_status): Update.
7843 (remove_breakpoints_pid): Delete.
7844 (remove_breakpoints_inf): New.
7845 * bsd-uthread.c (bsd_uthread_target::wait)
7846 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7847 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7848 (maint_btrace_packet_history_cmd)
7849 (maint_btrace_clear_packet_history_cmd): Adjust.
7850 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7851 inferior_thread.
7852 * cli/cli-interp.c: Include "inferior.h".
7853 * common/refcounted-object.h (struct
7854 refcounted_object_ref_policy): New.
7855 * compile/compile-object-load.c: Include gdbthread.h.
7856 (store_regs): Use inferior_thread.
7857 * corelow.c (core_target::close): Use current_inferior.
7858 (core_target_open): Adjust to use first_thread_of_inferior and use
7859 the current inferior.
7860 * ctf.c (ctf_target::close): Adjust to use current_inferior.
7861 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7862 <thread>: ... this new field. All references adjusted.
7863 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7864 Take a thread_info pointer instead of a ptid_t.
7865 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7866 (dummy_frame_discard, register_dummy_frame_dtor): Take a
7867 thread_info pointer instead of a ptid_t.
7868 * elfread.c: Include "inferior.h".
7869 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7870 Use inferior_thread.
7871 * eval.c (evaluate_subexp): Likewise.
7872 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7873 inferior_thread.
7874 * gdb_proc_service.h (struct thread_info): Forward declare.
7875 (struct ps_prochandle) <ptid>: Delete, replaced by ...
7876 <thread>: ... this new field. All references adjusted.
7877 * gdbarch.h, gdbarch.c: Regenerate.
7878 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7879 'thread' parameter. All implementations and callers adjusted.
7880 * gdbthread.h (thread_info) <set_running>: New method.
7881 (delete_thread, delete_thread_silent): Take a thread_info pointer
7882 instead of a ptid.
7883 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7884 (first_thread_of_process): Delete, replaced by ...
7885 (first_thread_of_inferior): ... this new function. All callers
7886 adjusted.
7887 (any_live_thread_of_process): Delete, replaced by ...
7888 (any_live_thread_of_inferior): ... this new function. All callers
7889 adjusted.
7890 (switch_to_thread, switch_to_no_thread): Declare.
7891 (is_executing): Delete.
7892 (enable_thread_stack_temporaries): Update comment.
7893 <enable_thread_stack_temporaries>: Take a thread_info pointer
7894 instead of a ptid_t. Incref the thread.
7895 <~enable_thread_stack_temporaries>: Decref the thread.
7896 <m_ptid>: Delete
7897 <m_thr>: New.
7898 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7899 (get_last_thread_stack_temporary)
7900 (value_in_thread_stack_temporaries, can_access_registers_thread):
7901 Take a thread_info pointer instead of a ptid_t. All callers
7902 adjusted.
7903 * infcall.c (get_call_return_value): Use inferior_thread.
7904 (run_inferior_call): Work with thread pointers instead of ptid_t.
7905 (call_function_by_hand_dummy): Work with thread pointers instead
7906 of ptid_t. Use thread_info_ref.
7907 * infcmd.c (proceed_thread_callback): Access thread's state
7908 directly.
7909 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7910 access thread's state directly.
7911 (continue_command): Use inferior_thread.
7912 (info_program_command): Use find_thread_ptid and access thread
7913 state directly.
7914 (proceed_after_attach_callback): Use thread state directly.
7915 (notice_new_inferior): Take a thread_info pointer instead of a
7916 ptid_t. All callers adjusted.
7917 (exit_inferior): Take an inferior pointer instead of a pid. All
7918 callers adjusted.
7919 (exit_inferior_silent): New.
7920 (detach_inferior): Delete.
7921 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7922 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7923 (detach_inferior_command, kill_inferior_command): Use
7924 find_inferior_id instead of valid_gdb_inferior_id and
7925 gdb_inferior_id_to_pid.
7926 (inferior_command): Use inferior and thread pointers.
7927 * inferior.h (struct thread_info): Forward declare.
7928 (notice_new_inferior): Take a thread_info pointer instead of a
7929 ptid_t. All callers adjusted.
7930 (detach_inferior): Delete declaration.
7931 (exit_inferior, exit_inferior_silent): Take an inferior pointer
7932 instead of a pid. All callers adjusted.
7933 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7934 (valid_gdb_inferior_id): Delete.
7935 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7936 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7937 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7938 ...
7939 <inf>: ... this new field.
7940 <step_ptid>: Delete, replaced by ...
7941 <step_thread>: ... this new field.
7942 (get_displaced_stepping_state): Take an inferior pointer instead
7943 of a pid. All callers adjusted.
7944 (displaced_step_in_progress_any_inferior): Adjust.
7945 (displaced_step_in_progress_thread): Take a thread pointer instead
7946 of a ptid_t. All callers adjusted.
7947 (displaced_step_in_progress, add_displaced_stepping_state): Take
7948 an inferior pointer instead of a pid. All callers adjusted.
7949 (get_displaced_step_closure_by_addr): Adjust.
7950 (remove_displaced_stepping_state): Take an inferior pointer
7951 instead of a pid. All callers adjusted.
7952 (displaced_step_prepare_throw, displaced_step_prepare)
7953 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7954 All callers adjusted.
7955 (start_step_over): Adjust.
7956 (infrun_thread_ptid_changed): Remove bit updating ptids in the
7957 displaced step queue.
7958 (do_target_resume): Adjust.
7959 (fetch_inferior_event): Use inferior_thread.
7960 (context_switch, get_inferior_stop_soon): Take an
7961 execution_control_state pointer instead of a ptid_t. All callers
7962 adjusted.
7963 (switch_to_thread_cleanup): Delete.
7964 (stop_all_threads): Use scoped_restore_current_thread.
7965 * inline-frame.c: Include "gdbthread.h".
7966 (inline_state) <inline_state>: Take a thread pointer instead of a
7967 ptid_t. All callers adjusted.
7968 <ptid>: Delete, replaced by ...
7969 <thread>: ... this new field.
7970 (find_inline_frame_state): Take a thread pointer instead of a
7971 ptid_t. All callers adjusted.
7972 (skip_inline_frames, step_into_inline_frame)
7973 (inline_skipped_frames, inline_skipped_symbol): Take a thread
7974 pointer instead of a ptid_t. All callers adjusted.
7975 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7976 (inline_skipped_frames, inline_skipped_symbol): Likewise.
7977 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7978 pointers directly.
7979 * linux-nat.c (get_detach_signal): Likewise.
7980 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7981 (thread_db_notice_clone): Adjust.
7982 (thread_db_find_new_threads_silently)
7983 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7984 a thread pointer instead of a ptid_t. All callers adjusted.
7985 * mi/mi-cmd-var.c: Include "inferior.h".
7986 (mi_cmd_var_update_iter): Update to use thread pointers.
7987 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7988 inferior directly.
7989 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7990 out to ...
7991 (mi_output_running): ... this new function.
7992 (mi_on_resume_1): Adjust to use it.
7993 (mi_user_selected_context_changed): Adjust to use inferior_thread.
7994 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7995 directly.
7996 (interrupt_thread_callback): : Adjust to use thread and inferior
7997 pointers.
7998 * proc-service.c: Include "gdbthread.h".
7999 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
8000 * progspace-and-thread.c: Include "inferior.h".
8001 * progspace.c: Include "inferior.h".
8002 * python/py-exitedevent.c (create_exited_event_object): Adjust to
8003 hold a reference to an inferior_object.
8004 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
8005 inferior_thread.
8006 * python/py-inferior.c (struct inferior_object): Give the type a
8007 tag name instead of a typedef.
8008 (python_on_normal_stop): No need to check if the current thread is
8009 listed.
8010 (inferior_to_inferior_object): Change return type to
8011 inferior_object. All callers adjusted.
8012 (find_thread_object): Delete, bits factored out to ...
8013 (thread_to_thread_object): ... this new function.
8014 * python/py-infthread.c (create_thread_object): Use
8015 inferior_to_inferior_object.
8016 (thpy_is_stopped): Use thread pointer directly.
8017 (gdbpy_selected_thread): Use inferior_thread.
8018 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
8019 field, replaced with ...
8020 <thread>: ... this new field. All users adjusted.
8021 (btpy_insn_or_gap_new): Drop const.
8022 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
8023 callers adjusted.
8024 * python/py-record.c: Include "gdbthread.h".
8025 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
8026 a ptid_t. All callers adjusted.
8027 (gdbpy_current_recording): Use inferior_thread.
8028 * python/py-record.h (recpy_record_object) <ptid>: Delete
8029 field, replaced with ...
8030 <thread>: ... this new field. All users adjusted.
8031 (recpy_element_object) <ptid>: Delete
8032 field, replaced with ...
8033 <thread>: ... this new field. All users adjusted.
8034 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
8035 a ptid_t. All callers adjusted.
8036 * python/py-threadevent.c: Include "gdbthread.h".
8037 (get_event_thread): Use thread_to_thread_object.
8038 * python/python-internal.h (struct inferior_object): Forward
8039 declare.
8040 (find_thread_object, find_inferior_object): Delete declarations.
8041 (thread_to_thread_object, inferior_to_inferior_object): New
8042 declarations.
8043 * record-btrace.c: Include "inferior.h".
8044 (require_btrace_thread): Use inferior_thread.
8045 (record_btrace_frame_sniffer)
8046 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
8047 (get_thread_current_frame): Use scoped_restore_current_thread and
8048 switch_to_thread.
8049 (get_thread_current_frame): Use thread pointer directly.
8050 (record_btrace_replay_at_breakpoint): Use thread's inferior
8051 pointer directly.
8052 * record-full.c: Include "inferior.h".
8053 * regcache.c: Include "gdbthread.h".
8054 (get_thread_arch_regcache): Use the inferior's address space
8055 directly.
8056 (get_thread_regcache, registers_changed_thread): New.
8057 * regcache.h (get_thread_regcache(thread_info *thread)): New
8058 overload.
8059 (registers_changed_thread): New.
8060 (remote_target) <remote_detach_1>: Swap order of parameters.
8061 (remote_add_thread): <remote_add_thread>: Return the new thread.
8062 (get_remote_thread_info(ptid_t)): New overload.
8063 (remote_target::remote_notice_new_inferior): Use thread pointers
8064 directly.
8065 (remote_target::process_initial_stop_replies): Use
8066 thread_info::set_running.
8067 (remote_target::remote_detach_1, remote_target::detach)
8068 (extended_remote_target::detach): Adjust.
8069 * stack.c (frame_show_address): Use inferior_thread.
8070 * target-debug.h (target_debug_print_thread_info_pp): New.
8071 * target-delegates.c: Regenerate.
8072 * target.c (default_thread_address_space): Delete.
8073 (memory_xfer_partial_1): Use current_inferior.
8074 (target_detach): Use current_inferior.
8075 (target_thread_address_space): Delete.
8076 (generic_mourn_inferior): Use current_inferior.
8077 * target.h (struct target_ops) <thread_address_space>: Delete.
8078 (target_thread_address_space): Delete.
8079 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
8080 pointers directly.
8081 (delete_thread_1, delete_thread, delete_thread_silent): Take a
8082 thread pointer instead of a ptid_t. Adjust all callers.
8083 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
8084 (first_thread_of_process): Delete, replaced by ...
8085 (first_thread_of_inferior): ... this new function. All callers
8086 adjusted.
8087 (any_thread_of_process): Rename to ...
8088 (any_thread_of_inferior): ... this, and take an inferior pointer.
8089 (any_live_thread_of_process): Rename to ...
8090 (any_live_thread_of_inferior): ... this, and take an inferior
8091 pointer.
8092 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8093 (value_in_thread_stack_temporaries)
8094 (get_last_thread_stack_temporary): Take a thread pointer instead
8095 of a ptid_t. Adjust all callers.
8096 (thread_info::set_running): New.
8097 (validate_registers_access): Use inferior_thread.
8098 (can_access_registers_ptid): Rename to ...
8099 (can_access_registers_thread): ... this, and take a thread
8100 pointer.
8101 (print_thread_info_1): Adjust to compare thread pointers instead
8102 of ptids.
8103 (switch_to_no_thread, switch_to_thread): Make extern.
8104 (scoped_restore_current_thread::~scoped_restore_current_thread):
8105 Use m_thread pointer directly.
8106 (scoped_restore_current_thread::scoped_restore_current_thread):
8107 Use inferior_thread.
8108 (thread_command): Use thread pointer directly.
8109 (thread_num_make_value_helper): Use inferior_thread.
8110 * top.c (execute_command): Use inferior_thread.
8111 * tui/tui-interp.c: Include "inferior.h".
8112 * varobj.c (varobj_create): Use inferior_thread.
8113 (value_of_root_1): Use find_thread_global_id instead of
8114 global_thread_id_to_ptid.
8115
8116 2018-06-21 Alan Hayward <alan.hayward@arm.com>
8117
8118 * regcache.c (readable_regcache::read_part): Avoid memcpy when
8119 possible.
8120 (regcache::write_part): Likewise.
8121 (readable_regcache::cooked_read_part): Update comment.
8122 (readable_regcache::cooked_write_part): Likewise.
8123 * regcache.h: (readable_regcache::read_part): Likewise.
8124 (regcache::write_part): Likewise.
8125
8126 2018-06-21 Richard Bunt <richard.bunt@arm.com>
8127 Dirk Schubert <dirk.schubert@arm.com>
8128
8129 * aarch64-linux-nat.c (post_attach): New.
8130 (aarch64_linux_nat_target::post_attach): Override post_attach to
8131 record the number of hardware debug registers.
8132
8133 2018-06-20 Tom Tromey <tom@tromey.com>
8134
8135 * python/py-param.c (add_setshow_generic): Make parameters const.
8136 (parmpy_init): Update.
8137
8138 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
8139
8140 * regcache.h (regcache_cooked_read_ftype): Rename to...
8141 (register_read_ftype): ...this, change type to function_view.
8142 (class reg_buffer) <save>: Remove src parameter.
8143 (readonly_detached_regcache) <readonly_detached_regcache>: Make
8144 parameter non-const in first overload. Remove src parameter in
8145 second overload.
8146 * regcache.c (do_cooked_read): Remove.
8147 (readonly_detached_regcache::readonly_detached_regcache): Make
8148 parameter non-const, adjust call to other constructor.
8149 (reg_buffer::save): Remove src parameter.
8150 * frame.c (do_frame_register_read): Remove.
8151 (frame_save_as_regcache): Use lambda function.
8152 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8153 parameter to ppu2spu_data *.
8154 (ppu2spu_sniffer): Use lambda function.
8155
8156 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
8157
8158 * record-full.c (record_full_target::insert_breakpoint): Remove
8159 "struct" keyword, add const.
8160
8161 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
8162
8163 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8164 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8165 * configure.ac: Remove AC_PREREQ, add missing quoting.
8166 * gnulib/configure.ac: Modernize usage of
8167 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
8168 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8169 (AUTOMAKE_VERSION): Bump to 1.15.1.
8170 * configure: Re-generate.
8171 * config.in: Re-generate.
8172 * aclocal.m4: Re-generate.
8173 * gnulib/aclocal.m4: Re-generate.
8174 * gnulib/config.in: Re-generate.
8175 * gnulib/configure: Re-generate.
8176 * gnulib/import/Makefile.in: Re-generate.
8177
8178 2018-06-19 Pedro Alves <palves@redhat.com>
8179
8180 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8181 (lookup_minimal_symbol_by_pc_section): ... here with
8182 gdb_assert_not_reached added.
8183
8184 2018-06-19 Pedro Alves <palves@redhat.com>
8185
8186 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8187 parameter with a block parameter. Compare location's block symbol
8188 with the frame's block instead of addresses.
8189 (skip_inline_frames): Pass the current block instead of the
8190 frame's address. Break out as soon as we determine the frame
8191 should not be skipped.
8192
8193 2018-06-18 Tom Tromey <tom@tromey.com>
8194
8195 * solib-aix.c (solib_aix_get_section_offsets): Return
8196 unique_xmalloc_ptr.
8197 (solib_aix_solib_create_inferior_hook): Update.
8198
8199 2018-06-18 Tom Tromey <tom@tromey.com>
8200
8201 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8202
8203 2018-06-18 Tom Tromey <tom@tromey.com>
8204
8205 * solib-frv.c (frv_relocate_main_executable): Use
8206 unique_xmalloc_ptr.
8207 * solib-dsbt.c (dsbt_relocate_main_executable): Use
8208 unique_xmalloc_ptr.
8209
8210 2018-06-18 Tom Tromey <tom@tromey.com>
8211
8212 * objfiles.h (inhibit_section_map_updates): Update.
8213 (resume_section_map_updates, resume_section_map_updates_cleanup):
8214 Remove.
8215 * solib-svr4.c (svr4_handle_solib_event): Update.
8216 * objfiles.c (inhibit_section_map_updates): Return
8217 scoped_restore_tmpl<int>.
8218 (resume_section_map_updates, resume_section_map_updates_cleanup):
8219 Remove.
8220
8221 2018-06-18 Tom Tromey <tom@tromey.com>
8222
8223 * valprint.h (read_string): Update.
8224 * valprint.c (read_string): Change type of "buffer".
8225 (val_print_string): Update.
8226 * python/py-value.c (valpy_string): Update.
8227 * language.h (struct language_defn) <la_get_string>: Change
8228 type of "buffer".
8229 (default_get_string, c_get_string): Update.
8230 * language.c (default_get_string): Change type of "buffer".
8231 * guile/scm-value.c (gdbscm_value_to_string): Update.
8232 * c-lang.c (c_get_string): Change type of "buffer".
8233
8234 2018-06-18 Tom Tromey <tom@tromey.com>
8235
8236 * ser-mingw.c (struct pipe_state_destroyer): New.
8237 (pipe_state_up): New typedef.
8238 (cleanup_pipe_state): Remove.
8239 (pipe_windows_open): Use pipe_state_up. Don't release argv.
8240
8241 2018-06-18 Tom Tromey <tom@tromey.com>
8242
8243 * rust-lang.h (rust_yyerror): Don't declare.
8244 * rust-lang.c (rust_language_defn): Update.
8245 * rust-exp.y (yyerror): Now static.
8246 * parse.c (parse_exp_in_context_1): Update.
8247 * p-lang.h (p_yyerror): Don't declare.
8248 * p-lang.c (p_language_defn): Update.
8249 * p-exp.y (yyerror): Now static.
8250 * opencl-lang.c (opencl_language_defn): Update.
8251 * objc-lang.c (objc_language_defn): Update.
8252 * m2-lang.h (m2_yyerror): Don't declare.
8253 * m2-lang.c (m2_language_defn): Update.
8254 * m2-exp.y (yyerror): Now static.
8255 * language.h (struct language_defn) <la_error>: Remove.
8256 * language.c (unk_lang_error): Remove.
8257 (unknown_language_defn, auto_language_defn): Remove.
8258 * go-lang.h (go_yyerror): Don't declare.
8259 * go-lang.c (go_language_defn): Update.
8260 * go-exp.y (yyerror): Now static.
8261 * f-lang.h (f_yyerror): Don't declare.
8262 * f-lang.c (f_language_defn): Update.
8263 * f-exp.y (yyerror): Now static.
8264 * d-lang.h (d_yyerror): Don't declare.
8265 * d-lang.c (d_language_defn): Update.
8266 * d-exp.y (yyerror): Now static.
8267 * c-lang.h (c_yyerror): Don't declare.
8268 * c-lang.c (c_language_defn, cplus_language_defn)
8269 (asm_language_defn, minimal_language_defn): Update.
8270 * c-exp.y (yyerror): Now static.
8271 * ada-lang.h (ada_yyerror): Don't declare.
8272 * ada-lang.c (ada_language_defn): Update.
8273 * ada-exp.y (yyerror): Now static.
8274
8275 2018-06-18 Alan Hayward <alan.hayward@arm.com>
8276
8277 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8278 (store_sveregs_to_thread): Likewise.
8279 (aarch64_linux_fetch_inferior_registers): Check for SVE.
8280 (aarch64_linux_store_inferior_registers): Likewise.
8281 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8282 function.
8283 (aarch64_sve_regs_copy_to_regcache): Likewise.
8284 (aarch64_sve_regs_copy_from_regcache): Likewise.
8285 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8286 declaration.
8287 (aarch64_sve_regs_copy_to_regcache): Likewise.
8288 (aarch64_sve_regs_copy_from_regcache): Likewise.
8289 (sve_context): Structure from Linux headers.
8290 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8291 (SVE_SIG_ZREG_SIZE): Likewise.
8292 (SVE_SIG_PREG_SIZE): Likewise.
8293 (SVE_SIG_FFR_SIZE): Likewise.
8294 (SVE_SIG_REGS_OFFSET): Likewise.
8295 (SVE_SIG_ZREGS_OFFSET): Likewise.
8296 (SVE_SIG_ZREG_OFFSET): Likewise.
8297 (SVE_SIG_ZREGS_SIZE): Likewise.
8298 (SVE_SIG_PREGS_OFFSET): Likewise.
8299 (SVE_SIG_PREG_OFFSET): Likewise.
8300 (SVE_SIG_PREGS_SIZE): Likewise.
8301 (SVE_SIG_FFR_OFFSET): Likewise.
8302 (SVE_SIG_REGS_SIZE): Likewise.
8303 (SVE_SIG_CONTEXT_SIZE): Likewise.
8304 (SVE_PT_REGS_MASK): Likewise.
8305 (SVE_PT_REGS_FPSIMD): Likewise.
8306 (SVE_PT_REGS_SVE): Likewise.
8307 (SVE_PT_VL_INHERIT): Likewise.
8308 (SVE_PT_VL_ONEXEC): Likewise.
8309 (SVE_PT_REGS_OFFSET): Likewise.
8310 (SVE_PT_FPSIMD_OFFSET): Likewise.
8311 (SVE_PT_FPSIMD_SIZE): Likewise.
8312 (SVE_PT_SVE_ZREG_SIZE): Likewise.
8313 (SVE_PT_SVE_PREG_SIZE): Likewise.
8314 (SVE_PT_SVE_FFR_SIZE): Likewise.
8315 (SVE_PT_SVE_FPSR_SIZE): Likewise.
8316 (SVE_PT_SVE_FPCR_SIZE): Likewise.
8317 (__SVE_SIG_TO_PT): Likewise.
8318 (SVE_PT_SVE_OFFSET): Likewise.
8319 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8320 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8321 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8322 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8323 (SVE_PT_SVE_PREG_OFFSET): Likewise.
8324 (SVE_PT_SVE_PREGS_SIZE): Likewise.
8325 (SVE_PT_SVE_FFR_OFFSET): Likewise.
8326 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8327 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8328 (SVE_PT_SVE_SIZE): Likewise.
8329 (SVE_PT_SIZE): Likewise.
8330 (HAS_SVE_STATE): New define.
8331
8332 2018-06-18 Alan Hayward <alan.hayward@arm.com>
8333
8334 * nat/aarch64-sve-linux-sigcontext.h: New file.
8335 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8336 new files.
8337 (SVE_VQ_MIN): Likewise.
8338 (SVE_VQ_MAX): Likewise.
8339 (SVE_VL_MIN): Likewise.
8340 (SVE_VL_MAX): Likewise.
8341 (SVE_NUM_ZREGS): Likewise.
8342 (SVE_NUM_PREGS): Likewise.
8343 (sve_vl_valid): Likewise.
8344 (struct user_sve_header): Likewise.
8345
8346 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
8347 Richard Bunt <Richard.Bunt@arm.com>
8348
8349 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8350 was requested by GDB.
8351
8352 2018-06-15 Tom de Vries <tdevries@suse.de>
8353
8354 * MAINTAINERS (Write After Approval): Add Tom de Vries.
8355
8356 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
8357
8358 * gnulib/update-gnulib.sh: Print expected versions of
8359 autoconf/aclocal.
8360
8361 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
8362
8363 * arch-utils.c (default_type_align): Use type_length_units.
8364 * gdbtypes.c (type_align): Use type_length_units.
8365
8366 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8367
8368 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8369 of 'define' command.
8370
8371 2018-06-14 Tom de Vries <tdevries@suse.de>
8372
8373 PR cli/22573
8374 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8375 get_no_prettyformat_print_options.
8376
8377 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
8378
8379 * sparc-nat.h: Include target.h.
8380 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8381 <fetch_registers>: Remove this argument in function call.
8382 <store_registers>: Remove this argument in function call, remove
8383 extra semicolon.
8384 <low_forget_process>: Call sparc64_forget_process instead of
8385 sparc_forget_process.
8386
8387 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8388
8389 * procfs.c (_initialize_procfs): Use add_inf_child_target.
8390 (procfs_target::make_corefile_notes): Adjust to new
8391 target_read_alloc return type.
8392
8393 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8394 Stephen Roberts <stephen.roberts@arm.com>
8395
8396 PR gdb/22882
8397 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8398 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8399 Move should_notify_stop local into more inner scope.
8400
8401 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8402 Stephen Roberts <stephen.roberts@arm.com>
8403
8404 PR gdb/22882
8405 * infrun.c (resume_1): Add call to mark_async_event_handler.
8406
8407 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8408
8409 * infrun.c (do_target_wait): Change old version of $pc printed.
8410
8411 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
8412
8413 * dwarf2read.c (read_index_from_section): Rename to...
8414 (read_gdb_index_from_section): ... this, update all callers.
8415 (dwarf2_read_index): Rename to...
8416 (dwarf2_read_gdb_index): ... this, update all callers.
8417
8418 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
8419
8420 * hppa-linux-nat.c
8421 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8422 hppa_linux_nat_target::fetch_registers.
8423
8424 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8425
8426 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8427 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8428 (AARCH64_DWARF_SVE_FFR): Likewise.
8429 (AARCH64_DWARF_SVE_P0): Likewise.
8430 (AARCH64_DWARF_SVE_Z0): Likewise.
8431
8432 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8433
8434 * common/common-regcache.h (raw_compare): New function.
8435 * regcache.c (regcache::raw_compare): Likewise.
8436 * regcache.h (regcache::raw_compare): New declaration.
8437
8438 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8439
8440 * common/common-regcache.h (reg_buffer_common): New structure.
8441 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8442 (reg_buffer::raw_supply): Likewise.
8443 (reg_buffer::raw_supply_integer): Likewise.
8444 (reg_buffer::raw_supply_zeroed): Likewise.
8445 (reg_buffer::raw_collect): Likewise.
8446 (reg_buffer::raw_collect_integer): Likewise.
8447 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8448 (reg_buffer::raw_supply): Likewise.
8449 (reg_buffer::raw_supply_integer): Likewise.
8450 (reg_buffer::raw_supply_zeroed): Likewise.
8451 (reg_buffer::raw_collect): Likewise.
8452 (reg_buffer::raw_collect_integer): Likewise.
8453
8454 2018-06-10 Tom Tromey <tom@tromey.com>
8455
8456 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
8457 (class remote_state) <stop_reply_queue>: Now std::vector.
8458 (remote_state::~remote_state)
8459 (remote_target::stop_reply_queue_length): Update.
8460 (struct queue_iter_param, remove_child_of_pending_fork)
8461 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8462 (check_pending_event_prevents_wildcard_vcont_callback)
8463 (remove_stop_reply_for_inferior)
8464 (remove_stop_reply_of_remote_state)
8465 (remote_notif_remove_once_on_match)
8466 (stop_reply_match_ptid_and_ws)
8467 (remote_kill_child_of_pending_fork): Remove.
8468 (remote_target::remove_new_fork_children)
8469 (remote_target::check_pending_events_prevent_wildcard_vcont)
8470 (remote_target::discard_pending_stop_replies)
8471 (remote_target::discard_pending_stop_replies_in_queue)
8472 (remote_target::remote_notif_remove_queued_reply)
8473 (remote_target::queued_stop_reply)
8474 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8475 (remote_target::wait, remote_target::kill_new_fork_children)
8476 (remote_target::async): Update.
8477
8478 2018-06-10 Tom Tromey <tom@tromey.com>
8479
8480 * record-full.c (record_full_arch_list_cleanups): Remove.
8481 (record_full_message): Use try/catch.
8482 (record_full_wait_cleanups): Remove.
8483 (record_full_wait_1): Use try/catch.
8484 (record_full_restore): Likewise.
8485
8486 2018-06-10 Tom Tromey <tom@tromey.com>
8487
8488 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
8489 declare VEC. Add constructor.
8490 <in_target_beneath>: Now bool.
8491 (record_full_breakpoints): Now a std::vector, static.
8492 (record_full_sync_record_breakpoints)
8493 (record_full_init_record_breakpoints)
8494 (record_full_target::insert_breakpoint)
8495 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
8496
8497 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8498
8499 * dwarf2read.c (process_cu_includes): Remove struct keyword.
8500 * serial.c (serial_interface_lookup): Remove struct keyword.
8501
8502 2018-06-10 Tom Tromey <tom@tromey.com>
8503
8504 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8505 method.
8506 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8507 a method.
8508 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8509 method.
8510 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8511 "beneath" as a method.
8512 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8513 Use "beneath" as a method.
8514
8515 2018-06-10 Tom Tromey <tom@tromey.com>
8516
8517 * tracefile.c (struct trace_file_writer_deleter): New.
8518 <operator()>: Rename from trace_file_writer_xfree.
8519 (trace_file_writer_up): New typedef.
8520 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8521
8522 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8523
8524 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8525 <m_registers, m_register_status>: Change type to
8526 std::unique_ptr.
8527 * regcache.c (reg_buffer::reg_buffer): Use new instead of
8528 XCNEWVEC.
8529
8530 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8531
8532 * common/common-regcache.h (enum register_status): Add
8533 underlying type "signed char".
8534 * regcache.h (reg_buffer) <m_register_status>: Change type to
8535 register_status *.
8536 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8537 register_status instead of signed char.
8538 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8539 (reg_buffer::get_register_status): Remove cast.
8540 (readable_regcache::raw_read): Remove cast.
8541 (readable_regcache::cooked_read): Remove cast.
8542
8543 2018-06-09 Tom Tromey <tom@tromey.com>
8544
8545 * source.c (reverse_search_command, forward_search_command): Use
8546 scoped_fd.
8547
8548 2018-06-09 Tom Tromey <tom@tromey.com>
8549
8550 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
8551 (serial_ops_list): Now static, std::vector.
8552 (serial_interface_lookup, serial_add_interface): Update.
8553
8554 2018-06-09 Tom Tromey <tom@tromey.com>
8555
8556 * dwarf2read.c (process_cu_includes): Update.
8557 (process_full_comp_unit): Update.
8558 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8559 std::vector.
8560
8561 2018-06-08 Paul Koning <paul_koning@dell.com>
8562
8563 PR gdb/23252
8564
8565 * python/python.c (do_start_initialization):
8566 Avoid call to internal Python API.
8567 (init__gdb_module): New function.
8568
8569 2018-06-08 Gary Benson <gbenson@redhat.com>
8570
8571 * linux-thread-db.c (valprint.h): New include.
8572 (struct check_thread_db_info): New structure.
8573 (check_thread_db_on_load, tdb_testinfo): New static globals.
8574 (check_thread_db, check_thread_db_callback): New functions.
8575 (try_thread_db_load_1): Run integrity checks if requested.
8576 (maintenance_check_libthread_db): New function.
8577 (_initialize_thread_db): Register "maint check libthread-db"
8578 and "maint set/show check-libthread-db".
8579 * NEWS: Mention the above new commands.
8580
8581 2018-06-08 Tom Tromey <tom@tromey.com>
8582
8583 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8584 now a method.
8585
8586 2018-06-08 Tom Tromey <tom@tromey.com>
8587
8588 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8589
8590 2018-06-08 Tom Tromey <tom@tromey.com>
8591
8592 * common/btrace-common.h (struct btrace_data): Add constructor,
8593 destructor, move assignment operator.
8594 <empty, clear, fini>: New methods.
8595 <format>: Initialize.
8596 (btrace_data_init, btrace_data_fini, btrace_data_clear)
8597 (btrace_data_empty): Don't declare.
8598 * common/btrace-common.c (btrace_data_init): Remove.
8599 (btrace_data::fini): Rename from btrace_data_fini.
8600 (btrace_data::empty): Rename from btrace_data_empty.
8601 (btrace_data::clear): Rename from btrace_data_clear. Return
8602 bool.
8603 * btrace.h (make_cleanup_btrace_data): Don't declare.
8604 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8605 (parse_xml_btrace): Update.
8606 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8607 (maint_btrace_clear_packet_history_cmd): Update.
8608
8609 2018-06-07 Pedro Alves <palves@redhat.com>
8610
8611 * target.h (target_ops) <beneath>: Now a method. All references
8612 updated.
8613 (class target_stack): New.
8614 * target.c (g_target_stack): New.
8615 (g_current_top_target): Delete.
8616 (current_top_target): Get the top target out of g_target_stack.
8617 (target_stack::push, target_stack::unpush): New.
8618 (push_target, unpush_target): Reimplement.
8619 (target_is_pushed): Reimplement in terms of g_target_stack.
8620 (target_ops::beneath, target_stack::find_beneath): New.
8621
8622 2018-06-07 Pedro Alves <palves@redhat.com>
8623
8624 * target.h (find_target_beneath): Delete declaration.
8625 * target.c (find_target_beneath): Delete definition.
8626 * aix-thread.c: All callers of find_target_beneath adjusted to
8627 call target_ops::beneath instead.
8628 * bsd-uthread.c: Likewise.
8629 * linux-thread-db.c: Likewise.
8630 * ravenscar-thread.c: Likewise.
8631 * sol-thread.c: Likewise.
8632 * spu-multiarch.c: Likewise.
8633
8634 2018-06-07 Pedro Alves <palves@redhat.com>
8635
8636 * target.h (target_ops) <beneath>: Now a method. All references
8637 updated.
8638 (target_ops) <m_beneath>: New.
8639 * target.c (target_ops::beneath): New.
8640 * corelow.c: Adjust all references to target_ops::beneath.
8641 * linux-thread-db.c: Likewise.
8642 * make-target-delegates: Likewise.
8643 * record-btrace.c: Likewise.
8644 * record-full.c: Likewise.
8645 * remote.c: Likewise.
8646 * target.c: Likewise.
8647 * target-delegates.c: Regenerate.
8648
8649 2018-06-07 Pedro Alves <palves@redhat.com>
8650
8651 * target.h (target_stack): Delete.
8652 (current_top_target): Declare function.
8653 * target.c (target_stack): Delete.
8654 (g_current_top_target): New.
8655 (current_top_target): New function.
8656 * auxv.c: Use current_top_target instead of target_stack
8657 throughout.
8658 * avr-tdep.c: Likewise.
8659 * breakpoint.c: Likewise.
8660 * corefile.c: Likewise.
8661 * elfread.c: Likewise.
8662 * eval.c: Likewise.
8663 * exceptions.c: Likewise.
8664 * frame.c: Likewise.
8665 * gdbarch-selftests.c: Likewise.
8666 * gnu-v3-abi.c: Likewise.
8667 * ia64-tdep.c: Likewise.
8668 * ia64-vms-tdep.c: Likewise.
8669 * infcall.c: Likewise.
8670 * infcmd.c: Likewise.
8671 * infrun.c: Likewise.
8672 * linespec.c: Likewise.
8673 * linux-tdep.c: Likewise.
8674 * minsyms.c: Likewise.
8675 * ppc-linux-nat.c: Likewise.
8676 * ppc-linux-tdep.c: Likewise.
8677 * procfs.c: Likewise.
8678 * regcache.c: Likewise.
8679 * remote.c: Likewise.
8680 * rs6000-tdep.c: Likewise.
8681 * s390-linux-nat.c: Likewise.
8682 * s390-tdep.c: Likewise.
8683 * solib-aix.c: Likewise.
8684 * solib-darwin.c: Likewise.
8685 * solib-dsbt.c: Likewise.
8686 * solib-spu.c: Likewise.
8687 * solib-svr4.c: Likewise.
8688 * solib-target.c: Likewise.
8689 * sparc-tdep.c: Likewise.
8690 * sparc64-tdep.c: Likewise.
8691 * spu-tdep.c: Likewise.
8692 * symfile.c: Likewise.
8693 * symtab.c: Likewise.
8694 * target-descriptions.c: Likewise.
8695 * target-memory.c: Likewise.
8696 * target.c: Likewise.
8697 * target.h: Likewise.
8698 * tracefile-tfile.c: Likewise.
8699 * tracepoint.c: Likewise.
8700 * valops.c: Likewise.
8701 * valprint.c: Likewise.
8702 * value.c: Likewise.
8703 * windows-tdep.c: Likewise.
8704 * mi/mi-main.c: Likewise.
8705
8706 2018-06-07 Tom Tromey <tom@tromey.com>
8707
8708 * valprint.h (build_address_symbolic): Declare.
8709 * printcmd.c (print_address_symbolic): Update.
8710 (build_address_symbolic): Change "name" and "filename" to
8711 std::string.
8712 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8713 Update.
8714 * defs.h (build_address_symbolic): Remove declaration.
8715
8716 2018-06-07 Alan Hayward <alan.hayward@arm.com>
8717
8718 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8719 (aarch64_vnv_type): Add function.
8720 (aarch64_pseudo_register_name): Add V regs for SVE.
8721 (aarch64_pseudo_register_type): Likewise.
8722 (aarch64_pseudo_register_reggroup_p): Likewise.
8723 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8724 (aarch64_pseudo_read_value): Add V regs for SVE.
8725 (aarch64_pseudo_write_2): Use V0 offset for SVE
8726 (aarch64_pseudo_write): Add V regs for SVE.
8727 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8728
8729 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
8730
8731 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8732 (sve_vl_from_vq): Likewise.
8733
8734 2018-06-05 Tom Tromey <tom@tromey.com>
8735
8736 * cli/cli-cmds.c (show_version): Update.
8737 * top.c (print_gdb_version): Add "interactive" parameter.
8738 Update.
8739 * main.c (captured_main_1): Update.
8740 * top.h (print_gdb_version): Add "interactive" parameter and a
8741 comment.
8742
8743 2018-06-05 David Malcolm <dmalcolm@redhat.com>
8744
8745 * common/enum-flags.h: Add trailing semicolon to example in
8746 comment.
8747
8748 2018-06-05 Tom Tromey <tom@tromey.com>
8749
8750 PR cli/12326:
8751 * NEWS: Add entry about pager.
8752 * utils.c (pagination_disabled_for_command): New global.
8753 (prompt_for_continue): Allow "c" response to prompt.
8754 (reinitialize_more_filter): Clear
8755 pagination_disabled_for_command.
8756 (fputs_maybe_filtered): Check pagination_disabled_for_command.
8757
8758 2018-06-04 Tom Tromey <tom@tromey.com>
8759
8760 * ada-lang.h (ada_lookup_symbol_list): Update.
8761 * ada-lang.c (resolve_subexp): Update.
8762 (symbols_are_identical_enums): Change type of syms. Remove nsyms
8763 parameter.
8764 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8765 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8766 results parameter to std::vector.
8767 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8768 Update.
8769 * ada-exp.y (block_lookup): Update.
8770 (select_possible_type_sym): Change type of syms. Remove nsyms
8771 parameter.
8772 (write_var_or_type, write_name_assoc): Update.
8773
8774 2018-06-04 Joel Brobecker <brobecker@adacore.com>
8775
8776 * windows-nat.c (windows_nat_target::xfer_partial): Return
8777 TARGET_XFER_E_IO if we need to delegate to the target beneath
8778 but BENEATH is NULL.
8779
8780 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
8781
8782 * Makefile.in (config.status): Add configure.nat as a
8783 dependency.
8784
8785 2018-06-04 Tom Tromey <tom@tromey.com>
8786
8787 * cp-name-parser.y (cpname_state): Add method declarations.
8788 (HANDLE_QUAL): Update.
8789 (cpname_state::d_grab, cpname_state::fill_comp)
8790 (cpname_state::make_operator, cpname_state::make_dtor)
8791 (cpname_state::make_builtin_type, cpname_state::make_name)
8792 (cpname_state::d_qualify, cpname_state::d_int_type)
8793 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8794 (%union): Move earlier.
8795
8796 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8797
8798 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8799
8800 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8801
8802 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8803 (aarch64_pseudo_write_1): Likewise.
8804 (aarch64_pseudo_read_value): Use helper.
8805 (aarch64_pseudo_write): Likewise.
8806
8807 2018-06-04 Pedro Alves <palves@redhat.com>
8808
8809 * darwin-nat.c (darwin_ops): Delete.
8810 (darwin_attach_pid): Use get_native_target.
8811
8812 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8813
8814 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8815 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8816
8817 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8818
8819 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8820 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8821 (aarch64_gdbarch_init): Check for SVE.
8822 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8823
8824 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8825
8826 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8827 * aarch64-tdep.h (aarch64_read_description): Likewise.
8828 * arch/aarch64.c (aarch64_create_target_description): Likewise.
8829 * arch/aarch64.h (aarch64_create_target_description): Likewise.
8830 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8831 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8832 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8833
8834 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
8835
8836 * value.c (value_fetch_lazy_bitfield): New.
8837 (value_fetch_lazy_memory): New.
8838 (value_fetch_lazy_register): New.
8839 (value_fetch_lazy): Factor out to smaller functions.
8840
8841 2018-06-01 Tom Tromey <tom@tromey.com>
8842
8843 * cp-name-parser.y (backslashable, represented): Now const.
8844
8845 2018-06-01 Tom Tromey <tom@tromey.com>
8846
8847 * cp-name-parser.y: Include parser-defs.h.
8848 (parser_fprintf): Remove declaration.
8849
8850 2018-06-01 Tom Tromey <tom@tromey.com>
8851
8852 * cp-name-parser.y: Use %pure-parser, %lex-param, and
8853 %parse-param.
8854 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8855 (global_result): Remove globals.
8856 (struct cpname_state): New.
8857 (yyparse): Don't declare.
8858 (yylex, yyerror): Move declarations after %union.
8859 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8860 (make_name): Add state parameter.
8861 Update all callers.
8862 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8863 parameter.
8864 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8865 Update.
8866 (yylex): Add lvalp, state parameters.
8867 (yyerror): Add state parameter.
8868 (cp_demangled_name_to_comp): Update.
8869
8870 2018-06-01 Tom Tromey <tom@tromey.com>
8871
8872 * cp-name-parser.y (parser_fprintf): Declare.
8873 (GDB_YY_REMAP_PREFIX): Define.
8874 Include yy-remap.h. Don't redefine yy* identifiers.
8875
8876 2018-06-01 Tom Tromey <tom@tromey.com>
8877
8878 * python/py-type.c (typy_legacy_template_argument): Update.
8879 * cp-support.h (cp_demangled_name_to_comp): Update.
8880 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8881 parameter to be a "std::string *".
8882 (main): Update.
8883
8884 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
8885
8886 * ada-lex.l: Include "diagnostics.h" instead of
8887 "common/diagnostics.h".
8888 * unittests/environ-selftests.c: Likewise.
8889 * common/diagnostics.h: Moved to ../include.
8890
8891 2018-06-01 Joel Brobecker <brobecker@adacore.com>
8892
8893 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8894 to language_mode_manual while calling breakpoint_re_set_one.
8895
8896 2018-06-01 Tom Tromey <tom@tromey.com>
8897
8898 * valops.c (value_cast_structs, destructor_name_p): Update.
8899 * symtab.c (gdb_mangle_name): Update.
8900 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8901 Update.
8902 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8903 (pascal_object_print_value_fields, pascal_object_print_value):
8904 Update.
8905 * p-typeprint.c (pascal_type_print_derivation_info): Update.
8906 * linespec.c (find_methods): Update.
8907 * gdbtypes.h (type_name_no_tag): Remove.
8908 (type_name_or_error): Rename from type_name_no_tag_or_error.
8909 * gdbtypes.c (type_name_no_tag): Remove.
8910 (type_name_or_error): Rename from type_name_no_tag_or_error.
8911 (lookup_struct_elt_type, check_typedef): Update.
8912 * expprint.c (print_subexp_standard): Update.
8913 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8914 * d-namespace.c (d_lookup_nested_symbol): Update.
8915 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8916 (cp_print_class_member): Update.
8917 * cp-namespace.c (cp_lookup_nested_symbol): Update.
8918 * completer.c (add_struct_fields): Update.
8919 * c-typeprint.c (cp_type_print_derivation_info)
8920 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8921 Update.
8922 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8923 (ada_prefer_type, ada_is_exception_sym): Update.
8924
8925 2018-06-01 Tom Tromey <tom@tromey.com>
8926
8927 * valops.c (enum_constant_from_type, value_namespace_elt)
8928 (value_maybe_namespace_elt): Update.
8929 * valarith.c (find_size_for_pointer_math): Update.
8930 * target-descriptions.c (make_gdb_type): Update.
8931 * symmisc.c (print_symbol): Update.
8932 * stabsread.c (define_symbol, read_type)
8933 (complain_about_struct_wipeout, add_undefined_type)
8934 (cleanup_undefined_types_1): Update.
8935 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8936 (rust_range_type_p, val_print_struct, rust_print_struct_def)
8937 (rust_internal_print_type, rust_composite_type)
8938 (rust_evaluate_funcall, rust_evaluate_subexp)
8939 (rust_inclusive_range_type_p): Update.
8940 * python/py-type.c (typy_get_tag): Update.
8941 * p-typeprint.c (pascal_type_print_base): Update.
8942 * mdebugread.c (parse_symbol, parse_type): Update.
8943 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8944 Update.
8945 * guile/scm-type.c (gdbscm_type_tag): Update.
8946 * go-lang.c (sixg_string_p): Update.
8947 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8948 Update.
8949 * gdbtypes.h (struct main_type) <tag_name>: Remove.
8950 (TYPE_TAG_NAME): Remove.
8951 * gdbtypes.c (type_name_no_tag): Simplify.
8952 (check_typedef, check_types_equal, recursive_dump_type)
8953 (copy_type_recursive, arch_composite_type): Update.
8954 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
8955 in summary mode when needed.
8956 * eval.c (evaluate_funcall): Update.
8957 * dwarf2read.c (fixup_go_packaging, read_structure_type)
8958 (process_structure_scope, read_enumeration_type)
8959 (read_namespace_type, read_module_type, determine_prefix): Update.
8960 * cp-support.c (inspect_type): Update.
8961 * coffread.c (process_coff_symbol, decode_base_type): Update.
8962 * c-varobj.c (c_is_path_expr_parent): Update.
8963 * c-typeprint.c (c_type_print_base_struct_union): Update.
8964 (c_type_print_base_1): Update. Print struct/class/union/enum in
8965 summary when using C language.
8966 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8967 (gen_maybe_namespace_elt): Update.
8968 * ada-lang.c (ada_type_name): Simplify.
8969 (empty_record, ada_template_to_fixed_record_type_1)
8970 (template_to_static_fixed_type)
8971 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8972
8973 2018-06-01 Tom Tromey <tom@tromey.com>
8974
8975 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8976 c_print_type.
8977 * c-typeprint.c (c_print_type_1): Add "language" parameter.
8978 (c_print_type): Update.
8979 (c_print_type): New overload.
8980 (c_type_print_varspec_prefix, c_type_print_args)
8981 (c_type_print_varspec_suffix, c_print_type_no_offsets)
8982 (c_type_print_base_struct_union, c_type_print_base_1)
8983 (cp_type_print_method_args): Add "language" parameter.
8984 (c_type_print_base): Update.
8985 * c-lang.h (c_print_type): Add new overload.
8986
8987 2018-06-01 Tom Tromey <tom@tromey.com>
8988
8989 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8990 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8991
8992 2018-06-01 Alan Hayward <alan.hayward@arm.com>
8993
8994 * aarch64-tdep.c (aarch64_sve_register_names): New const
8995 var.
8996 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8997 (AARCH64_SVE_Z_REGS_NUM): New define.
8998 (AARCH64_SVE_P_REGS_NUM): Likewise.
8999 (AARCH64_SVE_NUM_REGS): Likewise.
9000
9001 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
9002
9003 * nat/linux-ptrace.h [__alpha__]
9004 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
9005 definitions.
9006
9007 2018-05-31 Maciej W. Rozycki <macro@mips.com>
9008
9009 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
9010 the endianness selected.
9011 * NEWS: Document `set endian auto' mode operation update.
9012
9013 2018-05-31 Alan Hayward <alan.hayward@arm.com>
9014
9015 * Makefile.in: Add new header.
9016 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
9017 (sve_vl_from_vg): Likewise.
9018 (sve_vq_from_vl): Likewise.
9019 (sve_vl_from_vq): Likewise.
9020 (sve_vq_from_vg): Likewise.
9021 (sve_vg_from_vq): Likewise.
9022 * configure.nat: Add new c file.
9023 * nat/aarch64-sve-linux-ptrace.c: New file.
9024 * nat/aarch64-sve-linux-ptrace.h: New file.
9025
9026 2018-05-31 Alan Hayward <alan.hayward@arm.com>
9027
9028 * aarch64-linux-nat.c (aarch64_linux_read_description):
9029 Add parmeter zero.
9030 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
9031 Likewise.
9032 * aarch64-tdep.c (tdesc_aarch64_list): Add.
9033 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
9034 (aarch64_gdbarch_init): Add parmeter zero.
9035 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
9036 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
9037 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
9038 parmeter.
9039 * doc/gdb.texinfo: Describe SVE feature
9040 * features/aarch64-sve.c: New file.
9041
9042 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
9043
9044 PR gdb/23210
9045 * gdbarch.sh (significant_addr_bit): Default to zero when
9046 not set by target architecture.
9047 * gdbarch.c: Re-generated.
9048 * utils.c (address_significant): Update.
9049
9050 2018-05-30 Joel Brobecker <brobecker@adacore.com>
9051
9052 * stack.c (func_command): Remove trailing newline in call to error.
9053
9054 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9055
9056 * regcache.h (regcache_raw_collect): Remove, update callers to
9057 use regcache::raw_collect.
9058 * regcache.c (regcache_raw_collect): Remove.
9059
9060 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9061
9062 * regcache.h (regcache_raw_supply): Remove, update callers to
9063 use detached_regcache::raw_supply.
9064 * regcache.c (regcache_raw_supply): Remove.
9065
9066 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9067
9068 * regcache.h (regcache_cooked_write_part): Remove, update
9069 callers to use regcache::cooked_write_part.
9070 * regcache.c (regcache_cooked_write_part): Remove.
9071
9072 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9073
9074 * regcache.h (regcache_cooked_read_part): Remove, update callers
9075 to use readable_regcache::cooked_read_part.
9076 * regcache.c (regcache_cooked_read_part): Remove.
9077
9078 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9079
9080 * regcache.h (regcache_cooked_read_value): Remove, update
9081 callers to use readable_regcache::cooked_read_value.
9082 * regcache.c (regcache_cooked_read_value): Remove.
9083
9084 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9085
9086 * regcache.h (regcache_cooked_write): Remove, update callers to
9087 use regcache::cooked_write.
9088 * regcache.c (regcache_cooked_write): Remove.
9089
9090 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9091
9092 * regcache.h (regcache_invalidate): Remove, update callers to
9093 use detached_regcache::invalidate instead.
9094 * regcache.c (regcache_invalidate): Remove.
9095
9096 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9097
9098 * regcache.h (regcache_raw_write_part): Remove, update callers
9099 to use regcache::raw_write_part instead.
9100 * regcache.c (regcache_raw_write_part): Remove.
9101
9102 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9103
9104 * regcache.h (regcache_raw_read_part): Remove, update callers to
9105 use readable_regcache::raw_read_part instead.
9106 * regcache.c (regcache_raw_read_part): Remove.
9107
9108 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9109
9110 * regcache.h (regcache_cooked_read): Remove, update callers to
9111 use readable_regcache::cooked_read instead.
9112 * regcache.c (regcache_cooked_read): Remove.
9113
9114 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9115
9116 * regcache.h (regcache_raw_write): Remove, update callers to use
9117 regcache::raw_write instead.
9118 * regcache.c (regcache_raw_write): Remove.
9119
9120 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9121
9122 * regcache.h (regcache_raw_read): Remove, update callers to use
9123 readable_regcache::raw_read instead.
9124 * regcache.c (regcache_raw_read): Remove.
9125
9126 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9127
9128 * regcache.h (regcache_raw_update): Remove, update callers to
9129 use readable_regcache::raw_update instead.
9130 * regcache.c (regcache_raw_update): Remove.
9131
9132 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9133
9134 * regcache.h (regcache_register_status): Remove, update callers
9135 to use reg_buffer::get_register_status directly instead.
9136 * regcache.c (regcache_register_status): Remove.
9137
9138 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9139
9140 * regcache.h (regcache_get_ptid): Remove, update all callers to
9141 call regcache::ptid instead.
9142 * regcache.c (regcache_get_ptid): Remove.
9143
9144 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9145
9146 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9147
9148 2018-05-30 Pedro Alves <palves@redhat.com>
9149
9150 * common/common-exceptions.h (exception_rethrow): Use
9151 ATTRIBUTE_NORETURN.
9152
9153 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
9154
9155 * breakpoint.c (print_solib_event, check_status_catch_solib):
9156 Remove struct keyword in range-based for loops.
9157 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9158 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9159 Likewise.
9160 * linespec.c (find_superclass_methods, search_minsyms_for_name):
9161 Likewise.
9162 * symfile.c (addr_info_make_relative): Likewise.
9163 * thread.c (value_in_thread_stack_temporaries): Likewise.
9164
9165 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
9166
9167 PR gdb/16841
9168 * valops.c (value_struct_elt_for_reference): Call check_typedef on
9169 aggregate type to get its real type before accessing it.
9170
9171 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
9172
9173 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9174 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9175 * coff-pe-read.c (add_pe_forwarded_sym): Replace
9176 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9177 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9178 * jit.c (jit_breakpoint_re_set_internal): Likewise.
9179 * printcmd.c (info_address_command): Likewise.
9180
9181 2018-05-29 Tom Tromey <tom@tromey.com>
9182
9183 * windows-nat.c (handle_exception): Update fall-through comment.
9184
9185 2018-05-29 Tom Tromey <tom@tromey.com>
9186
9187 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
9188 (struct program_space) <added_solibs>: Now a std::vector.
9189 * breakpoint.c (print_solib_event): Update.
9190 (check_status_catch_solib): Update.
9191 * progspace.c (clear_program_space_solib_cache): Update.
9192 * solib.c (update_solib_list): Update.
9193
9194 2018-05-29 Tom Tromey <tom@tromey.com>
9195
9196 * python/py-type.c (typy_richcompare): Update.
9197 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9198 * gdbtypes.h (types_deeply_equal): Return bool.
9199 (types_equal): Likewise.
9200 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
9201 declare VEC.
9202 (check_types_equal): Change worklist to std::vector. Return
9203 bool.
9204 (struct type_equality_entry): Add constructor.
9205 (compare_maybe_null_strings): Return bool.
9206 (check_types_worklist): Return bool. Change worklist to
9207 std::vector.
9208 (types_deeply_equal): Use std::vector.
9209 (types_equal): Return bool.
9210 (compare_maybe_null_strings): Simplify.
9211
9212 2018-05-29 Tom Tromey <tom@tromey.com>
9213
9214 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
9215
9216 2018-05-29 Tom Tromey <tom@tromey.com>
9217
9218 * objc-lang.h: Don't include cp-support.h.
9219 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
9220 declare VEC.
9221
9222 2018-05-27 Tom Tromey <tom@tromey.com>
9223
9224 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9225
9226 2018-05-25 Tom Tromey <tom@tromey.com>
9227
9228 * value.c (value::location): Initialize.
9229
9230 2018-05-25 Tom Tromey <tom@tromey.com>
9231
9232 * dbxread.c (init_bincl_list): Remove.
9233 (bincl_list): Now a std::vector.
9234 (bincls_allocated, next_bincl): Remove.
9235 (free_bincl_list, do_free_bincl_list_cleanup)
9236 (make_cleanup_free_bincl_list): Remove.
9237 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9238 unique_xmalloc_ptr.
9239 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9240 (struct header_file_location): Add constructor.
9241 (add_bincl_to_list): Remove.
9242
9243 2018-05-25 Tom Tromey <tom@tromey.com>
9244
9245 * tui/tui.c (tui_enable): Update.
9246 * mi/mi-interp.c (mi_interp::init): Update.
9247 * interps.h (class interp) <name>: New method.
9248 <m_name>: Rename from name.
9249 (~scoped_restore_interp): Update.
9250 * interps.c (interp::interp): Update.
9251 (interp_add, interp_set, interp_lookup_existing)
9252 (current_interp_named_p): Update.
9253
9254 2018-05-25 Tom Tromey <tom@tromey.com>
9255
9256 * interps.c (interp_name): Remove.
9257 * mi/mi-interp.c (mi_interp::init): Update.
9258 * interps.h (interp_name): Remove.
9259 (~scoped_restore_interp): Update.
9260 * tui/tui.c (tui_enable): Update.
9261
9262 2018-05-25 Tom Tromey <tom@tromey.com>
9263
9264 * utils.c (fputs_maybe_filtered): Update.
9265 * linespec.c (decode_line_full): Update.
9266 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9267 (mi_print_breakpoint_for_event, mi_solib_loaded)
9268 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9269 (mi_user_selected_context_changed): Update.
9270 * mi/mi-main.c (mi_execute_command): Update.
9271 * cli/cli-script.c (execute_control_command): Update.
9272 * python/python.c (execute_gdb_command): Update.
9273 * solib.c (info_sharedlibrary_command): Update.
9274 * interps.c (interp_ui_out): Remove.
9275 * interps.h (interp_ui_out): Remove.
9276
9277 2018-05-25 Tom Tromey <tom@tromey.com>
9278
9279 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9280 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9281 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9282
9283 2018-05-25 Tom Tromey <tom@tromey.com>
9284
9285 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9286 * interps.c (interp_exec): Use scoped_restore.
9287
9288 2018-05-25 Tom Tromey <tom@tromey.com>
9289
9290 * remote.c (remote_target::remote_file_get): Use
9291 gdb::byte_vector.
9292 (remote_target::remote_file_put): Likewise.
9293
9294 2018-05-25 Tom Tromey <tom@tromey.com>
9295
9296 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9297 a std::string.
9298 (get_pe_section_index, add_pe_exported_sym): Update.
9299 (read_pe_exported_syms): Use gdb::def_vector.
9300
9301 2018-05-25 Tom Tromey <tom@tromey.com>
9302
9303 * frame.c (remove_prev_frame): Remove.
9304 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9305
9306 2018-05-25 Maciej W. Rozycki <macro@mips.com>
9307
9308 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9309 Remove prototypes.
9310 * mips-linux-nat.c (supply_fpregset): Always call
9311 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9312 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9313 `mips_fill_fpregset'.
9314 * mips-linux-tdep.c (mips_supply_fpregset)
9315 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9316 (mips_fill_fpregset_wrapper): Remove functions.
9317 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9318 (mips_linux_fpregset): Remove variable.
9319 (mips_linux_iterate_over_regset_sections): Use
9320 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9321 (mips_linux_o32_sigframe_init): Remove comment.
9322
9323 2018-05-25 Pedro Alves <palves@redhat.com>
9324
9325 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9326 (struct readahead_cache, struct packet_reg, struct
9327 remote_arch_state, class remote_state): Move higher up in the
9328 file.
9329 (remote_target::m_remote_state): Now an object instead of a pointer.
9330 (remote_target::get_remote_state): Adjust.
9331
9332 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
9333
9334 * stack.c (select_and_print_frame): Delete.
9335 (struct function_bounds): Move struct within function.
9336 (func_command): Most content moved into new function
9337 find_frame_for_function, use new function, print result, add
9338 function comment.
9339 (find_frame_for_function): New function, now returns a result.
9340
9341 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9342
9343 * stack.c (iterate_over_block_arg_vars): Fix comment.
9344 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9345
9346 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
9347
9348 PR gdb/23203
9349 * frame.c
9350 (scoped_restore_selected_frame::scoped_restore_selected_frame):
9351 Define.
9352 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9353 Define.
9354 * frame.h (class scoped_restore_selected_frame): New class.
9355 * stack.c (print_frame_local_vars): Remove catching and rethrowing
9356 of any exception, use scoped_restore_selected_frame to restore the
9357 frame instead.
9358
9359 2018-05-24 Pedro Alves <palves@redhat.com>
9360
9361 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9362 override.
9363
9364 2018-05-23 Tom Tromey <tom@tromey.com>
9365
9366 * complaints.c (struct complaints): Remove.
9367 (symfile_complaint_book): Remove.
9368 (series): New global.
9369 (complaint_internal): Update.
9370 (clear_complaints): Update.
9371
9372 2018-05-23 Tom Tromey <tom@tromey.com>
9373
9374 * complaints.c (counters): New global.
9375 (struct complain): Remove.
9376 (struct complaints) <root>: Remove.
9377 (complaint_sentinel): Remove.
9378 (symfile_complaint_book): Update.
9379 (find_complaint) Remove.
9380 (complaint_internal, clear_complaints): Update.
9381
9382 2018-05-23 Tom Tromey <tom@tromey.com>
9383
9384 * complaints.c (struct complain) <file, line>: Remove.
9385 (find_complaint): Remove file, line parameters.
9386 (complaint_internal): Update.
9387
9388 2018-05-23 Tom Tromey <tom@tromey.com>
9389
9390 * complaints.c (vcomplaint): Remove.
9391 (complaint_internal) Merge in contents of vcomplaint.
9392
9393 2018-05-23 Tom Tromey <tom@tromey.com>
9394
9395 * complaints.c (struct complaints) <explanation>: Remove.
9396 (symfile_explanations): Remove.
9397 (symfile_complaint_book): Update.
9398 (vcomplaint): Update.
9399 (struct explanation): Remove.
9400
9401 2018-05-23 Tom Tromey <tom@tromey.com>
9402
9403 * complaints.c (symfile_complaints): Remove.
9404 (complaint_internal): Remove "complaints" parameter.
9405 (clear_complaints, vcomplaint): Remove "c" parameter.
9406 (get_complaints): Remove.
9407 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9408 (dwarf2_debug_line_missing_file_complaint)
9409 (dwarf2_debug_line_missing_end_sequence_complaint)
9410 (dwarf2_complex_location_expr_complaint)
9411 (dwarf2_const_value_length_mismatch_complaint)
9412 (dwarf2_section_buffer_overflow_complaint)
9413 (dwarf2_macro_malformed_definition_complaint)
9414 (dwarf2_invalid_attrib_class_complaint)
9415 (create_addrmap_from_index, dw2_symtab_iter_next)
9416 (dw2_expand_marked_cus)
9417 (dw2_debug_names_iterator::find_vec_in_debug_names)
9418 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9419 (create_debug_type_hash_table, init_cutu_and_read_dies)
9420 (partial_die_parent_scope, add_partial_enumeration)
9421 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9422 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9423 (read_import_statement, read_file_scope, create_dwo_cu_reader)
9424 (create_cus_hash_table, create_dwp_hash_table)
9425 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9426 (dwarf2_rnglists_process, dwarf2_ranges_process)
9427 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9428 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9429 (handle_struct_member_die, process_structure_scope)
9430 (read_array_type, read_common_block, read_module_type)
9431 (read_tag_pointer_type, read_typedef, read_base_type)
9432 (read_subrange_type, load_partial_dies, partial_die_info::read)
9433 (partial_die_info::read, partial_die_info::read)
9434 (partial_die_info::read, read_checked_initial_length_and_offset)
9435 (dwarf2_string_attr, read_formatted_entries)
9436 (dwarf_decode_line_header)
9437 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9438 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9439 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9440 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9441 (get_signatured_type, get_DW_AT_signature_type)
9442 (decode_locdesc, file_file_name, consume_improper_spaces)
9443 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9444 (dwarf_decode_macro_bytes, dwarf_decode_macros)
9445 (dwarf2_symbol_mark_computed, set_die_type)
9446 (read_attribute_value): Update.
9447 * stap-probe.c (handle_stap_probe, get_stap_base_address):
9448 Update.
9449 * dbxread.c (unknown_symtype_complaint)
9450 (lbrac_mismatch_complaint, repeated_header_complaint)
9451 (set_namestring, function_outside_compilation_unit_complaint)
9452 (read_dbx_symtab, process_one_symbol): Update.
9453 * gdbtypes.c (stub_noname_complaint): Update.
9454 * windows-nat.c (handle_unload_dll): Update.
9455 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9456 (decode_base_type): Update.
9457 * xcoffread.c (bf_notfound_complaint, ef_complaint)
9458 (eb_complaint, record_include_begin, record_include_end)
9459 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9460 (process_xcoff_symbol, read_symbol)
9461 (function_outside_compilation_unit_complaint)
9462 (scan_xcoff_symtab): Update.
9463 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9464 * buildsym.c (finish_block_internal, make_blockvector)
9465 (end_symtab_get_static_block, augment_type_symtab): Update.
9466 * dtrace-probe.c (dtrace_process_dof)
9467 (dtrace_static_probe_ops::get_probes): Update.
9468 * complaints.h (struct complaint): Don't declare.
9469 (symfile_complaints): Remove.
9470 (complaint_internal): Remove "complaints" parameter.
9471 (complaint): Likewise.
9472 (clear_complaints): Likewise.
9473 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9474 (reread_symbols): Update.
9475 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9476 (dwarf2_frame_cache, decode_frame_entry): Update.
9477 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9478 * objc-lang.c (lookup_objc_class, lookup_child_selector)
9479 (info_selectors_command): Update.
9480 * macrotab.c (macro_include, check_for_redefinition)
9481 (macro_undef): Update.
9482 * objfiles.c (filter_overlapping_sections): Update.
9483 * stabsread.c (invalid_cpp_abbrev_complaint)
9484 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9485 (define_symbol, error_type, read_type, rs6000_builtin_type)
9486 (stabs_method_name_from_physname, read_member_functions)
9487 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9488 (attach_fields_to_type, complain_about_struct_wipeout)
9489 (read_range_type, read_args, common_block_start)
9490 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9491 Update.
9492 * mdebugread.c (index_complaint, unknown_ext_complaint)
9493 (basic_type_complaint, bad_tag_guess_complaint)
9494 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9495 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9496 (parse_procedure, parse_lines)
9497 (function_outside_compilation_unit_complaint)
9498 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9499 (bad_tag_guess_complaint, reg_value_complaint): Update.
9500 * cp-support.c (demangled_name_complaint): Update.
9501 * macroscope.c (sal_macro_scope): Update.
9502 * dwarf-index-write.c (class debug_names): Update.
9503
9504 2018-05-23 Tom Tromey <tom@tromey.com>
9505
9506 * complaints.c (clear_complaints): Remove "noisy" parameter.
9507 * complaints.h (clear_complaints): Update.
9508 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9509 (reread_symbols): Update.
9510
9511 2018-05-23 Tom Tromey <tom@tromey.com>
9512
9513 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9514 SUBSEQUENT_MESSAGE.
9515 (vcomplaint, clear_complaints): Update.
9516 (symfile_explanations): Remove some messages.
9517
9518 2018-05-23 Tom Tromey <tom@tromey.com>
9519
9520 * complaints.c (internal_complaint): Remove.
9521 * complaints.h (internal_complaint): Remove.
9522
9523 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9524
9525 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9526
9527 2018-05-22 Pedro Alves <palves@redhat.com>
9528
9529 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9530 (remote_fileio_badfd, remote_fileio_return_errno)
9531 (remote_fileio_return_success, remote_fileio_func_open)
9532 (remote_fileio_func_open, remote_fileio_func_close)
9533 (remote_fileio_func_read, remote_fileio_func_write)
9534 (remote_fileio_func_lseek, remote_fileio_func_rename)
9535 (remote_fileio_func_unlink, remote_fileio_func_stat)
9536 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9537 (remote_fileio_func_isatty, remote_fileio_func_system): Add
9538 remote_target parameter.
9539 (remote_fio_func_map) <func>: Add remote_target parameter.
9540 (do_remote_fileio_request, remote_fileio_request):
9541 * remote-fileio.h (remote_fileio_request):
9542 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9543 remote_target parameter.
9544 (remote_notif_process, handle_notification): Adjust to pass down
9545 the remote.
9546 (remote_notif_state_allocate): Add remote_target parameter. Save
9547 it.
9548 * remote-notif.h (struct remote_target): Forward declare.
9549 (struct notif_client) <parse, ack, can_get_pending_events>: Add
9550 remote_target parameter.
9551 (struct remote_notif_state) <remote>: New field.
9552 (remote_notif_ack, remote_notif_parse): Add remote_target
9553 parameter.
9554 (remote_notif_state_allocate, remote_notif_state_allocate): Add
9555 remote_target parameter.
9556 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9557 (threads_listing_context, rmt_thread_action, protocol_feature)
9558 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9559 (packet_result, struct threads_listing_context, remote_state):
9560 Move definitions and declarations higher up.
9561 (remote_target) <~remote_target>: Declare.
9562 (remote_download_command_source, remote_file_put, remote_file_get)
9563 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9564 (remote_hostio_pread_vFile, remote_hostio_send_command)
9565 (remote_hostio_set_filesystem, remote_hostio_open)
9566 (remote_hostio_close, remote_hostio_unlink, remote_state)
9567 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9568 (get_memory_write_packet_size, get_memory_read_packet_size)
9569 (append_pending_thread_resumptions, remote_detach_1)
9570 (append_resumption, remote_resume_with_vcont)
9571 (add_current_inferior_and_thread, wait_ns, wait_as)
9572 (process_stop_reply, remote_notice_new_inferior)
9573 (process_initial_stop_replies, remote_add_thread)
9574 (btrace_sync_conf, remote_btrace_maybe_reopen)
9575 (remove_new_fork_children, kill_new_fork_children)
9576 (discard_pending_stop_replies, stop_reply_queue_length)
9577 (check_pending_events_prevent_wildcard_vcont)
9578 (discard_pending_stop_replies_in_queue, stop_reply)
9579 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9580 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9581 (remote_interrupt_as, remote_interrupt_ns)
9582 (remote_get_noisy_reply, remote_query_attached)
9583 (remote_add_inferior, remote_current_thread, get_current_thread)
9584 (set_thread, set_general_thread, set_continue_thread)
9585 (set_general_process, write_ptid)
9586 (remote_unpack_thread_info_response, remote_get_threadinfo)
9587 (parse_threadlist_response, remote_get_threadlist)
9588 (remote_threadlist_iterator, remote_get_threads_with_ql)
9589 (remote_get_threads_with_qxfer)
9590 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9591 (get_offsets, remote_check_symbols, remote_supported_packet)
9592 (remote_query_supported, remote_packet_size)
9593 (remote_serial_quit_handler, remote_detach_pid)
9594 (remote_vcont_probe, remote_resume_with_hc)
9595 (send_interrupt_sequence, interrupt_query)
9596 (remote_notif_get_pending_events, fetch_register_using_p)
9597 (send_g_packet, process_g_packet, fetch_registers_using_g)
9598 (store_register_using_P, store_registers_using_G)
9599 (set_remote_traceframe, check_binary_download)
9600 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9601 (remote_xfer_live_readonly_partial, remote_read_bytes)
9602 (remote_send_printf, remote_flash_write, readchar)
9603 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9604 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9605 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9606 (extended_remote_disable_randomization, extended_remote_run)
9607 (send_environment_packet, extended_remote_environment_support)
9608 (extended_remote_set_inferior_cwd, remote_write_qxfer)
9609 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9610 (packet_command): Now methods of ...
9611 (remote_target): ... this class.
9612 (m_remote_state) <remote_target>: New field.
9613 (struct remote_state) <stop_reply_queue,
9614 remote_async_inferior_event_token, wait_forever_enabled_p>: New
9615 fields.
9616 (remote_state::remote_state): Allocate stop_reply_queue.
9617 (remote_state): Delete global.
9618 (get_remote_state_raw): Delete.
9619 (remote_target::get_remote_state): Allocate m_remote_state on
9620 demand.
9621 (get_current_remote_target): New.
9622 (remote_ops, extended_remote_ops): Delete.
9623 (wait_forever_enabled_p, remote_async_inferior_event_token):
9624 Delete, moved to struct remote_state.
9625 (remote_target::close): Delete self. Destruction bits split to
9626 ...
9627 (remote_target::~remote_target): ... this.
9628 (show_memory_packet_size): Adjust to use
9629 get_current_remote_target.
9630 (struct protocol_feature) <func>: Add remote_target parameter.
9631 All callers adjusted.
9632 (curr_quit_handler_target): New.
9633 (remote_serial_quit_handler): Reimplement.
9634 (remote_target::open_1): Adjust to use get_current_remote_target.
9635 Heap-allocate remote_target/extended_remote_target instances.
9636 (vcont_builder::vcont_builder): Add remote_target parameter, and
9637 save it in m_remote. All callers adjusted.
9638 (vcont_builder::m_remote): New field.
9639 (vcont_builder::restart, vcont_builder::flush)
9640 (vcont_builder::push_action): Use it.
9641 (remote_target::commit_resume): Use it.
9642 (struct queue_iter_param) <remote>: New field.
9643 (remote_target::remove_new_fork_children): Fill in 'remote' field.
9644 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9645 (check_pending_event_prevents_wildcard_vcont_callback)
9646 (remote_target::check_pending_events_prevent_wildcard_vcont)
9647 (remote_target::discard_pending_stop_replies)
9648 (remote_target::discard_pending_stop_replies_in_queue)
9649 (remote_target::remote_notif_remove_queued_reply): Fill in
9650 'remote' field.
9651 (remote_notif_get_pending_events): New.
9652 (remote_target::readchar, remote_target::remote_serial_write):
9653 Save/restore curr_quit_handler_target.
9654 (putpkt): New.
9655 (kill_new_fork_children): Fill in 'remote' field.
9656 (packet_command): Use get_current_remote_target, defer to
9657 remote_target method of same name.
9658 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9659 parameter, and save it in m_remote. All callers adjusted.
9660 (scoped_remote_fd::release): Use m_remote.
9661 (scoped_remote_fd::m_remote): New field.
9662 (remote_file_put, remote_file_get, remote_file_delete): Use
9663 get_current_remote_target, defer to remote_target method of same
9664 name.
9665 (remote_btrace_reset): Add remote_state paremeter. Update all
9666 callers.
9667 (remote_async_inferior_event_handler). Pass down 'data'.
9668 (remote_new_objfile): Use get_current_remote_target.
9669 (remote_target::vcont_r_supported): New.
9670 (set_range_stepping): Use get_current_remote_target and
9671 remote_target::vcont_r_supported.
9672 (_initialize_remote): Don't allocate 'remote_state' and
9673 'stop_reply_queue' globals.
9674 * remote.h (struct remote_target): Forward declare.
9675 (getpkt, putpkt, remote_notif_get_pending_events): Add
9676 'remote_target' parameter.
9677
9678 2018-05-22 Pedro Alves <palves@redhat.com>
9679
9680 * remote.c (vcont_builder): Now a class. Make all data members
9681 private.
9682 (vcont_builder) <vcont_builder, restart, flush, push_action>:
9683 Declare methods.
9684 (vcont_builder_restart): Rename to ...
9685 (vcont_builder::restart): ... this.
9686 (vcont_builder_flush): Rename to ...
9687 (vcont_builder::flush): ... this.
9688 (vcont_builder_push_action): Rename to ...
9689 (vcont_builder::push_action): ... this.
9690 (remote_target::commit_resume): Adjust.
9691
9692 2018-05-22 Pedro Alves <palves@redhat.com>
9693
9694 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9695 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9696 (get_fixed_memory_packet_size): New.
9697 (get_memory_packet_size): Use it.
9698 (set_memory_packet_size): Don't override the config size with
9699 DEFAULT_MAX_MEMORY_PACKET_SIZE.
9700 (show_memory_packet_size): Use get_fixed_memory_packet_size.
9701 Don't refer to get_memory_packet_size if not connected to a remote
9702 target. Show "(default)" if configured size is 0.
9703
9704 2018-05-22 Pedro Alves <palves@redhat.com>
9705
9706 * remote.c (remote_target::mourn_inferior): Move
9707 discard_pending_stop_replies call here from ...
9708 (_initialize_remote): ... here.
9709
9710 2018-05-22 Pedro Alves <palves@redhat.com>
9711
9712 * remote.c (compare_section_command): Remove set_general_process
9713 call.
9714
9715 2018-05-22 Pedro Alves <palves@redhat.com>
9716
9717 * remote.c (struct packet_reg, struct remote_arch_state):
9718 Move higher up in the file.
9719 (remote_state) <m_arch_states>: Store remote_arch_state values
9720 instead of remote_arch_state pointers.
9721 (remote_state::get_remote_arch_state): Adjust.
9722
9723 2018-05-22 Pedro Alves <palves@redhat.com>
9724
9725 * remote.c: Include <unordered_map>.
9726 (remote_state): Now a class.
9727 (remote_state) <get_remote_arch_state>: Declare method.
9728 <get_remote_arch_state>: New field.
9729 (remote_arch_state) <remote_arch_state>: Declare ctor.
9730 <regs>: Now a unique_ptr.
9731 (remote_gdbarch_data_handle): Delete.
9732 (get_remote_arch_state): Delete.
9733 (remote_state::get_remote_arch_state): New.
9734 (get_remote_state): Adjust to call remote_state's
9735 get_remote_arch_state method.
9736 (init_remote_state): Delete, bits factored out to ...
9737 (remote_arch_state::remote_arch_state): ... this new method.
9738 (get_remote_packet_size, get_memory_packet_size)
9739 (process_g_packet, remote_target::fetch_registers)
9740 (remote_target::prepare_to_store, store_registers_using_G)
9741 (remote_target::store_registers, remote_target::get_trace_status):
9742 Adjust to call remote_state's method.
9743 (_initialize_remote): Remove reference to
9744 remote_gdbarch_data_handle.
9745
9746 2018-05-22 Pedro Alves <palves@redhat.com>
9747
9748 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9749 pread>: New method declarations.
9750 (remote_target::open_1): Adjust.
9751 (readahead_cache_invalidate): Rename to ...
9752 (readahead_cache::invalidate): ... this, and adjust to be a class
9753 method.
9754 (readahead_cache_invalidate_fd): Rename to ...
9755 (readahead_cache::invalidate_fd): ... this, and adjust to be a
9756 class method.
9757 (remote_hostio_pwrite): Adjust.
9758 (remote_hostio_pread_from_cache): Rename to ...
9759 (readahead_cache::pread): ... this, and adjust to be a class
9760 method.
9761 (remote_hostio_close): Adjust.
9762
9763 2018-05-22 Pedro Alves <palves@redhat.com>
9764
9765 * remote.c (remote_hostio_close_cleanup): Delete.
9766 (class scoped_remote_fd): New.
9767 (remote_file_put, remote_file_get): Use it.
9768
9769 2018-05-22 Pedro Alves <palves@redhat.com>
9770
9771 (struct vCont_action_support): Use bool and initialize all fields.
9772 (struct readahead_cache): Initialize all fields.
9773 (remote_state): Use bool and initialize all fields.
9774 (remote_state::remote_state, remote_state::~remote_state): New.
9775 (new_remote_state): Delete.
9776 (_initialize_remote): Use new to allocate remote_state.
9777
9778 2018-05-22 Pedro Alves <palves@redhat.com>
9779 張俊芝 <zjz@zjz.name>
9780
9781 PR gdb/22973
9782 * c-exp.y: Include "c-support.h".
9783 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9784 of tolower. Use c_ident_is_alpha to scan names.
9785 * c-lang.c: Include "c-support.h".
9786 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9787 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9788 * c-support.h: New file, with bits factored out from ...
9789 * cp-name-parser.y: ... this file.
9790 Include "c-support.h".
9791 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9792 c-support.h and renamed.
9793 (symbol_end, yylex): Adjust.
9794
9795 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9796
9797 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9798 parameter type to CORE_ADDR.
9799 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9800 parameter type in declaration to CORE_ADDR.
9801 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9802 target_auxv_search to get AT_HWCAP and use the result to get the
9803 target description.
9804 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9805 to CORE_ADDR. Remove the cast of the return value to unsigned
9806 long. Fix error predicate of target_auxv_search.
9807 (ppc_linux_nat_target::read_description): Change the type of the
9808 hwcap variable to CORE_ADDR.
9809
9810 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9811
9812 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9813 if the size of fpscr is larger than 32 bits.
9814
9815 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9816
9817 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9818 (ppc32_linux_vsxregmap): New global.
9819 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9820 regcache_supply_regset, and regcache_collect_regset.
9821 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9822 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9823 (fetch_vsx_register, store_vsx_register): Remove.
9824 (fetch_vsx_registers): Add regno parameter. Get regset using
9825 ppc_linux_vsxregset. Use regset to supply registers.
9826 (store_vsx_registers): Add regno parameter. Get regset using
9827 ppc_linux_vsxregset. Use regset to collect registers.
9828 (fetch_register): Call fetch_vsx_registers instead of
9829 fetch_vsx_register.
9830 (store_register): Call store_vsx_registers instead of
9831 store_vsx_register.
9832 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9833 new regno parameter.
9834 (store_ppc_registers): Call store_vsx_registers with -1 for the
9835 new regno parameter.
9836 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9837 (ppc_collect_vsxregset): Remove.
9838
9839 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9840
9841 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9842 offset fields.
9843 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9844 for vector register offset fields.
9845 (ppc64_fbsd_reg_offsets): Likewise.
9846 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9847 to vector register offset fields.
9848 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9849 to vector register offset fields.
9850 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9851 vector register offset fields.
9852 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9853 initializers for vector register offset fields.
9854 (rs6000_aix64_reg_offsets): Likewise.
9855 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9856 (ppc_supply_vrregset): Remove.
9857 (ppc_collect_vrregset): Remove.
9858 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9859 (ppc_linux_vrregset) : New function.
9860 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9861 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9862 (ppc32_linux_vrregset): Remove.
9863 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9864 and use result instead of ppc32_linux_vrregset.
9865 (ppc32_linux_reg_offsets): Remove initializers for vector register
9866 offset fields.
9867 (ppc64_linux_reg_offsets): Likewise.
9868 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9869 * ppc-linux-nat.c: Include regset.h.
9870 (gdb_vrregset_t): Adjust comment to account for little-endian
9871 mode.
9872 (supply_vrregset, fill_vrregset): Remove.
9873 (fetch_altivec_register, store_altivec_register): Remove.
9874 (fetch_altivec_registers): Add regno parameter. Get regset using
9875 ppc_linux_vrregset. Use regset to supply registers.
9876 (store_altivec_registers): Add regno parameter. Get regset using
9877 ppc_linux_vrregset. Use regset to collect registers.
9878 (fetch_register): Call fetch_altivec_registers instead of
9879 fetch_altivec_register.
9880 (store_register): Call store_altivec_registers instead of
9881 store_altivec_register.
9882 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9883 the new regno parameter.
9884 (store_ppc_registers): Call store_altivec_registers with -1 for
9885 the new regno parameter.
9886
9887 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9888
9889 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9890 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9891 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9892 (gdb_vrregset_t): Change array type size to
9893 PPC_LINUX_SIZEOF_VRREGSET.
9894 (gdb_vsxregset_t): Change array type size to
9895 PPC_LINUX_SIZEOF_VSXREGSET.
9896 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9897 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9898 PPC_LINUX_SIZEOF_VSXREGSET.
9899
9900 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9901
9902 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9903 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9904 nat/ppc-linux.c.
9905 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9906 ppc_linux_target_wordsize with tid.
9907 (ppc_linux_nat_target::read_description): Call ppc_linux_target
9908 wordsize with tid.
9909 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9910 (ppc64_64bit_inferior_p): Add static and inline specifiers.
9911 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9912 tid parameter. Remove static specifier.
9913 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9914 (ppc_linux_target_wordsize): New declaration.
9915
9916 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9917
9918 * arch/ppc-linux-common.c: New file.
9919 * arch/ppc-linux-common.h: New file.
9920 * arch/ppc-linux-tdesc.h: New file.
9921 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9922 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9923 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9924 arch/ppc-linux-tdesc.h.
9925 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9926 arch/ppc-linux-tdesc.h.
9927 (ppc_linux_nat_target::read_description): Remove target
9928 description matching code. Fill a ppc_linux_features struct and
9929 call ppc_linux_match_description with it. Move comment about ISA
9930 2.05 to ppc-linux-common.c.
9931 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9932 arch/ppc-linux-tdesc.h.
9933 (ppc_linux_core_read_description): Remove target description
9934 matching code. Fill a ppc_linux_features struct and call
9935 ppc_linux_match_description with it.
9936 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9937 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9938 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9939 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9940 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9941 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9942 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9943 (tdesc_powerpc_e500l): Remove.
9944
9945 2018-05-22 Joel Brobecker <brobecker@adacore.com>
9946
9947 * ada-lang.c (catch_assert_command): Pass empty string instead
9948 of NULL for excep_string argument.
9949
9950 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9951
9952 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9953 the width of the requested register exceeds the width of the
9954 `ptrace' data type.
9955
9956 2018-05-21 Tom Tromey <tom@tromey.com>
9957
9958 * printcmd.c (output_command): Remove.
9959 (output_command_const): Rename to output_command.
9960 * valprint.h (output_command): Rename from output_command_const.
9961 * tracepoint.c (trace_dump_actions): Call output_command.
9962
9963 2018-05-21 Tom Tromey <tom@tromey.com>
9964
9965 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9966 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9967 * ada-lang.h (create_ada_exception_catchpoint): Update.
9968 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9969 std::string.
9970 (create_excep_cond_exprs, ~ada_catchpoint)
9971 (should_stop_exception, print_one_exception)
9972 (print_mention_exception, print_recreate_exception): Update.
9973 (ada_get_next_arg): Remove.
9974 (catch_ada_exception_command_split): Use std::string. Change type
9975 of "excep_string", "cond_string".
9976 (catch_ada_exception_command): Update.
9977 (create_ada_exception_catchpoint): Change type of excep_string.
9978 (ada_exception_sal): Remove excep_string parameter.
9979 (~ada_catchpoint): Remove.
9980
9981 2018-05-21 Tom Tromey <tom@tromey.com>
9982
9983 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9984 cleanup.
9985
9986 2018-05-21 Tom Tromey <tom@tromey.com>
9987
9988 * ada-lang.c (ada_exception_message_1, ada_exception_message):
9989 Return unique_xmalloc_ptr.
9990 (print_it_exception): Update.
9991
9992 2018-05-21 Tom Tromey <tom@tromey.com>
9993
9994 * tracepoint.c (trace_dump_actions): Use std::string.
9995
9996 2018-05-21 Tom Tromey <tom@tromey.com>
9997
9998 * symfile.c (reread_symbols): Use std::string for original_name.
9999
10000 2018-05-21 Tom Tromey <tom@tromey.com>
10001
10002 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
10003 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
10004 constructor.
10005
10006 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
10007
10008 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
10009 instance to...
10010 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
10011 * objfiles.c (get_objfile_bfd_data): Allocate
10012 objfile_per_bfd_storage with obstack_new when allocating on
10013 obstack.
10014
10015 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
10016
10017 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
10018 OBSTACK_ZALLOC.
10019 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
10020 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
10021 * mdebugread.c (mdebug_build_psymtabs): Likewise.
10022 (add_pending): Likewise.
10023 (parse_symbol): Likewise.
10024 (parse_partial_symbols): Likewise.
10025 (psymtab_to_symtab_1): Likewise.
10026 (new_psymtab): Likewise.
10027 (elfmdebug_build_psymtabs): Likewise.
10028 * minsyms.c (terminate_minimal_symbol_table): Likewise.
10029 * objfiles.c (get_objfile_bfd_data): Likewise.
10030 (objfile_register_static_link): Likewise.
10031 * psymtab.c (allocate_psymtab): Likewise.
10032 * stabsread.c (read_member_functions): Likewise.
10033 * xcoffread.c (xcoff_end_psymtab): Likewise.
10034
10035 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
10036
10037 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
10038 compiler supports std::is_trivially_constructible.
10039 * common/poison.h: Include obstack.h.
10040 (IsMallocable): Define to is_trivially_constructible if the
10041 compiler supports it, define to true_type otherwise.
10042 (xobnew): New.
10043 (XOBNEW): Redefine.
10044 (xobnewvec): New.
10045 (XOBNEWVEC): Redefine.
10046 * gdb_obstack.h (obstack_zalloc): New.
10047 (OBSTACK_ZALLOC): Redefine.
10048 (obstack_calloc): New.
10049 (OBSTACK_CALLOC): Redefine.
10050 (obstack_new): New.
10051 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
10052 (gdbarch_obstack): New declaration in gdbarch.h, definition in
10053 gdbarch.c.
10054 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
10055 obstack_calloc/obstack_zalloc.
10056 (gdbarch_obstack_zalloc): Remove.
10057 * target-descriptions.c (tdesc_data_init): Use obstack_new.
10058
10059 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10060
10061 * stack.c (backtrace_command_1): Remove useless variable int i.
10062
10063 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10064
10065 * stack.c (print_frame_info): Fix comment.
10066
10067 2018-05-18 Tom Tromey <tom@tromey.com>
10068
10069 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
10070 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
10071 (~dwarf2_per_objfile): Update
10072 (dwarf2_get_dwz_file): Use new.
10073 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
10074 unique_ptr.
10075
10076 2018-05-18 Tom Tromey <tom@tromey.com>
10077
10078 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
10079 unique_ptr.
10080 * dwarf2read.c (struct dwp_file): Add constructor and
10081 initializers.
10082 (open_and_init_dwp_file): Return a unique_ptr.
10083 (dwarf2_per_objfile, create_dwp_hash_table)
10084 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
10085 (lookup_dwo_unit_in_dwp): Update.
10086 (open_and_init_dwp_file, get_dwp_file): Update.
10087
10088 2018-05-18 Tom Tromey <tom@tromey.com>
10089
10090 * dwarf2read.c (dwarf2_per_objfile): Update.
10091 (struct mapped_index): Add initializers.
10092 (dwarf2_read_index): Use new.
10093 (dw2_symtab_iter_init): Update.
10094 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
10095 unique_ptr.
10096
10097 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
10098
10099 * dwarf2read.c (mapped_index) <total_size>: Remove.
10100
10101 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
10102
10103 * unittests/format_pieces-selftests.c (test_format_specifier):
10104 Add ARI comments.
10105
10106 2018-05-18 Tom Tromey <tom@tromey.com>
10107
10108 * c-typeprint.c (maybe_print_hole): New function.
10109 (c_print_type_struct_field_offset): Update.
10110 (c_type_print_base_struct_union): Call maybe_print_hole.
10111
10112 2018-05-17 Keith Seitz <keiths@redhat.com>
10113
10114 * breakpoint.c (build_bpstat_chain): New function, moved from
10115 bpstat_stop_status.
10116 (bpstat_stop_status): Add optional parameter, `stop_chain'.
10117 If no stop chain is passed, call build_bpstat_chain to build it.
10118 * breakpoint.h (build_bpstat_chain): Declare.
10119 (bpstat_stop_status): Move documentation here from breakpoint.c.
10120 * infrun.c (handle_signal_stop): Before eliding inlined frames,
10121 build the stop chain and pass it to skip_inline_frames.
10122 Pass this stop chain to bpstat_stop_status.
10123 * inline-frame.c: Include breakpoint.h.
10124 (stopped_by_user_bp_inline_frame): New function.
10125 (skip_inline_frames): Add parameter `stop_chain'.
10126 Move documention to inline-frame.h.
10127 If non-NULL, use stopped_by_user_bp_inline_frame to determine
10128 whether the frame should be elided.
10129 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10130 Add moved documentation and update for new parameter.
10131
10132 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
10133
10134 PR cli/14975
10135 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10136 unittests/format_pieces-selftests.c.
10137 * common/format.h (format_piece) <operator==>: New.
10138 (format_pieces) <operator[]>: Remove.
10139 * common/format.c (format_pieces::format_pieces): Handle \e.
10140 * unittests/format_pieces-selftests.c: New.
10141
10142 2018-05-17 Tom Tromey <tom@tromey.com>
10143
10144 PR symtab/23010:
10145 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10146 (dw2_instantiate_symtab): Add skip_partial parameter.
10147 (dw2_find_last_source_symtab, dw2_map_expand_apply)
10148 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10149 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10150 (dw2_expand_symtabs_matching_one)
10151 (dw2_find_pc_sect_compunit_symtab)
10152 (dw2_debug_names_lookup_symbol)
10153 (dw2_debug_names_expand_symtabs_for_function): Update.
10154 (init_cutu_and_read_dies): Add skip_partial parameter.
10155 (process_psymtab_comp_unit, build_type_psymtabs_1)
10156 (process_skeletonless_type_unit, load_partial_comp_unit)
10157 (psymtab_to_symtab_1): Update.
10158 (load_full_comp_unit): Add skip_partial parameter.
10159 (process_imported_unit_die, dwarf2_read_addr_index)
10160 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10161 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10162 (read_signatured_type): Update.
10163
10164 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
10165
10166 * value.c (release_value): Remove unused variable.
10167 (record_latest_value): Likewise.
10168 (access_value_history): Likewise.
10169 (preserve_values): Likewise.
10170
10171 2018-05-17 Tom Tromey <tom@tromey.com>
10172
10173 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10174 Initialize.
10175
10176 2018-05-16 Maciej W. Rozycki <macro@mips.com>
10177
10178 PR gdb/22286
10179 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10180 Also handle registers whose width is not a multiple of
10181 PTRACE_TYPE_RET.
10182 (linux_nat_trad_target::store_register): Likewise.
10183
10184 2018-05-16 Tom Tromey <tom@tromey.com>
10185
10186 * gdbcore.h (core_bfd): Redefine.
10187 * corelow.c (core_target::close): Update.
10188 (core_target_open): Update.
10189 * progspace.h (struct program_space) <cbfd>: Now a
10190 gdb_bfd_ref_ptr.
10191
10192 2018-05-16 Tom Tromey <tom@tromey.com>
10193
10194 PR cli/19551:
10195 * symfile-add-flags.h (enum symfile_add_flags)
10196 <SYMFILE_NOT_FILENAME>: New constant.
10197 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
10198 objfile name from BFD.
10199 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10200 * minidebug.c (find_separate_debug_file_in_section): Put
10201 ".gnu_debugdata" into BFD's file name.
10202
10203 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
10204
10205 * regcache.c (regcache_read_ftype, regcache_write_ftype):
10206 Remove.
10207
10208 2018-05-15 Tamar Christina <tamar.christina@arm.com>
10209
10210 PR binutils/21446
10211 * aarch64-tdep.c (aarch64_analyze_prologue,
10212 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10213 Indicate not interested in errors.
10214
10215 2018-05-15 Maciej W. Rozycki <macro@mips.com>
10216
10217 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10218 Supply the MIPS_ZERO_REGNUM register.
10219
10220 2018-05-15 Maciej W. Rozycki <macro@mips.com>
10221
10222 * mips-tdep.c (mask_address_var): Make variable static.
10223
10224 2018-05-14 Tom Tromey <tom@tromey.com>
10225
10226 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10227
10228 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
10229
10230 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10231 FXSAVE_ADDR for the mxcsr register.
10232
10233 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
10234
10235 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10236
10237 2018-05-11 Pedro Alves <palves@redhat.com>
10238
10239 * corelow.c (core_target) <core_target>: No longer inline.
10240 Initialize m_core_gdbarch, m_core_vec and build the section table
10241 here.
10242 <~core_target>: New.
10243 <core_gdbarch, get_core_register_section>: New methods.
10244 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10245 factored out from ...
10246 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10247 (core_ops): Delete.
10248 (sniff_core_bfd): Add gdbarch parameter.
10249 (core_close): Delete, merged into ...
10250 (core_target::close): ... here. Delete self.
10251 (core_close_cleanup): Delete.
10252 (core_target_open): Allocate a core_target on the heap. Use a
10253 unique_ptr instead of a cleanup. Bits moved into the core_target
10254 ctor. Adjust to use core_target methods instead of globals.
10255 (get_core_register_section): Rename to ...
10256 (core_target::get_core_register_section): ... this and adjust.
10257 (struct get_core_registers_cb_data): New.
10258 (get_core_registers_cb): Use it. Use bool.
10259 (core_target::fetch_registers, core_target::files_info)
10260 (core_target::xfer_partial, core_target::read_description)
10261 (core_target::pid_to, core_target::thread_name): Adjust to
10262 reference class fields instead of globals.
10263 * target.h (struct target_ops_deleter, target_ops_up): New.
10264
10265 2018-05-11 Pedro Alves <palves@redhat.com>
10266
10267 * corefile.c (core_file_command): Move to corelow.c.
10268 * corelow.c (the_core_target): Delete.
10269 (core_file_command): Moved from corefile.c. Check exec_bfd
10270 instead of the_core_target. Use target_detach instead of calling
10271 into the_core_target directly.
10272 (maybe_say_no_core_file_now): New.
10273 (core_target::detach): Use it.
10274 (_initialize_corelow): Remove references to the_core_target.
10275 * gdbcore.h (the_core_target): Delete.
10276
10277 2018-05-11 Tom Tromey <tromey@redhat.com>
10278 Pedro Alves <palves@redhat.com>
10279
10280 * corefile.c (core_bfd): Remove.
10281 * gdbcore.h (core_bfd): Now a macro.
10282 * progspace.h (struct program_space) <cbfd>: New field.
10283
10284 2018-05-11 Tom Tromey <tom@tromey.com>
10285
10286 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10287 gdb::def_vector.
10288
10289 2018-05-10 Tom Tromey <tom@tromey.com>
10290
10291 * configure: Rebuild.
10292 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10293
10294 2018-05-10 Joel Brobecker <brobecker@adacore.com>
10295
10296 PR server/23158:
10297 * regformats/regdat.sh: Adjust script, following the addition
10298 of the new expedite_regs parameter to init_target_desc.
10299
10300 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
10301
10302 PR gdb/23127
10303 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10304 set_gdbarch_significant_addr_bit.
10305 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10306 set_gdbarch_significant_addr_bit.
10307 * utils.c (address_significant): Update to sign extend addr.
10308
10309 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
10310
10311 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10312 (xtensa_linux_init_abi): Limit tdep->num_regs by
10313 tdep->num_nopriv_regs.
10314 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10315 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10316 not initialized.
10317
10318 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
10319
10320 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10321
10322 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
10323
10324 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10325 (I387_MXCSR_INIT_VAL): New constant.
10326 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10327 buffer if it was supplied by the inferior.
10328 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10329 (i387_xsave_get_clear_bv): New function.
10330 (i387_supply_xsave): Only read x87 control registers from the
10331 xsave buffer if the feature is enabled, and the state will have
10332 been written, otherwise, provide a suitable default.
10333 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10334 including x87 control registers. Update control registers if they
10335 have changed from the default value, and mark features as enabled
10336 as required.
10337 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10338
10339 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10340
10341 * spu-tdep.c (info_spu_event_command): Fix output formatting.
10342
10343 2018-05-07 Tom Tromey <tom@tromey.com>
10344
10345 * configure: Rebuild.
10346 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10347
10348 2018-05-07 Tom Tromey <tom@tromey.com>
10349
10350 PR tdep/20362:
10351 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10352 bit. Use correct value for VDIV.
10353
10354 2018-05-04 Tom Tromey <tom@tromey.com>
10355
10356 * configure: Rebuild.
10357 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10358
10359 2018-05-04 Tom Tromey <tom@tromey.com>
10360
10361 * linux-record.c (record_linux_system_call) <case
10362 RECORD_SYS_RECVFROM>: Add "break".
10363
10364 2018-05-04 Tom Tromey <tom@tromey.com>
10365
10366 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10367 Add missing "break".
10368 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10369 Add missing "break".
10370
10371 2018-05-04 Tom Tromey <tom@tromey.com>
10372
10373 * rs6000-tdep.c (ppc_process_record_op4)
10374 (ppc_process_record_op63): Add fall-through comment.
10375
10376 2018-05-04 Tom Tromey <tom@tromey.com>
10377
10378 * i386-tdep.c (i386_process_record): Add fall-through comment.
10379
10380 2018-05-04 Tom Tromey <tom@tromey.com>
10381
10382 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10383 comment.
10384
10385 2018-05-04 Tom Tromey <tom@tromey.com>
10386
10387 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10388 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10389 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10390 comment.
10391 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10392 comment.
10393 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10394 comment.
10395
10396 2018-05-04 Tom Tromey <tom@tromey.com>
10397
10398 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10399
10400 2018-05-04 Tom Tromey <tom@tromey.com>
10401
10402 * s390-tdep.c (s390_process_record): Fix fall-through comments.
10403 * xcoffread.c (scan_xcoff_symtab): Move comment later.
10404 * symfile.c (section_is_mapped): Fix fall-through comment.
10405 * stabsread.c (define_symbol, read_member_functions): Fix
10406 fall-through comment.
10407 * s390-linux-tdep.c (s390_process_record): Fix fall-through
10408 comment.
10409 * remote.c (remote_wait_as): Fix fall-through comment.
10410 * p-exp.y (yylex): Fix fall-through comment.
10411 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10412 comment.
10413 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10414 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10415 * jv-exp.y (yylex): Fix fall-through comment.
10416 * go-exp.y (lex_one_token): Fix fall-through comment.
10417 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10418 fall-through comment.
10419 * f-exp.y (yylex): Fix fall-through comment.
10420 * dwarf2read.c (process_die): Fix fall-through comments.
10421 * dbxread.c (process_one_symbol): Fix fall-through comment.
10422 * d-exp.y (lex_one_token): Fix fall-through comment.
10423 * cp-name-parser.y (yylex): Fix fall-through comment.
10424 * coffread.c (coff_symtab_read): Fix fall-through comment.
10425 * c-exp.y (lex_one_token): Fix fall-through comment.
10426 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10427 comment.
10428 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10429 comment.
10430
10431 2018-05-04 Tom Tromey <tom@tromey.com>
10432
10433 PR python/22730:
10434 * NEWS: Mention gdb.execute change.
10435 * gdbcmd.h (execute_control_command): Don't declare.
10436 * python/python.c (execute_gdb_command): Use read_command_lines_1,
10437 execute_control_commands, execute_control_commands_to_string.
10438 * cli/cli-script.h (execute_control_commands)
10439 (execute_control_commands_to_string): Declare.
10440 (execute_control_command): Add from_tty parameter.
10441 * cli/cli-script.c (execute_control_commands)
10442 (execute_control_commands_to_string): New functions.
10443 (execute_user_command): Use execute_control_commands.
10444 (execute_control_command_1): Add "from_tty" parameter. Update.
10445 (execute_control_command): Likewise.
10446
10447 2018-05-04 Tom Tromey <tom@tromey.com>
10448
10449 PR python/22731:
10450 * NEWS: Mention that breakpoint commands are writable.
10451 * python/py-breakpoint.c (bppy_set_commands): New function.
10452 (breakpoint_object_getset) <"commands">: Use it.
10453
10454 2018-05-04 Tom Tromey <tom@tromey.com>
10455
10456 * tracepoint.c (actions_command): Update.
10457 * mi/mi-cmd-break.c (mi_command_line_array)
10458 (mi_command_line_array_cnt, mi_command_line_array_ptr)
10459 (mi_read_next_line): Remove.
10460 (mi_cmd_break_commands): Update.
10461 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10462 function_view.
10463 * cli/cli-script.c (get_command_line): Update.
10464 (process_next_line): Use function_view. Constify.
10465 (recurse_read_control_structure, read_command_lines)
10466 (read_command_lines_1): Change argument types to function_view.
10467 (do_define_command, document_command): Update.
10468 * breakpoint.h (check_tracepoint_command): Don't declare.
10469 * breakpoint.c (check_tracepoint_command): Remove.
10470 (commands_command_1, create_tracepoint_from_upload): Update.
10471
10472 2018-05-04 Tom Tromey <tom@tromey.com>
10473
10474 PR gdb/11750:
10475 * cli/cli-script.h (enum command_control_type) <define_control>:
10476 New constant.
10477 * cli/cli-script.c (multi_line_command_p): Handle define_control.
10478 (build_command_line, execute_control_command_1)
10479 (process_next_line): Likewise.
10480 (do_define_command): New function, extracted from define_command.
10481 (define_command): Use it.
10482
10483 2018-05-04 Tom Tromey <tom@tromey.com>
10484
10485 * tracepoint.c (actions_command): Update.
10486 * cli/cli-script.h (read_command_lines): Update.
10487 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10488 (MAX_TMPBUF): Remove define.
10489 (define_command): Use string_printf.
10490 (document_command): Likewise.
10491 * breakpoint.c (commands_command_1): Update.
10492
10493 2018-05-04 Tom Tromey <tom@tromey.com>
10494
10495 * top.c (execute_command): Update.
10496 * cli/cli-script.h (print_command_lines): Now varargs.
10497 * cli/cli-script.c (print_command_lines): Now varargs.
10498 (execute_control_command_1) <case while_control, case if_control>:
10499 Update.
10500
10501 2018-05-04 Tom Tromey <tom@tromey.com>
10502
10503 * tracepoint.c (all_tracepoint_actions): Rename from
10504 all_tracepoint_actions_and_cleanup. Change return type.
10505 (actions_command, encode_actions_1, encode_actions)
10506 (trace_dump_actions, tdump_command): Update.
10507 * remote.c (remote_download_command_source): Update.
10508 * python/python.c (gdbpy_eval_from_control_command)
10509 (python_command, python_interactive_command): Update.
10510 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10511 * guile/guile.c (guile_command)
10512 (gdbscm_eval_from_control_command, guile_command): Update.
10513 * compile/compile.c (compile_code_command)
10514 (compile_print_command, compile_to_object): Update.
10515 * cli/cli-script.h (struct command_lines_deleter): New.
10516 (counted_command_line): New typedef.
10517 (struct command_line): Add constructor, destructor.
10518 <body_list>: Remove.
10519 <body_list_0, body_list_1>: New members.
10520 (command_line_up): Remove typedef.
10521 (read_command_lines, read_command_lines_1, get_command_line):
10522 Update.
10523 (copy_command_lines): Don't declare.
10524 * cli/cli-script.c (build_command_line): Use "new".
10525 (get_command_line): Return counted_command_line.
10526 (print_command_lines, execute_user_command)
10527 (execute_control_command_1, while_command, if_command): Update.
10528 (realloc_body_list): Remove.
10529 (process_next_line, recurse_read_control_structure): Update.
10530 (read_command_lines, read_command_lines_1): Return counted_command_line.
10531 (free_command_lines): Use "delete".
10532 (copy_command_lines): Remove.
10533 (define_command, document_command, show_user_1): Update.
10534 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10535 a counted_command_line.
10536 * breakpoint.h (counted_command_line): Remove typedef.
10537 (breakpoint_set_commands): Update.
10538 * breakpoint.c (check_no_tracepoint_commands)
10539 (validate_commands_for_breakpoint): Update.
10540 (breakpoint_set_commands): Change commands to be a
10541 counted_command_line.
10542 (commands_command_1, update_dprintf_command_list)
10543 (create_tracepoint_from_upload): Update.
10544
10545 2018-05-04 Tom Tromey <tom@tromey.com>
10546
10547 * cli/cli-decode.h (cmd_list_element): New constructor.
10548 (~cmd_list_element): New destructor.
10549 (struct cmd_list_element): Add initializers.
10550 * cli/cli-decode.c (do_add_cmd): Use "new".
10551 (delete_cmd): Use "delete".
10552
10553 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
10554 Pedro Alves <palves@redhat.com>
10555
10556 PR breakpoints/19806 and support for PR external/20207.
10557 * NEWS: Mention Aarch64 watchpoint improvements.
10558 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10559 watchpoints and PR external/20207 watchpoints.
10560 * nat/aarch64-linux-hw-point.c
10561 (kernel_supports_any_contiguous_range): New.
10562 (aarch64_watchpoint_offset): New.
10563 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10564 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10565 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10566 (aarch64_align_watchpoint): New parameters aligned_offset_p and
10567 next_addr_orig_p. Support PR external/20207 watchpoints.
10568 (aarch64_downgrade_regs): New.
10569 (aarch64_dr_state_insert_one_point): New parameters offset and
10570 addr_orig.
10571 (aarch64_dr_state_remove_one_point): Likewise.
10572 (aarch64_handle_breakpoint): Update caller.
10573 (aarch64_handle_aligned_watchpoint): Likewise.
10574 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10575 aligned_offset.
10576 (aarch64_linux_set_debug_regs): Remove const from state. Call
10577 aarch64_downgrade_regs.
10578 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10579 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10580 (DR_CONTROL_MASK): ... this.
10581 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10582 (unsigned int aarch64_watchpoint_offset): New prototype.
10583 (aarch64_linux_set_debug_regs): Remove const from state.
10584 * utils.c (align_up, align_down): Move to ...
10585 * common/common-utils.c (align_up, align_down): ... here.
10586 * utils.h (align_up, align_down): Move to ...
10587 * common/common-utils.h (align_up, align_down): ... here.
10588
10589 2018-05-04 Joel Brobecker <brobecker@adacore.com>
10590
10591 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10592 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10593 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10594 Re-implement to match the ABI as summarized in GCC's
10595 gcc/config/sparc/sparc.c. All callers updated.
10596 (sparc32_store_arguments): Remove assertion.
10597
10598 2018-05-04 Tom Tromey <tom@tromey.com>
10599
10600 * printcmd.c: Don't include tui.h.
10601 (decode_format): Use skip_spaces.
10602
10603 2018-05-04 Tom Tromey <tom@tromey.com>
10604
10605 PR gdb/22619:
10606 * printcmd.c (last_count): New global.
10607 (x_command): Use saved count when repeating.
10608
10609 2018-05-04 Tom Tromey <tom@tromey.com>
10610
10611 * nto-procfs.c (do_closedir_cleanup): Remove.
10612 (procfs_pidlist): Use gdb_dir_up.
10613 * procfs.c (do_closedir_cleanup): Remove.
10614 (proc_update_threads): Use gdb_dir_up.
10615 * common/filestuff.h (struct gdb_dir_deleter): New.
10616 (gdb_dir_up): New typedef.
10617
10618 2018-05-04 Tom Tromey <tom@tromey.com>
10619
10620 * ada-lang.c (print_mention_exception): Use std::string.
10621
10622 2018-05-04 Tom Tromey <tom@tromey.com>
10623
10624 * ada-lang.c (create_excep_cond_exprs): Update.
10625 (ada_exception_catchpoint_cond_string): Use std::string.
10626
10627 2018-05-04 Tom Tromey <tom@tromey.com>
10628
10629 * ada-lang.c (xget_renaming_scope): Return std::string.
10630 (old_renaming_is_invisible): Update.
10631
10632 2018-05-04 Tom Tromey <tom@tromey.com>
10633
10634 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10635 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10636
10637 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
10638
10639 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10640
10641 2018-05-04 Tom Tromey <tom@tromey.com>
10642
10643 * remote.c (remote_query_supported_append): Change type.
10644 (remote_check_symbols): Update.
10645
10646 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
10647
10648 PR gdb/11420
10649 * configure.ac: Prepend libpython.
10650 * python/python-config.py: Likewise.
10651 * configure: Regenerate.
10652
10653 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
10654
10655 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10656
10657 2018-05-03 Pedro Alves <palves@redhat.com>
10658
10659 * s390-linux-nat.c
10660 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10661 override. Write 'true' instead of '1'.
10662 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10663 declaration.
10664
10665 2018-05-02 Pedro Alves <palves@redhat.com>
10666
10667 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10668 add_inf_child_target.
10669 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10670 add_inf_child_target.
10671 * aix-thread.c (aix_thread_target_info): New.
10672 (aix_thread_target) <shortname, longname, doc>: Delete.
10673 <info>: New.
10674 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10675 add_inf_child_target.
10676 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10677 add_inf_child_target.
10678 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10679 add_inf_child_target.
10680 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10681 add_inf_child_target.
10682 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10683 add_inf_child_target.
10684 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10685 add_inf_child_target.
10686 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10687 add_inf_child_target.
10688 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10689 add_inf_child_target.
10690 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10691 add_inf_child_target.
10692 * bfd-target.c (target_bfd_target_info): New.
10693 (target_bfd) <shortname, longname, doc>: Delete.
10694 <info>: New.
10695 * bsd-kvm.c (bsd_kvm_target_info): New.
10696 (bsd_kvm_target) <shortname, longname, doc>: Delete.
10697 <info>: New.
10698 (bsd_kvm_target::open): Rename to ...
10699 (bsd_kvm_target_open): ... this. Adjust.
10700 * bsd-uthread.c (bsd_uthread_target_info): New.
10701 (bsd_uthread_target) <shortname, longname, doc>: Delete.
10702 <info>: New.
10703 * corefile.c (core_file_command): Adjust.
10704 * corelow.c (core_target_info): New.
10705 (core_target) <shortname, longname, doc>: Delete.
10706 <info>: New.
10707 (core_target::open): Rename to ...
10708 (core_target_open): ... this. Adjust.
10709 * ctf.c (ctf_target_info): New.
10710 (ctf_target) <shortname, longname, doc>: Delete.
10711 <info>: New.
10712 (ctf_target::open): Rename to ...
10713 (ctf_target_open): ... this.
10714 (_initialize_ctf): Adjust.
10715 * exec.c (exec_target_info): New.
10716 (exec_target) <shortname, longname, doc>: Delete.
10717 <info>: New.
10718 (exec_target::open): Rename to ...
10719 (exec_target_open): ... this.
10720 * gdbcore.h (core_target_open): Declare.
10721 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10722 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10723 add_inf_child_target.
10724 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10725 add_inf_child_target.
10726 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10727 add_inf_child_target.
10728 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10729 add_inf_child_target.
10730 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10731 add_inf_child_target.
10732 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10733 add_inf_child_target.
10734 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10735 add_inf_child_target.
10736 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10737 add_inf_child_target.
10738 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10739 add_inf_child_target.
10740 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10741 add_inf_child_target.
10742 * inf-child.c (inf_child_target_info): New.
10743 (inf_child_target::info): New.
10744 (inf_child_open_target): Remove 'target' parameter. Use
10745 get_native_target instead.
10746 (inf_child_target::open): Delete.
10747 (add_inf_child_target): New.
10748 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10749 Delete.
10750 <info>: New.
10751 (add_inf_child_target): Declare.
10752 (inf_child_open_target): Declare.
10753 * linux-thread-db.c (thread_db_target_info): New.
10754 (thread_db_target) <shortname, longname, doc>: Delete.
10755 <info>: New.
10756 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10757 add_inf_child_target.
10758 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10759 add_inf_child_target.
10760 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10761 add_inf_child_target.
10762 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10763 add_inf_child_target.
10764 * make-target-delegates (print_class): Adjust.
10765 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10766 add_inf_child_target.
10767 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10768 add_inf_child_target.
10769 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10770 add_inf_child_target.
10771 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10772 add_inf_child_target.
10773 * nto-procfs.c (nto_native_target_info): New.
10774 (nto_procfs_target_native) <shortname, longname, doc>:
10775 Delete.
10776 <info>: New.
10777 (nto_procfs_target_info): New.
10778 (nto_procfs_target_procfs) <shortname, longname, doc>:
10779 Delete.
10780 <info>: New.
10781 (init_procfs_targets): Adjust.
10782 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10783 add_inf_child_target.
10784 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10785 add_inf_child_target.
10786 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10787 add_inf_child_target.
10788 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10789 add_inf_child_target.
10790 * ravenscar-thread.c (ravenscar_target_info): New.
10791 (ravenscar_thread_target) <shortname, longname, doc>:
10792 Delete.
10793 <info>: New.
10794 * record-btrace.c (record_btrace_target_info):
10795 (record_btrace_target) <shortname, longname, doc>: Delete.
10796 <info>: New.
10797 (record_btrace_target::open): Rename to ...
10798 (record_btrace_target_open): ... this. Adjust.
10799 * record-full.c (record_longname, record_doc): New.
10800 (record_full_base_target) <shortname, longname, doc>: Delete.
10801 <info>: New.
10802 (record_full_target_info): New.
10803 (record_full_target): <shortname>: Delete.
10804 <info>: New.
10805 (record_full_core_open_1, record_full_open_1): Update comments.
10806 (record_full_base_target::open): Rename to ...
10807 (record_full_open): ... this.
10808 (cmd_record_full_restore): Update.
10809 (_initialize_record_full): Update.
10810 * remote-sim.c (remote_sim_target_info): New.
10811 (gdbsim_target) <shortname, longname, doc>: Delete.
10812 <info>: New.
10813 (gdbsim_target::open): Rename to ...
10814 (gdbsim_target_open): ... this.
10815 (_initialize_remote_sim): Adjust.
10816 * remote.c (remote_doc): New.
10817 (remote_target_info): New.
10818 (remote_target) <shortname, longname, doc>: Delete.
10819 <info>: New.
10820 (extended_remote_target_info): New.
10821 (extended_remote_target) <shortname, longname, doc>: Delete.
10822 <info>: New.
10823 (remote_target::open_1): Make static. Adjust.
10824 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10825 * s390-linux-nat.c (_initialize_s390_nat): Use
10826 add_inf_child_target.
10827 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10828 add_inf_child_target.
10829 * sol-thread.c (thread_db_target_info): New.
10830 (sol_thread_target) <shortname, longname, doc>: Delete.
10831 <info>: New.
10832 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10833 add_inf_child_target.
10834 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10835 add_inf_child_target.
10836 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10837 add_inf_child_target.
10838 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10839 add_inf_child_target.
10840 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10841 add_inf_child_target.
10842 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10843 add_inf_child_target.
10844 * spu-linux-nat.c (_initialize_spu_nat): Use
10845 add_inf_child_target.
10846 * spu-multiarch.c (spu_multiarch_target_info): New.
10847 (spu_multiarch_target) <shortname, longname, doc>: Delete.
10848 <info>: New.
10849 * target-delegates.c: Regenerate.
10850 * target.c: Include <unordered_map>.
10851 (target_ops_p): Delete.
10852 (DEF_VEC_P(target_ops_p)): Delete.
10853 (target_factories): New.
10854 (test_target_info): New.
10855 (test_target_ops::info): New.
10856 (open_target): Adjust to use target_factories.
10857 (add_target_with_completer): Rename to ...
10858 (add_target): ... this. Change prototype. Register target_info
10859 and open callback in target_factories. Register target_info in
10860 command context instead of target_ops.
10861 (add_target): Delete old implementation.
10862 (add_deprecated_target_alias): Change prototype. Adjust.
10863 (the_native_target): New.
10864 (set_native_target, get_native_target): New.
10865 (find_default_run_target): Use the_native_target.
10866 (find_attach_target, find_run_target): Simplify.
10867 (target_ops::open): Delete.
10868 (dummy_target_info): New.
10869 (dummy_target::shortname, dummy_target::longname)
10870 (dummy_target::doc): Delete.
10871 (dummy_target::info): New.
10872 (debug_target::shortname, debug_target::longname)
10873 (debug_target::doc): Delete.
10874 (debug_target::info): New.
10875 * target.h (struct target_info): New.
10876 (target_ops::~target_ops): Add comment.
10877 (target_ops::info): New.
10878 (target_ops::shortname, target_ops::longname, target_ops::doc): No
10879 longer virtual. Implement in terms of target_info.
10880 (set_native_target, get_native_target): Declare.
10881 (target_open_ftype): New.
10882 (add_target, add_target_with_completer)
10883 (add_deprecated_target_alias): Change prototype.
10884 (test_target) <shortname, longname, doc>: Delete.
10885 <info>: New.
10886 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10887 add_inf_child_target.
10888 * tracefile-tfile.c (tfile_target_info): New.
10889 (tfile_target) <shortname, longname, doc>: Delete.
10890 <info>: New.
10891 (tfile_target::open): Rename to ...
10892 (tfile_target_open): ... this.
10893 (_initialize_tracefile_tfile): Adjust.
10894 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10895 add_inf_child_target.
10896 * windows-nat.c (_initialize_windows_nat): Use
10897 add_inf_child_target.
10898 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10899 add_inf_child_target.
10900
10901 2018-05-02 Pedro Alves <palves@redhat.com>
10902
10903 * linux-nat.h (linux_nat_target) <low_new_thread,
10904 low_delete_thread, low_new_fork, low_forget_process,
10905 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10906 New virtual methods.
10907 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10908 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10909 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10910 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10911 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10912 Delete.
10913 * linux-fork.c (delete_fork): Adjust to call low method.
10914 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10915 (linux_nat_new_fork, linux_nat_forget_process_hook)
10916 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10917 (linux_nat_status_is_event):
10918 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10919 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10920 to call low method.
10921 (sigtrap_is_event): Rename to ...
10922 (linux_nat_target::low_status_is_event): ... this.
10923 (linux_nat_set_status_is_event): Delete.
10924 (save_stop_reason, linux_nat_wait_1)
10925 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10926 low methods.
10927 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10928 (linux_nat_set_new_fork, linux_nat_set_forget_process)
10929 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10930 (linux_nat_set_prepare_to_resume): Delete.
10931 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10932 low virtual methods.
10933 * amd64-linux-nat.c: Likewise.
10934 * arm-linux-nat.c: Likewise.
10935 * i386-linux-nat.c: Likewise.
10936 * ia64-linux-nat.c: Likewise.
10937 * mips-linux-nat.c: Likewise.
10938 * ppc-linux-nat.c: Likewise.
10939 * s390-linux-nat.c: Likewise.
10940 * sparc64-linux-nat.c: Likewise.
10941 * x86-linux-nat.c: Likewise.
10942 * x86-linux-nat.h: Include "nat/x86-linux.h".
10943 (x86_linux_nat_target) <low_new_fork, low_forget_process,
10944 low_prepare_to_resume, low_new_thread, low_delete_thread>:
10945 Override methods.
10946
10947 2018-05-02 Pedro Alves <palves@redhat.com>
10948
10949 * target.h (target_ops)
10950 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10951 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10952 stopped_by_watchpoint, have_continuable_watchpoint,
10953 stopped_data_address, watchpoint_addr_within_range,
10954 can_accel_watchpoint_condition, can_run, thread_alive,
10955 has_all_memory, has_memory, has_stack, has_registers,
10956 has_execution, can_async_p, is_async_p, supports_non_stop,
10957 always_non_stop_p, can_execute_reverse, supports_multi_process,
10958 supports_enable_disable_tracepoint,
10959 supports_disable_randomization, supports_string_tracing,
10960 supports_evaluation_of_breakpoint_conditions,
10961 can_run_breakpoint_commands, filesystem_is_local,
10962 can_download_tracepoint, get_trace_state_variable_value,
10963 set_trace_notes, get_tib_address, use_agent, can_use_agent,
10964 record_is_replaying, record_will_replay,
10965 augmented_libraries_svr4_read>: Adjust to return bool.
10966 * aarch64-linux-nat.c: All implementations adjusted.
10967 * aix-thread.c: All implementations adjusted.
10968 * arm-linux-nat.c: All implementations adjusted.
10969 * breakpoint.c: All implementations adjusted.
10970 * bsd-kvm.c: All implementations adjusted.
10971 * bsd-uthread.c: All implementations adjusted.
10972 * corelow.c: All implementations adjusted.
10973 * ctf.c: All implementations adjusted.
10974 * darwin-nat.c: All implementations adjusted.
10975 * darwin-nat.h: All implementations adjusted.
10976 * exec.c: All implementations adjusted.
10977 * fbsd-nat.c: All implementations adjusted.
10978 * fbsd-nat.h: All implementations adjusted.
10979 * gnu-nat.c: All implementations adjusted.
10980 * gnu-nat.h: All implementations adjusted.
10981 * go32-nat.c: All implementations adjusted.
10982 * ia64-linux-nat.c: All implementations adjusted.
10983 * inf-child.c: All implementations adjusted.
10984 * inf-child.h: All implementations adjusted.
10985 * inf-ptrace.c: All implementations adjusted.
10986 * inf-ptrace.h: All implementations adjusted.
10987 * linux-nat.c: All implementations adjusted.
10988 * linux-nat.h: All implementations adjusted.
10989 * mips-linux-nat.c: All implementations adjusted.
10990 * nto-procfs.c: All implementations adjusted.
10991 * ppc-linux-nat.c: All implementations adjusted.
10992 * procfs.c: All implementations adjusted.
10993 * ravenscar-thread.c: All implementations adjusted.
10994 * record-btrace.c: All implementations adjusted.
10995 * record-full.c: All implementations adjusted.
10996 * remote-sim.c: All implementations adjusted.
10997 * remote.c: All implementations adjusted.
10998 * s390-linux-nat.c: All implementations adjusted.
10999 * sol-thread.c: All implementations adjusted.
11000 * spu-multiarch.c: All implementations adjusted.
11001 * target-delegates.c: All implementations adjusted.
11002 * target.c: All implementations adjusted.
11003 * target.h: All implementations adjusted.
11004 * tracefile-tfile.c: All implementations adjusted.
11005 * tracefile.c: All implementations adjusted.
11006 * tracefile.h: All implementations adjusted.
11007 * windows-nat.c: All implementations adjusted.
11008 * x86-linux-nat.h: All implementations adjusted.
11009 * x86-nat.h: All implementations adjusted.
11010
11011 2018-05-02 Pedro Alves <palves@redhat.com>
11012
11013 * make-target-delegates (scan_target_h): Don't trim lines here.
11014 Replace sequences of tabs and/or whitespace with a single
11015 whitespace.
11016 (top level, parsing methods): Trim each line before processing it
11017 here.
11018
11019 2018-05-02 Pedro Alves <palves@redhat.com>
11020 John Baldwin <jhb@freebsd.org>
11021
11022 * target.h (enum strata) <debug_stratum>: New.
11023 (struct target_ops) <all delegation methods>: Replace by C++
11024 virtual methods, and drop "to_" prefix. All references updated
11025 throughout.
11026 <to_shortname, to_longname, to_doc, to_data,
11027 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
11028 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
11029 virtual methods. All references updated throughout.
11030 <can_attach, supports_terminal_ours, can_create_inferior,
11031 get_thread_control_capabilities, attach_no_wait>: New
11032 virtual methods.
11033 <insert_breakpoint, remove_breakpoint>: Now
11034 TARGET_DEFAULT_NORETURN methods.
11035 <info_proc>: Now returns bool.
11036 <to_magic>: Delete.
11037 (OPS_MAGIC): Delete.
11038 (current_target): Delete. All references replaced by references
11039 to ...
11040 (target_stack): ... this. New.
11041 (target_shortname, target_longname): Adjust.
11042 (target_can_run): Now a function declaration.
11043 (default_child_has_all_memory, default_child_has_memory)
11044 (default_child_has_stack, default_child_has_registers)
11045 (default_child_has_execution): Remove target_ops parameter.
11046 (complete_target_initialization): Delete.
11047 (memory_breakpoint_target): New template class.
11048 (test_target_ops): Refactor as a C++ class with virtual methods.
11049 * make-target-delegates (NAME_PART): Tighten.
11050 (POINTER_PART, CP_SYMBOL): New.
11051 (SIMPLE_RETURN_PART): Reimplement.
11052 (VEC_RETURN_PART): Expect less.
11053 (RETURN_PART, VIRTUAL_PART): New.
11054 (METHOD): Adjust to C++ virtual methods.
11055 (scan_target_h): Remove reference to C99.
11056 (dname): Output "target_ops::" prefix.
11057 (write_function_header): Adjust to output a C++ class method.
11058 (write_declaration): New.
11059 (write_delegator): Adjust to output a C++ class method.
11060 (tdname): Output "dummy_target::" prefix.
11061 (write_tdefault, write_debugmethod): Adjust to output a C++ class
11062 method.
11063 (tdefault_names, debug_names): Delete.
11064 (return_types, tdefaults, styles, argtypes_array): New.
11065 (top level): All methods are delegators.
11066 (print_class): New.
11067 (top level): Print dummy_target and debug_target classes.
11068 * target-delegates.c: Regenerate.
11069 * target-debug.h (target_debug_print_enum_info_proc_what)
11070 (target_debug_print_thread_control_capabilities)
11071 (target_debug_print_thread_info_p): New.
11072 * target.c (dummy_target): Delete.
11073 (the_dummy_target, the_debug_target): New.
11074 (target_stack): Now extern.
11075 (set_targetdebug): Push/unpush debug target.
11076 (default_child_has_all_memory, default_child_has_memory)
11077 (default_child_has_stack, default_child_has_registers)
11078 (default_child_has_execution): Remove target_ops parameter.
11079 (complete_target_initialization): Delete.
11080 (add_target_with_completer): No longer call
11081 complete_target_initialization.
11082 (target_supports_terminal_ours): Use regular delegation.
11083 (update_current_target): Delete.
11084 (push_target): No longer check magic number. Don't call
11085 update_current_target.
11086 (unpush_target): Don't call update_current_target.
11087 (target_is_pushed): No longer check magic number.
11088 (target_require_runnable): Skip for all stratums over
11089 process_stratum.
11090 (target_ops::info_proc): New.
11091 (target_info_proc): Use find_target_at and
11092 find_default_run_target.
11093 (target_supports_disable_randomization): Use regular delegation.
11094 (target_get_osdata): Use find_target_at.
11095 (target_ops::open, target_ops::close, target_ops::can_attach)
11096 (target_ops::attach, target_ops::can_create_inferior)
11097 (target_ops::create_inferior, target_ops::can_run)
11098 (target_can_run): New.
11099 (default_fileio_target): Use regular delegation.
11100 (target_ops::fileio_open, target_ops::fileio_pwrite)
11101 (target_ops::fileio_pread, target_ops::fileio_fstat)
11102 (target_ops::fileio_close, target_ops::fileio_unlink)
11103 (target_ops::fileio_readlink): New.
11104 (target_fileio_open_1, target_fileio_unlink)
11105 (target_fileio_readlink): Always call the target method. Handle
11106 FILEIO_ENOSYS.
11107 (return_zero, return_zero_has_execution): Delete.
11108 (init_dummy_target): Delete.
11109 (dummy_target::dummy_target, dummy_target::shortname)
11110 (dummy_target::longname, dummy_target::doc)
11111 (debug_target::debug_target, debug_target::shortname)
11112 (debug_target::longname, debug_target::doc): New.
11113 (target_supports_delete_record): Use regular delegation.
11114 (setup_target_debug): Delete.
11115 (maintenance_print_target_stack): Skip debug_stratum.
11116 (initialize_targets): Instantiate the_dummy_target and
11117 the_debug_target.
11118 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
11119 use target_stack.
11120 (target_auxv_search, fprint_target_auxv): Adjust.
11121 (info_auxv_command): Adjust to use target_stack.
11122 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11123 * exceptions.c (print_flush): Handle a NULL target_stack.
11124 * regcache.c (target_ops_no_register): Refactor as class with
11125 virtual methods.
11126
11127 * exec.c (exec_target): New class.
11128 (exec_ops): Now an exec_target.
11129 (exec_open, exec_close_1, exec_get_section_table)
11130 (exec_xfer_partial, exec_files_info, exec_has_memory)
11131 (exec_make_note_section): Refactor as exec_target methods.
11132 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11133 Delete.
11134 (exec_target::find_memory_regions): New.
11135 (_initialize_exec): Don't call init_exec_ops.
11136 * gdbcore.h (exec_file_clear): Delete.
11137
11138 * corefile.c (core_target): Delete.
11139 (core_file_command): Adjust.
11140 * corelow.c (core_target): New class.
11141 (the_core_target): New.
11142 (core_close): Remove target_ops parameter.
11143 (core_close_cleanup): Adjust.
11144 (core_target::close): New.
11145 (core_open, core_detach, get_core_registers, core_files_info)
11146 (core_xfer_partial, core_thread_alive, core_read_description)
11147 (core_pid_to_str, core_thread_name, core_has_memory)
11148 (core_has_stack, core_has_registers, core_info_proc): Rework as
11149 core_target methods.
11150 (ignore, core_remove_breakpoint, init_core_ops): Delete.
11151 (_initialize_corelow): Initialize the_core_target.
11152 * gdbcore.h (core_target): Delete.
11153 (the_core_target): New.
11154
11155 * ctf.c: (ctf_target): New class.
11156 (ctf_ops): Now a ctf_target.
11157 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11158 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11159 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11160 methods.
11161 (init_ctf_ops): Delete.
11162 (_initialize_ctf): Don't call it.
11163 * tracefile-tfile.c (tfile_target): New class.
11164 (tfile_ops): Now a tfile_target.
11165 (tfile_open, tfile_close, tfile_files_info)
11166 (tfile_get_tracepoint_status, tfile_trace_find)
11167 (tfile_fetch_registers, tfile_xfer_partial)
11168 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11169 Refactor as tfile_target methods.
11170 (tfile_xfer_partial_features): Remove target_ops parameter.
11171 (init_tfile_ops): Delete.
11172 (_initialize_tracefile_tfile): Don't call it.
11173 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11174 (tracefile_has_stack, tracefile_has_registers)
11175 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11176 tracefile_target methods.
11177 (init_tracefile_ops): Delete.
11178 (tracefile_target::tracefile_target): New.
11179 * tracefile.h: Include "target.h".
11180 (tracefile_target): New class.
11181 (init_tracefile_ops): Delete.
11182
11183 * spu-multiarch.c (spu_multiarch_target): New class.
11184 (spu_ops): Now a spu_multiarch_target.
11185 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11186 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11187 (spu_search_memory, spu_mourn_inferior): Refactor as
11188 spu_multiarch_target methods.
11189 (init_spu_ops): Delete.
11190 (_initialize_spu_multiarch): Remove references to init_spu_ops,
11191 complete_target_initialization.
11192
11193 * ravenscar-thread.c (ravenscar_thread_target): New class.
11194 (ravenscar_ops): Now a ravenscar_thread_target.
11195 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11196 (ravenscar_thread_alive, ravenscar_pid_to_str)
11197 (ravenscar_fetch_registers, ravenscar_store_registers)
11198 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11199 (ravenscar_stopped_by_hw_breakpoint)
11200 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11201 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11202 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11203 methods.
11204 (init_ravenscar_thread_ops): Delete.
11205 (_initialize_ravenscar): Remove references to
11206 init_ravenscar_thread_ops and complete_target_initialization.
11207
11208 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11209 (bsd_uthread_target): New class.
11210 (bsd_uthread_ops): Now a bsd_uthread_target.
11211 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11212 (bsd_uthread_close, bsd_uthread_mourn_inferior)
11213 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11214 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11215 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11216 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11217 (bsd_uthread_target): Delete function.
11218 (_initialize_bsd_uthread): Remove reference to
11219 complete_target_initialization.
11220
11221 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
11222 (target_bfd): ... this new class.
11223 (target_bfd_xfer_partial, target_bfd_get_section_table)
11224 (target_bfd_close): Refactor as target_bfd methods.
11225 (target_bfd::~target_bfd): New.
11226 (target_bfd_reopen): Adjust.
11227 (target_bfd::close): New.
11228
11229 * record-btrace.c (record_btrace_target): New class.
11230 (record_btrace_ops): Now a record_btrace_target.
11231 (record_btrace_open, record_btrace_stop_recording)
11232 (record_btrace_disconnect, record_btrace_close)
11233 (record_btrace_async, record_btrace_info)
11234 (record_btrace_insn_history, record_btrace_insn_history_range)
11235 (record_btrace_insn_history_from, record_btrace_call_history)
11236 (record_btrace_call_history_range)
11237 (record_btrace_call_history_from, record_btrace_record_method)
11238 (record_btrace_is_replaying, record_btrace_will_replay)
11239 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11240 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11241 (record_btrace_store_registers, record_btrace_prepare_to_store)
11242 (record_btrace_to_get_unwinder)
11243 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11244 (record_btrace_commit_resume, record_btrace_wait)
11245 (record_btrace_stop, record_btrace_can_execute_reverse)
11246 (record_btrace_stopped_by_sw_breakpoint)
11247 (record_btrace_supports_stopped_by_sw_breakpoint)
11248 (record_btrace_stopped_by_hw_breakpoint)
11249 (record_btrace_supports_stopped_by_hw_breakpoint)
11250 (record_btrace_update_thread_list, record_btrace_thread_alive)
11251 (record_btrace_goto_begin, record_btrace_goto_end)
11252 (record_btrace_goto, record_btrace_stop_replaying_all)
11253 (record_btrace_execution_direction)
11254 (record_btrace_prepare_to_generate_core)
11255 (record_btrace_done_generating_core): Refactor as
11256 record_btrace_target methods.
11257 (init_record_btrace_ops): Delete.
11258 (_initialize_record_btrace): Remove reference to
11259 init_record_btrace_ops.
11260 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11261 the execution_direction global.
11262 (record_full_base_target, record_full_target)
11263 (record_full_core_target): New classes.
11264 (record_full_ops): Now a record_full_target.
11265 (record_full_core_ops): Now a record_full_core_target.
11266 (record_full_target::detach, record_full_target::disconnect)
11267 (record_full_core_target::disconnect)
11268 (record_full_target::mourn_inferior, record_full_target::kill):
11269 New.
11270 (record_full_open, record_full_close, record_full_async): Refactor
11271 as methods of the record_full_base_target class.
11272 (record_full_resume, record_full_commit_resume): Refactor
11273 as methods of the record_full_target class.
11274 (record_full_wait, record_full_stopped_by_watchpoint)
11275 (record_full_stopped_data_address)
11276 (record_full_stopped_by_sw_breakpoint)
11277 (record_full_supports_stopped_by_sw_breakpoint)
11278 (record_full_stopped_by_hw_breakpoint)
11279 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11280 methods of the record_full_base_target class.
11281 (record_full_store_registers, record_full_xfer_partial)
11282 (record_full_insert_breakpoint, record_full_remove_breakpoint):
11283 Refactor as methods of the record_full_target class.
11284 (record_full_can_execute_reverse, record_full_get_bookmark)
11285 (record_full_goto_bookmark, record_full_execution_direction)
11286 (record_full_record_method, record_full_info, record_full_delete)
11287 (record_full_is_replaying, record_full_will_replay)
11288 (record_full_goto_begin, record_full_goto_end, record_full_goto)
11289 (record_full_stop_replaying): Refactor as methods of the
11290 record_full_base_target class.
11291 (record_full_core_resume, record_full_core_kill)
11292 (record_full_core_fetch_registers)
11293 (record_full_core_prepare_to_store)
11294 (record_full_core_store_registers, record_full_core_xfer_partial)
11295 (record_full_core_insert_breakpoint)
11296 (record_full_core_remove_breakpoint)
11297 (record_full_core_has_execution): Refactor
11298 as methods of the record_full_core_target class.
11299 (record_full_base_target::supports_delete_record): New.
11300 (init_record_full_ops): Delete.
11301 (init_record_full_core_ops): Delete.
11302 (record_full_save): Refactor as method of the
11303 record_full_base_target class.
11304 (_initialize_record_full): Remove references to
11305 init_record_full_ops and init_record_full_core_ops.
11306
11307 * remote.c (remote_target, extended_remote_target): New classes.
11308 (remote_ops): Now a remote_target.
11309 (extended_remote_ops): Now an extended_remote_target.
11310 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11311 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11312 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11313 (remote_pass_signals, remote_set_syscall_catchpoint)
11314 (remote_program_signals, )
11315 (remote_thread_always_alive): Remove target_ops parameter.
11316 (remote_thread_alive, remote_thread_name)
11317 (remote_update_thread_list, remote_threads_extra_info)
11318 (remote_static_tracepoint_marker_at)
11319 (remote_static_tracepoint_markers_by_strid)
11320 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11321 (remote_open): Refactor as methods of remote_target.
11322 (extended_remote_open, extended_remote_detach)
11323 (extended_remote_attach, extended_remote_post_attach):
11324 (extended_remote_supports_disable_randomization)
11325 (extended_remote_create_inferior): : Refactor as method of
11326 extended_remote_target.
11327 (remote_set_permissions, remote_open_1, remote_detach)
11328 (remote_follow_fork, remote_follow_exec, remote_disconnect)
11329 (remote_resume, remote_commit_resume, remote_stop)
11330 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11331 (remote_terminal_ours, remote_wait, remote_fetch_registers)
11332 (remote_prepare_to_store, remote_store_registers)
11333 (remote_flash_erase, remote_flash_done, remote_files_info)
11334 (remote_kill, remote_mourn, remote_insert_breakpoint)
11335 (remote_remove_breakpoint, remote_insert_watchpoint)
11336 (remote_watchpoint_addr_within_range)
11337 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11338 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11339 (remote_supports_stopped_by_sw_breakpoint)
11340 (remote_stopped_by_hw_breakpoint)
11341 (remote_supports_stopped_by_hw_breakpoint)
11342 (remote_stopped_by_watchpoint, remote_stopped_data_address)
11343 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11344 (remote_verify_memory): Refactor as methods of remote_target.
11345 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11346 parameter.
11347 (remote_xfer_partial, remote_get_memory_xfer_limit)
11348 (remote_search_memory, remote_rcmd, remote_memory_map)
11349 (remote_pid_to_str, remote_get_thread_local_address)
11350 (remote_get_tib_address, remote_read_description): Refactor as
11351 methods of remote_target.
11352 (remote_target::fileio_open, remote_target::fileio_pwrite)
11353 (remote_target::fileio_pread, remote_target::fileio_close): New.
11354 (remote_hostio_readlink, remote_hostio_fstat)
11355 (remote_filesystem_is_local, remote_can_execute_reverse)
11356 (remote_supports_non_stop, remote_supports_disable_randomization)
11357 (remote_supports_multi_process, remote_supports_cond_breakpoints)
11358 (remote_supports_enable_disable_tracepoint)
11359 (remote_supports_string_tracing)
11360 (remote_can_run_breakpoint_commands, remote_trace_init)
11361 (remote_download_tracepoint, remote_can_download_tracepoint)
11362 (remote_download_trace_state_variable, remote_enable_tracepoint)
11363 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11364 (remote_trace_start, remote_get_trace_status)
11365 (remote_get_tracepoint_status, remote_trace_stop)
11366 (remote_trace_find, remote_get_trace_state_variable_value)
11367 (remote_save_trace_data, remote_get_raw_trace_data)
11368 (remote_set_disconnected_tracing, remote_core_of_thread)
11369 (remote_set_circular_trace_buffer, remote_traceframe_info)
11370 (remote_get_min_fast_tracepoint_insn_len)
11371 (remote_set_trace_buffer_size, remote_set_trace_notes)
11372 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11373 (remote_disable_btrace, remote_teardown_btrace)
11374 (remote_read_btrace, remote_btrace_conf)
11375 (remote_augmented_libraries_svr4_read, remote_load)
11376 (remote_pid_to_exec_file, remote_can_do_single_step)
11377 (remote_execution_direction, remote_thread_handle_to_thread_info):
11378 Refactor as methods of remote_target.
11379 (init_remote_ops, init_extended_remote_ops): Delete.
11380 (remote_can_async_p, remote_is_async_p, remote_async)
11381 (remote_thread_events, remote_upload_tracepoints)
11382 (remote_upload_trace_state_variables): Refactor as methods of
11383 remote_target.
11384 (_initialize_remote): Remove references to init_remote_ops and
11385 init_extended_remote_ops.
11386
11387 * remote-sim.c (gdbsim_target): New class.
11388 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11389 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11390 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11391 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11392 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11393 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11394 Refactor as methods of gdbsim_target.
11395 (gdbsim_ops): Now a gdbsim_target.
11396 (init_gdbsim_ops): Delete.
11397 (gdbsim_cntrl_c): Adjust.
11398 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11399
11400 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11401 (the_amd64_linux_nat_target): New.
11402 (amd64_linux_fetch_inferior_registers)
11403 (amd64_linux_store_inferior_registers): Refactor as methods of
11404 amd64_linux_nat_target.
11405 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
11406 * i386-linux-nat.c: Don't include "linux-nat.h".
11407 (i386_linux_nat_target): New class.
11408 (the_i386_linux_nat_target): New.
11409 (i386_linux_fetch_inferior_registers)
11410 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11411 as methods of i386_linux_nat_target.
11412 (_initialize_i386_linux_nat): Adjust. Set linux_target.
11413 * inf-child.c (inf_child_ops): Delete.
11414 (inf_child_fetch_inferior_registers)
11415 (inf_child_store_inferior_registers): Delete.
11416 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11417 methods of inf_child_target.
11418 (inf_child_target::supports_terminal_ours)
11419 (inf_child_target::terminal_init)
11420 (inf_child_target::terminal_inferior)
11421 (inf_child_target::terminal_ours_for_output)
11422 (inf_child_target::terminal_ours, inf_child_target::interrupt)
11423 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11424 New.
11425 (inf_child_open, inf_child_disconnect, inf_child_close)
11426 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11427 (inf_child_post_startup_inferior, inf_child_can_run)
11428 (inf_child_pid_to_exec_file): Refactor as methods of
11429 inf_child_target.
11430 (inf_child_follow_fork): Delete.
11431 (inf_child_target::can_create_inferior)
11432 (inf_child_target::can_attach): New.
11433 (inf_child_target::has_all_memory, inf_child_target::has_memory)
11434 (inf_child_target::has_stack, inf_child_target::has_registers)
11435 (inf_child_target::has_execution): New.
11436 (inf_child_fileio_open, inf_child_fileio_pwrite)
11437 (inf_child_fileio_pread, inf_child_fileio_fstat)
11438 (inf_child_fileio_close, inf_child_fileio_unlink)
11439 (inf_child_fileio_readlink, inf_child_use_agent)
11440 (inf_child_can_use_agent): Refactor as methods of
11441 inf_child_target.
11442 (return_zero, inf_child_target): Delete.
11443 (inf_child_target::inf_child_target): New.
11444 * inf-child.h: Include "target.h".
11445 (inf_child_target): Delete function prototype.
11446 (inf_child_target): New class.
11447 (inf_child_open_target, inf_child_mourn_inferior)
11448 (inf_child_maybe_unpush_target): Delete.
11449 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11450 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11451 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11452 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11453 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11454 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11455 (inf_ptrace_wait, inf_ptrace_xfer_partial)
11456 (inf_ptrace_thread_alive, inf_ptrace_files_info)
11457 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11458 methods of inf_ptrace_target.
11459 (inf_ptrace_target): Delete function.
11460 * inf-ptrace.h: Include "inf-child.h".
11461 (inf_ptrace_target): Delete function declaration.
11462 (inf_ptrace_target): New class.
11463 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11464 * linux-nat.c (linux_target): New.
11465 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11466 (linux_nat_target::~linux_nat_target): New.
11467 (linux_child_post_attach, linux_child_post_startup_inferior)
11468 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11469 (linux_child_remove_fork_catchpoint)
11470 (linux_child_insert_vfork_catchpoint)
11471 (linux_child_remove_vfork_catchpoint)
11472 (linux_child_insert_exec_catchpoint)
11473 (linux_child_remove_exec_catchpoint)
11474 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11475 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11476 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11477 (linux_nat_stopped_data_address)
11478 (linux_nat_stopped_by_sw_breakpoint)
11479 (linux_nat_supports_stopped_by_sw_breakpoint)
11480 (linux_nat_stopped_by_hw_breakpoint)
11481 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11482 (linux_nat_kill, linux_nat_mourn_inferior)
11483 (linux_nat_xfer_partial, linux_nat_thread_alive)
11484 (linux_nat_update_thread_list, linux_nat_pid_to_str)
11485 (linux_nat_thread_name, linux_child_pid_to_exec_file)
11486 (linux_child_static_tracepoint_markers_by_strid)
11487 (linux_nat_is_async_p, linux_nat_can_async_p)
11488 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11489 (linux_nat_supports_multi_process)
11490 (linux_nat_supports_disable_randomization, linux_nat_async)
11491 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11492 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11493 (linux_nat_fileio_open, linux_nat_fileio_readlink)
11494 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11495 methods of linux_nat_target.
11496 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11497 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11498 parameter.
11499 (check_stopped_by_watchpoint): Adjust.
11500 (linux_xfer_partial): Delete.
11501 (linux_target_install_ops, linux_target, linux_nat_add_target):
11502 Delete.
11503 (linux_nat_target::linux_nat_target): New.
11504 * linux-nat.h: Include "inf-ptrace.h".
11505 (linux_nat_target): New.
11506 (linux_target, linux_target_install_ops, linux_nat_add_target):
11507 Delete function declarations.
11508 (linux_target): Declare global.
11509 * linux-thread-db.c (thread_db_target): New.
11510 (thread_db_target::thread_db_target): New.
11511 (thread_db_ops): Delete.
11512 (the_thread_db_target): New.
11513 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11514 (thread_db_update_thread_list, thread_db_pid_to_str)
11515 (thread_db_extra_thread_info)
11516 (thread_db_thread_handle_to_thread_info)
11517 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11518 (thread_db_resume): Refactor as methods of thread_db_target.
11519 (init_thread_db_ops): Delete.
11520 (_initialize_thread_db): Remove reference to init_thread_db_ops.
11521 * x86-linux-nat.c: Don't include "linux-nat.h".
11522 (super_post_startup_inferior): Delete.
11523 (x86_linux_nat_target::~x86_linux_nat_target): New.
11524 (x86_linux_child_post_startup_inferior)
11525 (x86_linux_read_description, x86_linux_enable_btrace)
11526 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11527 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11528 methods of x86_linux_nat_target.
11529 (x86_linux_create_target): Delete. Bits folded ...
11530 (x86_linux_add_target): ... here. Now takes a linux_nat_target
11531 pointer.
11532 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11533 (x86_linux_nat_target): New class.
11534 (x86_linux_create_target): Delete.
11535 (x86_linux_add_target): Now takes a linux_nat_target pointer.
11536 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11537 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11538 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11539 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11540 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11541 make extern.
11542 (x86_use_watchpoints): Delete.
11543 * x86-nat.h: Include "breakpoint.h" and "target.h".
11544 (x86_use_watchpoints): Delete.
11545 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11546 (x86_stopped_by_watchpoint, x86_stopped_data_address)
11547 (x86_insert_watchpoint, x86_remove_watchpoint)
11548 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11549 (x86_stopped_by_hw_breakpoint): New declarations.
11550 (x86_nat_target): New template class.
11551
11552 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11553 (the_ppc_linux_nat_target): New.
11554 (ppc_linux_fetch_inferior_registers)
11555 (ppc_linux_can_use_hw_breakpoint)
11556 (ppc_linux_region_ok_for_hw_watchpoint)
11557 (ppc_linux_ranged_break_num_registers)
11558 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11559 (ppc_linux_insert_mask_watchpoint)
11560 (ppc_linux_remove_mask_watchpoint)
11561 (ppc_linux_can_accel_watchpoint_condition)
11562 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11563 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11564 (ppc_linux_watchpoint_addr_within_range)
11565 (ppc_linux_masked_watch_num_registers)
11566 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11567 (ppc_linux_read_description): Refactor as methods of
11568 ppc_linux_nat_target.
11569 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
11570
11571 * procfs.c (procfs_xfer_partial): Delete forward declaration.
11572 (procfs_target): New class.
11573 (the_procfs_target): New.
11574 (procfs_target): Delete function.
11575 (procfs_auxv_parse, procfs_attach, procfs_detach)
11576 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11577 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11578 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11579 (procfs_create_inferior, procfs_update_thread_list)
11580 (procfs_thread_alive, procfs_pid_to_str)
11581 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11582 (procfs_stopped_data_address, procfs_insert_watchpoint)
11583 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11584 (proc_find_memory_regions, procfs_info_proc)
11585 (procfs_make_note_section): Refactor as methods of procfs_target.
11586 (_initialize_procfs): Adjust.
11587 * sol-thread.c (sol_thread_target): New class.
11588 (sol_thread_ops): Now a sol_thread_target.
11589 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11590 (sol_thread_fetch_registers, sol_thread_store_registers)
11591 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11592 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11593 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11594 (init_sol_thread_ops): Delete.
11595 (_initialize_sol_thread): Adjust. Remove references to
11596 init_sol_thread_ops and complete_target_initialization.
11597
11598 * windows-nat.c (windows_nat_target): New class.
11599 (windows_fetch_inferior_registers)
11600 (windows_store_inferior_registers, windows_resume, windows_wait)
11601 (windows_attach, windows_detach, windows_pid_to_exec_file)
11602 (windows_files_info, windows_create_inferior)
11603 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11604 (windows_close, windows_pid_to_str, windows_xfer_partial)
11605 (windows_get_tib_address, windows_get_ada_task_ptid)
11606 (windows_thread_name, windows_thread_alive): Refactor as
11607 windows_nat_target methods.
11608 (do_initial_windows_stuff): Adjust.
11609 (windows_target): Delete function.
11610 (_initialize_windows_nat): Adjust.
11611
11612 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11613 (darwin_mourn_inferior, darwin_kill_inferior)
11614 (darwin_create_inferior, darwin_attach, darwin_detach)
11615 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11616 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11617 (darwin_supports_multi_process): Refactor as darwin_nat_target
11618 methods.
11619 (darwin_resume_to, darwin_files_info): Delete.
11620 (_initialize_darwin_inferior): Rename to ...
11621 (_initialize_darwin_nat): ... this. Adjust to C++ification.
11622 * darwin-nat.h: Include "inf-child.h".
11623 (darwin_nat_target): New class.
11624 (darwin_complete_target): Delete.
11625 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11626 (darwin_target): New.
11627 (i386_darwin_fetch_inferior_registers)
11628 (i386_darwin_store_inferior_registers): Refactor as methods of
11629 darwin_nat_target.
11630 (darwin_complete_target): Delete, with ...
11631 (_initialize_i386_darwin_nat): ... bits factored out here.
11632
11633 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11634 (the_alpha_linux_nat_target): New.
11635 (alpha_linux_register_u_offset): Refactor as
11636 alpha_linux_nat_target method.
11637 (_initialize_alpha_linux_nat): Adjust.
11638 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11639 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11640 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11641 methods of linux_nat_trad_target.
11642 (linux_trad_target): Delete.
11643 * linux-nat-trad.h (linux_trad_target): Delete function.
11644 (linux_nat_trad_target): New class.
11645 * mips-linux-nat.c (mips_linux_nat_target): New class.
11646 (super_fetch_registers, super_store_registers, super_close):
11647 Delete.
11648 (the_mips_linux_nat_target): New.
11649 (mips64_linux_regsets_fetch_registers)
11650 (mips64_linux_regsets_store_registers)
11651 (mips64_linux_fetch_registers, mips64_linux_store_registers)
11652 (mips_linux_register_u_offset, mips_linux_read_description)
11653 (mips_linux_can_use_hw_breakpoint)
11654 (mips_linux_stopped_by_watchpoint)
11655 (mips_linux_stopped_data_address)
11656 (mips_linux_region_ok_for_hw_watchpoint)
11657 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11658 (mips_linux_close): Refactor as methods of mips_linux_nat.
11659 (_initialize_mips_linux_nat): Adjust to C++ification.
11660
11661 * aix-thread.c (aix_thread_target): New class.
11662 (aix_thread_ops): Now an aix_thread_target.
11663 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11664 (aix_thread_fetch_registers, aix_thread_store_registers)
11665 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11666 (aix_thread_thread_alive, aix_thread_pid_to_str)
11667 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11668 Refactor as methods of aix_thread_target.
11669 (init_aix_thread_ops): Delete.
11670 (_initialize_aix_thread): Remove references to init_aix_thread_ops
11671 and complete_target_initialization.
11672 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11673 (rs6000_nat_target): New class.
11674 (the_rs6000_nat_target): New.
11675 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11676 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11677 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11678 (super_create_inferior): Delete.
11679 (_initialize_rs6000_nat): Adjust to C++ification.
11680
11681 * arm-linux-nat.c (arm_linux_nat_target): New class.
11682 (the_arm_linux_nat_target): New.
11683 (arm_linux_fetch_inferior_registers)
11684 (arm_linux_store_inferior_registers, arm_linux_read_description)
11685 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11686 (arm_linux_remove_hw_breakpoint)
11687 (arm_linux_region_ok_for_hw_watchpoint)
11688 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11689 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11690 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11691 arm_linux_nat_target.
11692 (_initialize_arm_linux_nat): Adjust to C++ification.
11693
11694 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11695 (the_aarch64_linux_nat_target): New.
11696 (aarch64_linux_fetch_inferior_registers)
11697 (aarch64_linux_store_inferior_registers)
11698 (aarch64_linux_child_post_startup_inferior)
11699 (aarch64_linux_read_description)
11700 (aarch64_linux_can_use_hw_breakpoint)
11701 (aarch64_linux_insert_hw_breakpoint)
11702 (aarch64_linux_remove_hw_breakpoint)
11703 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11704 (aarch64_linux_region_ok_for_hw_watchpoint)
11705 (aarch64_linux_stopped_data_address)
11706 (aarch64_linux_stopped_by_watchpoint)
11707 (aarch64_linux_watchpoint_addr_within_range)
11708 (aarch64_linux_can_do_single_step): Refactor as methods of
11709 aarch64_linux_nat_target.
11710 (super_post_startup_inferior): Delete.
11711 (_initialize_aarch64_linux_nat): Adjust to C++ification.
11712
11713 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11714 (the_hppa_linux_nat_target): New.
11715 (hppa_linux_fetch_inferior_registers)
11716 (hppa_linux_store_inferior_registers): Refactor as methods of
11717 hppa_linux_nat_target.
11718 (_initialize_hppa_linux_nat): Adjust to C++ification.
11719
11720 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11721 (the_ia64_linux_nat_target): New.
11722 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11723 (ia64_linux_stopped_data_address)
11724 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11725 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11726 ia64_linux_nat_target methods.
11727 (super_xfer_partial): Delete.
11728 (_initialize_ia64_linux_nat): Adjust to C++ification.
11729
11730 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11731 (the_m32r_linux_nat_target): New.
11732 (m32r_linux_fetch_inferior_registers)
11733 (m32r_linux_store_inferior_registers): Refactor as
11734 m32r_linux_nat_target methods.
11735 (_initialize_m32r_linux_nat): Adjust to C++ification.
11736
11737 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11738 (the_m68k_linux_nat_target): New.
11739 (m68k_linux_fetch_inferior_registers)
11740 (m68k_linux_store_inferior_registers): Refactor as
11741 m68k_linux_nat_target methods.
11742 (_initialize_m68k_linux_nat): Adjust to C++ification.
11743
11744 * s390-linux-nat.c (s390_linux_nat_target): New class.
11745 (the_s390_linux_nat_target): New.
11746 (s390_linux_fetch_inferior_registers)
11747 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11748 (s390_insert_watchpoint, s390_remove_watchpoint)
11749 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11750 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11751 (s390_auxv_parse, s390_read_description): Refactor as methods of
11752 s390_linux_nat_target.
11753 (_initialize_s390_nat): Adjust to C++ification.
11754
11755 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11756 (the_sparc_linux_nat_target): New.
11757 (_initialize_sparc_linux_nat): Adjust to C++ification.
11758 * sparc-nat.c (sparc_fetch_inferior_registers)
11759 (sparc_store_inferior_registers): Remove target_ops parameter.
11760 * sparc-nat.h (sparc_fetch_inferior_registers)
11761 (sparc_store_inferior_registers): Remove target_ops parameter.
11762 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11763 (the_sparc64_linux_nat_target): New.
11764 (_initialize_sparc64_linux_nat): Adjust to C++ification.
11765
11766 * spu-linux-nat.c (spu_linux_nat_target): New class.
11767 (the_spu_linux_nat_target): New.
11768 (spu_child_post_startup_inferior, spu_child_post_attach)
11769 (spu_child_wait, spu_fetch_inferior_registers)
11770 (spu_store_inferior_registers, spu_xfer_partial)
11771 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11772 methods.
11773 (_initialize_spu_nat): Adjust to C++ification.
11774
11775 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11776 (the_tilegx_linux_nat_target): New.
11777 (fetch_inferior_registers, store_inferior_registers):
11778 Refactor as methods.
11779 (_initialize_tile_linux_nat): Adjust to C++ification.
11780
11781 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11782 (the_xtensa_linux_nat_target): New.
11783 (xtensa_linux_fetch_inferior_registers)
11784 (xtensa_linux_store_inferior_registers): Refactor as
11785 xtensa_linux_nat_target methods.
11786 (_initialize_xtensa_linux_nat): Adjust to C++ification.
11787
11788 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11789 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11790 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11791 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11792 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11793 (fbsd_stopped_by_sw_breakpoint)
11794 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11795 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11796 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11797 (fbsd_post_startup_inferior, fbsd_post_attach)
11798 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11799 (fbsd_set_syscall_catchpoint)
11800 (super_xfer_partial, super_resume, super_wait)
11801 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11802 (fbsd_handle_debug_trap): Remove target_ops parameter.
11803 (fbsd_nat_add_target): Delete.
11804 * fbsd-nat.h: Include "inf-ptrace.h".
11805 (fbsd_nat_add_target): Delete.
11806 (USE_SIGTRAP_SIGINFO): Define.
11807 (fbsd_nat_target): New class.
11808
11809 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11810 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11811 (amd64bsd_target): Delete.
11812 * amd64-bsd-nat.h: New file.
11813 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11814 "x86-bsd-nat.h".
11815 (amd64_fbsd_nat_target): New class.
11816 (the_amd64_fbsd_nat_target): New.
11817 (amd64fbsd_read_description): Refactor as method of
11818 amd64_fbsd_nat_target.
11819 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11820 (_initialize_amd64fbsd_nat): Adjust to C++ification.
11821 * amd64-nat.h (amd64bsd_target): Delete function declaration.
11822 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11823 (i386bsd_store_inferior_registers): Remove target_ops parameter.
11824 (i386bsd_target): Delete.
11825 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11826 (i386bsd_fetch_inferior_registers)
11827 (i386bsd_store_inferior_registers): Declare.
11828 (i386_bsd_nat_target): New class.
11829 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11830 (the_i386_fbsd_nat_target): New.
11831 (i386fbsd_resume, i386fbsd_read_description): Refactor as
11832 i386_fbsd_nat_target methods.
11833 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11834 (_initialize_i386fbsd_nat): Adjust to C++ification.
11835 * x86-bsd-nat.c (super_mourn_inferior): Delete.
11836 (x86bsd_mourn_inferior, x86bsd_target): Delete.
11837 (_initialize_x86_bsd_nat): Adjust to C++ification.
11838 * x86-bsd-nat.h: Include "x86-nat.h".
11839 (x86bsd_target): Delete declaration.
11840 (x86bsd_nat_target): New class.
11841
11842 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11843 (the_aarch64_fbsd_nat_target): New.
11844 (aarch64_fbsd_fetch_inferior_registers)
11845 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11846 aarch64_fbsd_nat_target.
11847 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11848 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11849 (the_alpha_bsd_nat_target): New.
11850 (alphabsd_fetch_inferior_registers)
11851 (alphabsd_store_inferior_registers): Refactor as
11852 alpha_bsd_nat_target methods.
11853 (_initialize_alphabsd_nat): Refactor as methods of
11854 alpha_bsd_nat_target.
11855 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11856 (the_amd64_nbsd_nat_target): New.
11857 (_initialize_amd64nbsd_nat): Adjust to C++ification.
11858 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11859 (the_amd64_obsd_nat_target): New.
11860 (_initialize_amd64obsd_nat): Adjust to C++ification.
11861 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11862 (the_arm_fbsd_nat_target): New.
11863 (arm_fbsd_fetch_inferior_registers)
11864 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11865 (_initialize_arm_fbsd_nat): Refactor as methods of
11866 arm_fbsd_nat_target.
11867 (_initialize_arm_fbsd_nat): Adjust to C++ification.
11868 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11869 (the_arm_netbsd_nat_target): New.
11870 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11871 arm_netbsd_nat_target.
11872 (_initialize_arm_netbsd_nat): Adjust to C++ification.
11873 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11874 (the_hppa_nbsd_nat_target): New.
11875 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11876 hppa_nbsd_nat_target methods.
11877 (_initialize_hppanbsd_nat): Adjust to C++ification.
11878 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11879 (the_hppa_obsd_nat_target): New.
11880 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11881 methods of hppa_obsd_nat_target.
11882 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
11883 add_target.
11884 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11885 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
11886 add_target.
11887 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11888 (_initialize_i386obsd_nat): Use add_target.
11889 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11890 (the_m68k_bsd_nat_target): New.
11891 (m68kbsd_fetch_inferior_registers)
11892 (m68kbsd_store_inferior_registers): Refactor as methods of
11893 m68k_bsd_nat_target.
11894 (_initialize_m68kbsd_nat): Adjust to C++ification.
11895 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11896 (the_mips_fbsd_nat_target): New.
11897 (mips_fbsd_fetch_inferior_registers)
11898 (mips_fbsd_store_inferior_registers): Refactor as methods of
11899 mips_fbsd_nat_target.
11900 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
11901 add_target.
11902 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11903 (the_mips_nbsd_nat_target): New.
11904 (mipsnbsd_fetch_inferior_registers)
11905 (mipsnbsd_store_inferior_registers): Refactor as methods of
11906 mips_nbsd_nat_target.
11907 (_initialize_mipsnbsd_nat): Adjust to C++ification.
11908 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11909 (the_mips64_obsd_nat_target): New.
11910 (mips64obsd_fetch_inferior_registers)
11911 (mips64obsd_store_inferior_registers): Refactor as methods of
11912 mips64_obsd_nat_target.
11913 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
11914 add_target.
11915 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11916 nbsd_nat_target.
11917 * nbsd-nat.h: Include "inf-ptrace.h".
11918 (nbsd_nat_target): New class.
11919 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11920 (obsd_wait): Refactor as methods of obsd_nat_target.
11921 (obsd_add_target): Delete.
11922 * obsd-nat.h: Include "inf-ptrace.h".
11923 (obsd_nat_target): New class.
11924 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11925 (the_ppc_fbsd_nat_target): New.
11926 (ppcfbsd_fetch_inferior_registers)
11927 (ppcfbsd_store_inferior_registers): Refactor as methods of
11928 ppc_fbsd_nat_target.
11929 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
11930 add_target.
11931 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11932 (the_ppc_nbsd_nat_target): New.
11933 (ppcnbsd_fetch_inferior_registers)
11934 (ppcnbsd_store_inferior_registers): Refactor as methods of
11935 ppc_nbsd_nat_target.
11936 (_initialize_ppcnbsd_nat): Adjust to C++ification.
11937 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11938 (the_ppc_obsd_nat_target): New.
11939 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11940 methods of ppc_obsd_nat_target.
11941 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
11942 add_target.
11943 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11944 (the_sh_nbsd_nat_target): New.
11945 (shnbsd_fetch_inferior_registers)
11946 (shnbsd_store_inferior_registers): Refactor as methods of
11947 sh_nbsd_nat_target.
11948 (_initialize_shnbsd_nat): Adjust to C++ification.
11949 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11950 (inf_ptrace_xfer_partial): Delete.
11951 (sparc_xfer_partial, sparc_target): Delete.
11952 * sparc-nat.h (sparc_fetch_inferior_registers)
11953 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11954 (sparc_target): Delete function declaration.
11955 (sparc_target): New template class.
11956 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11957 (_initialize_sparcnbsd_nat): Adjust to C++ification.
11958 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11959 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
11960 add_target.
11961 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11962 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11963 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11964 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
11965 add_target.
11966 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11967 (the_vax_bsd_nat_target): New.
11968 (vaxbsd_fetch_inferior_registers)
11969 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11970 methods.
11971 (_initialize_vaxbsd_nat): Adjust to C++ification.
11972
11973 * bsd-kvm.c (bsd_kvm_target): New class.
11974 (bsd_kvm_ops): Now a bsd_kvm_target.
11975 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11976 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11977 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11978 bsd_kvm_target.
11979 (bsd_kvm_return_one): Delete.
11980 (bsd_kvm_add_target): Adjust to C++ification.
11981
11982 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11983 (nto_procfs_target_procfs): New classes.
11984 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11985 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11986 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11987 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11988 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11989 (procfs_remove_hw_breakpoint, procfs_resume)
11990 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11991 (procfs_kill_inferior, procfs_store_registers)
11992 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11993 as methods of nto_procfs_target.
11994 (nto_procfs_ops): Now an nto_procfs_target_procfs.
11995 (nto_native_ops): Delete.
11996 (procfs_open, procfs_native_open): Delete.
11997 (nto_native_ops): Now an nto_procfs_target_native.
11998 (init_procfs_targets): Adjust to C++ification.
11999 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
12000 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
12001 Refactor as methods of nto_procfs_target.
12002
12003 * go32-nat.c (go32_nat_target): New class.
12004 (the_go32_nat_target): New.
12005 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
12006 (go32_store_registers, go32_xfer_partial, go32_files_info)
12007 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
12008 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
12009 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
12010 (go32_pid_to_str): Refactor as methods of go32_nat_target.
12011 (go32_target): Delete.
12012 (_initialize_go32_nat): Adjust to C++ification.
12013
12014 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
12015 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
12016 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
12017 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
12018 gnu_nat_target.
12019 (gnu_target): Delete.
12020 * gnu-nat.h (gnu_target): Delete.
12021 (gnu_nat_target): New class.
12022 * i386-gnu-nat.c (gnu_base_target): New.
12023 (i386_gnu_nat_target): New class.
12024 (the_i386_gnu_nat_target): New.
12025 (_initialize_i386gnu_nat): Adjust to C++ification.
12026
12027 2018-05-02 Pedro Alves <palves@redhat.com>
12028
12029 * bfd-target.c (target_bfd_xclose): Rename to ...
12030 (target_bfd_close): ... this.
12031 (target_bfd_reopen): Adjust.
12032 * target.c (target_close): Remove references to to_xclose.
12033 * target.h (target_ops::to_xclose): Delete.
12034 (target_ops::to_close): Update comments.
12035
12036 2018-05-02 Pedro Alves <palves@redhat.com>
12037
12038 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
12039 "linux-nat.h".
12040 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
12041 * inf-ptrace.c (inf_ptrace_register_u_offset)
12042 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
12043 (inf_ptrace_store_register, inf_ptrace_store_registers)
12044 (inf_ptrace_trad_target): Move to ...
12045 * linux-nat-trad.c: ... this new file.
12046 * linux-nat-trad.h: New file.
12047 * linux-nat.c (linux_target_install_ops): Make extern.
12048 (linux_trad_target): Delete.
12049 * linux-nat.h (linux_trad_target): Delete declaration.
12050 (linux_target_install_ops): Declare.
12051 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
12052 "linux-nat.h".
12053
12054 2018-05-02 Pedro Alves <palves@redhat.com>
12055
12056 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12057 procfs_target/add_target here.
12058 * procfs.c (procfs_target): Make static.
12059 (_initialize_procfs): Call add_target here.
12060 * procfs.h (struct target_ops): Remove forward declaration.
12061 (procfs_target): Remove declaration.
12062 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
12063
12064 2018-05-02 Pedro Alves <palves@redhat.com>
12065
12066 * procfs.c (procfs_stopped_by_watchpoint)
12067 (procfs_insert_watchpoint, procfs_remove_watchpoint)
12068 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
12069 Forward declare.
12070 (procfs_use_watchpoints): Delete, move contents...
12071 (procfs_target): ... here.
12072 * procfs.h (procfs_use_watchpoints): Delete declaration.
12073 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12074 procfs_use_watchpoints.
12075 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
12076 procfs_use_watchpoints.
12077
12078 2018-05-02 Tom Tromey <tom@tromey.com>
12079
12080 PR python/20084:
12081 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
12082 and var_zuinteger_unlimited.
12083 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
12084 and PARAM_ZUINTEGER_UNLIMITED.
12085 (set_parameter_value): Handle var_zuinteger and
12086 var_zuinteger_unlimited.
12087 (add_setshow_generic): Likewise.
12088 (parmpy_init): Likewise.
12089
12090 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
12091
12092 PR rust/23124
12093 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
12094 pointer is not null before dereferencing it.
12095
12096 2018-04-30 Tom Tromey <tom@tromey.com>
12097
12098 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
12099 is_mi_like_p.
12100
12101 2018-04-30 Tom Tromey <tom@tromey.com>
12102
12103 * breakpoint.c (mention): Remove use of is_mi_like_p.
12104 (print_mention_ranged_breakpoint): Likewise.
12105 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12106 of is_mi_like_p.
12107
12108 2018-04-30 Tom Tromey <tom@tromey.com>
12109
12110 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12111
12112 2018-04-30 Tom Tromey <tom@tromey.com>
12113
12114 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12115 (info_spu_event_command): Remove some uses of is_mi_like_p.
12116
12117 2018-04-30 Tom Tromey <tom@tromey.com>
12118
12119 * python/py-framefilter.c (py_print_single_arg)
12120 (enumerate_locals, py_print_args, py_print_frame): Remove some
12121 uses of is_mi_like_p.
12122
12123 2018-04-30 Tom Tromey <tom@tromey.com>
12124
12125 * ui-out.c: Update.
12126 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12127 * ui-out.h (ui_out::is_mi_like_p): Now const.
12128 (ui_out::do_is_mi_like_p): Now const.
12129 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12130
12131 2018-04-30 Tom Tromey <tom@tromey.com>
12132
12133 * varobj.c (varobj_set_visualizer): Use new_reference.
12134 * python/python.c (gdbpy_decode_line): Use new_reference.
12135 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12136 new_reference.
12137
12138 2018-04-30 Tom Tromey <tom@tromey.com>
12139
12140 * varobj.c (install_new_value): Use new_reference.
12141 * value.h (value_incref): Return void. Swap intro comment with
12142 value_decref.
12143 * value.c (set_value_parent): Use new_reference.
12144 (value_incref): Return void. Update intro comment.
12145 (release_value): Use new_reference.
12146 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12147
12148 2018-04-30 Tom Tromey <tom@tromey.com>
12149
12150 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12151 * gdb_bfd.h (new_bfd_ref): Remove.
12152 (gdb_bfd_open): Update comment.
12153 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12154 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12155 (gdb_bfd_fdopenr): Use new_reference.
12156 * exec.c (exec_file_attach): Use new_reference.
12157
12158 2018-04-30 Tom Tromey <tom@tromey.com>
12159
12160 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12161 method.
12162
12163 2018-04-30 Tom Tromey <tom@tromey.com>
12164
12165 * jit.c (jit_read_code_entry): Use type_align.
12166 * i386-tdep.c (i386_gdbarch_init): Don't call
12167 set_gdbarch_long_long_align_bit.
12168 * gdbarch.sh: Remove long_long_align_bit.
12169 * gdbarch.c, gdbarch.h: Rebuild.
12170 * arc-tdep.c (arc_type_align): New function.
12171 (arc_gdbarch_init): Use arc_type_align. Don't call
12172 set_gdbarch_long_long_align_bit.
12173
12174 2018-04-30 Tom Tromey <tom@tromey.com>
12175
12176 * rust-lang.c (rust_type_alignment): Remove.
12177 (rust_composite_type): Use type_align.
12178
12179 2018-04-30 Tom Tromey <tom@tromey.com>
12180
12181 * NEWS: Mention Type.align.
12182 * python/py-type.c (typy_get_alignof): New function.
12183 (type_object_getset): Add "alignof".
12184
12185 2018-04-30 Tom Tromey <tom@tromey.com>
12186
12187 PR exp/17095:
12188 * NEWS: Update.
12189 * std-operator.def (UNOP_ALIGNOF): New operator.
12190 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12191 New.
12192 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12193 * c-lang.c (c_op_print_tab): Add alignof.
12194 * c-exp.y (ALIGNOF): New token.
12195 (exp): Add "ALIGNOF" production.
12196 (ident_tokens): Add _Alignof and alignof.
12197
12198 2018-04-30 Tom Tromey <tom@tromey.com>
12199
12200 * i386-tdep.c (i386_type_align): New function.
12201 (i386_gdbarch_init): Update.
12202 * gdbarch.sh (type_align): New method.
12203 * gdbarch.c, gdbarch.h: Rebuild.
12204 * arch-utils.h (default_type_align): Declare.
12205 * arch-utils.c (default_type_align): New function.
12206 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12207 (struct type) <align_log2>: New field.
12208 <instance_flags>: Now a bitfield.
12209 (TYPE_RAW_ALIGN): New macro.
12210 (type_align, type_raw_align, set_type_align): Declare.
12211 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12212 functions.
12213 * dwarf2read.c (quirk_rust_enum): Set type alignment.
12214 (get_alignment, maybe_set_alignment): New functions.
12215 (read_structure_type, read_enumeration_type, read_array_type)
12216 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12217 (read_subrange_type, read_base_type): Set type alignment.
12218
12219 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
12220
12221 * dwarf2read.c (read_index_from_section): Use bool.
12222
12223 2018-04-29 Fabian Groffen <grobian@gentoo.org>
12224
12225 PR gdb/22950
12226 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12227 with #ifdef.
12228
12229 2018-04-29 John Reiser <jreiser@BitWagon.com>
12230
12231 PR build/22873
12232 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12233 last step, and do it atomically.
12234
12235 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
12236
12237 * compile/compile-c-types.c (convert_int, convert_float):
12238 Update for C FE v1.
12239
12240 2018-04-27 Tom Tromey <tom@tromey.com>
12241
12242 PR rust/22545:
12243 * rust-lang.c (rust_inclusive_range_type_p): New function.
12244 (rust_range): Handle inclusive ranges.
12245 (rust_compute_range): Likewise.
12246 * rust-exp.y (struct rust_op) <inclusive>: New field.
12247 (DOTDOTEQ): New constant.
12248 (range_expr): Add "..=" productions.
12249 (operator_tokens): Add "..=" token.
12250 (ast_range): Add "inclusive" parameter.
12251 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12252 ranges.
12253 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12254 bounds values.
12255 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12256 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12257 Update comments.
12258 * expprint.c (print_subexp_standard): Handle new bounds values.
12259 (dump_subexp_body_standard): Likewise.
12260
12261 2018-04-27 Tom Tromey <tom@tromey.com>
12262
12263 * configure: Rebuild.
12264 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12265 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12266 "OVERRIDE".
12267 (class symbol_needs_eval_context): Likewise.
12268 * dwarf2read.c (mock_mapped_index::symbol_name_count)
12269 (mock_mapped_index::symbol_name_at): Use "override". Remove
12270 "virtual".
12271 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12272 "override".
12273 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12274 * aarch64-tdep.c (instruction_reader::read): Use "override".
12275 (instruction_reader_test::read): Likewise.
12276 * arm-tdep.c (instruction_reader::read): Use "override".
12277 (instruction_reader_thumb::read): Likewise.
12278
12279 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
12280
12281 PR remote/9665
12282 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12283 instead of remote_send.
12284 (remote_send): Remove.
12285
12286 2018-04-26 Pedro Alves <palves@redhat.com>
12287
12288 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12289 find_function_start_sal instead of find_pc_line.
12290
12291 2018-04-26 Pedro Alves <palves@redhat.com>
12292
12293 * breakpoint.c (set_breakpoint_location_function): Handle
12294 mst_data_gnu_ifunc.
12295 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12296 * elfread.c (elf_symtab_read): Give data symbols with
12297 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12298 (elf_rel_plt_read): Update comment.
12299 * linespec.c (convert_linespec_to_sals): Handle
12300 mst_data_gnu_ifunc.
12301 (minsym_found): Handle mst_data_gnu_ifunc.
12302 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12303 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12304 * parse.c (find_minsym_type_and_address): Handle
12305 mst_data_gnu_ifunc.
12306 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12307 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12308 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12309 comment.
12310 <mst_data_gnu_ifunc>: New enumerator.
12311
12312 2018-04-26 Pedro Alves <palves@redhat.com>
12313
12314 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12315 (lookup_minimal_symbol_by_pc_section): ... this. Replace
12316 'want_trampoline' parameter by a lookup_msym_prefer parameter.
12317 Handle it.
12318 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12319 (lookup_minimal_symbol_by_pc): Adjust.
12320 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12321 (lookup_solib_trampoline_symbol_by_pc): Adjust.
12322 * minsyms.h (lookup_msym_prefer): New enum.
12323 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12324 parameter by a lookup_msym_prefer parameter.
12325
12326 2018-04-26 Pedro Alves <palves@redhat.com>
12327
12328 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12329 ends in "@plt" instead of looking at the symbol's section.
12330
12331 2018-04-26 Pedro Alves <palves@redhat.com>
12332
12333 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
12334 all references.
12335 (find_pc_partial_function_gnu_ifunc): Rename to ...
12336 (find_pc_partial_function): ... this, and remove references to
12337 'is_gnu_ifunc_p'.
12338 (find_pc_partial_function): Delete old implementation.
12339 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12340
12341 2018-04-26 Pedro Alves <palves@redhat.com>
12342
12343 * linespec.c (struct bound_minimal_symbol_search_key): New.
12344 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
12345 skip first line if we found a GNU ifunc minimal symbol by name.
12346 (compare_msymbols): Change parameters to work with a destructured
12347 lhs minsym.
12348 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12349 functions.
12350
12351 2018-04-26 Pedro Alves <palves@redhat.com>
12352
12353 * breakpoint.c (set_breakpoint_location_function): Don't resolve
12354 ifunc targets here. Instead, if we have an ifunc minsym, use its
12355 address/name.
12356 (add_location_to_breakpoint): Store the minsym and the objfile in
12357 the breakpoint location.
12358 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12359 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12360 Record the minsym in the sal.
12361 * symtab.h (symtab_and_line) <msymbol>: New field.
12362
12363 2018-04-26 Pedro Alves <palves@redhat.com>
12364
12365 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12366 unless we actually resolved the ifunc.
12367
12368 2018-04-26 Pedro Alves <palves@redhat.com>
12369
12370 * c-exp.y (variable production): Prefer ifunc minsyms over
12371 regular function symbols.
12372 * symtab.c (find_gnu_ifunc): New function.
12373 * minsyms.h (lookup_msym_prefer): New enum.
12374 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12375 parameter by a lookup_msym_prefer parameter.
12376 * symtab.h (find_gnu_ifunc): New declaration.
12377
12378 2018-04-26 Pedro Alves <palves@redhat.com>
12379
12380 * blockframe.c (find_gnu_ifunc_target_type): New function.
12381 (find_function_type): New.
12382 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12383 return a value with a memory address.
12384 (eval_call): For calls to GNU ifunc functions, try to find the
12385 type of the target function from the type that the resolver
12386 returns.
12387 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12388 symbols.
12389 * infcall.c (find_function_return_type): Delete.
12390 (find_function_addr): Add 'function_type' parameter. For calls to
12391 GNU ifunc functions, try to find the type of the target function
12392 from the type that the resolver returns, and return it via
12393 FUNCTION_TYPE.
12394 (call_function_by_hand_dummy): Adjust to use the function type
12395 returned by find_function_addr.
12396 (find_function_addr): Add 'function_type' parameter and move
12397 description here.
12398 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12399 declarations.
12400
12401 2018-04-26 Pedro Alves <palves@redhat.com>
12402
12403 * c-exp.y (variable production): Skip finding an alias for ifunc
12404 symbols.
12405
12406 2018-04-26 Pedro Alves <palves@redhat.com>
12407
12408 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12409
12410 2018-04-25 Pedro Alves <palves@redhat.com>
12411
12412 * infcmd.c (kill_command): Print the pid as string, not the whole
12413 thread's ptid. Add comment. s/has been killed/killed/ in output
12414 message.
12415 * remote.c (remote_detach_1): Print the pid as string, not the
12416 whole thread's ptid.
12417
12418 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12419 Sergio Durigan Junior <sergiodj@redhat.com>
12420 Pedro Alves <palves@redhat.com>
12421
12422 * infcmd.c (kill_command): Print message when inferior has
12423 been killed.
12424 * inferior.c (print_inferior_events): Remove 'static'. Set as
12425 '1'.
12426 (add_inferior): Improve message printed when
12427 'print_inferior_events' is on.
12428 (exit_inferior): Remove message printed when
12429 'print_inferior_events' is on.
12430 (detach_inferior): Improve message printed when
12431 'print_inferior_events' is on.
12432 (initialize_inferiors): Use 'add_inferior_silent' to set
12433 'current_inferior_'.
12434 * inferior.h (print_inferior_events): Declare here as
12435 'extern'.
12436 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12437 '[Detaching...]' messages when 'print_inferior_events' is on.
12438 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
12439 as prefix/suffix for messages. Remove periods. Fix erroneous
12440 'Detaching after fork from child...', replace it by '... from
12441 parent...'.
12442 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12443 prefix/suffix when printing 'Detaching...' messages. Print
12444 them when 'print_inferior_events' is on.
12445 * remote.c (remote_detach_1): Print message when detaching
12446 from inferior and '!is_fork_parent'.
12447
12448 2018-04-24 Tom Tromey <tom@tromey.com>
12449
12450 * cli-out.h: Reindent.
12451
12452 2018-04-24 Tom Tromey <tom@tromey.com>
12453
12454 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12455 (cli_ui_out::do_field_string): Use fputs_filtered.
12456 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12457
12458 2018-04-23 Tom Tromey <tom@tromey.com>
12459
12460 * guile/scm-frame.c (gdbscm_frame_read_var): Use
12461 gdb::unique_xmalloc_ptr.
12462
12463 2018-04-23 Tom Tromey <tom@tromey.com>
12464
12465 * configure: Rebuild.
12466
12467 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
12468
12469 PR gdb/23095
12470 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12471 prepare_for_testing. Set normal_bp to r_debug_state if target
12472 is bsd.
12473
12474 2018-04-21 Pedro Alves <palves@redhat.com>
12475 Rajendra SY <rajendra.sy@gmail.com>
12476
12477 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12478 * remote.c (extended_remote_attach): In all-stop mode, mark the
12479 thread as executing.
12480
12481 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
12482
12483 * thread.c (thread_apply_all_command): Fix comment.
12484 (thread_command): Fix comment.
12485
12486 2018-04-10 Alan Hayward <alan.hayward@arm.com>
12487
12488 * common/tdesc.h (tdesc_create_feature): Remove xml filename
12489 parameter.
12490 * features/aarch64-core.c (create_feature_aarch64_core):
12491 Regenerate.
12492 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12493 Likewise.
12494 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12495 Likewise.
12496 * features/i386/32bit-avx512.c
12497 (create_feature_i386_32bit_avx512): Likewise.
12498 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12499 Likewise.
12500 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12501 Likewise.
12502 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12503 Likewise.
12504 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12505 Likewise.
12506 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12507 Likewise.
12508 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12509 Likewise.
12510 * features/i386/64bit-avx512.c
12511 (create_feature_i386_64bit_avx512): Likewise.
12512 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12513 Likewise.
12514 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12515 Likewise.
12516 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12517 Likewise.
12518 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12519 Likewise.
12520 * features/i386/64bit-segments.c
12521 (create_feature_i386_64bit_segments): Likewise.
12522 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12523 Likewise.
12524 * features/i386/x32-core.c
12525 (create_feature_i386_x32_core): Likewise.
12526 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12527 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12528 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12529 * target-descriptions.c: In generated code, don't pass xml
12530 filename.
12531
12532 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12533
12534 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12535 (print_xml_feature::visit_post): Likewise.
12536 (print_xml_feature::visit): Likewise.
12537 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12538 (print_xml_feature): Add new class.
12539 * regformats/regdat.sh: Null xmltarget on feature targets.
12540 * target-descriptions.c (struct target_desc): Add xmltarget.
12541 (maintenance_check_tdesc_xml_convert): Add unittest function.
12542 (tdesc_get_features_xml): Add function to get xml.
12543 (maintenance_check_xml_descriptions): Test xml generation.
12544 * xml-tdesc.c (string_read_description_xml): Add function.
12545 * xml-tdesc.h (string_read_description_xml): Add declaration.
12546
12547 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12548
12549 * features/Makefile: Add feature marker to targets with new style
12550 target descriptions.
12551 * regformats/aarch64.dat: Regenerate.
12552 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12553 * regformats/i386/amd64-avx-linux.dat: Likewise.
12554 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12555 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12556 * regformats/i386/amd64-linux.dat: Likewise.
12557 * regformats/i386/amd64-mpx-linux.dat: Likewise.
12558 * regformats/i386/amd64.dat: Likewise.
12559 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12560 * regformats/i386/i386-avx-linux.dat: Likewise.
12561 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12562 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12563 * regformats/i386/i386-linux.dat: Likewise.
12564 * regformats/i386/i386-mmx-linux.dat: Likewise.
12565 * regformats/i386/i386-mpx-linux.dat: Likewise.
12566 * regformats/i386/i386.dat: Likewise.
12567 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12568 * regformats/i386/x32-avx-linux.dat: Likewise.
12569 * regformats/i386/x32-linux.dat: Likewise.
12570 * regformats/tic6x-c62x-linux.dat: Likewise.
12571 * regformats/tic6x-c64x-linux.dat: Likewise.
12572 * regformats/tic6x-c64xp-linux.dat: Likewise.
12573 * regformats/regdat.sh: Parse feature marker.
12574
12575 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12576
12577 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12578 (tdesc_osabi_name): Likewise.
12579 * target-descriptions.c (tdesc_architecture_name): Add new
12580 function.
12581 (tdesc_osabi_name): Likewise.
12582
12583 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12584
12585 * common/tdesc.c (tdesc_predefined_type): Move to here.
12586 (tdesc_named_type): Likewise.
12587 (tdesc_create_vector): Likewise.
12588 (tdesc_create_struct): Likewise.
12589 (tdesc_set_struct_size): Likewise.
12590 (tdesc_create_union): Likewise.
12591 (tdesc_create_flags): Likewise.
12592 (tdesc_create_enum): Likewise.
12593 (tdesc_add_field): Likewise.
12594 (tdesc_add_typed_bitfield): Likewise.
12595 (tdesc_add_bitfield): Likewise.
12596 (tdesc_add_flag): Likewise.
12597 (tdesc_add_enum_value): Likewise.
12598 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12599 (struct tdesc_type_vector): Likewise.
12600 (struct tdesc_type_field): Likewise.
12601 (struct tdesc_type_with_fields): Likewise.
12602 (tdesc_create_enum): Add declaration.
12603 (tdesc_add_typed_bitfield): Likewise.
12604 (tdesc_add_enum_value): Likewise.
12605 * target-descriptions.c (tdesc_type_field): Move from here.
12606 (tdesc_type_builtin): Likewise.
12607 (tdesc_type_vector): Likewise.
12608 (tdesc_type_with_fields): Likewise.
12609 (tdesc_predefined_types): Likewise.
12610 (tdesc_named_type): Likewise.
12611 (tdesc_create_vector): Likewise.
12612 (tdesc_create_struct): Likewise.
12613 (tdesc_set_struct_size): Likewise.
12614 (tdesc_create_union): Likewise.
12615 (tdesc_create_flags): Likewise.
12616 (tdesc_create_enum): Likewise.
12617 (tdesc_add_field): Likewise.
12618 (tdesc_add_typed_bitfield): Likewise.
12619 (tdesc_add_bitfield): Likewise.
12620 (tdesc_add_flag): Likewise.
12621 (tdesc_add_enum_value): Likewise.
12622 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12623 (tdesc_add_typed_bitfield): Likewise.
12624 (tdesc_add_enum_value): Likewise.
12625
12626 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12627
12628 * common/tdesc.c (tdesc_feature::accept): Move to here.
12629 (tdesc_feature::operator==): Likewise.
12630 (tdesc_create_reg): Likewise.
12631 * common/tdesc.h (tdesc_type_kind): Likewise.
12632 (struct tdesc_type): Likewise.
12633 (struct tdesc_feature): Likewise.
12634 * regformats/regdat.sh: Create a feature.
12635 * target-descriptions.c (tdesc_type_kind): Move from here.
12636 (tdesc_type): Likewise.
12637 (tdesc_type_up): Likewise.
12638 (tdesc_feature): Likewise.
12639 (tdesc_create_reg): Likewise.
12640
12641 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12642
12643 * Makefile.in: Add arch/tdesc.c
12644 * common/tdesc.c: New file.
12645 * common/tdesc.h (tdesc_element_visitor): Move to here.
12646 (tdesc_element): Likewise.
12647 (tdesc_reg): Likewise.
12648 (tdesc_reg_up): Likewise.
12649 * regformats/regdef.h (reg): Add offset to constructors.
12650 * target-descriptions.c (tdesc_element_visitor): Move from here.
12651 (tdesc_element): Likewise.
12652 (tdesc_reg): Likewise.
12653 (tdesc_reg_up): Likewise.
12654
12655 2018-04-17 Tom Tromey <tom@tromey.com>
12656
12657 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12658 discriminant field.
12659
12660 2018-04-17 Tom Tromey <tom@tromey.com>
12661
12662 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12663
12664 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
12665
12666 * symtab.c (print_symbol_info): Skip printing filename and line
12667 number when `last' is NULL.
12668 (symtab_symbol_info): Use empty string instead of NULL for first
12669 invocation of print_symbol_info.
12670 (rbreak_command): Pass NULL to `last' parameter of
12671 print_symbol_info.
12672
12673 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
12674
12675 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12676 instead of nullptr.
12677
12678 2018-04-16 Pedro Alves <palves@redhat.com>
12679
12680 * MAINTAINERS (sh): Remove.
12681 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12682 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12683 (ALLDEPFILES): Remove sh64-tdep.c.
12684 * NEWS: Mentions that support for SH-5/SH64 is removed.
12685 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12686 (sh*-*-openbsd*): Ditto.
12687 (sh64-*-elf*): Remove.
12688 (sh*): Remove.
12689 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12690 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12691 * sh-tdep.c: No longer include "sh64-tdep.h".
12692 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12693 * sh64-tdep.c, sh64-tdep.h: Remove files.
12694
12695 2018-04-16 Pedro Alves <palves@redhat.com>
12696
12697 * MAINTAINERS: Remove m88k.
12698 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12699 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12700 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12701 * NEWS: Mention that support for m88k was removed.
12702 * configure.host (m88*-*-*): Remove support.
12703 * configure.nat (m88k-*-*): Remove support.
12704 * configure.tgt (m88*-*-openbsd*): Remove.
12705 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12706
12707 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
12708
12709 * configure.tgt (x86_tobjs): New variable.
12710 (amd64_tobjs, i386_tobjs): Use it.
12711
12712 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12713
12714 * symtab.c (print_symbol_info): Precede the symbol definition by
12715 the line number when available.
12716 * NEWS: Advertise this enhancement.
12717
12718 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12719
12720 * NEWS (New options): announce set/show record btrace cpu.
12721 * btrace.c: Include record-btrace.h.
12722 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12723 the vendor is unknown.
12724 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
12725 Maybe overwrite the btrace configuration's cpu.
12726 (btrace_compute_ftrace): Add cpu parameter. Update callers.
12727 (btrace_fetch): Add cpu parameter. Update callers.
12728 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12729 Maybe overwrite the btrace configuration's cpu. Skip enabling
12730 errata workarounds if the vendor is unknown.
12731 * python/py-record-btrace.c: Include record-btrace.h.
12732 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12733 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12734 * record-btrace.c (record_btrace_cpu_state_kind): New.
12735 (record_btrace_cpu): New.
12736 (set_record_btrace_cpu_cmdlist): New.
12737 (record_btrace_get_cpu): New.
12738 (require_btrace_thread, record_btrace_info)
12739 (record_btrace_resume_thread): Call record_btrace_get_cpu.
12740 (cmd_set_record_btrace_cpu_none): New.
12741 (cmd_set_record_btrace_cpu_auto): New.
12742 (cmd_set_record_btrace_cpu): New.
12743 (cmd_show_record_btrace_cpu): New.
12744 (_initialize_record_btrace): Initialize set/show record btrace cpu
12745 commands.
12746 * record-btrace.h (record_btrace_get_cpu): New.
12747
12748 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12749
12750 * record.c (set_record_command): Fix typo in message.
12751
12752 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12753
12754 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12755
12756 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12757
12758 * infrun.c (process_event_stop_test): Call
12759 gdbarch_in_indirect_branch_thunk.
12760 * gdbarch.sh (in_indirect_branch_thunk): New.
12761 * gdbarch.c: Regenerated.
12762 * gdbarch.h: Regenerated.
12763 * x86-tdep.h: New.
12764 * x86-tdep.c: New.
12765 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12766 (HFILES_NO_SRCDIR): Add x86-tdep.h.
12767 (ALLDEPFILES): Add x86-tdep.c.
12768 * arch-utils.h (default_in_indirect_branch_thunk): New.
12769 * arch-utils.c (default_in_indirect_branch_thunk): New.
12770 * i386-tdep: Include x86-tdep.h.
12771 (i386_in_indirect_branch_thunk): New.
12772 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12773 function.
12774 * amd64-tdep: Include x86-tdep.h.
12775 (amd64_in_indirect_branch_thunk): New.
12776 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12777
12778 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
12779
12780 PR gdb/23053
12781 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12782 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12783 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12784 regression.
12785
12786 2018-04-12 Tom Tromey <tom@tromey.com>
12787
12788 * rust-lang.c (rust_print_struct_def): Remove univariant code.
12789 (rust_evaluate_subexp): Likewise.
12790
12791 2018-04-12 Pedro Alves <palves@redhat.com>
12792
12793 * procfs.c (procfs_detach): Make forward declaration's prototype
12794 match definition's protototype.
12795 (proc_get_LDT_entry): Remove stale do_cleanups call.
12796
12797 2018-04-12 Pedro Alves <palves@redhat.com>
12798
12799 * target.h (target_ops::to_has_exited): Delete.
12800 (target_has_exited): Delete.
12801 * target-delegates.c: Regenerate.
12802
12803 2018-04-11 Pedro Alves <palves@redhat.com>
12804
12805 * target.c (fileio_fh_t::t): Add comment.
12806 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12807 (target_fileio_close): Handle a NULL target.
12808 (invalidate_fileio_fh): New.
12809 (target_close): Call it.
12810 * remote.c (remote_hostio_send_command): No longer check whether
12811 remote_desc is open.
12812
12813 2018-04-11 Pedro Alves <palves@redhat.com>
12814
12815 * target.c (fileio_fh_t): Make it a named struct instead of a
12816 typedef.
12817 (fileio_fh_t::is_closed): New method.
12818 (DEF_VEC_O (fileio_fh_t)): Remove.
12819 (fileio_fhandles): Now a std::vector.
12820 (is_closed_fileio_fh): Delete.
12821 (acquire_fileio_fd): Adjust. Rename parameters.
12822 (release_fileio_fd): Adjust.
12823 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12824 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12825 (target_fileio_close): Adjust.
12826
12827 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
12828
12829 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12830 index.
12831
12832 2018-04-10 Pedro Alves <palves@redhat.com>
12833
12834 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12835 (scoped_finish_thread_state): New class.
12836 * infcmd.c (run_command_1): Use it instead of finish_thread_state
12837 cleanup.
12838 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12839 (fetch_inferior_event, normal_stop): Likewise.
12840 * thread.c (finish_thread_state_cleanup): Delete.
12841
12842 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12843 Pedro Alves <palves@redhat.com>
12844
12845 * value.c: Include "selftest.h" and "common/array-view.h".
12846 (struct range) <operator ==>: New.
12847 (test_ranges_contain): New.
12848 (check_ranges_vector): New.
12849 (test_insert_into_bit_range_vector): New.
12850 (_initialize_values): Register selftests.
12851 * common/array-view.h (operator==, operator!=): New.
12852
12853 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12854
12855 * common/gdb_vecs.h (unordered_remove): Add overload that takes
12856 an iterator.
12857 * inline-frame.c: Include <algorithm>.
12858 (struct inline_state): Add constructor.
12859 (inline_state_s): Remove.
12860 (DEF_VEC_O(inline_state_s)): Remove.
12861 (inline_states): Change type to std::vector.
12862 (find_inline_frame_state): Adjust to std::vector.
12863 (allocate_inline_frame_state): Remove.
12864 (clear_inline_frame_state): Adjust to std::vector.
12865 (skip_inline_frames): Adjust to std::vector.
12866
12867 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12868
12869 * tracepoint.h (struct trace_state_variable): Add constructor.
12870 <name>: Change type to std::string.
12871 * tracepoint.c (tsv_s): Remove.
12872 (DEF_VEC_O(tsv_s)): Remove.
12873 (tvariables): Change to std::vector.
12874 (create_trace_state_variable): Adjust to std::vector.
12875 (find_trace_state_variable): Likewise.
12876 (find_trace_state_variable_by_number): Likewise.
12877 (delete_trace_state_variable): Likewise.
12878 (trace_variable_command): Adjust to std::string.
12879 (delete_trace_variable_command): Likewise.
12880 (tvariables_info_1): Adjust to std::vector.
12881 (save_trace_state_variables): Likewise.
12882 (start_tracing): Likewise.
12883 (merge_uploaded_trace_state_variables): Adjust to std::vector
12884 and std::string.
12885 * target.h (struct target_ops)
12886 <to_download_trace_state_variable>: Pass reference to
12887 trace_state_variable.
12888 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12889 * target-delegates.c: Re-generate.
12890 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12891 (mi_tsv_deleted): Likewise.
12892 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12893 * remote.c (remote_download_trace_state_variable): Change
12894 pointer to reference and adjust.
12895 * make-target-delegates (parse_argtypes): Handle references.
12896 (write_function_header): Likewise.
12897 (munge_type): Likewise.
12898
12899 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12900
12901 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12902 string_view-selftests.c.
12903 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12904 testsuite.
12905 * unittests/basic_string_view/cons/char/1.cc: Likewise.
12906 * unittests/basic_string_view/cons/char/2.cc: Likewise.
12907 * unittests/basic_string_view/cons/char/3.cc: Likewise.
12908 * unittests/basic_string_view/element_access/char/1.cc:
12909 Likewise.
12910 * unittests/basic_string_view/element_access/char/empty.cc:
12911 Likewise.
12912 * unittests/basic_string_view/element_access/char/front_back.cc:
12913 Likewise.
12914 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12915 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12916 Likewise.
12917 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12918 Likewise.
12919 * unittests/basic_string_view/modifiers/swap/char/1.cc:
12920 Likewise.
12921 * unittests/basic_string_view/operations/compare/char/1.cc:
12922 Likewise.
12923 * unittests/basic_string_view/operations/compare/char/13650.cc:
12924 Likewise.
12925 * unittests/basic_string_view/operations/copy/char/1.cc:
12926 Likewise.
12927 * unittests/basic_string_view/operations/data/char/1.cc:
12928 Likewise.
12929 * unittests/basic_string_view/operations/find/char/1.cc:
12930 Likewise.
12931 * unittests/basic_string_view/operations/find/char/2.cc:
12932 Likewise.
12933 * unittests/basic_string_view/operations/find/char/3.cc:
12934 Likewise.
12935 * unittests/basic_string_view/operations/find/char/4.cc:
12936 Likewise.
12937 * unittests/basic_string_view/operations/rfind/char/1.cc:
12938 Likewise.
12939 * unittests/basic_string_view/operations/rfind/char/2.cc:
12940 Likewise.
12941 * unittests/basic_string_view/operations/rfind/char/3.cc:
12942 Likewise.
12943 * unittests/basic_string_view/operations/substr/char/1.cc:
12944 Likewise.
12945 * unittests/basic_string_view/operators/char/2.cc: Likewise.
12946 * unittests/string_view-selftests.c: New file.
12947
12948 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12949
12950 * unittests/basic_string_view/capacity/1.cc: New file.
12951 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12952 * unittests/basic_string_view/cons/char/1.cc: New file.
12953 * unittests/basic_string_view/cons/char/2.cc: New file.
12954 * unittests/basic_string_view/cons/char/3.cc: New file.
12955 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12956 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12957 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12958 * unittests/basic_string_view/element_access/char/1.cc: New file.
12959 * unittests/basic_string_view/element_access/char/2.cc: New file.
12960 * unittests/basic_string_view/element_access/char/empty.cc: New file.
12961 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12962 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12963 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12964 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12965 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12966 * unittests/basic_string_view/include.cc: New file.
12967 * unittests/basic_string_view/inserters/char/1.cc: New file.
12968 * unittests/basic_string_view/inserters/char/2.cc: New file.
12969 * unittests/basic_string_view/inserters/char/3.cc: New file.
12970 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12971 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12972 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12973 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12974 * unittests/basic_string_view/literals/types.cc: New file.
12975 * unittests/basic_string_view/literals/values.cc: New file.
12976 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12977 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12978 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12979 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12980 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12981 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12982 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12983 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12984 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12985 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12986 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12987 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12988 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12989 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12990 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12991 * unittests/basic_string_view/operations/data/char/1.cc: New file.
12992 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12993 * unittests/basic_string_view/operations/find/char/1.cc: New file.
12994 * unittests/basic_string_view/operations/find/char/2.cc: New file.
12995 * unittests/basic_string_view/operations/find/char/3.cc: New file.
12996 * unittests/basic_string_view/operations/find/char/4.cc: New file.
12997 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12998 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12999 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
13000 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
13001 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
13002 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
13003 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
13004 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
13005 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
13006 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
13007 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
13008 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
13009 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
13010 * unittests/basic_string_view/operators/char/2.cc: New file.
13011 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
13012 * unittests/basic_string_view/range_access/char/1.cc: New file.
13013 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
13014 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
13015 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
13016 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
13017 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
13018 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
13019 * unittests/basic_string_view/requirements/typedefs.cc: New file.
13020 * unittests/basic_string_view/typedefs.cc: New file.
13021 * unittests/basic_string_view/types/1.cc: New file.
13022
13023 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13024
13025 * common/gdb_string_view.h: Remove libstdc++ implementation
13026 details, adjust to gdb reality.
13027 * common/gdb_string_view.tcc: Likewise.
13028 * cli/cli-script.c (struct string_view): Remove.
13029 (user_args) <m_args>: Change element type to gdb::string_view.
13030 (user_args::insert_args): Adjust.
13031
13032 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13033
13034 * common/gdb_string_view.h: New file.
13035 * common/gdb_string_view.tcc: New file.
13036
13037 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13038
13039 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
13040 * configure: Re-generate.
13041
13042 2018-04-09 Pedro Alves <palves@redhat.com>
13043
13044 * gdbarch.sh: Include "observable.h" instead of "observer.h".
13045 (set_target_gdbarch): Call
13046 gdb::observers::architecture_changed.notify instead of
13047 observer_notify_architecture_changed.
13048
13049 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13050
13051 * tracepoint.c (struct current_traceframe_cleanup): Remove.
13052 (do_restore_current_traceframe_cleanup): Remove.
13053 (restore_current_traceframe_cleanup_dtor): Remove.
13054 (make_cleanup_restore_current_traceframe): Remove.
13055 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
13056 New.
13057 * tracepoint.h (struct scoped_restore_current_traceframe): New.
13058 * infrun.c (fetch_inferior_event): Use
13059 scoped_restore_current_traceframe.
13060
13061 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13062
13063 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
13064 Remove.
13065 <n_allocated_type_units>: Remove.
13066 <all_type_units>: Change to std::vector.
13067 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13068 to std::vector change.
13069 (dwarf2_per_objfile::get_cutu): Likewise.
13070 (dwarf2_per_objfile::get_tu): Likewise.
13071 (create_signatured_type_table_from_index): Likewise.
13072 (create_signatured_type_table_from_debug_names): Likewise.
13073 (dw2_symtab_iter_next): Likewise.
13074 (dw2_print_stats): Likewise.
13075 (dw2_expand_all_symtabs): Likewise.
13076 (dw2_expand_marked_cus): Likewise.
13077 (dw2_debug_names_iterator::next): Likewise.
13078 (dwarf2_initialize_objfile): Likewise.
13079 (add_signatured_type_cu_to_table): Likewise.
13080 (create_all_type_units): Likewise.
13081 (add_type_unit): Likewise.
13082 (struct tu_abbrev_offset): Add constructor.
13083 (build_type_psymtabs_1): Adjust to std::vector change.
13084 (print_tu_stats): Likewise.
13085 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13086 (write_debug_names): Likewise.
13087
13088 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13089
13090 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
13091 Make an std::vector.
13092 <n_comp_units>: Remove.
13093 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13094 to std::vector change.
13095 (dwarf2_per_objfile::get_cutu): Likewise.
13096 (dwarf2_per_objfile::get_cu): Likewise.
13097 (create_cus_from_index): Likewise.
13098 (create_addrmap_from_index): Likewise.
13099 (create_addrmap_from_aranges): Likewise.
13100 (dwarf2_read_index): Likewise.
13101 (dw2_find_last_source_symtab): Likewise.
13102 (dw2_map_symtabs_matching_filename): Likewise.
13103 (dw2_symtab_iter_next): Likewise.
13104 (dw2_print_stats): Likewise.
13105 (dw2_expand_all_symtabs): Likewise.
13106 (dw2_expand_symtabs_with_fullname): Likewise.
13107 (dw2_expand_marked_cus): Likewise.
13108 (dw2_map_symbol_filenames): Likewise.
13109 (create_cus_from_debug_names): Likewise.
13110 (dwarf2_read_debug_names): Likewise.
13111 (dw2_debug_names_iterator::next): Likewise.
13112 (dwarf2_initialize_objfile): Likewise.
13113 (set_partial_user): Likewise.
13114 (dwarf2_build_psymtabs_hard): Likewise.
13115 (read_comp_units_from_section): Remove arguments, adjust to
13116 std::vector change.
13117 (create_all_comp_units): Adjust to std::vector and
13118 read_comp_units_from_section changes.
13119 (dwarf2_find_containing_comp_unit): Adjust to std::vector
13120 change.
13121 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13122 (psyms_seen_size): Likewise.
13123 (write_gdbindex): Likewise.
13124 (write_debug_names): Likewise.
13125
13126 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13127
13128 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13129 with dwarf2_per_objfile.
13130 (create_cus_from_index): Likewise.
13131 (create_signatured_type_table_from_index): Likewise.
13132 (dwarf2_read_index): Likewise.
13133 (dwarf2_initialize_objfile): Likewise.
13134 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
13135 per_cu rather than get_dwarf2_per_objfile.
13136
13137 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13138
13139 * dwarf2read.h (struct signatured_type): Forward declare.
13140 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13141 New methods.
13142 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13143 (dw2_get_cutu): ...this.
13144 (dwarf2_per_objfile::get_cu): Rename from...
13145 (dw2_get_cu): ...this.
13146 (dwarf2_per_objfile::get_tu): New.
13147 (create_addrmap_from_index): Adjust.
13148 (create_addrmap_from_aranges): Adjust.
13149 (dw2_find_last_source_symtab): Adjust.
13150 (dw2_map_symtabs_matching_filename): Adjust.
13151 (dw2_symtab_iter_next): Adjust.
13152 (dw2_print_stats): Adjust.
13153 (dw2_expand_all_symtabs): Adjust.
13154 (dw2_expand_symtabs_with_fullname): Adjust.
13155 (dw2_expand_marked_cus): Adjust.
13156 (dw_expand_symtabs_matching_file_matcher): Adjust.
13157 (dw2_map_symbol_filenames): Adjust.
13158 (dw2_debug_names_iterator::next): Adjust.
13159 (dwarf2_initialize_objfile): Adjust.
13160 (set_partial_user): Adjust.
13161 (dwarf2_build_psymtabs_hard): Adjust.
13162
13163 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13164
13165 * dwarf2read.c (create_signatured_type_table_from_debug_names):
13166 Remove unused variables.
13167 (dw2_map_symtabs_matching_filename): Likewise.
13168 (dwarf2_record_block_ranges): Likewise.
13169 (dwarf2_read_addr_index): Likewise.
13170 (follow_die_offset): Likewise.
13171
13172 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13173
13174 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13175 to symbol_file_add_main.
13176
13177 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13178
13179 PR mi/22299
13180 * mi/mi-console.c (do_fputc_async_safe): New.
13181 (mi_console_file::write_async_safe): New.
13182 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13183 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13184 New.
13185 * ui-file.c (ui_file::putstrn): Adjust call to
13186 fputstrn_unfiltered.
13187 * utils.c (printchar): Replace do_fputs and do_fprintf
13188 parameters by do_fputc.
13189 (fputstr_filtered): Adjust call to printchar.
13190 (fputstr_unfiltered): Likewise.
13191 (fputstrn_filtered): Likewise.
13192 (fputstrn_unfiltered): Add do_fputc parameter, pass to
13193 printchar.
13194 * utils.h (do_fputc_ftype): New typedef.
13195 (fputstrn_unfiltered): Add do_fputc parameter.
13196
13197 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13198
13199 * regformats/i386/i386-avx.dat: Remove.
13200
13201 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13202
13203 PR gdb/22979
13204 * amd64-tdep.c (amd64_none_init_abi): New function.
13205 (amd64_x32_none_init_abi): New function.
13206 (_initialize_amd64_tdep): Register handlers for x86-64 and
13207 x64_32 with GDB_OSABI_NONE.
13208 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13209 GDB_OSABI_NONE osabi.
13210
13211 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13212
13213 PR gdb/22980
13214 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13215 GDB_OSABI_NONE.
13216 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13217 * osabi.c (gdb_osabi_names): Add "unknown" entry.
13218
13219 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13220
13221 * common/byte-vector.h (char_vector): New type.
13222 * target.h (target_read_alloc): Return
13223 gdb::optional<byte_vector>.
13224 (target_read_stralloc): Return gdb::optional<char_vector>.
13225 (target_get_osdata): Return gdb::optional<char_vector>.
13226 * target.c (target_read_alloc_1): Templatize. Replacement
13227 manual memory management with vector.
13228 (target_read_alloc): Change return type, adjust.
13229 (target_read_stralloc): Change return type, adjust.
13230 (target_get_osdata): Change return type, adjust.
13231 * auxv.c (struct auxv_info) <length>: Remove.
13232 <data>: Change type to gdb::optional<byte_vector>.
13233 (auxv_inferior_data_cleanup): Free auxv_info with delete.
13234 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13235 (target_auxv_search): Adjust.
13236 (fprint_target_auxv): Adjust.
13237 * avr-tdep.c (avr_io_reg_read_command): Adjust.
13238 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13239 (linux_make_corefile_notes): Adjust.
13240 * osdata.c (get_osdata): Adjust.
13241 * remote.c (remote_get_threads_with_qxfer): Adjust.
13242 (remote_memory_map): Adjust.
13243 (remote_traceframe_info): Adjust.
13244 (btrace_read_config): Adjust.
13245 (remote_read_btrace): Adjust.
13246 (remote_pid_to_exec_file): Adjust.
13247 * solib-aix.c (solib_aix_get_library_list): Adjust.
13248 * solib-dsbt.c (decode_loadmap): Don't free buf.
13249 (dsbt_get_initial_loadmaps): Adjust.
13250 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13251 * solib-target.c (solib_target_current_sos): Adjust.
13252 * tracepoint.c (sdata_make_value): Adjust.
13253 * xml-support.c (xinclude_start_include): Adjust.
13254 (xml_fetch_content_from_file): Adjust.
13255 * xml-support.h (xml_fetch_another): Change return type.
13256 (xml_fetch_content_from_file): Change return type.
13257 * xml-syscall.c (xml_init_syscalls_info): Adjust.
13258 * xml-tdesc.c (file_read_description_xml): Adjust.
13259 (fetch_available_features_from_target): Change return type.
13260 (target_fetch_description_xml): Adjust.
13261 (target_read_description_xml): Adjust.
13262
13263 2018-04-06 Tom Tromey <tom@tromey.com>
13264
13265 * value.c (~value): Update.
13266 (struct value) <contents>: Now unique_xmalloc_ptr.
13267 (value_contents_bits_eq, allocate_value_contents)
13268 (value_contents_raw, value_contents_all_raw)
13269 (value_contents_for_printing, value_contents_for_printing_const)
13270 (set_value_enclosing_type): Update.
13271
13272 2018-04-06 Tom Tromey <tom@tromey.com>
13273
13274 * value.c (range_s): Remove typedef, VEC.
13275 (struct range): Add operator<.
13276 (range_lessthan): Remove.
13277 (ranges_contain): Change type.
13278 (~value): Update.
13279 (struct value) <unavailable, optimized_out>: Now std::vector.
13280 (value_entirely_available)
13281 (value_entirely_covered_by_range_vector)
13282 (value_entirely_unavailable, value_entirely_optimized_out):
13283 Update.
13284 (insert_into_bit_range_vector): Change argument type.
13285 (find_first_range_overlap): Likewise.
13286 (struct ranges_and_idx, value_contents_bits_eq)
13287 (require_not_optimized_out, require_available): Update.
13288 (ranges_copy_adjusted): Change argument types.
13289 (value_optimized_out, value_copy, value_fetch_lazy): Update.
13290
13291 2018-04-06 Tom Tromey <tom@tromey.com>
13292
13293 * value.c (~value): Update.
13294 (struct value) <parent>: Now a value_ref_ptr.
13295 (value_parent, set_value_parent, value_address, value_copy):
13296 Update.
13297
13298 2018-04-06 Tom Tromey <tom@tromey.com>
13299
13300 * value.c (struct value): Add constructor, destructor, and member
13301 initializers.
13302 (allocate_value_lazy, value_decref): Update.
13303
13304 2018-04-06 Tom Tromey <tom@tromey.com>
13305
13306 * value.c (struct value) <released, next>: Remove.
13307 (all_values): Now a std::vector.
13308 (allocate_value_lazy): Update.
13309 (value_next): Remove.
13310 (value_mark, value_free_to_mark, release_value)
13311 (value_release_to_mark): Update.
13312
13313 2018-04-06 Tom Tromey <tom@tromey.com>
13314
13315 * value.h (fetch_subexp_value, value_release_to_mark): Update.
13316 (free_value_chain): Remove.
13317 * value.c (free_value_chain): Remove.
13318 (value_release_to_mark): Return a std::vector.
13319 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13320 std::vector.
13321 (check_condition): Update.
13322 * eval.c (fetch_subexp_value): Change "val_chain" to a
13323 std::vector.
13324 * breakpoint.c (update_watchpoint): Update.
13325 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13326
13327 2018-04-06 Tom Tromey <tom@tromey.com>
13328
13329 * value.h (free_all_values): Remove.
13330 * value.c (free_all_values): Remove.
13331
13332 2018-04-06 Tom Tromey <tom@tromey.com>
13333
13334 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13335 (value_history_chain, value_history_count): Remove.
13336 (value_history): New global.
13337 (record_latest_value, access_value_history, show_values)
13338 (preserve_values): Update.
13339
13340 2018-04-06 Tom Tromey <tom@tromey.com>
13341
13342 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13343 * varobj.c (varobj_set_display_format, varobj_set_value)
13344 (install_default_visualizer, construct_visualizer)
13345 (install_new_value, ~varobj, varobj_get_value_type)
13346 (my_value_of_variable, varobj_editable_p): Update.
13347 * c-varobj.c (c_describe_child, c_value_of_variable)
13348 (cplus_number_of_children, cplus_describe_child): Update.
13349 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13350 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13351 (ada_value_of_variable, ada_value_is_changeable_p): Update.
13352
13353 2018-04-06 Tom Tromey <tom@tromey.com>
13354
13355 * printcmd.c (last_examine_address): Change type to
13356 value_ref_ptr.
13357 (do_examine, x_command): Update.
13358
13359 2018-04-06 Tom Tromey <tom@tromey.com>
13360
13361 * value.c (release_value): Update.
13362 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13363 (struct bpstats) <val>: Now a value_ref_ptr.
13364 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13365 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13366 (~watchpoint, print_it_watchpoint, watch_command_1)
13367 (invalidate_bp_value_on_memory_change): Update.
13368
13369 2018-04-06 Tom Tromey <tom@tromey.com>
13370
13371 * varobj.c (varobj_clear_saved_item)
13372 (update_dynamic_varobj_children, install_new_value, ~varobj):
13373 Update.
13374 * value.h (value_incref): Move declaration earlier.
13375 (value_decref): Rename from value_free.
13376 (struct value_ref_policy): New.
13377 (value_ref_ptr): New typedef.
13378 (struct value_deleter): Remove.
13379 (gdb_value_up): Remove typedef.
13380 (release_value): Change return type.
13381 (release_value_or_incref): Remove.
13382 * value.c (set_value_parent): Update.
13383 (value_incref): Change return type.
13384 (value_decref): Rename from value_free.
13385 (value_free_to_mark, free_all_values, free_value_chain): Update.
13386 (release_value): Return value_ref_ptr.
13387 (release_value_or_incref): Remove.
13388 (record_latest_value, set_internalvar, clear_internalvar):
13389 Update.
13390 * stack.c (info_frame_command): Don't call value_free.
13391 * python/py-value.c (valpy_dealloc, valpy_new)
13392 (value_to_value_object): Update.
13393 * printcmd.c (do_examine): Update.
13394 * opencl-lang.c (lval_func_free_closure): Update.
13395 * mi/mi-main.c (register_changed_p): Don't call value_free.
13396 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13397 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13398 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13399 value_free.
13400 * guile/scm-value.c (vlscm_free_value_smob)
13401 (vlscm_scm_from_value): Update.
13402 * frame.c (frame_register_unwind, frame_unwind_register_signed)
13403 (frame_unwind_register_unsigned, get_frame_register_bytes)
13404 (put_frame_register_bytes): Don't call value_free.
13405 * findvar.c (address_from_register): Don't call value_free.
13406 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13407 * dwarf2loc.c (entry_data_value_free_closure)
13408 (value_of_dwarf_reg_entry, free_pieced_value_closure)
13409 (dwarf2_evaluate_loc_desc_full): Update.
13410 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13411 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13412 (~watchpoint, watch_command_1)
13413 (invalidate_bp_value_on_memory_change): Update.
13414 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13415
13416 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
13417
13418 PR gdb/23022
13419 * warning.m4: Add -Wno-error=deprecated-register.
13420 * configure: Re-generate.
13421
13422 2018-04-05 Tom Tromey <tom@tromey.com>
13423
13424 * linespec.h: Remove include of "vec.h".
13425
13426 2018-04-05 Tom Tromey <tom@tromey.com>
13427
13428 * linespec.c (typep): Remove typedef.
13429 (find_methods, find_superclass_methods): Take a std::vector.
13430 (find_method): Use std::vector.
13431
13432 2018-04-05 Tom Tromey <tom@tromey.com>
13433
13434 * utils.c (compare_strings): Remove.
13435 * utils.h (compare_strings): Remove.
13436 * objc-lang.h (find_imps): Update.
13437 * objc-lang.c (find_methods): Take a std::vector.
13438 (uniquify_strings, find_imps): Likewise.
13439 * linespec.c (find_methods): Take a std::vector.
13440 (decode_objc): Use std::vector.
13441 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13442 a std::vector.
13443 (find_method, find_function_symbols): Use std::vector.
13444
13445 2018-04-05 Tom Tromey <tom@tromey.com>
13446
13447 * completer.c (completion_tracker::completion_tracker): Remove
13448 cast.
13449 (completion_tracker::discard_completions): Likewise.
13450 * breakpoint.c (ambiguous_names_p): Remove cast.
13451 * ada-lang.c (_initialize_ada_language): Remove cast.
13452 * utils.h (streq): Update.
13453 (streq_hash): Add new declaration.
13454 * utils.c (streq): Return bool.
13455 (streq_hash): New function.
13456
13457 2018-04-05 Tom Tromey <tom@tromey.com>
13458
13459 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13460 Remove a string copy.
13461
13462 2018-04-05 Tom Tromey <tom@tromey.com>
13463
13464 * linespec.c (filter_results): Use std::vector.
13465 (decode_line_2, decode_line_full): Update.
13466
13467 2018-04-05 Tom Tromey <tom@tromey.com>
13468
13469 * linespec.c (canonical_to_fullform): Return std::string.
13470 (filter_results): Update.
13471 (struct decode_line_2_item): Add constructor.
13472 <fullform, displayform>: Now std::string.
13473 (decode_line_2_compare_items): Now a std::sort comparator.
13474 (decode_line_2): Update.
13475
13476 2018-04-05 Tom Tromey <tom@tromey.com>
13477
13478 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13479 (unexpected_linespec_error): Update.
13480 (linespec_parse_basic, parse_linespec): Update.
13481
13482 2018-04-05 Tom Tromey <tom@tromey.com>
13483
13484 * linespec.c (linespec_parse_basic): Reindent.
13485
13486 2018-04-05 Tom Tromey <tom@tromey.com>
13487
13488 * minsyms.h (iterate_over_minimal_symbols): Update.
13489 * minsyms.c (iterate_over_minimal_symbols): Take a
13490 gdb::function_view.
13491 * linespec.c (struct collect_minsyms): Remove.
13492 (compare_msyms): Now a std::sort comparator.
13493 (add_minsym): Add parameters.
13494 (search_minsyms_for_name): Update. Use std::vector.
13495
13496 2018-04-03 Tom Tromey <tom@tromey.com>
13497
13498 * mipsread.c (read_alphacoff_dynamic_symtab): Use
13499 gdb::byte_vector.
13500
13501 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13502
13503 * MAINTAINERS (Write After Approval): Add Weimin Pan.
13504
13505 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13506
13507 PR gdb/16959
13508 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
13509 printing static type.
13510
13511 2018-04-01 Tom Tromey <tom@tromey.com>
13512
13513 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13514 (rs6000_xfer_shared_libraries): Update.
13515
13516 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
13517
13518 * common/gdb_vecs.h (char_ptr): Remove.
13519 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13520
13521 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13522
13523 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13524 with std::vector.
13525 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13526
13527 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13528
13529 * tracepoint.h (struct uploaded_tp): Initialize fields.
13530 <actions, step_actions, cmd_strings>: Change type to
13531 std::vector<char *>.
13532 * tracepoint.c (get_uploaded_tp): Allocate with new.
13533 (free_uploaded_tps): Free with delete.
13534 (parse_tracepoint_definition): Adjust to std::vector change.
13535 * breakpoint.c (read_uploaded_action): Likewise.
13536 (create_tracepoint_from_upload): Likewise.
13537 * ctf.c (ctf_write_uploaded_tp): Likewise.
13538 (SET_ARRAY_FIELD): Likewise.
13539 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13540
13541 2018-03-30 Tom Tromey <tom@tromey.com>
13542
13543 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
13544 std::unique_ptr.
13545 (svr4_keep_data_in_core): Update.
13546 (svr4_read_so_list): Update.
13547
13548 2018-03-30 Tom Tromey <tom@tromey.com>
13549
13550 * windows-nat.c (handle_output_debug_string, handle_exception):
13551 Update.
13552 * target.h (target_read_string): Update.
13553 * target.c (target_read_string): Change "string" to
13554 unique_xmalloc_ptr.
13555 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13556 Update.
13557 * solib-frv.c (frv_current_sos): Update.
13558 * solib-dsbt.c (dsbt_current_sos): Update.
13559 * solib-darwin.c (darwin_current_sos): Update.
13560 * linux-thread-db.c (inferior_has_bug): Update.
13561 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13562 Update. Remove alloca.
13563 * ada-lang.c (ada_main_name): Update.
13564
13565 2018-03-30 Tom Tromey <tom@tromey.com>
13566
13567 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13568 (struct dwo_file_deleter): New.
13569 (dwo_file_up): New typedef.
13570 (open_and_init_dwo_file): Use dwo_file_up.
13571 (free_dwo_file_cleanup): Remove.
13572
13573 2018-03-30 Tom Tromey <tom@tromey.com>
13574
13575 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13576 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13577
13578 2018-03-30 Tom Tromey <tom@tromey.com>
13579
13580 * dwarf2read.c (class free_cached_comp_units): New class.
13581 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13582 (free_cached_comp_units): Remove function.
13583
13584 2018-03-30 Tom Tromey <tom@tromey.com>
13585
13586 * utils.h (make_cleanup_unpush_target): Remove.
13587 * inf-ptrace.c (struct target_unpusher): New.
13588 (target_unpush_up) New typedef.
13589 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13590 target_unpush_up.
13591 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13592
13593 2018-03-27 Tom Tromey <tom@tromey.com>
13594
13595 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13596
13597 2018-03-27 Pedro Alves <palves@redhat.com>
13598 Tom Tromey <tom@tromey.com>
13599
13600 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13601 destructor. Now a class.
13602 (gdb_readline_wrapper_cleanup): Remove function.
13603 (gdb_readline_wrapper): Remove cleanups.
13604
13605 2018-03-27 Tom Tromey <tom@tromey.com>
13606
13607 * typeprint.h (struct type_print_options) <local_typedefs,
13608 global_typedefs>: Remove "struct" keyword.
13609 (class typedef_hash_table): New class.
13610 (recursively_update_typedef_hash, add_template_parameters)
13611 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13612 (find_typedef_in_hash): Don't declare.
13613 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13614 (typedef_hash_table::recursively_update): Rename from
13615 recursively_update_typedef_hash. Now a member.
13616 (typedef_hash_table::add_template_parameters): Rename from
13617 add_template_parameters. Now a member.
13618 (typedef_hash_table::typedef_hash_table): Now a constructor;
13619 rename from create_typedef_hash.
13620 (typedef_hash_table::~typedef_hash_table): Now a destructor;
13621 rename from free_typedef_hash.
13622 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13623 (do_free_global_table): Remove.
13624 (typedef_hash_table::typedef_hash_table): New constructor; renamed
13625 from copy_type_recursive.
13626 (create_global_typedef_table): Remove.
13627 (typedef_hash_table::find_global_typedef): Now a member of
13628 typedef_hash_table.
13629 (typedef_hash_table::find_typedef): Rename from
13630 find_typedef_in_hash; now a member.
13631 (whatis_exp): Update.
13632 * extension.h (struct ext_lang_type_printers): Add constructor and
13633 destructor.
13634 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13635 declare.
13636 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13637 Now a constructor; rename from start_ext_lang_type_printers.
13638 (ext_lang_type_printers): Now a destructor; rename from
13639 free_ext_lang_type_printers.
13640 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13641 Update.
13642 (c_type_print_base_struct_union): Update. Remove cleanups.
13643
13644 2018-03-27 Tom Tromey <tom@tromey.com>
13645
13646 * dwarf-index-write.c: Include <cmath>.
13647
13648 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13649
13650 * NEWS: Add entry describing new "set|show varsize-limit" command.
13651 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13652 command.
13653 * printcmd.c (_initialize_printcmd): Add "set var" alias of
13654 "set variable".
13655
13656 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
13657
13658 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13659 dwarf-index-write.c
13660 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13661 * dwarf-index-common.c: New file.
13662 * dwarf-index-common.h: New file.
13663 * dwarf-index-write.c: New file.
13664 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13665 (struct dwarf2_section_info): Move from here.
13666 (dwarf2_section_info_def): Likewise.
13667 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13668 (offset_type): Likewise.
13669 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13670 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13671 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13672 (byte_swap): Likewise.
13673 (MAYBE_SWAP): Likewise.
13674 (dwarf2_per_cu_ptr): Likewise.
13675 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13676 (struct tu_stats): Likewise.
13677 (struct dwarf2_per_objfile): Likewise.
13678 (struct dwarf2_per_cu_data): Likewise.
13679 (struct signatured_type): Likewise.
13680 (sig_type_ptr): Likewise.
13681 (DEF_VEC_P (sig_type_ptr)): Likewise.
13682 (INDEX4_SUFFIX): Likewise.
13683 (INDEX5_SUFFIX): Likewise.
13684 (DEBUG_STR_SUFFIX): Likewise.
13685 (dwarf2_read_section): Make non-static.
13686 (mapped_index_string_hash): Move from here.
13687 (dwarf5_djb_hash): Likewise.
13688 (file_write): Likewise.
13689 (class data_buf): Likewise.
13690 (struct symtab_index_entry): Likewise.
13691 (struct mapped_symtab): Likewise.
13692 (find_slot): Likewise.
13693 (hash_expand): Likewise.
13694 (add_index_entry): Likewise.
13695 (uniquify_cu_indices): Likewise.
13696 (class c_str_view): Likewise.
13697 (class c_str_view_hasher): Likewise.
13698 (class vector_hasher): Likewise.
13699 (write_hash_table): Likewise.
13700 (psym_index_map): Likewise.
13701 (struct addrmap_index_data): Likewise.
13702 (add_address_entry): Likewise.
13703 (add_address_entry_worker): Likewise.
13704 (write_address_map): Likewise.
13705 (symbol_kind): Likewise.
13706 (write_psymbols): Likewise.
13707 (struct signatured_type_index_data): Likewise.
13708 (write_one_signatured_type): Likewise.
13709 (recursively_count_psymbols): Likewise.
13710 (recursively_write_psymbols): Likewise.
13711 (class debug_names): Likewise.
13712 (check_dwarf64_offsets): Likewise.
13713 (psyms_seen_size): Likewise.
13714 (write_gdbindex): Likewise.
13715 (write_debug_names): Likewise.
13716 (assert_file_size): Likewise.
13717 (write_psymtabs_to_index): Likewise.
13718 (save_gdb_index_command): Likewise.
13719 (_initialize_dwarf2_read): Don't register the "save gdb-index"
13720 command.
13721 * dwarf2read.h: New file.
13722
13723 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13724
13725 PR gdb/22670
13726 * dwarf2read.c (dwarf2_physname): Do not return the demangled
13727 symbol name if the CU's language stores symbol names in linkage
13728 format.
13729 * language.h (struct language_defn)
13730 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
13731 all instances of this struct.
13732
13733 2018-03-26 Tom Tromey <tom@tromey.com>
13734
13735 * stack.c (backtrace_command_1): Remove verbose code.
13736
13737 2018-03-26 Tom Tromey <tom@tromey.com>
13738
13739 * python/py-framefilter.c (py_print_type): Don't catch
13740 exceptions. Return void.
13741 (py_print_value): Likewise.
13742 (py_print_single_arg): Likewise.
13743 (enumerate_args): Don't catch exceptions.
13744 (py_print_args): Likewise.
13745 (py_print_frame): Likewise.
13746 (gdbpy_apply_frame_filter): Catch exceptions here.
13747
13748 2018-03-26 Tom Tromey <tom@tromey.com>
13749
13750 * stack.c (_initialize_stack): Remove trailing newlines from help
13751 text. Add "Usage" line to "backtrace" help.
13752
13753 2018-03-26 Tom Tromey <tom@tromey.com>
13754
13755 PR python/16486:
13756 * python/py-framefilter.c (py_print_args): Call wrap_hint.
13757
13758 2018-03-26 Tom Tromey <tom@tromey.com>
13759
13760 * python/py-framefilter.c (py_print_single_arg): Return
13761 EXT_LANG_BT_ERROR from catch.
13762
13763 2018-03-26 Tom Tromey <tom@tromey.com>
13764
13765 PR backtrace/15584:
13766 * stack.c (backtrace_command_1): Move some code into no-filters
13767 "if".
13768
13769 2018-03-26 Tom Tromey <tom@tromey.com>
13770
13771 * python/py-framefilter.c (throw_quit_or_print_exception): New
13772 function.
13773 (gdbpy_apply_frame_filter): Use it.
13774
13775 2018-03-26 Tom Tromey <tom@tromey.com>
13776
13777 PR cli/17716:
13778 * python/py-framefilter.c (py_print_type, py_print_value)
13779 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13780 RETURN_MASK_ERROR.
13781
13782 2018-03-26 Tom Tromey <tom@tromey.com>
13783
13784 * python/py-framefilter.c (enumerate_args): Use
13785 gdb::unique_xmalloc_ptr.
13786
13787 2018-03-26 Tom Tromey <tom@tromey.com>
13788
13789 * python/py-framefilter.c (py_print_frame): Return
13790 EXT_LANG_BT_OK.
13791 (gdbpy_apply_frame_filter): Update comment.
13792 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13793 Remove.
13794 <EXT_LANG_BT_NO_FILTERS>: Change value.
13795
13796 2018-03-26 Tom Tromey <tom@tromey.com>
13797
13798 PR backtrace/15582:
13799 * stack.c (backtrace_command): Parse "hide" argument.
13800 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13801 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13802 constant.
13803
13804 2018-03-26 Tom Tromey <tom@tromey.com>
13805
13806 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13807 add "flags".
13808 (backtrace_command): Remove "fulltrace", add "flags".
13809
13810 2018-03-26 Tom Tromey <tom@tromey.com>
13811
13812 * stack.c (backtrace_command): Rewrite command line parsing.
13813
13814 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13815
13816 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13817
13818 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13819
13820 * filename-seen-cache.h: Add include guard.
13821
13822 2018-03-26 Keith Seitz <keiths@redhat.com>
13823
13824 * symfile.c (place_section): Remove "struct" from section_addr_info
13825 in comment.
13826 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13827 "struct" keyword from section_addr_info.
13828
13829 2018-03-26 Alan Hayward <alan.hayward@arm.com>
13830
13831 * regformats/regdef.h (reg): Add constructors.
13832
13833 2018-03-25 Pedro Alves <palves@redhat.com>
13834
13835 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13836 if then/else bodies in var_func_name extraction.
13837
13838 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
13839
13840 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13841 lookup_minimal_symbol() to find symbol entry.
13842 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13843
13844 2018-03-23 Keith Seitz <keiths@redhat.com>
13845
13846 PR c++/22968
13847 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13848 nested type definitions for C++, too.
13849
13850 2018-03-23 Tom Tromey <tom@tromey.com>
13851
13852 * machoread.c (struct oso_el): Add a constructor. Don't define as
13853 a typedef.
13854 (macho_register_oso): Remove.
13855 (macho_symtab_read): Take a std::vector.
13856 (oso_el_compare_name): Now a std::sort comparator.
13857 (macho_symfile_read_all_oso): Take a std::vector.
13858 (macho_symfile_read): Use std::vector. Remove cleanups.
13859
13860 2018-03-22 Tom Tromey <tom@tromey.com>
13861
13862 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13863 (record_full_goto_bookmark): Use std::string.
13864
13865 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13866
13867 PR tdep/18295
13868 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13869 a single mask.
13870
13871 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13872
13873 * rs6000-tdep.c (store_insn_p): New function.
13874 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13875 and cr_reg to their unshifted values. Use store_insn_p to
13876 match LR saves using either R1 or fdata->alloca_reg. Use
13877 store_insn_p to match CR saves. Set alloca_reg_offset
13878 when alloca_reg and framep are set. Remove lr_reg shift
13879 when assigning to fdata->lr_register.
13880
13881 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
13882
13883 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13884 command line args instead of emitting a warning.
13885
13886 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13887
13888 * tracepoint.h (struct static_tracepoint_marker): Initialize
13889 fields, define default constructor, move constructor and move
13890 assignment, disable the rest.
13891 <str_id, extra>: Make std::string.
13892 (release_static_tracepoint_marker): Remove.
13893 (free_current_marker): Remove.
13894 * tracepoint.c (free_current_marker): Remove.
13895 (parse_static_tracepoint_marker_definition): Adjust to
13896 std::string, use new hex2str overload.
13897 (release_static_tracepoint_marker): Remove.
13898 (print_one_static_tracepoint_marker): Get marker by reference
13899 and adjust to std::string.
13900 (info_static_tracepoint_markers_command): Adjust to std::vector
13901 changes
13902 * target.h (static_tracepoint_marker_p): Remove typedef.
13903 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13904 (struct target_ops) <to_static_tracepoint_marker_at>: Return
13905 bool.
13906 <to_static_tracepoint_markers_by_strid>: Return std::vector.
13907 * target-debug.h
13908 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13909 (target_debug_print_std_vector_static_tracepoint_marker): New.
13910 (target_debug_print_struct_static_tracepoint_marker_p): Rename
13911 to...
13912 (target_debug_print_static_tracepoint_marker_p): ... this.
13913 * target-delegates.c: Re-generate.
13914 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13915 Make std::string.
13916 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13917 (decode_static_tracepoint_spec): Adjust to std::vector.
13918 (tracepoint_print_one_detail): Adjust to std::string.
13919 (strace_marker_decode_location): Adjust to std::string.
13920 (update_static_tracepoint): Adjust to std::string, remove call
13921 to release_static_tracepoint_marker.
13922 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13923 Adjust to std::vector.
13924 * remote.c (remote_static_tracepoint_marker_at): Return bool.
13925 (remote_static_tracepoint_markers_by_strid): Adjust to
13926 std::vector.
13927 * common/rsp-low.h (hex2str): New overload with explicit count
13928 of bytes.
13929 * common/rsp-low.c (hex2str): New overload with explicit count
13930 of bytes.
13931 * unittests/rsp-low-selftests.c (test_hex2str): New function.
13932 (_initialize_rsp_low_selftests): Add test_hex2str test.
13933 * unittests/tracepoint-selftests.c
13934 (test_parse_static_tracepoint_marker_definition): Adjust to
13935 std::string.
13936
13937 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13938
13939 * tracepoint.c (parse_static_tracepoint_marker_definition):
13940 Consider case where the definition is followed by more
13941 definitions.
13942 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13943 tracepoint-selftests.c.
13944 * unittests/tracepoint-selftests.c: New.
13945
13946 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13947
13948 * MAINTAINERS (Write After Approval): Add Pedro Franco de
13949 Carvalho.
13950
13951 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13952
13953 * symtab.c (find_pc_sect_line): fixed indentation.
13954
13955 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13956
13957 * symtab.c (find_pc_sect_line): now uses binary search.
13958
13959 2018-03-19 Tom Tromey <tom@tromey.com>
13960
13961 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13962 "IDENT" production.
13963
13964 2018-03-19 Pedro Alves <palves@redhat.com>
13965 Tom Tromey <tom@tromey.com>
13966
13967 * unittests/observable-selftests.c: New file.
13968 * common/observable.h: New file.
13969 * observable.h: New file.
13970 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13971 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13972 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13973 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13974 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13975 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13976 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13977 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13978 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13979 python/py-breakpoint.c, python/py-finishbreakpoint.c,
13980 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13981 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13982 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13983 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13984 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13985 tui/tui-interp.c, valops.c: Update all users.
13986 * tui/tui-hooks.c (tui_bp_created_observer)
13987 (tui_bp_deleted_observer, tui_bp_modified_observer)
13988 (tui_inferior_exit_observer, tui_before_prompt_observer)
13989 (tui_normal_stop_observer, tui_register_changed_observer):
13990 Remove.
13991 (tui_observers_token): New global.
13992 (attach_or_detach, tui_attach_detach_observers): New functions.
13993 (tui_install_hooks, tui_remove_hooks): Use
13994 tui_attach_detach_observers.
13995 * record-btrace.c (record_btrace_thread_observer): Remove.
13996 (record_btrace_thread_observer_token): New global.
13997 * observer.sh: Remove.
13998 * observer.c: Rename to observable.c.
13999 * observable.c (namespace gdb_observers): Define new objects.
14000 (observer_debug): Move into gdb_observers namespace.
14001 (struct observer, struct observer_list, xalloc_observer_list_node)
14002 (xfree_observer_list_node, generic_observer_attach)
14003 (generic_observer_detach, generic_observer_notify): Remove.
14004 (_initialize_observer): Update.
14005 Don't include observer.inc.
14006 * Makefile.in (generated_files): Remove observer.h, observer.inc.
14007 (clean mostlyclean): Likewise.
14008 (observer.h, observer.inc): Remove targets.
14009 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
14010 (COMMON_SFILES): Use observable.c, not observer.c.
14011 * .gitignore: Remove observer.h.
14012
14013 2018-03-18 Tom Tromey <tom@tromey.com>
14014
14015 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
14016 gdb::def_vector.
14017 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
14018
14019 2018-03-17 Tom Tromey <tom@tromey.com>
14020
14021 * auto-load.c (auto_load_objfile_script_1): Use std::string.
14022
14023 2018-03-17 Tom Tromey <tom@tromey.com>
14024
14025 * target.c (class scoped_target_fd): New.
14026 (target_fileio_close_cleanup): Remove.
14027 (target_fileio_read_alloc_1): Use scoped_target_fd.
14028
14029 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
14030
14031 * silent-rules.mk: New.
14032 * Makefile.in: Include silent-rules.mk
14033 (srcdir, VPATH, top_srcdir): Move up.
14034 (COMPILE): Add ECHO_CXX.
14035 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
14036 (init.c): Add ECHO_INIT_C.
14037 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
14038 (version.c): Add ECHO_GEN.
14039 (printcmd.o): Add ECHO_CXX.
14040 (target-float.o): Add ECHO_CXX.
14041 (ada-exp.o): Add ECHO_CXX.
14042 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
14043 (insight$(EXEEXT)): Add ECHO_CXXLD.
14044 * gnulib/configure.ac: Add AM_SILENT_RULES.
14045 * gnulib/aclocal.m4: Re-generate.
14046 * gnulib/configure: Re-generate.
14047 * gnulib/import/Makefile.in: Re-generate.
14048
14049 2018-03-16 Tom Tromey <tom@tromey.com>
14050
14051 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
14052 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
14053 * utils.c (do_free_section_addr_info)
14054 (make_cleanup_free_section_addr_info): Remove.
14055 * symfile.h (struct other_sections): Add constructor.
14056 (struct section_addr_info): Remove.
14057 (section_addr_info): New typedef.
14058 (struct sym_fns) <sym_offsets>: Change type of parameter.
14059 (build_section_addr_info_from_objfile)
14060 (relative_addr_info_to_section_offsets, addr_info_make_relative)
14061 (default_symfile_offsets, symbol_file_add)
14062 (symbol_file_add_from_bfd)
14063 (build_section_addr_info_from_section_table): Update.
14064 (alloc_section_addr_info, free_section_addr_info): Don't declare.
14065 * symfile.c (alloc_section_addr_info): Remove.
14066 (build_section_addr_info_from_section_table): Change return type.
14067 Update.
14068 (build_section_addr_info_from_bfd)
14069 (build_section_addr_info_from_objfile): Likewise.
14070 (free_section_addr_info): Remove.
14071 (relative_addr_info_to_section_offsets): Change type of "addrs".
14072 (addrs_section_compar): Now a std::sort comparator.
14073 (addrs_section_sort): Change return type.
14074 (addr_info_make_relative): Change type of "addrs". Update.
14075 (default_symfile_offsets, syms_from_objfile_1)
14076 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
14077 (symbol_file_add_separate): Update.
14078 (symbol_file_add): Change type of "addrs". Update.
14079 (add_symbol_file_command): Update. Remove cleanups.
14080 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
14081 cleanups.
14082 * symfile-debug.c (debug_sym_offsets): Change type of "info".
14083 * solib.c (solib_read_symbols): Update.
14084 * objfiles.c (objfile_relocate): Update. Remove cleanups.
14085 * machoread.c (macho_symfile_offsets): Update.
14086 * jit.c (jit_bfd_try_read_symtab): Update.
14087
14088 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
14089
14090 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14091 unittests/utils-selftests.c.
14092 * unittests/utils-selftests.c: New file.
14093
14094 2018-03-14 Tom Tromey <tom@tromey.com>
14095
14096 PR cli/14977:
14097 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
14098 for NULL.
14099
14100 2018-03-14 Tom Tromey <tom@tromey.com>
14101
14102 PR cli/19918:
14103 * printcmd.c (printf_pointer): Allow "-" in format.
14104
14105 2018-03-14 Tom Tromey <tom@tromey.com>
14106
14107 * printcmd.c (_initialize_printcmd): Add usage to printf.
14108
14109 2018-03-14 Yao Qi <qiyao@sourceware.org>
14110
14111 * MAINTAINERS: Update my email address.
14112
14113 2018-03-13 Tom Tromey <tom@tromey.com>
14114
14115 * machoread.c (macho_check_dsym): Change filenamep to a
14116 std::string*.
14117 (macho_symfile_read): Update.
14118 * symfile.c (load_command): Use std::string.
14119
14120 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
14121
14122 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14123 to error message string.
14124 (riscv_register_name): Use xsnprintf instead of sprintf.
14125 (riscv_insn::fetch_instruction): Use gdb_assert instead of
14126 internal_error.
14127 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14128 error.
14129 (riscv_push_dummy_call): Likewise.
14130
14131 2018-03-12 Tom Tromey <tom@tromey.com>
14132
14133 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14134 Use gdb::byte_vector.
14135 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14136
14137 2018-03-12 Yao Qi <yao.qi@linaro.org>
14138
14139 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14140 parameter type to readable_regcache.
14141 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14142 the declaration.
14143
14144 2018-03-11 Tom Tromey <tom@tromey.com>
14145
14146 * dwarf2read.c (struct nextfield): Add initializers.
14147 (struct nextfnfield): Remove.
14148 (struct fnfieldlist): Add initializers. Remove "length" and
14149 "head", use std::vector.
14150 (struct decl_field_list): Remove.
14151 (struct field_info): Add initializers.
14152 <fields, baseclasses>: Now std::vector.
14153 <nbaseclasses, nfnfields, typedef_field_list_count,
14154 nested_types_list_count>: Remove.
14155 (dwarf2_add_field, dwarf2_add_type_defn)
14156 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14157 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14158 (process_structure_scope): Update.
14159
14160 2018-03-11 Tom Tromey <tom@tromey.com>
14161
14162 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14163 for use by std::sort.
14164 (build_type_psymtabs_1): Use std::vector.
14165
14166 2018-03-09 Eli Zaretskii <eliz@gnu.org>
14167
14168 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14169 and LIBMPFR in the printed configuration.
14170
14171 2018-03-08 Tom Tromey <tom@tromey.com>
14172
14173 * source.c (get_filename_and_charpos): Use scoped_fd.
14174 * nto-procfs.c (procfs_open_1): Use scoped_fd.
14175 (procfs_pidlist): Likewise.
14176 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14177 (iterate_over_mappings): Likewise.
14178
14179 2018-03-08 Tom Tromey <tom@tromey.com>
14180
14181 * infcall.c (struct call_return_meta_info)
14182 <stack_temporaries_enabled>: Remove.
14183 (get_call_return_value, call_function_by_hand_dummy): Update.
14184 * thread.c (disable_thread_stack_temporaries): Remove.
14185 (enable_thread_stack_temporaries): Remove.
14186 (thread_stack_temporaries_enabled_p): Return bool.
14187 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14188 (get_last_thread_stack_temporary): Update.
14189 * eval.c (evaluate_subexp): Update.
14190 * gdbthread.h (class enable_thread_stack_temporaries): Now a
14191 class, not a function.
14192 (value_ptr, value_vec): Remove typedefs.
14193 (class thread_info) <stack_temporaries_enabled>: Now bool.
14194 <stack_temporaries>: Now a std::vector.
14195 (thread_stack_temporaries_enabled_p)
14196 (value_in_thread_stack_temporaries): Return bool.
14197
14198 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
14199
14200 * remote.c (putpkt_binary): Fix omitted bytes reporting.
14201 (getpkt_or_notif_sane_1): Likewise.
14202
14203 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14204
14205 * build-id.c (build_id_to_debug_bfd): Use std::string.
14206
14207 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14208
14209 * build-id.c (find_separate_debug_file_by_buildid): Return
14210 std::string.
14211 * build-id.h (find_separate_debug_file_by_buildid): Return
14212 std::string.
14213 * coffread.c (coff_symfile_read): Adjust to std::string.
14214 * elfread.c (elf_symfile_read): Adjust to std::string.
14215 * symfile.c (separate_debug_file_exists): Change parameter to
14216 std::string.
14217 (find_separate_debug_file): Return std::string.
14218 (find_separate_debug_file_by_debuglink): Return std::string.
14219 * symfile.h (find_separate_debug_file_by_debuglink): Return
14220 std::string.
14221
14222 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14223
14224 * common/xml-utils.c (xml_escape_text): Move code to...
14225 (xml_escape_text_append): ... this new function.
14226 * common/xml-utils.h (xml_escape_text_append): New declaration.
14227 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14228 New function.
14229 (_initialize_xml_utils): register test_xml_escape_text_append as
14230 a selftest.
14231
14232 2018-03-07 Alan Hayward <alan.hayward@arm.com>
14233
14234 * defs.h: Remove MAX_REGISTER_SIZE.
14235 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14236 asserts.
14237 * python/py-unwind.c (pyuw_sniffer): Likewise.
14238
14239 2018-03-07 Tom Tromey <tom@tromey.com>
14240
14241 * linux-tdep.c (linux_info_proc): Update.
14242 * target.h (struct target_ops) <to_fileio_readlink>: Return
14243 optional<string>.
14244 (target_fileio_readlink): Return optional<string>.
14245 * remote.c (remote_hostio_readlink): Return optional<string>.
14246 * inf-child.c (inf_child_fileio_readlink): Return
14247 optional<string>.
14248 * target.c (target_fileio_readlink): Return optional<string>.
14249
14250 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
14251
14252 * regcache.c (cooked_read_test): Add riscv to the list of
14253 architectures that have a save_reggroup.
14254
14255 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
14256
14257 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14258 value is not a dynamic class object.
14259
14260 2018-03-06 Tom Tromey <tom@tromey.com>
14261
14262 * rust-exp.y: Formatting fixes.
14263
14264 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14265
14266 * riscv-tdep.c (riscv_register_name): Remove target description
14267 support.
14268 (riscv_gdbarch_init): Remove target description check.
14269
14270 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14271
14272 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14273 comment.
14274 * riscv-tdep.h: Likewise.
14275
14276 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14277
14278 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14279 (riscv_pseudo_register_write): Delete.
14280 (riscv_gdbarch_init): Remove all use of pseudo registers.
14281
14282 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14283
14284 * record-btrace.c (btrace_print_lines): Replace cleanup
14285 parameter with RAII equivalents.
14286 (btrace_insn_history): Replace cleanup with RAII equivalents.
14287 * ui-out.h (make_cleanup_ui_out_list_begin_end,
14288 make_cleanup_ui_out_tuple_begin_end): Remove.
14289 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14290 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14291 make_cleanup_ui_out_list_begin_end): Remove.
14292
14293 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14294
14295 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14296 parameter types to std::vector. Use bool.
14297 (record_btrace_wait): Replace VEC(tp_t) with
14298 std::vector<thread_info *>.
14299 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14300
14301 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14302
14303 * record-btrace.c (record_btrace_disable_callback): Remove.
14304 (struct scoped_btrace_disable): New.
14305 (record_btrace_open): Use scoped_btrace_disable.
14306
14307 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14308
14309 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14310 reading values from registers.
14311
14312 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14313
14314 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14315 where appropriate.
14316
14317 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14318
14319 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14320 change parameter type. Use GDB's print functions, and use
14321 core_addr_to_string where appropriate.
14322 (riscv_push_dummy_call): Use core_addr_to_string where
14323 appropriate, update call to riscv_print_arg_location, and reindent
14324 a few lines.
14325 (riscv_return_value): Update call to riscv_print_arg_location.
14326
14327 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14328 Tim Newsome <tim@sifive.com>
14329 Albert Ou <a0u@eecs.berkeley.edu>
14330 Darius Rad <darius@bluespec.com>
14331
14332 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14333 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14334 (ALLDEPFILES): Add riscv-tdep.c
14335 * configure.tgt: Add riscv support.
14336 * riscv-tdep.c: New file.
14337 * riscv-tdep.h: New file.
14338 * NEWS: Mention new target.
14339 * MAINTAINERS: Add entry for riscv.
14340
14341 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14342
14343 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14344 fields within aggregates.
14345
14346 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
14347
14348 * record-btrace.c (btrace_print_lines): Change type of flags to
14349 gdb_disassembly_flags.
14350
14351 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14352
14353 * fbsd-nat.c: Include "inf-ptrace.h".
14354 (USE_SIGTRAP_SIGINFO): Conditionally define.
14355 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14356 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14357 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14358 function.
14359 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14360 Likewise.
14361 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14362 Likewise.
14363 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14364 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14365 "supports_stopped_by_hw_breakpoint" target methods.
14366
14367 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14368
14369 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14370 * fbsd-nat.c (debug_fbsd_nat): New variable.
14371 (show_fbsd_nat_debug): New function.
14372 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14373 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14374
14375 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14376
14377 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14378 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14379 prototype.
14380 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14381 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14382 method.
14383
14384 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14385
14386 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14387 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14388
14389 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14390
14391 * charset.c (struct charset_vector): New.
14392 (charsets): Change type to charset_vector.
14393 (find_charset_names): Adjust.
14394 (add_one): Adjust.
14395 (_initialize_charset): Adjust.
14396
14397 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14398
14399 * progspace.h (struct program_space) <deleted_solibs>: Change
14400 type to std::vector<std::string>.
14401 * progspace.c (clear_program_space_solib_cache): Adjust.
14402 * breakpoint.c (print_solib_event): Adjust.
14403 (check_status_catch_solib): Adjust.
14404 * solib.c (update_solib_list): Adjust.
14405 * ui-out.h (class ui_out) <field_string>: New overload.
14406 * ui-out.c (ui_out::field_string): New overload.
14407
14408 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14409
14410 * progspace.h (struct program_space): Add constructor and
14411 destructor, initialize fields.
14412 (add_program_space): Remove.
14413 * progspace.c (add_program_space): Rename to...
14414 (program_space::program_space): ... this.
14415 (release_program_space): Rename to...
14416 (program_space::~program_space): ... this.
14417 (delete_program_space): Use delete to delete program_space.
14418 (initialize_progspace): Use new to allocate program_space.
14419 * inferior.c (add_inferior_with_spaces): Likewise.
14420 (clone_inferior_command): Likewise.
14421 * infrun.c (follow_fork_inferior): Likewise.
14422 (handle_vfork_child_exec_or_exit): Likewise.
14423
14424 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14425
14426 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14427 (delim_string_to_char_ptr_vec): Return std::vector of
14428 gdb::unique_xmalloc_ptr.
14429 (dirnames_to_char_ptr_vec_append): Take std::vector of
14430 gdb::unique_xmalloc_ptr.
14431 (dirnames_to_char_ptr_vec): Return std::vector of
14432 gdb::unique_xmalloc_ptr.
14433 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14434 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14435 (delim_string_to_char_ptr_vec): Return an std::vector of
14436 gdb::unique_xmalloc_ptr, adjust the code.
14437 (dirnames_to_char_ptr_vec_append): Take an std::vector of
14438 gdb::unique_xmalloc_ptr, adjust the code.
14439 (dirnames_to_char_ptr_vec): Return an std::vector of
14440 gdb::unique_xmalloc_ptr, adjust the code.
14441 * auto-load.c (auto_load_safe_path_vec): Change type to
14442 std::vector of gdb::unique_xmalloc_ptr.
14443 (auto_load_expand_dir_vars): Return an std::vector of
14444 gdb::unique_xmalloc_ptr, adjust the code.
14445 (auto_load_safe_path_vec_update): Adjust.
14446 (filename_is_in_auto_load_safe_path_vec): Adjust.
14447 (auto_load_objfile_script_1): Adjust.
14448 * build-id.c (build_id_to_debug_bfd): Adjust.
14449 * linux-thread-db.c (thread_db_load_search): Adjust.
14450 * source.c (add_path): Adjust.
14451 (openp): Adjust.
14452 * symfile.c (find_separate_debug_file): Adjust.
14453 * utils.c (do_free_char_ptr_vec): Remove.
14454 (make_cleanup_free_char_ptr_vec): Remove.
14455
14456 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
14457
14458 PR gdb/22907
14459 * common/pathstuff.c: Conditionally include "<windows.h>".
14460
14461 2018-03-01 Georg Sauthoff <mail@georg.so>
14462
14463 PR gdb/22888
14464 * gcore.in: Quote variables and switch interpreter to bash.
14465
14466 2018-03-01 Tom Tromey <tom@tromey.com>
14467
14468 * dwarf2read.c (alloc_discriminant_info): Fix default_index
14469 assertion. Add assertion for discriminant_index.
14470 (quirk_rust_enum): Use correct base type name in univariant case.
14471
14472 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
14473
14474 * record.c (get_call_history_modifiers): Return a
14475 record_print_flags.
14476 (cmd_record_call_history): Adjust.
14477 * record-btrace.c (record_btrace_call_history): Adjust.
14478 (record_btrace_call_history_range): Adjust.
14479 (record_btrace_call_history_from): Adjust.
14480 * target-debug.h (target_debug_print_record_print_flags): New.
14481 * target-delegates.c: Re-generate.
14482 * target.c (target_call_history): Change flags type.
14483 (target_call_history_from): Likewise.
14484 (target_call_history_range): Likewise.
14485 * target.h (struct target_ops) <target_call_history>: Likewise.
14486 (target_call_history_from): Likewise.
14487 (target_call_history_range): Likewise.
14488
14489 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14490 Simon Marchi <simon.marchi@polymtl.ca>
14491
14492 * common/common-utils.c: Include "sys/stat.h".
14493 (is_regular_file): Move here from "source.c"; change return
14494 type to "bool".
14495 * common/common-utils.h (is_regular_file): New prototype.
14496 * common/pathstuff.c (contains_dir_separator): New function.
14497 * common/pathstuff.h (contains_dir_separator): New prototype.
14498 * source.c: Don't include "sys/stat.h".
14499 (is_regular_file): Move to "common/common-utils.c".
14500
14501 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14502
14503 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14504 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14505 * auto-load.c: Include "common/pathstuff.h".
14506 * common/common-def.h (current_directory): Move here.
14507 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14508 function.
14509 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14510 prototype.
14511 * common/pathstuff.c: New file.
14512 * common/pathstuff.h: New file.
14513 * compile/compile.c: Include "common/pathstuff.h".
14514 * defs.h (current_directory): Move to "common/common-defs.h".
14515 * dwarf2read.c: Include "common/pathstuff.h".
14516 * exec.c: Likewise.
14517 * guile/scm-safe-call.c: Likewise.
14518 * linux-thread-db.c: Likewise.
14519 * main.c: Likewise.
14520 * nto-tdep.c: Likewise.
14521 * objfiles.c: Likewise.
14522 * source.c: Likewise.
14523 * symtab.c: Likewise.
14524 * utils.c: Include "common/pathstuff.h".
14525 (gdb_realpath): Move to "common/pathstuff.c".
14526 (gdb_realpath_keepfile): Likewise.
14527 (gdb_abspath): Likewise.
14528 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14529 (gdb_realpath_keepfile): Likewise.
14530 (gdb_abspath): Likewise.
14531
14532 2018-02-28 John Baldwin <jhb@FreeBSD.org>
14533
14534 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14535 wildcard process pid for super_resume for kernels with a
14536 specific bug.
14537
14538 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
14539
14540 * compile/compile.c (get_args): Add additional comments
14541 explaining function.
14542
14543 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
14544 Tom Tromey <tom@tromey.com>
14545
14546 * target.h (memory_write_request_s): Remove typedef. Don't define
14547 VEC.
14548 (target_write_memory_blocks): Change argument to std::vector.
14549 (struct memory_write_request): Add constructor.
14550 * target-memory.c (compare_block_starting_address): Return bool.
14551 Change argument types.
14552 (claim_memory): Change arguments to use std::vector.
14553 (split_regular_and_flash_blocks, blocks_to_erase)
14554 (compute_garbled_blocks): Likewise.
14555 (cleanup_request_data, cleanup_write_requests_vector): Remove.
14556 (target_write_memory_blocks): Change argument to std::vector.
14557 * symfile.c (struct load_section_data): Add constructor and
14558 destructor. Use std::vector for "requests".
14559 (struct load_progress_data): Add initializers.
14560 (load_section_callback): Update. Use "new".
14561 (clear_memory_write_data): Remove.
14562 (generic_load): Update.
14563
14564 2018-02-27 Alan Hayward <alan.hayward@arm.com>
14565
14566 * arch/aarch64.h: Use common/tdesc.h.
14567
14568 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14569
14570 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14571 architecture with a 64-bit ABI.
14572
14573 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14574
14575 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14576 ahead of target description loading.
14577
14578 2018-02-26 Tom Tromey <tom@tromey.com>
14579
14580 * stack.c (backtrace_command_1): Update.
14581 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14582 of "flags".
14583 * python/py-framefilter.c (py_print_frame)
14584 (gdbpy_apply_frame_filter): Change type of "flags".
14585 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14586 of "flags".
14587 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14588 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14589 * extension.h (enum frame_filter_flag): Rename from
14590 frame_filter_flags.
14591 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14592 (apply_ext_lang_frame_filter): Change type of "flags".
14593 * extension.c (apply_ext_lang_frame_filter): Change type of
14594 "flags".
14595 * extension-priv.h (struct extension_language_ops)
14596 <apply_frame_filter>: Change type of "flags".
14597
14598 2018-02-26 Tom Tromey <tom@tromey.com>
14599
14600 PR python/16497:
14601 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
14602 off-by-one in py_end computation.
14603 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14604 PRINT_MORE_FRAMES.
14605 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14606 constant.
14607
14608 2018-02-26 Tom Tromey <tom@tromey.com>
14609
14610 * dwarf2read.c (struct variant_field): New.
14611 (struct nextfield) <variant>: New field.
14612 (dwarf2_add_field): Handle DW_TAG_variant_part.
14613 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14614 discriminated union.
14615 (read_structure_type): Handle DW_TAG_variant_part.
14616 (handle_struct_member_die): New function, extracted from
14617 process_structure_scope. Handle DW_TAG_variant.
14618 (process_structure_scope): Handle discriminated unions. Call
14619 handle_struct_member_die.
14620
14621 2018-02-26 Tom Tromey <tom@tromey.com>
14622
14623 * rust-lang.h (rust_last_path_segment): Declare.
14624 * rust-lang.c (rust_last_path_segment): Now public. Change
14625 contract.
14626 (struct disr_info): Remove.
14627 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14628 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14629 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14630 (rust_enum_p, rust_enum_variant): New function.
14631 (rust_underscore_fields): Remove "offset" parameter.
14632 (rust_print_enum): New function.
14633 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14634 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14635 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
14636 enums.
14637 (rust_internal_print_type): New function, from rust_print_type.
14638 Remove enum code.
14639 (rust_print_type): Call rust_internal_print_type.
14640 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14641 Update enum handling.
14642 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14643 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14644 (rust_union_quirks): New functions.
14645 (process_full_comp_unit, process_full_type_unit): Call
14646 rust_union_quirks.
14647 (process_structure_scope): Update rust_unions if necessary.
14648
14649 2018-02-26 Tom Tromey <tom@tromey.com>
14650
14651 * value.h (value_union_variant): Declare.
14652 * valops.c (value_union_variant): New function.
14653 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14654 (struct discriminant_info): New.
14655 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14656 enumerator.
14657 (struct main_type) <flag_discriminated_union>: New field.
14658
14659 2018-02-26 Tom Tromey <tom@tromey.com>
14660
14661 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14662 unittests/unpack-selftests.c.
14663 * unittests/unpack-selftests.c: New file.
14664 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14665
14666 2018-02-26 Yao Qi <yao.qi@linaro.org>
14667
14668 * dwarf2read.c (struct partial_die_info) <read>: New method.
14669 (read_partial_die): Remove the declaration.
14670 (load_partial_dies): Update.
14671 (partial_die_info::partial_die_info):
14672 (read_partial_die): Change it to partial_die_info::read.
14673
14674 2018-02-26 Yao Qi <yao.qi@linaro.org>
14675
14676 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14677 (fixup_partial_die): Remove declaration.
14678 (scan_partial_symbols): Update.
14679 (partial_die_parent_scope): Likewise.
14680 (partial_die_full_name): Likewise.
14681 (fixup_partial_die): Change it to partial_die_info::fixup.
14682
14683 2018-02-26 Yao Qi <yao.qi@linaro.org>
14684
14685 * dwarf2read.c (read_partial_die): Update the declaration.
14686 (load_partial_dies): Caller update.
14687 (read_partial_die): Remove one argument abbrev_len.
14688
14689 2018-02-26 Yao Qi <yao.qi@linaro.org>
14690
14691 * dwarf2read.c (struct partial_die_info): Add ctor, delete
14692 assignment operator.
14693 (load_partial_dies): Use ctor and copy ctor.
14694 (read_partial_die): Update.
14695 (dwarf2_cu::find_partial_die): Use ctor.
14696
14697 2018-02-26 Yao Qi <yao.qi@linaro.org>
14698
14699 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14700 (find_partial_die_in_comp_unit): Change it to
14701 dwarf2_cu::find_partial_die.
14702 (find_partial_die): Update.
14703
14704 2018-02-26 Yao Qi <yao.qi@linaro.org>
14705
14706 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14707 is NULL.
14708
14709 2018-02-26 Yao Qi <yao.qi@linaro.org>
14710
14711 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14712
14713 2018-02-26 Alan Hayward <alan.hayward@arm.com>
14714
14715 * arch/amd64.h: Use common/tdesc.h.
14716 * arch/i386.c: Likewise.
14717 * arch/i386.h: Likewise.
14718 * arch/tic6x.c: Likewise.
14719 * arch/tdesc.h: Move file from here...
14720 * common/tdesc.h: ...to here.
14721 * features/aarch64-core.c: Regenerate.
14722 * features/aarch64-fpu.c: Regenerate.
14723 * features/i386/32bit-avx.c: Regenerate.
14724 * features/i386/32bit-avx512.c: Regenerate.
14725 * features/i386/32bit-core.c: Regenerate.
14726 * features/i386/32bit-linux.c: Regenerate.
14727 * features/i386/32bit-mpx.c: Regenerate.
14728 * features/i386/32bit-pkeys.c: Regenerate.
14729 * features/i386/32bit-sse.c: Regenerate.
14730 * features/i386/64bit-avx.c: Regenerate.
14731 * features/i386/64bit-avx512.c: Regenerate.
14732 * features/i386/64bit-core.c: Regenerate.
14733 * features/i386/64bit-linux.c: Regenerate.
14734 * features/i386/64bit-mpx.c: Regenerate.
14735 * features/i386/64bit-pkeys.c: Regenerate.
14736 * features/i386/64bit-segments.c: Regenerate.
14737 * features/i386/64bit-sse.c: Regenerate.
14738 * features/i386/x32-core.c: Regenerate.
14739 * features/tic6x-c6xp.c: Regenerate.
14740 * features/tic6x-core.c: Regenerate.
14741 * features/tic6x-gp.c: Regenerate.
14742 * target-descriptions.c: Use common/tdesc.h.
14743 * target-descriptions.h: Likewise.
14744
14745 2018-02-24 Tom Tromey <tom@tromey.com>
14746
14747 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14748 (try_thread_db_load_from_dir, thread_db_load_search): Use
14749 std::string.
14750 (info_auto_load_libthread_db_compare): Return bool. Change
14751 argument types.
14752 (info_auto_load_libthread_db): Use std::vector, std::string.
14753 Remove cleanups.
14754
14755 2018-02-24 Tom Tromey <tom@tromey.com>
14756
14757 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14758 std::string.
14759 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14760 std::string*.
14761 * gdbarch.c: Rebuild.
14762 * gdbarch.h: Rebuild.
14763 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14764 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14765 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14766 std::string*.
14767
14768 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
14769
14770 * gdbtypes.h (sect_offset): Change type to uint64_t.
14771 (sect_offset_str): New function.
14772 * dwarf2read.c (create_addrmap_from_aranges): Use
14773 sect_offset_str.
14774 (error_check_comp_unit_head): Likewise.
14775 (create_debug_type_hash_table): Likewise.
14776 (read_cutu_die_from_dwo): Likewise.
14777 (init_cutu_and_read_dies): Likewise.
14778 (init_cutu_and_read_dies_no_follow): Likewise.
14779 (process_psymtab_comp_unit_reader): Likewise.
14780 (partial_die_parent_scope): Likewise.
14781 (peek_die_abbrev): Likewise.
14782 (process_queue): Likewise.
14783 (dwarf2_physname): Likewise.
14784 (read_namespace_alias): Likewise.
14785 (read_import_statement): Likewise.
14786 (create_dwo_cu_reader): Likewise.
14787 (create_cus_hash_table): Likewise.
14788 (lookup_dwo_cutu): Likewise.
14789 (inherit_abstract_dies): Likewise.
14790 (read_func_scope): Likewise.
14791 (read_call_site_scope): Likewise.
14792 (dwarf2_add_member_fn): Likewise.
14793 (read_common_block): Likewise.
14794 (read_module_type): Likewise.
14795 (read_typedef): Likewise.
14796 (read_subrange_type): Likewise.
14797 (load_partial_dies): Likewise.
14798 (read_partial_die): Likewise.
14799 (find_partial_die): Likewise.
14800 (read_str_index): Likewise.
14801 (dwarf2_string_attr): Likewise.
14802 (build_error_marker_type): Likewise.
14803 (lookup_die_type): Likewise.
14804 (dump_die_shallow): Likewise.
14805 (follow_die_ref): Likewise.
14806 (dwarf2_fetch_die_loc_sect_off): Likewise.
14807 (dwarf2_fetch_constant_bytes): Likewise.
14808 (follow_die_sig): Likewise.
14809 (get_signatured_type): Likewise.
14810 (get_DW_AT_signature_type): Likewise.
14811 (dwarf2_find_containing_comp_unit): Likewise.
14812 (set_die_type): Likewise.
14813
14814 2018-02-21 John Baldwin <jhb@FreeBSD.org>
14815
14816 * arch/aarch64.c: Include "common-defs.h".
14817 * arch/amd64.c: Likewise.
14818 * arch/i386.c: Likewise.
14819
14820 2018-02-21 Tom Tromey <tom@tromey.com>
14821
14822 * value.h: (extract_field_op): Update.
14823 * eval.c (extract_field_op): Return a const char *.
14824 * expression.h (parse_expression_for_completion): Update.
14825 * completer.c (complete_expression): Update.
14826 (add_struct_fields): Make fieldname const.
14827 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14828 (mark_completion_tag, parse_exp_in_context_1): Update.
14829 (parse_expression_for_completion): Change "name" to
14830 unique_xmalloc_ptr*.
14831
14832 2018-02-21 Tom Tromey <tom@tromey.com>
14833
14834 * infcall.c (call_function_by_hand_dummy): Use std::vector.
14835
14836 2018-02-21 Yao Qi <yao.qi@linaro.org>
14837
14838 * avr-tdep.c (avr_read_pc): Change parameter type to
14839 readable_regcache.
14840 * gdbarch.sh (read_pc): Likewise.
14841 * gdbarch.c: Re-generated.
14842 * gdbarch.h: Re-generated.
14843 * hppa-tdep.c (hppa_read_pc): Change parameter type to
14844 readable_regcache.
14845 * ia64-tdep.c (ia64_read_pc): Likewise.
14846 * mips-tdep.c (mips_read_pc): Likewise.
14847 * spu-tdep.c (spu_read_pc): Likewise.
14848
14849 2018-02-21 Yao Qi <yao.qi@linaro.org>
14850
14851 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14852 * regcache-dump.c: New file.
14853 * regcache.c: Move register_dump to regcache-dump.c.
14854 (maintenance_print_registers): Likewise.
14855 (maintenance_print_raw_registers): Likewise.
14856 (maintenance_print_cooked_registers): Likewise.
14857 (maintenance_print_register_groups): Likewise.
14858 (maintenance_print_remote_registers): Likewise.
14859 (_initialize_regcache): Likewise.
14860 * regcache.h (register_dump): Moved from regcache.c.
14861
14862 2018-02-21 Yao Qi <yao.qi@linaro.org>
14863
14864 * regcache.c (regcache::regcache): Update.
14865 (regcache::invalidate): Move it to detached_regcache::invalidate.
14866 (get_thread_arch_aspace_regcache): Update.
14867 (regcache::raw_update): Update.
14868 (regcache::cooked_read): Remove some code.
14869 (regcache::cooked_read_value): Likewise.
14870 (regcache::raw_write): Remove assert on m_readonly_p.
14871 (regcache::raw_supply_integer): Move it to
14872 detached_regcache::raw_supply_integer.
14873 (regcache::raw_supply_zeroed): Likewise.
14874 * regcache.h (detached_regcache) <raw_supply_integer>: New
14875 declaration.
14876 <raw_supply_zeroed, invalidate>: Likewise.
14877 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14878 <invalidate>: Likewise.
14879 <m_readonly_p>: Removed.
14880
14881 2018-02-21 Yao Qi <yao.qi@linaro.org>
14882
14883 * infcmd.c (get_return_value): Let stop_regs point to
14884 get_current_regcache.
14885 * regcache.c (regcache::regcache): Remove.
14886 (register_dump_reg_buffer): New class.
14887 (regcache_print): Adjust.
14888 * regcache.h (regcache): Remove constructors.
14889
14890 2018-02-21 Yao Qi <yao.qi@linaro.org>
14891
14892 * regcache.c (class register_dump): New class.
14893 (register_dump_regcache, register_dump_none): New class.
14894 (register_dump_remote, register_dump_groups): New class.
14895 (regcache_print): Update.
14896 * regcache.h (regcache_dump_what): Move it to regcache.c.
14897 (regcache) <dump>: Remove.
14898
14899 2018-02-21 Yao Qi <yao.qi@linaro.org>
14900
14901 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14902 reg_buffer_rw *.
14903 (jit_unwind_reg_set_impl): Call raw_supply.
14904 (jit_frame_sniffer): Use reg_buffer_rw.
14905 * record-full.c (record_full_core_regbuf): Change its type.
14906 (record_full_core_open_1): Use reg_buffer_rw.
14907 (record_full_close): Likewise.
14908 (record_full_core_fetch_registers): Use regcache->raw_supply.
14909 (record_full_core_store_registers): Likewise.
14910 * regcache.c (regcache::get_register_status): Move it to
14911 reg_buffer.
14912 (regcache_raw_set_cached_value): Remove.
14913 (regcache::raw_set_cached_value): Remove.
14914 (regcache::raw_write): Call raw_supply.
14915 (regcache::raw_supply): Move it to reg_buffer_rw.
14916 * regcache.h (regcache_raw_set_cached_value): Remove.
14917 (reg_buffer_rw): New class.
14918
14919 2018-02-21 Yao Qi <yao.qi@linaro.org>
14920
14921 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14922 readonly_detached_regcache.
14923 (dummy_frame_prev_register): Use regcache->cooked_read.
14924 * frame.c (frame_save_as_regcache): Change return type.
14925 (frame_pop): Update.
14926 * frame.h (frame_save_as_regcache): Update declaration.
14927 * inferior.h (get_infcall_suspend_state_regcache): Update
14928 declaration.
14929 * infrun.c (infcall_suspend_state) <registers>: use
14930 readonly_detached_regcache.
14931 (save_infcall_suspend_state): Don't use regcache_dup.
14932 (get_infcall_suspend_state_regcache): Change return type.
14933 * linux-fork.c (struct fork_info) <savedregs>: Change to
14934 readonly_detached_regcache.
14935 <pc>: New field.
14936 (fork_save_infrun_state): Don't use regcache_dup.
14937 (info_checkpoints_command): Adjust.
14938 * mi/mi-main.c (register_changed_p): Update declaration.
14939 (mi_cmd_data_list_changed_registers): Use
14940 readonly_detached_regcache.
14941 (register_changed_p): Change parameter type to
14942 readonly_detached_regcache.
14943 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14944 readonly_detached_regcache.
14945 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14946 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14947 New.
14948 (regcache::save): Move it to reg_buffer.
14949 (regcache::restore): Change parameter type.
14950 (regcache_dup): Remove.
14951 * regcache.h (reg_buffer) <save>: New method.
14952 (readonly_detached_regcache): New class.
14953 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14954 readonly_detached_regcache.
14955 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14956
14957 2018-02-21 Yao Qi <yao.qi@linaro.org>
14958
14959 * frame.c (frame_save_as_regcache): Use regcache method save.
14960 (frame_pop): Use regcache method restore.
14961 * infrun.c (restore_infcall_suspend_state): Likewise.
14962 * linux-fork.c (fork_load_infrun_state): Likewise.
14963 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14964 save.
14965 * regcache.c (regcache_save): Remove.
14966 (regcache::restore): More asserts.
14967 (regcache_cpy): Remove.
14968 * regcache.h (regcache_save): Remove the declaration.
14969 (regcache::restore): Move from private to public.
14970 Remove the friend declaration of regcache_cpy.
14971 (regcache_cpy): Remove declaration.
14972
14973 2018-02-21 Yao Qi <yao.qi@linaro.org>
14974
14975 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14976 parameter type to 'readable_regcache *'.
14977 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14978 * arm-tdep.c (arm_neon_quad_read): Likewise.
14979 (arm_pseudo_read): Likewise.
14980 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14981 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14982 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14983 * gdbarch.c: Re-generated.
14984 * gdbarch.h: Re-generated.
14985 * gdbarch.sh (pseudo_register_read): Change parameter type to
14986 'readable_regcache *'.
14987 (pseudo_register_read_value): Likewise.
14988 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14989 (h8300_pseudo_register_read): Likewise.
14990 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14991 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14992 (i386_pseudo_register_read_into_value): Likewise.
14993 (i386_pseudo_register_read_value): Likewise.
14994 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14995 declaration.
14996 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14997 * m32c-tdep.c (m32c_raw_read): Likewise.
14998 (m32c_read_flg): Likewise.
14999 (m32c_banked_register): Likewise.
15000 (m32c_banked_read): Likewise.
15001 (m32c_sb_read): Likewise.
15002 (m32c_part_read): Likewise.
15003 (m32c_cat_read): Likewise.
15004 (m32c_r3r2r1r0_read): Likewise.
15005 (m32c_pseudo_register_read): Likewise.
15006 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15007 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15008 (mep_pseudo_cr64_read): Likewise.
15009 (mep_pseudo_register_read): Likewise.
15010 * mips-tdep.c (mips_pseudo_register_read): Likewise.
15011 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15012 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15013 * regcache.c (regcache::raw_read): Move it to readable_regcache.
15014 (regcache::cooked_read): Likewise.
15015 (regcache::cooked_read_value): Likewise.
15016 (regcache_cooked_read_signed):
15017 (regcache::cooked_read): Likewise.
15018 * regcache.h (readable_regcache): New class.
15019 (regcache): Inherit readable_regcache. Move some methods to
15020 readable_regcache.
15021 * rl78-tdep.c (rl78_pseudo_register_read): Change
15022 parameter type to 'readable_regcache *'.
15023 * rs6000-tdep.c (do_regcache_raw_read): Remove.
15024 (e500_pseudo_register_read): Change parameter type to
15025 'readable_regcache *'.
15026 (dfp_pseudo_register_read): Likewise.
15027 (vsx_pseudo_register_read): Likewise.
15028 (efpr_pseudo_register_read): Likewise.
15029 * s390-tdep.c (s390_pseudo_register_read): Likewise.
15030 * sh-tdep.c (sh_pseudo_register_read): Likewise.
15031 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
15032 (sh64_pseudo_register_read): Likewise.
15033 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15034 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15035 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15036 (spu_pseudo_register_read): Likewise.
15037 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15038 (xtensa_pseudo_register_read): Likewise.
15039
15040 2018-02-21 Yao Qi <yao.qi@linaro.org>
15041
15042 * regcache.c (regcache::regcache): Call reg_buffer ctor.
15043 (regcache::arch): Move it to reg_buffer::arch.
15044 (regcache::register_buffer): Likewise.
15045 (regcache::assert_regnum): Likewise.
15046 (regcache::num_raw_registers): Likewise.
15047 * regcache.h (reg_buffer): New class.
15048 (regcache): Inherit reg_buffer.
15049
15050 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
15051
15052 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
15053 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
15054
15055 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
15056
15057 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
15058
15059 2018-02-19 Alan Hayward <alan.hayward@arm.com>
15060
15061 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
15062 (SFILES): Remove common/*.c files.
15063 (COMMON_OBS): Remove some *.o files built from common/*.c files.
15064 * common/common.host: Add common reference.
15065 * configure.ac: Likewise.
15066 * configure: Regenerate.
15067
15068 2018-02-16 Yao Qi <yao.qi@linaro.org>
15069
15070 * block.c (block_namespace_info): Inherit allocate_on_obstack.
15071 (block_initialize_namespace): Use new.
15072 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
15073 (dwarf2_free_objfile): Use delete.
15074 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
15075 (copy_type_recursive): Use new.
15076 * gdb_obstack.h (allocate_on_obstack): New.
15077
15078 2018-02-15 Yao Qi <yao.qi@linaro.org>
15079
15080 PR gdb/22849
15081 * inferior.c (exit_inferior_1): Reset inf->control.
15082
15083 2018-02-15 Joel Brobecker <brobecker@adacore.com>
15084
15085 * ada-lang.c (ada_to_fixed_value_create): Delete advance
15086 declaration.
15087
15088 2018-02-14 Pedro Alves <palves@redhat.com>
15089
15090 * frame-unwind.c (frame_unwind_try_unwinder): Always call
15091 frame_cleanup_after_sniffer on exception.
15092
15093 2018-02-14 Tom Tromey <tom@tromey.com>
15094
15095 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
15096 const.
15097 (solib_bfd_open): Make pathname const.
15098 * solib.c (solib_bfd_open): Make pathname const.
15099 * solib-spu.c (spu_bfd_fopen): Make name const.
15100 (spu_bfd_open): Make pathname const.
15101 * solib-darwin.c (darwin_bfd_open): Make pathname const.
15102 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15103
15104 2018-02-14 Tom Tromey <tom@tromey.com>
15105
15106 * symfile.c (symfile_bfd_open): Update.
15107 * source.h (openp, source_full_path_of, find_and_open_source):
15108 Change argument type to unique_xmalloc_ptr.
15109 * source.c (openp): Take a unique_xmalloc_ptr.
15110 (source_full_path_of, find_and_open_source): Likewise.
15111 (open_source_file, symtab_to_fullname): Update.
15112 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15113 unique_xmalloc_ptr.
15114 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15115 (exec_file_find): Update.
15116 * psymtab.c (psymtab_to_fullname): Update.
15117 * nto-tdep.h (nto_find_and_open_solib): Update.
15118 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15119 unique_xmalloc_ptr.
15120 * exec.c (exec_file_attach): Update.
15121 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15122 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15123
15124 2018-02-14 Tom Tromey <tom@tromey.com>
15125
15126 * solib.c: Include source.h.
15127 * nto-tdep.c: Include source.h.
15128 * mi/mi-cmd-env.c: Include source.h.
15129 * infcmd.c: Include source.h.
15130 * exec.c: Include source.h.
15131 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15132 (add_path, directory_switch, source_path, init_source_path): Move
15133 declarations...
15134 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15135 (add_path, directory_switch, source_path, init_source_path):
15136 ...here.
15137
15138 2018-02-14 Tom Tromey <tom@tromey.com>
15139
15140 * solist.h (exec_file_find, solib_find): Return
15141 unique_xmalloc_ptr.
15142 (solib_bfd_fopen): Take a const char *.
15143 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15144 (exec_file_find, solib_find): Likewise.
15145 (solib_bfd_fopen): Do not take ownership of "pathname".
15146 (solib_bfd_open): Use unique_xmalloc_ptr.
15147 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15148 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15149 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15150 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15151
15152 2018-02-14 Joel Brobecker <brobecker@adacore.com>
15153
15154 * ada-lang.c (name_match_type_from_name): Remove reference to
15155 ada_name_for_lookup in function's documentation.
15156 * ada-lang.h (ada_name_for_lookup): Delete declaration.
15157
15158 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
15159
15160 * defs.h (enum openp_flags): New enum.
15161 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15162 Move to enum openp_flags.
15163 (openp_flags): New enum flags.
15164 (openp): Change parameter type to openp_flags.
15165 * source.c (openp): Change parameter type to openp_flags.
15166 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15167 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15168
15169 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
15170
15171 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15172 per-command.
15173
15174 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
15175
15176 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15177 into...
15178 (class dwarf2_queue_guard): ...the destructor of this new class.
15179 (dw2_do_instantiate_symtab): Create instance of the new class
15180 dwarf2_queue_guard, remove cleanup.
15181
15182 2018-02-09 Tom Tromey <tom@tromey.com>
15183
15184 * source.c (find_source_lines): Don't reference past the end of
15185 the vector.
15186
15187 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15188
15189 * remote.c (remote_btrace_maybe_reopen): Change error message.
15190 * btrace.c (btrace_enable): Likewise.
15191 (parse_xml_btrace): Likewise.
15192 (parse_xml_btrace_conf): Likewise.
15193
15194 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15195
15196 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15197 (linux_enable_pt, linux_enable_bts): Call
15198 diagnose_perf_event_open_fail.
15199
15200 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15201
15202 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15203 Remove parameter and change return type. Update callers. Move it.
15204 (linux_enable_bts, linux_enable_pt): Improve error message.
15205 (linux_enable_pt): Remove zero buffer size check.
15206 (linux_enable_btrace): Improve error messages. Remove NULL return
15207 check.
15208
15209 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15210
15211 * btrace.c (btrace_enable): Remove target_supports_btrace call.
15212 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15213 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15214 (linux_supports_pt, linux_supports_btrace): Remove.
15215 (linux_enable_bts): Call cpu_supports_bts.
15216 * nat/linux-btrace.h (linux_supports_btrace): Remove.
15217 * remote.c (remote_supports_btrace): Remove.
15218 (init_remote_ops): Remove remote_supports_btrace.
15219 * target-delegates.c: Regenerated.
15220 * target.c (target_supports_btrace): Remove.
15221 * target.h (target_ops) <to_supports_btrace>: Remove
15222 (target_supports_btrace): Remove.
15223 * x86-linux-nat.c (x86_linux_create_target): Remove
15224 linux_supports_btrace.
15225
15226 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15227
15228 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15229 btrace failed.
15230 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15231 exception and use message in own exception.
15232
15233 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15234
15235 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15236 (perf_event_pt_event_type): Use gdb_file_up.
15237 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15238 scoped_fd, and scoped_mmap.
15239
15240 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15241
15242 * common/scoped_mmap.h: New.
15243 * unittests/scoped_mmap-selftest.c: New.
15244 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15245 unittests/scoped_mmap-selftest.c.
15246
15247 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15248
15249 * common/scoped_fd.h: New.
15250 * unittests/scoped_fd-selftest.c: New.
15251 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15252 unittests/scoped_fd-selftest.c.
15253
15254 2018-02-09 Tom Tromey <tom@tromey.com>
15255
15256 * auto-load.c (auto_load_section_scripts): Use
15257 gdb::unique_xmalloc_ptr.
15258
15259 2018-02-09 Tom Tromey <tom@tromey.com>
15260
15261 * auto-load.c (execute_script_contents): Use std::string.
15262
15263 2018-02-09 Joel Brobecker <brobecker@adacore.com>
15264
15265 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15266 Python function, rather than a new command.
15267
15268 2018-02-08 Tom Tromey <tom@tromey.com>
15269
15270 * solib.c (solib_find_1): Use std::string.
15271 (solib_bfd_fopen): Use unique_xmalloc_ptr.
15272
15273 2018-02-08 Tom Tromey <tom@tromey.com>
15274
15275 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15276
15277 2018-02-08 Tom Tromey <tom@tromey.com>
15278
15279 * source.c (find_source_lines): Use gdb::def_vector.
15280
15281 2018-02-08 Tom Tromey <tom@tromey.com>
15282
15283 * macrocmd.c (struct temporary_macro_definition): New.
15284 (macro_define_command): Use temporary_macro_definition. Remove
15285 cleanups.
15286 (free_macro_definition_ptr): Remove.
15287
15288 2018-02-08 Tom Tromey <tom@tromey.com>
15289
15290 * macroexp.c (maybe_expand): Use std::string.
15291
15292 2018-02-08 Tom Tromey <tom@tromey.com>
15293
15294 * macroexp.c (struct macro_buffer): Add initializers for some
15295 members.
15296 (init_buffer, init_shared_buffer, free_buffer)
15297 (free_buffer_return_text): Remove.
15298 (macro_buffer): New constructors.
15299 (~macro_buffer): New destructor.
15300 (macro_buffer::set_shared): New method.
15301 (macro_buffer::resize_buffer, macro_buffer::appendc)
15302 (macro_buffer::appendmem): Now methods, not free functions.
15303 (set_token, append_tokens_without_splicing, stringify)
15304 (macro_stringify): Update.
15305 (gather_arguments): Change return type. Remove argc_p argument,
15306 add args_ptr argument. Use std::vector.
15307 (substitute_args): Remove argc argument. Accept std::vector.
15308 (expand): Update. Use std::vector.
15309 (scan, macro_expand, macro_expand_next): Update.
15310
15311 2018-02-08 Tom Tromey <tom@tromey.com>
15312
15313 * symtab.c (default_collect_symbol_completion_matches_break_on):
15314 Use unique_xmalloc_ptr.
15315 * macroscope.h: (sal_macro_scope, user_macro_scope)
15316 (default_macro_scope): Return unique_xmalloc_ptr.
15317 * macroscope.c (sal_macro_scope, user_macro_scope)
15318 (default_macro_scope): Return unique_xmalloc_ptr.
15319 * macroexp.h (macro_expand, macro_expand_once): Return
15320 unique_xmalloc_ptr.
15321 * macroexp.c (macro_expand, macro_expand_once): Return
15322 unique_xmalloc_ptr.
15323 * macrocmd.c (macro_expand_command, macro_expand_once_command)
15324 (info_macro_command, info_macros_command): Use
15325 unique_xmalloc_ptr.
15326 * compile/compile-c-support.c (write_macro_definitions): Use
15327 unique_xmalloc_ptr.
15328 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15329
15330 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
15331
15332 * value.c (value_static_field): Assign field type instead of
15333 containing type when returning an optimized out value.
15334
15335 2018-02-06 Yao Qi <yao.qi@linaro.org>
15336
15337 * ft32-tdep.c (ft32_read_pc): Remove.
15338 (ft32_write_pc): Remove.
15339 (ft32_gdbarch_init): Update.
15340 * m32r-tdep.c (m32r_read_pc): Remove.
15341 (m32r_gdbarch_init): Update.
15342 * mep-tdep.c (mep_read_pc): Remove.
15343 (mep_gdbarch_init): Update.
15344 * microblaze-tdep.c (microblaze_write_pc): Remove.
15345 (microblaze_gdbarch_init): Update.
15346 * mn10300-tdep.c (mn10300_read_pc): Remove.
15347 (mn10300_write_pc): Remove.
15348 (mn10300_gdbarch_init): Update.
15349 * moxie-tdep.c (moxie_read_pc): Remove.
15350 (moxie_write_pc): Remove.
15351 (moxie_gdbarch_init): Update.
15352
15353 2018-02-06 Yao Qi <yao.qi@linaro.org>
15354
15355 * expprint.c (print_subexp_standard): Handle
15356 OP_F77_UNDETERMINED_ARGLIST.
15357 (dump_subexp_body_standard): Likewise.
15358
15359 2018-02-05 Alan Hayward <alan.hayward@arm.com>
15360
15361 * target-descriptions.c (tdesc_element_visitor) Add empty
15362 implementations.
15363 (tdesc_type): Move make_gdb_type from here.
15364 (tdesc_type_builtin): Likewise.
15365 (tdesc_type_vector): Likewise.
15366 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15367 (make_gdb_type_struct): Move from tdesc_type_with_fields.
15368 (make_gdb_type_union): Likewise.
15369 (make_gdb_type_flags): Likewise.
15370 (make_gdb_type_enum): Likewise.
15371 (make_gdb_type): New function.
15372 (tdesc_register_type): Use static make_gdb_type.
15373
15374 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
15375
15376 * infcmd.c (default_print_one_register_info): Align natural-format
15377 column values consistently one under another.
15378 (pad_to_column): New function.
15379
15380 2018-02-05 Joel Brobecker <brobecker@adacore.com>
15381
15382 * dwarf2read.c (dwarf2_physname): Move commment.
15383
15384 2018-02-01 Leszek Swirski <leszeks@google.com>
15385
15386 * varobj.c (varobj_formatted_print_options): Allow recursive
15387 pretty printing if pretty printing is enabled.
15388
15389 2018-02-01 Leszek Swirski <leszeks@google.com>
15390
15391 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15392 names after a structop as a filename.
15393
15394 2018-02-01 Yao Qi <yao.qi@linaro.org>
15395
15396 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15397 (arm_record_coproc_data_proc): Likewise.
15398
15399 2018-02-01 Yao Qi <yao.qi@linaro.org>
15400
15401 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15402
15403 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
15404
15405 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15406 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15407
15408 2018-01-31 Pedro Alves <palves@redhat.com>
15409
15410 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15411 * inflow.c (child_terminal_save_inferior): Wrap reference to
15412 tcgetpgrp in HAVE_TERMIOS_H.
15413 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15414 _WIN32.
15415 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15416 always iterate over all inferiors.
15417 (gdbsim_cntrl_c): Adjust.
15418 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15419
15420 2018-01-31 Joel Brobecker <brobecker@adacore.com>
15421
15422 * gdbtypes.c (lookup_array_range_type): Make sure the array's
15423 index type is objfile-owned if the element type is as well.
15424
15425 2018-01-31 Joel Brobecker <brobecker@adacore.com>
15426
15427 GDB 8.1 released.
15428
15429 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
15430
15431 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15432 "features/s390x-linux64.c".
15433 (_initialize_s390_linux_tdep): Remove initialization of tdescs
15434 s390_linux32 and s390x_linux64.
15435 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15436 default tdesc.
15437 * s390-tdep.c: Include "features/s390-linux32.c" and
15438 "features/s390x-linux64.c".
15439 (s390_tdesc_valid): Add check for tdesc_has_registers.
15440 (s390_gdbarch_init): Make sure there is always a valid tdesc.
15441 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15442 tdesc_s390x_linux64.
15443 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15444 tdesc_s390x_linux64 to...
15445 * s390-tdep.h: ...here.
15446
15447 2018-01-30 Pedro Alves <palves@redhat.com>
15448
15449 PR gdb/13211
15450 * config.in, configure: Regenerate.
15451 * configure.ac: Check for getpgid.
15452 * go32-nat.c (go32_pass_ctrlc): New.
15453 (go32_target): Install it.
15454 * inf-child.c (inf_child_target): Install
15455 child_terminal_save_inferior, child_pass_ctrlc and
15456 child_interrupt.
15457 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15458 (inf_ptrace_target): No longer install it.
15459 * infcmd.c (interrupt_target_1): Adjust.
15460 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15461 (child_interrupt): Declare.
15462 (inferior::terminal_state): New.
15463 * inflow.c (struct terminal_info): Update comments.
15464 (inferior_process_group): Delete.
15465 (terminal_is_ours): Delete.
15466 (gdb_tty_state): New.
15467 (child_terminal_init): Adjust.
15468 (is_gdb_terminal, sharing_input_terminal_1)
15469 (sharing_input_terminal): New functions.
15470 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
15471 Set the process's actual process group in the foreground if
15472 possible. Handle is_ours_for_output/is_ours distinction. Don't
15473 mark terminal as the inferior's if not sharing GDB's terminal.
15474 Don't check attach_flag.
15475 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15476 pass down a target_terminal_state.
15477 (child_terminal_save_inferior): New, factored out from ...
15478 (child_terminal_ours_1): ... this. Handle
15479 target_terminal_state::is_ours_for_output.
15480 (child_interrupt, child_pass_ctrlc): New.
15481 (inflow_inferior_exit): Clear the inferior's terminal_state.
15482 (copy_terminal_info): Copy the inferior's terminal state.
15483 (_initialize_inflow): Remove reference to terminal_is_ours.
15484 * inflow.h (inferior_process_group): Delete.
15485 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15486 * procfs.c (procfs_target): Don't install procfs_interrupt.
15487 (procfs_interrupt): Delete.
15488 * remote.c (remote_serial_quit_handler): Adjust.
15489 (remote_interrupt): Remove ptid parameter. Adjust.
15490 * target-delegates.c: Regenerate.
15491 * target.c: Include "terminal.h".
15492 (target_terminal::terminal_state): Rename to ...
15493 (target_terminal::m_terminal_state): ... this.
15494 (target_terminal::init): Adjust.
15495 (target_terminal::inferior): Adjust to per-inferior
15496 terminal_state.
15497 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15498 (target_terminal::ours, target_terminal::ours_for_output): Use
15499 target_terminal_is_ours_kind.
15500 (target_interrupt): Remove ptid parameter. Adjust.
15501 (default_target_pass_ctrlc): Adjust.
15502 * target.h (target_ops::to_terminal_save_inferior): New field.
15503 (target_ops::to_interrupt): Remove ptid_t parameter.
15504 (target_interrupt): Remove ptid_t parameter. Update comment.
15505 (target_pass_ctrlc): Update comment.
15506 * target/target.h (target_terminal_state): New scoped enum,
15507 factored out of ...
15508 (target_terminal::terminal_state): ... here.
15509 (target_terminal::inferior): Update comments.
15510 (target_terminal::restore_inferior): New.
15511 (target_terminal::is_inferior, target_terminal::is_ours)
15512 (target_terminal::is_ours_for_output): Adjust.
15513 (target_terminal::scoped_restore_terminal_state): Adjust to
15514 rename, and call restore_inferior() instead of inferior().
15515 (target_terminal::scoped_restore_terminal_state::m_state): Change
15516 type.
15517 (target_terminal::terminal_state): Rename to ...
15518 (target_terminal::m_terminal_state): ... this and change type.
15519
15520 2018-01-30 Pedro Alves <palves@redhat.com>
15521
15522 * linux-nat.c (wait_for_signal): New function.
15523 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15524 directly.
15525 (async_terminal_is_ours)
15526 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15527 (linux_nat_add_target): Don't override
15528 to_terminal_inferior/to_terminal_ours.
15529
15530 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
15531
15532 * remote.c (remote_follow_fork): Don't call "detach_inferior".
15533
15534 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
15535
15536 * dwarf2read.c (free_dwo_files): Add forward-declaration.
15537 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15538 dwarf2_per_objfile_free here.
15539 (dwarf2_per_objfile_free): Remove.
15540 (_initialize_dwarf2_read): Don't register
15541 dwarf2_per_objfile_free as a registry cleanup.
15542
15543 2018-01-27 Eli Zaretskii <eliz@gnu.org>
15544
15545 Avoid compilation errors in MinGW native builds
15546
15547 The error is triggered by including python-internal.h, and the
15548 error message is:
15549
15550 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15551 from build-gnulib/import/math.h:27,
15552 from d:/usr/Python26/include/pyport.h:235,
15553 from d:/usr/Python26/include/Python.h:58,
15554 from python/python-internal.h:94,
15555 from python/py-arch.c:24:
15556 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15557 using ::hypot;
15558 ^~~~~
15559
15560 This happens because Python headers define 'hypot' to expand t
15561 '_hypot' in the Windows builds.
15562 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15563 'hypoth'. This avoids a compilation error.
15564
15565 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15566
15567 * MAINTAINERS (Write After Approval): Fix ordering.
15568
15569 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15570
15571 * MAINTAINERS (Write After Approval): Add Alan Hayward.
15572
15573 2018-01-26 Alan Modra <amodra@gmail.com>
15574
15575 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15576 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15577 Remove nop. Make const. Comment.
15578 (powerpc32_plt_stub_so_2): New.
15579 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15580 Correct count. Update uses.
15581 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15582 Move common code reading PLT entry word. Correct
15583 powerpc32_plt_stub PLT address calculation.
15584 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15585 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15586 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15587 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15588 (ppc64_standard_linkage8): Likewise.
15589 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15590 Correct insns description.
15591 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15592
15593 2018-01-24 Pedro Alves <palves@redhat.com>
15594
15595 GCC PR libstdc++/83906
15596 * gdbtypes.c (operator==(const dynamic_prop &,
15597 const dynamic_prop &)): New.
15598 (operator==(const range_bounds &, const range_bounds &)): New.
15599 (check_types_equal): Use them instead of memcmp.
15600 * gdbtypes.h (operator==(const dynamic_prop &,
15601 const dynamic_prop &)): Declare.
15602 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15603 (operator==(const range_bounds &, const range_bounds &)): Declare.
15604 (operator!=(const range_bounds &, const range_bounds &)): Declare.
15605
15606 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15607
15608 * s390-linux-tdep.c (s390_record_address_mask)
15609 (s390_record_calc_disp_common, s390_record_calc_disp)
15610 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15611 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15612 (s390_process_record): Move to s390-tdep.c.
15613 (s390_linux_init_abi_any): Adjust.
15614 * s390-tdep.c (s390_record_address_mask)
15615 (s390_record_calc_disp_common, s390_record_calc_disp)
15616 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15617 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15618 (s390_process_record): Moved from s390-linux-tdep.c
15619 (s390_gdbarch_init): Adjust.
15620
15621 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15622
15623 * s390-linux-nat.c (s390-tdep.h): New include.
15624 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15625 (HFILES_NO_SRCDIR): Add s390-tdep.h.
15626 (ALLDEPFILES): Add s390-tdep.c.
15627 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15628 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15629 * s390-tdep.h: ...this. New file.
15630 * s390-linux-tdep.c (s390-tdep.h): New include.
15631 (_initialize_s390_tdep): Rename to...
15632 (_initialize_s390_linux_tdep): ...this and adjust.
15633 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15634 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15635 s390-tdep.h.
15636 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15637 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15638 (s390_is_partial_instruction, s390_software_single_step)
15639 (is_non_branch_ril, s390_displaced_step_copy_insn)
15640 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15641 (s390_prologue_data, s390_addr, s390_store, s390_load)
15642 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15643 (s390_register_call_saved, s390_guess_tracepoint_registers)
15644 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15645 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15646 (s390_pseudo_register_name, s390_pseudo_register_type)
15647 (s390_pseudo_register_read, s390_pseudo_register_write)
15648 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15649 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15650 (s390_addr_bits_remove, s390_address_class_type_flags)
15651 (s390_address_class_type_flags_to_name)
15652 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15653 (s390_function_arg_float, s390_function_arg_vector)
15654 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15655 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15656 (s390_frame_align, s390_register_return_value, s390_return_value)
15657 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15658 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15659 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15660 (s390_trad_frame_prev_register, s390_unwind_cache)
15661 (s390_prologue_frame_unwind_cache)
15662 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15663 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15664 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15665 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15666 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15667 (s390_frame_base_address, s390_local_base_address)
15668 (s390_frame_base, s390_gcc_target_options)
15669 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15670 (s390_validate_reg_range, s390_tdesc_valid)
15671 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15672 * s390-tdep.c: ...this. New file.
15673
15674 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15675
15676 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15677 (s390_process_record, s390_gdbarch_tdep_alloc)
15678 (s390_linux_init_abi_any): Use/set new hook.
15679
15680 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15681
15682 * s390-linux-tdep.c (osabi.h): New include.
15683 (s390_linux_init_abi_31, s390_linux_init_abi_64)
15684 (s390_linux_init_abi_any): New functions.
15685 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15686
15687 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15688
15689 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15690 tdesc_has_registers check
15691
15692 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15693
15694 * s390-linux-tdep.c (s390_tdesc_valid): New function.
15695 (s390_validate_reg_range): New macro.
15696 (s390_gdbarch_init): Adjust.
15697
15698 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15699
15700 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15701 (s390_gdbarch_tdep_alloc): Adjust.
15702 (s390_gdbarch_init): Adjust.
15703
15704 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15705
15706 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15707 <have_tdb>: Change type to bool.
15708 (s390_gdbarch_tdep_alloc): Adjust.
15709 (s390_gdbarch_init): Adjust.
15710
15711 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15712
15713 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15714 (gdbarch_tdep) <have_upper, have_vx>: New fields.
15715 (s390_gdbarch_tdep_alloc): New function.
15716 (s390_gdbarch_init): Allocate tdep at start and use its fields
15717 instead of separate variables.
15718
15719 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15720
15721 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15722 when looking for cached gdbarch and add comment for remaining.
15723
15724 2018-01-22 Pedro Alves <palves@redhat.com>
15725 Sergio Durigan Junior <sergiodj@redhat.com>
15726
15727 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15728 case.
15729
15730 2018-01-22 Maciej W. Rozycki <macro@mips.com>
15731
15732 * MAINTAINERS: Update my company e-mail address.
15733
15734 2018-01-22 Yao Qi <yao.qi@linaro.org>
15735
15736 * regcache.c (cooked_write_test): New function.
15737 (_initialize_regcache): Register the test.
15738
15739 2018-01-22 Yao Qi <yao.qi@linaro.org>
15740
15741 * ia64-tdep.c (ia64_pseudo_register_read): Call
15742 regcache->cooked_read instead of regcache_cooked_read_unsigned.
15743 * m32c-tdep.c (m32c_cat_read): Likewise.
15744 (m32c_r3r2r1r0_read): Likewise.
15745 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15746 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15747
15748 2018-01-22 Yao Qi <yao.qi@linaro.org>
15749
15750 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15751 method raw_read instead of regcache_raw_read.
15752 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15753 * arm-tdep.c (arm_neon_quad_read): Likewise.
15754 * avr-tdep.c (avr_pseudo_register_read): Likewise.
15755 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15756 * frv-tdep.c (frv_pseudo_register_read): Likewise.
15757 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15758 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15759 (i386_pseudo_register_read_into_value): Likewise.
15760 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15761 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15762 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15763 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15764 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15765 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15766 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15767 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15768 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15769
15770 2018-01-22 Yao Qi <yao.qi@linaro.org>
15771
15772 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15773 * configure.tgt: Remove target mt.
15774 * mt-tdep.c: Remove.
15775 * regcache.c (cooked_read_test): Remove the check for mt.
15776
15777 2018-01-22 Yao Qi <yao.qi@linaro.org>
15778
15779 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15780 instead of gdbarch_pseudo_register_read_value.
15781
15782 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15783
15784 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15785 language is Ada.
15786
15787 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15788
15789 * linespec.c (create_sals_line_offset): Remove code that preserved
15790 the symtab_and_line's line number.
15791
15792 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15793
15794 * varobj.c (varobj_create): Don't set valid_block when creating a
15795 floating varobj.
15796
15797 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15798
15799 * varobj.c (varobj_create): Remove out of date comment.
15800
15801 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15802
15803 PR mi/20395
15804 * ada-exp.y (write_var_from_sym): Pass extra parameter when
15805 updating innermost block.
15806 * parse.c (innermost_block_tracker::update): Take extra type
15807 parameter, and check types match before updating innermost block.
15808 (write_dollar_variable): Update innermost block for registers.
15809 * parser-defs.h (enum innermost_block_tracker_type): New enum.
15810 (innermost_block_tracker::innermost_block_tracker): Initialise
15811 m_types member.
15812 (innermost_block_tracker::reset): Take type parameter.
15813 (innermost_block_tracker::update): Take type parameter, and pass
15814 type through as needed.
15815 (innermost_block_tracker::m_types): New member.
15816 * varobj.c (varobj_create): Pass type when reseting innermost
15817 block.
15818
15819 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15820
15821 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15822 * ada-lang.c (resolve_subexp): Likewise.
15823 * breakpoint.c (set_breakpoint_condition) Likewise.
15824 (watch_command_1) Likewise.
15825 * c-exp.y (variable): Likewise.
15826 * d-exp.y (PrimaryExpression): Likewise.
15827 * f-exp.y (variable): Likewise.
15828 * go-exp.y (variable): Likewise.
15829 * m2-exp.y (variable): Likewise.
15830 * objfiles.c (objfile::~objfile): Likewise.
15831 * p-exp.y (variable): Likewise.
15832 * parse.c (innermost_block): Change type.
15833 * parser-defs.h (class innermost_block_tracker): New.
15834 (innermost_block): Change to innermost_block_tracker.
15835 * printcmd.c (display_command): Switch to innermost_block API.
15836 (do_one_display): Likewise.
15837 * rust-exp.y (do_one_display): Likewise.
15838 * symfile.c (clear_symtab_users): Likewise.
15839 * varobj.c (varobj_create): Switch to innermost_block API, replace
15840 use of innermost_block with block stored on varobj object.
15841
15842 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15843
15844 * expression.h (innermost_block): Remove declaration.
15845 * varobj.c: Add 'parser-defs.h' include.
15846
15847 2018-01-19 Tom Tromey <tom@tromey.com>
15848
15849 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15850 symbols in the static and global blocks.
15851
15852 2018-01-19 James Clarke <jrtc27@jrtc27.com>
15853
15854 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15855 gdb_ptrace.h, and move including gdb_wait.h ...
15856 * nat/linux-ptrace.h: ... to here.
15857
15858 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15859
15860 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15861 inf_ptrace_detach_success.
15862 (inf_ptrace_detach_success): Add inferior parameter, use it
15863 instead of inferior_ptid, pass it to detach_inferior.
15864 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15865 parameter.
15866 * inferior.c (detach_inferior): Add overload that takes an
15867 inferior object.
15868 * inferior.h (detach_inferior): Likewise.
15869 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15870 use inferior_ptid, adjust call to inf_ptrace_detach_success.
15871 * linux-thread-db.c (thread_db_detach): Use inf parameter.
15872
15873 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15874
15875 * target.h (struct target_ops) <to_detach>: Add inferior
15876 parameter.
15877 (target_detach): Likewise.
15878 * target.c (dispose_inferior): Pass inferior down.
15879 (target_detach): Pass inferior down. Assert that it is equal to
15880 the current inferior.
15881 * aix-thread.c (aix_thread_detach): Pass inferior down.
15882 * corefile.c (core_file_command): Pass current_inferior() down.
15883 * corelow.c (core_detach): Add inferior parameter.
15884 * darwin-nat.c (darwin_detach): Likewise.
15885 * gnu-nat.c (gnu_detach): Likewise.
15886 * inf-ptrace.c (inf_ptrace_detach): Likewise.
15887 * infcmd.c (detach_command): Pass current_inferior() down to
15888 target_detach.
15889 * infrun.c (follow_fork_inferior): Pass parent_inf to
15890 target_detach.
15891 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15892 target_detach.
15893 * linux-nat.c (linux_nat_detach): Add inferior parameter.
15894 * linux-thread-db.c (thread_db_detach): Likewise.
15895 * nto-procfs.c (procfs_detach): Likewise.
15896 * procfs.c (procfs_detach): Likewise.
15897 * record.c (record_detach): Likewise.
15898 * record.h (struct inferior): Forward-declare.
15899 (record_detach): Add inferior parameter.
15900 * remote-sim.c (gdbsim_detach): Likewise.
15901 * remote.c (remote_detach_1): Likewise.
15902 (remote_detach): Likewise.
15903 (extended_remote_detach): Likewise.
15904 * sol-thread.c (sol_thread_detach): Likewise.
15905 * target-debug.h (target_debug_print_inferior_p): New macro.
15906 * target-delegates.c: Re-generate.
15907 * top.c (kill_or_detach): Pass inferior down to target_detach.
15908 * windows-nat.c (windows_detach): Add inferior parameter.
15909
15910 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15911
15912 * target.h (struct target_ops) <to_detach>: Remove args
15913 parameter.
15914 (target_detach): Likewise.
15915 * target.c (dispose_inferior): Adjust.
15916 (target_detach): Remove args parameter, adjust.
15917 * aix-thread.c (aix_thread_detach): Adjust.
15918 * corefile.c (core_file_command): Adjust.
15919 * corelow.c (core_detach): Adjust.
15920 * darwin-nat.c (darwin_detach): Adjust.
15921 * gnu-nat.c (gnu_detach): Adjust.
15922 * inf-ptrace.c (inf_ptrace_detach): Adjust.
15923 * infcmd.c (detach_command): Adjust
15924 * infrun.c (follow_fork_inferior): Adjust.
15925 (handle_vfork_child_exec_or_exit): Adjust.
15926 * linux-fork.c (linux_fork_detach): Remove args parameter.
15927 * linux-fork.h (linux_fork_detach): Likewise.
15928 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15929 * linux-thread-db.c (thread_db_detach): Likewise.
15930 * nto-procfs.c (procfs_detach): Likewise.
15931 * procfs.c (procfs_detach): Likewise.
15932 (do_detach): Remove signo parameter.
15933 * record.c (record_detach): Remove args parameter.
15934 * record.h (record_detach): Likewise.
15935 * remote-sim.c (gdbsim_detach): Likewise.
15936 * remote.c (remote_detach_1): Likewise.
15937 (remote_detach): Likewise.
15938 (extended_remote_detach): Likewise.
15939 * sol-thread.c (sol_thread_detach): Likewise.
15940 * target-delegates.c: Re-generate.
15941 * top.c (struct qt_args) <args>: Remove field.
15942 (kill_or_detach): Don't pass args.
15943 (quit_force): Don't set args.
15944 * windows-nat.c (windows_detach): Remove args parameter.
15945
15946 2018-01-19 Yao Qi <yao.qi@linaro.org>
15947
15948 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15949 (arm_linux_init_abi): Install it.
15950
15951 2018-01-19 Yao Qi <yao.qi@linaro.org>
15952
15953 * osabi.c (gdb_osabi_names): Extend the regexp for
15954 arm-linux-gnueabihf.
15955
15956 2018-01-18 Yao Qi <yao.qi@linaro.org>
15957
15958 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15959 m_abbrevs.
15960 (abbrev_table::add_abbrev): Update.
15961 (abbrev_table::lookup_abbrev): Update.
15962
15963 2018-01-18 Yao Qi <yao.qi@linaro.org>
15964
15965 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15966
15967 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
15968
15969 * compile/compile.c (compile_to_object): Convert "triplet_rx"
15970 to "std::string".
15971
15972 2018-01-17 Tom Tromey <tom@tromey.com>
15973
15974 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
15975
15976 2018-01-17 Tom Tromey <tom@tromey.com>
15977
15978 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15979 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15980 (create_array_type_with_stride): Update.
15981 * dwarf2read.c (set_die_type): Update.
15982
15983 2018-01-17 Tom Tromey <tom@tromey.com>
15984
15985 * dwarf2read.c (delayed_method_info): Remove typedef.
15986 (dwarf2_cu::method_info): Now a std::vector.
15987 (add_to_method_list): Update.
15988 (free_delayed_list): Remove.
15989 (compute_delayed_physnames): Update.
15990 (process_full_comp_unit, process_full_type_unit): Clear the method
15991 list. Remove cleanups.
15992 (psymtab_include_file_name): Add name_holder parameter. Use
15993 unique_xmalloc_ptr.
15994 (dwarf_decode_lines): Update.
15995
15996 2018-01-17 Tom Tromey <tom@tromey.com>
15997 Simon Marchi <simon.marchi@ericsson.com>
15998
15999 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
16000 (dwarf2_per_objfile::free_cached_comp_units)
16001 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
16002 (init_cutu_and_read_dies_no_follow): Update.
16003 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
16004 (dwarf2_cu::~dwarf2_cu): New.
16005 (free_heap_comp_unit, free_stack_comp_unit): Remove.
16006 (age_cached_comp_units, free_one_cached_comp_unit): Update.
16007
16008 2018-01-17 Tom Tromey <tom@tromey.com>
16009 Simon Marchi <simon.marchi@ericsson.com>
16010
16011 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
16012 (struct die_reader_specs) <abbrev_table>: New member.
16013 (struct abbrev_table): Add constructor.
16014 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
16015 <abbrev_obstack>: Now an auto_obstack.
16016 (abbrev_table_up): New typedef.
16017 (init_cu_die_reader): Add abbrev_table parameter.
16018 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
16019 Add result_dwo_abbrev_table.
16020 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
16021 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
16022 Update.
16023 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
16024 parameter.
16025 (skip_children): Update.
16026 (abbrev_table::alloc_abbrev): Rename from
16027 abbrev_table_alloc_abbrev.
16028 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
16029 (abbrev_table::lookup_abbrev): Rename from
16030 abbrev_table_lookup_abbrev.
16031 (abbrev_table_read_table): Return abbrev_table_up.
16032 (abbrev_table_free, abbrev_table_free_cleanup)
16033 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
16034 (load_partial_dies): Update.
16035
16036 2018-01-17 Tom Tromey <tom@tromey.com>
16037
16038 * dwarf2read.c (dwarf2_compute_name): Update comment.
16039 (read_func_scope, read_variable): Update.
16040 (new_symbol): Remove.
16041 (new_symbol_full): Rename to new_symbol.
16042
16043 2018-01-17 Mike Gulick <mgulick@mathworks.com>
16044
16045 PR gdb/16577
16046 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
16047 a warning instead of throwing an error, set section size to 0 and return
16048 NULL.
16049 * gdb_bfd.h (gdb_bfd_map_section): Update description.
16050
16051 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
16052
16053 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
16054 std::string.
16055 (linux_ptrace_attach_fail_reason_string): Likewise.
16056 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
16057 Likewise.
16058 (linux_ptrace_attach_fail_reason_string): Likewise.
16059 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
16060
16061 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
16062
16063 * linux-nat.c (linux_nat_attach): Remove xstrdup.
16064
16065 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
16066
16067 PR gdb/21559
16068 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
16069 checking for fs_base/gs_base fields in struct user_regs_struct.
16070 * configure: Regenerate.
16071
16072 2018-01-17 Yao Qi <yao.qi@linaro.org>
16073
16074 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
16075 function.
16076 (aarch64_linux_init_abi): Install it to gdbarch hook
16077 gcc_target_options.
16078
16079 2018-01-15 Pedro Alves <palves@redhat.com>
16080
16081 * common/signals-state-save-restore.c
16082 (save_original_signals_state): Fix typos.
16083
16084 2017-01-12 Tom Tromey <tom@tromey.com>
16085 Sergio Durigan Junior <sergiodj@redhat.com>
16086
16087 * Makefile.in (install-only): Install gdb-add-index.
16088
16089 2018-01-12 John Baldwin <jhb@FreeBSD.org>
16090
16091 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
16092
16093 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
16094
16095 * infrun.c (keep_going_pass_signal): Clear step-over info when
16096 insert_breakpoints fails.
16097
16098 2018-01-11 Pedro Alves <palves@redhat.com>
16099
16100 PR gdb/22583
16101 * infrun.c (resume): Rename to ...
16102 (resume_1): ... this.
16103 (resume): Reimplement as wrapper around resume_1.
16104
16105 2018-01-11 Pedro Alves <palves@redhat.com>
16106
16107 PR remote/22597
16108 * remote.c (remote_parse_stop_reply): Default to the last-set
16109 general thread instead of to 'magic_null_ptid'.
16110
16111 2018-01-10 Pedro Alves <palves@redhat.com>
16112
16113 * language.h (language_get_symbol_name_matcher): Rename ...
16114 (get_symbol_name_matcher): ... this.
16115 * language.c (language_get_symbol_name_matcher): Ditto.
16116 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16117 callers adjusted.
16118
16119 2018-01-10 Pedro Alves <palves@redhat.com>
16120
16121 PR gdb/22670
16122 * dwarf2read.c
16123 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16124 Adjust to use language_get_symbol_name_matcher instead of
16125 language_defn::la_get_symbol_name_matcher.
16126 * language.c (language_get_symbol_name_matcher): If in Ada mode
16127 and the lookup name is a verbatim match, return Ada's matcher.
16128 * language.h (language_get_symbol_name_matcher): Adjust comment.
16129 (ada_lookup_name_info::verbatim_p):: New method.
16130
16131 2018-01-10 Pedro Alves <palves@redhat.com>
16132
16133 PR gdb/22670
16134 * ada-lang.c (ada_collect_symbol_completion_matches): If the
16135 minsym's language is language_auto or language_cplus, pass down
16136 language_ada instead.
16137 * symtab.c (compare_symbol_name): Don't frob symbol language here.
16138
16139 2018-01-10 Pedro Alves <palves@redhat.com>
16140
16141 PR gdb/22670
16142 * minsyms.c (linkage_name_str): New function.
16143 (iterate_over_minimal_symbols): Use it.
16144
16145 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16146
16147 * NEWS: Document that 'info proc' now works on FreeBSD.
16148
16149 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16150
16151 * configure.ac: Check for kinfo_getfile in libutil.
16152 * configure: Regenerate.
16153 * config.in: Regenerate.
16154 * fbsd-nat.c: Include "fbsd-tdep.h".
16155 (fbsd_fetch_cmdline): New.
16156 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16157 rather than calling error.
16158 (fbsd_info_proc): New.
16159 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16160 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16161 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16162
16163 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16164
16165 * fbsd-nat.c (struct free_deleter): Remove.
16166 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16167
16168 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16169
16170 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16171 NULL for an empty pathname.
16172
16173 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16174
16175 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16176 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16177 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16178 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16179 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16180 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16181 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16182 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16183 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16184 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16185 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16186 (fbsd_core_fetch_timeval, fbsd_print_sigset)
16187 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16188 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
16189 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16190
16191 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
16192
16193 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16194 (gnu_xfer_auxv): New function.
16195 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16196 TARGET_OBJECT_AUXV.
16197
16198 2018-01-08 Yao Qi <yao.qi@linaro.org>
16199 Simon Marchi <simon.marchi@ericsson.com>
16200
16201 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16202 common/selftest.c.
16203 (COMMON_OBS): Remove selftest.o.
16204 * configure.ac: Append selftest-arch.c and common/selftest.c to
16205 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
16206 * configure: Re-generated.
16207 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16208 GDB_SELF_TEST.
16209 (maintenance_info_selftests): Likewise.
16210
16211 2018-01-08 Xavier Roirand <roirand@adacore.com>
16212
16213 * ada-valprint.c (val_print_packed_array_elements): Use
16214 proper number of elements when printing an array indexed
16215 by an enumeration type.
16216
16217 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16218
16219 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16220 (dw2_get_file_names_reader): Adjust.
16221 (lookup_dwo_signatured_type): Adjust.
16222 (lookup_dwp_signatured_type): Adjust.
16223 (lookup_signatured_type): Adjust.
16224 (create_type_unit_group): Adjust.
16225 (get_type_unit_group): Adjust.
16226 (process_psymtab_comp_unit_reader): Adjust.
16227 (build_type_psymtabs_reader): Adjust.
16228 (scan_partial_symbols): Adjust.
16229 (add_partial_symbol): Adjust.
16230 (add_partial_subprogram): Adjust.
16231 (peek_die_abbrev): Adjust.
16232 (fixup_go_packaging): Adjust.
16233 (process_imported_unit_die): Adjust.
16234 (dwarf2_compute_name): Adjust.
16235 (dwarf2_physname): Adjust.
16236 (read_import_statement): Adjust.
16237 (handle_DW_AT_stmt_list): Adjust.
16238 (read_file_scope): Adjust.
16239 (read_func_scope): Adjust.
16240 (read_lexical_block_scope): Adjust.
16241 (read_call_site_scope): Adjust.
16242 (read_variable): Adjust.
16243 (dwarf2_rnglists_process): Adjust.
16244 (dwarf2_ranges_process): Adjust.
16245 (dwarf2_ranges_read): Adjust.
16246 (dwarf2_get_pc_bounds): Adjust.
16247 (dwarf2_record_block_ranges): Adjust.
16248 (dwarf2_add_field): Adjust.
16249 (dwarf2_add_member_fn): Adjust.
16250 (read_structure_type): Adjust.
16251 (process_structure_scope): Adjust.
16252 (read_enumeration_type): Adjust.
16253 (read_array_type): Adjust.
16254 (mark_common_block_symbol_computed): Adjust.
16255 (read_common_block): Adjust.
16256 (read_namespace_type): Adjust.
16257 (read_namespace): Adjust.
16258 (read_module_type): Adjust.
16259 (read_tag_pointer_type): Adjust.
16260 (read_tag_ptr_to_member_type): Adjust.
16261 (read_tag_string_type): Adjust.
16262 (read_subroutine_type): Adjust.
16263 (read_typedef): Adjust.
16264 (read_base_type): Adjust.
16265 (attr_to_dynamic_prop): Adjust.
16266 (read_subrange_type): Adjust.
16267 (read_unspecified_type): Adjust.
16268 (dwarf2_read_abbrevs): Adjust.
16269 (load_partial_dies): Adjust.
16270 (read_partial_die): Adjust.
16271 (find_partial_die): Adjust.
16272 (guess_partial_die_structure_name): Adjust.
16273 (fixup_partial_die): Adjust.
16274 (read_attribute_value): Adjust.
16275 (read_addr_index): Adjust.
16276 (read_addr_index_from_leb128): Adjust.
16277 (read_str_index): Adjust.
16278 (dwarf2_string_attr): Adjust.
16279 (get_debug_line_section): Adjust.
16280 (dwarf_decode_line_header): Adjust.
16281 (lnp_state_machine::check_line_address): Adjust.
16282 (dwarf_decode_lines_1): Adjust.
16283 (dwarf_decode_lines): Adjust.
16284 (dwarf2_start_symtab): Adjust.
16285 (var_decode_location): Adjust.
16286 (new_symbol_full): Adjust.
16287 (dwarf2_const_value_data): Adjust.
16288 (dwarf2_const_value_attr): Adjust.
16289 (dwarf2_const_value): Adjust.
16290 (die_type): Adjust.
16291 (die_containing_type): Adjust.
16292 (build_error_marker_type): Adjust.
16293 (lookup_die_type): Adjust.
16294 (guess_full_die_structure_name): Adjust.
16295 (anonymous_struct_prefix): Adjust.
16296 (determine_prefix): Adjust.
16297 (dwarf2_name): Adjust.
16298 (follow_die_ref_or_sig): Adjust.
16299 (follow_die_offset): Adjust.
16300 (follow_die_ref): Adjust.
16301 (follow_die_sig_1): Adjust.
16302 (follow_die_sig): Adjust.
16303 (get_signatured_type): Adjust.
16304 (get_DW_AT_signature_type): Adjust.
16305 (decode_locdesc): Adjust.
16306 (dwarf_decode_macros): Adjust.
16307 (cu_debug_loc_section): Adjust.
16308 (fill_in_loclist_baton): Adjust.
16309 (dwarf2_symbol_mark_computed): Adjust.
16310 (init_one_comp_unit): Don't assign
16311 dwarf2_cu::dwarf2_per_objfile.
16312 (set_die_type): Adjust.
16313
16314 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16315
16316 * dwarf2read.c (struct mapped_debug_names): Add constructor.
16317 <dwarf2_per_objfile>: New field.
16318 (dwarf2_per_objfile): Remove global.
16319 (get_dwarf2_per_objfile): New function.
16320 (set_dwarf2_per_objfile): New function.
16321 (dwarf2_build_psymtabs_hard): Change objfile parameter to
16322 dwarf2_per_objfile.
16323 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16324 (read_abbrev_offset): Likewise.
16325 (read_indirect_string): Likewise.
16326 (read_indirect_line_string): Likewise.
16327 (read_indirect_string_at_offset): Likewise.
16328 (read_indirect_string_from_dwz): Likewise.
16329 (dwarf2_find_containing_comp_unit): Change objfile parameter to
16330 dwarf2_per_objfile.
16331 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16332 (create_all_comp_units): Change objfile parameter to
16333 dwarf2_per_objfile.
16334 (create_all_type_units): Likewise.
16335 (process_queue): Add dwarf2_per_objfile parameter.
16336 (read_and_check_comp_unit_head): Likewise.
16337 (lookup_dwo_unit_in_dwp): Likewise.
16338 (get_dwp_file): Likewise.
16339 (process_cu_includes): Likewise.
16340 (struct free_dwo_file_cleanup_data): New struct.
16341 (dwarf2_has_info): Use get_dwarf2_per_objfile and
16342 set_dwarf2_per_objfile.
16343 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16344 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16345 context, adjust calls.
16346 (dw2_instantiate_symtab): Likewise.
16347 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16348 (dw2_get_cu): Likewise.
16349 (create_cu_from_index_list): Change objfile parameter to
16350 dwarf2_per_objfile.
16351 (create_cus_from_index_list): Get dwarf2_per_objfile from
16352 context, adjust calls.
16353 (create_cus_from_index): Likewise.
16354 (create_signatured_type_table_from_index): Change objfile
16355 parameter to dwarf2_per_objfile.
16356 (create_signatured_type_table_from_debug_names): Change objfile
16357 parameter to dwarf2_per_objfile.
16358 (create_addrmap_from_index): Likewise.
16359 (create_addrmap_from_aranges): Likewise.
16360 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16361 (dw2_setup): Remove.
16362 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16363 context.
16364 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16365 get_dwarf2_per_objfile.
16366 (dw2_forget_cached_source_info): Likewise.
16367 (dw2_map_symtabs_matching_filename): Likewise.
16368 (struct dw2_symtab_iterator) <index>: Remove.
16369 <dwarf2_per_objfile>: New field.
16370 (dw2_symtab_iter_init): Replace index parameter with
16371 dwarf2_per_objfile.
16372 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16373 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16374 (dw2_print_stats): Likewise.
16375 (dw2_dump): Likewise.
16376 (dw2_expand_symtabs_for_function): Likewise.
16377 (dw2_expand_all_symtabs): Likewise.
16378 (dw2_expand_symtabs_with_fullname): Likewise.
16379 (dw2_expand_marked_cus): Replace index and objfile parameters
16380 with dwarf2_per_objfile.
16381 (dw_expand_symtabs_matching_file_matcher): Add
16382 dwarf2_per_objfile parameter and adjust calls.
16383 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16384 adjust calls.
16385 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16386 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16387 adjust calls.
16388 (create_cus_from_debug_names_list): Replace objfile parameter
16389 with dwarf2_per_objfile and adjust calls.
16390 (create_cus_from_debug_names): Likewise.
16391 (dwarf2_read_debug_names): Likewise.
16392 (mapped_debug_names::namei_to_name): Adjust call.
16393 (dw2_debug_names_iterator::next): Likewise.
16394 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16395 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16396 (dw2_debug_names_dump): Likewise.
16397 (dw2_debug_names_expand_symtabs_for_function): Likewise.
16398 (dw2_debug_names_expand_symtabs_matching): Likewise.
16399 (dwarf2_initialize_objfile): Likewise.
16400 (dwarf2_build_psymtabs): Likewise.
16401 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16402 this_cu.
16403 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16404 (read_and_check_comp_unit_head): Likewise.
16405 (read_abbrev_offset): Likewise.
16406 (create_debug_type_hash_table): Likewise.
16407 (create_debug_types_hash_table): Likewise.
16408 (create_all_type_units): Replace objfile parameter with
16409 dwarf2_per_objfile.
16410 (add_type_unit): Add dwarf2_per_objfile parameter.
16411 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16412 with dwarf2_per_objfile.
16413 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16414 (lookup_dwp_signatured_type): Likewise.
16415 (lookup_signatured_type): Likewise.
16416 (read_cutu_die_from_dwo): Likewise.
16417 (init_tu_and_read_dwo_dies): Likewise.
16418 (init_cutu_and_read_dies): Likewise.
16419 (init_cutu_and_read_dies_no_follow): Likewise.
16420 (allocate_type_unit_groups_table): Add objfile parameter.
16421 (create_type_unit_group): Use dwarf2_per_objfile from cu.
16422 (get_type_unit_group): Likewise.
16423 (process_psymtab_comp_unit): Update call.
16424 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16425 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16426 (print_tu_stats): Likewise.
16427 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16428 in void* parameter.
16429 (build_type_psymtabs): Change objfile parameter to
16430 dwarf2_per_objfile.
16431 (process_skeletonless_type_unit): Use dwarf2_per_objfile
16432 passed in void* parameter.
16433 (process_skeletonless_type_units): Change objfile parameter to
16434 dwarf2_per_objfile.
16435 (set_partial_user): Likewise.
16436 (dwarf2_build_psymtabs_hard): Likewise.
16437 (read_comp_units_from_section): Likewise.
16438 (create_all_comp_units): Likewise.
16439 (scan_partial_symbols): Update calls.
16440 (add_partial_symbol): Likewise.
16441 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16442 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16443 (process_queue): Add dwarf2_per_objfile parameter.
16444 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16445 (compute_compunit_symtab_includes): Likewise.
16446 (process_cu_includes): Add dwarf2_per_objfile parameter.
16447 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16448 (process_full_type_unit): Likewise.
16449 (process_imported_unit_die): Update call.
16450 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16451 (read_file_scope): Likewise.
16452 (allocate_dwo_file_hash_table): Add objfile parameter.
16453 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16454 (create_cus_hash_table): Likewise.
16455 (create_dwp_hash_table): Likewise.
16456 (create_dwo_unit_in_dwp_v1): Likewise.
16457 (create_dwp_v2_section): Likewise.
16458 (create_dwo_unit_in_dwp_v2): Likewise.
16459 (lookup_dwo_unit_in_dwp): Likewise.
16460 (try_open_dwop_file): Likewise.
16461 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16462 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16463 cleanup to include a reference to dwarf2_per_objfile.
16464 (open_dwp_file): Add dwarf2_per_objfile parameter.
16465 (open_and_init_dwp_file): Likewise.
16466 (get_dwp_file): Likewise.
16467 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16468 (queue_and_load_all_dwo_tus): Update call.
16469 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16470 data.
16471 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16472 (dwarf2_ranges_process): Likewise.
16473 (dwarf2_get_pc_bounds): Likewise.
16474 (mark_common_block_symbol_computed): Likewise.
16475 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16476 (dwarf2_read_abbrevs): Update call.
16477 (read_partial_die): Use dwarf2_per_objfile from cu.
16478 (find_partial_die): Likewise.
16479 (fixup_partial_die): Likewise.
16480 (read_attribute_value): Likewise.
16481 (read_indirect_string_at_offset_from): Add objfile parameter.
16482 (read_indirect_string_at_offset): Add dwarf2_per_objfile
16483 parameter.
16484 (read_indirect_string_from_dwz): Add objfile parameter.
16485 (read_indirect_string): Add objfile parameter.
16486 (read_addr_index_1): Add dwarf2_per_objfile parameter.
16487 (read_addr_index): Use dwarf2_per_objfile from cu.
16488 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16489 call dw2_setup.
16490 (read_str_index): Use dwarf2_per_objfile from cu.
16491 (get_debug_line_section): Likewise.
16492 (read_formatted_entries): Add dwarf2_per_objfile parameter.
16493 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16494 (new_symbol_full): Use dwarf2_per_objfile from cu.
16495 (build_error_marker_type): Likewise.
16496 (lookup_die_type): Likewise.
16497 (determine_prefix): Likewise.
16498 (follow_die_offset): Likewise.
16499 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16500 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16501 (dwarf2_fetch_die_type_sect_off): Likewise.
16502 (dwarf2_get_die_type): Likewise.
16503 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16504 (get_signatured_type): Likewise.
16505 (get_DW_AT_signature_type): Likewise.
16506 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16507 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16508 (cu_debug_loc_section): Likewise.
16509 (fill_in_loclist_baton): Likewise.
16510 (dwarf2_symbol_mark_computed): Likewise.
16511 (dwarf2_find_containing_comp_unit): Change objfile parameter to
16512 dwarf2_per_objfile.
16513 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16514 parameter.
16515 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16516 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16517 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16518 (set_die_type): Use dwarf2_free_objfile from cu.
16519 (get_die_type_at_offset): Likewise.
16520 (dwarf2_per_objfile_free): Don't assign global variable.
16521 (debug_names) <constructor>: Add dwarf2_per_objfile
16522 parameter, update m_debugstrlookup construction.
16523 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16524 parameter.
16525 <m_dwarf2_per_objfile>: New field.
16526 <lookup>: Use m_dwarf2_per_objfile.
16527 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16528 (psyms_seen_size): Likewise.
16529 (write_gdbindex): Replace objfile parameter with
16530 dwarf2_per_objfile.
16531 (write_debug_names): Likewise.
16532 (write_psymtabs_to_index): Likewise.
16533 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16534 calls.
16535
16536 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16537
16538 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16539 <dwarf2_per_objfile>: New field.
16540 (struct dwarf2_per_cu_data) <objfile>: Remove.
16541 <dwarf2_per_objfile>: New field.
16542 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16543 of objfile.
16544 (create_signatured_type_table_from_index): Likewise.
16545 (create_debug_type_hash_table): Likewise.
16546 (fill_in_sig_entry_from_dwo_entry): Likewise.
16547 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16548 (create_type_unit_group): Assign dwarf2_per_objfile instead of
16549 objfile.
16550 (create_partial_symtab): Access objfile through
16551 dwarf2_per_objfile.
16552 (process_psymtab_comp_unit_reader): Likewise.
16553 (read_comp_units_from_section): Likewise.
16554 (scan_partial_symbols): Likewise.
16555 (add_partial_symbol): Likewise.
16556 (add_partial_subprogram): Likewise.
16557 (peek_die_abbrev): Likewise.
16558 (fixup_go_packaging): Likewise.
16559 (process_full_comp_unit): Likewise.
16560 (process_full_type_unit): Likewise.
16561 (process_imported_unit_die): Likewise.
16562 (dwarf2_compute_name): Likewise.
16563 (dwarf2_physname): Likewise.
16564 (read_import_statement): Likewise.
16565 (create_cus_hash_table): Assign dwarf2_physname instead of
16566 objfile.
16567 (read_func_scope): Access objfile through dwarf2_per_objfile.
16568 (read_lexical_block_scope): Likewise.
16569 (read_call_site_scope): Likewise.
16570 (read_variable): Likewise.
16571 (dwarf2_rnglists_process): Likewise.
16572 (dwarf2_ranges_process): Likewise.
16573 (dwarf2_ranges_read): Likewise.
16574 (dwarf2_record_block_ranges): Likewise.
16575 (dwarf2_add_field): Likewise.
16576 (dwarf2_add_member_fn): Likewise.
16577 (read_structure_type): Likewise.
16578 (process_structure_scope): Likewise.
16579 (read_enumeration_type): Likewise.
16580 (read_array_type): Likewise.
16581 (read_common_block): Likewise.
16582 (read_namespace_type): Likewise.
16583 (read_namespace): Likewise.
16584 (read_module_type): Likewise.
16585 (read_tag_pointer_type): Likewise.
16586 (read_tag_ptr_to_member_type): Likewise.
16587 (read_tag_string_type): Likewise.
16588 (read_subroutine_type): Likewise.
16589 (read_typedef): Likewise.
16590 (read_base_type): Likewise.
16591 (attr_to_dynamic_prop): Likewise.
16592 (read_subrange_type): Likewise.
16593 (read_unspecified_type): Likewise.
16594 (load_partial_dies): Likewise.
16595 (read_partial_die): Likewise.
16596 (find_partial_die): Likewise.
16597 (guess_partial_die_structure_name): Likewise.
16598 (fixup_partial_die): Likewise.
16599 (read_attribute_value): Likewise.
16600 (read_addr_index_from_leb128): Likewise.
16601 (dwarf2_read_addr_index): Likewise.
16602 (dwarf2_string_attr): Likewise.
16603 (lnp_state_machine::check_line_address): Likewise.
16604 (dwarf_decode_lines_1): Likewise.
16605 (dwarf_decode_lines): Likewise.
16606 (dwarf2_start_symtab): Likewise.
16607 (var_decode_location): Likewise.
16608 (new_symbol_full): Likewise.
16609 (dwarf2_const_value_data): Likewise.
16610 (dwarf2_const_value_attr): Likewise.
16611 (dwarf2_const_value): Likewise.
16612 (die_type): Likewise.
16613 (die_containing_type): Likewise.
16614 (lookup_die_type): Likewise.
16615 (guess_full_die_structure_name): Likewise.
16616 (anonymous_struct_prefix): Likewise.
16617 (dwarf2_name): Likewise.
16618 (follow_die_ref_or_sig): Likewise.
16619 (follow_die_offset): Likewise.
16620 (follow_die_ref): Likewise.
16621 (dwarf2_fetch_die_loc_sect_off): Likewise.
16622 (dwarf2_fetch_constant_bytes): Likewise.
16623 (dwarf2_fetch_die_type_sect_off): Likewise.
16624 (dwarf2_get_die_type): Likewise.
16625 (follow_die_sig): Likewise.
16626 (decode_locdesc): Likewise.
16627 (dwarf2_per_cu_objfile): Likewise.
16628 (dwarf2_per_cu_text_offset): Likewise.
16629 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16630 objfile.
16631 (set_die_type): Access objfile through
16632 dwarf2_per_objfile.
16633
16634 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16635
16636 * valprint.c (converted_character_d): Remove typedef.
16637 (DEF_VEC_O (converted_character_d)): Remove.
16638 (count_next_character): Use std::vector.
16639 (print_converted_chars_to_obstack): Likewise.
16640 (generic_printstr): Likewise.
16641
16642 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16643
16644 * xml-support.h (struct gdb_xml_value): Add constructor.
16645 <value>: Change type to unique_xmalloc_ptr.
16646 (gdb_xml_value_s): Remove typedef.
16647 (DEF_VEC_O (gdb_xml_value_s)): Remove.
16648 (gdb_xml_element_start_handler): Change parameter type to
16649 std::vector.
16650 (xml_find_attribute): Likewise.
16651 * xml-support.c (xml_find_attribute): Change parameter type to
16652 std::vector and adjust.
16653 (gdb_xml_values_cleanup): Remove.
16654 (gdb_xml_parser::start_element): Adjust to std::vector.
16655 (xinclude_start_include): Change paraeter type to std::vector
16656 and adjust.
16657 * btrace.c (check_xml_btrace_version): Likewise.
16658 (parse_xml_btrace_block): Likewise.
16659 (parse_xml_btrace_pt_config_cpu): Likewise.
16660 (parse_xml_btrace_pt): Likewise.
16661 (parse_xml_btrace_conf_bts): Likewise.
16662 (parse_xml_btrace_conf_pt): Likewise.
16663 * memory-map.c (memory_map_start_memory): Likewise.
16664 (memory_map_start_property): Likewise.
16665 * osdata.c (osdata_start_osdata): Likewise.
16666 (osdata_start_item): Likewise.
16667 (osdata_start_column): Likewise.
16668 * remote.c (start_thread): Likewise.
16669 * solib-aix.c (library_list_start_library): Likewise.
16670 (library_list_start_list): Likewise.
16671 * solib-svr4.c (library_list_start_library): Likewise.
16672 (svr4_library_list_start_list): Likewise.
16673 * solib-target.c (library_list_start_segment): Likewise.
16674 (library_list_start_section): Likewise.
16675 (library_list_start_library): Likewise.
16676 (library_list_start_list): Likewise.
16677 * tracepoint.c (traceframe_info_start_memory): Likewise.
16678 (traceframe_info_start_tvar): Likewise.
16679 * xml-syscall.c (syscall_start_syscall): Likewise.
16680 * xml-tdesc.c (tdesc_start_target): Likewise.
16681 (tdesc_start_feature): Likewise.
16682 (tdesc_start_reg): Likewise.
16683 (tdesc_start_union): Likewise.
16684 (tdesc_start_struct): Likewise.
16685 (tdesc_start_flags): Likewise.
16686 (tdesc_start_enum): Likewise.
16687 (tdesc_start_field): Likewise.
16688 (tdesc_start_enum_value): Likewise.
16689 (tdesc_start_vector): Likewise.
16690
16691 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16692
16693 * extension.h (struct xmethod_worker) <clone>: Remove.
16694 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16695 Remove.
16696 (python_xmethod_worker::clone): Remove.
16697 * valops.c (find_overload_match): Use std::move instead of
16698 clone.
16699
16700 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16701
16702 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16703 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16704 <free_xmethod_worker_data>: Remove.
16705 <get_matching_xmethod_workers>: Chance VEC to std::vector.
16706 <get_xmethod_arg_types>: Remove.
16707 <get_xmethod_result_type>: Remove.
16708 <invoke_xmethod>: Remove.
16709 * extension.c (new_xmethod_worker): Remove.
16710 (clone_xmethod_worker): Remove.
16711 (get_matching_xmethod_workers): Return void, pass std::vector by
16712 pointer.
16713 (get_xmethod_arg_types): Rename to...
16714 (xmethod_worker::get_arg_types): ... this, and adjust.
16715 (get_xmethod_result_type): Rename to...
16716 (xmethod_worker::get_result_type): ... this, and adjust.
16717 (invoke_xmethod): Remove.
16718 (free_xmethod_worker): Remove.
16719 (free_xmethod_worker_vec): Remove.
16720 * extension.h (enum ext_lang_rc): Move here from
16721 extension-priv.h.
16722 (struct xmethod_worker): Add constructor and destructor.
16723 <data>: Remove.
16724 <value>: Remove.
16725 <invoke, clone, do_get_result_type, do_get_arg_types>: New
16726 virtual pure methods.
16727 <get_arg_types, get_result_type>: New methods.
16728 (xmethod_worker_ptr): Remove typedef.
16729 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16730 (xmethod_worker_vec): Remove typedef.
16731 (xmethod_worker_up): New typedef.
16732 (invoke_xmethod): Remove.
16733 (clone_xmethod_worker): Remove.
16734 (free_xmethod_worker): Remove.
16735 (free_xmethod_worker_vec): Remove.
16736 (get_xmethod_arg_types): Remove.
16737 (get_xmethod_result_type): Remove.
16738 * valops.c (find_method_list): Use std::vector, don't use
16739 intermediate vector.
16740 (value_find_oload_method_list): Use std::vector.
16741 (find_overload_match): Use std::vector.
16742 (find_oload_champ): Use std::vector.
16743 * value.c (value_free): Use operator delete.
16744 (value_of_xmethod): Rename to...
16745 (value_from_xmethod): ... this. Don't assign
16746 xmethod_worker::value, take rvalue-reference.
16747 (result_type_of_xmethod): Adjust.
16748 (call_xmethod): Adjust.
16749 * value.h: Include extension.h.
16750 (struct xmethod_worker): Don't forward-declare.
16751 (value_of_xmethod): Rename to...
16752 (value_from_xmethod): ... this, take rvalue-reference.
16753 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16754 (struct python_xmethod_worker): ... this, add constructor and
16755 destructor.
16756 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16757 (gdbpy_free_xmethod_worker_data): Rename to...
16758 (python_xmethod_worker::~python_xmethod_worker): ... this and
16759 adjust.
16760 (gdbpy_clone_xmethod_worker_data): Rename to...
16761 (python_xmethod_worker::clone): ... this and adjust.
16762 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16763 temporary vector.
16764 (gdbpy_get_xmethod_arg_types): Rename to...
16765 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16766 (gdbpy_get_xmethod_result_type): Rename to...
16767 (python_xmethod_worker::do_get_result_type): ... this and
16768 adjust.
16769 (gdbpy_invoke_xmethod): Rename to...
16770 (python_xmethod_worker::invoke): ... this and adjust.
16771 (new_python_xmethod_worker): Rename to...
16772 (python_xmethod_worker::python_xmethod_worker): ... this and
16773 adjust.
16774 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16775 Remove.
16776 (gdbpy_free_xmethod_worker_data): Remove.
16777 (gdbpy_get_matching_xmethod_workers): Use std::vector.
16778 (gdbpy_get_xmethod_arg_types): Remove.
16779 (gdbpy_get_xmethod_result_type): Remove.
16780 (gdbpy_invoke_xmethod): Remove.
16781 * python/python.c (python_extension_ops): Remove obsolete
16782 callbacks.
16783
16784 2018-01-05 Pedro Alves <palves@redhat.com>
16785
16786 PR gdb/18653
16787 * common/signals-state-save-restore.c
16788 (save_original_signals_state): New parameter 'quiet'. Warn if we
16789 find a custom handler preinstalled, instead of internal erroring.
16790 But only warn if !quiet.
16791 * common/signals-state-save-restore.h
16792 (save_original_signals_state): New parameter 'quiet'.
16793 * main.c (captured_main_1): Move save_original_signals_state call
16794 after option handling, and pass QUIET.
16795
16796 2018-01-05 Pedro Alves <palves@redhat.com>
16797
16798 * spu-tdep.c (spu_catch_start): Pass
16799 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16800
16801 2018-01-05 Pedro Alves <palves@redhat.com>
16802
16803 PR gdb/22670
16804 * ada-lang.c (literal_symbol_name_matcher): New function.
16805 (ada_get_symbol_name_matcher): Use it for
16806 symbol_name_match_type::SEARCH_NAME.
16807 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
16808 it down instead of assuming symbol_name_match_type::FULL.
16809 * block.h (block_lookup_symbol): New parameter 'match_type'.
16810 * c-valprint.c (print_unpacked_pointer): Use
16811 lookup_symbol_search_name instead of lookup_symbol.
16812 * compile/compile-object-load.c (get_out_value_type): Pass down
16813 symbol_name_match_type::SEARCH_NAME.
16814 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16815 symbol_name_match_type::FULL.
16816 * cp-support.c (cp_get_symbol_name_matcher): Handle
16817 symbol_name_match_type::SEARCH_NAME.
16818 * infrun.c (insert_exception_resume_breakpoint): Use
16819 lookup_symbol_search_name.
16820 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16821 * psymtab.c (maintenance_check_psymtabs): Use
16822 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16823 * stack.c (print_frame_args): Use lookup_symbol_search_name and
16824 SYMBOL_SEARCH_NAME.
16825 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16826 if symbol_name_match_type::SEARCH_NAME.
16827 (lookup_symbol_in_language): Pass down
16828 symbol_name_match_type::FULL.
16829 (lookup_symbol_search_name): New.
16830 (lookup_language_this): Pass down
16831 symbol_name_match_type::SEARCH_NAME.
16832 (lookup_symbol_aux, lookup_local_symbol): New parameter
16833 'match_type'. Pass it down.
16834 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16835 (lookup_symbol_search_name): New declaration.
16836 (lookup_symbol_in_block): New 'match_type' parameter.
16837
16838 2018-01-05 Pedro Alves <palves@redhat.com>
16839
16840 PR gdb/22670
16841 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16842 ada_lookup_symbol.
16843 (ada_lookup_symbol): Reimplement in terms of
16844 ada_lookup_symbol_list, bits factored out from
16845 ada_lookup_encoded_symbol.
16846
16847 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16848
16849 * ada-exp.y (write_object_renaming): When subscripting an array
16850 using a symbol as the index, pass the block in call to
16851 ada_lookup_encoded_symbol when looking that symbol up.
16852
16853 2018-01-05 Jerome Guitton <guitton@adacore.com>
16854
16855 * ada-lang.c (ada_array_length): Use ada_index_type instead of
16856 TYPE_INDEX_TYPE.
16857
16858 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16859
16860 * ada-lang.c (ada_to_fixed_value_create): Add handling of
16861 the case where VALUE_LVAL (val0) is not lval_memory.
16862
16863 2018-01-05 Xavier Roirand <roirand@adacore.com>
16864
16865 * ada-valprint.c (print_optional_low_bound): Handle
16866 character-indexed array printing like boolean-indexed array
16867 printing.
16868
16869 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16870
16871 * NEWS: Create a new section for the next release branch.
16872 Rename the section of the current branch, now that it has
16873 been cut.
16874
16875 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16876
16877 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16878 * version.in: Bump version to 8.1.50.DATE-git.
16879
16880 2018-01-03 Xavier Roirand <roirand@adacore.com>
16881
16882 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16883 Add field.
16884 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16885 Add field.
16886 (default_exception_support_info) <catch_handlers_sym>: Add field.
16887 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16888 (ada_exception_name_addr_1): Add "catch handlers" handling.
16889 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16890 Update all callers.
16891 (create_excep_cond_exprs) <ex>: Add parameter.
16892 (re_set_exception): Update create_excep_cond_exprs call.
16893 (print_it_exception, print_one_exception, print_mention_exception)
16894 (print_recreate_exception): Add "catch handler" handling.
16895 (allocate_location_catch_handlers, re_set_catch_handlers)
16896 (check_status_catch_handlers, print_it_catch_handlers)
16897 (print_one_catch_handlers, print_mention_catch_handlers)
16898 (print_recreate_catch_handlers): New function.
16899 (catch_handlers_breakpoint_ops): New variable.
16900 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16901 Add parameter. Add "catch handler" handling.
16902 (ada_exception_sym_name, ada_exception_breakpoint_ops):
16903 Add "catch handler" handling.
16904 (ada_exception_catchpoint_cond_string): Add "catch handler"
16905 handling.
16906 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16907 call.
16908 (catch_ada_handlers_command): New function.
16909 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16910 operations structure.
16911 (_initialize_ada_language): Add "catch handlers" command entry.
16912 * NEWS: Document "catch handlers" feature.
16913
16914 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16915
16916 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16917 account when creating the array type of the slice.
16918 (ada_value_slice): Likewise.
16919
16920 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16921
16922 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16923 New enum value.
16924 (create_array_type_with_stride): Add byte_stride_prop parameter.
16925 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16926 New parameter. Update all callers in this file.
16927 (array_type_has_dynamic_stride): New function.
16928 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16929 of arrays with dynamic byte strides.
16930 * dwarf2read.c (read_array_type): Add support for dynamic
16931 DW_AT_byte_stride attributes.
16932
16933 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16934
16935 * dwarf2read.c (read_unspecified_type): Treat
16936 DW_TAG_enumeration_type DIEs from Ada units as stubs.
16937
16938 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16939
16940 Update copyright year range in all GDB files.
16941
16942 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
16943
16944 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16945 and gdb/testsuite/gdb.base/step-line.c.
16946
16947 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16948
16949 * copyright.py (main): Dump the contents of
16950 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16951 even if BY_HAND is empty.
16952
16953 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16954
16955 * top.c (print_gdb_version): Update Copyright year in version
16956 message.
16957
16958 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16959
16960 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16961
16962 For older changes see ChangeLog-2017.
16963 \f
16964 Local Variables:
16965 mode: change-log
16966 left-margin: 8
16967 fill-column: 74
16968 version-control: never
16969 coding: utf-8
16970 End:
This page took 0.390921 seconds and 5 git commands to generate.