Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2
3 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
4 replace_operator_with_call.
5
6 2018-09-08 Joel Brobecker <brobecker@adacore.com>
7
8 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
9
10 2018-09-08 Joel Brobecker <brobecker@adacore.com>
11
12 * ada-typeprint.c (print_range): Print the bounds using TYPE
13 rather than its TYPE_TARGET_TYPE.
14
15 2018-09-08 Joel Brobecker <brobecker@adacore.com>
16
17 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
18 call to ada_to_fixed_value_create.
19
20 2018-09-08 Jerome Guitton <guitton@adacore.com>
21
22 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
23
24 2018-09-08 Joel Brobecker <brobecker@adacore.com>
25
26 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
27 by calls to error.
28
29 2018-09-08 Joel Brobecker <brobecker@adacore.com>
30
31 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
32 Move update of loop variable "fi".
33
34 2018-09-08 Joel Brobecker <brobecker@adacore.com>
35
36 * ada-lang.c (value_assign_to_component): In the case of
37 big-endian targets, extract the bits of the given VAL
38 using an src_offset of zero if container is not a scalar.
39
40 2018-09-06 Simon Ser <contact@emersion.fr>
41
42 PR gdb/23105
43 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
44 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
45 * fbsd-tdep.c (fbsd_make_note_desc): New.
46 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
47 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
48 * target.h (enum target_object) Add FreeBSD-specific
49 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
50
51 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
52
53 * compile/compile-c.h (generate_c_for_variable_locations):
54 Change reference to pointer.
55 * compile/compile-c-support.c (compile_program) <compute>:
56 Likewise.
57 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
58 (generate_c_for_for_one_variable): Likewise
59 (generate_c_for_variable_locations): Likewise
60 * compile/compile-c-types.c (compile_c_instance::convert_type):
61 Likewise
62 * compile/compile-cplus-symbols.c (convert_one_symbol):
63 std::move the scope passed to enter_scope.
64 * compile/compile-cplus-types.c
65 (compile_cplus_instance::enter_scope): Make parameter
66 rvalue-reference.
67 (compile_cplus_instance::new_scope): Change reference to
68 pointer.
69 (compile_cplus_instance::convert_type): Likewise
70 (compile_cplus_convert_typedef): std::move the scope passed to
71 enter_scope.
72 (compile_cplus_convert_struct_or_union): Likewise.
73 (compile_cplus_convert_enum): Likewise.
74 (compile_cplus_convert_namespace): Likewise.
75 * compile/compile-cplus.h (compile_cplus_instance)
76 <enter_scope>: Make parameter rvalue-reference.
77 * compile/compile-internal.h (compile_instance)
78 <get_cached_type>: Likewise
79 * compile/compile-loc2c.c (push): Likewise
80 (pushf): Likewise
81 (unary): Likewise
82 (binary): Likewise
83 (print_label): Likewise
84 (pushf_register_address): Likewise
85 (pushf_register): Likewise
86 (do_compile_dwarf_expr_to_c): Likewise
87 (compile_dwarf_expr_to_c): Likewise
88 (compile_dwarf_bounds_to_c): Likewise
89 * compile/compile.c (compile_instance::get_cached_type):
90 Likewise
91 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
92 (compile_dwarf_bounds_to_c): Likewise
93 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
94 (dwarf2_compile_property_to_c): Likewise
95 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
96 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
97 Likewise
98
99 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
100
101 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
102 * tui/tui-data.c (init_content_element): Don't initialize it.
103
104 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
105
106 * tui/tui-data.h (struct tui_win_info)
107 <detail::opaque>: Remove.
108 * tui/tui-data.c (init_win_info): Remove assignment.
109
110 2018-09-05 Tom Tromey <tom@tromey.com>
111
112 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
113 -Wformat-nonliteral.
114 * target-float.c (host_float_ops<T>::to_string)
115 (host_float_ops<T>::from_string): Use
116 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
117 * configure: Rebuild.
118
119 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
120
121 * printcmd.c (printf_c_string): Use
122 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
123 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
124
125 2018-09-05 Tom Tromey <tom@tromey.com>
126
127 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
128
129 2018-09-05 Tom de Vries <tdevries@suse.de>
130
131 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
132 with resolve_abstract_p == true.
133 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
134 defaulting to false. Propagate resolve_abstract_p to
135 dwarf2_fetch_die_loc_sect_off.
136 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
137 parameter, defaulting to false.
138 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
139 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
140 parameter.
141 * dwarf2read.h (struct die_info): Forward-declare.
142 (die_info_ptr): New typedef.
143 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
144
145 2018-09-05 Joel Brobecker <brobecker@adacore.com>
146
147 GDB 8.2 released.
148
149 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
150 Pedro Alves <palves@redhat.com>
151
152 * gnulib/Makefile.in (aclocal_m4_deps): Move to
153 "aclocal-m4-deps.mk". Include file here.
154 $(srcdir)/aclocal.m4: Add "configure.ac".
155 * gnulib/aclocal-m4-deps.mk: New file.
156 * gnulib/update-gnulib.sh: Automatically update
157 "aclocal-m4-deps.mk".
158
159 2018-09-04 Tom Tromey <tom@tromey.com>
160
161 * configure: Rebuild.
162 * configure.ac: Remove multi-ice code.
163
164 2018-09-04 Tom Tromey <tom@tromey.com>
165
166 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
167 (ada-exp.o): Update.
168
169 2018-09-04 Tom Tromey <tom@tromey.com>
170
171 * Makefile.in (printcmd.o, target-float.o): Remove.
172 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
173
174 2018-09-04 Tom Tromey <tom@tromey.com>
175
176 * gnulib/Makefile.in: Remove obsolete comment.
177 * Makefile.in: Remove obsolete comment.
178
179 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
180
181 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
182 line with '+'.
183
184 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
185
186 * riscv-tdep.c: Add 'prologue-value.h' include.
187 (struct riscv_unwind_cache): New struct.
188 (riscv_debug_unwinder): New global.
189 (riscv_scan_prologue): Update arguments, capture register details
190 from prologue scan.
191 (riscv_skip_prologue): Reformat arguments line, move end of
192 prologue calculation into riscv_scan_prologue.
193 (riscv_frame_cache): Update return type, create
194 riscv_unwind_cache, scan the prologue, and fill in remaining cache
195 details.
196 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
197 (riscv_frame_prev_register): Use the trad_frame within the
198 riscv_unwind_cache.
199 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
200 flag.
201
202 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
203
204 * trad-frame.h (trad_frame_set_realreg): Declare.
205 (trad_frame_set_addr): Declare.
206 * trad-frame.c (trad_frame_set_realreg): Define new function.
207 (trad_frame_set_addr): Define new function.
208 (trad_frame_set_reg_realreg): Use new function.
209 (trad_frame_set_reg_addr): Use new function.
210
211 2018-09-01 Keith Seitz <keiths@redhat.com>
212
213 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
214 pulongest instead of "%lld".
215 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
216 ATTRIBUTE_UNUSED.
217
218 2018-08-31 Tom Tromey <tom@tromey.com>
219
220 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
221 variant part type.
222
223 2018-08-31 Pedro Alves <palves@redhat.com>
224
225 * gdbarch.h: Regenerate.
226
227 2018-08-31 Pedro Alves <palves@redhat.com>
228
229 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
230 * target.h (Hardware watchpoint interfaces): Describe
231 continuable/steppable/non-steppable watchpoints.
232 * gdbarch.h, gdbarch.c: Regenerate.
233
234 2018-08-31 Pedro Alves <palves@redhat.com>
235
236 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
237 Delete.
238 * s390-linux-nat.c
239 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
240 * target.h (target_ops::have_continuable_watchpoint): Delete.
241 (target_have_continuable_watchpoint): Delete.
242 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
243 * target-delegates.c: Regenerate.
244
245 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
246
247 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
248 the files present in "gnulib/import/m4/".
249
250 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
251
252 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
253 c.sw, c.swsp, and c.sdsp.
254
255 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
256
257 * riscv-tdep.c (struct riscv_inferior_data): Delete.
258 (riscv_read_misa_reg): Don't cache value read into inferior data.
259 (riscv_new_inferior_data): Delete.
260 (riscv_inferior_data_cleanup): Delete.
261 (riscv_inferior_data): Delete.
262 (riscv_invalidate_inferior_data): Delete.
263 (_initialize_riscv_tdep): Remove initialisation of inferior data.
264
265 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
266
267 * compile/compile-cplus-types.c
268 (compile_cplus_instance::leave_scope): Take the address of scope
269 object.
270 (compile_cplus_instance::convert_qualified_base): Compare quals
271 to 0.
272
273 2018-08-30 Keith Seitz <keiths@redhat.com>
274
275 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
276 Use "%s" and host_address_to_string instead of "%p" in printf.
277
278 2018-08-29 Keith Seitz <keiths@redhat.com>
279
280 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
281 and compile-cplus-types.c.
282 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
283 * c-lang.c (cplus_language_defn): Set C++ compile functions.
284 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
285 Declare.
286 * compile/compile-c-support.c: Include compile-cplus.h.
287 (load_libcompile): Templatize.
288 (get_compile_context): "New" function.
289 (c_get_compile_context): Use get_compile_context.
290 (cplus_get_compile_context): New function.
291 (cplus_push_user_expression, cplus_pop_user_expression)
292 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
293 (cplus_compute_program): Define new structs/functions.
294 * compile/compile-cplus-symmbols.c: New file.
295 * compile/compile-cplus-types.c: New file.
296 * compile/compile-cplus.h: New file.
297 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
298 Declare.
299 * compile/compile-object-load.c (get_out_value_type): Use
300 strncmp_iw when comparing symbol names.
301 (compile_object_load): Add mst_bss and mst_data.
302 * compile/compile.c (_initialize_compile): Remove
303 -Wno-implicit-function-declaration from `compile_args'.
304 * compile/gcc-cp-plugin.h: New file.
305 * NEWS: Mention C++ compile support and new debug options.
306
307 2018-08-29 Keith Seitz <keiths@redhat.com>
308
309 * linespec.c (collect_info::add_symbol): Make virtual.
310 (struct symbol_searcher_collect_info): New struct.
311 (symbol_searcher::find_all_symbols): New method.
312 * symtab.h (class symbol_searcher): New class.
313
314 2018-08-29 Keith Seitz <keiths@redhat.com>
315
316 * linespec.c (struct linespec) <function_symbols, label_symbols>:
317 Change to vector of block_symbol. Update all users.
318 (struct collect_info) <symbols>: Likewise.
319 (collect_info::add_symbol): Take block_symbol as argument.
320 Update all callers.
321 (decode_compound_collector) <m_symbols>: Change type to vector
322 of block_symbol. Update all users.
323 (decode_compound_collector::operator ()): Change parameter type
324 to block_symbol.
325 (find_method, find_function_symbols, find_linespec_symbols)
326 (find_label_symbols_in_block, find_label_symbols): Change symbol
327 vectors to block_symbol vectors.
328 * symtab.h (symbol_found_callback_ftype): Change parameter type to
329 block_symbol.
330
331 2018-08-29 Keith Seitz <keiths@redhat.com>
332
333 * linespec.c (symbolp): Remove typedef and VEC definitions.
334 (bound_minimal_symbol_d): Likewise.
335
336 2018-08-29 Keith Seitz <keiths@redhat.com>
337
338 * linespec.c (decode_compound_collector::decode_compound_collector):
339 Remove initialization for `m_symtabs'.
340 (decode_compound_collector::release_symbols): Change return type
341 to std::vector. Update all callers.
342 (class decode_compound_collector) <m_symbols>: Change type to
343 std::vector.
344 (lookup_prefix_sym): Change return type to std::vector. Update all
345 callers.
346 (compare_symbols): Remove.
347 (std_compare_symbols): Rename to `compare_symbols'.
348 (find_method): Change `sym_classes' parameter to std::vector.
349 Update all callers. Use std::sort to sort sym_classes.
350 (find_linespec_symbols): Remove cleanup.
351
352 2018-08-29 Keith Seitz <keiths@redhat.com>
353
354 * linespec.c (struct linespec) <minimal_symbols>: Change type to
355 std::vector. Update all users.
356 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
357 (struct collect_info) <minimal_symbols>: Likewise.
358 (compare_msymbols): Return bool. Change parameters to const
359 bound_minimal_symbol references.
360 (find_method, find_function_symbols, find_linespec_symbols): Change
361 `minsyms' parameter to std::vector. Update all callers.
362
363 2018-08-29 Keith Seitz <keiths@redhat.com>
364
365 * linespec.c (struct linespec) <label_symbols>: Change type to
366 std::vector. Update all users.
367 (find_label_symbols_in_block): Change `result' parameter to
368 std::vector. Update all callers.
369 (find_label_symbols): Return std::vector. Update all callers.
370
371 2018-08-29 Keith Seitz <keiths@redhat.com>
372
373 * linespec.c (struct linespec) <function_symbols>: Change type to
374 std::vector. Update all users.
375 (struct collect_info) <function_symbols>: Likewise.
376 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
377 (std_compare_symbols): New function.
378 (find_method, find_function_symbols, find_linespec_symbols)
379 (find_label_symbols_in_block): Change `symbols' parameter to
380 std::vector. Update all callers.
381 (find_label_symbols): Likewise for `function_symbols' and
382 `label_funcs_ret'.
383
384 2018-08-29 Keith Seitz <keiths@redhat.com>
385
386 * linespec.c (symtab_vector_up): Define.
387 (struct linespec) <file_symtabs>: Change type to std::vector *.
388 Update all uses.
389 (struct collect_info) <file_symtabs>: Likewise.
390 (collect_symtabs_from_filename): Return symtab_vector_up.
391 Update all callers.
392 (decode_objc): Remove cleanup.
393 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
394 (symtab_collector::release_symtabs): Return symtab_vector_up.
395 Update all callers.
396 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
397 Update all users.
398 (collect_symtabs_from_filename, symtabs_from_filename): Return
399 symtab_vector_up. Update all callers.
400
401 2018-08-29 Tom Tromey <tom@tromey.com>
402
403 * csky-tdep.c (csky_analyze_prologue): Use
404 core_addr_to_string_nz.
405
406 2018-08-29 Tom Tromey <tom@tromey.com>
407
408 * windows-nat.c (struct xlate_exception) <them>: Change type to
409 DWORD.
410 (xlate): Fix formatting. Remove last entry.
411 (struct xlate_exception, xlate): Comment out.
412 (windows_nat_target::resume): Use ranged for.
413
414 2018-08-29 Jim Wilson <jimw@sifive.com>
415
416 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
417 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
418 of NT_PRFPREG.
419 (riscv_linux_nat_target::store_registers): Likewise.
420
421 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
422
423 PR gdb/23555
424 PR gdb/23558
425 * gnulib/aclocal.m4: Regenerate.
426 * gnulib/config.in: Regenerate.
427 * gnulib/configure: Regenerate.
428 * gnulib/import/Makefile.am: Update.
429 * gnulib/import/Makefile.in: Update.
430 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
431 * gnulib/import/_Noreturn.h: ... this.
432 * gnulib/import/alloca.in.h: Update.
433 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
434 * gnulib/import/arg-nonnull.h: ... this.
435 * gnulib/import/assure.h: Update.
436 * gnulib/import/at-func.c: Update.
437 * gnulib/import/basename-lgpl.c: Update.
438 * gnulib/import/extra/snippet/c++defs.h: Rename to...
439 * gnulib/import/c++defs.h: ... this.
440 * gnulib/import/canonicalize-lgpl.c: Update.
441 * gnulib/import/cdefs.h: Update.
442 * gnulib/import/chdir-long.c: Update.
443 * gnulib/import/chdir-long.h: Update.
444 * gnulib/import/cloexec.c: Update.
445 * gnulib/import/cloexec.h: Update.
446 * gnulib/import/close.c: Update.
447 * gnulib/import/closedir.c: Update.
448 * gnulib/import/config.charset: Update.
449 * gnulib/import/dirent-private.h: Update.
450 * gnulib/import/dirent.in.h: Update.
451 * gnulib/import/dirfd.c: Update.
452 * gnulib/import/dirname-lgpl.c: Update.
453 * gnulib/import/dirname.h: Update.
454 * gnulib/import/dosname.h: Update.
455 * gnulib/import/dup-safer-flag.c: Update.
456 * gnulib/import/dup-safer.c: Update.
457 * gnulib/import/dup.c: Update.
458 * gnulib/import/dup2.c: Update.
459 * gnulib/import/errno.in.h: Update.
460 * gnulib/import/error.c: Update.
461 * gnulib/import/error.h: Update.
462 * gnulib/import/exitfail.c: Update.
463 * gnulib/import/exitfail.h: Update.
464 * gnulib/import/extra/update-copyright: Update.
465 * gnulib/import/fchdir.c: Update.
466 * gnulib/import/fcntl.c: Update.
467 * gnulib/import/fcntl.in.h: Update.
468 * gnulib/import/fd-hook.c: Update.
469 * gnulib/import/fd-hook.h: Update.
470 * gnulib/import/fd-safer-flag.c: Update.
471 * gnulib/import/fd-safer.c: Update.
472 * gnulib/import/fdopendir.c: Update.
473 * gnulib/import/filename.h: Update.
474 * gnulib/import/filenamecat-lgpl.c: Update.
475 * gnulib/import/filenamecat.h: Update.
476 * gnulib/import/flexmember.h: Update.
477 * gnulib/import/float+.h: Update.
478 * gnulib/import/float.c: Update.
479 * gnulib/import/float.in.h: Update.
480 * gnulib/import/fnmatch.c: Update.
481 * gnulib/import/fnmatch.in.h: Update.
482 * gnulib/import/fnmatch_loop.c: Update.
483 * gnulib/import/fpucw.h: Update.
484 * gnulib/import/frexp.c: Update.
485 * gnulib/import/frexpl.c: Update.
486 * gnulib/import/fstat.c: Update.
487 * gnulib/import/fstatat.c: Update.
488 * gnulib/import/getcwd-lgpl.c: Update.
489 * gnulib/import/getcwd.c: Update.
490 * gnulib/import/getdtablesize.c: Update.
491 * gnulib/import/getlogin_r.c: Update.
492 * gnulib/import/getprogname.c: Update.
493 * gnulib/import/getprogname.h: Update.
494 * gnulib/import/gettext.h: Update.
495 * gnulib/import/gettimeofday.c: Update.
496 * gnulib/import/glob-libc.h: Update.
497 * gnulib/import/glob.c: Update.
498 * gnulib/import/glob.in.h: Update.
499 * gnulib/import/glob_internal.h: Update.
500 * gnulib/import/glob_pattern_p.c: Update.
501 * gnulib/import/globfree.c: Update.
502 * gnulib/import/hard-locale.c: Update.
503 * gnulib/import/hard-locale.h: Update.
504 * gnulib/import/intprops.h: Update.
505 * gnulib/import/inttypes.in.h: Update.
506 * gnulib/import/isnan.c: Update.
507 * gnulib/import/isnand-nolibm.h: Update.
508 * gnulib/import/isnand.c: Update.
509 * gnulib/import/isnanl-nolibm.h: Update.
510 * gnulib/import/isnanl.c: Update.
511 * gnulib/import/itold.c: Update.
512 * gnulib/import/libc-config.h: Update.
513 * gnulib/import/limits.in.h: Update.
514 * gnulib/import/localcharset.c: Update.
515 * gnulib/import/localcharset.h: Update.
516 * gnulib/import/localtime-buffer.c: Update.
517 * gnulib/import/localtime-buffer.h: Update.
518 * gnulib/import/lstat.c: Update.
519 * gnulib/import/m4/00gnulib.m4: Update.
520 * gnulib/import/m4/__inline.m4: Update.
521 * gnulib/import/m4/absolute-header.m4: Update.
522 * gnulib/import/m4/alloca.m4: Update.
523 * gnulib/import/m4/builtin-expect.m4: Update.
524 * gnulib/import/m4/canonicalize.m4: Update.
525 * gnulib/import/m4/chdir-long.m4: Update.
526 * gnulib/import/m4/close.m4: Update.
527 * gnulib/import/m4/closedir.m4: Update.
528 * gnulib/import/m4/configmake.m4: Update.
529 * gnulib/import/m4/d-ino.m4: Update.
530 * gnulib/import/m4/d-type.m4: Update.
531 * gnulib/import/m4/dirent_h.m4: Update.
532 * gnulib/import/m4/dirfd.m4: Update.
533 * gnulib/import/m4/dirname.m4: Update.
534 * gnulib/import/m4/double-slash-root.m4: Update.
535 * gnulib/import/m4/dup.m4: Update.
536 * gnulib/import/m4/dup2.m4: Update.
537 * gnulib/import/m4/eealloc.m4: Update.
538 * gnulib/import/m4/environ.m4: Update.
539 * gnulib/import/m4/errno_h.m4: Update.
540 * gnulib/import/m4/error.m4: Update.
541 * gnulib/import/m4/exponentd.m4: Update.
542 * gnulib/import/m4/exponentl.m4: Update.
543 * gnulib/import/m4/extensions.m4: Update.
544 * gnulib/import/m4/extern-inline.m4: Update.
545 * gnulib/import/m4/fchdir.m4: Update.
546 * gnulib/import/m4/fcntl-o.m4: Update.
547 * gnulib/import/m4/fcntl.m4: Update.
548 * gnulib/import/m4/fcntl_h.m4: Update.
549 * gnulib/import/m4/fdopendir.m4: Update.
550 * gnulib/import/m4/filenamecat.m4: Update.
551 * gnulib/import/m4/flexmember.m4: Update.
552 * gnulib/import/m4/float_h.m4: Update.
553 * gnulib/import/m4/fnmatch.m4: Update.
554 * gnulib/import/m4/fnmatch_h.m4: Update.
555 * gnulib/import/m4/fpieee.m4: Update.
556 * gnulib/import/m4/frexp.m4: Update.
557 * gnulib/import/m4/frexpl.m4: Update.
558 * gnulib/import/m4/fstat.m4: Update.
559 * gnulib/import/m4/fstatat.m4: Update.
560 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
561 * gnulib/import/m4/getcwd-path-max.m4: Update.
562 * gnulib/import/m4/getcwd.m4: Update.
563 * gnulib/import/m4/getdtablesize.m4: Update.
564 * gnulib/import/m4/getlogin.m4: Update.
565 * gnulib/import/m4/getlogin_r.m4: Update.
566 * gnulib/import/m4/getpagesize.m4: Update.
567 * gnulib/import/m4/getprogname.m4: Update.
568 * gnulib/import/m4/gettimeofday.m4: Update.
569 * gnulib/import/m4/glibc21.m4: Update.
570 * gnulib/import/m4/glob.m4: Update.
571 * gnulib/import/m4/glob_h.m4: Update.
572 * gnulib/import/m4/gnulib-cache.m4: Update.
573 * gnulib/import/m4/gnulib-common.m4: Update.
574 * gnulib/import/m4/gnulib-comp.m4: Update.
575 * gnulib/import/m4/gnulib-tool.m4: Update.
576 * gnulib/import/m4/hard-locale.m4: Update.
577 * gnulib/import/m4/include_next.m4: Update.
578 * gnulib/import/m4/inttypes-pri.m4: Update.
579 * gnulib/import/m4/inttypes.m4: Update.
580 * gnulib/import/m4/isnand.m4: Update.
581 * gnulib/import/m4/isnanl.m4: Update.
582 * gnulib/import/m4/largefile.m4: Update.
583 * gnulib/import/m4/limits-h.m4: Update.
584 * gnulib/import/m4/localcharset.m4: Update.
585 * gnulib/import/m4/locale-fr.m4: Update.
586 * gnulib/import/m4/locale-ja.m4: Update.
587 * gnulib/import/m4/locale-zh.m4: Update.
588 * gnulib/import/m4/localtime-buffer.m4: Update.
589 * gnulib/import/m4/longlong.m4: Update.
590 * gnulib/import/m4/lstat.m4: Update.
591 * gnulib/import/m4/malloc.m4: Update.
592 * gnulib/import/m4/malloca.m4: Update.
593 * gnulib/import/m4/math_h.m4: Update.
594 * gnulib/import/m4/mbrtowc.m4: Update.
595 * gnulib/import/m4/mbsinit.m4: Update.
596 * gnulib/import/m4/mbsrtowcs.m4: Update.
597 * gnulib/import/m4/mbstate_t.m4: Update.
598 * gnulib/import/m4/memchr.m4: Update.
599 * gnulib/import/m4/memmem.m4: Update.
600 * gnulib/import/m4/mempcpy.m4: Update.
601 * gnulib/import/m4/memrchr.m4: Update.
602 * gnulib/import/m4/mkdir.m4: Update.
603 * gnulib/import/m4/mkstemp.m4: Update.
604 * gnulib/import/m4/mmap-anon.m4: Update.
605 * gnulib/import/m4/mode_t.m4: Update.
606 * gnulib/import/m4/msvc-inval.m4: Update.
607 * gnulib/import/m4/msvc-nothrow.m4: Update.
608 * gnulib/import/m4/multiarch.m4: Update.
609 * gnulib/import/m4/nocrash.m4: Update.
610 * gnulib/import/m4/off_t.m4: Update.
611 * gnulib/import/m4/onceonly.m4: Update.
612 * gnulib/import/m4/open-cloexec.m4: Update.
613 * gnulib/import/m4/open.m4: Update.
614 * gnulib/import/m4/openat.m4: Update.
615 * gnulib/import/m4/opendir.m4: Update.
616 * gnulib/import/m4/pathmax.m4: Update.
617 * gnulib/import/m4/rawmemchr.m4: Update.
618 * gnulib/import/m4/readdir.m4: Update.
619 * gnulib/import/m4/readlink.m4: Update.
620 * gnulib/import/m4/realloc.m4: Update.
621 * gnulib/import/m4/rename.m4: Update.
622 * gnulib/import/m4/rewinddir.m4: Update.
623 * gnulib/import/m4/rmdir.m4: Update.
624 * gnulib/import/m4/save-cwd.m4: Update.
625 * gnulib/import/m4/secure_getenv.m4: Update.
626 * gnulib/import/m4/setenv.m4: Update.
627 * gnulib/import/m4/signal_h.m4: Update.
628 * gnulib/import/m4/ssize_t.m4: Update.
629 * gnulib/import/m4/stat-time.m4: Update.
630 * gnulib/import/m4/stat.m4: Update.
631 * gnulib/import/m4/std-gnu11.m4: Update.
632 * gnulib/import/m4/stdbool.m4: Update.
633 * gnulib/import/m4/stddef_h.m4: Update.
634 * gnulib/import/m4/stdint.m4: Update.
635 * gnulib/import/m4/stdio_h.m4: Update.
636 * gnulib/import/m4/stdlib_h.m4: Update.
637 * gnulib/import/m4/strchrnul.m4: Update.
638 * gnulib/import/m4/strdup.m4: Update.
639 * gnulib/import/m4/strerror.m4: Update.
640 * gnulib/import/m4/string_h.m4: Update.
641 * gnulib/import/m4/strstr.m4: Update.
642 * gnulib/import/m4/strtok_r.m4: Update.
643 * gnulib/import/m4/sys_socket_h.m4: Update.
644 * gnulib/import/m4/sys_stat_h.m4: Update.
645 * gnulib/import/m4/sys_time_h.m4: Update.
646 * gnulib/import/m4/sys_types_h.m4: Update.
647 * gnulib/import/m4/tempname.m4: Update.
648 * gnulib/import/m4/time_h.m4: Update.
649 * gnulib/import/m4/unistd-safer.m4: Update.
650 * gnulib/import/m4/unistd_h.m4: Update.
651 * gnulib/import/m4/warn-on-use.m4: Update.
652 * gnulib/import/m4/wchar_h.m4: Update.
653 * gnulib/import/m4/wchar_t.m4: Update.
654 * gnulib/import/m4/wctype_h.m4: Update.
655 * gnulib/import/m4/wint_t.m4: Update.
656 * gnulib/import/malloc.c: Update.
657 * gnulib/import/malloc/scratch_buffer.h: Update.
658 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
659 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
660 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
661 * gnulib/import/malloca.c: Update.
662 * gnulib/import/malloca.h: Update.
663 * gnulib/import/malloca.valgrind: Update.
664 * gnulib/import/math.in.h: Update.
665 * gnulib/import/mbrtowc.c: Update.
666 * gnulib/import/mbsinit.c: Update.
667 * gnulib/import/mbsrtowcs-impl.h: Update.
668 * gnulib/import/mbsrtowcs-state.c: Update.
669 * gnulib/import/mbsrtowcs.c: Update.
670 * gnulib/import/memchr.c: Update.
671 * gnulib/import/memmem.c: Update.
672 * gnulib/import/mempcpy.c: Update.
673 * gnulib/import/memrchr.c: Update.
674 * gnulib/import/mkdir.c: Update.
675 * gnulib/import/mkstemp.c: Update.
676 * gnulib/import/msvc-inval.c: Update.
677 * gnulib/import/msvc-inval.h: Update.
678 * gnulib/import/msvc-nothrow.c: Update.
679 * gnulib/import/msvc-nothrow.h: Update.
680 * gnulib/import/open.c: Update.
681 * gnulib/import/openat-die.c: Update.
682 * gnulib/import/openat-priv.h: Update.
683 * gnulib/import/openat-proc.c: Update.
684 * gnulib/import/openat.c: Update.
685 * gnulib/import/openat.h: Update.
686 * gnulib/import/opendir.c: Update.
687 * gnulib/import/pathmax.h: Update.
688 * gnulib/import/pipe-safer.c: Update.
689 * gnulib/import/rawmemchr.c: Update.
690 * gnulib/import/readdir.c: Update.
691 * gnulib/import/readlink.c: Update.
692 * gnulib/import/realloc.c: Update.
693 * gnulib/import/ref-add.sin: Update.
694 * gnulib/import/ref-del.sin: Update.
695 * gnulib/import/rename.c: Update.
696 * gnulib/import/rewinddir.c: Update.
697 * gnulib/import/rmdir.c: Update.
698 * gnulib/import/same-inode.h: Update.
699 * gnulib/import/save-cwd.c: Update.
700 * gnulib/import/save-cwd.h: Update.
701 * gnulib/import/scratch_buffer.h: Update.
702 * gnulib/import/secure_getenv.c: Update.
703 * gnulib/import/setenv.c: Update.
704 * gnulib/import/signal.in.h: Update.
705 * gnulib/import/stat-time.c: Update.
706 * gnulib/import/stat-time.h: Update.
707 * gnulib/import/stat-w32.c: Update.
708 * gnulib/import/stat-w32.h: Update.
709 * gnulib/import/stat.c: Update.
710 * gnulib/import/stdbool.in.h: Update.
711 * gnulib/import/stddef.in.h: Update.
712 * gnulib/import/stdint.in.h: Update.
713 * gnulib/import/stdio.in.h: Update.
714 * gnulib/import/stdlib.in.h: Update.
715 * gnulib/import/str-two-way.h: Update.
716 * gnulib/import/strchrnul.c: Update.
717 * gnulib/import/strdup.c: Update.
718 * gnulib/import/streq.h: Update.
719 * gnulib/import/strerror-override.c: Update.
720 * gnulib/import/strerror-override.h: Update.
721 * gnulib/import/strerror.c: Update.
722 * gnulib/import/string.in.h: Update.
723 * gnulib/import/stripslash.c: Update.
724 * gnulib/import/strnlen1.c: Update.
725 * gnulib/import/strnlen1.h: Update.
726 * gnulib/import/strstr.c: Update.
727 * gnulib/import/strtok_r.c: Update.
728 * gnulib/import/sys_stat.in.h: Update.
729 * gnulib/import/sys_time.in.h: Update.
730 * gnulib/import/sys_types.in.h: Update.
731 * gnulib/import/tempname.c: Update.
732 * gnulib/import/tempname.h: Update.
733 * gnulib/import/time.in.h: Update.
734 * gnulib/import/unistd--.h: Update.
735 * gnulib/import/unistd-safer.h: Update.
736 * gnulib/import/unistd.in.h: Update.
737 * gnulib/import/unsetenv.c: Update.
738 * gnulib/import/verify.h: Update.
739 * gnulib/import/extra/snippet/warn-on-use.h: Update.
740 * gnulib/import/wchar.in.h: Update.
741 * gnulib/import/wctype.in.h: Update.
742 * gnulib/import/xalloc-oversized.h: Update.
743 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
744 "53e2c179f26a890fa6685af4b6c1397ee370433b".
745
746 2018-08-16 Gary Benson <gbenson@redhat.com>
747
748 PR gdb/13000:
749 * gdb/main.c (captured_main_1): Exit with nonzero status
750 in batch mode if the last command to be executed failed.
751 * NEWS: Mention the above.
752
753 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
754
755 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
756 end of warning message.
757
758 2018-08-29 Alan Hayward <alan.hayward@arm.com>
759
760 PR gdb/22943:
761 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
762 (aarch64_extract_return_value): Use
763 aapcs_is_vfp_call_or_return_candidate.
764 (aarch64_return_in_memory): Likewise.
765 (aarch64_store_return_value): Likewise.
766
767 2018-08-29 Alan Hayward <alan.hayward@arm.com>
768
769 * aarch64-tdep.c
770 (aapcs_is_vfp_call_or_return_candidate): Make static
771 (pass_in_v_or_stack): Remove function.
772 (pass_in_v_vfp_candidate): New function.
773 (aarch64_push_dummy_call): Check for float register candidates.
774
775 2018-08-29 Alan Hayward <alan.hayward@arm.com>
776
777 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
778 (aapcs_is_vfp_call_or_return_candidate_1): New function.
779 (aapcs_is_vfp_call_or_return_candidate): Likewise.
780
781 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
782
783 PR build/23399
784 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
785 (struct ipa_sym_addresses): Rename to...
786 (struct ipa_sym_addresses_common): ... this.
787 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
788
789 2018-08-28 Tom Tromey <tom@tromey.com>
790
791 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
792 (token_fifo): Now a std::vector.
793 (yylex, c_parse): Update.
794 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
795 (token_fifo): Now a std::vector.
796 (yylex, d_parse): Update.
797 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
798 (token_fifo): Now a std::vector.
799 (yylex, go_parse): Update.
800
801 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
802
803 * parser-defs.h (struct type_stack) <elements>: Change type to
804 std::vector<union type_stack_elt>.
805 <depth, size>: Remove.
806 * parse.c (parse_exp_in_context_1): Adjust.
807 (type_stack_reserve): Remove.
808 (check_type_stack_depth): Remove.
809 (insert_into_type_stack): Adjust to std::vector.
810 (insert_type): Likewise.
811 (push_type): Likewise.
812 (push_type_int): Likewise.
813 (insert_type_address_space): Likewise.
814 (pop_type): Likewise.
815 (pop_type_int): Likewise.
816 (pop_typelist): Likewise.
817 (pop_type_stack): Likewise.
818 (append_type_stack): Likewise.
819 (push_type_stack): Likewise.
820 (get_type_stack): Likewise.
821 (type_stack_cleanup): Likewise.
822 (push_typelist): Likewise.
823 (follow_types): Likewise.
824 (_initialize_parse): Likewise.
825
826 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
827
828 * NEWS: Mention csky target.
829
830 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
831 Hafiz Abid Qadeer <abidh@codesourcery.com>
832 Don Breazeal <donb@codesourcery.com>
833
834 * csky-linux-tdep.c: New file.
835 * csky-tdep.c: Likewise.
836 * csky-tdep.h: Likewise.
837 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
838 csky-tdep.o.
839 (HFILES_NO_SRCDIR): Add csky-tdep.h.
840 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
841 * configure.tgt: Add csky support.
842
843 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
844
845 * python/py-framefilter.c (py_print_frame): Print frame architecture
846 when printing on an MI output.
847
848 2018-08-27 Tom Tromey <tom@tromey.com>
849
850 PR build/23087:
851 * configure: Rebuild.
852 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
853
854 2018-08-27 Tom Tromey <tom@tromey.com>
855
856 * aarch64-linux-tdep.c
857 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
858 casts to int.
859
860 2018-08-27 Tom Tromey <tom@tromey.com>
861
862 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
863 unsigned.
864 (ppc64_standard_linkage1, ppc64_standard_linkage2)
865 (ppc64_standard_linkage3, ppc64_standard_linkage4)
866 (ppc64_standard_linkage5, ppc64_standard_linkage6)
867 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
868 unsigned.
869
870 2018-08-27 Tom Tromey <tom@tromey.com>
871
872 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
873 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
874
875 2018-08-27 Tom Tromey <tom@tromey.com>
876
877 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
878 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
879 ULONGEST_MAX.
880 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
881 ULONGEST_MAX.
882 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
883 ULONGEST_MAX.
884 * sparc-linux-tdep.c (sparc32_linux_sigframe)
885 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
886 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
887 ULONGEST_MAX.
888 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
889 (ppc64_linux_sigaction_tramp_frame)
890 (ppc32_linux_sighandler_tramp_frame)
891 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
892 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
893 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
894 * mn10300-linux-tdep.c (am33_linux_sigframe)
895 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
896 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
897 * mips-linux-tdep.c (mips_linux_o32_sigframe)
898 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
899 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
900 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
901 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
902 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
903 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
904 * microblaze-linux-tdep.c
905 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
906 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
907 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
908 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
909 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
910 * common/common-types.h (ULONGEST_MAX): New define.
911 (CORE_ADDR_MAX): Fix formatting.
912 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
913 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
914 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
915 (arm_linux_rt_sigreturn_tramp_frame)
916 (arm_eabi_linux_sigreturn_tramp_frame)
917 (arm_eabi_linux_rt_sigreturn_tramp_frame)
918 (thumb2_eabi_linux_sigreturn_tramp_frame)
919 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
920 (arm_linux_restart_syscall_tramp_frame)
921 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
922 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
923 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
924 ULONGEST_MAX.
925 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
926
927 2018-08-27 Tom Tromey <tom@tromey.com>
928
929 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
930 CORE_ADDR_MAX.
931 * mips-tdep.c (mips_deal_with_atomic_sequence)
932 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
933 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
934 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
935 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
936 CORE_ADDR_MAX.
937 * aarch64-tdep.c (aarch64_software_single_step): Use
938 CORE_ADDR_MAX.
939
940 2018-08-27 Tom Tromey <tom@tromey.com>
941
942 * linespec.c (complete_linespec_component): Add cast to "char".
943 * completer.c (completion_tracker::build_completion_result): Add
944 cast to "char".
945
946 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
947
948 * solist.h (struct solist, struct target_so_ops): Fix
949 indentation.
950
951 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
952
953 * ada-tasks.c (ada_task_info_s): Remove typedef.
954 (DEF_VEC_O(ada_task_info_s)): Remove.
955 (struct ada_tasks_inferior_data): Initialize fields.
956 <task_list>: Make an std::vector.
957 (get_ada_tasks_inferior_data): Allocate with new.
958 (ada_get_task_number): Adjust.
959 (get_task_number_from_id): Likewise.
960 (valid_task_id): Likewise.
961 (ada_get_task_info_from_ptid): Likewise.
962 (iterate_over_live_ada_tasks): Likewise.
963 (add_ada_task): Likewise.
964 (read_known_tasks): Likewise.
965 (ada_build_task_list): Likewise.
966 (print_ada_task_info): Likewise.
967 (info_task): Likewise.
968 (task_command_1): Likewise.
969
970 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
971
972 * ada-lang.c (add_angle_brackets): Return std::string.
973
974 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
975
976 * python/py-threadevent.c (py_get_event_thread): Initialize
977 pythread.
978
979 2018-08-24 Pedro Alves <palves@redhat.com>
980
981 * python/py-bpevent.c (create_breakpoint_event_object): Use
982 copy-initialization.
983 * python/py-continueevent.c (emit_continue_event): Use
984 copy-initialization.
985 * python/py-exitedevent.c (create_exited_event_object): Return a
986 gdbpy_ref<>.
987 (emit_exited_event): Use copy-initialization.
988 * python/py-inferior.c (python_new_inferior)
989 (python_inferior_deleted, add_thread_object): Use
990 copy-initialization.
991 * python/py-infevents.c (create_inferior_call_event_object)
992 (create_register_changed_event_object)
993 (create_memory_changed_event_object): Return a gdbpy_ref<>.
994 (emit_inferior_call_event, emit_memory_changed_event)
995 (emit_register_changed_event): Use copy-initialization.
996 * python/py-newobjfileevent.c (create_new_objfile_event_object):
997 Return a gdbpy_ref<>.
998 (emit_new_objfile_event): Use copy-initialization.
999 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1000 (emit_clear_objfiles_event): Use copy-initialization.
1001 * python/py-signalevent.c (create_signal_event_object): Use
1002 copy-initialization.
1003 * python/py-threadevent.c (create_thread_event_object): Use
1004 copy-initialization.
1005
1006 2018-08-24 Pedro Alves <palves@redhat.com>
1007 Simon Marchi <simon.marchi@ericsson.com>
1008
1009 PR gdb/23379
1010 * python/py-continueevent.c: Include "gdbthread.h".
1011 (create_continue_event_object): Add intro comment. Add 'ptid'
1012 parameter. Use it to find thread to pass to
1013 create_thread_event_object.
1014 (emit_continue_event): Pass PTID down to
1015 create_continue_event_object.
1016 * python/py-event.h (py_get_event_thread): Declare.
1017 (create_thread_event_object): Remove default from 'thread'
1018 parameter.
1019 * python/py-stopevent.c (create_stop_event_object): Use
1020 py_get_event_thread.
1021 * python/py-threadevent.c (get_event_thread): Rename to ...
1022 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1023 and use it to find the thread.
1024 (create_thread_event_object): Assert that THREAD isn't null.
1025 Don't find the event thread here.
1026
1027 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1028
1029 * block.h (blockrange, blockranges): New struct declarations.
1030 (struct block): Add new field named `ranges'.
1031 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1032 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1033 macros for accessing ranges in struct block.
1034 (make_blockranges): New declaration.
1035 block.c (make_blockranges): New function.
1036 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1037 for block.
1038 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1039 * blockframe.c (cache_pc_function_block): New static global.
1040 (clear_pc_function_cache): Clear cache_pc_function_block.
1041 (find_pc_partial_function): Move comment to symtab.h. Add
1042 support for non-contiguous blocks.
1043 * cli/cli-cmds.c (block.h): Include.
1044 (print_disassembly): Handle printing of non-contiguous blocks.
1045 (disassemble_current_function): Likewise.
1046 (disassemble_command): Likewise.
1047
1048 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1049 BLOCK_START.
1050 * blockframe.c (get_pc_function_start): Likewise.
1051 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1052 (gcc_symbol_address): Likewise.
1053 * compile/compile-object-run.c (compile_object_run): Likewise.
1054 * compile/compile.c (get_expr_block_and_pc): Likewise.
1055 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1056 (func_addr_to_tail_call_list): Likewise.
1057 * findvar.c (default_read_var_value): Likewise.
1058 * inline-frame.c (inline_frame_this_id): Likewise.
1059 (skip-inline_frames): Likewise.
1060 * infcmd.c (until_next_command): Likewise.
1061 * linespec.c (convert_linespec_to_sals): Likewise.
1062 * parse.c (parse_exp_in_context_1): Likewise.
1063 * printcmd.c (build_address_symbolic): likewise.
1064 (info_address_command): Likewise.
1065 symtab.c (find_function_start_sal): Likewise.
1066 (skip_prologue_sal): Likewise.
1067 (find_function_alias_target): Likewise.
1068 (find_gnu_ifunc): Likewise.
1069 * stack.c (find_frame_funname): Likewise.
1070 * symtab.c (fixup_symbol_section): Likewise.
1071 (find_function_start_sal): Likewise.
1072 (skip_prologue_sal): Likewsie.
1073 (find_function_alias_target): Likewise.
1074 (find_gnu_ifunc): Likewise.
1075 * tracepoint.c (info_scope_command): Likewise.
1076 * value.c (value_fn_field): Likewise.
1077
1078 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1079 in place of find_pc_partial_function.
1080 * blockframe.c (find_function_entry_range_from_pc): New function.
1081 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1082 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1083 for each range in a block.
1084
1085
1086 2018-08-23 Xavier Roirand <roirand@adacore.com>
1087
1088 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1089 incrementation.
1090
1091 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1092
1093 * solib-svr4.c (read_program_headers_from_bfd): Return
1094 gdb::optional<gdb::byte_vector>.
1095 (svr4_exec_displacement): Adjust.
1096
1097 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1098
1099 * solib-svr4.c (read_program_header): Return
1100 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1101 (find_program_interpreter): Return
1102 gdb::optional<gdb::byte_vector>.
1103 (scan_dyntag_auxv): Adjust.
1104 (enable_break): Adjust.
1105 (svr4_exec_displacement): Adjust.
1106
1107 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1108
1109 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1110 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1111
1112 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1113
1114 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1115 string_vprintf.
1116 * guile/scm-utils.c (gdbscm_printf): Likewise.
1117 * serial.c (serial_printf): Likewise.
1118 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1119
1120 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1121
1122 * stack.c (print_frame): Print frame architecture when printing on
1123 an MI output.
1124 * NEWS: Mention new "arch" attribute in frame output.
1125
1126 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1127
1128 * arch/aarch64.h (aarch64_regnum): Update comment.
1129
1130 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1131
1132 * NEWS: Add SVE to 8.2 section.
1133
1134 2018-08-21 Pedro Alves <palves@redhat.com>
1135
1136 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1137 out from gdbscm_parse_function_args.
1138 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1139 gdbscm_parse_function_args_1.
1140
1141 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1142
1143 PR gdb/17816
1144 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1145 operator.
1146
1147 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1148
1149 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1150
1151 2018-08-19 Michael Spang <spang@google.com>
1152
1153 PR gdb/11786
1154 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1155 for PT_TLS segments.
1156
1157 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1158
1159 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1160 dwarf_variable_value.
1161 * dwarf2-frame.c (class dwarf_expr_executor):
1162 Add override for dwarf_variable_value.
1163 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1164 (class symbol_needs_eval_context): Likewise.
1165 (indirect_synthetic_pointer): Add forward declaration.
1166 (sect_variable_value): New function.
1167 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1168 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1169 for DW_OP_GNU_variable_value.
1170
1171 2018-08-16 Tom Tromey <tom@tromey.com>
1172
1173 * top.c (read_command_file): Update.
1174 (command_line_input): Remove "repeat" argument.
1175 * ada-lang.c (get_selections): Update.
1176 * linespec.c (decode_line_2): Update.
1177 * defs.h (command_line_input): Remove argument.
1178 * cli/cli-script.c (read_next_line): Update.
1179 * python/py-gdb-readline.c: Update.
1180
1181 2018-08-17 Tom Tromey <tom@tromey.com>
1182
1183 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1184 command_line_input.
1185
1186 2018-08-15 Tom Tromey <tom@tromey.com>
1187
1188 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1189
1190 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1191
1192 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1193 If used, use find_pc_partial_function to find address range
1194 to disassemble.
1195 * mi/mi-main.c (mi_cmd_list_features): Report
1196 "data-disassemble-a-option" feature.
1197 * NEWS: Mention new -data-disassemble option -a.
1198
1199 2018-08-13 Tom Tromey <tom@tromey.com>
1200
1201 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1202
1203 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1204
1205 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1206 (aarch64_linux_collect_sve_regset): Likewise.
1207 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1208 * regcache.h (regcache_map_entry_size): New function.
1209
1210 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1211
1212 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1213 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1214 (SVE_HEADER_VL_LENGTH): Likewise.
1215 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1216 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1217 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1218 (SVE_HEADER_SIZE_OFFSET): Likewise.
1219 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1220 (SVE_HEADER_VL_OFFSET): Likewise.
1221 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1222 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1223 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1224 (SVE_HEADER_SIZE): Likewise.
1225 (aarch64_linux_core_read_vq): Add function.
1226 (aarch64_linux_core_read_description): Check for SVE section.
1227
1228 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1229
1230 * aarch64-fbsd-tdep.c
1231 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1232 collect_size.
1233 * aarch64-linux-tdep.c
1234 (aarch64_linux_iterate_over_regset_sections): Likewise.
1235 * alpha-linux-tdep.c
1236 (alpha_linux_iterate_over_regset_sections):
1237 * alpha-nbsd-tdep.c
1238 (alphanbsd_iterate_over_regset_sections): Likewise.
1239 * amd64-fbsd-tdep.c
1240 (amd64fbsd_iterate_over_regset_sections): Likewise.
1241 * amd64-linux-tdep.c
1242 (amd64_linux_iterate_over_regset_sections): Likewise.
1243 * arm-bsd-tdep.c
1244 (armbsd_iterate_over_regset_sections): Likewise.
1245 * arm-fbsd-tdep.c
1246 (arm_fbsd_iterate_over_regset_sections): Likewise.
1247 * arm-linux-tdep.c
1248 (arm_linux_iterate_over_regset_sections): Likewise.
1249 * corelow.c (get_core_registers_cb): Likewise.
1250 (core_target::fetch_registers): Likewise.
1251 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1252 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1253 * gdbarch.h (void): Regenerate.
1254 * gdbarch.sh: Add supply_size and collect_size.
1255 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1256 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1257 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1258 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1259 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1260 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1261 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1262 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1263 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1264 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1265 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1266 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1267 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1268 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1269 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1270 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1271 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1272 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1273 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1274 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1275 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1276 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1277 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1278 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1279 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1280 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1281 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1282 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1283 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1284 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1285
1286 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1287
1288 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1289 with string_printf.
1290
1291 2018-08-10 Keith Seitz <keiths@redhat.com>
1292
1293 * compile/compile-c-support.c (add_code_header, add_code_footer):
1294 Move into policy class.
1295 (c_push_user_expression, pop_user_expression_nop)
1296 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1297 (compile_program): New host class.
1298 (c_compile_program): New typedef.
1299 (c_compute_porgram): Use c_compile_program.
1300
1301 2018-08-10 Keith Seitz <keiths@redhat.com>
1302
1303 * compile/compile-internal.h (compile_instance::~compile_instance):
1304 Remove calls to htab_delete.
1305 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1306 * compile.c (compile_instance::compile_instance): Initialize
1307 htab unique pointers.
1308 (compile_instance::get_cached_type, compile_instance::insert_type)
1309 (compile_instance::error_symbol_once): Update for unique_ptr.
1310
1311 2018-08-10 Keith Seitz <keiths@redhat.com>
1312
1313 * compile/compile-c-symbols.c (struct symbol_error)
1314 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1315 (compile_instance::insert_symbol_error)
1316 (compile_instance::error_symbol_once): Move to ...
1317 * compile/compile.c: ... here.
1318
1319 2018-08-10 Keith Seitz <keiths@redhat.com>
1320
1321 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1322 instead of `new_compile_instance'.
1323 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1324 Update description.
1325 If the symbol error map is not initialized, create it.
1326 (generate_c_for_for_one_symbol): Do not check/initialize
1327 the symbol error map.
1328 * compile/compile-c-types.c (compile_c_instance): Make a class.
1329 Update all callers.
1330 (compile_instance::compile_instance): Initialize the type cache.
1331 (get_cached_type): New function.
1332 (insert_type): Update description.
1333 (compile_c_instance::m_default_cflags): Define.
1334 (convert_type): Update description. Use get_cached_type.
1335 (delete_instance): Moved to destructor.
1336 (new_compile_instance): Moved to constructor.
1337 * compile/compile-c.h (compile_c_instance): Make class inheriting
1338 from compile_instance.
1339 <base>: Remove field.
1340 <type_map, symbol_err_map>: Move to base class.
1341 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1342 * compile/compile-internal.h (compile_instance): Make class.
1343 <type_map_t, symbol_err_map_t>: Define.
1344 <fe>: Rename to `m_gcc_fe'.
1345 <scope, block, gcc_target_options>: Add `m_' prefix.
1346 <m_type_map, m_symbol_err_map>: New fields, moved from
1347 compile_c_instance.
1348 <destroy>: Remove.
1349 (convert_type, new_compile_instance): Remove.
1350 * compile/compile.c (cleanup_compile_instance): Remove.
1351 (compile_to_object): Use unique_ptr to eliminate cleanups.
1352 (compile_instance::set_print_callback, compile_instance::version)
1353 (compile_instance::set_verbose)
1354 (compile_instance::set_driver_filename)
1355 (compile_instance::set_triplet_regexp)
1356 (compile_instance::set_arguments)
1357 (compile_instance::set_source_file)
1358 (compile_instance::compile): Define.
1359
1360 2018-08-10 Keith Seitz <keiths@redhat.com>
1361
1362 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1363 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1364 gcc-c-fe.def to define C plugin.
1365 (delete_instance): Delete `c_plugin'.
1366 (new_compile_instance): Initialize `c_plugin'.
1367 * compile/compile-c.h: Include gcc_c_plugin.h.
1368 (struct compile_c_instance) <c_plugin>: New member.
1369 * gcc-c-plugin.h: New file.
1370 Update all callers with API change.
1371
1372 2018-08-10 Keith Seitz <keiths@redhat.com>
1373
1374 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1375 (HFILES_NO_SRCDIR): ... to here.
1376 Add compile-internal.h and compile-c.h.
1377 * compile/compile-c-support.c: Include compile-c.h.
1378 * compile/compile-c-symbols.c: Include compile-c.h.
1379 (generate_c_for_variable_locations): Update comment.
1380 * compile/compile-c-types.c: Include compile-c.h.
1381 * compile/compile-c.h: New file -- moved C language declarations
1382 from other files here.
1383 * compile/compile-internal.h: Do not include hashtab.h or
1384 common/enum-flags.h.
1385 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1386 (gcc_convert_symbol, gcc_symbol_address)
1387 (generate_c_for_variable_locations, c_get_mode_for_size)
1388 (c_get_range_decl_name): Definitions moved to compile-c.h.
1389 * compile/compile-loc2c.c: Include compile-c.h.
1390
1391 2018-08-10 Keith Seitz <keiths@redhat.com>
1392
1393 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1394 (c_symbol_substitution_name): ... this.
1395 Update all callers.
1396
1397 2018-08-10 Keith Seitz <keiths@redhat.com>
1398
1399 * compile/compile-c-support.c (c_compute_program): Use
1400 unique_xmalloc_ptr to eliminate cleanup.
1401 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1402 Return a unique_xmalloc_ptr and eliminate cleanup.
1403 * compile/compile-internal.h (generate_c_for_variable_locations):
1404 Return unique_xmalloc_ptr and update description.
1405
1406 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1407
1408 * corelow.c (core_target::get_core_register_section): Rename
1409 min_size to section_min_size.
1410
1411 2018-08-09 Jim Wilson <jimw@sifive.com>
1412
1413 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1414 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1415 * NEWS: Mention new GNU/Linux RISC-V target.
1416 * configure.host: Add riscv*-*-linux*.
1417 * configure.nat: Add riscv*.
1418 * configure.tgt: Add riscv*-*-linux*.
1419 * riscv-linux-nat.c: New file.
1420 * riscv-linux-tdep.c: New file.
1421
1422 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1423
1424 * infrun.c (resume): Make static, add forward declaration.
1425 (proceed): Update header comment.
1426 * infrun.h (resume): Delete declaration.
1427
1428 2018-08-09 Tom Tromey <tom@tromey.com>
1429
1430 * riscv-tdep.h: Minor formatting fixes.
1431
1432 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1433
1434 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1435 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1436 (test_mkdir_recursive): Likewise.
1437 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1438
1439 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1440
1441 * valarith.c (value_subscripted_rvalue): If an array is not in
1442 memory, and we don't know the upper bound, then we can't know that
1443 the requested element exists or not.
1444
1445 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1446
1447 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1448 (target_options_to_string): Add comment.
1449
1450 2018-08-08 Tom Tromey <tom@tromey.com>
1451
1452 * unittests/scoped_mmap-selftests.c: Check result of "write".
1453
1454 2018-08-08 Jim Wilson <jimw@sifive.com>
1455
1456 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1457 (decode_register_index_short): New.
1458 (decode_j_type_insn, decode_cj_type_insn): New.
1459 (decode_b_type_insn, decode_cb_type_insn): New.
1460 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1461 local xlen. Check xlen when decoding ambiguous compressed insns. In
1462 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1463 is_c_sw_insn instead of is_sw_insn.
1464 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1465 (riscv_software_single_step): New.
1466 * riscv-tdep.h (riscv_software_single_step): Declare.
1467
1468 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1469 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1470
1471 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1472
1473 PR gdb/18050:
1474 * target.c (dispose_inferior): Don't dispose of inferiors that are
1475 already killed.
1476
1477 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1478
1479 * remote.c (remote_target::download_tracepoint): Change char* to
1480 const char*.
1481
1482 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1483
1484 * target.h (target_options_to_string): Return an std::string.
1485 * target.c (str_comma_list_concat_elem): Return void, use
1486 std::string.
1487 (do_option): Likewise.
1488 (target_options_to_string): Return an std::string.
1489 * linux-nat.c (linux_nat_target::wait): Adjust.
1490 * target-debug.h (target_debug_print_options): Adjust.
1491
1492 2018-08-07 Tom Tromey <tom@tromey.com>
1493
1494 * Makefile.in (CPPFLAGS): New variable.
1495 (INTERNAL_CPPFLAGS): Use it.
1496
1497 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1498
1499 * NEWS: Mention the index cache.
1500
1501 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1502
1503 * common/pathstuff.h (get_standard_cache_dir): New.
1504 * common/pathstuff.c (get_standard_cache_dir): New.
1505 * build-id.h (build_id_to_string): New.
1506 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1507 DEBUG_STR_SUFFIX): Move to here.
1508 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1509 DEBUG_STR_SUFFIX): Move from there.
1510 (write_psymtabs_to_index): Make non-static, add basename
1511 parameter. Write to temporary files, rename when done.
1512 (save_gdb_index_command): Adjust call to
1513 write_psymtabs_to_index.
1514 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1515 field.
1516 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1517 (get_gdb_index_contents_from_cache): New.
1518 (get_gdb_index_contents_from_cache_dwz): New.
1519 (dwarf2_initialize_objfile): Read index from cache.
1520 (dwarf2_build_psymtabs): Save to index.
1521 * dwarf-index-cache.h: New file.
1522 * dwarf-index-cache.c: New file.
1523 * dwarf-index-write.h: New file.
1524
1525 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1526
1527 * gnulib/aclocal.m4: Re-generate.
1528 * gnulib/config.in: Re-generate.
1529 * gnulib/configure: Re-generate.
1530 * gnulib/import/Makefile.am: Re-generate.
1531 * gnulib/import/Makefile.in: Re-generate.
1532 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1533 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1534 * gnulib/import/m4/mkdir.m4: New file.
1535 * gnulib/import/mkdir.c: New file.
1536 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1537 module.
1538
1539 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1540
1541 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1542 * common/scoped_mmap.c: New file.
1543 * common/scoped_mmap.h (destroy): New method.
1544 (~scoped_mmap, reset): Use destroy.
1545 (scoped_mmap): New move constructor.
1546 (mmap_file): New declaration.
1547 * unittests/scoped_mmap-selftests.c (test_normal,
1548 test_invalid_filename, run_tests): New functions.
1549 (_initialize_scoped_mmap_selftests): Register selftest.
1550
1551 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1552
1553 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1554 (read_gdb_index_from_buffer): ... this. Remove section
1555 parameter, add buffer parameter.
1556 (get_gdb_index_contents_ftype,
1557 get_gdb_index_contents_dwz_ftype): New typedefs.
1558 (dwarf2_read_gdb_index): Add callback parameters to get the
1559 index contents.
1560 (get_gdb_index_contents_from_section): New.
1561 (dwarf2_initialize_objfile): Update call to
1562 dwarf2_read_gdb_index.
1563
1564 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1565
1566 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1567 (gdb_open_cloexec): Likewise.
1568 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1569 (commandline_from_pid): Likewise.
1570 (linux_xfer_osdata_threads): Likewise.
1571 (linux_xfer_osdata_fds): Likewise.
1572 * ada-lang.c (is_package_name): Likewise.
1573 * auxv.c (procfs_xfer_auxv): Likewise.
1574 * breakpoint.c (print_one_breakpoint_location): Use
1575 uiout::field_fmt.
1576 (print_one_catch_solib): Use string_printf.
1577 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1578 (add_pe_forwarded_sym): Likewise.
1579 * dwarf2read.c (create_type_unit_group): Likewise.
1580 (build_error_marker_type): Likewise.
1581 * infcall.c (get_function_name): Likewise.
1582 * valprint.c (print_converted_chars_to_obstack): Likewise.
1583 * xtensa-tdep.c (xtensa_register_type): Likewise.
1584
1585 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1586
1587 * remote.c (remote_target::download_tracepoint): Fix format
1588 string errors.
1589
1590 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1591
1592 * tracefile.c: Include common/byte-vector.h.
1593 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1594 with trace_regblock_size if needed. Update uses of buf.
1595
1596 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1597
1598 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1599 std::vector<unsigned char>.
1600 * tracepoint.c (collection_list::collection_list): Remove
1601 m_regs_mask initializer from initializer list. Resize
1602 m_regs_mask using the largest remote register number.
1603 (collection_list::add_remote_register): Remove size check on
1604 m_regs_mask. Use at to access element.
1605 (collection_list::stringify): Change type of temp_buf to
1606 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1607 stringify the register mask. Use pack_hex_byte for the register
1608 mask.
1609
1610 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1611
1612 * tracepoint.h (class collection_list) <add_register>: Remove.
1613 <add_remote_register, add_ax_registers, add_local_register>:
1614 Declare.
1615 <add_memrange>: Add scope parameter.
1616 * tracepoint.c (encode_actions_1): Likewise.
1617 (collection_list::add_register): Rename to ...
1618 (collection_list::add_remote_register): ... this. Update
1619 comment.
1620 (collection_list::add_ax_registers, add_local_register): New
1621 methods.
1622 (collection_list::add_memrange): Add scope parameter. Call
1623 add_local_register instead of add_register.
1624 (finalize_tracepoint_aexpr): New function.
1625 (collection_list::collect_symbol): Update calls to add_memrange.
1626 Call add_local_register instead of add_register. Call
1627 add_ax_registers. Call finalize_tracepoint_aexpr.
1628 (encode_actions_1): Get remote regnos for $reg action. Call
1629 add_remote_register, add_ax_registers, and add_local_register.
1630 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1631 (validate_actionline): Call finalize_tracepoint_aexpr.
1632
1633 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1634
1635 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1636 Replace array buf with gdb::char_vector buf, of size
1637 get_remote_packet_size (). Replace references to buf and
1638 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1639 and xsnprintf with snprintf. Raise errors if the buffer is too
1640 small.
1641
1642 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1643
1644 * remote.c (remote_target::download_tracepoint): Fix the has_more
1645 predicate in the QTDP action list iteration.
1646
1647 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1648
1649 * remote.c (remote_target::download_tracepoint): Fix indentation
1650 in for block.
1651
1652 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1653
1654 * proc-api.c (_initialize_proc_api): Remove c, unused.
1655 * procfs.c (procfs_init_inferior): Remove signals, unused.
1656 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1657 unused.
1658
1659 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1660 Andrew Burgess <andrew.burgess@embecosm.com>
1661
1662 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1663 'W_STOPCODE (0)' as this could be ambiguous.
1664
1665 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1666
1667 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1668 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1669 "ai_socktype").
1670
1671 2018-08-02 Tom Tromey <tom@tromey.com>
1672
1673 PR symtab/16842.
1674 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1675 symbols.
1676 (process_structure_scope): Likewise.
1677
1678 2018-08-02 Xavier Roirand <roirand@adacore.com>
1679
1680 PR gdb/22629:
1681 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1682 kill inferior.
1683
1684 2018-08-02 Tom Tromey <tom@tromey.com>
1685
1686 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1687 (darwin_suspend_inferior, darwin_resume_inferior)
1688 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1689 (darwin_check_new_threads): Check result of get_darwin_inferior.
1690
1691 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1692
1693 GDB 8.1.1 released.
1694
1695 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1696
1697 * varobj.c (varobj_get_path_expr_parent): Report an error if
1698 parent is a dynamic varobj.
1699
1700 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1701
1702 * gnulib/aclocal.m4: Re-generate.
1703 * gnulib/config.in: Re-generate.
1704 * gnulib/configure: Re-generate.
1705 * gnulib/import/Makefile.in: Re-generate.
1706 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1707 * gnulib/import/m4/onceonly.m4: Re-generate.
1708
1709 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1710
1711 * target-descriptions.c (struct xml_test_tdesc): New.
1712 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1713 (record_xml_tdesc): Update.
1714 (maintenance_check_xml_descriptions): Update.
1715 * target-descriptions.h (record_xml_tdesc): Update comment.
1716
1717 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1718
1719 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1720 checking array bounds are defined.
1721
1722 2018-07-30 Tom Tromey <tom@tromey.com>
1723
1724 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1725 irreflexivity violation.
1726
1727 2018-07-30 Tom Tromey <tom@tromey.com>
1728
1729 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1730 * value.c (unpack_long): Remove lint code.
1731 * valops.c (value_ind): Remove lint code.
1732 * valarith.c (value_x_binop, value_x_unop, value_equal)
1733 (value_pos): Remove lint code.
1734
1735 2018-07-28 Tom de Vries <tdevries@suse.de>
1736
1737 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1738 with undefined upper bound as <optimized out>.
1739
1740 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1741
1742 * gcore.in: Rename variable "name" to "prefix". Expand
1743 "usage" text.
1744
1745 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1746
1747 * windows-nat.c (windows_nat_target::create_inferior): Update to
1748 call close() in global namespace.
1749
1750 2018-07-26 Tom Tromey <tom@tromey.com>
1751
1752 * dwarf-index-write.c (add_address_entry): Don't add objfile
1753 offsets.
1754 * dbxread.c (find_stab_function): Rename from
1755 find_stab_function_addr. Return a bound_minimal_symbol.
1756 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1757 Don't add objfile offsets.
1758 (end_psymtab): Use raw_text_low, raw_text_high,
1759 MSYMBOL_VALUE_RAW_ADDRESS.
1760 (read_ofile_symtab): Update.
1761 (process_one_symbol): Update.
1762 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1763 offsets.
1764 (dw2_relocate): Remove.
1765 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1766 searching addrmap.
1767 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1768 Update.
1769 (process_psymtab_comp_unit_reader, add_partial_symbol)
1770 (add_partial_subprogram, dwarf2_ranges_read): Update.
1771 (load_partial_dies): Update.
1772 (add_address_entry): Don't add objfile offsets.
1773 (dwarf2_build_include_psymtabs): Update.
1774 (create_addrmap_from_aranges): Don't add objfile offsets.
1775 (dw2_find_pc_sect_compunit_symtab): Update.
1776 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1777 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1778 Update.
1779 (parse_partial_symbols): Don't add objfile offsets. Use
1780 raw_text_low, raw_text_high. Update.
1781 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1782 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1783 or call 'relocate' quick function. Clear psymbol_map.
1784 * psympriv.h (struct partial_symbol) <address>: Add section
1785 offset.
1786 <set_unrelocated_address>: Rename from set_address.
1787 <raw_text_low, raw_text_high>: New methods.
1788 <text_low, text_high>: Add objfile parameter.
1789 (add_psymbol_to_bcache): Add 'section' parameter. Call
1790 set_unrelocated_address.
1791 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1792 (find_pc_psymbol): Update.
1793 (fixup_psymbol_section, relocate_psymtabs): Remove.
1794 (dump_psymtab, psym_functions): Update.
1795 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1796 parameter.
1797 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1798 (start_psymtab_common): Update.
1799 * symfile-debug.c (debug_qf_relocate): Remove.
1800 (debug_sym_quick_functions): Update.
1801 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1802 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1803 Update.
1804
1805 2018-07-26 Tom Tromey <tromey@redhat.com>
1806
1807 * dbxread.c (end_psymtab): Use text_high_valid and
1808 text_low_valid.
1809 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1810 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1811 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1812 Update comment.
1813 <text_low_valid, text_high_valid>: New fields.
1814 <set_text_low, set_text_high>: Update.
1815 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1816
1817 2018-07-26 Tom Tromey <tom@tromey.com>
1818
1819 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1820 Update.
1821 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1822 textlow and texthigh fields.
1823 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1824 Update.
1825 * mdebugread.c (parse_lines, parse_partial_symbols)
1826 (psymtab_to_symtab_1): Update.
1827 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1828 Rename fields. Update comment. Now private.
1829 <text_low, text_high, set_text_low, set_text_high>: New methods.
1830 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1831 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1832 (start_psymtab_common, maintenance_info_psymtabs)
1833 (maintenance_check_psymtabs): Update.
1834 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1835 texthigh fields.
1836 (scan_xcoff_symtab): Update.
1837
1838 2018-07-26 Tom Tromey <tromey@redhat.com>
1839
1840 * psympriv.h (struct partial_symbol) <unrelocated_address,
1841 address, set_address>: New methods.
1842 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1843 (fixup_psymbol_section, relocate_psymtabs): Update.
1844 (print_partial_symbols): Add 'objfile' parameter. Update.
1845 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1846 Update.
1847
1848 2018-07-26 Tom Tromey <tom@tromey.com>
1849
1850 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1851 (debug_names::write_psymbols): Update.
1852 * psympriv.h (struct partial_symbol): Derive from
1853 general_symbol_info.
1854 <obj_section>: New method.
1855 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1856 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1857 (find_pc_sect_psymbol, fixup_psymbol_section)
1858 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1859 (print_partial_symbols, recursively_search_psymtabs)
1860 (compare_psymbols, psymbol_hash, psymbol_compare)
1861 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1862 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1863
1864 2018-07-26 Tom Tromey <tromey@redhat.com>
1865
1866 * dbxread.c (end_psymtab): Remove dead code.
1867
1868 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1869
1870 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1871 DWARF unwinders are disabled.
1872 * dwarf2-frame.c: Add dwarf2read.h include.
1873 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1874 disabled.
1875 (dwarf2_frame_unwinders_enabled_p): Define.
1876 (show_dwarf_unwinders_enabled_p): New function.
1877 (_initialize_dwarf2_frame): Register switch to control DWARF
1878 unwinder use.
1879 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1880 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1881 (show_dwarf_cmdlist): Remove static keyword.
1882 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1883 (show_dwarf_cmdlist): Declare.
1884 * NEWS: Document new feature.
1885
1886 2018-07-26 Tom de Vries <tdevries@suse.de>
1887
1888 PR breakpoints/23366
1889 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1890
1891 2018-07-26 Tom de Vries <tdevries@suse.de>
1892
1893 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1894 DW_AT_count can't be translated to a dynamic prop.
1895
1896 2018-07-25 Tom de Vries <tdevries@suse.de>
1897
1898 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1899 try/catch.
1900
1901 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1902
1903 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1904
1905 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1906
1907 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1908
1909 2018-07-24 Keith Seitz <keiths@redhat.comt
1910
1911 PR symtab/23010
1912 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1913 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1914 instead of add_symbol_to_list.
1915 (read_file_scope): Call prepare_one_comp_unit before reading
1916 any other DIEs.
1917
1918 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1919
1920 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1921
1922 2018-07-24 Tom Tromey <tom@tromey.com>
1923
1924 * utils.c (malloc, realloc, free): Don't declare.
1925 * configure, config.in: Rebuild.
1926 * configure.ac: Don't check for declarations of free, malloc, or
1927 realloc.
1928
1929 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1930
1931 * aarch64-linux-nat.c
1932 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1933 variable.
1934 * arm-linux-nat.c (fetch_regs): Likewise.
1935 (store_regs): Likewise.
1936 (fetch_vfp_regs): Likewise.
1937 (store_vfp_regs): Likewise.
1938 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1939 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1940 (arm_linux_nat_target::insert_watchpoint): Likewise.
1941 (arm_linux_nat_target::remove_watchpoint): Likewise.
1942 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1943 Likewise.
1944 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1945 Likewise.
1946 * ppc-linux-nat.c (fetch_register): Likewise.
1947 (fetch_all_gp_regs): Likewise.
1948 (fetch_ppc_registers): Likewise.
1949 (store_all_gp_regs): Likewise.
1950 (store_ppc_registers): Likewise.
1951 (hwdebug_insert_point): Likewise.
1952 (can_use_watchpoint_cond_accel): Likewise.
1953 * remote-sim.c (gdb_os_write_stdout): Likewise.
1954
1955 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1956 Tom Tromey <tom@tromey.com>
1957
1958 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1959 test for it.
1960 * configure: Rebuild.
1961
1962 2018-07-22 Tom Tromey <tom@tromey.com>
1963
1964 * regformats/regdat.sh: Define xmltarget_${name} inside
1965 #ifndef IN_PROCESS_AGENT.
1966
1967 2018-07-22 Tom Tromey <tom@tromey.com>
1968
1969 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1970
1971 2018-07-22 Tom Tromey <tom@tromey.com>
1972
1973 * symfile.c (reread_symbols): Notify iter, not objfile.
1974
1975 2018-07-22 Tom Tromey <tom@tromey.com>
1976
1977 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1978 Use arch_ops.
1979 (ravenscar_thread_target::prepare_to_store): Likewise.
1980
1981 2018-07-22 Tom Tromey <tom@tromey.com>
1982
1983 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1984 unused variable. Call value_fetch_lazy when needed.
1985 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1986 Remove unused variable. Call value_fetch_lazy when needed.
1987
1988 2018-07-22 Tom Tromey <tom@tromey.com>
1989
1990 * m32c-tdep.c (mark_dma): Return void.
1991 (make_regs): Remove unused declarations.
1992
1993 2018-07-22 Tom Tromey <tom@tromey.com>
1994
1995 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1996 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1997 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1998 bkscm_get_valid_block_smob_arg_unsafe for effect.
1999
2000 2018-07-22 Tom Tromey <tom@tromey.com>
2001
2002 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2003 value_type.
2004
2005 2018-07-22 Tom Tromey <tom@tromey.com>
2006
2007 * windows-nat.c (saved_context): Conditionally define.
2008 * remote.c (remote_target::remote_btrace_maybe_reopen):
2009 Conditionally declare "warned".
2010 * inflow.c (sigquit_ours): Conditionally define.
2011 (new_tty): Move "tty" declaration inside #if.
2012 * guile/guile.c (guile_datadir): Conditionally define.
2013 * charset.c (set_be_le_names): Move some declarations inside #if.
2014 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2015 #if.
2016 (parse_xml_btrace_conf): Likewise.
2017
2018 2018-07-22 Tom Tromey <tom@tromey.com>
2019
2020 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2021
2022 2018-07-22 Tom Tromey <tom@tromey.com>
2023
2024 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2025 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2026 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2027 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2028 * stack.c (frame_apply_level_command): Remove unused variable.
2029 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2030 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2031 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2032 unused variable.
2033 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2034 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2035 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2036 variable.
2037 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2038 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2039 variable.
2040 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2041 Remove unused variable.
2042 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2043 variable.
2044 * common/tdesc.c (print_xml_feature::visit): Remove unused
2045 variable.
2046 * compile/compile-object-load.c (store_regs): Remove unused
2047 variables.
2048 * complaints.c (clear_complaints): Remove unused variable.
2049 * corelow.c (core_target_open): Remove unused variable.
2050 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2051 variable.
2052 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2053 variable.
2054 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2055 variable.
2056 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2057 variable.
2058 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2059 variable.
2060 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2061 variable.
2062 * ia64-tdep.c (examine_prologue): Remove unused variable.
2063 * infcall.c (run_inferior_call): Remove unused variable.
2064 * inferior.c (exit_inferior): Remove unused variable.
2065 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2066 * linespec.c (decode_line_2): Remove unused variable.
2067 * linux-nat.c (super_close): Remove.
2068 * linux-tdep.c (linux_info_proc): Remove unused variable.
2069 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2070 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2071 Remove unused variable.
2072 * parse.c (find_minsym_type_and_address): Remove unused variable.
2073 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2074 variable.
2075 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2076 variable.
2077 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2078 variables.
2079 * record-btrace.c (record_btrace_target::store_registers): Remove
2080 unused variable.
2081 (cmd_show_record_btrace_cpu): Remove unused variable.
2082 * riscv-tdep.c (riscv_register_reggroup_p)
2083 (riscv_push_dummy_call, riscv_return_value): Remove unused
2084 variable.
2085 * rust-exp.y (literal): Remove unused variable.
2086 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2087 unused variable.
2088 <STRUCTOP_ANONYMOUS>: Likewise.
2089 * s390-linux-tdep.c (s390_linux_init_abi_31)
2090 (s390_linux_init_abi_64): Remove unused variable.
2091 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2092 (file_select_thread, net_windows_open, _initialize_ser_windows):
2093 Remove unused variables.
2094 * symtab.c (find_pc_sect_line): Remove unused variable.
2095 * target-memory.c (compute_garbled_blocks): Remove unused
2096 variable.
2097 (target_write_memory_blocks): Remove unused variable.
2098 * target.c (target_stack::unpush): Remove unused variables.
2099 * tracepoint.c (start_tracing, all_tracepoint_actions)
2100 (merge_uploaded_trace_state_variables)
2101 (print_one_static_tracepoint_marker): Remove unused variable.
2102 * unittests/basic_string_view/element_access/char/1.cc (test01):
2103 Remove unused variable.
2104 * windows-nat.c (windows_continue, windows_add_all_dlls)
2105 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2106 Remove unused variables.
2107
2108 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2109
2110 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2111 attr_profile in HAVE_ELF.
2112 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2113 HAVE_ELF.
2114
2115 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2116
2117 * frame.c (frame_register_unwind): Change parameter name.
2118 (frame_unwind_register): Likewise.
2119 (frame_unwind_register_value): Likewise.
2120 (frame_unwind_register_signed): Likewise.
2121 (frame_unwind_register_unsigned): Likewise.
2122 * frame.h (frame_register_unwind): Likewise.
2123 (frame_unwind_register): Likewise.
2124 (frame_unwind_register_value): Likewise.
2125 (frame_unwind_register_signed): Likewise.
2126 (frame_unwind_register_unsigned): Likewise.
2127 (frame_unwind_arch): Likewise.
2128
2129 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2130
2131 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2132 ISA maintenance.
2133
2134 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2135
2136 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2137 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2138 hand.
2139
2140 2018-07-20 Keith Seitz <keiths@redhat.com>
2141
2142 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2143 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2144 m_compunit_symtab, m_language>: Add "m_" prefix.
2145 Update all uses.
2146 * buildsym.c: Update all uses.
2147
2148 2018-07-20 Tom Tromey <tom@tromey.com>
2149
2150 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2151 * buildsym.h (record_line_ftype): Remove typedef.
2152
2153 2018-07-20 Tom Tromey <tom@tromey.com>
2154
2155 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2156 (end_expandable_symtab): Likewise.
2157 (end_symtab_get_static_block): Likewise.
2158 (end_symtab_from_static_block): Likewise.
2159 * buildsym-legacy.c (augment_type_symtab): Remove.
2160 (end_expandable_symtab): Remove.
2161 (end_symtab_get_static_block): Remove.
2162 (end_symtab_from_static_block): Remove.
2163
2164 2018-07-20 Tom Tromey <tom@tromey.com>
2165
2166 * dwarf2read.c: Include buildsym.h.
2167 (struct dwarf2_cu) <builder>: New method.
2168 (fixup_go_packaging): Update.
2169 (process_full_comp_unit, process_full_type_unit): Update. Don't
2170 use scoped_free_pendings.
2171 (using_directives): Add "cu" parameter, remove "language".
2172 (read_import_statement, setup_type_unit_groups, )
2173 (read_func_scope, read_lexical_block_scope)
2174 (dwarf2_record_block_ranges, read_namespace): Update.
2175 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2176 (lnp_state_machine::handle_end_sequence): Update.
2177 (class lnp_state_machine) <m_cu>: New member.
2178 <m_record_line_callback>: Remove.
2179 <m_currently_recording_lines>: New member.
2180 (lnp_state_machine::handle_set_file): Update.
2181 (noop_record_line): Remove.
2182 (dwarf_record_line_p): Add cu parameter.
2183 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2184 (lnp_state_machine::record_line)
2185 (lnp_state_machine::lnp_state_machine)
2186 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2187 (dwarf_decode_lines): Update.
2188 (dwarf2_start_subfile): Add cu parameter.
2189 (dwarf2_start_symtab, new_symbol): Update.
2190 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2191 Remove dwarf2_per_objfile parameter.
2192 (dwarf_decode_macros): Update.
2193
2194 2018-07-20 Tom Tromey <tom@tromey.com>
2195
2196 * stabsread.c (define_symbol): Update.
2197 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2198 * dwarf2read.c (new_symbol): Update.
2199 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2200 * cp-namespace.c: Include buildsym.h.
2201 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2202 * buildsym-legacy.c (get_buildsym_compunit): New function.
2203
2204 2018-07-20 Tom Tromey <tom@tromey.com>
2205
2206 * xcoffread.c: Include buildsym-legacy.h.
2207 * windows-nat.c: Include buildsym-legacy.h.
2208 * stabsread.c: Include buildsym-legacy.h.
2209 * mdebugread.c: Include buildsym-legacy.h.
2210 * buildsym-legacy.h: New file.
2211 * buildsym-legacy.c: New file, from buildsym.c.
2212 * go32-nat.c: Include buildsym-legacy.h.
2213 * dwarf2read.c: Include buildsym-legacy.h.
2214 * dbxread.c: Include buildsym-legacy.h.
2215 * cp-namespace.c: Include buildsym-legacy.h.
2216 * coffread.c: Include buildsym-legacy.h.
2217 * buildsym.h: Move some contents to buildsym-legacy.h.
2218 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2219 buildsym-legacy.c.
2220 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2221
2222 2018-07-20 Tom Tromey <tom@tromey.com>
2223
2224 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2225 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2226 (buildsym_compunit::buildsym_compunit)
2227 (buildsym_compunit::~buildsym_compunit)
2228 (buildsym_compunit::get_macro_table): Define.
2229
2230 2018-07-20 Tom Tromey <tom@tromey.com>
2231
2232 * buildsym.c (reset_symtab_globals): Remove.
2233 (buildsym_compunit::end_symtab_from_static_block): Update.
2234 (buildsym_compunit::augment_type_symtab): Update.
2235 (end_symtab_from_static_block): Call free_buildsym_compunit.
2236 (augment_type_symtab, end_symtab, end_expandable_symtab):
2237 Likewise.
2238
2239 2018-07-20 Tom Tromey <tom@tromey.com>
2240
2241 * arch-utils.c: Do not include buildsym.h.
2242 * mipsread.c: Do not include buildsym.h.
2243 * machoread.c: Do not include buildsym.h.
2244 * elfread.c: Do not include buildsym.h.
2245
2246 2018-07-20 Tom Tromey <tom@tromey.com>
2247
2248 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2249 initialization.
2250 (buildsym_compunit): Add new constructor.
2251 (struct buildsym_compunit) <get_last_source_file, finish_block,
2252 record_block_range, start_subfile, patch_subfile_names,
2253 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2254 set_last_source_start_addr, get_last_source_start_addr,
2255 get_local_using_directives, set_local_using_directives,
2256 get_global_using_directives, outermost_context_p,
2257 get_current_context_stack, get_context_stack_depth,
2258 get_current_subfile, get_local_symbols, get_file_symbols,
2259 get_global_symbols, record_debugformat, record_producer,
2260 push_context, pop_context, end_symtab_get_static_block,
2261 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2262 New public methods.
2263 <record_pending_block, finish_block_internal, make_blockvector,
2264 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2265 private methods.
2266 Update all users.
2267
2268 2018-05-22 Tom Tromey <tom@tromey.com>
2269
2270 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2271 parameter.
2272 (finish_block_internal): Update.
2273
2274 2018-07-20 Tom Tromey <tom@tromey.com>
2275
2276 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2277 parameter.
2278 (finish_block_internal): Update.
2279
2280 2018-07-20 Tom Tromey <tom@tromey.com>
2281
2282 * buildsym.h (EXTERN): Don't define or undef.
2283 * buildsym.c (EXTERN): Don't define.
2284
2285 2018-07-20 Tom Tromey <tom@tromey.com>
2286
2287 * buildsym.c: Remove TODO comment.
2288
2289 2018-07-20 Tom Tromey <tom@tromey.com>
2290
2291 * coffread.c (coff_symtab_read): Update.
2292 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2293 (xcoff_new_init): Update.
2294 * mipsread.c (mipscoff_new_init): Update.
2295 * mdebugread.c (mdebug_build_psymtabs): Update.
2296 * elfread.c (elf_new_init): Update.
2297 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2298 Update.
2299 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2300 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2301 (stabsect_build_psymtabs): Update.
2302 * buildsym.h (buildsym_init): Don't declare.
2303 * buildsym.c: Update comment.
2304 (prepare_for_building): Remove.
2305 (start_symtab, restart_symtab): Update.
2306 (reset_symtab_globals): Update comment.
2307 (buildsym_init): Remove.
2308
2309 2018-07-20 Tom Tromey <tom@tromey.com>
2310
2311 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2312 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2313 (read_enum_type, common_block_start, common_block_end)
2314 (cleanup_undefined_types_1, finish_global_stabs): Update.
2315 * mdebugread.c (psymtab_to_symtab_1): Update.
2316 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2317 (read_lexical_block_scope, new_symbol): Update.
2318 * dbxread.c (process_one_symbol): Update.
2319 * coffread.c (coff_symtab_read, process_coff_symbol)
2320 (coff_read_enum_type): Update.
2321 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2322 declare.
2323 (get_local_symbols, get_file_symbols, get_global_symbols): New
2324 functions.
2325 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2326 m_global_symbols.
2327 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2328 (~scoped_free_pendings): Update.
2329 (finish_block, prepare_for_building, reset_symtab_globals)
2330 (end_symtab_get_static_block, end_symtab_with_blockvector)
2331 (augment_type_symtab, push_context): Update.
2332 (get_local_symbols, get_file_symbols, get_global_symbols): New
2333 functions.
2334 (buildsym_init): Update.
2335
2336 2018-07-20 Tom Tromey <tom@tromey.com>
2337
2338 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2339 (process_full_type_unit): Likewise.
2340 (dwarf2_start_symtab): Set list_in_scope.
2341
2342 2018-07-20 Tom Tromey <tom@tromey.com>
2343
2344 * dwarf2read.c (process_psymtab_comp_unit_reader)
2345 (build_type_psymtabs_reader): Do not set list_in_scope.
2346
2347 2018-07-20 Tom Tromey <tom@tromey.com>
2348
2349 * buildsym.c (free_pendings): Remove.
2350 (add_symbol_to_list, scoped_free_pendings)
2351 (finish_block_internal, buildsym_init): Update.
2352
2353 2018-07-20 Tom Tromey <tom@tromey.com>
2354
2355 * xcoffread.c (read_xcoff_symtab): Update.
2356 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2357 Update.
2358 * dbxread.c (process_one_symbol): Update.
2359 * coffread.c (coff_symtab_read): Update.
2360 * buildsym.h (finish_block): Update.
2361 * buildsym.c (finish_block): Remove "listhead" argument.
2362 (end_symtab_get_static_block): Update.
2363
2364 2018-07-20 Tom Tromey <tom@tromey.com>
2365
2366 * buildsym.h (class scoped_free_pendings): Remove constructor.
2367 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2368 method.
2369 <m_pending_block_obstack, m_pending_blocks>: New members.
2370 (pending_block_obstack, pending_blocks): Remove.
2371 (scoped_free_pendings::scoped_free_pendings): Default.
2372 (~scoped_free_pendings): Update.
2373 (free_pending_blocks): Remove.
2374 (finish_block_internal, record_pending_block, make_blockvector)
2375 (end_symtab_get_static_block, augment_type_symtab, push_context)
2376 (buildsym_init): Update.
2377
2378 2018-07-20 Tom Tromey <tom@tromey.com>
2379
2380 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2381 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2382 members.
2383 (pending_addrmap, pending_addrmap_obstack)
2384 (pending_addrmap_interesting): Remove.
2385 (scoped_free_pendings, record_block_range, make_blockvector)
2386 (prepare_for_building, reset_symtab_globals, buildsym_init):
2387 Update.
2388
2389 2018-07-20 Tom Tromey <tom@tromey.com>
2390
2391 * xcoffread.c (process_linenos): Update.
2392 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2393 * mdebugread.c (psymtab_to_symtab_1): Update.
2394 * dwarf2read.c (setup_type_unit_groups)
2395 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2396 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2397 * dbxread.c (process_one_symbol): Update.
2398 * coffread.c (coff_symtab_read, enter_linenos)
2399 (process_coff_symbol): Update.
2400 * buildsym.h (current_subfile): Don't declare.
2401 (get_current_subfile): Declare.
2402 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2403 member.
2404 (start_subfile, free_buildsym_compunit, push_subfile)
2405 (prepare_for_building, start_symtab): Update.
2406 (get_current_subfile): New function.
2407
2408 2018-07-20 Tom Tromey <tom@tromey.com>
2409
2410 * coffread.c (coff_symtab_read): Update.
2411 * xcoffread.c (read_xcoff_symtab): Update.
2412 * dwarf2read.c (new_symbol): Update.
2413 (read_func_scope, read_lexical_block_scope): Update.
2414 * dbxread.c (process_one_symbol): Update.
2415 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2416 (outermost_context_p): Remove macro.
2417 (outermost_context_p, get_current_context_stack)
2418 (get_context_stack_depth): Declare.
2419 (pop_context): Return struct context_stack.
2420 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2421 member.
2422 (context_stack_size): Remove.
2423 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2424 (prepare_for_building, end_symtab_get_static_block)
2425 (augment_type_symtab, push_context): Update.
2426 (pop_context): Return struct context_stack.
2427 (outermost_context_p, get_current_context_stack)
2428 (get_context_stack_depth): New functions.
2429 (buildsym_init): Update.
2430
2431 2018-07-20 Tom Tromey <tom@tromey.com>
2432
2433 * rust-exp.y: Now a pure parser. Update all rules.
2434 (%union): Move earlier.
2435 (current_parser, work_obstack): Remove globals.
2436 (rust_parser, ~rust_parser): Update.
2437 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2438 lex_character, lex_number, lex_string, lex_identifier,
2439 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2440 convert_name, convert_params_to_expression,
2441 convert_ast_to_expression, ast_basic_type, ast_operation,
2442 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2443 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2444 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2445 ast_array_type, ast_slice_type, ast_reference_type,
2446 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2447 (rust_parse): Update.
2448 (rustyyerror, rustyylex): Add parser parameter.
2449 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2450 (rust_lex_stringish_test, rust_lex_test_sequence)
2451 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2452 (rust_lex_test_push_back, rust_lex_tests): Update.
2453
2454 2018-07-19 Pedro Alves <palves@redhat.com>
2455
2456 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2457 gdb::unique_xmalloc_ptr.
2458 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2459 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2460 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2461 copy-initialization.
2462 * guile/scm-pretty-print.c (ppscm_print_children): Use
2463 gdb::unique_xmalloc_ptr instead of cleanups.
2464 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2465 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2466 gdb::unique_xmalloc_ptr.
2467 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2468 Adjust to use gdb::unique_xmalloc_ptr.
2469 * guile/scm-utils.c (extract_arg): Adjust.
2470 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2471 gdb::unique_xmalloc_ptr instead of a cleanup.
2472
2473 2018-07-19 Tom Tromey <tom@tromey.com>
2474
2475 * utils.c (do_value_free_to_mark)
2476 (make_cleanup_value_free_to_mark): Remove.
2477 * utils.h (make_cleanup_value_free_to_mark): Remove.
2478
2479 2018-07-19 Pedro Alves <palves@redhat.com>
2480
2481 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2482 forwarding reference.
2483
2484 2018-07-18 Pedro Alves <palves@redhat.com>
2485
2486 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2487 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2488 cleanup.
2489
2490 2018-07-18 Pedro Alves <palves@redhat.com>
2491
2492 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2493 exceptions.
2494 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2495 (gdbscm_wrap): New.
2496 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2497 directly instead of a cleanup.
2498 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2499 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2500 (vlscm_binop_gdbthrow): New, factored out from ...
2501 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2502 (vlscm_rich_compare): Use gdbscm_wrap.
2503 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2504 instead of a cleanup.
2505 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2506 cleanup.
2507 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2508 Use xfree directly instead of a cleanup.
2509 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2510 Adjust to use gdbscm_wrap and scoped_value_mark.
2511 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2512 (gdbscm_value_address, gdbscm_value_dereference)
2513 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2514 scoped_value_mark.
2515 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2516 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2517 scoped_value_mark.
2518 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2519 gdbscm_wrap and scoped_value_mark.
2520 (gdbscm_value_to_string): Use xfree directly instead of a
2521 cleanup. Move 'buffer' unique_ptr to TRY scope.
2522 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2523 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2524 scoped_value_mark.
2525 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2526 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2527 scoped_value_mark.
2528 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2529 gdbscm_wrap.
2530
2531 2018-07-18 Tom de Vries <tdevries@suse.de>
2532
2533 * findvar.c (default_read_var_value): Also resolve dynamic type for
2534 LOC_OPTIMIZED_OUT vars.
2535
2536 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2537
2538 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2539 decoding.
2540
2541 2018-07-17 Tom Tromey <tom@tromey.com>
2542
2543 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2544 (compute_enum_list, pascm_set_param_value_x)
2545 (gdbscm_parameter_value): Update.
2546 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2547 (gdbscm_scm_to_host_string): Update.
2548 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2549 Update.
2550 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2551 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2552 * guile/scm-string.c (gdbscm_scm_to_string): Return
2553 unique_xmalloc_ptr.
2554 (gdbscm_scm_to_host_string): Likewise.
2555
2556 2018-07-17 Tom Tromey <tom@tromey.com>
2557
2558 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2559 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2560 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2561 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2562 unique_xmalloc_ptr.
2563
2564 2018-07-17 Tom Tromey <tom@tromey.com>
2565
2566 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2567 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2568 Update.
2569 * guile/scm-cmd.c (cmdscm_function): Update.
2570 * guile/scm-pretty-print.c
2571 (ppscm_print_exception_unless_memory_error): Update.
2572 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2573 Return unique_xmalloc_ptr.
2574
2575 2018-07-17 Tom Tromey <tom@tromey.com>
2576
2577 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2578 Use string_printf.
2579
2580 2018-07-17 Jim Wilson <jimw@sifive.com>
2581
2582 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2583 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2584 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2585 unecessary braces after EF_RISCV_RVC test. Delete call to
2586 set_gdbarch_decr_pc_after_break.
2587
2588 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2589 RISCV_LAST_FP_REGNUM + 1.
2590 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2591
2592 2018-07-17 Tom Tromey <tom@tromey.com>
2593
2594 * configure.ac: Remove --disable-gdbcli.
2595 * configure: Rebuild.
2596 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2597 (SUBDIR_CLI_CFLAGS): Remove.
2598 (SFILES): Use SUBDIR_CLI_SRCS.
2599 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2600
2601 2018-07-17 Tom Tromey <tom@tromey.com>
2602
2603 PR gdb/18624:
2604 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2605
2606 2018-07-16 Jim Wilson <jimw@sifive.com>
2607
2608 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2609
2610 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2611
2612 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2613 variable.
2614 (libunwind_frame_sniffer): Likewise.
2615 (libunwind_frame_prev_register): Likewise.
2616 (libunwind_sigtramp_frame_sniffer): Likewise.
2617 * ia64-tdep.c (ia64_access_reg): Likewise.
2618 (ia64_access_rse_reg): Likewise.
2619 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2620 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2621
2622 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2623
2624 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2625
2626 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2627
2628 * remote-sim.c (gdbsim_target::close,
2629 gdbsim_target::mourn_inferior): Remove unused variables.
2630
2631 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2632
2633 * ia64-tdep.c (ktab_buf): New global.
2634 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2635 (get_kernel_table): Adjust.
2636
2637 2018-07-16 Tom Tromey <tom@tromey.com>
2638
2639 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2640 * dwarf2read.c (using_directives, new_symbol): Use
2641 outermost_context_p.
2642 * dbxread.c (process_one_symbol): Use outermost_context_p.
2643 * coffread.c (coff_symtab_read): Use outermost_context_p.
2644
2645 2018-07-16 Tom Tromey <tom@tromey.com>
2646
2647 * dwarf2read.c (using_directives, read_func_scope)
2648 (read_lexical_block_scope): Update.
2649 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2650 * buildsym.h (local_using_directives, global_using_directives):
2651 Don't declare.
2652 (get_local_using_directives, set_local_using_directives)
2653 (get_global_using_directives): Declare.
2654 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2655 m_global_using_directives>: New members.
2656 (finish_block_internal, prepare_for_building)
2657 (reset_symtab_globals, end_symtab_get_static_block)
2658 (push_context): Update.
2659 (get_local_using_directives, set_local_using_directives)
2660 (get_global_using_directives): New functions.
2661 (buildsym_init): Update.
2662
2663 2018-07-16 Tom Tromey <tom@tromey.com>
2664
2665 * xcoffread.c (xcoff_initial_scan): Don't call
2666 free_pending_blocks.
2667 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2668 * buildsym.h (class scoped_free_pendings): Add constructor.
2669 (free_pending_blocks): Don't declare.
2670 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2671 (free_pending_blocks): Now static.
2672
2673 2018-07-16 Tom Tromey <tom@tromey.com>
2674
2675 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2676 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2677 member.
2678 (struct subfile_stack): Remove.
2679 (subfile_stack): Remove.
2680 (push_subfile, pop_subfile, buildsym_init): Update.
2681
2682 2018-07-16 Tom Tromey <tom@tromey.com>
2683
2684 * buildsym.c (push_subfile): Use gdb_assert.
2685 (pop_subfile): Use gdb_assert.
2686
2687 2018-07-16 Tom Tromey <tom@tromey.com>
2688
2689 * buildsym.h (merge_symbol_lists): Remove.
2690 * buildsym.c (merge_symbol_lists): Remove.
2691
2692 2018-07-16 Tom Tromey <tom@tromey.com>
2693
2694 * stabsread.c (scan_file_globals): Update comment.
2695 * stabsread.h (scan_file_globals): Move from buildsym.h.
2696 * buildsym.h (scan_file_globals): Move to stabsread.h.
2697
2698 2018-07-16 Tom Tromey <tom@tromey.com>
2699
2700 * xcoffread.c (xcoff_new_init): Update.
2701 * mipsread.c (mipscoff_new_init): Update.
2702 * mdebugread.c (mdebug_build_psymtabs): Update.
2703 * elfread.c (elf_new_init): Update.
2704 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2705 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2706 * buildsym.h (buildsym_new_init): Don't declare.
2707 * buildsym.c (buildsym_new_init): Remove.
2708
2709 2018-07-16 Tom Tromey <tom@tromey.com>
2710
2711 * stabsread.h (within_function): Move from buildsym.h.
2712 * stabsread.c (start_stabs): Clear within_function.
2713 * coffread.c (coff_start_symtab): Clear within_function.
2714 * buildsym.h (within_function): Move to stabsread.h.
2715 * buildsym.c (prepare_for_building): Update.
2716
2717 2018-07-16 Tom Tromey <tom@tromey.com>
2718
2719 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2720 * dwarf2read.c (dwarf2_start_symtab): Don't set
2721 processing_gcc_compilation.
2722 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2723
2724 2018-07-16 Tom Tromey <tom@tromey.com>
2725
2726 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2727 (next_symbol_text_func): Move from buildsym.h.
2728 * stabsread.c (hashname): Move from buildsym.c.
2729 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2730 (next_symbol_text_func, hashname): Move to stabsread.h.
2731 * buildsym.c: Don't include bcache.h
2732 (hashname): Move to stasbread.c.
2733
2734 2018-07-16 Tom Tromey <tom@tromey.com>
2735
2736 * buildsym.h (context_stack_size): Don't declare.
2737 * buildsym.c (context_stack_size): New global.
2738
2739 2018-07-16 Tom Tromey <tom@tromey.com>
2740
2741 * dbxread.c (processing_acc_compilation): New global.
2742 * buildsym.h (processing_acc_compilation): Don't declare.
2743
2744 2018-07-16 Tom Tromey <tom@tromey.com>
2745
2746 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2747 * dbxread.c (read_ofile_symtab): Update.
2748 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2749 * buildsym.h (last_source_start_addr): Remove.
2750 (set_last_source_start_addr, get_last_source_start_addr):
2751 Declare.
2752 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2753 parameter.
2754 (struct buildsym_compunit) <m_last_source_start_addr>: New
2755 member.
2756 (prepare_for_building): Remove start_addr parameter.
2757 (start_symtab, restart_symtab, end_symtab_get_static_block)
2758 (end_symtab_with_blockvector): Update.
2759 (set_last_source_start_addr, get_last_source_start_addr): New
2760 functions.
2761
2762 2018-07-16 Tom Tromey <tom@tromey.com>
2763
2764 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2765 member.
2766 (have_line_numbers): Remove.
2767 (record_line, prepare_for_building, end_symtab_get_static_block)
2768 (augment_type_symtab): Update.
2769
2770 2018-07-16 Tom Tromey <tom@tromey.com>
2771
2772 * buildsym.c (~buildsym_compunit): Free the macro table.
2773 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2774 methods.
2775 <m_pending_macros>: New member.
2776 (pending_macros): Remove.
2777 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2778 (reset_symtab_globals, end_symtab_get_static_block)
2779 (end_symtab_with_blockvector, augment_type_symtab)
2780 (buildsym_init): Update.
2781
2782 2018-07-16 Tom Tromey <tom@tromey.com>
2783
2784 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2785 parameter.
2786 (buildsym_compunit::set_last_source_file): New method.
2787 <m_last_source_file>: New member.
2788 (prepare_for_building): Remove "name" parameter.
2789 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2790 (last_source_file): Remove.
2791 (set_last_source_file, get_last_source_file): Update.
2792
2793 2018-07-16 Tom Tromey <tom@tromey.com>
2794
2795 * buildsym.c (prepare_for_building): Add assert.
2796
2797 2018-07-16 Tom Tromey <tom@tromey.com>
2798
2799 * buildsym.c (~buildsym_compunit): Update.
2800 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2801 (start_subfile, patch_subfile_names)
2802 (end_symtab_with_blockvector): Update.
2803
2804 2018-07-16 Tom Tromey <tom@tromey.com>
2805
2806 * buildsym.c (struct buildsym_compunit): Add constructor,
2807 destructor, initializers.
2808 (start_buildsym_compunit): Remove.
2809 (free_buildsym_compunit): Use "delete".
2810 (start_symtab, restart_symtab): Use "new".
2811
2812 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2813
2814 * symfile.c (set_objfile_default_section_offset): Remove struct
2815 keyword.
2816
2817 2018-07-14 Stafford Horne <shorne@gmail.com>
2818
2819 * (Responsible Maintainers): Add myself as or1k maintainer.
2820
2821 2018-07-13 Tom Tromey <tom@tromey.com>
2822
2823 * symfile.c (set_objfile_default_section_offset): Use extra braces
2824 around initializer.
2825
2826 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2827
2828 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2829 non-branching basr.
2830
2831 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2832
2833 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2834 unittests/cli-utils-selftests.c
2835 * unittests/cli-utils-selftests.c: New file.
2836
2837 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2838
2839 * NEWS: Mention new commands. Mention change to 'thread apply'.
2840
2841 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2842
2843 * thread.c (thr_try_catch_cmd): New function.
2844 (thread_apply_all_command): Handle qcs flags.
2845 (thread_apply_command): Handle qcs flags.
2846 (taas_command): New function.
2847 (tfaas_command): New function.
2848 (_initialize_thread): Update to setup the new commands 'taas
2849 and 'tfaas'. Change doc string for 'thread apply'.
2850
2851 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2852
2853 * stack.c: (trailing_outermost_frame): New function, mostly
2854 extracted from backtrace_command_1.
2855 (leading_innermost_frame): New function.
2856 (backtrace_command_1): Update to call trailing_outermost_frame.
2857 (frame_apply_command_count): New function.
2858 (frame_apply_level_command): New function.
2859 (frame_apply_all_command): New function.
2860 (frame_apply_command): New function.
2861 (faas_command): New function.
2862 (frame_cmd_list): New variable.
2863 (_initialize_stack): Update to setup the new commands 'frame apply'
2864 and 'faas'.
2865
2866 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2867
2868 * cli-utils.c (number_or_range_parser::get_number): Only handle
2869 numbers or convenience var as numbers.
2870 (parse_flags): New function.
2871 (parse_flags_qcs): New function.
2872 (number_or_range_parser::finished): Ensure parsing end is detected
2873 before end of string.
2874 * cli-utils.h (parse_flags): New function.
2875 (parse_flags_qcs): New function.
2876 (number_or_range_parser): Remove m_finished bool.
2877 (number_or_range_parser::skip_range): Set m_in_range to false.
2878
2879 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2880
2881 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2882 on Windows.
2883
2884 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2885 Jan Kratochvil <jan.kratochvil@redhat.com>
2886 Paul Fertser <fercerpav@gmail.com>
2887 Tsutomu Seki <sekiriki@gmail.com>
2888 Pedro Alves <palves@redhat.com>
2889
2890 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2891 'unittests/parse-connection-spec-selftests.c'.
2892 (COMMON_SFILES): Add 'common/netstuff.c'.
2893 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2894 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2895 * common/netstuff.c: New file.
2896 * common/netstuff.h: New file.
2897 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2898 (wait_for_connect): Update comment. New parameter
2899 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2900 Use 'sock' directly instead of 'scb->fd'.
2901 (try_connect): New function, with code from 'net_open'.
2902 (net_open): Rewrite main loop to deal with multiple
2903 sockets/addresses. Handle IPv6-style hostnames; implement
2904 support for IPv6 connections.
2905 * unittests/parse-connection-spec-selftests.c: New file.
2906
2907 2018-07-11 Pedro Alves <palves@redhat.com>
2908
2909 PR gdb/23377
2910 * remote.c (remote_target::remote_detach_pid): Call
2911 set_current_process.
2912
2913 2018-07-11 Pedro Alves <palves@redhat.com>
2914
2915 * h8300-tdep.c (h8300_gdbarch_init): Remove
2916 set_gdbarch_ecoff_reg_to_regnum calls.
2917
2918 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2919
2920 PR c++/23373
2921 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2922 offsets/sizes for static members of a class/struct.
2923
2924 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2925
2926 * target-descriptions.c (tdesc_register_bitsize): Rename.
2927 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2928 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2929 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2930
2931 2018-07-10 Tom Tromey <tom@tromey.com>
2932
2933 * breakpoint.c (moribund_locations): Now static and a
2934 std::vector.
2935 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2936 (build_bpstat_chain, update_global_location_list)
2937 (breakpoint_retire_moribund): Update.
2938 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2939 VEC.
2940
2941 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2942
2943 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2944 (riscv_register_reggroup_p): Use new function, remove unneeded
2945 parenthesis.
2946 (riscv_push_dummy_call): Extend assert to compare against xlen or
2947 flen based on register type.
2948
2949 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2950
2951 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2952
2953 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2954
2955 * remote.c (show_hardware_watchpoint_limit): New function.
2956 (show_hardware_watchpoint_length_limit): New function.
2957 (show_hardware_breakpoint_limit): New function.
2958 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2959 where appropriate, update help text.
2960
2961 2018-07-09 Tom Tromey <tom@tromey.com>
2962
2963 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2964 (CLIBS): Don't mention NAT_CLIBS.
2965
2966 2018-07-09 Tom Tromey <tom@tromey.com>
2967
2968 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2969 (LIBGDB_OBS, clean mostlyclean): Update.
2970 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2971
2972 2018-07-09 Tom Tromey <tom@tromey.com>
2973
2974 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2975 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2976 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2977
2978 2018-07-09 Tom Tromey <tom@tromey.com>
2979
2980 * Makefile.in (ALLDEPFILES): Remove exec.c.
2981 (COMMON_OBS): Remove exec.o.
2982 (COMMON_SFILES): Add exec.c.
2983
2984 2018-07-09 Tom Tromey <tom@tromey.com>
2985
2986 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2987
2988 2018-07-09 Tom Tromey <tom@tromey.com>
2989
2990 * Makefile.in (clean mostlyclean): Remove stamp-version.
2991 (version.c): Depend on stamp-version.
2992 (stamp-version): New rule, from version.c rule.
2993
2994 2018-07-09 Tom Tromey <tom@tromey.com>
2995
2996 * Makefile.in (init.c): Depend on stamp-init.
2997 (stamp-init): New rule, from init.c rule.
2998 (clean mostlyclean): Remove stamp-init.
2999
3000 2018-07-09 Tom Tromey <tom@tromey.com>
3001
3002 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3003 SUBDIR_GCC_COMPILE_SRCS.
3004
3005 2018-07-09 Tom Tromey <tom@tromey.com>
3006
3007 * Makefile.in (init.c): Remove some unused sed rules.
3008
3009 2018-07-09 Tom Tromey <tom@tromey.com>
3010
3011 * Makefile.in (TSOBS): Remove.
3012 (INIT_FILES): Update.
3013 (LIBGDB_OBS): Update.
3014 (COMMON_SFILES): Add inflow.c.
3015 (SFILES): Remove inflow.c.
3016
3017 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3018
3019 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3020
3021 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3022
3023 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3024 get_saveloc_name, is_signal_frame_name, step_name,
3025 init_remote_name, create_addr_space_name,
3026 destroy_addr_space_name, search_unwind_table_name,
3027 find_dyn_list_name): Constify.
3028
3029 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3030
3031 * darwin-nat.c (darwin_pthread_kill): New function.
3032 (darwin_resume_thread): Use darwin_pthread_kill.
3033
3034 2018-07-05 Tom de Vries <tdevries@suse.de>
3035
3036 * macroexp.c (macro_buffer) <operator=>: New member function.
3037
3038 2018-07-04 Tom Tromey <tom@tromey.com>
3039
3040 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3041
3042 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3043
3044 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3045 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3046 * maint.c: Likewise.
3047 * top.c: Likewise.
3048
3049 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3050
3051 * NEWS: Create a new section for the next release branch.
3052 Rename the section of the current branch, now that it has
3053 been cut.
3054
3055 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3056
3057 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3058 * version.in: Bump version to 8.2.50.DATE-git.
3059
3060 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3061 Pedro Alves <palves@redhat.com>
3062
3063 * linux-nat.c (linux_init_ptrace): Rename to ...
3064 (linux_init_ptrace_procfs): ... this. Call
3065 linux_proc_init_warnings.
3066 (linux_nat_target::post_attach)
3067 (linux_nat_target::post_startup_inferior): Adjust.
3068 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3069 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3070
3071 2018-07-04 Tom de Vries <tdevries@suse.de>
3072
3073 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3074 check ...
3075 (read_comp_unit_head): ... here.
3076
3077 2018-07-03 Tom Tromey <tom@tromey.com>
3078
3079 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3080 (stop_tracing, tstatus_command)
3081 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3082 (print_one_static_tracepoint_marker): Update.
3083 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3084 std::vector.
3085 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3086 VEC.
3087 (all_tracepoints, static_tracepoints_here): Return std::vector.
3088
3089 2018-07-03 Tom Tromey <tom@tromey.com>
3090
3091 * common/ptid.c (ptid_equal): Remove.
3092 * common/ptid.h (ptid_equal): Don't declare.
3093 * ada-tasks.c: Update.
3094 * breakpoint.c: Update.
3095 * common/agent.c: Update.
3096 * corelow.c: Update.
3097 * darwin-nat-info.c: Update.
3098 * darwin-nat.c: Update.
3099 * dcache.c: Update.
3100 * dtrace-probe.c: Update.
3101 * dummy-frame.c: Update.
3102 * fbsd-nat.c: Update.
3103 * frame.c: Update.
3104 * gdbthread.h: Update.
3105 * gnu-nat.c: Update.
3106 * go32-nat.c: Update.
3107 * inf-loop.c: Update.
3108 * inf-ptrace.c: Update.
3109 * infcall.c: Update.
3110 * infcmd.c: Update.
3111 * inflow.c: Update.
3112 * infrun.c: Update.
3113 * linux-fork.c: Update.
3114 * linux-nat.c: Update.
3115 * linux-thread-db.c: Update.
3116 * mi/mi-cmd-var.c: Update.
3117 * mi/mi-interp.c: Update.
3118 * mi/mi-main.c: Update.
3119 * nto-procfs.c: Update.
3120 * ppc-linux-tdep.c: Update.
3121 * procfs.c: Update.
3122 * python/py-inferior.c: Update.
3123 * python/py-record-btrace.c: Update.
3124 * python/py-record.c: Update.
3125 * ravenscar-thread.c: Update.
3126 * regcache.c: Update.
3127 * remote-sim.c: Update.
3128 * remote.c: Update.
3129 * sol-thread.c: Update.
3130 * solib.c: Update.
3131 * target.c: Update.
3132 * tui/tui-stack.c: Update.
3133 * varobj.c: Update.
3134 * windows-nat.c: Update.
3135 * windows-tdep.c: Update.
3136
3137 2018-07-03 Tom Tromey <tom@tromey.com>
3138
3139 * common/ptid.c (ptid_match): Remove.
3140 * common/ptid.h (ptid_match): Don't declare.
3141 * fbsd-nat.c: Update.
3142 * infcmd.c: Update.
3143 * infrun.c: Update.
3144 * linux-nat.c: Update.
3145 * record-btrace.c: Update.
3146 * regcache.c: Update.
3147 * remote.c: Update.
3148
3149 2018-07-03 Tom Tromey <tom@tromey.com>
3150
3151 * common/ptid.c (ptid_tid_p): Remove.
3152 * common/ptid.h (ptid_tid_p): Don't declare.
3153 * sol-thread.c: Update.
3154
3155 2018-07-03 Tom Tromey <tom@tromey.com>
3156
3157 * common/ptid.c (ptid_lwp_p): Remove.
3158 * common/ptid.h (ptid_lwp_p): Don't declare.
3159 * fbsd-nat.c: Update.
3160 * linux-nat.c: Update.
3161 * nat/linux-procfs.c: Update.
3162 * nat/x86-linux-dregs.c: Update.
3163 * sol-thread.c: Update.
3164
3165 2018-07-03 Tom Tromey <tom@tromey.com>
3166
3167 * common/ptid.c (ptid_is_pid): Remove.
3168 * common/ptid.h (ptid_is_pid): Don't declare.
3169 * infrun.c: Update.
3170 * linux-nat.c: Update.
3171 * mi/mi-interp.c: Update.
3172 * remote.c: Update.
3173 * thread.c: Update.
3174
3175 2018-07-03 Tom Tromey <tom@tromey.com>
3176
3177 * common/ptid.c (ptid_get_tid): Remove.
3178 * common/ptid.h (ptid_get_tid): Don't declare.
3179 * ada-tasks.c: Update.
3180 * aix-thread.c: Update.
3181 * bsd-uthread.c: Update.
3182 * darwin-nat.c: Update.
3183 * fbsd-nat.c: Update.
3184 * i386-darwin-nat.c: Update.
3185 * infrun.c: Update.
3186 * linux-tdep.c: Update.
3187 * nto-procfs.c: Update.
3188 * ppc-ravenscar-thread.c: Update.
3189 * python/py-infthread.c: Update.
3190 * ravenscar-thread.c: Update.
3191 * sol-thread.c: Update.
3192 * sparc-ravenscar-thread.c: Update.
3193 * windows-nat.c: Update.
3194
3195 2018-07-03 Tom Tromey <tom@tromey.com>
3196
3197 * common/ptid.c (ptid_get_lwp): Remove.
3198 * common/ptid.h (ptid_get_lwp): Don't declare.
3199 * aarch64-linux-nat.c: Update.
3200 * ada-tasks.c: Update.
3201 * aix-thread.c: Update.
3202 * amd64-linux-nat.c: Update.
3203 * arm-linux-nat.c: Update.
3204 * corelow.c: Update.
3205 * fbsd-nat.c: Update.
3206 * fbsd-tdep.c: Update.
3207 * gnu-nat.c: Update.
3208 * i386-cygwin-tdep.c: Update.
3209 * i386-gnu-nat.c: Update.
3210 * i386-linux-nat.c: Update.
3211 * ia64-linux-nat.c: Update.
3212 * inf-ptrace.c: Update.
3213 * infrun.c: Update.
3214 * linux-fork.c: Update.
3215 * linux-nat.c: Update.
3216 * linux-tdep.c: Update.
3217 * linux-thread-db.c: Update.
3218 * mips-linux-nat.c: Update.
3219 * nat/aarch64-linux-hw-point.c: Update.
3220 * nat/aarch64-linux.c: Update.
3221 * nat/linux-btrace.c: Update.
3222 * nat/linux-osdata.c: Update.
3223 * nat/linux-procfs.c: Update.
3224 * nat/x86-linux-dregs.c: Update.
3225 * obsd-nat.c: Update.
3226 * ppc-fbsd-nat.c: Update.
3227 * ppc-linux-nat.c: Update.
3228 * procfs.c: Update.
3229 * python/py-infthread.c: Update.
3230 * ravenscar-thread.c: Update.
3231 * remote.c: Update.
3232 * s390-linux-nat.c: Update.
3233 * sol-thread.c: Update.
3234 * sol2-tdep.c: Update.
3235 * spu-linux-nat.c: Update.
3236 * x86-linux-nat.c: Update.
3237 * xtensa-linux-nat.c: Update.
3238
3239 2018-07-03 Tom Tromey <tom@tromey.com>
3240
3241 * common/ptid.c (ptid_get_pid): Remove.
3242 * common/ptid.h (ptid_get_pid): Don't declare.
3243 * aarch64-linux-nat.c: Update.
3244 * ada-lang.c: Update.
3245 * aix-thread.c: Update.
3246 * alpha-bsd-nat.c: Update.
3247 * amd64-fbsd-nat.c: Update.
3248 * amd64-linux-nat.c: Update.
3249 * arm-linux-nat.c: Update.
3250 * arm-nbsd-nat.c: Update.
3251 * auxv.c: Update.
3252 * break-catch-syscall.c: Update.
3253 * breakpoint.c: Update.
3254 * bsd-uthread.c: Update.
3255 * corelow.c: Update.
3256 * ctf.c: Update.
3257 * darwin-nat.c: Update.
3258 * fbsd-nat.c: Update.
3259 * fbsd-tdep.c: Update.
3260 * gcore.c: Update.
3261 * gnu-nat.c: Update.
3262 * hppa-nbsd-nat.c: Update.
3263 * hppa-obsd-nat.c: Update.
3264 * i386-fbsd-nat.c: Update.
3265 * ia64-linux-nat.c: Update.
3266 * inf-ptrace.c: Update.
3267 * infcmd.c: Update.
3268 * inferior.c: Update.
3269 * inferior.h: Update.
3270 * inflow.c: Update.
3271 * infrun.c: Update.
3272 * linux-fork.c: Update.
3273 * linux-nat.c: Update.
3274 * linux-tdep.c: Update.
3275 * linux-thread-db.c: Update.
3276 * m68k-bsd-nat.c: Update.
3277 * mi/mi-interp.c: Update.
3278 * mi/mi-main.c: Update.
3279 * mips-linux-nat.c: Update.
3280 * mips-nbsd-nat.c: Update.
3281 * mips64-obsd-nat.c: Update.
3282 * nat/aarch64-linux-hw-point.c: Update.
3283 * nat/aarch64-linux.c: Update.
3284 * nat/linux-btrace.c: Update.
3285 * nat/linux-osdata.c: Update.
3286 * nat/linux-procfs.c: Update.
3287 * nat/x86-linux-dregs.c: Update.
3288 * nto-procfs.c: Update.
3289 * obsd-nat.c: Update.
3290 * ppc-linux-nat.c: Update.
3291 * ppc-nbsd-nat.c: Update.
3292 * ppc-obsd-nat.c: Update.
3293 * proc-service.c: Update.
3294 * procfs.c: Update.
3295 * python/py-inferior.c: Update.
3296 * python/py-infthread.c: Update.
3297 * ravenscar-thread.c: Update.
3298 * record.c: Update.
3299 * remote-sim.c: Update.
3300 * remote.c: Update.
3301 * rs6000-nat.c: Update.
3302 * s390-linux-nat.c: Update.
3303 * sh-nbsd-nat.c: Update.
3304 * sol-thread.c: Update.
3305 * sparc-nat.c: Update.
3306 * sparc64-tdep.c: Update.
3307 * spu-linux-nat.c: Update.
3308 * spu-tdep.c: Update.
3309 * target-debug.h: Update.
3310 * target.c: Update.
3311 * thread.c: Update.
3312 * tid-parse.c: Update.
3313 * tracefile-tfile.c: Update.
3314 * vax-bsd-nat.c: Update.
3315 * windows-nat.c: Update.
3316 * x86-linux-nat.c: Update.
3317 * x86-nat.c: Update.
3318
3319 2018-07-03 Tom Tromey <tom@tromey.com>
3320
3321 * common/ptid.c (pid_to_ptid): Remove.
3322 * common/ptid.h (pid_to_ptid): Don't declare.
3323 * aix-thread.c: Update.
3324 * arm-linux-nat.c: Update.
3325 * common/ptid.c: Update.
3326 * common/ptid.h: Update.
3327 * corelow.c: Update.
3328 * ctf.c: Update.
3329 * darwin-nat.c: Update.
3330 * fbsd-nat.c: Update.
3331 * fork-child.c: Update.
3332 * gnu-nat.c: Update.
3333 * go32-nat.c: Update.
3334 * inf-ptrace.c: Update.
3335 * infcmd.c: Update.
3336 * inferior.c: Update.
3337 * infrun.c: Update.
3338 * linux-fork.c: Update.
3339 * linux-nat.c: Update.
3340 * nat/aarch64-linux-hw-point.c: Update.
3341 * nat/fork-inferior.c: Update.
3342 * nat/x86-linux-dregs.c: Update.
3343 * nto-procfs.c: Update.
3344 * obsd-nat.c: Update.
3345 * procfs.c: Update.
3346 * progspace.c: Update.
3347 * remote.c: Update.
3348 * rs6000-nat.c: Update.
3349 * s390-linux-nat.c: Update.
3350 * sol-thread.c: Update.
3351 * spu-linux-nat.c: Update.
3352 * target.c: Update.
3353 * top.c: Update.
3354 * tracefile-tfile.c: Update.
3355 * windows-nat.c: Update.
3356
3357 2018-07-03 Tom Tromey <tom@tromey.com>
3358
3359 * common/ptid.h (ptid_build): Don't declare.
3360 * common/ptid.c (ptid_build): Remove.
3361 * aix-thread.c: Update.
3362 * bsd-kvm.c: Update.
3363 * bsd-uthread.c: Update.
3364 * common/agent.c: Update.
3365 * common/ptid.c: Update.
3366 * common/ptid.h: Update.
3367 * corelow.c: Update.
3368 * darwin-nat.c: Update.
3369 * fbsd-nat.c: Update.
3370 * gnu-nat.c: Update.
3371 * linux-fork.c: Update.
3372 * linux-nat.c: Update.
3373 * linux-thread-db.c: Update.
3374 * nat/linux-osdata.c: Update.
3375 * nat/linux-procfs.c: Update.
3376 * nto-procfs.c: Update.
3377 * obsd-nat.c: Update.
3378 * proc-service.c: Update.
3379 * procfs.c: Update.
3380 * ravenscar-thread.c: Update.
3381 * remote-sim.c: Update.
3382 * remote.c: Update.
3383 * sol-thread.c: Update.
3384 * target.c: Update.
3385 * windows-nat.c: Update.
3386
3387 2018-07-03 Tom Tromey <tom@tromey.com>
3388
3389 * infrun.c (follow_exec): Use exit_inferior_silent.
3390 * inferior.c (exit_inferior_num_silent): Remove.
3391 * inferior.h (exit_inferior_num_silent): Don't declare.
3392
3393 2018-07-03 Tom Tromey <tom@tromey.com>
3394
3395 PR cli/23340:
3396 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3397 inferior_ptid on error.
3398
3399 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3400 Simon Marchi <simon.marchi@polymtl.ca>
3401
3402 PR tdep/8282
3403 * disasm.h (gdb_disassembler): Add
3404 `m_disassembler_options_holder'. member
3405 * disasm.c (get_all_disassembler_options): New function.
3406 (gdb_disassembler::gdb_disassembler): Use it.
3407 (gdb_buffered_insn_length_init_dis): Likewise.
3408 (gdb_buffered_insn_length): Adjust accordingly.
3409 (set_disassembler_options): Handle options with arguments.
3410 (show_disassembler_options_sfunc): Likewise. Add a leading new
3411 line if showing options with descriptions.
3412 (disassembler_options_completer): Adapt to using the
3413 `disasm_options_and_args_t' structure.
3414 * mips-tdep.c (mips_disassembler_options): New variable.
3415 (mips_disassembler_options_o32): Likewise.
3416 (mips_disassembler_options_n32): Likewise.
3417 (mips_disassembler_options_n64): Likewise.
3418 (gdb_print_insn_mips): Don't set `disassembler_options'.
3419 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3420 functions.
3421 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3422 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3423 `gdbarch_disassembler_options_implicit' and
3424 `gdbarch_valid_disassembler_options'.
3425 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3426 `disasm_options_and_args_t' structure.
3427 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3428 method.
3429 (valid_disassembler_options): Switch from `disasm_options_t' to
3430 the `disasm_options_and_args_t' structure.
3431 * NEWS: Document `set disassembler-options' support for the MIPS
3432 target.
3433 * gdbarch.h: Regenerate.
3434 * gdbarch.c: Regenerate.
3435
3436 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3437
3438 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3439
3440 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3441
3442 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3443 parameter in call to amd64_target_description.
3444 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3445 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3446 (amd64fbsd_init_abi): Likewise.
3447 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3448 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3449 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3450 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3451
3452 2018-06-29 Pedro Alves <palves@redhat.com>
3453
3454 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3455 "segments" parameter.
3456 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3457 (_initialize_amd64_tdep): Update call to
3458 amd64_create_target_description.
3459 (amd64_target_description): Add "segments" parameter. Adjust
3460 the implementation to use it.
3461 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3462 call to amd64_create_target_description.
3463 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3464 * gdb/arch/amd64.h (amd64_create_target_description): Add
3465 "segments" register.
3466 * gdb/arch/amd64.c (amd64_create_target_description): Add
3467 "segments" parameter. Call create_feature_i386_64bit_segments
3468 only if SEGMENTS is true.
3469 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3470 call to amd64_create_target_description.
3471
3472 2018-06-29 Pedro Alves <palves@redhat.com>
3473
3474 * thread.c (thread_target_id_str): New, factored out from ...
3475 (print_thread_info_1): ... here. Use it to compute the max
3476 "Target Id" column width.
3477
3478 2018-06-29 Pedro Alves <palves@redhat.com>
3479
3480 * remote.c (remote_target::extra_thread_info): Delete
3481 'display_buf' and 'n' locals. from the cache, regardless of
3482 packet mechanims is in use. Use cache for qThreadExtra and qP
3483 methods too.
3484
3485 2018-06-29 Pedro Alves <palves@redhat.com>
3486
3487 * blockframe.c (find_pc_sect_containing_function): New function.
3488 * breakpoint.c (print_breakpoint_location): Don't call
3489 find_pc_sect_function.
3490 * linespec.c (create_sals_line_offset): Record the location's
3491 symbol in the sal.
3492 * linespec.c (convert_address_location_to_sals): Fill in sal's
3493 symbol with find_pc_sect_containing_function.
3494 * symtab.c (find_function_start_sal): Rename to ...
3495 (find_function_start_sal_1): ... this.
3496 (find_function_start_sal): Reimplement as wrapper around
3497 find_function_start_sal_1, and use
3498 find_pc_sect_containing_function to fill in the sal's symbol.
3499 (find_function_start_sal(symbol*, bool)): Adjust.
3500 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3501 comments.
3502 (find_pc_sect_containing_function): Declare.
3503
3504 2018-06-29 Pedro Alves <palves@redhat.com>
3505
3506 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3507 true if the the location has no symbol.
3508
3509 2018-06-28 Tom Tromey <tom@tromey.com>
3510
3511 * NEWS: Mention --enable-codesign.
3512 * silent-rules.mk (ECHO_SIGN): New variable.
3513 * configure.ac: Add --enable-codesign.
3514 * configure: Rebuild.
3515 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3516 (gdb$(EXEEXT)): Optionally invoke codesign.
3517
3518 2018-06-28 Pedro Alves <palves@redhat.com>
3519
3520 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3521 comments.
3522 (switch_to_thread_no_regs): Adjust comment.
3523 * infcmd.c (stop_pc): Delete.
3524 (post_create_inferior, info_program_command): Replace references
3525 to stop_pc with references to thread_info->suspend.stop_pc.
3526 * inferior.h (stop_pc): Delete declaration.
3527 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3528 (handle_inferior_event_1, handle_signal_stop)
3529 (process_event_stop_test, keep_going_stepped_thread)
3530 (handle_step_into_function, handle_step_into_function_backward)
3531 (print_stop_location): Replace references to stop_pc with
3532 references to thread_info->suspend.stop_pc.
3533 (struct infcall_suspend_state) <stop_pc>: Delete field.
3534 (save_infcall_suspend_state, restore_infcall_suspend_state):
3535 Remove references to inf_stat->stop_pc.
3536 * linux-fork.c (fork_load_infrun_state): Likewise.
3537 * record-btrace.c (record_btrace_set_replay): Likewise.
3538 * record-full.c (record_full_goto_entry): Likewise.
3539 * remote.c (print_one_stopped_thread): Likewise.
3540 * target.c (target_resume): Extend comment.
3541 * thread.c (set_executing_thread): New.
3542 (set_executing): Use it.
3543 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3544 Remove references to stop_pc.
3545
3546 2018-06-28 Pedro Alves <palves@redhat.com>
3547
3548 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3549 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3550
3551 2018-06-28 Tom Tromey <tom@tromey.com>
3552
3553 * coffread.c (coff_symfile_finish): Update.
3554 * xcoffread.c (xcoff_symfile_finish): Update.
3555 * elfread.c (elf_symfile_finish): Update.
3556 * symfile.h (dwarf2_free_objfile): Don't declare.
3557 * dwarf2read.c (_initialize_dwarf2_read): Use
3558 register_objfile_data_with_cleanup.
3559 (dwarf2_free_objfile): Now static. Change signature.
3560
3561 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3562
3563 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3564 option "-o" to add-symbol-file-load to add an offset to each
3565 section's load address.
3566 * symfile.c (set_objfile_default_section_offset): New function.
3567
3568 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3569
3570 * symfile.c (add_symbol_file_command): Make sure that sections
3571 with the same name are sorted in the same order.
3572
3573 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3574
3575 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3576 require the second argument. If omitted, load sections at the
3577 addresses specified in the file.
3578
3579 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3580
3581 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3582 (_initialize_symfile): Add option "-o" to symbol-file to add an
3583 offset to each section of the symbol file.
3584
3585 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3586
3587 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3588
3589 2018-06-27 Tom Tromey <tom@tromey.com>
3590
3591 * stack.c (_initialize_stack): Update "func" help text.
3592
3593 2018-06-27 Tom Tromey <tom@tromey.com>
3594
3595 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3596 std::vector.
3597 (unwind_infopy_str, pyuw_create_unwind_info)
3598 (unwind_infopy_add_saved_register, pyuw_sniffer)
3599 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3600 Update.
3601 (struct saved_reg): Add constructor.
3602 <value>: Now a gdbpy_ref<>.
3603
3604 2018-06-27 Tom Tromey <tom@tromey.com>
3605
3606 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3607
3608 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3609
3610 * gdb-gdb.py.in: Format using autopep8.
3611
3612 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3613
3614 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3615 (type_lookup_function): Recognize CORE_ADDR values.
3616
3617 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3618
3619 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3620 print tag_name.
3621
3622 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3623
3624 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3625 <__lt__>: Add.
3626
3627 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3628
3629 * gdb-gdb.py: Move to...
3630 * gdb-gdb.py.in: ... here.
3631 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3632 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3633 dependencies.
3634 (distclean): Remove gdb-gdb.py when cleaning.
3635 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3636 * configure: Re-generate.
3637
3638 2018-06-27 Pedro Alves <palves@redhat.com>
3639
3640 * proc-service.c (get_ps_regcache): New.
3641 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3642 (ps_lsetfpregs): Use it.
3643
3644 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3645
3646 PR gdb/21695
3647 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3648 (dwarf_decode_lines_1): Adjust.
3649
3650 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3651
3652 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3653 override.
3654 <info_proc>: Likewise.
3655
3656 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3657
3658 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3659 to windows_fetch_one_register, and only handle the case of
3660 fetching one register. Move the code that reloads the context
3661 and iterates over all registers if R is negative to...
3662 (windows_nat_target::fetch_registers): ... here.
3663 (do_windows_store_inferior_registers): Rename to
3664 windows_store_one_register, and only handle the case of storing
3665 one register. Move the code that handles the case where r is
3666 negative to...
3667 (windows_nat_target::store_registers) ... here.
3668
3669 2018-06-26 Tom Tromey <tom@tromey.com>
3670
3671 PR rust/22574:
3672 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3673 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3674 Update.
3675 (rust_internal_print_type): Add podata parameter.
3676 (rust_print_type): Update.
3677
3678 2018-06-26 Tom Tromey <tom@tromey.com>
3679
3680 * typeprint.h (struct print_offset_data) <update, finish,
3681 maybe_print_hole>: New methods.
3682 <indentation>: New constant.
3683 * typeprint.c (print_offset_data::indentation): Define.
3684 (print_offset_data::maybe_print_hole, print_offset_data::update)
3685 (print_offset_data::finish): Move from c-typeprint.c and rename.
3686 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3687 (print_spaces_filtered_with_print_options): Update.
3688 (c_print_type_union_field_offset, maybe_print_hole)
3689 (c_print_type_struct_field_offset): Move to typeprint.c and
3690 rename.
3691 (c_type_print_base_struct_union): Update.
3692
3693 2018-06-25 Pedro Alves <palves@redhat.com>
3694
3695 * gdbthread.h (thread_info_ref, delete_thread)
3696 (delete_thread_silent, first_thread_of_inferior)
3697 (any_thread_of_inferior, switch_to_thread)
3698 (enable_thread_stack_temporaries)
3699 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3700 (get_last_thread_stack_temporary)
3701 (value_in_thread_stack_temporaries, can_access_registers_thread):
3702 Spell out "struct thread_info" instead of just "thread_info".
3703 * inferior.h (notice_new_inferior): Likewise.
3704
3705 2018-06-25 Pedro Alves <palves@redhat.com>
3706
3707 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3708 pass thread_info pointer to delete_thread.
3709 (windows_nat_target::detach): Pass inferior pointer to
3710 detach_inferior.
3711 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3712 delete_thread.
3713 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3714 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3715 and pass a thread_info pointer to delete_thread.
3716 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3717 pass thread_info pointer to delete_thread.
3718 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3719 delete_thread_silent call.
3720 * procfs.c (procfs_target::detach): Pass inferior pointer to
3721 detach_inferior.
3722 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3723 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3724 delete_thread_silent call.
3725 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3726 pass thread_info pointer to delete_thread.
3727 (windows_nat_target::detach): Pass inferior pointer to
3728 delete_inferior.
3729
3730 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3731
3732 * regcache.c (readable_regcache::read_part): Fix asserts.
3733 (reg_buffer::raw_collect_part): New function.
3734 (regcache::write_part): Fix asserts.
3735 (reg_buffer::raw_supply_part): New function.
3736 (regcache::transfer_regset_register): New helper function.
3737 (regcache::transfer_regset): Call new functions.
3738 (regcache_supply_regset): Use gdb_byte*.
3739 (regcache::supply_regset): Likewise.
3740 (regcache_collect_regset): Likewise.
3741 (regcache::collect_regset): Likewise.
3742 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3743 (reg_buffer::raw_supply_part): Likewise.
3744 (regcache::transfer_regset_register): Likewise.
3745 (regcache::transfer_regset): Use gdb_byte*.
3746
3747 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3748
3749 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3750
3751 2018-06-21 Pedro Alves <palves@redhat.com>
3752
3753 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3754 instead of a ptid_t. All callers adjusted.
3755 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3756 adjusted.
3757 (print_ada_task_info, display_current_task_id, task_command_1):
3758 Adjust.
3759 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3760 inferior_thread.
3761 (breakpoint_kind): Adjust.
3762 (remove_breakpoints_pid): Rename to ...
3763 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3764 pointer. All callers adjusted.
3765 (bpstat_clear_actions): Use inferior_thread.
3766 (get_bpstat_thread): New.
3767 (bpstat_do_actions): Use it.
3768 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3769 to take a thread_info pointer. All callers adjusted.
3770 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3771 (breakpoint_re_set_thread): Use inferior_thread.
3772 * breakpoint.h (struct inferior): Forward declare.
3773 (bpstat_stop_status): Update.
3774 (remove_breakpoints_pid): Delete.
3775 (remove_breakpoints_inf): New.
3776 * bsd-uthread.c (bsd_uthread_target::wait)
3777 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3778 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3779 (maint_btrace_packet_history_cmd)
3780 (maint_btrace_clear_packet_history_cmd): Adjust.
3781 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3782 inferior_thread.
3783 * cli/cli-interp.c: Include "inferior.h".
3784 * common/refcounted-object.h (struct
3785 refcounted_object_ref_policy): New.
3786 * compile/compile-object-load.c: Include gdbthread.h.
3787 (store_regs): Use inferior_thread.
3788 * corelow.c (core_target::close): Use current_inferior.
3789 (core_target_open): Adjust to use first_thread_of_inferior and use
3790 the current inferior.
3791 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3792 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3793 <thread>: ... this new field. All references adjusted.
3794 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3795 Take a thread_info pointer instead of a ptid_t.
3796 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3797 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3798 thread_info pointer instead of a ptid_t.
3799 * elfread.c: Include "inferior.h".
3800 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3801 Use inferior_thread.
3802 * eval.c (evaluate_subexp): Likewise.
3803 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3804 inferior_thread.
3805 * gdb_proc_service.h (struct thread_info): Forward declare.
3806 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3807 <thread>: ... this new field. All references adjusted.
3808 * gdbarch.h, gdbarch.c: Regenerate.
3809 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3810 'thread' parameter. All implementations and callers adjusted.
3811 * gdbthread.h (thread_info) <set_running>: New method.
3812 (delete_thread, delete_thread_silent): Take a thread_info pointer
3813 instead of a ptid.
3814 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3815 (first_thread_of_process): Delete, replaced by ...
3816 (first_thread_of_inferior): ... this new function. All callers
3817 adjusted.
3818 (any_live_thread_of_process): Delete, replaced by ...
3819 (any_live_thread_of_inferior): ... this new function. All callers
3820 adjusted.
3821 (switch_to_thread, switch_to_no_thread): Declare.
3822 (is_executing): Delete.
3823 (enable_thread_stack_temporaries): Update comment.
3824 <enable_thread_stack_temporaries>: Take a thread_info pointer
3825 instead of a ptid_t. Incref the thread.
3826 <~enable_thread_stack_temporaries>: Decref the thread.
3827 <m_ptid>: Delete
3828 <m_thr>: New.
3829 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3830 (get_last_thread_stack_temporary)
3831 (value_in_thread_stack_temporaries, can_access_registers_thread):
3832 Take a thread_info pointer instead of a ptid_t. All callers
3833 adjusted.
3834 * infcall.c (get_call_return_value): Use inferior_thread.
3835 (run_inferior_call): Work with thread pointers instead of ptid_t.
3836 (call_function_by_hand_dummy): Work with thread pointers instead
3837 of ptid_t. Use thread_info_ref.
3838 * infcmd.c (proceed_thread_callback): Access thread's state
3839 directly.
3840 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3841 access thread's state directly.
3842 (continue_command): Use inferior_thread.
3843 (info_program_command): Use find_thread_ptid and access thread
3844 state directly.
3845 (proceed_after_attach_callback): Use thread state directly.
3846 (notice_new_inferior): Take a thread_info pointer instead of a
3847 ptid_t. All callers adjusted.
3848 (exit_inferior): Take an inferior pointer instead of a pid. All
3849 callers adjusted.
3850 (exit_inferior_silent): New.
3851 (detach_inferior): Delete.
3852 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3853 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3854 (detach_inferior_command, kill_inferior_command): Use
3855 find_inferior_id instead of valid_gdb_inferior_id and
3856 gdb_inferior_id_to_pid.
3857 (inferior_command): Use inferior and thread pointers.
3858 * inferior.h (struct thread_info): Forward declare.
3859 (notice_new_inferior): Take a thread_info pointer instead of a
3860 ptid_t. All callers adjusted.
3861 (detach_inferior): Delete declaration.
3862 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3863 instead of a pid. All callers adjusted.
3864 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3865 (valid_gdb_inferior_id): Delete.
3866 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3867 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3868 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3869 ...
3870 <inf>: ... this new field.
3871 <step_ptid>: Delete, replaced by ...
3872 <step_thread>: ... this new field.
3873 (get_displaced_stepping_state): Take an inferior pointer instead
3874 of a pid. All callers adjusted.
3875 (displaced_step_in_progress_any_inferior): Adjust.
3876 (displaced_step_in_progress_thread): Take a thread pointer instead
3877 of a ptid_t. All callers adjusted.
3878 (displaced_step_in_progress, add_displaced_stepping_state): Take
3879 an inferior pointer instead of a pid. All callers adjusted.
3880 (get_displaced_step_closure_by_addr): Adjust.
3881 (remove_displaced_stepping_state): Take an inferior pointer
3882 instead of a pid. All callers adjusted.
3883 (displaced_step_prepare_throw, displaced_step_prepare)
3884 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3885 All callers adjusted.
3886 (start_step_over): Adjust.
3887 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3888 displaced step queue.
3889 (do_target_resume): Adjust.
3890 (fetch_inferior_event): Use inferior_thread.
3891 (context_switch, get_inferior_stop_soon): Take an
3892 execution_control_state pointer instead of a ptid_t. All callers
3893 adjusted.
3894 (switch_to_thread_cleanup): Delete.
3895 (stop_all_threads): Use scoped_restore_current_thread.
3896 * inline-frame.c: Include "gdbthread.h".
3897 (inline_state) <inline_state>: Take a thread pointer instead of a
3898 ptid_t. All callers adjusted.
3899 <ptid>: Delete, replaced by ...
3900 <thread>: ... this new field.
3901 (find_inline_frame_state): Take a thread pointer instead of a
3902 ptid_t. All callers adjusted.
3903 (skip_inline_frames, step_into_inline_frame)
3904 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3905 pointer instead of a ptid_t. All callers adjusted.
3906 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3907 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3908 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3909 pointers directly.
3910 * linux-nat.c (get_detach_signal): Likewise.
3911 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3912 (thread_db_notice_clone): Adjust.
3913 (thread_db_find_new_threads_silently)
3914 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3915 a thread pointer instead of a ptid_t. All callers adjusted.
3916 * mi/mi-cmd-var.c: Include "inferior.h".
3917 (mi_cmd_var_update_iter): Update to use thread pointers.
3918 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3919 inferior directly.
3920 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3921 out to ...
3922 (mi_output_running): ... this new function.
3923 (mi_on_resume_1): Adjust to use it.
3924 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3925 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3926 directly.
3927 (interrupt_thread_callback): : Adjust to use thread and inferior
3928 pointers.
3929 * proc-service.c: Include "gdbthread.h".
3930 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3931 * progspace-and-thread.c: Include "inferior.h".
3932 * progspace.c: Include "inferior.h".
3933 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3934 hold a reference to an inferior_object.
3935 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3936 inferior_thread.
3937 * python/py-inferior.c (struct inferior_object): Give the type a
3938 tag name instead of a typedef.
3939 (python_on_normal_stop): No need to check if the current thread is
3940 listed.
3941 (inferior_to_inferior_object): Change return type to
3942 inferior_object. All callers adjusted.
3943 (find_thread_object): Delete, bits factored out to ...
3944 (thread_to_thread_object): ... this new function.
3945 * python/py-infthread.c (create_thread_object): Use
3946 inferior_to_inferior_object.
3947 (thpy_is_stopped): Use thread pointer directly.
3948 (gdbpy_selected_thread): Use inferior_thread.
3949 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3950 field, replaced with ...
3951 <thread>: ... this new field. All users adjusted.
3952 (btpy_insn_or_gap_new): Drop const.
3953 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3954 callers adjusted.
3955 * python/py-record.c: Include "gdbthread.h".
3956 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3957 a ptid_t. All callers adjusted.
3958 (gdbpy_current_recording): Use inferior_thread.
3959 * python/py-record.h (recpy_record_object) <ptid>: Delete
3960 field, replaced with ...
3961 <thread>: ... this new field. All users adjusted.
3962 (recpy_element_object) <ptid>: Delete
3963 field, replaced with ...
3964 <thread>: ... this new field. All users adjusted.
3965 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3966 a ptid_t. All callers adjusted.
3967 * python/py-threadevent.c: Include "gdbthread.h".
3968 (get_event_thread): Use thread_to_thread_object.
3969 * python/python-internal.h (struct inferior_object): Forward
3970 declare.
3971 (find_thread_object, find_inferior_object): Delete declarations.
3972 (thread_to_thread_object, inferior_to_inferior_object): New
3973 declarations.
3974 * record-btrace.c: Include "inferior.h".
3975 (require_btrace_thread): Use inferior_thread.
3976 (record_btrace_frame_sniffer)
3977 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3978 (get_thread_current_frame): Use scoped_restore_current_thread and
3979 switch_to_thread.
3980 (get_thread_current_frame): Use thread pointer directly.
3981 (record_btrace_replay_at_breakpoint): Use thread's inferior
3982 pointer directly.
3983 * record-full.c: Include "inferior.h".
3984 * regcache.c: Include "gdbthread.h".
3985 (get_thread_arch_regcache): Use the inferior's address space
3986 directly.
3987 (get_thread_regcache, registers_changed_thread): New.
3988 * regcache.h (get_thread_regcache(thread_info *thread)): New
3989 overload.
3990 (registers_changed_thread): New.
3991 (remote_target) <remote_detach_1>: Swap order of parameters.
3992 (remote_add_thread): <remote_add_thread>: Return the new thread.
3993 (get_remote_thread_info(ptid_t)): New overload.
3994 (remote_target::remote_notice_new_inferior): Use thread pointers
3995 directly.
3996 (remote_target::process_initial_stop_replies): Use
3997 thread_info::set_running.
3998 (remote_target::remote_detach_1, remote_target::detach)
3999 (extended_remote_target::detach): Adjust.
4000 * stack.c (frame_show_address): Use inferior_thread.
4001 * target-debug.h (target_debug_print_thread_info_pp): New.
4002 * target-delegates.c: Regenerate.
4003 * target.c (default_thread_address_space): Delete.
4004 (memory_xfer_partial_1): Use current_inferior.
4005 (target_detach): Use current_inferior.
4006 (target_thread_address_space): Delete.
4007 (generic_mourn_inferior): Use current_inferior.
4008 * target.h (struct target_ops) <thread_address_space>: Delete.
4009 (target_thread_address_space): Delete.
4010 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4011 pointers directly.
4012 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4013 thread pointer instead of a ptid_t. Adjust all callers.
4014 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4015 (first_thread_of_process): Delete, replaced by ...
4016 (first_thread_of_inferior): ... this new function. All callers
4017 adjusted.
4018 (any_thread_of_process): Rename to ...
4019 (any_thread_of_inferior): ... this, and take an inferior pointer.
4020 (any_live_thread_of_process): Rename to ...
4021 (any_live_thread_of_inferior): ... this, and take an inferior
4022 pointer.
4023 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4024 (value_in_thread_stack_temporaries)
4025 (get_last_thread_stack_temporary): Take a thread pointer instead
4026 of a ptid_t. Adjust all callers.
4027 (thread_info::set_running): New.
4028 (validate_registers_access): Use inferior_thread.
4029 (can_access_registers_ptid): Rename to ...
4030 (can_access_registers_thread): ... this, and take a thread
4031 pointer.
4032 (print_thread_info_1): Adjust to compare thread pointers instead
4033 of ptids.
4034 (switch_to_no_thread, switch_to_thread): Make extern.
4035 (scoped_restore_current_thread::~scoped_restore_current_thread):
4036 Use m_thread pointer directly.
4037 (scoped_restore_current_thread::scoped_restore_current_thread):
4038 Use inferior_thread.
4039 (thread_command): Use thread pointer directly.
4040 (thread_num_make_value_helper): Use inferior_thread.
4041 * top.c (execute_command): Use inferior_thread.
4042 * tui/tui-interp.c: Include "inferior.h".
4043 * varobj.c (varobj_create): Use inferior_thread.
4044 (value_of_root_1): Use find_thread_global_id instead of
4045 global_thread_id_to_ptid.
4046
4047 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4048
4049 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4050 possible.
4051 (regcache::write_part): Likewise.
4052 (readable_regcache::cooked_read_part): Update comment.
4053 (readable_regcache::cooked_write_part): Likewise.
4054 * regcache.h: (readable_regcache::read_part): Likewise.
4055 (regcache::write_part): Likewise.
4056
4057 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4058 Dirk Schubert <dirk.schubert@arm.com>
4059
4060 * aarch64-linux-nat.c (post_attach): New.
4061 (aarch64_linux_nat_target::post_attach): Override post_attach to
4062 record the number of hardware debug registers.
4063
4064 2018-06-20 Tom Tromey <tom@tromey.com>
4065
4066 * python/py-param.c (add_setshow_generic): Make parameters const.
4067 (parmpy_init): Update.
4068
4069 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4070
4071 * regcache.h (regcache_cooked_read_ftype): Rename to...
4072 (register_read_ftype): ...this, change type to function_view.
4073 (class reg_buffer) <save>: Remove src parameter.
4074 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4075 parameter non-const in first overload. Remove src parameter in
4076 second overload.
4077 * regcache.c (do_cooked_read): Remove.
4078 (readonly_detached_regcache::readonly_detached_regcache): Make
4079 parameter non-const, adjust call to other constructor.
4080 (reg_buffer::save): Remove src parameter.
4081 * frame.c (do_frame_register_read): Remove.
4082 (frame_save_as_regcache): Use lambda function.
4083 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4084 parameter to ppu2spu_data *.
4085 (ppu2spu_sniffer): Use lambda function.
4086
4087 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4088
4089 * record-full.c (record_full_target::insert_breakpoint): Remove
4090 "struct" keyword, add const.
4091
4092 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4093
4094 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4095 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4096 * configure.ac: Remove AC_PREREQ, add missing quoting.
4097 * gnulib/configure.ac: Modernize usage of
4098 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4099 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4100 (AUTOMAKE_VERSION): Bump to 1.15.1.
4101 * configure: Re-generate.
4102 * config.in: Re-generate.
4103 * aclocal.m4: Re-generate.
4104 * gnulib/aclocal.m4: Re-generate.
4105 * gnulib/config.in: Re-generate.
4106 * gnulib/configure: Re-generate.
4107 * gnulib/import/Makefile.in: Re-generate.
4108
4109 2018-06-19 Pedro Alves <palves@redhat.com>
4110
4111 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4112 (lookup_minimal_symbol_by_pc_section): ... here with
4113 gdb_assert_not_reached added.
4114
4115 2018-06-19 Pedro Alves <palves@redhat.com>
4116
4117 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4118 parameter with a block parameter. Compare location's block symbol
4119 with the frame's block instead of addresses.
4120 (skip_inline_frames): Pass the current block instead of the
4121 frame's address. Break out as soon as we determine the frame
4122 should not be skipped.
4123
4124 2018-06-18 Tom Tromey <tom@tromey.com>
4125
4126 * solib-aix.c (solib_aix_get_section_offsets): Return
4127 unique_xmalloc_ptr.
4128 (solib_aix_solib_create_inferior_hook): Update.
4129
4130 2018-06-18 Tom Tromey <tom@tromey.com>
4131
4132 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4133
4134 2018-06-18 Tom Tromey <tom@tromey.com>
4135
4136 * solib-frv.c (frv_relocate_main_executable): Use
4137 unique_xmalloc_ptr.
4138 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4139 unique_xmalloc_ptr.
4140
4141 2018-06-18 Tom Tromey <tom@tromey.com>
4142
4143 * objfiles.h (inhibit_section_map_updates): Update.
4144 (resume_section_map_updates, resume_section_map_updates_cleanup):
4145 Remove.
4146 * solib-svr4.c (svr4_handle_solib_event): Update.
4147 * objfiles.c (inhibit_section_map_updates): Return
4148 scoped_restore_tmpl<int>.
4149 (resume_section_map_updates, resume_section_map_updates_cleanup):
4150 Remove.
4151
4152 2018-06-18 Tom Tromey <tom@tromey.com>
4153
4154 * valprint.h (read_string): Update.
4155 * valprint.c (read_string): Change type of "buffer".
4156 (val_print_string): Update.
4157 * python/py-value.c (valpy_string): Update.
4158 * language.h (struct language_defn) <la_get_string>: Change
4159 type of "buffer".
4160 (default_get_string, c_get_string): Update.
4161 * language.c (default_get_string): Change type of "buffer".
4162 * guile/scm-value.c (gdbscm_value_to_string): Update.
4163 * c-lang.c (c_get_string): Change type of "buffer".
4164
4165 2018-06-18 Tom Tromey <tom@tromey.com>
4166
4167 * ser-mingw.c (struct pipe_state_destroyer): New.
4168 (pipe_state_up): New typedef.
4169 (cleanup_pipe_state): Remove.
4170 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4171
4172 2018-06-18 Tom Tromey <tom@tromey.com>
4173
4174 * rust-lang.h (rust_yyerror): Don't declare.
4175 * rust-lang.c (rust_language_defn): Update.
4176 * rust-exp.y (yyerror): Now static.
4177 * parse.c (parse_exp_in_context_1): Update.
4178 * p-lang.h (p_yyerror): Don't declare.
4179 * p-lang.c (p_language_defn): Update.
4180 * p-exp.y (yyerror): Now static.
4181 * opencl-lang.c (opencl_language_defn): Update.
4182 * objc-lang.c (objc_language_defn): Update.
4183 * m2-lang.h (m2_yyerror): Don't declare.
4184 * m2-lang.c (m2_language_defn): Update.
4185 * m2-exp.y (yyerror): Now static.
4186 * language.h (struct language_defn) <la_error>: Remove.
4187 * language.c (unk_lang_error): Remove.
4188 (unknown_language_defn, auto_language_defn): Remove.
4189 * go-lang.h (go_yyerror): Don't declare.
4190 * go-lang.c (go_language_defn): Update.
4191 * go-exp.y (yyerror): Now static.
4192 * f-lang.h (f_yyerror): Don't declare.
4193 * f-lang.c (f_language_defn): Update.
4194 * f-exp.y (yyerror): Now static.
4195 * d-lang.h (d_yyerror): Don't declare.
4196 * d-lang.c (d_language_defn): Update.
4197 * d-exp.y (yyerror): Now static.
4198 * c-lang.h (c_yyerror): Don't declare.
4199 * c-lang.c (c_language_defn, cplus_language_defn)
4200 (asm_language_defn, minimal_language_defn): Update.
4201 * c-exp.y (yyerror): Now static.
4202 * ada-lang.h (ada_yyerror): Don't declare.
4203 * ada-lang.c (ada_language_defn): Update.
4204 * ada-exp.y (yyerror): Now static.
4205
4206 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4207
4208 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4209 (store_sveregs_to_thread): Likewise.
4210 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4211 (aarch64_linux_store_inferior_registers): Likewise.
4212 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4213 function.
4214 (aarch64_sve_regs_copy_to_regcache): Likewise.
4215 (aarch64_sve_regs_copy_from_regcache): Likewise.
4216 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4217 declaration.
4218 (aarch64_sve_regs_copy_to_regcache): Likewise.
4219 (aarch64_sve_regs_copy_from_regcache): Likewise.
4220 (sve_context): Structure from Linux headers.
4221 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4222 (SVE_SIG_ZREG_SIZE): Likewise.
4223 (SVE_SIG_PREG_SIZE): Likewise.
4224 (SVE_SIG_FFR_SIZE): Likewise.
4225 (SVE_SIG_REGS_OFFSET): Likewise.
4226 (SVE_SIG_ZREGS_OFFSET): Likewise.
4227 (SVE_SIG_ZREG_OFFSET): Likewise.
4228 (SVE_SIG_ZREGS_SIZE): Likewise.
4229 (SVE_SIG_PREGS_OFFSET): Likewise.
4230 (SVE_SIG_PREG_OFFSET): Likewise.
4231 (SVE_SIG_PREGS_SIZE): Likewise.
4232 (SVE_SIG_FFR_OFFSET): Likewise.
4233 (SVE_SIG_REGS_SIZE): Likewise.
4234 (SVE_SIG_CONTEXT_SIZE): Likewise.
4235 (SVE_PT_REGS_MASK): Likewise.
4236 (SVE_PT_REGS_FPSIMD): Likewise.
4237 (SVE_PT_REGS_SVE): Likewise.
4238 (SVE_PT_VL_INHERIT): Likewise.
4239 (SVE_PT_VL_ONEXEC): Likewise.
4240 (SVE_PT_REGS_OFFSET): Likewise.
4241 (SVE_PT_FPSIMD_OFFSET): Likewise.
4242 (SVE_PT_FPSIMD_SIZE): Likewise.
4243 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4244 (SVE_PT_SVE_PREG_SIZE): Likewise.
4245 (SVE_PT_SVE_FFR_SIZE): Likewise.
4246 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4247 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4248 (__SVE_SIG_TO_PT): Likewise.
4249 (SVE_PT_SVE_OFFSET): Likewise.
4250 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4251 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4252 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4253 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4254 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4255 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4256 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4257 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4258 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4259 (SVE_PT_SVE_SIZE): Likewise.
4260 (SVE_PT_SIZE): Likewise.
4261 (HAS_SVE_STATE): New define.
4262
4263 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4264
4265 * nat/aarch64-sve-linux-sigcontext.h: New file.
4266 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4267 new files.
4268 (SVE_VQ_MIN): Likewise.
4269 (SVE_VQ_MAX): Likewise.
4270 (SVE_VL_MIN): Likewise.
4271 (SVE_VL_MAX): Likewise.
4272 (SVE_NUM_ZREGS): Likewise.
4273 (SVE_NUM_PREGS): Likewise.
4274 (sve_vl_valid): Likewise.
4275 (struct user_sve_header): Likewise.
4276
4277 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4278 Richard Bunt <Richard.Bunt@arm.com>
4279
4280 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4281 was requested by GDB.
4282
4283 2018-06-15 Tom de Vries <tdevries@suse.de>
4284
4285 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4286
4287 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4288
4289 * gnulib/update-gnulib.sh: Print expected versions of
4290 autoconf/aclocal.
4291
4292 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4293
4294 * arch-utils.c (default_type_align): Use type_length_units.
4295 * gdbtypes.c (type_align): Use type_length_units.
4296
4297 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4298
4299 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4300 of 'define' command.
4301
4302 2018-06-14 Tom de Vries <tdevries@suse.de>
4303
4304 PR cli/22573
4305 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4306 get_no_prettyformat_print_options.
4307
4308 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4309
4310 * sparc-nat.h: Include target.h.
4311 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4312 <fetch_registers>: Remove this argument in function call.
4313 <store_registers>: Remove this argument in function call, remove
4314 extra semicolon.
4315 <low_forget_process>: Call sparc64_forget_process instead of
4316 sparc_forget_process.
4317
4318 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4319
4320 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4321 (procfs_target::make_corefile_notes): Adjust to new
4322 target_read_alloc return type.
4323
4324 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4325 Stephen Roberts <stephen.roberts@arm.com>
4326
4327 PR gdb/22882
4328 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4329 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4330 Move should_notify_stop local into more inner scope.
4331
4332 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4333 Stephen Roberts <stephen.roberts@arm.com>
4334
4335 PR gdb/22882
4336 * infrun.c (resume_1): Add call to mark_async_event_handler.
4337
4338 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4339
4340 * infrun.c (do_target_wait): Change old version of $pc printed.
4341
4342 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4343
4344 * dwarf2read.c (read_index_from_section): Rename to...
4345 (read_gdb_index_from_section): ... this, update all callers.
4346 (dwarf2_read_index): Rename to...
4347 (dwarf2_read_gdb_index): ... this, update all callers.
4348
4349 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4350
4351 * gdb/hppa-linux-nat.c
4352 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4353 hppa_linux_nat_target::fetch_registers.
4354
4355 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4356
4357 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4358 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4359 (AARCH64_DWARF_SVE_FFR): Likewise.
4360 (AARCH64_DWARF_SVE_P0): Likewise.
4361 (AARCH64_DWARF_SVE_Z0): Likewise.
4362
4363 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4364
4365 * common/common-regcache.h (raw_compare): New function.
4366 * regcache.c (regcache::raw_compare): Likewise.
4367 * regcache.h (regcache::raw_compare): New declaration.
4368
4369 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4370
4371 * common/common-regcache.h (reg_buffer_common): New structure.
4372 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4373 (reg_buffer::raw_supply): Likewise.
4374 (reg_buffer::raw_supply_integer): Likewise.
4375 (reg_buffer::raw_supply_zeroed): Likewise.
4376 (reg_buffer::raw_collect): Likewise.
4377 (reg_buffer::raw_collect_integer): Likewise.
4378 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4379 (reg_buffer::raw_supply): Likewise.
4380 (reg_buffer::raw_supply_integer): Likewise.
4381 (reg_buffer::raw_supply_zeroed): Likewise.
4382 (reg_buffer::raw_collect): Likewise.
4383 (reg_buffer::raw_collect_integer): Likewise.
4384
4385 2018-06-10 Tom Tromey <tom@tromey.com>
4386
4387 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4388 (class remote_state) <stop_reply_queue>: Now std::vector.
4389 (remote_state::~remote_state)
4390 (remote_target::stop_reply_queue_length): Update.
4391 (struct queue_iter_param, remove_child_of_pending_fork)
4392 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4393 (check_pending_event_prevents_wildcard_vcont_callback)
4394 (remove_stop_reply_for_inferior)
4395 (remove_stop_reply_of_remote_state)
4396 (remote_notif_remove_once_on_match)
4397 (stop_reply_match_ptid_and_ws)
4398 (remote_kill_child_of_pending_fork): Remove.
4399 (remote_target::remove_new_fork_children)
4400 (remote_target::check_pending_events_prevent_wildcard_vcont)
4401 (remote_target::discard_pending_stop_replies)
4402 (remote_target::discard_pending_stop_replies_in_queue)
4403 (remote_target::remote_notif_remove_queued_reply)
4404 (remote_target::queued_stop_reply)
4405 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4406 (remote_target::wait, remote_target::kill_new_fork_children)
4407 (remote_target::async): Update.
4408
4409 2018-06-10 Tom Tromey <tom@tromey.com>
4410
4411 * record-full.c (record_full_arch_list_cleanups): Remove.
4412 (record_full_message): Use try/catch.
4413 (record_full_wait_cleanups): Remove.
4414 (record_full_wait_1): Use try/catch.
4415 (record_full_restore): Likewise.
4416
4417 2018-06-10 Tom Tromey <tom@tromey.com>
4418
4419 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4420 declare VEC. Add constructor.
4421 <in_target_beneath>: Now bool.
4422 (record_full_breakpoints): Now a std::vector, static.
4423 (record_full_sync_record_breakpoints)
4424 (record_full_init_record_breakpoints)
4425 (record_full_target::insert_breakpoint)
4426 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4427
4428 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4429
4430 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4431 * serial.c (serial_interface_lookup): Remove struct keyword.
4432
4433 2018-06-10 Tom Tromey <tom@tromey.com>
4434
4435 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4436 method.
4437 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4438 a method.
4439 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4440 method.
4441 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4442 "beneath" as a method.
4443 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4444 Use "beneath" as a method.
4445
4446 2018-06-10 Tom Tromey <tom@tromey.com>
4447
4448 * tracefile.c (struct trace_file_writer_deleter): New.
4449 <operator()>: Rename from trace_file_writer_xfree.
4450 (trace_file_writer_up): New typedef.
4451 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4452
4453 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4454
4455 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4456 <m_registers, m_register_status>: Change type to
4457 std::unique_ptr.
4458 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4459 XCNEWVEC.
4460
4461 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4462
4463 * common/common-regcache.h (enum register_status): Add
4464 underlying type "signed char".
4465 * regcache.h (reg_buffer) <m_register_status>: Change type to
4466 register_status *.
4467 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4468 register_status instead of signed char.
4469 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4470 (reg_buffer::get_register_status): Remove cast.
4471 (readable_regcache::raw_read): Remove cast.
4472 (readable_regcache::cooked_read): Remove cast.
4473
4474 2018-06-09 Tom Tromey <tom@tromey.com>
4475
4476 * source.c (reverse_search_command, forward_search_command): Use
4477 scoped_fd.
4478
4479 2018-06-09 Tom Tromey <tom@tromey.com>
4480
4481 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4482 (serial_ops_list): Now static, std::vector.
4483 (serial_interface_lookup, serial_add_interface): Update.
4484
4485 2018-06-09 Tom Tromey <tom@tromey.com>
4486
4487 * dwarf2read.c (process_cu_includes): Update.
4488 (process_full_comp_unit): Update.
4489 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4490 std::vector.
4491
4492 2018-06-08 Paul Koning <paul_koning@dell.com>
4493
4494 PR gdb/23252
4495
4496 * python/python.c (do_start_initialization):
4497 Avoid call to internal Python API.
4498 (init__gdb_module): New function.
4499
4500 2018-06-08 Gary Benson <gbenson@redhat.com>
4501
4502 * linux-thread-db.c (valprint.h): New include.
4503 (struct check_thread_db_info): New structure.
4504 (check_thread_db_on_load, tdb_testinfo): New static globals.
4505 (check_thread_db, check_thread_db_callback): New functions.
4506 (try_thread_db_load_1): Run integrity checks if requested.
4507 (maintenance_check_libthread_db): New function.
4508 (_initialize_thread_db): Register "maint check libthread-db"
4509 and "maint set/show check-libthread-db".
4510 * NEWS: Mention the above new commands.
4511
4512 2018-06-08 Tom Tromey <tom@tromey.com>
4513
4514 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4515 now a method.
4516
4517 2018-06-08 Tom Tromey <tom@tromey.com>
4518
4519 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4520
4521 2018-06-08 Tom Tromey <tom@tromey.com>
4522
4523 * common/btrace-common.h (struct btrace_data): Add constructor,
4524 destructor, move assignment operator.
4525 <empty, clear, fini>: New methods.
4526 <format>: Initialize.
4527 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4528 (btrace_data_empty): Don't declare.
4529 * common/btrace-common.c (btrace_data_init): Remove.
4530 (btrace_data::fini): Rename from btrace_data_fini.
4531 (btrace_data::empty): Rename from btrace_data_empty.
4532 (btrace_data::clear): Rename from btrace_data_clear. Return
4533 bool.
4534 * btrace.h (make_cleanup_btrace_data): Don't declare.
4535 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4536 (parse_xml_btrace): Update.
4537 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4538 (maint_btrace_clear_packet_history_cmd): Update.
4539
4540 2018-06-07 Pedro Alves <palves@redhat.com>
4541
4542 * target.h (target_ops) <beneath>: Now a method. All references
4543 updated.
4544 (class target_stack): New.
4545 * target.c (g_target_stack): New.
4546 (g_current_top_target): Delete.
4547 (current_top_target): Get the top target out of g_target_stack.
4548 (target_stack::push, target_stack::unpush): New.
4549 (push_target, unpush_target): Reimplement.
4550 (target_is_pushed): Reimplement in terms of g_target_stack.
4551 (target_ops::beneath, target_stack::find_beneath): New.
4552
4553 2018-06-07 Pedro Alves <palves@redhat.com>
4554
4555 * target.h (find_target_beneath): Delete declaration.
4556 * target.c (find_target_beneath): Delete definition.
4557 * aix-thread.c: All callers of find_target_beneath adjusted to
4558 call target_ops::beneath instead.
4559 * bsd-uthread.c: Likewise.
4560 * linux-thread-db.c: Likewise.
4561 * ravenscar-thread.c: Likewise.
4562 * sol-thread.c: Likewise.
4563 * spu-multiarch.c: Likewise.
4564
4565 2018-06-07 Pedro Alves <palves@redhat.com>
4566
4567 * target.h (target_ops) <beneath>: Now a method. All references
4568 updated.
4569 (target_ops) <m_beneath>: New.
4570 * target.c (target_ops::beneath): New.
4571 * corelow.c: Adjust all references to target_ops::beneath.
4572 * linux-thread-db.c: Likewise.
4573 * make-target-delegates: Likewise.
4574 * record-btrace.c: Likewise.
4575 * record-full.c: Likewise.
4576 * remote.c: Likewise.
4577 * target.c: Likewise.
4578 * target-delegates.c: Regenerate.
4579
4580 2018-06-07 Pedro Alves <palves@redhat.com>
4581
4582 * target.h (target_stack): Delete.
4583 (current_top_target): Declare function.
4584 * target.c (target_stack): Delete.
4585 (g_current_top_target): New.
4586 (current_top_target): New function.
4587 * auxv.c: Use current_top_target instead of target_stack
4588 throughout.
4589 * avr-tdep.c: Likewise.
4590 * breakpoint.c: Likewise.
4591 * corefile.c: Likewise.
4592 * elfread.c: Likewise.
4593 * eval.c: Likewise.
4594 * exceptions.c: Likewise.
4595 * frame.c: Likewise.
4596 * gdbarch-selftests.c: Likewise.
4597 * gnu-v3-abi.c: Likewise.
4598 * ia64-tdep.c: Likewise.
4599 * ia64-vms-tdep.c: Likewise.
4600 * infcall.c: Likewise.
4601 * infcmd.c: Likewise.
4602 * infrun.c: Likewise.
4603 * linespec.c: Likewise.
4604 * linux-tdep.c: Likewise.
4605 * minsyms.c: Likewise.
4606 * ppc-linux-nat.c: Likewise.
4607 * ppc-linux-tdep.c: Likewise.
4608 * procfs.c: Likewise.
4609 * regcache.c: Likewise.
4610 * remote.c: Likewise.
4611 * rs6000-tdep.c: Likewise.
4612 * s390-linux-nat.c: Likewise.
4613 * s390-tdep.c: Likewise.
4614 * solib-aix.c: Likewise.
4615 * solib-darwin.c: Likewise.
4616 * solib-dsbt.c: Likewise.
4617 * solib-spu.c: Likewise.
4618 * solib-svr4.c: Likewise.
4619 * solib-target.c: Likewise.
4620 * sparc-tdep.c: Likewise.
4621 * sparc64-tdep.c: Likewise.
4622 * spu-tdep.c: Likewise.
4623 * symfile.c: Likewise.
4624 * symtab.c: Likewise.
4625 * target-descriptions.c: Likewise.
4626 * target-memory.c: Likewise.
4627 * target.c: Likewise.
4628 * target.h: Likewise.
4629 * tracefile-tfile.c: Likewise.
4630 * tracepoint.c: Likewise.
4631 * valops.c: Likewise.
4632 * valprint.c: Likewise.
4633 * value.c: Likewise.
4634 * windows-tdep.c: Likewise.
4635 * mi/mi-main.c: Likewise.
4636
4637 2018-06-07 Tom Tromey <tom@tromey.com>
4638
4639 * valprint.h (build_address_symbolic): Declare.
4640 * printcmd.c (print_address_symbolic): Update.
4641 (build_address_symbolic): Change "name" and "filename" to
4642 std::string.
4643 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4644 Update.
4645 * defs.h (build_address_symbolic): Remove declaration.
4646
4647 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4648
4649 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4650 (aarch64_vnv_type): Add function.
4651 (aarch64_pseudo_register_name): Add V regs for SVE.
4652 (aarch64_pseudo_register_type): Likewise.
4653 (aarch64_pseudo_register_reggroup_p): Likewise.
4654 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4655 (aarch64_pseudo_read_value): Add V regs for SVE.
4656 (aarch64_pseudo_write_2): Use V0 offset for SVE
4657 (aarch64_pseudo_write): Add V regs for SVE.
4658 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4659
4660 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4661
4662 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4663 (sve_vl_from_vq): Likewise.
4664
4665 2018-06-05 Tom Tromey <tom@tromey.com>
4666
4667 * cli/cli-cmds.c (show_version): Update.
4668 * top.c (print_gdb_version): Add "interactive" parameter.
4669 Update.
4670 * main.c (captured_main_1): Update.
4671 * top.h (print_gdb_version): Add "interactive" parameter and a
4672 comment.
4673
4674 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4675
4676 * common/enum-flags.h: Add trailing semicolon to example in
4677 comment.
4678
4679 2018-06-05 Tom Tromey <tom@tromey.com>
4680
4681 PR cli/12326:
4682 * NEWS: Add entry about pager.
4683 * utils.c (pagination_disabled_for_command): New global.
4684 (prompt_for_continue): Allow "c" response to prompt.
4685 (reinitialize_more_filter): Clear
4686 pagination_disabled_for_command.
4687 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4688
4689 2018-06-04 Tom Tromey <tom@tromey.com>
4690
4691 * ada-lang.h (ada_lookup_symbol_list): Update.
4692 * ada-lang.c (resolve_subexp): Update.
4693 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4694 parameter.
4695 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4696 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4697 results parameter to std::vector.
4698 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4699 Update.
4700 * ada-exp.y (block_lookup): Update.
4701 (select_possible_type_sym): Change type of syms. Remove nsyms
4702 parameter.
4703 (write_var_or_type, write_name_assoc): Update.
4704
4705 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4706
4707 * windows-nat.c (windows_nat_target::xfer_partial): Return
4708 TARGET_XFER_E_IO if we need to delegate to the target beneath
4709 but BENEATH is NULL.
4710
4711 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4712
4713 * Makefile.in (config.status): Add configure.nat as a
4714 dependency.
4715
4716 2018-06-04 Tom Tromey <tom@tromey.com>
4717
4718 * cp-name-parser.y (cpname_state): Add method declarations.
4719 (HANDLE_QUAL): Update.
4720 (cpname_state::d_grab, cpname_state::fill_comp)
4721 (cpname_state::make_operator, cpname_state::make_dtor)
4722 (cpname_state::make_builtin_type, cpname_state::make_name)
4723 (cpname_state::d_qualify, cpname_state::d_int_type)
4724 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4725 (%union): Move earlier.
4726
4727 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4728
4729 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4730
4731 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4732
4733 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4734 (aarch64_pseudo_write_1): Likewise.
4735 (aarch64_pseudo_read_value): Use helper.
4736 (aarch64_pseudo_write): Likewise.
4737
4738 2018-06-04 Pedro Alves <palves@redhat.com>
4739
4740 * darwin-nat.c (darwin_ops): Delete.
4741 (darwin_attach_pid): Use get_native_target.
4742
4743 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4744
4745 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4746 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4747
4748 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4749
4750 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4751 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4752 (aarch64_gdbarch_init): Check for SVE.
4753 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4754
4755 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4756
4757 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4758 * aarch64-tdep.h (aarch64_read_description): Likewise.
4759 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4760 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4761 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4762 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4763 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4764
4765 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4766
4767 * value.c (value_fetch_lazy_bitfield): New.
4768 (value_fetch_lazy_memory): New.
4769 (value_fetch_lazy_register): New.
4770 (value_fetch_lazy): Factor out to smaller functions.
4771
4772 2018-06-01 Tom Tromey <tom@tromey.com>
4773
4774 * cp-name-parser.y (backslashable, represented): Now const.
4775
4776 2018-06-01 Tom Tromey <tom@tromey.com>
4777
4778 * cp-name-parser.y: Include parser-defs.h.
4779 (parser_fprintf): Remove declaration.
4780
4781 2018-06-01 Tom Tromey <tom@tromey.com>
4782
4783 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4784 %parse-param.
4785 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4786 (global_result): Remove globals.
4787 (struct cpname_state): New.
4788 (yyparse): Don't declare.
4789 (yylex, yyerror): Move declarations after %union.
4790 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4791 (make_name): Add state parameter.
4792 Update all callers.
4793 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4794 parameter.
4795 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4796 Update.
4797 (yylex): Add lvalp, state parameters.
4798 (yyerror): Add state parameter.
4799 (cp_demangled_name_to_comp): Update.
4800
4801 2018-06-01 Tom Tromey <tom@tromey.com>
4802
4803 * cp-name-parser.y (parser_fprintf): Declare.
4804 (GDB_YY_REMAP_PREFIX): Define.
4805 Include yy-remap.h. Don't redefine yy* identifiers.
4806
4807 2018-06-01 Tom Tromey <tom@tromey.com>
4808
4809 * python/py-type.c (typy_legacy_template_argument): Update.
4810 * cp-support.h (cp_demangled_name_to_comp): Update.
4811 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4812 parameter to be a "std::string *".
4813 (main): Update.
4814
4815 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4816
4817 * ada-lex.l: Include "diagnostics.h" instead of
4818 "common/diagnostics.h".
4819 * unittests/environ-selftests.c: Likewise.
4820 * common/diagnostics.h: Moved to ../include.
4821
4822 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4823
4824 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4825 to language_mode_manual while calling breakpoint_re_set_one.
4826
4827 2018-06-01 Tom Tromey <tom@tromey.com>
4828
4829 * valops.c (value_cast_structs, destructor_name_p): Update.
4830 * symtab.c (gdb_mangle_name): Update.
4831 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4832 Update.
4833 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4834 (pascal_object_print_value_fields, pascal_object_print_value):
4835 Update.
4836 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4837 * linespec.c (find_methods): Update.
4838 * gdbtypes.h (type_name_no_tag): Remove.
4839 (type_name_or_error): Rename from type_name_no_tag_or_error.
4840 * gdbtypes.c (type_name_no_tag): Remove.
4841 (type_name_or_error): Rename from type_name_no_tag_or_error.
4842 (lookup_struct_elt_type, check_typedef): Update.
4843 * expprint.c (print_subexp_standard): Update.
4844 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4845 * d-namespace.c (d_lookup_nested_symbol): Update.
4846 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4847 (cp_print_class_member): Update.
4848 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4849 * completer.c (add_struct_fields): Update.
4850 * c-typeprint.c (cp_type_print_derivation_info)
4851 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4852 Update.
4853 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4854 (ada_prefer_type, ada_is_exception_sym): Update.
4855
4856 2018-06-01 Tom Tromey <tom@tromey.com>
4857
4858 * valops.c (enum_constant_from_type, value_namespace_elt)
4859 (value_maybe_namespace_elt): Update.
4860 * valarith.c (find_size_for_pointer_math): Update.
4861 * target-descriptions.c (make_gdb_type): Update.
4862 * symmisc.c (print_symbol): Update.
4863 * stabsread.c (define_symbol, read_type)
4864 (complain_about_struct_wipeout, add_undefined_type)
4865 (cleanup_undefined_types_1): Update.
4866 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4867 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4868 (rust_internal_print_type, rust_composite_type)
4869 (rust_evaluate_funcall, rust_evaluate_subexp)
4870 (rust_inclusive_range_type_p): Update.
4871 * python/py-type.c (typy_get_tag): Update.
4872 * p-typeprint.c (pascal_type_print_base): Update.
4873 * mdebugread.c (parse_symbol, parse_type): Update.
4874 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4875 Update.
4876 * guile/scm-type.c (gdbscm_type_tag): Update.
4877 * go-lang.c (sixg_string_p): Update.
4878 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4879 Update.
4880 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4881 (TYPE_TAG_NAME): Remove.
4882 * gdbtypes.c (type_name_no_tag): Simplify.
4883 (check_typedef, check_types_equal, recursive_dump_type)
4884 (copy_type_recursive, arch_composite_type): Update.
4885 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4886 in summary mode when needed.
4887 * eval.c (evaluate_funcall): Update.
4888 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4889 (process_structure_scope, read_enumeration_type)
4890 (read_namespace_type, read_module_type, determine_prefix): Update.
4891 * cp-support.c (inspect_type): Update.
4892 * coffread.c (process_coff_symbol, decode_base_type): Update.
4893 * c-varobj.c (c_is_path_expr_parent): Update.
4894 * c-typeprint.c (c_type_print_base_struct_union): Update.
4895 (c_type_print_base_1): Update. Print struct/class/union/enum in
4896 summary when using C language.
4897 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4898 (gen_maybe_namespace_elt): Update.
4899 * ada-lang.c (ada_type_name): Simplify.
4900 (empty_record, ada_template_to_fixed_record_type_1)
4901 (template_to_static_fixed_type)
4902 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4903
4904 2018-06-01 Tom Tromey <tom@tromey.com>
4905
4906 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4907 c_print_type.
4908 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4909 (c_print_type): Update.
4910 (c_print_type): New overload.
4911 (c_type_print_varspec_prefix, c_type_print_args)
4912 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4913 (c_type_print_base_struct_union, c_type_print_base_1)
4914 (cp_type_print_method_args): Add "language" parameter.
4915 (c_type_print_base): Update.
4916 * c-lang.h (c_print_type): Add new overload.
4917
4918 2018-06-01 Tom Tromey <tom@tromey.com>
4919
4920 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4921 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4922
4923 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4924
4925 * aarch64-tdep.c (aarch64_sve_register_names): New const
4926 var.
4927 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4928 (AARCH64_SVE_Z_REGS_NUM): New define.
4929 (AARCH64_SVE_P_REGS_NUM): Likewise.
4930 (AARCH64_SVE_NUM_REGS): Likewise.
4931
4932 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4933
4934 * nat/linux-ptrace.h [__alpha__]
4935 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4936 definitions.
4937
4938 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4939
4940 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4941 the endianness selected.
4942 * NEWS: Document `set endian auto' mode operation update.
4943
4944 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4945
4946 * Makefile.in: Add new header.
4947 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4948 (sve_vl_from_vg): Likewise.
4949 (sve_vq_from_vl): Likewise.
4950 (sve_vl_from_vq): Likewise.
4951 (sve_vq_from_vg): Likewise.
4952 (sve_vg_from_vq): Likewise.
4953 * configure.nat: Add new c file.
4954 * nat/aarch64-sve-linux-ptrace.c: New file.
4955 * nat/aarch64-sve-linux-ptrace.h: New file.
4956
4957 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4958
4959 * aarch64-linux-nat.c (aarch64_linux_read_description):
4960 Add parmeter zero.
4961 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4962 Likewise.
4963 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4964 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4965 (aarch64_gdbarch_init): Add parmeter zero.
4966 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4967 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4968 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4969 parmeter.
4970 * doc/gdb.texinfo: Describe SVE feature
4971 * features/aarch64-sve.c: New file.
4972
4973 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4974
4975 PR gdb/23210
4976 * gdbarch.sh (significant_addr_bit): Default to zero when
4977 not set by target architecture.
4978 * gdbarch.c: Re-generated.
4979 * utils.c (address_significant): Update.
4980
4981 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4982
4983 * stack.c (func_command): Remove trailing newline in call to error.
4984
4985 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4986
4987 * regcache.h (regcache_raw_collect): Remove, update callers to
4988 use regcache::raw_collect.
4989 * regcache.c (regcache_raw_collect): Remove.
4990
4991 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4992
4993 * regcache.h (regcache_raw_supply): Remove, update callers to
4994 use detached_regcache::raw_supply.
4995 * regcache.c (regcache_raw_supply): Remove.
4996
4997 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4998
4999 * regcache.h (regcache_cooked_write_part): Remove, update
5000 callers to use regcache::cooked_write_part.
5001 * regcache.c (regcache_cooked_write_part): Remove.
5002
5003 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5004
5005 * regcache.h (regcache_cooked_read_part): Remove, update callers
5006 to use readable_regcache::cooked_read_part.
5007 * regcache.c (regcache_cooked_read_part): Remove.
5008
5009 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5010
5011 * regcache.h (regcache_cooked_read_value): Remove, update
5012 callers to use readable_regcache::cooked_read_value.
5013 * regcache.c (regcache_cooked_read_value): Remove.
5014
5015 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5016
5017 * regcache.h (regcache_cooked_write): Remove, update callers to
5018 use regcache::cooked_write.
5019 * regcache.c (regcache_cooked_write): Remove.
5020
5021 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5022
5023 * regcache.h (regcache_invalidate): Remove, update callers to
5024 use detached_regcache::invalidate instead.
5025 * regcache.c (regcache_invalidate): Remove.
5026
5027 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5028
5029 * regcache.h (regcache_raw_write_part): Remove, update callers
5030 to use regcache::raw_write_part instead.
5031 * regcache.c (regcache_raw_write_part): Remove.
5032
5033 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5034
5035 * regcache.h (regcache_raw_read_part): Remove, update callers to
5036 use readable_regcache::raw_read_part instead.
5037 * regcache.c (regcache_raw_read_part): Remove.
5038
5039 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5040
5041 * regcache.h (regcache_cooked_read): Remove, update callers to
5042 use readable_regcache::cooked_read instead.
5043 * regcache.c (regcache_cooked_read): Remove.
5044
5045 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5046
5047 * regcache.h (regcache_raw_write): Remove, update callers to use
5048 regcache::raw_write instead.
5049 * regcache.c (regcache_raw_write): Remove.
5050
5051 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5052
5053 * regcache.h (regcache_raw_read): Remove, update callers to use
5054 readable_regcache::raw_read instead.
5055 * regcache.c (regcache_raw_read): Remove.
5056
5057 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5058
5059 * regcache.h (regcache_raw_update): Remove, update callers to
5060 use readable_regcache::raw_update instead.
5061 * regcache.c (regcache_raw_update): Remove.
5062
5063 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5064
5065 * regcache.h (regcache_register_status): Remove, update callers
5066 to use reg_buffer::get_register_status directly instead.
5067 * regcache.c (regcache_register_status): Remove.
5068
5069 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5070
5071 * regcache.h (regcache_get_ptid): Remove, update all callers to
5072 call regcache::ptid instead.
5073 * regcache.c (regcache_get_ptid): Remove.
5074
5075 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5076
5077 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5078
5079 2018-05-30 Pedro Alves <palves@redhat.com>
5080
5081 * common/common-exceptions.h (exception_rethrow): Use
5082 ATTRIBUTE_NORETURN.
5083
5084 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5085
5086 * breakpoint.c (print_solib_event, check_status_catch_solib):
5087 Remove struct keyword in range-based for loops.
5088 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5089 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5090 Likewise.
5091 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5092 Likewise.
5093 * symfile.c (addr_info_make_relative): Likewise.
5094 * thread.c (value_in_thread_stack_temporaries): Likewise.
5095
5096 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5097
5098 PR gdb/16841
5099 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5100 aggregate type to get its real type before accessing it.
5101
5102 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5103
5104 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5105 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5106 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5107 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5108 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5109 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5110 * printcmd.c (info_address_command): Likewise.
5111
5112 2018-05-29 Tom Tromey <tom@tromey.com>
5113
5114 * windows-nat.c (handle_exception): Update fall-through comment.
5115
5116 2018-05-29 Tom Tromey <tom@tromey.com>
5117
5118 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5119 (struct program_space) <added_solibs>: Now a std::vector.
5120 * breakpoint.c (print_solib_event): Update.
5121 (check_status_catch_solib): Update.
5122 * progspace.c (clear_program_space_solib_cache): Update.
5123 * solib.c (update_solib_list): Update.
5124
5125 2018-05-29 Tom Tromey <tom@tromey.com>
5126
5127 * python/py-type.c (typy_richcompare): Update.
5128 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5129 * gdbtypes.h (types_deeply_equal): Return bool.
5130 (types_equal): Likewise.
5131 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5132 declare VEC.
5133 (check_types_equal): Change worklist to std::vector. Return
5134 bool.
5135 (struct type_equality_entry): Add constructor.
5136 (compare_maybe_null_strings): Return bool.
5137 (check_types_worklist): Return bool. Change worklist to
5138 std::vector.
5139 (types_deeply_equal): Use std::vector.
5140 (types_equal): Return bool.
5141 (compare_maybe_null_strings): Simplify.
5142
5143 2018-05-29 Tom Tromey <tom@tromey.com>
5144
5145 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5146
5147 2018-05-29 Tom Tromey <tom@tromey.com>
5148
5149 * objc-lang.h: Don't include cp-support.h.
5150 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5151 declare VEC.
5152
5153 2018-05-27 Tom Tromey <tom@tromey.com>
5154
5155 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5156
5157 2018-05-25 Tom Tromey <tom@tromey.com>
5158
5159 * value.c (value::location): Initialize.
5160
5161 2018-05-25 Tom Tromey <tom@tromey.com>
5162
5163 * dbxread.c (init_bincl_list): Remove.
5164 (bincl_list): Now a std::vector.
5165 (bincls_allocated, next_bincl): Remove.
5166 (free_bincl_list, do_free_bincl_list_cleanup)
5167 (make_cleanup_free_bincl_list): Remove.
5168 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5169 unique_xmalloc_ptr.
5170 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5171 (struct header_file_location): Add constructor.
5172 (add_bincl_to_list): Remove.
5173
5174 2018-05-25 Tom Tromey <tom@tromey.com>
5175
5176 * tui/tui.c (tui_enable): Update.
5177 * mi/mi-interp.c (mi_interp::init): Update.
5178 * interps.h (class interp) <name>: New method.
5179 <m_name>: Rename from name.
5180 (~scoped_restore_interp): Update.
5181 * interps.c (interp::interp): Update.
5182 (interp_add, interp_set, interp_lookup_existing)
5183 (current_interp_named_p): Update.
5184
5185 2018-05-25 Tom Tromey <tom@tromey.com>
5186
5187 * interps.c (interp_name): Remove.
5188 * mi/mi-interp.c (mi_interp::init): Update.
5189 * interps.h (interp_name): Remove.
5190 (~scoped_restore_interp): Update.
5191 * tui/tui.c (tui_enable): Update.
5192
5193 2018-05-25 Tom Tromey <tom@tromey.com>
5194
5195 * utils.c (fputs_maybe_filtered): Update.
5196 * linespec.c (decode_line_full): Update.
5197 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5198 (mi_print_breakpoint_for_event, mi_solib_loaded)
5199 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5200 (mi_user_selected_context_changed): Update.
5201 * mi/mi-main.c (mi_execute_command): Update.
5202 * cli/cli-script.c (execute_control_command): Update.
5203 * python/python.c (execute_gdb_command): Update.
5204 * solib.c (info_sharedlibrary_command): Update.
5205 * interps.c (interp_ui_out): Remove.
5206 * interps.h (interp_ui_out): Remove.
5207
5208 2018-05-25 Tom Tromey <tom@tromey.com>
5209
5210 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5211 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5212 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5213
5214 2018-05-25 Tom Tromey <tom@tromey.com>
5215
5216 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5217 * interps.c (interp_exec): Use scoped_restore.
5218
5219 2018-05-25 Tom Tromey <tom@tromey.com>
5220
5221 * remote.c (remote_target::remote_file_get): Use
5222 gdb::byte_vector.
5223 (remote_target::remote_file_put): Likewise.
5224
5225 2018-05-25 Tom Tromey <tom@tromey.com>
5226
5227 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5228 a std::string.
5229 (get_pe_section_index, add_pe_exported_sym): Update.
5230 (read_pe_exported_syms): Use gdb::def_vector.
5231
5232 2018-05-25 Tom Tromey <tom@tromey.com>
5233
5234 * frame.c (remove_prev_frame): Remove.
5235 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5236
5237 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5238
5239 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5240 Remove prototypes.
5241 * mips-linux-nat.c (supply_fpregset): Always call
5242 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5243 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5244 `mips_fill_fpregset'.
5245 * mips-linux-tdep.c (mips_supply_fpregset)
5246 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5247 (mips_fill_fpregset_wrapper): Remove functions.
5248 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5249 (mips_linux_fpregset): Remove variable.
5250 (mips_linux_iterate_over_regset_sections): Use
5251 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5252 (mips_linux_o32_sigframe_init): Remove comment.
5253
5254 2018-05-25 Pedro Alves <palves@redhat.com>
5255
5256 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5257 (struct readahead_cache, struct packet_reg, struct
5258 remote_arch_state, class remote_state): Move higher up in the
5259 file.
5260 (remote_target::m_remote_state): Now an object instead of a pointer.
5261 (remote_target::get_remote_state): Adjust.
5262
5263 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5264
5265 * stack.c (select_and_print_frame): Delete.
5266 (struct function_bounds): Move struct within function.
5267 (func_command): Most content moved into new function
5268 find_frame_for_function, use new function, print result, add
5269 function comment.
5270 (find_frame_for_function): New function, now returns a result.
5271
5272 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5273
5274 * stack.c (iterate_over_block_arg_vars): Fix comment.
5275 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5276
5277 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5278
5279 PR gdb/23203
5280 * frame.c
5281 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5282 Define.
5283 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5284 Define.
5285 * frame.h (class scoped_restore_selected_frame): New class.
5286 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5287 of any exception, use scoped_restore_selected_frame to restore the
5288 frame instead.
5289
5290 2018-05-24 Pedro Alves <palves@redhat.com>
5291
5292 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5293 override.
5294
5295 2018-05-23 Tom Tromey <tom@tromey.com>
5296
5297 * complaints.c (struct complaints): Remove.
5298 (symfile_complaint_book): Remove.
5299 (series): New global.
5300 (complaint_internal): Update.
5301 (clear_complaints): Update.
5302
5303 2018-05-23 Tom Tromey <tom@tromey.com>
5304
5305 * complaints.c (counters): New global.
5306 (struct complain): Remove.
5307 (struct complaints) <root>: Remove.
5308 (complaint_sentinel): Remove.
5309 (symfile_complaint_book): Update.
5310 (find_complaint) Remove.
5311 (complaint_internal, clear_complaints): Update.
5312
5313 2018-05-23 Tom Tromey <tom@tromey.com>
5314
5315 * complaints.c (struct complain) <file, line>: Remove.
5316 (find_complaint): Remove file, line parameters.
5317 (complaint_internal): Update.
5318
5319 2018-05-23 Tom Tromey <tom@tromey.com>
5320
5321 * complaints.c (vcomplaint): Remove.
5322 (complaint_internal) Merge in contents of vcomplaint.
5323
5324 2018-05-23 Tom Tromey <tom@tromey.com>
5325
5326 * complaints.c (struct complaints) <explanation>: Remove.
5327 (symfile_explanations): Remove.
5328 (symfile_complaint_book): Update.
5329 (vcomplaint): Update.
5330 (struct explanation): Remove.
5331
5332 2018-05-23 Tom Tromey <tom@tromey.com>
5333
5334 * complaints.c (symfile_complaints): Remove.
5335 (complaint_internal): Remove "complaints" parameter.
5336 (clear_complaints, vcomplaint): Remove "c" parameter.
5337 (get_complaints): Remove.
5338 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5339 (dwarf2_debug_line_missing_file_complaint)
5340 (dwarf2_debug_line_missing_end_sequence_complaint)
5341 (dwarf2_complex_location_expr_complaint)
5342 (dwarf2_const_value_length_mismatch_complaint)
5343 (dwarf2_section_buffer_overflow_complaint)
5344 (dwarf2_macro_malformed_definition_complaint)
5345 (dwarf2_invalid_attrib_class_complaint)
5346 (create_addrmap_from_index, dw2_symtab_iter_next)
5347 (dw2_expand_marked_cus)
5348 (dw2_debug_names_iterator::find_vec_in_debug_names)
5349 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5350 (create_debug_type_hash_table, init_cutu_and_read_dies)
5351 (partial_die_parent_scope, add_partial_enumeration)
5352 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5353 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5354 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5355 (create_cus_hash_table, create_dwp_hash_table)
5356 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5357 (dwarf2_rnglists_process, dwarf2_ranges_process)
5358 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5359 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5360 (handle_struct_member_die, process_structure_scope)
5361 (read_array_type, read_common_block, read_module_type)
5362 (read_tag_pointer_type, read_typedef, read_base_type)
5363 (read_subrange_type, load_partial_dies, partial_die_info::read)
5364 (partial_die_info::read, partial_die_info::read)
5365 (partial_die_info::read, read_checked_initial_length_and_offset)
5366 (dwarf2_string_attr, read_formatted_entries)
5367 (dwarf_decode_line_header)
5368 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5369 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5370 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5371 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5372 (get_signatured_type, get_DW_AT_signature_type)
5373 (decode_locdesc, file_file_name, consume_improper_spaces)
5374 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5375 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5376 (dwarf2_symbol_mark_computed, set_die_type)
5377 (read_attribute_value): Update.
5378 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5379 Update.
5380 * dbxread.c (unknown_symtype_complaint)
5381 (lbrac_mismatch_complaint, repeated_header_complaint)
5382 (set_namestring, function_outside_compilation_unit_complaint)
5383 (read_dbx_symtab, process_one_symbol): Update.
5384 * gdbtypes.c (stub_noname_complaint): Update.
5385 * windows-nat.c (handle_unload_dll): Update.
5386 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5387 (decode_base_type): Update.
5388 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5389 (eb_complaint, record_include_begin, record_include_end)
5390 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5391 (process_xcoff_symbol, read_symbol)
5392 (function_outside_compilation_unit_complaint)
5393 (scan_xcoff_symtab): Update.
5394 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5395 * buildsym.c (finish_block_internal, make_blockvector)
5396 (end_symtab_get_static_block, augment_type_symtab): Update.
5397 * dtrace-probe.c (dtrace_process_dof)
5398 (dtrace_static_probe_ops::get_probes): Update.
5399 * complaints.h (struct complaint): Don't declare.
5400 (symfile_complaints): Remove.
5401 (complaint_internal): Remove "complaints" parameter.
5402 (complaint): Likewise.
5403 (clear_complaints): Likewise.
5404 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5405 (reread_symbols): Update.
5406 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5407 (dwarf2_frame_cache, decode_frame_entry): Update.
5408 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5409 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5410 (info_selectors_command): Update.
5411 * macrotab.c (macro_include, check_for_redefinition)
5412 (macro_undef): Update.
5413 * objfiles.c (filter_overlapping_sections): Update.
5414 * stabsread.c (invalid_cpp_abbrev_complaint)
5415 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5416 (define_symbol, error_type, read_type, rs6000_builtin_type)
5417 (stabs_method_name_from_physname, read_member_functions)
5418 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5419 (attach_fields_to_type, complain_about_struct_wipeout)
5420 (read_range_type, read_args, common_block_start)
5421 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5422 Update.
5423 * mdebugread.c (index_complaint, unknown_ext_complaint)
5424 (basic_type_complaint, bad_tag_guess_complaint)
5425 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5426 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5427 (parse_procedure, parse_lines)
5428 (function_outside_compilation_unit_complaint)
5429 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5430 (bad_tag_guess_complaint, reg_value_complaint): Update.
5431 * cp-support.c (demangled_name_complaint): Update.
5432 * macroscope.c (sal_macro_scope): Update.
5433 * dwarf-index-write.c (class debug_names): Update.
5434
5435 2018-05-23 Tom Tromey <tom@tromey.com>
5436
5437 * complaints.c (clear_complaints): Remove "noisy" parameter.
5438 * complaints.h (clear_complaints): Update.
5439 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5440 (reread_symbols): Update.
5441
5442 2018-05-23 Tom Tromey <tom@tromey.com>
5443
5444 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5445 SUBSEQUENT_MESSAGE.
5446 (vcomplaint, clear_complaints): Update.
5447 (symfile_explanations): Remove some messages.
5448
5449 2018-05-23 Tom Tromey <tom@tromey.com>
5450
5451 * complaints.c (internal_complaint): Remove.
5452 * complaints.h (internal_complaint): Remove.
5453
5454 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5455
5456 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5457
5458 2018-05-22 Pedro Alves <palves@redhat.com>
5459
5460 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5461 (remote_fileio_badfd, remote_fileio_return_errno)
5462 (remote_fileio_return_success, remote_fileio_func_open)
5463 (remote_fileio_func_open, remote_fileio_func_close)
5464 (remote_fileio_func_read, remote_fileio_func_write)
5465 (remote_fileio_func_lseek, remote_fileio_func_rename)
5466 (remote_fileio_func_unlink, remote_fileio_func_stat)
5467 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5468 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5469 remote_target parameter.
5470 (remote_fio_func_map) <func>: Add remote_target parameter.
5471 (do_remote_fileio_request, remote_fileio_request):
5472 * remote-fileio.h (remote_fileio_request):
5473 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5474 remote_target parameter.
5475 (remote_notif_process, handle_notification): Adjust to pass down
5476 the remote.
5477 (remote_notif_state_allocate): Add remote_target parameter. Save
5478 it.
5479 * remote-notif.h (struct remote_target): Forward declare.
5480 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5481 remote_target parameter.
5482 (struct remote_notif_state) <remote>: New field.
5483 (remote_notif_ack, remote_notif_parse): Add remote_target
5484 parameter.
5485 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5486 remote_target parameter.
5487 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5488 (threads_listing_context, rmt_thread_action, protocol_feature)
5489 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5490 (packet_result, struct threads_listing_context, remote_state):
5491 Move definitions and declarations higher up.
5492 (remote_target) <~remote_target>: Declare.
5493 (remote_download_command_source, remote_file_put, remote_file_get)
5494 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5495 (remote_hostio_pread_vFile, remote_hostio_send_command)
5496 (remote_hostio_set_filesystem, remote_hostio_open)
5497 (remote_hostio_close, remote_hostio_unlink, remote_state)
5498 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5499 (get_memory_write_packet_size, get_memory_read_packet_size)
5500 (append_pending_thread_resumptions, remote_detach_1)
5501 (append_resumption, remote_resume_with_vcont)
5502 (add_current_inferior_and_thread, wait_ns, wait_as)
5503 (process_stop_reply, remote_notice_new_inferior)
5504 (process_initial_stop_replies, remote_add_thread)
5505 (btrace_sync_conf, remote_btrace_maybe_reopen)
5506 (remove_new_fork_children, kill_new_fork_children)
5507 (discard_pending_stop_replies, stop_reply_queue_length)
5508 (check_pending_events_prevent_wildcard_vcont)
5509 (discard_pending_stop_replies_in_queue, stop_reply)
5510 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5511 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5512 (remote_interrupt_as, remote_interrupt_ns)
5513 (remote_get_noisy_reply, remote_query_attached)
5514 (remote_add_inferior, remote_current_thread, get_current_thread)
5515 (set_thread, set_general_thread, set_continue_thread)
5516 (set_general_process, write_ptid)
5517 (remote_unpack_thread_info_response, remote_get_threadinfo)
5518 (parse_threadlist_response, remote_get_threadlist)
5519 (remote_threadlist_iterator, remote_get_threads_with_ql)
5520 (remote_get_threads_with_qxfer)
5521 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5522 (get_offsets, remote_check_symbols, remote_supported_packet)
5523 (remote_query_supported, remote_packet_size)
5524 (remote_serial_quit_handler, remote_detach_pid)
5525 (remote_vcont_probe, remote_resume_with_hc)
5526 (send_interrupt_sequence, interrupt_query)
5527 (remote_notif_get_pending_events, fetch_register_using_p)
5528 (send_g_packet, process_g_packet, fetch_registers_using_g)
5529 (store_register_using_P, store_registers_using_G)
5530 (set_remote_traceframe, check_binary_download)
5531 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5532 (remote_xfer_live_readonly_partial, remote_read_bytes)
5533 (remote_send_printf, remote_flash_write, readchar)
5534 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5535 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5536 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5537 (extended_remote_disable_randomization, extended_remote_run)
5538 (send_environment_packet, extended_remote_environment_support)
5539 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5540 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5541 (packet_command): Now methods of ...
5542 (remote_target): ... this class.
5543 (m_remote_state) <remote_target>: New field.
5544 (struct remote_state) <stop_reply_queue,
5545 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5546 fields.
5547 (remote_state::remote_state): Allocate stop_reply_queue.
5548 (remote_state): Delete global.
5549 (get_remote_state_raw): Delete.
5550 (remote_target::get_remote_state): Allocate m_remote_state on
5551 demand.
5552 (get_current_remote_target): New.
5553 (remote_ops, extended_remote_ops): Delete.
5554 (wait_forever_enabled_p, remote_async_inferior_event_token):
5555 Delete, moved to struct remote_state.
5556 (remote_target::close): Delete self. Destruction bits split to
5557 ...
5558 (remote_target::~remote_target): ... this.
5559 (show_memory_packet_size): Adjust to use
5560 get_current_remote_target.
5561 (struct protocol_feature) <func>: Add remote_target parameter.
5562 All callers adjusted.
5563 (curr_quit_handler_target): New.
5564 (remote_serial_quit_handler): Reimplement.
5565 (remote_target::open_1): Adjust to use get_current_remote_target.
5566 Heap-allocate remote_target/extended_remote_target instances.
5567 (vcont_builder::vcont_builder): Add remote_target parameter, and
5568 save it in m_remote. All callers adjusted.
5569 (vcont_builder::m_remote): New field.
5570 (vcont_builder::restart, vcont_builder::flush)
5571 (vcont_builder::push_action): Use it.
5572 (remote_target::commit_resume): Use it.
5573 (struct queue_iter_param) <remote>: New field.
5574 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5575 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5576 (check_pending_event_prevents_wildcard_vcont_callback)
5577 (remote_target::check_pending_events_prevent_wildcard_vcont)
5578 (remote_target::discard_pending_stop_replies)
5579 (remote_target::discard_pending_stop_replies_in_queue)
5580 (remote_target::remote_notif_remove_queued_reply): Fill in
5581 'remote' field.
5582 (remote_notif_get_pending_events): New.
5583 (remote_target::readchar, remote_target::remote_serial_write):
5584 Save/restore curr_quit_handler_target.
5585 (putpkt): New.
5586 (kill_new_fork_children): Fill in 'remote' field.
5587 (packet_command): Use get_current_remote_target, defer to
5588 remote_target method of same name.
5589 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5590 parameter, and save it in m_remote. All callers adjusted.
5591 (scoped_remote_fd::release): Use m_remote.
5592 (scoped_remote_fd::m_remote): New field.
5593 (remote_file_put, remote_file_get, remote_file_delete): Use
5594 get_current_remote_target, defer to remote_target method of same
5595 name.
5596 (remote_btrace_reset): Add remote_state paremeter. Update all
5597 callers.
5598 (remote_async_inferior_event_handler). Pass down 'data'.
5599 (remote_new_objfile): Use get_current_remote_target.
5600 (remote_target::vcont_r_supported): New.
5601 (set_range_stepping): Use get_current_remote_target and
5602 remote_target::vcont_r_supported.
5603 (_initialize_remote): Don't allocate 'remote_state' and
5604 'stop_reply_queue' globals.
5605 * remote.h (struct remote_target): Forward declare.
5606 (getpkt, putpkt, remote_notif_get_pending_events): Add
5607 'remote_target' parameter.
5608
5609 2018-05-22 Pedro Alves <palves@redhat.com>
5610
5611 * remote.c (vcont_builder): Now a class. Make all data members
5612 private.
5613 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5614 Declare methods.
5615 (vcont_builder_restart): Rename to ...
5616 (vcont_builder::restart): ... this.
5617 (vcont_builder_flush): Rename to ...
5618 (vcont_builder::flush): ... this.
5619 (vcont_builder_push_action): Rename to ...
5620 (vcont_builder::push_action): ... this.
5621 (remote_target::commit_resume): Adjust.
5622
5623 2018-05-22 Pedro Alves <palves@redhat.com>
5624
5625 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5626 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5627 (get_fixed_memory_packet_size): New.
5628 (get_memory_packet_size): Use it.
5629 (set_memory_packet_size): Don't override the config size with
5630 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5631 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5632 Don't refer to get_memory_packet_size if not connected to a remote
5633 target. Show "(default)" if configured size is 0.
5634
5635 2018-05-22 Pedro Alves <palves@redhat.com>
5636
5637 * remote.c (remote_target::mourn_inferior): Move
5638 discard_pending_stop_replies call here from ...
5639 (_initialize_remote): ... here.
5640
5641 2018-05-22 Pedro Alves <palves@redhat.com>
5642
5643 * remote.c (compare_section_command): Remove set_general_process
5644 call.
5645
5646 2018-05-22 Pedro Alves <palves@redhat.com>
5647
5648 * remote.c (struct packet_reg, struct remote_arch_state):
5649 Move higher up in the file.
5650 (remote_state) <m_arch_states>: Store remote_arch_state values
5651 instead of remote_arch_state pointers.
5652 (remote_state::get_remote_arch_state): Adjust.
5653
5654 2018-05-22 Pedro Alves <palves@redhat.com>
5655
5656 * remote.c: Include <unordered_map>.
5657 (remote_state): Now a class.
5658 (remote_state) <get_remote_arch_state>: Declare method.
5659 <get_remote_arch_state>: New field.
5660 (remote_arch_state) <remote_arch_state>: Declare ctor.
5661 <regs>: Now a unique_ptr.
5662 (remote_gdbarch_data_handle): Delete.
5663 (get_remote_arch_state): Delete.
5664 (remote_state::get_remote_arch_state): New.
5665 (get_remote_state): Adjust to call remote_state's
5666 get_remote_arch_state method.
5667 (init_remote_state): Delete, bits factored out to ...
5668 (remote_arch_state::remote_arch_state): ... this new method.
5669 (get_remote_packet_size, get_memory_packet_size)
5670 (process_g_packet, remote_target::fetch_registers)
5671 (remote_target::prepare_to_store, store_registers_using_G)
5672 (remote_target::store_registers, remote_target::get_trace_status):
5673 Adjust to call remote_state's method.
5674 (_initialize_remote): Remove reference to
5675 remote_gdbarch_data_handle.
5676
5677 2018-05-22 Pedro Alves <palves@redhat.com>
5678
5679 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5680 pread>: New method declarations.
5681 (remote_target::open_1): Adjust.
5682 (readahead_cache_invalidate): Rename to ...
5683 (readahead_cache::invalidate): ... this, and adjust to be a class
5684 method.
5685 (readahead_cache_invalidate_fd): Rename to ...
5686 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5687 class method.
5688 (remote_hostio_pwrite): Adjust.
5689 (remote_hostio_pread_from_cache): Rename to ...
5690 (readahead_cache::pread): ... this, and adjust to be a class
5691 method.
5692 (remote_hostio_close): Adjust.
5693
5694 2018-05-22 Pedro Alves <palves@redhat.com>
5695
5696 * remote.c (remote_hostio_close_cleanup): Delete.
5697 (class scoped_remote_fd): New.
5698 (remote_file_put, remote_file_get): Use it.
5699
5700 2018-05-22 Pedro Alves <palves@redhat.com>
5701
5702 (struct vCont_action_support): Use bool and initialize all fields.
5703 (struct readahead_cache): Initialize all fields.
5704 (remote_state): Use bool and initialize all fields.
5705 (remote_state::remote_state, remote_state::~remote_state): New.
5706 (new_remote_state): Delete.
5707 (_initialize_remote): Use new to allocate remote_state.
5708
5709 2018-05-22 Pedro Alves <palves@redhat.com>
5710 張俊芝 <zjz@zjz.name>
5711
5712 PR gdb/22973
5713 * c-exp.y: Include "c-support.h".
5714 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5715 of tolower. Use c_ident_is_alpha to scan names.
5716 * c-lang.c: Include "c-support.h".
5717 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5718 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5719 * c-support.h: New file, with bits factored out from ...
5720 * cp-name-parser.y: ... this file.
5721 Include "c-support.h".
5722 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5723 c-support.h and renamed.
5724 (symbol_end, yylex): Adjust.
5725
5726 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5727
5728 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5729 parameter type to CORE_ADDR.
5730 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5731 parameter type in declaration to CORE_ADDR.
5732 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5733 target_auxv_search to get AT_HWCAP and use the result to get the
5734 target description.
5735 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5736 to CORE_ADDR. Remove the cast of the return value to unsigned
5737 long. Fix error predicate of target_auxv_search.
5738 (ppc_linux_nat_target::read_description): Change the type of the
5739 hwcap variable to CORE_ADDR.
5740
5741 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5742
5743 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5744 if the size of fpscr is larger than 32 bits.
5745
5746 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5747
5748 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5749 (ppc32_linux_vsxregmap): New global.
5750 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5751 regcache_supply_regset, and regcache_collect_regset.
5752 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5753 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5754 (fetch_vsx_register, store_vsx_register): Remove.
5755 (fetch_vsx_registers): Add regno parameter. Get regset using
5756 ppc_linux_vsxregset. Use regset to supply registers.
5757 (store_vsx_registers): Add regno parameter. Get regset using
5758 ppc_linux_vsxregset. Use regset to collect registers.
5759 (fetch_register): Call fetch_vsx_registers instead of
5760 fetch_vsx_register.
5761 (store_register): Call store_vsx_registers instead of
5762 store_vsx_register.
5763 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5764 new regno parameter.
5765 (store_ppc_registers): Call store_vsx_registers with -1 for the
5766 new regno parameter.
5767 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5768 (ppc_collect_vsxregset): Remove.
5769
5770 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5771
5772 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5773 offset fields.
5774 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5775 for vector register offset fields.
5776 (ppc64_fbsd_reg_offsets): Likewise.
5777 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5778 to vector register offset fields.
5779 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5780 to vector register offset fields.
5781 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5782 vector register offset fields.
5783 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5784 initializers for vector register offset fields.
5785 (rs6000_aix64_reg_offsets): Likewise.
5786 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5787 (ppc_supply_vrregset): Remove.
5788 (ppc_collect_vrregset): Remove.
5789 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5790 (ppc_linux_vrregset) : New function.
5791 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5792 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5793 (ppc32_linux_vrregset): Remove.
5794 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5795 and use result instead of ppc32_linux_vrregset.
5796 (ppc32_linux_reg_offsets): Remove initializers for vector register
5797 offset fields.
5798 (ppc64_linux_reg_offsets): Likewise.
5799 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5800 * ppc-linux-nat.c: Include regset.h.
5801 (gdb_vrregset_t): Adjust comment to account for little-endian
5802 mode.
5803 (supply_vrregset, fill_vrregset): Remove.
5804 (fetch_altivec_register, store_altivec_register): Remove.
5805 (fetch_altivec_registers): Add regno parameter. Get regset using
5806 ppc_linux_vrregset. Use regset to supply registers.
5807 (store_altivec_registers): Add regno parameter. Get regset using
5808 ppc_linux_vrregset. Use regset to collect registers.
5809 (fetch_register): Call fetch_altivec_registers instead of
5810 fetch_altivec_register.
5811 (store_register): Call store_altivec_registers instead of
5812 store_altivec_register.
5813 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5814 the new regno parameter.
5815 (store_ppc_registers): Call store_altivec_registers with -1 for
5816 the new regno parameter.
5817
5818 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5819
5820 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5821 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5822 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5823 (gdb_vrregset_t): Change array type size to
5824 PPC_LINUX_SIZEOF_VRREGSET.
5825 (gdb_vsxregset_t): Change array type size to
5826 PPC_LINUX_SIZEOF_VSXREGSET.
5827 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5828 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5829 PPC_LINUX_SIZEOF_VSXREGSET.
5830
5831 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5832
5833 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5834 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5835 nat/ppc-linux.c.
5836 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5837 ppc_linux_target_wordsize with tid.
5838 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5839 wordsize with tid.
5840 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5841 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5842 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5843 tid parameter. Remove static specifier.
5844 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5845 (ppc_linux_target_wordsize): New declaration.
5846
5847 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5848
5849 * arch/ppc-linux-common.c: New file.
5850 * arch/ppc-linux-common.h: New file.
5851 * arch/ppc-linux-tdesc.h: New file.
5852 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5853 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5854 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5855 arch/ppc-linux-tdesc.h.
5856 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5857 arch/ppc-linux-tdesc.h.
5858 (ppc_linux_nat_target::read_description): Remove target
5859 description matching code. Fill a ppc_linux_features struct and
5860 call ppc_linux_match_description with it. Move comment about ISA
5861 2.05 to ppc-linux-common.c.
5862 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5863 arch/ppc-linux-tdesc.h.
5864 (ppc_linux_core_read_description): Remove target description
5865 matching code. Fill a ppc_linux_features struct and call
5866 ppc_linux_match_description with it.
5867 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5868 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5869 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5870 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5871 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5872 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5873 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5874 (tdesc_powerpc_e500l): Remove.
5875
5876 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5877
5878 * ada-lang.c (catch_assert_command): Pass empty string instead
5879 of NULL for excep_string argument.
5880
5881 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5882
5883 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5884 the width of the requested register exceeds the width of the
5885 `ptrace' data type.
5886
5887 2018-05-21 Tom Tromey <tom@tromey.com>
5888
5889 * printcmd.c (output_command): Remove.
5890 (output_command_const): Rename to output_command.
5891 * valprint.h (output_command): Rename from output_command_const.
5892 * tracepoint.c (trace_dump_actions): Call output_command.
5893
5894 2018-05-21 Tom Tromey <tom@tromey.com>
5895
5896 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5897 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5898 * ada-lang.h (create_ada_exception_catchpoint): Update.
5899 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5900 std::string.
5901 (create_excep_cond_exprs, ~ada_catchpoint)
5902 (should_stop_exception, print_one_exception)
5903 (print_mention_exception, print_recreate_exception): Update.
5904 (ada_get_next_arg): Remove.
5905 (catch_ada_exception_command_split): Use std::string. Change type
5906 of "excep_string", "cond_string".
5907 (catch_ada_exception_command): Update.
5908 (create_ada_exception_catchpoint): Change type of excep_string.
5909 (ada_exception_sal): Remove excep_string parameter.
5910 (~ada_catchpoint): Remove.
5911
5912 2018-05-21 Tom Tromey <tom@tromey.com>
5913
5914 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5915 cleanup.
5916
5917 2018-05-21 Tom Tromey <tom@tromey.com>
5918
5919 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5920 Return unique_xmalloc_ptr.
5921 (print_it_exception): Update.
5922
5923 2018-05-21 Tom Tromey <tom@tromey.com>
5924
5925 * tracepoint.c (trace_dump_actions): Use std::string.
5926
5927 2018-05-21 Tom Tromey <tom@tromey.com>
5928
5929 * symfile.c (reread_symbols): Use std::string for original_name.
5930
5931 2018-05-21 Tom Tromey <tom@tromey.com>
5932
5933 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5934 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5935 constructor.
5936
5937 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5938
5939 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5940 instance to...
5941 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5942 * objfiles.c (get_objfile_bfd_data): Allocate
5943 objfile_per_bfd_storage with obstack_new when allocating on
5944 obstack.
5945
5946 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5947
5948 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5949 OBSTACK_ZALLOC.
5950 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5951 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5952 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5953 (add_pending): Likewise.
5954 (parse_symbol): Likewise.
5955 (parse_partial_symbols): Likewise.
5956 (psymtab_to_symtab_1): Likewise.
5957 (new_psymtab): Likewise.
5958 (elfmdebug_build_psymtabs): Likewise.
5959 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5960 * objfiles.c (get_objfile_bfd_data): Likewise.
5961 (objfile_register_static_link): Likewise.
5962 * psymtab.c (allocate_psymtab): Likewise.
5963 * stabsread.c (read_member_functions): Likewise.
5964 * xcoffread.c (xcoff_end_psymtab): Likewise.
5965
5966 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5967
5968 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5969 compiler supports std::is_trivially_constructible.
5970 * common/poison.h: Include obstack.h.
5971 (IsMallocable): Define to is_trivially_constructible if the
5972 compiler supports it, define to true_type otherwise.
5973 (xobnew): New.
5974 (XOBNEW): Redefine.
5975 (xobnewvec): New.
5976 (XOBNEWVEC): Redefine.
5977 * gdb_obstack.h (obstack_zalloc): New.
5978 (OBSTACK_ZALLOC): Redefine.
5979 (obstack_calloc): New.
5980 (OBSTACK_CALLOC): Redefine.
5981 (obstack_new): New.
5982 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5983 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5984 gdbarch.c.
5985 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5986 obstack_calloc/obstack_zalloc.
5987 (gdbarch_obstack_zalloc): Remove.
5988 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5989
5990 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5991
5992 * stack.c (backtrace_command_1): Remove useless variable int i.
5993
5994 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5995
5996 * stack.c (print_frame_info): Fix comment.
5997
5998 2018-05-18 Tom Tromey <tom@tromey.com>
5999
6000 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6001 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6002 (~dwarf2_per_objfile): Update
6003 (dwarf2_get_dwz_file): Use new.
6004 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6005 unique_ptr.
6006
6007 2018-05-18 Tom Tromey <tom@tromey.com>
6008
6009 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6010 unique_ptr.
6011 * dwarf2read.c (struct dwp_file): Add constructor and
6012 initializers.
6013 (open_and_init_dwp_file): Return a unique_ptr.
6014 (dwarf2_per_objfile, create_dwp_hash_table)
6015 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6016 (lookup_dwo_unit_in_dwp): Update.
6017 (open_and_init_dwp_file, get_dwp_file): Update.
6018
6019 2018-05-18 Tom Tromey <tom@tromey.com>
6020
6021 * dwarf2read.c (dwarf2_per_objfile): Update.
6022 (struct mapped_index): Add initializers.
6023 (dwarf2_read_index): Use new.
6024 (dw2_symtab_iter_init): Update.
6025 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6026 unique_ptr.
6027
6028 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6029
6030 * dwarf2read.c (mapped_index) <total_size>: Remove.
6031
6032 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6033
6034 * unittests/format_pieces-selftests.c (test_format_specifier):
6035 Add ARI comments.
6036
6037 2018-05-18 Tom Tromey <tom@tromey.com>
6038
6039 * c-typeprint.c (maybe_print_hole): New function.
6040 (c_print_type_struct_field_offset): Update.
6041 (c_type_print_base_struct_union): Call maybe_print_hole.
6042
6043 2018-05-17 Keith Seitz <keiths@redhat.com>
6044
6045 * breakpoint.c (build_bpstat_chain): New function, moved from
6046 bpstat_stop_status.
6047 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6048 If no stop chain is passed, call build_bpstat_chain to build it.
6049 * breakpoint.h (build_bpstat_chain): Declare.
6050 (bpstat_stop_status): Move documentation here from breakpoint.c.
6051 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6052 build the stop chain and pass it to skip_inline_frames.
6053 Pass this stop chain to bpstat_stop_status.
6054 * inline-frame.c: Include breakpoint.h.
6055 (stopped_by_user_bp_inline_frame): New function.
6056 (skip_inline_frames): Add parameter `stop_chain'.
6057 Move documention to inline-frame.h.
6058 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6059 whether the frame should be elided.
6060 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6061 Add moved documentation and update for new parameter.
6062
6063 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6064
6065 PR cli/14975
6066 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6067 unittests/format_pieces-selftests.c.
6068 * common/format.h (format_piece) <operator==>: New.
6069 (format_pieces) <operator[]>: Remove.
6070 * common/format.c (format_pieces::format_pieces): Handle \e.
6071 * unittests/format_pieces-selftests.c: New.
6072
6073 2018-05-17 Tom Tromey <tom@tromey.com>
6074
6075 PR symtab/23010:
6076 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6077 (dw2_instantiate_symtab): Add skip_partial parameter.
6078 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6079 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6080 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6081 (dw2_expand_symtabs_matching_one)
6082 (dw2_find_pc_sect_compunit_symtab)
6083 (dw2_debug_names_lookup_symbol)
6084 (dw2_debug_names_expand_symtabs_for_function): Update.
6085 (init_cutu_and_read_dies): Add skip_partial parameter.
6086 (process_psymtab_comp_unit, build_type_psymtabs_1)
6087 (process_skeletonless_type_unit, load_partial_comp_unit)
6088 (psymtab_to_symtab_1): Update.
6089 (load_full_comp_unit): Add skip_partial parameter.
6090 (process_imported_unit_die, dwarf2_read_addr_index)
6091 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6092 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6093 (read_signatured_type): Update.
6094
6095 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6096
6097 * value.c (release_value): Remove unused variable.
6098 (record_latest_value): Likewise.
6099 (access_value_history): Likewise.
6100 (preserve_values): Likewise.
6101
6102 2018-05-17 Tom Tromey <tom@tromey.com>
6103
6104 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6105 Initialize.
6106
6107 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6108
6109 PR gdb/22286
6110 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6111 Also handle registers whose width is not a multiple of
6112 PTRACE_TYPE_RET.
6113 (linux_nat_trad_target::store_register): Likewise.
6114
6115 2018-05-16 Tom Tromey <tom@tromey.com>
6116
6117 * gdbcore.h (core_bfd): Redefine.
6118 * corelow.c (core_target::close): Update.
6119 (core_target_open): Update.
6120 * progspace.h (struct program_space) <cbfd>: Now a
6121 gdb_bfd_ref_ptr.
6122
6123 2018-05-16 Tom Tromey <tom@tromey.com>
6124
6125 PR cli/19551:
6126 * symfile-add-flags.h (enum symfile_add_flags)
6127 <SYMFILE_NOT_FILENAME>: New constant.
6128 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6129 objfile name from BFD.
6130 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6131 * minidebug.c (find_separate_debug_file_in_section): Put
6132 ".gnu_debugdata" into BFD's file name.
6133
6134 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6135
6136 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6137 Remove.
6138
6139 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6140
6141 PR binutils/21446
6142 * aarch64-tdep.c (aarch64_analyze_prologue,
6143 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6144 Indicate not interested in errors.
6145
6146 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6147
6148 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6149 Supply the MIPS_ZERO_REGNUM register.
6150
6151 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6152
6153 * mips-tdep.c (mask_address_var): Make variable static.
6154
6155 2018-05-14 Tom Tromey <tom@tromey.com>
6156
6157 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6158
6159 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6160
6161 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6162 FXSAVE_ADDR for the mxcsr register.
6163
6164 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6165
6166 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6167
6168 2018-05-11 Pedro Alves <palves@redhat.com>
6169
6170 * corelow.c (core_target) <core_target>: No longer inline.
6171 Initialize m_core_gdbarch, m_core_vec and build the section table
6172 here.
6173 <~core_target>: New.
6174 <core_gdbarch, get_core_register_section>: New methods.
6175 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6176 factored out from ...
6177 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6178 (core_ops): Delete.
6179 (sniff_core_bfd): Add gdbarch parameter.
6180 (core_close): Delete, merged into ...
6181 (core_target::close): ... here. Delete self.
6182 (core_close_cleanup): Delete.
6183 (core_target_open): Allocate a core_target on the heap. Use a
6184 unique_ptr instead of a cleanup. Bits moved into the core_target
6185 ctor. Adjust to use core_target methods instead of globals.
6186 (get_core_register_section): Rename to ...
6187 (core_target::get_core_register_section): ... this and adjust.
6188 (struct get_core_registers_cb_data): New.
6189 (get_core_registers_cb): Use it. Use bool.
6190 (core_target::fetch_registers, core_target::files_info)
6191 (core_target::xfer_partial, core_target::read_description)
6192 (core_target::pid_to, core_target::thread_name): Adjust to
6193 reference class fields instead of globals.
6194 * target.h (struct target_ops_deleter, target_ops_up): New.
6195
6196 2018-05-11 Pedro Alves <palves@redhat.com>
6197
6198 * corefile.c (core_file_command): Move to corelow.c.
6199 * corelow.c (the_core_target): Delete.
6200 (core_file_command): Moved from corefile.c. Check exec_bfd
6201 instead of the_core_target. Use target_detach instead of calling
6202 into the_core_target directly.
6203 (maybe_say_no_core_file_now): New.
6204 (core_target::detach): Use it.
6205 (_initialize_corelow): Remove references to the_core_target.
6206 * gdbcore.h (the_core_target): Delete.
6207
6208 2018-05-11 Tom Tromey <tromey@redhat.com>
6209 Pedro Alves <palves@redhat.com>
6210
6211 * corefile.c (core_bfd): Remove.
6212 * gdbcore.h (core_bfd): Now a macro.
6213 * progspace.h (struct program_space) <cbfd>: New field.
6214
6215 2018-05-11 Tom Tromey <tom@tromey.com>
6216
6217 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6218 gdb::def_vector.
6219
6220 2018-05-10 Tom Tromey <tom@tromey.com>
6221
6222 * configure: Rebuild.
6223 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6224
6225 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6226
6227 PR server/23158:
6228 * regformats/regdat.sh: Adjust script, following the addition
6229 of the new expedite_regs parameter to init_target_desc.
6230
6231 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6232
6233 PR gdb/23127
6234 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6235 set_gdbarch_significant_addr_bit.
6236 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6237 set_gdbarch_significant_addr_bit.
6238 * utils.c (address_significant): Update to sign extend addr.
6239
6240 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6241
6242 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6243 (xtensa_linux_init_abi): Limit tdep->num_regs by
6244 tdep->num_nopriv_regs.
6245 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6246 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6247 not initialized.
6248
6249 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6250
6251 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6252
6253 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6254
6255 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6256 (I387_MXCSR_INIT_VAL): New constant.
6257 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6258 buffer if it was supplied by the inferior.
6259 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6260 (i387_xsave_get_clear_bv): New function.
6261 (i387_supply_xsave): Only read x87 control registers from the
6262 xsave buffer if the feature is enabled, and the state will have
6263 been written, otherwise, provide a suitable default.
6264 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6265 including x87 control registers. Update control registers if they
6266 have changed from the default value, and mark features as enabled
6267 as required.
6268 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6269
6270 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6271
6272 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6273
6274 2018-05-07 Tom Tromey <tom@tromey.com>
6275
6276 * configure: Rebuild.
6277 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6278
6279 2018-05-07 Tom Tromey <tom@tromey.com>
6280
6281 PR tdep/20362:
6282 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6283 bit. Use correct value for VDIV.
6284
6285 2018-05-04 Tom Tromey <tom@tromey.com>
6286
6287 * configure: Rebuild.
6288 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6289
6290 2018-05-04 Tom Tromey <tom@tromey.com>
6291
6292 * linux-record.c (record_linux_system_call) <case
6293 RECORD_SYS_RECVFROM>: Add "break".
6294
6295 2018-05-04 Tom Tromey <tom@tromey.com>
6296
6297 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6298 Add missing "break".
6299 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6300 Add missing "break".
6301
6302 2018-05-04 Tom Tromey <tom@tromey.com>
6303
6304 * rs6000-tdep.c (ppc_process_record_op4)
6305 (ppc_process_record_op63): Add fall-through comment.
6306
6307 2018-05-04 Tom Tromey <tom@tromey.com>
6308
6309 * i386-tdep.c (i386_process_record): Add fall-through comment.
6310
6311 2018-05-04 Tom Tromey <tom@tromey.com>
6312
6313 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6314 comment.
6315
6316 2018-05-04 Tom Tromey <tom@tromey.com>
6317
6318 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6319 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6320 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6321 comment.
6322 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6323 comment.
6324 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6325 comment.
6326
6327 2018-05-04 Tom Tromey <tom@tromey.com>
6328
6329 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6330
6331 2018-05-04 Tom Tromey <tom@tromey.com>
6332
6333 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6334 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6335 * symfile.c (section_is_mapped): Fix fall-through comment.
6336 * stabsread.c (define_symbol, read_member_functions): Fix
6337 fall-through comment.
6338 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6339 comment.
6340 * remote.c (remote_wait_as): Fix fall-through comment.
6341 * p-exp.y (yylex): Fix fall-through comment.
6342 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6343 comment.
6344 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6345 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6346 * jv-exp.y (yylex): Fix fall-through comment.
6347 * go-exp.y (lex_one_token): Fix fall-through comment.
6348 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6349 fall-through comment.
6350 * f-exp.y (yylex): Fix fall-through comment.
6351 * dwarf2read.c (process_die): Fix fall-through comments.
6352 * dbxread.c (process_one_symbol): Fix fall-through comment.
6353 * d-exp.y (lex_one_token): Fix fall-through comment.
6354 * cp-name-parser.y (yylex): Fix fall-through comment.
6355 * coffread.c (coff_symtab_read): Fix fall-through comment.
6356 * c-exp.y (lex_one_token): Fix fall-through comment.
6357 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6358 comment.
6359 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6360 comment.
6361
6362 2018-05-04 Tom Tromey <tom@tromey.com>
6363
6364 PR python/22730:
6365 * NEWS: Mention gdb.execute change.
6366 * gdbcmd.h (execute_control_command): Don't declare.
6367 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6368 execute_control_commands, execute_control_commands_to_string.
6369 * cli/cli-script.h (execute_control_commands)
6370 (execute_control_commands_to_string): Declare.
6371 (execute_control_command): Add from_tty parameter.
6372 * cli/cli-script.c (execute_control_commands)
6373 (execute_control_commands_to_string): New functions.
6374 (execute_user_command): Use execute_control_commands.
6375 (execute_control_command_1): Add "from_tty" parameter. Update.
6376 (execute_control_command): Likewise.
6377
6378 2018-05-04 Tom Tromey <tom@tromey.com>
6379
6380 PR python/22731:
6381 * NEWS: Mention that breakpoint commands are writable.
6382 * python/py-breakpoint.c (bppy_set_commands): New function.
6383 (breakpoint_object_getset) <"commands">: Use it.
6384
6385 2018-05-04 Tom Tromey <tom@tromey.com>
6386
6387 * tracepoint.c (actions_command): Update.
6388 * mi/mi-cmd-break.c (mi_command_line_array)
6389 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6390 (mi_read_next_line): Remove.
6391 (mi_cmd_break_commands): Update.
6392 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6393 function_view.
6394 * cli/cli-script.c (get_command_line): Update.
6395 (process_next_line): Use function_view. Constify.
6396 (recurse_read_control_structure, read_command_lines)
6397 (read_command_lines_1): Change argument types to function_view.
6398 (do_define_command, document_command): Update.
6399 * breakpoint.h (check_tracepoint_command): Don't declare.
6400 * breakpoint.c (check_tracepoint_command): Remove.
6401 (commands_command_1, create_tracepoint_from_upload): Update.
6402
6403 2018-05-04 Tom Tromey <tom@tromey.com>
6404
6405 PR gdb/11750:
6406 * cli/cli-script.h (enum command_control_type) <define_control>:
6407 New constant.
6408 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6409 (build_command_line, execute_control_command_1)
6410 (process_next_line): Likewise.
6411 (do_define_command): New function, extracted from define_command.
6412 (define_command): Use it.
6413
6414 2018-05-04 Tom Tromey <tom@tromey.com>
6415
6416 * tracepoint.c (actions_command): Update.
6417 * cli/cli-script.h (read_command_lines): Update.
6418 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6419 (MAX_TMPBUF): Remove define.
6420 (define_command): Use string_printf.
6421 (document_command): Likewise.
6422 * breakpoint.c (commands_command_1): Update.
6423
6424 2018-05-04 Tom Tromey <tom@tromey.com>
6425
6426 * top.c (execute_command): Update.
6427 * cli/cli-script.h (print_command_lines): Now varargs.
6428 * cli/cli-script.c (print_command_lines): Now varargs.
6429 (execute_control_command_1) <case while_control, case if_control>:
6430 Update.
6431
6432 2018-05-04 Tom Tromey <tom@tromey.com>
6433
6434 * tracepoint.c (all_tracepoint_actions): Rename from
6435 all_tracepoint_actions_and_cleanup. Change return type.
6436 (actions_command, encode_actions_1, encode_actions)
6437 (trace_dump_actions, tdump_command): Update.
6438 * remote.c (remote_download_command_source): Update.
6439 * python/python.c (gdbpy_eval_from_control_command)
6440 (python_command, python_interactive_command): Update.
6441 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6442 * guile/guile.c (guile_command)
6443 (gdbscm_eval_from_control_command, guile_command): Update.
6444 * compile/compile.c (compile_code_command)
6445 (compile_print_command, compile_to_object): Update.
6446 * cli/cli-script.h (struct command_lines_deleter): New.
6447 (counted_command_line): New typedef.
6448 (struct command_line): Add constructor, destructor.
6449 <body_list>: Remove.
6450 <body_list_0, body_list_1>: New members.
6451 (command_line_up): Remove typedef.
6452 (read_command_lines, read_command_lines_1, get_command_line):
6453 Update.
6454 (copy_command_lines): Don't declare.
6455 * cli/cli-script.c (build_command_line): Use "new".
6456 (get_command_line): Return counted_command_line.
6457 (print_command_lines, execute_user_command)
6458 (execute_control_command_1, while_command, if_command): Update.
6459 (realloc_body_list): Remove.
6460 (process_next_line, recurse_read_control_structure): Update.
6461 (read_command_lines, read_command_lines_1): Return counted_command_line.
6462 (free_command_lines): Use "delete".
6463 (copy_command_lines): Remove.
6464 (define_command, document_command, show_user_1): Update.
6465 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6466 a counted_command_line.
6467 * breakpoint.h (counted_command_line): Remove typedef.
6468 (breakpoint_set_commands): Update.
6469 * breakpoint.c (check_no_tracepoint_commands)
6470 (validate_commands_for_breakpoint): Update.
6471 (breakpoint_set_commands): Change commands to be a
6472 counted_command_line.
6473 (commands_command_1, update_dprintf_command_list)
6474 (create_tracepoint_from_upload): Update.
6475
6476 2018-05-04 Tom Tromey <tom@tromey.com>
6477
6478 * cli/cli-decode.h (cmd_list_element): New constructor.
6479 (~cmd_list_element): New destructor.
6480 (struct cmd_list_element): Add initializers.
6481 * cli/cli-decode.c (do_add_cmd): Use "new".
6482 (delete_cmd): Use "delete".
6483
6484 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6485 Pedro Alves <palves@redhat.com>
6486
6487 PR breakpoints/19806 and support for PR external/20207.
6488 * NEWS: Mention Aarch64 watchpoint improvements.
6489 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6490 watchpoints and PR external/20207 watchpoints.
6491 * nat/aarch64-linux-hw-point.c
6492 (kernel_supports_any_contiguous_range): New.
6493 (aarch64_watchpoint_offset): New.
6494 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6495 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6496 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6497 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6498 next_addr_orig_p. Support PR external/20207 watchpoints.
6499 (aarch64_downgrade_regs): New.
6500 (aarch64_dr_state_insert_one_point): New parameters offset and
6501 addr_orig.
6502 (aarch64_dr_state_remove_one_point): Likewise.
6503 (aarch64_handle_breakpoint): Update caller.
6504 (aarch64_handle_aligned_watchpoint): Likewise.
6505 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6506 aligned_offset.
6507 (aarch64_linux_set_debug_regs): Remove const from state. Call
6508 aarch64_downgrade_regs.
6509 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6510 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6511 (DR_CONTROL_MASK): ... this.
6512 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6513 (unsigned int aarch64_watchpoint_offset): New prototype.
6514 (aarch64_linux_set_debug_regs): Remove const from state.
6515 * utils.c (align_up, align_down): Move to ...
6516 * common/common-utils.c (align_up, align_down): ... here.
6517 * utils.h (align_up, align_down): Move to ...
6518 * common/common-utils.h (align_up, align_down): ... here.
6519
6520 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6521
6522 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6523 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6524 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6525 Re-implement to match the ABI as summarized in GCC's
6526 gcc/config/sparc/sparc.c. All callers updated.
6527 (sparc32_store_arguments): Remove assertion.
6528
6529 2018-05-04 Tom Tromey <tom@tromey.com>
6530
6531 * printcmd.c: Don't include tui.h.
6532 (decode_format): Use skip_spaces.
6533
6534 2018-05-04 Tom Tromey <tom@tromey.com>
6535
6536 PR gdb/22619:
6537 * printcmd.c (last_count): New global.
6538 (x_command): Use saved count when repeating.
6539
6540 2018-05-04 Tom Tromey <tom@tromey.com>
6541
6542 * nto-procfs.c (do_closedir_cleanup): Remove.
6543 (procfs_pidlist): Use gdb_dir_up.
6544 * procfs.c (do_closedir_cleanup): Remove.
6545 (proc_update_threads): Use gdb_dir_up.
6546 * common/filestuff.h (struct gdb_dir_deleter): New.
6547 (gdb_dir_up): New typedef.
6548
6549 2018-05-04 Tom Tromey <tom@tromey.com>
6550
6551 * ada-lang.c (print_mention_exception): Use std::string.
6552
6553 2018-05-04 Tom Tromey <tom@tromey.com>
6554
6555 * ada-lang.c (create_excep_cond_exprs): Update.
6556 (ada_exception_catchpoint_cond_string): Use std::string.
6557
6558 2018-05-04 Tom Tromey <tom@tromey.com>
6559
6560 * ada-lang.c (xget_renaming_scope): Return std::string.
6561 (old_renaming_is_invisible): Update.
6562
6563 2018-05-04 Tom Tromey <tom@tromey.com>
6564
6565 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6566 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6567
6568 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6569
6570 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6571
6572 2018-05-04 Tom Tromey <tom@tromey.com>
6573
6574 * remote.c (remote_query_supported_append): Change type.
6575 (remote_check_symbols): Update.
6576
6577 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6578
6579 PR gdb/11420
6580 * configure.ac: Prepend libpython.
6581 * python/python-config.py: Likewise.
6582 * configure: Regenerate.
6583
6584 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6585
6586 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6587
6588 2018-05-03 Pedro Alves <palves@redhat.com>
6589
6590 * s390-linux-nat.c
6591 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6592 override. Write 'true' instead of '1'.
6593 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6594 declaration.
6595
6596 2018-05-02 Pedro Alves <palves@redhat.com>
6597
6598 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6599 add_inf_child_target.
6600 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6601 add_inf_child_target.
6602 * aix-thread.c (aix_thread_target_info): New.
6603 (aix_thread_target) <shortname, longname, doc>: Delete.
6604 <info>: New.
6605 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6606 add_inf_child_target.
6607 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6608 add_inf_child_target.
6609 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6610 add_inf_child_target.
6611 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6612 add_inf_child_target.
6613 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6614 add_inf_child_target.
6615 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6616 add_inf_child_target.
6617 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6618 add_inf_child_target.
6619 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6620 add_inf_child_target.
6621 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6622 add_inf_child_target.
6623 * bfd-target.c (target_bfd_target_info): New.
6624 (target_bfd) <shortname, longname, doc>: Delete.
6625 <info>: New.
6626 * bsd-kvm.c (bsd_kvm_target_info): New.
6627 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6628 <info>: New.
6629 (bsd_kvm_target::open): Rename to ...
6630 (bsd_kvm_target_open): ... this. Adjust.
6631 * bsd-uthread.c (bsd_uthread_target_info): New.
6632 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6633 <info>: New.
6634 * corefile.c (core_file_command): Adjust.
6635 * corelow.c (core_target_info): New.
6636 (core_target) <shortname, longname, doc>: Delete.
6637 <info>: New.
6638 (core_target::open): Rename to ...
6639 (core_target_open): ... this. Adjust.
6640 * ctf.c (ctf_target_info): New.
6641 (ctf_target) <shortname, longname, doc>: Delete.
6642 <info>: New.
6643 (ctf_target::open): Rename to ...
6644 (ctf_target_open): ... this.
6645 (_initialize_ctf): Adjust.
6646 * exec.c (exec_target_info): New.
6647 (exec_target) <shortname, longname, doc>: Delete.
6648 <info>: New.
6649 (exec_target::open): Rename to ...
6650 (exec_target_open): ... this.
6651 * gdbcore.h (core_target_open): Declare.
6652 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6653 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6654 add_inf_child_target.
6655 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6656 add_inf_child_target.
6657 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6658 add_inf_child_target.
6659 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6660 add_inf_child_target.
6661 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6662 add_inf_child_target.
6663 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6664 add_inf_child_target.
6665 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6666 add_inf_child_target.
6667 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6668 add_inf_child_target.
6669 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6670 add_inf_child_target.
6671 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6672 add_inf_child_target.
6673 * inf-child.c (inf_child_target_info): New.
6674 (inf_child_target::info): New.
6675 (inf_child_open_target): Remove 'target' parameter. Use
6676 get_native_target instead.
6677 (inf_child_target::open): Delete.
6678 (add_inf_child_target): New.
6679 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6680 Delete.
6681 <info>: New.
6682 (add_inf_child_target): Declare.
6683 (inf_child_open_target): Declare.
6684 * linux-thread-db.c (thread_db_target_info): New.
6685 (thread_db_target) <shortname, longname, doc>: Delete.
6686 <info>: New.
6687 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6688 add_inf_child_target.
6689 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6690 add_inf_child_target.
6691 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6692 add_inf_child_target.
6693 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6694 add_inf_child_target.
6695 * make-target-delegates (print_class): Adjust.
6696 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6697 add_inf_child_target.
6698 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6699 add_inf_child_target.
6700 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6701 add_inf_child_target.
6702 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6703 add_inf_child_target.
6704 * nto-procfs.c (nto_native_target_info): New.
6705 (nto_procfs_target_native) <shortname, longname, doc>:
6706 Delete.
6707 <info>: New.
6708 (nto_procfs_target_info): New.
6709 (nto_procfs_target_procfs) <shortname, longname, doc>:
6710 Delete.
6711 <info>: New.
6712 (init_procfs_targets): Adjust.
6713 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6714 add_inf_child_target.
6715 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6716 add_inf_child_target.
6717 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6718 add_inf_child_target.
6719 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6720 add_inf_child_target.
6721 * ravenscar-thread.c (ravenscar_target_info): New.
6722 (ravenscar_thread_target) <shortname, longname, doc>:
6723 Delete.
6724 <info>: New.
6725 * record-btrace.c (record_btrace_target_info):
6726 (record_btrace_target) <shortname, longname, doc>: Delete.
6727 <info>: New.
6728 (record_btrace_target::open): Rename to ...
6729 (record_btrace_target_open): ... this. Adjust.
6730 * record-full.c (record_longname, record_doc): New.
6731 (record_full_base_target) <shortname, longname, doc>: Delete.
6732 <info>: New.
6733 (record_full_target_info): New.
6734 (record_full_target): <shortname>: Delete.
6735 <info>: New.
6736 (record_full_core_open_1, record_full_open_1): Update comments.
6737 (record_full_base_target::open): Rename to ...
6738 (record_full_open): ... this.
6739 (cmd_record_full_restore): Update.
6740 (_initialize_record_full): Update.
6741 * remote-sim.c (remote_sim_target_info): New.
6742 (gdbsim_target) <shortname, longname, doc>: Delete.
6743 <info>: New.
6744 (gdbsim_target::open): Rename to ...
6745 (gdbsim_target_open): ... this.
6746 (_initialize_remote_sim): Adjust.
6747 * remote.c (remote_doc): New.
6748 (remote_target_info): New.
6749 (remote_target) <shortname, longname, doc>: Delete.
6750 <info>: New.
6751 (extended_remote_target_info): New.
6752 (extended_remote_target) <shortname, longname, doc>: Delete.
6753 <info>: New.
6754 (remote_target::open_1): Make static. Adjust.
6755 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6756 * s390-linux-nat.c (_initialize_s390_nat): Use
6757 add_inf_child_target.
6758 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6759 add_inf_child_target.
6760 * sol-thread.c (thread_db_target_info): New.
6761 (sol_thread_target) <shortname, longname, doc>: Delete.
6762 <info>: New.
6763 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6764 add_inf_child_target.
6765 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6766 add_inf_child_target.
6767 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6768 add_inf_child_target.
6769 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6770 add_inf_child_target.
6771 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6772 add_inf_child_target.
6773 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6774 add_inf_child_target.
6775 * spu-linux-nat.c (_initialize_spu_nat): Use
6776 add_inf_child_target.
6777 * spu-multiarch.c (spu_multiarch_target_info): New.
6778 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6779 <info>: New.
6780 * target-delegates.c: Regenerate.
6781 * target.c: Include <unordered_map>.
6782 (target_ops_p): Delete.
6783 (DEF_VEC_P(target_ops_p)): Delete.
6784 (target_factories): New.
6785 (test_target_info): New.
6786 (test_target_ops::info): New.
6787 (open_target): Adjust to use target_factories.
6788 (add_target_with_completer): Rename to ...
6789 (add_target): ... this. Change prototype. Register target_info
6790 and open callback in target_factories. Register target_info in
6791 command context instead of target_ops.
6792 (add_target): Delete old implementation.
6793 (add_deprecated_target_alias): Change prototype. Adjust.
6794 (the_native_target): New.
6795 (set_native_target, get_native_target): New.
6796 (find_default_run_target): Use the_native_target.
6797 (find_attach_target, find_run_target): Simplify.
6798 (target_ops::open): Delete.
6799 (dummy_target_info): New.
6800 (dummy_target::shortname, dummy_target::longname)
6801 (dummy_target::doc): Delete.
6802 (dummy_target::info): New.
6803 (debug_target::shortname, debug_target::longname)
6804 (debug_target::doc): Delete.
6805 (debug_target::info): New.
6806 * target.h (struct target_info): New.
6807 (target_ops::~target_ops): Add comment.
6808 (target_ops::info): New.
6809 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6810 longer virtual. Implement in terms of target_info.
6811 (set_native_target, get_native_target): Declare.
6812 (target_open_ftype): New.
6813 (add_target, add_target_with_completer)
6814 (add_deprecated_target_alias): Change prototype.
6815 (test_target) <shortname, longname, doc>: Delete.
6816 <info>: New.
6817 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6818 add_inf_child_target.
6819 * tracefile-tfile.c (tfile_target_info): New.
6820 (tfile_target) <shortname, longname, doc>: Delete.
6821 <info>: New.
6822 (tfile_target::open): Rename to ...
6823 (tfile_target_open): ... this.
6824 (_initialize_tracefile_tfile): Adjust.
6825 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6826 add_inf_child_target.
6827 * windows-nat.c (_initialize_windows_nat): Use
6828 add_inf_child_target.
6829 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6830 add_inf_child_target.
6831
6832 2018-05-02 Pedro Alves <palves@redhat.com>
6833
6834 * linux-nat.h (linux_nat_target) <low_new_thread,
6835 low_delete_thread, low_new_fork, low_forget_process,
6836 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6837 New virtual methods.
6838 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6839 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6840 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6841 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6842 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6843 Delete.
6844 * linux-fork.c (delete_fork): Adjust to call low method.
6845 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6846 (linux_nat_new_fork, linux_nat_forget_process_hook)
6847 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6848 (linux_nat_status_is_event):
6849 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6850 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6851 to call low method.
6852 (sigtrap_is_event): Rename to ...
6853 (linux_nat_target::low_status_is_event): ... this.
6854 (linux_nat_set_status_is_event): Delete.
6855 (save_stop_reason, linux_nat_wait_1)
6856 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6857 low methods.
6858 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6859 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6860 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6861 (linux_nat_set_prepare_to_resume): Delete.
6862 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6863 low virtual methods.
6864 * amd64-linux-nat.c: Likewise.
6865 * arm-linux-nat.c: Likewise.
6866 * i386-linux-nat.c: Likewise.
6867 * ia64-linux-nat.c: Likewise.
6868 * mips-linux-nat.c: Likewise.
6869 * ppc-linux-nat.c: Likewise.
6870 * s390-linux-nat.c: Likewise.
6871 * sparc64-linux-nat.c: Likewise.
6872 * x86-linux-nat.c: Likewise.
6873 * x86-linux-nat.h: Include "nat/x86-linux.h".
6874 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6875 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6876 Override methods.
6877
6878 2018-05-02 Pedro Alves <palves@redhat.com>
6879
6880 * target.h (target_ops)
6881 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6882 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6883 stopped_by_watchpoint, have_continuable_watchpoint,
6884 stopped_data_address, watchpoint_addr_within_range,
6885 can_accel_watchpoint_condition, can_run, thread_alive,
6886 has_all_memory, has_memory, has_stack, has_registers,
6887 has_execution, can_async_p, is_async_p, supports_non_stop,
6888 always_non_stop_p, can_execute_reverse, supports_multi_process,
6889 supports_enable_disable_tracepoint,
6890 supports_disable_randomization, supports_string_tracing,
6891 supports_evaluation_of_breakpoint_conditions,
6892 can_run_breakpoint_commands, filesystem_is_local,
6893 can_download_tracepoint, get_trace_state_variable_value,
6894 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6895 record_is_replaying, record_will_replay,
6896 augmented_libraries_svr4_read>: Adjust to return bool.
6897 * aarch64-linux-nat.c: All implementations adjusted.
6898 * aix-thread.c: All implementations adjusted.
6899 * arm-linux-nat.c: All implementations adjusted.
6900 * breakpoint.c: All implementations adjusted.
6901 * bsd-kvm.c: All implementations adjusted.
6902 * bsd-uthread.c: All implementations adjusted.
6903 * corelow.c: All implementations adjusted.
6904 * ctf.c: All implementations adjusted.
6905 * darwin-nat.c: All implementations adjusted.
6906 * darwin-nat.h: All implementations adjusted.
6907 * exec.c: All implementations adjusted.
6908 * fbsd-nat.c: All implementations adjusted.
6909 * fbsd-nat.h: All implementations adjusted.
6910 * gnu-nat.c: All implementations adjusted.
6911 * gnu-nat.h: All implementations adjusted.
6912 * go32-nat.c: All implementations adjusted.
6913 * ia64-linux-nat.c: All implementations adjusted.
6914 * inf-child.c: All implementations adjusted.
6915 * inf-child.h: All implementations adjusted.
6916 * inf-ptrace.c: All implementations adjusted.
6917 * inf-ptrace.h: All implementations adjusted.
6918 * linux-nat.c: All implementations adjusted.
6919 * linux-nat.h: All implementations adjusted.
6920 * mips-linux-nat.c: All implementations adjusted.
6921 * nto-procfs.c: All implementations adjusted.
6922 * ppc-linux-nat.c: All implementations adjusted.
6923 * procfs.c: All implementations adjusted.
6924 * ravenscar-thread.c: All implementations adjusted.
6925 * record-btrace.c: All implementations adjusted.
6926 * record-full.c: All implementations adjusted.
6927 * remote-sim.c: All implementations adjusted.
6928 * remote.c: All implementations adjusted.
6929 * s390-linux-nat.c: All implementations adjusted.
6930 * sol-thread.c: All implementations adjusted.
6931 * spu-multiarch.c: All implementations adjusted.
6932 * target-delegates.c: All implementations adjusted.
6933 * target.c: All implementations adjusted.
6934 * target.h: All implementations adjusted.
6935 * tracefile-tfile.c: All implementations adjusted.
6936 * tracefile.c: All implementations adjusted.
6937 * tracefile.h: All implementations adjusted.
6938 * windows-nat.c: All implementations adjusted.
6939 * x86-linux-nat.h: All implementations adjusted.
6940 * x86-nat.h: All implementations adjusted.
6941
6942 2018-05-02 Pedro Alves <palves@redhat.com>
6943
6944 * make-target-delegates (scan_target_h): Don't trim lines here.
6945 Replace sequences of tabs and/or whitespace with a single
6946 whitespace.
6947 (top level, parsing methods): Trim each line before processing it
6948 here.
6949
6950 2018-05-02 Pedro Alves <palves@redhat.com>
6951 John Baldwin <jhb@freebsd.org>
6952
6953 * target.h (enum strata) <debug_stratum>: New.
6954 (struct target_ops) <all delegation methods>: Replace by C++
6955 virtual methods, and drop "to_" prefix. All references updated
6956 throughout.
6957 <to_shortname, to_longname, to_doc, to_data,
6958 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6959 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6960 virtual methods. All references updated throughout.
6961 <can_attach, supports_terminal_ours, can_create_inferior,
6962 get_thread_control_capabilities, attach_no_wait>: New
6963 virtual methods.
6964 <insert_breakpoint, remove_breakpoint>: Now
6965 TARGET_DEFAULT_NORETURN methods.
6966 <info_proc>: Now returns bool.
6967 <to_magic>: Delete.
6968 (OPS_MAGIC): Delete.
6969 (current_target): Delete. All references replaced by references
6970 to ...
6971 (target_stack): ... this. New.
6972 (target_shortname, target_longname): Adjust.
6973 (target_can_run): Now a function declaration.
6974 (default_child_has_all_memory, default_child_has_memory)
6975 (default_child_has_stack, default_child_has_registers)
6976 (default_child_has_execution): Remove target_ops parameter.
6977 (complete_target_initialization): Delete.
6978 (memory_breakpoint_target): New template class.
6979 (test_target_ops): Refactor as a C++ class with virtual methods.
6980 * make-target-delegates (NAME_PART): Tighten.
6981 (POINTER_PART, CP_SYMBOL): New.
6982 (SIMPLE_RETURN_PART): Reimplement.
6983 (VEC_RETURN_PART): Expect less.
6984 (RETURN_PART, VIRTUAL_PART): New.
6985 (METHOD): Adjust to C++ virtual methods.
6986 (scan_target_h): Remove reference to C99.
6987 (dname): Output "target_ops::" prefix.
6988 (write_function_header): Adjust to output a C++ class method.
6989 (write_declaration): New.
6990 (write_delegator): Adjust to output a C++ class method.
6991 (tdname): Output "dummy_target::" prefix.
6992 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6993 method.
6994 (tdefault_names, debug_names): Delete.
6995 (return_types, tdefaults, styles, argtypes_array): New.
6996 (top level): All methods are delegators.
6997 (print_class): New.
6998 (top level): Print dummy_target and debug_target classes.
6999 * target-delegates.c: Regenerate.
7000 * target-debug.h (target_debug_print_enum_info_proc_what)
7001 (target_debug_print_thread_control_capabilities)
7002 (target_debug_print_thread_info_p): New.
7003 * target.c (dummy_target): Delete.
7004 (the_dummy_target, the_debug_target): New.
7005 (target_stack): Now extern.
7006 (set_targetdebug): Push/unpush debug target.
7007 (default_child_has_all_memory, default_child_has_memory)
7008 (default_child_has_stack, default_child_has_registers)
7009 (default_child_has_execution): Remove target_ops parameter.
7010 (complete_target_initialization): Delete.
7011 (add_target_with_completer): No longer call
7012 complete_target_initialization.
7013 (target_supports_terminal_ours): Use regular delegation.
7014 (update_current_target): Delete.
7015 (push_target): No longer check magic number. Don't call
7016 update_current_target.
7017 (unpush_target): Don't call update_current_target.
7018 (target_is_pushed): No longer check magic number.
7019 (target_require_runnable): Skip for all stratums over
7020 process_stratum.
7021 (target_ops::info_proc): New.
7022 (target_info_proc): Use find_target_at and
7023 find_default_run_target.
7024 (target_supports_disable_randomization): Use regular delegation.
7025 (target_get_osdata): Use find_target_at.
7026 (target_ops::open, target_ops::close, target_ops::can_attach)
7027 (target_ops::attach, target_ops::can_create_inferior)
7028 (target_ops::create_inferior, target_ops::can_run)
7029 (target_can_run): New.
7030 (default_fileio_target): Use regular delegation.
7031 (target_ops::fileio_open, target_ops::fileio_pwrite)
7032 (target_ops::fileio_pread, target_ops::fileio_fstat)
7033 (target_ops::fileio_close, target_ops::fileio_unlink)
7034 (target_ops::fileio_readlink): New.
7035 (target_fileio_open_1, target_fileio_unlink)
7036 (target_fileio_readlink): Always call the target method. Handle
7037 FILEIO_ENOSYS.
7038 (return_zero, return_zero_has_execution): Delete.
7039 (init_dummy_target): Delete.
7040 (dummy_target::dummy_target, dummy_target::shortname)
7041 (dummy_target::longname, dummy_target::doc)
7042 (debug_target::debug_target, debug_target::shortname)
7043 (debug_target::longname, debug_target::doc): New.
7044 (target_supports_delete_record): Use regular delegation.
7045 (setup_target_debug): Delete.
7046 (maintenance_print_target_stack): Skip debug_stratum.
7047 (initialize_targets): Instantiate the_dummy_target and
7048 the_debug_target.
7049 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7050 use target_stack.
7051 (target_auxv_search, fprint_target_auxv): Adjust.
7052 (info_auxv_command): Adjust to use target_stack.
7053 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7054 * exceptions.c (print_flush): Handle a NULL target_stack.
7055 * regcache.c (target_ops_no_register): Refactor as class with
7056 virtual methods.
7057
7058 * exec.c (exec_target): New class.
7059 (exec_ops): Now an exec_target.
7060 (exec_open, exec_close_1, exec_get_section_table)
7061 (exec_xfer_partial, exec_files_info, exec_has_memory)
7062 (exec_make_note_section): Refactor as exec_target methods.
7063 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7064 Delete.
7065 (exec_target::find_memory_regions): New.
7066 (_initialize_exec): Don't call init_exec_ops.
7067 * gdbcore.h (exec_file_clear): Delete.
7068
7069 * corefile.c (core_target): Delete.
7070 (core_file_command): Adjust.
7071 * corelow.c (core_target): New class.
7072 (the_core_target): New.
7073 (core_close): Remove target_ops parameter.
7074 (core_close_cleanup): Adjust.
7075 (core_target::close): New.
7076 (core_open, core_detach, get_core_registers, core_files_info)
7077 (core_xfer_partial, core_thread_alive, core_read_description)
7078 (core_pid_to_str, core_thread_name, core_has_memory)
7079 (core_has_stack, core_has_registers, core_info_proc): Rework as
7080 core_target methods.
7081 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7082 (_initialize_corelow): Initialize the_core_target.
7083 * gdbcore.h (core_target): Delete.
7084 (the_core_target): New.
7085
7086 * ctf.c: (ctf_target): New class.
7087 (ctf_ops): Now a ctf_target.
7088 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7089 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7090 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7091 methods.
7092 (init_ctf_ops): Delete.
7093 (_initialize_ctf): Don't call it.
7094 * tracefile-tfile.c (tfile_target): New class.
7095 (tfile_ops): Now a tfile_target.
7096 (tfile_open, tfile_close, tfile_files_info)
7097 (tfile_get_tracepoint_status, tfile_trace_find)
7098 (tfile_fetch_registers, tfile_xfer_partial)
7099 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7100 Refactor as tfile_target methods.
7101 (tfile_xfer_partial_features): Remove target_ops parameter.
7102 (init_tfile_ops): Delete.
7103 (_initialize_tracefile_tfile): Don't call it.
7104 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7105 (tracefile_has_stack, tracefile_has_registers)
7106 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7107 tracefile_target methods.
7108 (init_tracefile_ops): Delete.
7109 (tracefile_target::tracefile_target): New.
7110 * tracefile.h: Include "target.h".
7111 (tracefile_target): New class.
7112 (init_tracefile_ops): Delete.
7113
7114 * spu-multiarch.c (spu_multiarch_target): New class.
7115 (spu_ops): Now a spu_multiarch_target.
7116 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7117 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7118 (spu_search_memory, spu_mourn_inferior): Refactor as
7119 spu_multiarch_target methods.
7120 (init_spu_ops): Delete.
7121 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7122 complete_target_initialization.
7123
7124 * ravenscar-thread.c (ravenscar_thread_target): New class.
7125 (ravenscar_ops): Now a ravenscar_thread_target.
7126 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7127 (ravenscar_thread_alive, ravenscar_pid_to_str)
7128 (ravenscar_fetch_registers, ravenscar_store_registers)
7129 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7130 (ravenscar_stopped_by_hw_breakpoint)
7131 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7132 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7133 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7134 methods.
7135 (init_ravenscar_thread_ops): Delete.
7136 (_initialize_ravenscar): Remove references to
7137 init_ravenscar_thread_ops and complete_target_initialization.
7138
7139 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7140 (bsd_uthread_target): New class.
7141 (bsd_uthread_ops): Now a bsd_uthread_target.
7142 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7143 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7144 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7145 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7146 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7147 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7148 (bsd_uthread_target): Delete function.
7149 (_initialize_bsd_uthread): Remove reference to
7150 complete_target_initialization.
7151
7152 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7153 (target_bfd): ... this new class.
7154 (target_bfd_xfer_partial, target_bfd_get_section_table)
7155 (target_bfd_close): Refactor as target_bfd methods.
7156 (target_bfd::~target_bfd): New.
7157 (target_bfd_reopen): Adjust.
7158 (target_bfd::close): New.
7159
7160 * record-btrace.c (record_btrace_target): New class.
7161 (record_btrace_ops): Now a record_btrace_target.
7162 (record_btrace_open, record_btrace_stop_recording)
7163 (record_btrace_disconnect, record_btrace_close)
7164 (record_btrace_async, record_btrace_info)
7165 (record_btrace_insn_history, record_btrace_insn_history_range)
7166 (record_btrace_insn_history_from, record_btrace_call_history)
7167 (record_btrace_call_history_range)
7168 (record_btrace_call_history_from, record_btrace_record_method)
7169 (record_btrace_is_replaying, record_btrace_will_replay)
7170 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7171 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7172 (record_btrace_store_registers, record_btrace_prepare_to_store)
7173 (record_btrace_to_get_unwinder)
7174 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7175 (record_btrace_commit_resume, record_btrace_wait)
7176 (record_btrace_stop, record_btrace_can_execute_reverse)
7177 (record_btrace_stopped_by_sw_breakpoint)
7178 (record_btrace_supports_stopped_by_sw_breakpoint)
7179 (record_btrace_stopped_by_hw_breakpoint)
7180 (record_btrace_supports_stopped_by_hw_breakpoint)
7181 (record_btrace_update_thread_list, record_btrace_thread_alive)
7182 (record_btrace_goto_begin, record_btrace_goto_end)
7183 (record_btrace_goto, record_btrace_stop_replaying_all)
7184 (record_btrace_execution_direction)
7185 (record_btrace_prepare_to_generate_core)
7186 (record_btrace_done_generating_core): Refactor as
7187 record_btrace_target methods.
7188 (init_record_btrace_ops): Delete.
7189 (_initialize_record_btrace): Remove reference to
7190 init_record_btrace_ops.
7191 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7192 the execution_direction global.
7193 (record_full_base_target, record_full_target)
7194 (record_full_core_target): New classes.
7195 (record_full_ops): Now a record_full_target.
7196 (record_full_core_ops): Now a record_full_core_target.
7197 (record_full_target::detach, record_full_target::disconnect)
7198 (record_full_core_target::disconnect)
7199 (record_full_target::mourn_inferior, record_full_target::kill):
7200 New.
7201 (record_full_open, record_full_close, record_full_async): Refactor
7202 as methods of the record_full_base_target class.
7203 (record_full_resume, record_full_commit_resume): Refactor
7204 as methods of the record_full_target class.
7205 (record_full_wait, record_full_stopped_by_watchpoint)
7206 (record_full_stopped_data_address)
7207 (record_full_stopped_by_sw_breakpoint)
7208 (record_full_supports_stopped_by_sw_breakpoint)
7209 (record_full_stopped_by_hw_breakpoint)
7210 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7211 methods of the record_full_base_target class.
7212 (record_full_store_registers, record_full_xfer_partial)
7213 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7214 Refactor as methods of the record_full_target class.
7215 (record_full_can_execute_reverse, record_full_get_bookmark)
7216 (record_full_goto_bookmark, record_full_execution_direction)
7217 (record_full_record_method, record_full_info, record_full_delete)
7218 (record_full_is_replaying, record_full_will_replay)
7219 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7220 (record_full_stop_replaying): Refactor as methods of the
7221 record_full_base_target class.
7222 (record_full_core_resume, record_full_core_kill)
7223 (record_full_core_fetch_registers)
7224 (record_full_core_prepare_to_store)
7225 (record_full_core_store_registers, record_full_core_xfer_partial)
7226 (record_full_core_insert_breakpoint)
7227 (record_full_core_remove_breakpoint)
7228 (record_full_core_has_execution): Refactor
7229 as methods of the record_full_core_target class.
7230 (record_full_base_target::supports_delete_record): New.
7231 (init_record_full_ops): Delete.
7232 (init_record_full_core_ops): Delete.
7233 (record_full_save): Refactor as method of the
7234 record_full_base_target class.
7235 (_initialize_record_full): Remove references to
7236 init_record_full_ops and init_record_full_core_ops.
7237
7238 * remote.c (remote_target, extended_remote_target): New classes.
7239 (remote_ops): Now a remote_target.
7240 (extended_remote_ops): Now an extended_remote_target.
7241 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7242 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7243 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7244 (remote_pass_signals, remote_set_syscall_catchpoint)
7245 (remote_program_signals, )
7246 (remote_thread_always_alive): Remove target_ops parameter.
7247 (remote_thread_alive, remote_thread_name)
7248 (remote_update_thread_list, remote_threads_extra_info)
7249 (remote_static_tracepoint_marker_at)
7250 (remote_static_tracepoint_markers_by_strid)
7251 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7252 (remote_open): Refactor as methods of remote_target.
7253 (extended_remote_open, extended_remote_detach)
7254 (extended_remote_attach, extended_remote_post_attach):
7255 (extended_remote_supports_disable_randomization)
7256 (extended_remote_create_inferior): : Refactor as method of
7257 extended_remote_target.
7258 (remote_set_permissions, remote_open_1, remote_detach)
7259 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7260 (remote_resume, remote_commit_resume, remote_stop)
7261 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7262 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7263 (remote_prepare_to_store, remote_store_registers)
7264 (remote_flash_erase, remote_flash_done, remote_files_info)
7265 (remote_kill, remote_mourn, remote_insert_breakpoint)
7266 (remote_remove_breakpoint, remote_insert_watchpoint)
7267 (remote_watchpoint_addr_within_range)
7268 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7269 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7270 (remote_supports_stopped_by_sw_breakpoint)
7271 (remote_stopped_by_hw_breakpoint)
7272 (remote_supports_stopped_by_hw_breakpoint)
7273 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7274 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7275 (remote_verify_memory): Refactor as methods of remote_target.
7276 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7277 parameter.
7278 (remote_xfer_partial, remote_get_memory_xfer_limit)
7279 (remote_search_memory, remote_rcmd, remote_memory_map)
7280 (remote_pid_to_str, remote_get_thread_local_address)
7281 (remote_get_tib_address, remote_read_description): Refactor as
7282 methods of remote_target.
7283 (remote_target::fileio_open, remote_target::fileio_pwrite)
7284 (remote_target::fileio_pread, remote_target::fileio_close): New.
7285 (remote_hostio_readlink, remote_hostio_fstat)
7286 (remote_filesystem_is_local, remote_can_execute_reverse)
7287 (remote_supports_non_stop, remote_supports_disable_randomization)
7288 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7289 (remote_supports_enable_disable_tracepoint)
7290 (remote_supports_string_tracing)
7291 (remote_can_run_breakpoint_commands, remote_trace_init)
7292 (remote_download_tracepoint, remote_can_download_tracepoint)
7293 (remote_download_trace_state_variable, remote_enable_tracepoint)
7294 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7295 (remote_trace_start, remote_get_trace_status)
7296 (remote_get_tracepoint_status, remote_trace_stop)
7297 (remote_trace_find, remote_get_trace_state_variable_value)
7298 (remote_save_trace_data, remote_get_raw_trace_data)
7299 (remote_set_disconnected_tracing, remote_core_of_thread)
7300 (remote_set_circular_trace_buffer, remote_traceframe_info)
7301 (remote_get_min_fast_tracepoint_insn_len)
7302 (remote_set_trace_buffer_size, remote_set_trace_notes)
7303 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7304 (remote_disable_btrace, remote_teardown_btrace)
7305 (remote_read_btrace, remote_btrace_conf)
7306 (remote_augmented_libraries_svr4_read, remote_load)
7307 (remote_pid_to_exec_file, remote_can_do_single_step)
7308 (remote_execution_direction, remote_thread_handle_to_thread_info):
7309 Refactor as methods of remote_target.
7310 (init_remote_ops, init_extended_remote_ops): Delete.
7311 (remote_can_async_p, remote_is_async_p, remote_async)
7312 (remote_thread_events, remote_upload_tracepoints)
7313 (remote_upload_trace_state_variables): Refactor as methods of
7314 remote_target.
7315 (_initialize_remote): Remove references to init_remote_ops and
7316 init_extended_remote_ops.
7317
7318 * remote-sim.c (gdbsim_target): New class.
7319 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7320 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7321 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7322 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7323 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7324 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7325 Refactor as methods of gdbsim_target.
7326 (gdbsim_ops): Now a gdbsim_target.
7327 (init_gdbsim_ops): Delete.
7328 (gdbsim_cntrl_c): Adjust.
7329 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7330
7331 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7332 (the_amd64_linux_nat_target): New.
7333 (amd64_linux_fetch_inferior_registers)
7334 (amd64_linux_store_inferior_registers): Refactor as methods of
7335 amd64_linux_nat_target.
7336 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7337 * i386-linux-nat.c: Don't include "linux-nat.h".
7338 (i386_linux_nat_target): New class.
7339 (the_i386_linux_nat_target): New.
7340 (i386_linux_fetch_inferior_registers)
7341 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7342 as methods of i386_linux_nat_target.
7343 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7344 * inf-child.c (inf_child_ops): Delete.
7345 (inf_child_fetch_inferior_registers)
7346 (inf_child_store_inferior_registers): Delete.
7347 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7348 methods of inf_child_target.
7349 (inf_child_target::supports_terminal_ours)
7350 (inf_child_target::terminal_init)
7351 (inf_child_target::terminal_inferior)
7352 (inf_child_target::terminal_ours_for_output)
7353 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7354 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7355 New.
7356 (inf_child_open, inf_child_disconnect, inf_child_close)
7357 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7358 (inf_child_post_startup_inferior, inf_child_can_run)
7359 (inf_child_pid_to_exec_file): Refactor as methods of
7360 inf_child_target.
7361 (inf_child_follow_fork): Delete.
7362 (inf_child_target::can_create_inferior)
7363 (inf_child_target::can_attach): New.
7364 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7365 (inf_child_target::has_stack, inf_child_target::has_registers)
7366 (inf_child_target::has_execution): New.
7367 (inf_child_fileio_open, inf_child_fileio_pwrite)
7368 (inf_child_fileio_pread, inf_child_fileio_fstat)
7369 (inf_child_fileio_close, inf_child_fileio_unlink)
7370 (inf_child_fileio_readlink, inf_child_use_agent)
7371 (inf_child_can_use_agent): Refactor as methods of
7372 inf_child_target.
7373 (return_zero, inf_child_target): Delete.
7374 (inf_child_target::inf_child_target): New.
7375 * inf-child.h: Include "target.h".
7376 (inf_child_target): Delete function prototype.
7377 (inf_child_target): New class.
7378 (inf_child_open_target, inf_child_mourn_inferior)
7379 (inf_child_maybe_unpush_target): Delete.
7380 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7381 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7382 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7383 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7384 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7385 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7386 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7387 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7388 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7389 methods of inf_ptrace_target.
7390 (inf_ptrace_target): Delete function.
7391 * inf-ptrace.h: Include "inf-child.h".
7392 (inf_ptrace_target): Delete function declaration.
7393 (inf_ptrace_target): New class.
7394 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7395 * linux-nat.c (linux_target): New.
7396 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7397 (linux_nat_target::~linux_nat_target): New.
7398 (linux_child_post_attach, linux_child_post_startup_inferior)
7399 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7400 (linux_child_remove_fork_catchpoint)
7401 (linux_child_insert_vfork_catchpoint)
7402 (linux_child_remove_vfork_catchpoint)
7403 (linux_child_insert_exec_catchpoint)
7404 (linux_child_remove_exec_catchpoint)
7405 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7406 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7407 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7408 (linux_nat_stopped_data_address)
7409 (linux_nat_stopped_by_sw_breakpoint)
7410 (linux_nat_supports_stopped_by_sw_breakpoint)
7411 (linux_nat_stopped_by_hw_breakpoint)
7412 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7413 (linux_nat_kill, linux_nat_mourn_inferior)
7414 (linux_nat_xfer_partial, linux_nat_thread_alive)
7415 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7416 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7417 (linux_child_static_tracepoint_markers_by_strid)
7418 (linux_nat_is_async_p, linux_nat_can_async_p)
7419 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7420 (linux_nat_supports_multi_process)
7421 (linux_nat_supports_disable_randomization, linux_nat_async)
7422 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7423 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7424 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7425 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7426 methods of linux_nat_target.
7427 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7428 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7429 parameter.
7430 (check_stopped_by_watchpoint): Adjust.
7431 (linux_xfer_partial): Delete.
7432 (linux_target_install_ops, linux_target, linux_nat_add_target):
7433 Delete.
7434 (linux_nat_target::linux_nat_target): New.
7435 * linux-nat.h: Include "inf-ptrace.h".
7436 (linux_nat_target): New.
7437 (linux_target, linux_target_install_ops, linux_nat_add_target):
7438 Delete function declarations.
7439 (linux_target): Declare global.
7440 * linux-thread-db.c (thread_db_target): New.
7441 (thread_db_target::thread_db_target): New.
7442 (thread_db_ops): Delete.
7443 (the_thread_db_target): New.
7444 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7445 (thread_db_update_thread_list, thread_db_pid_to_str)
7446 (thread_db_extra_thread_info)
7447 (thread_db_thread_handle_to_thread_info)
7448 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7449 (thread_db_resume): Refactor as methods of thread_db_target.
7450 (init_thread_db_ops): Delete.
7451 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7452 * x86-linux-nat.c: Don't include "linux-nat.h".
7453 (super_post_startup_inferior): Delete.
7454 (x86_linux_nat_target::~x86_linux_nat_target): New.
7455 (x86_linux_child_post_startup_inferior)
7456 (x86_linux_read_description, x86_linux_enable_btrace)
7457 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7458 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7459 methods of x86_linux_nat_target.
7460 (x86_linux_create_target): Delete. Bits folded ...
7461 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7462 pointer.
7463 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7464 (x86_linux_nat_target): New class.
7465 (x86_linux_create_target): Delete.
7466 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7467 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7468 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7469 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7470 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7471 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7472 make extern.
7473 (x86_use_watchpoints): Delete.
7474 * x86-nat.h: Include "breakpoint.h" and "target.h".
7475 (x86_use_watchpoints): Delete.
7476 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7477 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7478 (x86_insert_watchpoint, x86_remove_watchpoint)
7479 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7480 (x86_stopped_by_hw_breakpoint): New declarations.
7481 (x86_nat_target): New template class.
7482
7483 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7484 (the_ppc_linux_nat_target): New.
7485 (ppc_linux_fetch_inferior_registers)
7486 (ppc_linux_can_use_hw_breakpoint)
7487 (ppc_linux_region_ok_for_hw_watchpoint)
7488 (ppc_linux_ranged_break_num_registers)
7489 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7490 (ppc_linux_insert_mask_watchpoint)
7491 (ppc_linux_remove_mask_watchpoint)
7492 (ppc_linux_can_accel_watchpoint_condition)
7493 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7494 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7495 (ppc_linux_watchpoint_addr_within_range)
7496 (ppc_linux_masked_watch_num_registers)
7497 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7498 (ppc_linux_read_description): Refactor as methods of
7499 ppc_linux_nat_target.
7500 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7501
7502 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7503 (procfs_target): New class.
7504 (the_procfs_target): New.
7505 (procfs_target): Delete function.
7506 (procfs_auxv_parse, procfs_attach, procfs_detach)
7507 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7508 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7509 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7510 (procfs_create_inferior, procfs_update_thread_list)
7511 (procfs_thread_alive, procfs_pid_to_str)
7512 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7513 (procfs_stopped_data_address, procfs_insert_watchpoint)
7514 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7515 (proc_find_memory_regions, procfs_info_proc)
7516 (procfs_make_note_section): Refactor as methods of procfs_target.
7517 (_initialize_procfs): Adjust.
7518 * sol-thread.c (sol_thread_target): New class.
7519 (sol_thread_ops): Now a sol_thread_target.
7520 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7521 (sol_thread_fetch_registers, sol_thread_store_registers)
7522 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7523 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7524 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7525 (init_sol_thread_ops): Delete.
7526 (_initialize_sol_thread): Adjust. Remove references to
7527 init_sol_thread_ops and complete_target_initialization.
7528
7529 * windows-nat.c (windows_nat_target): New class.
7530 (windows_fetch_inferior_registers)
7531 (windows_store_inferior_registers, windows_resume, windows_wait)
7532 (windows_attach, windows_detach, windows_pid_to_exec_file)
7533 (windows_files_info, windows_create_inferior)
7534 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7535 (windows_close, windows_pid_to_str, windows_xfer_partial)
7536 (windows_get_tib_address, windows_get_ada_task_ptid)
7537 (windows_thread_name, windows_thread_alive): Refactor as
7538 windows_nat_target methods.
7539 (do_initial_windows_stuff): Adjust.
7540 (windows_target): Delete function.
7541 (_initialize_windows_nat): Adjust.
7542
7543 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7544 (darwin_mourn_inferior, darwin_kill_inferior)
7545 (darwin_create_inferior, darwin_attach, darwin_detach)
7546 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7547 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7548 (darwin_supports_multi_process): Refactor as darwin_nat_target
7549 methods.
7550 (darwin_resume_to, darwin_files_info): Delete.
7551 (_initialize_darwin_inferior): Rename to ...
7552 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7553 * darwin-nat.h: Include "inf-child.h".
7554 (darwin_nat_target): New class.
7555 (darwin_complete_target): Delete.
7556 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7557 (darwin_target): New.
7558 (i386_darwin_fetch_inferior_registers)
7559 (i386_darwin_store_inferior_registers): Refactor as methods of
7560 darwin_nat_target.
7561 (darwin_complete_target): Delete, with ...
7562 (_initialize_i386_darwin_nat): ... bits factored out here.
7563
7564 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7565 (the_alpha_linux_nat_target): New.
7566 (alpha_linux_register_u_offset): Refactor as
7567 alpha_linux_nat_target method.
7568 (_initialize_alpha_linux_nat): Adjust.
7569 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7570 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7571 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7572 methods of linux_nat_trad_target.
7573 (linux_trad_target): Delete.
7574 * linux-nat-trad.h (linux_trad_target): Delete function.
7575 (linux_nat_trad_target): New class.
7576 * mips-linux-nat.c (mips_linux_nat_target): New class.
7577 (super_fetch_registers, super_store_registers, super_close):
7578 Delete.
7579 (the_mips_linux_nat_target): New.
7580 (mips64_linux_regsets_fetch_registers)
7581 (mips64_linux_regsets_store_registers)
7582 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7583 (mips_linux_register_u_offset, mips_linux_read_description)
7584 (mips_linux_can_use_hw_breakpoint)
7585 (mips_linux_stopped_by_watchpoint)
7586 (mips_linux_stopped_data_address)
7587 (mips_linux_region_ok_for_hw_watchpoint)
7588 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7589 (mips_linux_close): Refactor as methods of mips_linux_nat.
7590 (_initialize_mips_linux_nat): Adjust to C++ification.
7591
7592 * aix-thread.c (aix_thread_target): New class.
7593 (aix_thread_ops): Now an aix_thread_target.
7594 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7595 (aix_thread_fetch_registers, aix_thread_store_registers)
7596 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7597 (aix_thread_thread_alive, aix_thread_pid_to_str)
7598 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7599 Refactor as methods of aix_thread_target.
7600 (init_aix_thread_ops): Delete.
7601 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7602 and complete_target_initialization.
7603 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7604 (rs6000_nat_target): New class.
7605 (the_rs6000_nat_target): New.
7606 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7607 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7608 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7609 (super_create_inferior): Delete.
7610 (_initialize_rs6000_nat): Adjust to C++ification.
7611
7612 * arm-linux-nat.c (arm_linux_nat_target): New class.
7613 (the_arm_linux_nat_target): New.
7614 (arm_linux_fetch_inferior_registers)
7615 (arm_linux_store_inferior_registers, arm_linux_read_description)
7616 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7617 (arm_linux_remove_hw_breakpoint)
7618 (arm_linux_region_ok_for_hw_watchpoint)
7619 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7620 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7621 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7622 arm_linux_nat_target.
7623 (_initialize_arm_linux_nat): Adjust to C++ification.
7624
7625 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7626 (the_aarch64_linux_nat_target): New.
7627 (aarch64_linux_fetch_inferior_registers)
7628 (aarch64_linux_store_inferior_registers)
7629 (aarch64_linux_child_post_startup_inferior)
7630 (aarch64_linux_read_description)
7631 (aarch64_linux_can_use_hw_breakpoint)
7632 (aarch64_linux_insert_hw_breakpoint)
7633 (aarch64_linux_remove_hw_breakpoint)
7634 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7635 (aarch64_linux_region_ok_for_hw_watchpoint)
7636 (aarch64_linux_stopped_data_address)
7637 (aarch64_linux_stopped_by_watchpoint)
7638 (aarch64_linux_watchpoint_addr_within_range)
7639 (aarch64_linux_can_do_single_step): Refactor as methods of
7640 aarch64_linux_nat_target.
7641 (super_post_startup_inferior): Delete.
7642 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7643
7644 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7645 (the_hppa_linux_nat_target): New.
7646 (hppa_linux_fetch_inferior_registers)
7647 (hppa_linux_store_inferior_registers): Refactor as methods of
7648 hppa_linux_nat_target.
7649 (_initialize_hppa_linux_nat): Adjust to C++ification.
7650
7651 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7652 (the_ia64_linux_nat_target): New.
7653 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7654 (ia64_linux_stopped_data_address)
7655 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7656 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7657 ia64_linux_nat_target methods.
7658 (super_xfer_partial): Delete.
7659 (_initialize_ia64_linux_nat): Adjust to C++ification.
7660
7661 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7662 (the_m32r_linux_nat_target): New.
7663 (m32r_linux_fetch_inferior_registers)
7664 (m32r_linux_store_inferior_registers): Refactor as
7665 m32r_linux_nat_target methods.
7666 (_initialize_m32r_linux_nat): Adjust to C++ification.
7667
7668 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7669 (the_m68k_linux_nat_target): New.
7670 (m68k_linux_fetch_inferior_registers)
7671 (m68k_linux_store_inferior_registers): Refactor as
7672 m68k_linux_nat_target methods.
7673 (_initialize_m68k_linux_nat): Adjust to C++ification.
7674
7675 * s390-linux-nat.c (s390_linux_nat_target): New class.
7676 (the_s390_linux_nat_target): New.
7677 (s390_linux_fetch_inferior_registers)
7678 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7679 (s390_insert_watchpoint, s390_remove_watchpoint)
7680 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7681 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7682 (s390_auxv_parse, s390_read_description): Refactor as methods of
7683 s390_linux_nat_target.
7684 (_initialize_s390_nat): Adjust to C++ification.
7685
7686 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7687 (the_sparc_linux_nat_target): New.
7688 (_initialize_sparc_linux_nat): Adjust to C++ification.
7689 * sparc-nat.c (sparc_fetch_inferior_registers)
7690 (sparc_store_inferior_registers): Remove target_ops parameter.
7691 * sparc-nat.h (sparc_fetch_inferior_registers)
7692 (sparc_store_inferior_registers): Remove target_ops parameter.
7693 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7694 (the_sparc64_linux_nat_target): New.
7695 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7696
7697 * spu-linux-nat.c (spu_linux_nat_target): New class.
7698 (the_spu_linux_nat_target): New.
7699 (spu_child_post_startup_inferior, spu_child_post_attach)
7700 (spu_child_wait, spu_fetch_inferior_registers)
7701 (spu_store_inferior_registers, spu_xfer_partial)
7702 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7703 methods.
7704 (_initialize_spu_nat): Adjust to C++ification.
7705
7706 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7707 (the_tilegx_linux_nat_target): New.
7708 (fetch_inferior_registers, store_inferior_registers):
7709 Refactor as methods.
7710 (_initialize_tile_linux_nat): Adjust to C++ification.
7711
7712 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7713 (the_xtensa_linux_nat_target): New.
7714 (xtensa_linux_fetch_inferior_registers)
7715 (xtensa_linux_store_inferior_registers): Refactor as
7716 xtensa_linux_nat_target methods.
7717 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7718
7719 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7720 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7721 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7722 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7723 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7724 (fbsd_stopped_by_sw_breakpoint)
7725 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7726 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7727 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7728 (fbsd_post_startup_inferior, fbsd_post_attach)
7729 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7730 (fbsd_set_syscall_catchpoint)
7731 (super_xfer_partial, super_resume, super_wait)
7732 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7733 (fbsd_handle_debug_trap): Remove target_ops parameter.
7734 (fbsd_nat_add_target): Delete.
7735 * fbsd-nat.h: Include "inf-ptrace.h".
7736 (fbsd_nat_add_target): Delete.
7737 (USE_SIGTRAP_SIGINFO): Define.
7738 (fbsd_nat_target): New class.
7739
7740 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7741 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7742 (amd64bsd_target): Delete.
7743 * amd64-bsd-nat.h: New file.
7744 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7745 "x86-bsd-nat.h".
7746 (amd64_fbsd_nat_target): New class.
7747 (the_amd64_fbsd_nat_target): New.
7748 (amd64fbsd_read_description): Refactor as method of
7749 amd64_fbsd_nat_target.
7750 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7751 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7752 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7753 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7754 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7755 (i386bsd_target): Delete.
7756 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7757 (i386bsd_fetch_inferior_registers)
7758 (i386bsd_store_inferior_registers): Declare.
7759 (i386_bsd_nat_target): New class.
7760 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7761 (the_i386_fbsd_nat_target): New.
7762 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7763 i386_fbsd_nat_target methods.
7764 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7765 (_initialize_i386fbsd_nat): Adjust to C++ification.
7766 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7767 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7768 (_initialize_x86_bsd_nat): Adjust to C++ification.
7769 * x86-bsd-nat.h: Include "x86-nat.h".
7770 (x86bsd_target): Delete declaration.
7771 (x86bsd_nat_target): New class.
7772
7773 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7774 (the_aarch64_fbsd_nat_target): New.
7775 (aarch64_fbsd_fetch_inferior_registers)
7776 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7777 aarch64_fbsd_nat_target.
7778 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7779 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7780 (the_alpha_bsd_nat_target): New.
7781 (alphabsd_fetch_inferior_registers)
7782 (alphabsd_store_inferior_registers): Refactor as
7783 alpha_bsd_nat_target methods.
7784 (_initialize_alphabsd_nat): Refactor as methods of
7785 alpha_bsd_nat_target.
7786 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7787 (the_amd64_nbsd_nat_target): New.
7788 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7789 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7790 (the_amd64_obsd_nat_target): New.
7791 (_initialize_amd64obsd_nat): Adjust to C++ification.
7792 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7793 (the_arm_fbsd_nat_target): New.
7794 (arm_fbsd_fetch_inferior_registers)
7795 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7796 (_initialize_arm_fbsd_nat): Refactor as methods of
7797 arm_fbsd_nat_target.
7798 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7799 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7800 (the_arm_netbsd_nat_target): New.
7801 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7802 arm_netbsd_nat_target.
7803 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7804 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7805 (the_hppa_nbsd_nat_target): New.
7806 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7807 hppa_nbsd_nat_target methods.
7808 (_initialize_hppanbsd_nat): Adjust to C++ification.
7809 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7810 (the_hppa_obsd_nat_target): New.
7811 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7812 methods of hppa_obsd_nat_target.
7813 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7814 add_target.
7815 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7816 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7817 add_target.
7818 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7819 (_initialize_i386obsd_nat): Use add_target.
7820 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7821 (the_m68k_bsd_nat_target): New.
7822 (m68kbsd_fetch_inferior_registers)
7823 (m68kbsd_store_inferior_registers): Refactor as methods of
7824 m68k_bsd_nat_target.
7825 (_initialize_m68kbsd_nat): Adjust to C++ification.
7826 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7827 (the_mips_fbsd_nat_target): New.
7828 (mips_fbsd_fetch_inferior_registers)
7829 (mips_fbsd_store_inferior_registers): Refactor as methods of
7830 mips_fbsd_nat_target.
7831 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7832 add_target.
7833 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7834 (the_mips_nbsd_nat_target): New.
7835 (mipsnbsd_fetch_inferior_registers)
7836 (mipsnbsd_store_inferior_registers): Refactor as methods of
7837 mips_nbsd_nat_target.
7838 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7839 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7840 (the_mips64_obsd_nat_target): New.
7841 (mips64obsd_fetch_inferior_registers)
7842 (mips64obsd_store_inferior_registers): Refactor as methods of
7843 mips64_obsd_nat_target.
7844 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7845 add_target.
7846 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7847 nbsd_nat_target.
7848 * nbsd-nat.h: Include "inf-ptrace.h".
7849 (nbsd_nat_target): New class.
7850 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7851 (obsd_wait): Refactor as methods of obsd_nat_target.
7852 (obsd_add_target): Delete.
7853 * obsd-nat.h: Include "inf-ptrace.h".
7854 (obsd_nat_target): New class.
7855 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7856 (the_ppc_fbsd_nat_target): New.
7857 (ppcfbsd_fetch_inferior_registers)
7858 (ppcfbsd_store_inferior_registers): Refactor as methods of
7859 ppc_fbsd_nat_target.
7860 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7861 add_target.
7862 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7863 (the_ppc_nbsd_nat_target): New.
7864 (ppcnbsd_fetch_inferior_registers)
7865 (ppcnbsd_store_inferior_registers): Refactor as methods of
7866 ppc_nbsd_nat_target.
7867 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7868 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7869 (the_ppc_obsd_nat_target): New.
7870 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7871 methods of ppc_obsd_nat_target.
7872 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7873 add_target.
7874 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7875 (the_sh_nbsd_nat_target): New.
7876 (shnbsd_fetch_inferior_registers)
7877 (shnbsd_store_inferior_registers): Refactor as methods of
7878 sh_nbsd_nat_target.
7879 (_initialize_shnbsd_nat): Adjust to C++ification.
7880 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7881 (inf_ptrace_xfer_partial): Delete.
7882 (sparc_xfer_partial, sparc_target): Delete.
7883 * sparc-nat.h (sparc_fetch_inferior_registers)
7884 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7885 (sparc_target): Delete function declaration.
7886 (sparc_target): New template class.
7887 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7888 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7889 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7890 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7891 add_target.
7892 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7893 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7894 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7895 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7896 add_target.
7897 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7898 (the_vax_bsd_nat_target): New.
7899 (vaxbsd_fetch_inferior_registers)
7900 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7901 methods.
7902 (_initialize_vaxbsd_nat): Adjust to C++ification.
7903
7904 * bsd-kvm.c (bsd_kvm_target): New class.
7905 (bsd_kvm_ops): Now a bsd_kvm_target.
7906 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7907 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7908 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7909 bsd_kvm_target.
7910 (bsd_kvm_return_one): Delete.
7911 (bsd_kvm_add_target): Adjust to C++ification.
7912
7913 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7914 (nto_procfs_target_procfs): New classes.
7915 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7916 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7917 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7918 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7919 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7920 (procfs_remove_hw_breakpoint, procfs_resume)
7921 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7922 (procfs_kill_inferior, procfs_store_registers)
7923 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7924 as methods of nto_procfs_target.
7925 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7926 (nto_native_ops): Delete.
7927 (procfs_open, procfs_native_open): Delete.
7928 (nto_native_ops): Now an nto_procfs_target_native.
7929 (init_procfs_targets): Adjust to C++ification.
7930 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7931 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7932 Refactor as methods of nto_procfs_target.
7933
7934 * go32-nat.c (go32_nat_target): New class.
7935 (the_go32_nat_target): New.
7936 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7937 (go32_store_registers, go32_xfer_partial, go32_files_info)
7938 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7939 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7940 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7941 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7942 (go32_target): Delete.
7943 (_initialize_go32_nat): Adjust to C++ification.
7944
7945 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7946 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7947 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7948 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7949 gnu_nat_target.
7950 (gnu_target): Delete.
7951 * gnu-nat.h (gnu_target): Delete.
7952 (gnu_nat_target): New class.
7953 * i386-gnu-nat.c (gnu_base_target): New.
7954 (i386_gnu_nat_target): New class.
7955 (the_i386_gnu_nat_target): New.
7956 (_initialize_i386gnu_nat): Adjust to C++ification.
7957
7958 2018-05-02 Pedro Alves <palves@redhat.com>
7959
7960 * bfd-target.c (target_bfd_xclose): Rename to ...
7961 (target_bfd_close): ... this.
7962 (target_bfd_reopen): Adjust.
7963 * target.c (target_close): Remove references to to_xclose.
7964 * target.h (target_ops::to_xclose): Delete.
7965 (target_ops::to_close): Update comments.
7966
7967 2018-05-02 Pedro Alves <palves@redhat.com>
7968
7969 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7970 "linux-nat.h".
7971 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7972 * inf-ptrace.c (inf_ptrace_register_u_offset)
7973 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7974 (inf_ptrace_store_register, inf_ptrace_store_registers)
7975 (inf_ptrace_trad_target): Move to ...
7976 * linux-nat-trad.c: ... this new file.
7977 * linux-nat-trad.h: New file.
7978 * linux-nat.c (linux_target_install_ops): Make extern.
7979 (linux_trad_target): Delete.
7980 * linux-nat.h (linux_trad_target): Delete declaration.
7981 (linux_target_install_ops): Declare.
7982 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7983 "linux-nat.h".
7984
7985 2018-05-02 Pedro Alves <palves@redhat.com>
7986
7987 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7988 procfs_target/add_target here.
7989 * procfs.c (procfs_target): Make static.
7990 (_initialize_procfs): Call add_target here.
7991 * procfs.h (struct target_ops): Remove forward declaration.
7992 (procfs_target): Remove declaration.
7993 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7994
7995 2018-05-02 Pedro Alves <palves@redhat.com>
7996
7997 * procfs.c (procfs_stopped_by_watchpoint)
7998 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7999 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8000 Forward declare.
8001 (procfs_use_watchpoints): Delete, move contents...
8002 (procfs_target): ... here.
8003 * procfs.h (procfs_use_watchpoints): Delete declaration.
8004 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8005 procfs_use_watchpoints.
8006 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8007 procfs_use_watchpoints.
8008
8009 2018-05-02 Tom Tromey <tom@tromey.com>
8010
8011 PR python/20084:
8012 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8013 and var_zuinteger_unlimited.
8014 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8015 and PARAM_ZUINTEGER_UNLIMITED.
8016 (set_parameter_value): Handle var_zuinteger and
8017 var_zuinteger_unlimited.
8018 (add_setshow_generic): Likewise.
8019 (parmpy_init): Likewise.
8020
8021 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8022
8023 PR rust/23124
8024 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8025 pointer is not null before dereferencing it.
8026
8027 2018-04-30 Tom Tromey <tom@tromey.com>
8028
8029 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8030 is_mi_like_p.
8031
8032 2018-04-30 Tom Tromey <tom@tromey.com>
8033
8034 * breakpoint.c (mention): Remove use of is_mi_like_p.
8035 (print_mention_ranged_breakpoint): Likewise.
8036 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8037 of is_mi_like_p.
8038
8039 2018-04-30 Tom Tromey <tom@tromey.com>
8040
8041 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8042
8043 2018-04-30 Tom Tromey <tom@tromey.com>
8044
8045 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8046 (info_spu_event_command): Remove some uses of is_mi_like_p.
8047
8048 2018-04-30 Tom Tromey <tom@tromey.com>
8049
8050 * python/py-framefilter.c (py_print_single_arg)
8051 (enumerate_locals, py_print_args, py_print_frame): Remove some
8052 uses of is_mi_like_p.
8053
8054 2018-04-30 Tom Tromey <tom@tromey.com>
8055
8056 * ui-out.c: Update.
8057 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8058 * ui-out.h (ui_out::is_mi_like_p): Now const.
8059 (ui_out::do_is_mi_like_p): Now const.
8060 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8061
8062 2018-04-30 Tom Tromey <tom@tromey.com>
8063
8064 * varobj.c (varobj_set_visualizer): Use new_reference.
8065 * python/python.c (gdbpy_decode_line): Use new_reference.
8066 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8067 new_reference.
8068
8069 2018-04-30 Tom Tromey <tom@tromey.com>
8070
8071 * varobj.c (install_new_value): Use new_reference.
8072 * value.h (value_incref): Return void. Swap intro comment with
8073 value_decref.
8074 * value.c (set_value_parent): Use new_reference.
8075 (value_incref): Return void. Update intro comment.
8076 (release_value): Use new_reference.
8077 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8078
8079 2018-04-30 Tom Tromey <tom@tromey.com>
8080
8081 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8082 * gdb_bfd.h (new_bfd_ref): Remove.
8083 (gdb_bfd_open): Update comment.
8084 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8085 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8086 (gdb_bfd_fdopenr): Use new_reference.
8087 * exec.c (exec_file_attach): Use new_reference.
8088
8089 2018-04-30 Tom Tromey <tom@tromey.com>
8090
8091 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8092 method.
8093
8094 2018-04-30 Tom Tromey <tom@tromey.com>
8095
8096 * jit.c (jit_read_code_entry): Use type_align.
8097 * i386-tdep.c (i386_gdbarch_init): Don't call
8098 set_gdbarch_long_long_align_bit.
8099 * gdbarch.sh: Remove long_long_align_bit.
8100 * gdbarch.c, gdbarch.h: Rebuild.
8101 * arc-tdep.c (arc_type_align): New function.
8102 (arc_gdbarch_init): Use arc_type_align. Don't call
8103 set_gdbarch_long_long_align_bit.
8104
8105 2018-04-30 Tom Tromey <tom@tromey.com>
8106
8107 * rust-lang.c (rust_type_alignment): Remove.
8108 (rust_composite_type): Use type_align.
8109
8110 2018-04-30 Tom Tromey <tom@tromey.com>
8111
8112 * NEWS: Mention Type.align.
8113 * python/py-type.c (typy_get_alignof): New function.
8114 (type_object_getset): Add "alignof".
8115
8116 2018-04-30 Tom Tromey <tom@tromey.com>
8117
8118 PR exp/17095:
8119 * NEWS: Update.
8120 * std-operator.def (UNOP_ALIGNOF): New operator.
8121 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8122 New.
8123 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8124 * c-lang.c (c_op_print_tab): Add alignof.
8125 * c-exp.y (ALIGNOF): New token.
8126 (exp): Add "ALIGNOF" production.
8127 (ident_tokens): Add _Alignof and alignof.
8128
8129 2018-04-30 Tom Tromey <tom@tromey.com>
8130
8131 * i386-tdep.c (i386_type_align): New function.
8132 (i386_gdbarch_init): Update.
8133 * gdbarch.sh (type_align): New method.
8134 * gdbarch.c, gdbarch.h: Rebuild.
8135 * arch-utils.h (default_type_align): Declare.
8136 * arch-utils.c (default_type_align): New function.
8137 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8138 (struct type) <align_log2>: New field.
8139 <instance_flags>: Now a bitfield.
8140 (TYPE_RAW_ALIGN): New macro.
8141 (type_align, type_raw_align, set_type_align): Declare.
8142 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8143 functions.
8144 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8145 (get_alignment, maybe_set_alignment): New functions.
8146 (read_structure_type, read_enumeration_type, read_array_type)
8147 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8148 (read_subrange_type, read_base_type): Set type alignment.
8149
8150 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8151
8152 * dwarf2read.c (read_index_from_section): Use bool.
8153
8154 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8155
8156 PR gdb/22950
8157 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8158 with #ifdef.
8159
8160 2018-04-29 John Reiser <jreiser@BitWagon.com>
8161
8162 PR build/22873
8163 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8164 last step, and do it atomically.
8165
8166 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8167
8168 * compile/compile-c-types.c (convert_int, convert_float):
8169 Update for C FE v1.
8170
8171 2018-04-27 Tom Tromey <tom@tromey.com>
8172
8173 PR rust/22545:
8174 * rust-lang.c (rust_inclusive_range_type_p): New function.
8175 (rust_range): Handle inclusive ranges.
8176 (rust_compute_range): Likewise.
8177 * rust-exp.y (struct rust_op) <inclusive>: New field.
8178 (DOTDOTEQ): New constant.
8179 (range_expr): Add "..=" productions.
8180 (operator_tokens): Add "..=" token.
8181 (ast_range): Add "inclusive" parameter.
8182 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8183 ranges.
8184 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8185 bounds values.
8186 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8187 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8188 Update comments.
8189 * expprint.c (print_subexp_standard): Handle new bounds values.
8190 (dump_subexp_body_standard): Likewise.
8191
8192 2018-04-27 Tom Tromey <tom@tromey.com>
8193
8194 * configure: Rebuild.
8195 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8196 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8197 "OVERRIDE".
8198 (class symbol_needs_eval_context): Likewise.
8199 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8200 (mock_mapped_index::symbol_name_at): Use "override". Remove
8201 "virtual".
8202 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8203 "override".
8204 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8205 * aarch64-tdep.c (instruction_reader::read): Use "override".
8206 (instruction_reader_test::read): Likewise.
8207 * arm-tdep.c (instruction_reader::read): Use "override".
8208 (instruction_reader_thumb::read): Likewise.
8209
8210 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8211
8212 PR remote/9665
8213 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8214 instead of remote_send.
8215 (remote_send): Remove.
8216
8217 2018-04-26 Pedro Alves <palves@redhat.com>
8218
8219 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8220 find_function_start_sal instead of find_pc_line.
8221
8222 2018-04-26 Pedro Alves <palves@redhat.com>
8223
8224 * breakpoint.c (set_breakpoint_location_function): Handle
8225 mst_data_gnu_ifunc.
8226 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8227 * elfread.c (elf_symtab_read): Give data symbols with
8228 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8229 (elf_rel_plt_read): Update comment.
8230 * linespec.c (convert_linespec_to_sals): Handle
8231 mst_data_gnu_ifunc.
8232 (minsym_found): Handle mst_data_gnu_ifunc.
8233 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8234 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8235 * parse.c (find_minsym_type_and_address): Handle
8236 mst_data_gnu_ifunc.
8237 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8238 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8239 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8240 comment.
8241 <mst_data_gnu_ifunc>: New enumerator.
8242
8243 2018-04-26 Pedro Alves <palves@redhat.com>
8244
8245 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8246 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8247 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8248 Handle it.
8249 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8250 (lookup_minimal_symbol_by_pc): Adjust.
8251 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8252 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8253 * minsyms.h (lookup_msym_prefer): New enum.
8254 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8255 parameter by a lookup_msym_prefer parameter.
8256
8257 2018-04-26 Pedro Alves <palves@redhat.com>
8258
8259 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8260 ends in "@plt" instead of looking at the symbol's section.
8261
8262 2018-04-26 Pedro Alves <palves@redhat.com>
8263
8264 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8265 all references.
8266 (find_pc_partial_function_gnu_ifunc): Rename to ...
8267 (find_pc_partial_function): ... this, and remove references to
8268 'is_gnu_ifunc_p'.
8269 (find_pc_partial_function): Delete old implementation.
8270 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8271
8272 2018-04-26 Pedro Alves <palves@redhat.com>
8273
8274 * linespec.c (struct bound_minimal_symbol_search_key): New.
8275 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8276 skip first line if we found a GNU ifunc minimal symbol by name.
8277 (compare_msymbols): Change parameters to work with a destructured
8278 lhs minsym.
8279 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8280 functions.
8281
8282 2018-04-26 Pedro Alves <palves@redhat.com>
8283
8284 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8285 ifunc targets here. Instead, if we have an ifunc minsym, use its
8286 address/name.
8287 (add_location_to_breakpoint): Store the minsym and the objfile in
8288 the breakpoint location.
8289 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8290 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8291 Record the minsym in the sal.
8292 * symtab.h (symtab_and_line) <msymbol>: New field.
8293
8294 2018-04-26 Pedro Alves <palves@redhat.com>
8295
8296 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8297 unless we actually resolved the ifunc.
8298
8299 2018-04-26 Pedro Alves <palves@redhat.com>
8300
8301 * c-exp.y (variable production): Prefer ifunc minsyms over
8302 regular function symbols.
8303 * symtab.c (find_gnu_ifunc): New function.
8304 * minsyms.h (lookup_msym_prefer): New enum.
8305 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8306 parameter by a lookup_msym_prefer parameter.
8307 * symtab.h (find_gnu_ifunc): New declaration.
8308
8309 2018-04-26 Pedro Alves <palves@redhat.com>
8310
8311 * blockframe.c (find_gnu_ifunc_target_type): New function.
8312 (find_function_type): New.
8313 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8314 return a value with a memory address.
8315 (eval_call): For calls to GNU ifunc functions, try to find the
8316 type of the target function from the type that the resolver
8317 returns.
8318 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8319 symbols.
8320 * infcall.c (find_function_return_type): Delete.
8321 (find_function_addr): Add 'function_type' parameter. For calls to
8322 GNU ifunc functions, try to find the type of the target function
8323 from the type that the resolver returns, and return it via
8324 FUNCTION_TYPE.
8325 (call_function_by_hand_dummy): Adjust to use the function type
8326 returned by find_function_addr.
8327 (find_function_addr): Add 'function_type' parameter and move
8328 description here.
8329 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8330 declarations.
8331
8332 2018-04-26 Pedro Alves <palves@redhat.com>
8333
8334 * c-exp.y (variable production): Skip finding an alias for ifunc
8335 symbols.
8336
8337 2018-04-26 Pedro Alves <palves@redhat.com>
8338
8339 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8340
8341 2018-04-25 Pedro Alves <palves@redhat.com>
8342
8343 * infcmd.c (kill_command): Print the pid as string, not the whole
8344 thread's ptid. Add comment. s/has been killed/killed/ in output
8345 message.
8346 * remote.c (remote_detach_1): Print the pid as string, not the
8347 whole thread's ptid.
8348
8349 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8350 Sergio Durigan Junior <sergiodj@redhat.com>
8351 Pedro Alves <palves@redhat.com>
8352
8353 * infcmd.c (kill_command): Print message when inferior has
8354 been killed.
8355 * inferior.c (print_inferior_events): Remove 'static'. Set as
8356 '1'.
8357 (add_inferior): Improve message printed when
8358 'print_inferior_events' is on.
8359 (exit_inferior): Remove message printed when
8360 'print_inferior_events' is on.
8361 (detach_inferior): Improve message printed when
8362 'print_inferior_events' is on.
8363 (initialize_inferiors): Use 'add_inferior_silent' to set
8364 'current_inferior_'.
8365 * inferior.h (print_inferior_events): Declare here as
8366 'extern'.
8367 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8368 '[Detaching...]' messages when 'print_inferior_events' is on.
8369 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8370 as prefix/suffix for messages. Remove periods. Fix erroneous
8371 'Detaching after fork from child...', replace it by '... from
8372 parent...'.
8373 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8374 prefix/suffix when printing 'Detaching...' messages. Print
8375 them when 'print_inferior_events' is on.
8376 * remote.c (remote_detach_1): Print message when detaching
8377 from inferior and '!is_fork_parent'.
8378
8379 2018-04-24 Tom Tromey <tom@tromey.com>
8380
8381 * cli-out.h: Reindent.
8382
8383 2018-04-24 Tom Tromey <tom@tromey.com>
8384
8385 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8386 (cli_ui_out::do_field_string): Use fputs_filtered.
8387 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8388
8389 2018-04-23 Tom Tromey <tom@tromey.com>
8390
8391 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8392 gdb::unique_xmalloc_ptr.
8393
8394 2018-04-23 Tom Tromey <tom@tromey.com>
8395
8396 * configure: Rebuild.
8397
8398 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8399
8400 PR gdb/23095
8401 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8402 prepare_for_testing. Set normal_bp to r_debug_state if target
8403 is bsd.
8404
8405 2018-04-21 Pedro Alves <palves@redhat.com>
8406 Rajendra SY <rajendra.sy@gmail.com>
8407
8408 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8409 * remote.c (extended_remote_attach): In all-stop mode, mark the
8410 thread as executing.
8411
8412 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8413
8414 * thread.c (thread_apply_all_command): Fix comment.
8415 (thread_command): Fix comment.
8416
8417 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8418
8419 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8420 parameter.
8421 * features/aarch64-core.c (create_feature_aarch64_core):
8422 Regenerate.
8423 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8424 Likewise.
8425 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8426 Likewise.
8427 * features/i386/32bit-avx512.c
8428 (create_feature_i386_32bit_avx512): Likewise.
8429 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8430 Likewise.
8431 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8432 Likewise.
8433 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8434 Likewise.
8435 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8436 Likewise.
8437 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8438 Likewise.
8439 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8440 Likewise.
8441 * features/i386/64bit-avx512.c
8442 (create_feature_i386_64bit_avx512): Likewise.
8443 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8444 Likewise.
8445 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8446 Likewise.
8447 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8448 Likewise.
8449 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8450 Likewise.
8451 * features/i386/64bit-segments.c
8452 (create_feature_i386_64bit_segments): Likewise.
8453 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8454 Likewise.
8455 * features/i386/x32-core.c
8456 (create_feature_i386_x32_core): Likewise.
8457 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8458 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8459 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8460 * target-descriptions.c: In generated code, don't pass xml
8461 filename.
8462
8463 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8464
8465 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8466 (print_xml_feature::visit_post): Likewise.
8467 (print_xml_feature::visit): Likewise.
8468 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8469 (print_xml_feature): Add new class.
8470 * regformats/regdat.sh: Null xmltarget on feature targets.
8471 * target-descriptions.c (struct target_desc): Add xmltarget.
8472 (maintenance_check_tdesc_xml_convert): Add unittest function.
8473 (tdesc_get_features_xml): Add function to get xml.
8474 (maintenance_check_xml_descriptions): Test xml generation.
8475 * xml-tdesc.c (string_read_description_xml): Add function.
8476 * xml-tdesc.h (string_read_description_xml): Add declaration.
8477
8478 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8479
8480 * features/Makefile: Add feature marker to targets with new style
8481 target descriptions.
8482 * regformats/aarch64.dat: Regenerate.
8483 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8484 * regformats/i386/amd64-avx-linux.dat: Likewise.
8485 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8486 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8487 * regformats/i386/amd64-linux.dat: Likewise.
8488 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8489 * regformats/i386/amd64.dat: Likewise.
8490 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8491 * regformats/i386/i386-avx-linux.dat: Likewise.
8492 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8493 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8494 * regformats/i386/i386-linux.dat: Likewise.
8495 * regformats/i386/i386-mmx-linux.dat: Likewise.
8496 * regformats/i386/i386-mpx-linux.dat: Likewise.
8497 * regformats/i386/i386.dat: Likewise.
8498 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8499 * regformats/i386/x32-avx-linux.dat: Likewise.
8500 * regformats/i386/x32-linux.dat: Likewise.
8501 * regformats/tic6x-c62x-linux.dat: Likewise.
8502 * regformats/tic6x-c64x-linux.dat: Likewise.
8503 * regformats/tic6x-c64xp-linux.dat: Likewise.
8504 * regformats/regdat.sh: Parse feature marker.
8505
8506 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8507
8508 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8509 (tdesc_osabi_name): Likewise.
8510 * target-descriptions.c (tdesc_architecture_name): Add new
8511 function.
8512 (tdesc_osabi_name): Likewise.
8513
8514 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8515
8516 * common/tdesc.c (tdesc_predefined_type): Move to here.
8517 (tdesc_named_type): Likewise.
8518 (tdesc_create_vector): Likewise.
8519 (tdesc_create_struct): Likewise.
8520 (tdesc_set_struct_size): Likewise.
8521 (tdesc_create_union): Likewise.
8522 (tdesc_create_flags): Likewise.
8523 (tdesc_create_enum): Likewise.
8524 (tdesc_add_field): Likewise.
8525 (tdesc_add_typed_bitfield): Likewise.
8526 (tdesc_add_bitfield): Likewise.
8527 (tdesc_add_flag): Likewise.
8528 (tdesc_add_enum_value): Likewise.
8529 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8530 (struct tdesc_type_vector): Likewise.
8531 (struct tdesc_type_field): Likewise.
8532 (struct tdesc_type_with_fields): Likewise.
8533 (tdesc_create_enum): Add declaration.
8534 (tdesc_add_typed_bitfield): Likewise.
8535 (tdesc_add_enum_value): Likewise.
8536 * target-descriptions.c (tdesc_type_field): Move from here.
8537 (tdesc_type_builtin): Likewise.
8538 (tdesc_type_vector): Likewise.
8539 (tdesc_type_with_fields): Likewise.
8540 (tdesc_predefined_types): Likewise.
8541 (tdesc_named_type): Likewise.
8542 (tdesc_create_vector): Likewise.
8543 (tdesc_create_struct): Likewise.
8544 (tdesc_set_struct_size): Likewise.
8545 (tdesc_create_union): Likewise.
8546 (tdesc_create_flags): Likewise.
8547 (tdesc_create_enum): Likewise.
8548 (tdesc_add_field): Likewise.
8549 (tdesc_add_typed_bitfield): Likewise.
8550 (tdesc_add_bitfield): Likewise.
8551 (tdesc_add_flag): Likewise.
8552 (tdesc_add_enum_value): Likewise.
8553 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8554 (tdesc_add_typed_bitfield): Likewise.
8555 (tdesc_add_enum_value): Likewise.
8556
8557 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8558
8559 * common/tdesc.c (tdesc_feature::accept): Move to here.
8560 (tdesc_feature::operator==): Likewise.
8561 (tdesc_create_reg): Likewise.
8562 * common/tdesc.h (tdesc_type_kind): Likewise.
8563 (struct tdesc_type): Likewise.
8564 (struct tdesc_feature): Likewise.
8565 * regformats/regdat.sh: Create a feature.
8566 * target-descriptions.c (tdesc_type_kind): Move from here.
8567 (tdesc_type): Likewise.
8568 (tdesc_type_up): Likewise.
8569 (tdesc_feature): Likewise.
8570 (tdesc_create_reg): Likewise.
8571
8572 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8573
8574 * Makefile.in: Add arch/tdesc.c
8575 * common/tdesc.c: New file.
8576 * common/tdesc.h (tdesc_element_visitor): Move to here.
8577 (tdesc_element): Likewise.
8578 (tdesc_reg): Likewise.
8579 (tdesc_reg_up): Likewise.
8580 * regformats/regdef.h (reg): Add offset to constructors.
8581 * target-descriptions.c (tdesc_element_visitor): Move from here.
8582 (tdesc_element): Likewise.
8583 (tdesc_reg): Likewise.
8584 (tdesc_reg_up): Likewise.
8585
8586 2018-04-17 Tom Tromey <tom@tromey.com>
8587
8588 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8589 discriminant field.
8590
8591 2018-04-17 Tom Tromey <tom@tromey.com>
8592
8593 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8594
8595 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8596
8597 * symtab.c (print_symbol_info): Skip printing filename and line
8598 number when `last' is NULL.
8599 (symtab_symbol_info): Use empty string instead of NULL for first
8600 invocation of print_symbol_info.
8601 (rbreak_command): Pass NULL to `last' parameter of
8602 print_symbol_info.
8603
8604 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8605
8606 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8607 instead of nullptr.
8608
8609 2018-04-16 Pedro Alves <palves@redhat.com>
8610
8611 * MAINTAINERS (sh): Remove.
8612 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8613 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8614 (ALLDEPFILES): Remove sh64-tdep.c.
8615 * NEWS: Mentions that support for SH-5/SH64 is removed.
8616 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8617 (sh*-*-openbsd*): Ditto.
8618 (sh64-*-elf*): Remove.
8619 (sh*): Remove.
8620 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8621 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8622 * sh-tdep.c: No longer include "sh64-tdep.h".
8623 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8624 * sh64-tdep.c, sh64-tdep.h: Remove files.
8625
8626 2018-04-16 Pedro Alves <palves@redhat.com>
8627
8628 * MAINTAINERS: Remove m88k.
8629 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8630 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8631 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8632 * NEWS: Mention that support for m88k was removed.
8633 * configure.host (m88*-*-*): Remove support.
8634 * configure.nat (m88k-*-*): Remove support.
8635 * configure.tgt (m88*-*-openbsd*): Remove.
8636 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8637
8638 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8639
8640 * configure.tgt (x86_tobjs): New variable.
8641 (amd64_tobjs, i386_tobjs): Use it.
8642
8643 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8644
8645 * symtab.c (print_symbol_info): Precede the symbol definition by
8646 the line number when available.
8647 * NEWS: Advertise this enhancement.
8648
8649 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8650
8651 * NEWS (New options): announce set/show record btrace cpu.
8652 * btrace.c: Include record-btrace.h.
8653 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8654 the vendor is unknown.
8655 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8656 Maybe overwrite the btrace configuration's cpu.
8657 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8658 (btrace_fetch): Add cpu parameter. Update callers.
8659 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8660 Maybe overwrite the btrace configuration's cpu. Skip enabling
8661 errata workarounds if the vendor is unknown.
8662 * python/py-record-btrace.c: Include record-btrace.h.
8663 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8664 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8665 * record-btrace.c (record_btrace_cpu_state_kind): New.
8666 (record_btrace_cpu): New.
8667 (set_record_btrace_cpu_cmdlist): New.
8668 (record_btrace_get_cpu): New.
8669 (require_btrace_thread, record_btrace_info)
8670 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8671 (cmd_set_record_btrace_cpu_none): New.
8672 (cmd_set_record_btrace_cpu_auto): New.
8673 (cmd_set_record_btrace_cpu): New.
8674 (cmd_show_record_btrace_cpu): New.
8675 (_initialize_record_btrace): Initialize set/show record btrace cpu
8676 commands.
8677 * record-btrace.h (record_btrace_get_cpu): New.
8678
8679 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8680
8681 * record.c (set_record_command): Fix typo in message.
8682
8683 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8684
8685 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8686
8687 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8688
8689 * infrun.c (process_event_stop_test): Call
8690 gdbarch_in_indirect_branch_thunk.
8691 * gdbarch.sh (in_indirect_branch_thunk): New.
8692 * gdbarch.c: Regenerated.
8693 * gdbarch.h: Regenerated.
8694 * x86-tdep.h: New.
8695 * x86-tdep.c: New.
8696 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8697 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8698 (ALLDEPFILES): Add x86-tdep.c.
8699 * arch-utils.h (default_in_indirect_branch_thunk): New.
8700 * arch-utils.c (default_in_indirect_branch_thunk): New.
8701 * i386-tdep: Include x86-tdep.h.
8702 (i386_in_indirect_branch_thunk): New.
8703 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8704 function.
8705 * amd64-tdep: Include x86-tdep.h.
8706 (amd64_in_indirect_branch_thunk): New.
8707 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8708
8709 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8710
8711 PR gdb/23053
8712 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8713 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8714 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8715 regression.
8716
8717 2018-04-12 Tom Tromey <tom@tromey.com>
8718
8719 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8720 (rust_evaluate_subexp): Likewise.
8721
8722 2018-04-12 Pedro Alves <palves@redhat.com>
8723
8724 * procfs.c (procfs_detach): Make forward declaration's prototype
8725 match definition's protototype.
8726 (proc_get_LDT_entry): Remove stale do_cleanups call.
8727
8728 2018-04-12 Pedro Alves <palves@redhat.com>
8729
8730 * target.h (target_ops::to_has_exited): Delete.
8731 (target_has_exited): Delete.
8732 * target-delegates.c: Regenerate.
8733
8734 2018-04-11 Pedro Alves <palves@redhat.com>
8735
8736 * target.c (fileio_fh_t::t): Add comment.
8737 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8738 (target_fileio_close): Handle a NULL target.
8739 (invalidate_fileio_fh): New.
8740 (target_close): Call it.
8741 * remote.c (remote_hostio_send_command): No longer check whether
8742 remote_desc is open.
8743
8744 2018-04-11 Pedro Alves <palves@redhat.com>
8745
8746 * target.c (fileio_fh_t): Make it a named struct instead of a
8747 typedef.
8748 (fileio_fh_t::is_closed): New method.
8749 (DEF_VEC_O (fileio_fh_t)): Remove.
8750 (fileio_fhandles): Now a std::vector.
8751 (is_closed_fileio_fh): Delete.
8752 (acquire_fileio_fd): Adjust. Rename parameters.
8753 (release_fileio_fd): Adjust.
8754 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8755 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8756 (target_fileio_close): Adjust.
8757
8758 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8759
8760 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8761 index.
8762
8763 2018-04-10 Pedro Alves <palves@redhat.com>
8764
8765 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8766 (scoped_finish_thread_state): New class.
8767 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8768 cleanup.
8769 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8770 (fetch_inferior_event, normal_stop): Likewise.
8771 * thread.c (finish_thread_state_cleanup): Delete.
8772
8773 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8774 Pedro Alves <palves@redhat.com>
8775
8776 * value.c: Include "selftest.h" and "common/array-view.h".
8777 (struct range) <operator ==>: New.
8778 (test_ranges_contain): New.
8779 (check_ranges_vector): New.
8780 (test_insert_into_bit_range_vector): New.
8781 (_initialize_values): Register selftests.
8782 * common/array-view.h (operator==, operator!=): New.
8783
8784 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8785
8786 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8787 an iterator.
8788 * inline-frame.c: Include <algorithm>.
8789 (struct inline_state): Add constructor.
8790 (inline_state_s): Remove.
8791 (DEF_VEC_O(inline_state_s)): Remove.
8792 (inline_states): Change type to std::vector.
8793 (find_inline_frame_state): Adjust to std::vector.
8794 (allocate_inline_frame_state): Remove.
8795 (clear_inline_frame_state): Adjust to std::vector.
8796 (skip_inline_frames): Adjust to std::vector.
8797
8798 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8799
8800 * tracepoint.h (struct trace_state_variable): Add constructor.
8801 <name>: Change type to std::string.
8802 * tracepoint.c (tsv_s): Remove.
8803 (DEF_VEC_O(tsv_s)): Remove.
8804 (tvariables): Change to std::vector.
8805 (create_trace_state_variable): Adjust to std::vector.
8806 (find_trace_state_variable): Likewise.
8807 (find_trace_state_variable_by_number): Likewise.
8808 (delete_trace_state_variable): Likewise.
8809 (trace_variable_command): Adjust to std::string.
8810 (delete_trace_variable_command): Likewise.
8811 (tvariables_info_1): Adjust to std::vector.
8812 (save_trace_state_variables): Likewise.
8813 (start_tracing): Likewise.
8814 (merge_uploaded_trace_state_variables): Adjust to std::vector
8815 and std::string.
8816 * target.h (struct target_ops)
8817 <to_download_trace_state_variable>: Pass reference to
8818 trace_state_variable.
8819 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8820 * target-delegates.c: Re-generate.
8821 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8822 (mi_tsv_deleted): Likewise.
8823 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8824 * remote.c (remote_download_trace_state_variable): Change
8825 pointer to reference and adjust.
8826 * make-target-delegates (parse_argtypes): Handle references.
8827 (write_function_header): Likewise.
8828 (munge_type): Likewise.
8829
8830 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8831
8832 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8833 string_view-selftests.c.
8834 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8835 testsuite.
8836 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8837 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8838 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8839 * unittests/basic_string_view/element_access/char/1.cc:
8840 Likewise.
8841 * unittests/basic_string_view/element_access/char/empty.cc:
8842 Likewise.
8843 * unittests/basic_string_view/element_access/char/front_back.cc:
8844 Likewise.
8845 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8846 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8847 Likewise.
8848 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8849 Likewise.
8850 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8851 Likewise.
8852 * unittests/basic_string_view/operations/compare/char/1.cc:
8853 Likewise.
8854 * unittests/basic_string_view/operations/compare/char/13650.cc:
8855 Likewise.
8856 * unittests/basic_string_view/operations/copy/char/1.cc:
8857 Likewise.
8858 * unittests/basic_string_view/operations/data/char/1.cc:
8859 Likewise.
8860 * unittests/basic_string_view/operations/find/char/1.cc:
8861 Likewise.
8862 * unittests/basic_string_view/operations/find/char/2.cc:
8863 Likewise.
8864 * unittests/basic_string_view/operations/find/char/3.cc:
8865 Likewise.
8866 * unittests/basic_string_view/operations/find/char/4.cc:
8867 Likewise.
8868 * unittests/basic_string_view/operations/rfind/char/1.cc:
8869 Likewise.
8870 * unittests/basic_string_view/operations/rfind/char/2.cc:
8871 Likewise.
8872 * unittests/basic_string_view/operations/rfind/char/3.cc:
8873 Likewise.
8874 * unittests/basic_string_view/operations/substr/char/1.cc:
8875 Likewise.
8876 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8877 * unittests/string_view-selftests.c: New file.
8878
8879 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8880
8881 * unittests/basic_string_view/capacity/1.cc: New file.
8882 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8883 * unittests/basic_string_view/cons/char/1.cc: New file.
8884 * unittests/basic_string_view/cons/char/2.cc: New file.
8885 * unittests/basic_string_view/cons/char/3.cc: New file.
8886 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8887 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8888 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8889 * unittests/basic_string_view/element_access/char/1.cc: New file.
8890 * unittests/basic_string_view/element_access/char/2.cc: New file.
8891 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8892 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8893 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8894 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8895 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8896 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8897 * unittests/basic_string_view/include.cc: New file.
8898 * unittests/basic_string_view/inserters/char/1.cc: New file.
8899 * unittests/basic_string_view/inserters/char/2.cc: New file.
8900 * unittests/basic_string_view/inserters/char/3.cc: New file.
8901 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8902 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8903 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8904 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8905 * unittests/basic_string_view/literals/types.cc: New file.
8906 * unittests/basic_string_view/literals/values.cc: New file.
8907 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8908 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8909 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8910 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8911 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8912 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8913 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8914 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8915 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8916 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8917 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8918 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8919 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8920 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8921 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8922 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8923 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8924 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8925 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8926 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8927 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8928 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8929 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8930 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8931 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8932 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8933 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8934 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8935 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8936 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8937 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8938 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8939 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8940 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8941 * unittests/basic_string_view/operators/char/2.cc: New file.
8942 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8943 * unittests/basic_string_view/range_access/char/1.cc: New file.
8944 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8945 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8946 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8947 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8948 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8949 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8950 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8951 * unittests/basic_string_view/typedefs.cc: New file.
8952 * unittests/basic_string_view/types/1.cc: New file.
8953
8954 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8955
8956 * common/gdb_string_view.h: Remove libstdc++ implementation
8957 details, adjust to gdb reality.
8958 * common/gdb_string_view.tcc: Likewise.
8959 * cli/cli-script.c (struct string_view): Remove.
8960 (user_args) <m_args>: Change element type to gdb::string_view.
8961 (user_args::insert_args): Adjust.
8962
8963 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8964
8965 * common/gdb_string_view.h: New file.
8966 * common/gdb_string_view.tcc: New file.
8967
8968 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8969
8970 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8971 * configure: Re-generate.
8972
8973 2018-04-09 Pedro Alves <palves@redhat.com>
8974
8975 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8976 (set_target_gdbarch): Call
8977 gdb::observers::architecture_changed.notify instead of
8978 observer_notify_architecture_changed.
8979
8980 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8981
8982 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8983 (do_restore_current_traceframe_cleanup): Remove.
8984 (restore_current_traceframe_cleanup_dtor): Remove.
8985 (make_cleanup_restore_current_traceframe): Remove.
8986 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8987 New.
8988 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8989 * infrun.c (fetch_inferior_event): Use
8990 scoped_restore_current_traceframe.
8991
8992 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8993
8994 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8995 Remove.
8996 <n_allocated_type_units>: Remove.
8997 <all_type_units>: Change to std::vector.
8998 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8999 to std::vector change.
9000 (dwarf2_per_objfile::get_cutu): Likewise.
9001 (dwarf2_per_objfile::get_tu): Likewise.
9002 (create_signatured_type_table_from_index): Likewise.
9003 (create_signatured_type_table_from_debug_names): Likewise.
9004 (dw2_symtab_iter_next): Likewise.
9005 (dw2_print_stats): Likewise.
9006 (dw2_expand_all_symtabs): Likewise.
9007 (dw2_expand_marked_cus): Likewise.
9008 (dw2_debug_names_iterator::next): Likewise.
9009 (dwarf2_initialize_objfile): Likewise.
9010 (add_signatured_type_cu_to_table): Likewise.
9011 (create_all_type_units): Likewise.
9012 (add_type_unit): Likewise.
9013 (struct tu_abbrev_offset): Add constructor.
9014 (build_type_psymtabs_1): Adjust to std::vector change.
9015 (print_tu_stats): Likewise.
9016 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9017 (write_debug_names): Likewise.
9018
9019 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9020
9021 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9022 Make an std::vector.
9023 <n_comp_units>: Remove.
9024 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9025 to std::vector change.
9026 (dwarf2_per_objfile::get_cutu): Likewise.
9027 (dwarf2_per_objfile::get_cu): Likewise.
9028 (create_cus_from_index): Likewise.
9029 (create_addrmap_from_index): Likewise.
9030 (create_addrmap_from_aranges): Likewise.
9031 (dwarf2_read_index): Likewise.
9032 (dw2_find_last_source_symtab): Likewise.
9033 (dw2_map_symtabs_matching_filename): Likewise.
9034 (dw2_symtab_iter_next): Likewise.
9035 (dw2_print_stats): Likewise.
9036 (dw2_expand_all_symtabs): Likewise.
9037 (dw2_expand_symtabs_with_fullname): Likewise.
9038 (dw2_expand_marked_cus): Likewise.
9039 (dw2_map_symbol_filenames): Likewise.
9040 (create_cus_from_debug_names): Likewise.
9041 (dwarf2_read_debug_names): Likewise.
9042 (dw2_debug_names_iterator::next): Likewise.
9043 (dwarf2_initialize_objfile): Likewise.
9044 (set_partial_user): Likewise.
9045 (dwarf2_build_psymtabs_hard): Likewise.
9046 (read_comp_units_from_section): Remove arguments, adjust to
9047 std::vector change.
9048 (create_all_comp_units): Adjust to std::vector and
9049 read_comp_units_from_section changes.
9050 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9051 change.
9052 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9053 (psyms_seen_size): Likewise.
9054 (write_gdbindex): Likewise.
9055 (write_debug_names): Likewise.
9056
9057 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9058
9059 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9060 with dwarf2_per_objfile.
9061 (create_cus_from_index): Likewise.
9062 (create_signatured_type_table_from_index): Likewise.
9063 (dwarf2_read_index): Likewise.
9064 (dwarf2_initialize_objfile): Likewise.
9065 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9066 per_cu rather than get_dwarf2_per_objfile.
9067
9068 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9069
9070 * dwarf2read.h (struct signatured_type): Forward declare.
9071 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9072 New methods.
9073 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9074 (dw2_get_cutu): ...this.
9075 (dwarf2_per_objfile::get_cu): Rename from...
9076 (dw2_get_cu): ...this.
9077 (dwarf2_per_objfile::get_tu): New.
9078 (create_addrmap_from_index): Adjust.
9079 (create_addrmap_from_aranges): Adjust.
9080 (dw2_find_last_source_symtab): Adjust.
9081 (dw2_map_symtabs_matching_filename): Adjust.
9082 (dw2_symtab_iter_next): Adjust.
9083 (dw2_print_stats): Adjust.
9084 (dw2_expand_all_symtabs): Adjust.
9085 (dw2_expand_symtabs_with_fullname): Adjust.
9086 (dw2_expand_marked_cus): Adjust.
9087 (dw_expand_symtabs_matching_file_matcher): Adjust.
9088 (dw2_map_symbol_filenames): Adjust.
9089 (dw2_debug_names_iterator::next): Adjust.
9090 (dwarf2_initialize_objfile): Adjust.
9091 (set_partial_user): Adjust.
9092 (dwarf2_build_psymtabs_hard): Adjust.
9093
9094 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9095
9096 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9097 Remove unused variables.
9098 (dw2_map_symtabs_matching_filename): Likewise.
9099 (dwarf2_record_block_ranges): Likewise.
9100 (dwarf2_read_addr_index): Likewise.
9101 (follow_die_offset): Likewise.
9102
9103 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9104
9105 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9106 to symbol_file_add_main.
9107
9108 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9109
9110 PR mi/22299
9111 * mi/mi-console.c (do_fputc_async_safe): New.
9112 (mi_console_file::write_async_safe): New.
9113 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9114 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9115 New.
9116 * ui-file.c (ui_file::putstrn): Adjust call to
9117 fputstrn_unfiltered.
9118 * utils.c (printchar): Replace do_fputs and do_fprintf
9119 parameters by do_fputc.
9120 (fputstr_filtered): Adjust call to printchar.
9121 (fputstr_unfiltered): Likewise.
9122 (fputstrn_filtered): Likewise.
9123 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9124 printchar.
9125 * utils.h (do_fputc_ftype): New typedef.
9126 (fputstrn_unfiltered): Add do_fputc parameter.
9127
9128 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9129
9130 * regformats/i386/i386-avx.dat: Remove.
9131
9132 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9133
9134 PR gdb/22979
9135 * amd64-tdep.c (amd64_none_init_abi): New function.
9136 (amd64_x32_none_init_abi): New function.
9137 (_initialize_amd64_tdep): Register handlers for x86-64 and
9138 x64_32 with GDB_OSABI_NONE.
9139 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9140 GDB_OSABI_NONE osabi.
9141
9142 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9143
9144 PR gdb/22980
9145 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9146 GDB_OSABI_NONE.
9147 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9148 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9149
9150 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9151
9152 * common/byte-vector.h (char_vector): New type.
9153 * target.h (target_read_alloc): Return
9154 gdb::optional<byte_vector>.
9155 (target_read_stralloc): Return gdb::optional<char_vector>.
9156 (target_get_osdata): Return gdb::optional<char_vector>.
9157 * target.c (target_read_alloc_1): Templatize. Replacement
9158 manual memory management with vector.
9159 (target_read_alloc): Change return type, adjust.
9160 (target_read_stralloc): Change return type, adjust.
9161 (target_get_osdata): Change return type, adjust.
9162 * auxv.c (struct auxv_info) <length>: Remove.
9163 <data>: Change type to gdb::optional<byte_vector>.
9164 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9165 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9166 (target_auxv_search): Adjust.
9167 (fprint_target_auxv): Adjust.
9168 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9169 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9170 (linux_make_corefile_notes): Adjust.
9171 * osdata.c (get_osdata): Adjust.
9172 * remote.c (remote_get_threads_with_qxfer): Adjust.
9173 (remote_memory_map): Adjust.
9174 (remote_traceframe_info): Adjust.
9175 (btrace_read_config): Adjust.
9176 (remote_read_btrace): Adjust.
9177 (remote_pid_to_exec_file): Adjust.
9178 * solib-aix.c (solib_aix_get_library_list): Adjust.
9179 * solib-dsbt.c (decode_loadmap): Don't free buf.
9180 (dsbt_get_initial_loadmaps): Adjust.
9181 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9182 * solib-target.c (solib_target_current_sos): Adjust.
9183 * tracepoint.c (sdata_make_value): Adjust.
9184 * xml-support.c (xinclude_start_include): Adjust.
9185 (xml_fetch_content_from_file): Adjust.
9186 * xml-support.h (xml_fetch_another): Change return type.
9187 (xml_fetch_content_from_file): Change return type.
9188 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9189 * xml-tdesc.c (file_read_description_xml): Adjust.
9190 (fetch_available_features_from_target): Change return type.
9191 (target_fetch_description_xml): Adjust.
9192 (target_read_description_xml): Adjust.
9193
9194 2018-04-06 Tom Tromey <tom@tromey.com>
9195
9196 * value.c (~value): Update.
9197 (struct value) <contents>: Now unique_xmalloc_ptr.
9198 (value_contents_bits_eq, allocate_value_contents)
9199 (value_contents_raw, value_contents_all_raw)
9200 (value_contents_for_printing, value_contents_for_printing_const)
9201 (set_value_enclosing_type): Update.
9202
9203 2018-04-06 Tom Tromey <tom@tromey.com>
9204
9205 * value.c (range_s): Remove typedef, VEC.
9206 (struct range): Add operator<.
9207 (range_lessthan): Remove.
9208 (ranges_contain): Change type.
9209 (~value): Update.
9210 (struct value) <unavailable, optimized_out>: Now std::vector.
9211 (value_entirely_available)
9212 (value_entirely_covered_by_range_vector)
9213 (value_entirely_unavailable, value_entirely_optimized_out):
9214 Update.
9215 (insert_into_bit_range_vector): Change argument type.
9216 (find_first_range_overlap): Likewise.
9217 (struct ranges_and_idx, value_contents_bits_eq)
9218 (require_not_optimized_out, require_available): Update.
9219 (ranges_copy_adjusted): Change argument types.
9220 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9221
9222 2018-04-06 Tom Tromey <tom@tromey.com>
9223
9224 * value.c (~value): Update.
9225 (struct value) <parent>: Now a value_ref_ptr.
9226 (value_parent, set_value_parent, value_address, value_copy):
9227 Update.
9228
9229 2018-04-06 Tom Tromey <tom@tromey.com>
9230
9231 * value.c (struct value): Add constructor, destructor, and member
9232 initializers.
9233 (allocate_value_lazy, value_decref): Update.
9234
9235 2018-04-06 Tom Tromey <tom@tromey.com>
9236
9237 * value.c (struct value) <released, next>: Remove.
9238 (all_values): Now a std::vector.
9239 (allocate_value_lazy): Update.
9240 (value_next): Remove.
9241 (value_mark, value_free_to_mark, release_value)
9242 (value_release_to_mark): Update.
9243
9244 2018-04-06 Tom Tromey <tom@tromey.com>
9245
9246 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9247 (free_value_chain): Remove.
9248 * value.c (free_value_chain): Remove.
9249 (value_release_to_mark): Return a std::vector.
9250 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9251 std::vector.
9252 (check_condition): Update.
9253 * eval.c (fetch_subexp_value): Change "val_chain" to a
9254 std::vector.
9255 * breakpoint.c (update_watchpoint): Update.
9256 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9257
9258 2018-04-06 Tom Tromey <tom@tromey.com>
9259
9260 * value.h (free_all_values): Remove.
9261 * value.c (free_all_values): Remove.
9262
9263 2018-04-06 Tom Tromey <tom@tromey.com>
9264
9265 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9266 (value_history_chain, value_history_count): Remove.
9267 (value_history): New global.
9268 (record_latest_value, access_value_history, show_values)
9269 (preserve_values): Update.
9270
9271 2018-04-06 Tom Tromey <tom@tromey.com>
9272
9273 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9274 * varobj.c (varobj_set_display_format, varobj_set_value)
9275 (install_default_visualizer, construct_visualizer)
9276 (install_new_value, ~varobj, varobj_get_value_type)
9277 (my_value_of_variable, varobj_editable_p): Update.
9278 * c-varobj.c (c_describe_child, c_value_of_variable)
9279 (cplus_number_of_children, cplus_describe_child): Update.
9280 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9281 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9282 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9283
9284 2018-04-06 Tom Tromey <tom@tromey.com>
9285
9286 * printcmd.c (last_examine_address): Change type to
9287 value_ref_ptr.
9288 (do_examine, x_command): Update.
9289
9290 2018-04-06 Tom Tromey <tom@tromey.com>
9291
9292 * value.c (release_value): Update.
9293 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9294 (struct bpstats) <val>: Now a value_ref_ptr.
9295 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9296 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9297 (~watchpoint, print_it_watchpoint, watch_command_1)
9298 (invalidate_bp_value_on_memory_change): Update.
9299
9300 2018-04-06 Tom Tromey <tom@tromey.com>
9301
9302 * varobj.c (varobj_clear_saved_item)
9303 (update_dynamic_varobj_children, install_new_value, ~varobj):
9304 Update.
9305 * value.h (value_incref): Move declaration earlier.
9306 (value_decref): Rename from value_free.
9307 (struct value_ref_policy): New.
9308 (value_ref_ptr): New typedef.
9309 (struct value_deleter): Remove.
9310 (gdb_value_up): Remove typedef.
9311 (release_value): Change return type.
9312 (release_value_or_incref): Remove.
9313 * value.c (set_value_parent): Update.
9314 (value_incref): Change return type.
9315 (value_decref): Rename from value_free.
9316 (value_free_to_mark, free_all_values, free_value_chain): Update.
9317 (release_value): Return value_ref_ptr.
9318 (release_value_or_incref): Remove.
9319 (record_latest_value, set_internalvar, clear_internalvar):
9320 Update.
9321 * stack.c (info_frame_command): Don't call value_free.
9322 * python/py-value.c (valpy_dealloc, valpy_new)
9323 (value_to_value_object): Update.
9324 * printcmd.c (do_examine): Update.
9325 * opencl-lang.c (lval_func_free_closure): Update.
9326 * mi/mi-main.c (register_changed_p): Don't call value_free.
9327 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9328 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9329 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9330 value_free.
9331 * guile/scm-value.c (vlscm_free_value_smob)
9332 (vlscm_scm_from_value): Update.
9333 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9334 (frame_unwind_register_unsigned, get_frame_register_bytes)
9335 (put_frame_register_bytes): Don't call value_free.
9336 * findvar.c (address_from_register): Don't call value_free.
9337 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9338 * dwarf2loc.c (entry_data_value_free_closure)
9339 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9340 (dwarf2_evaluate_loc_desc_full): Update.
9341 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9342 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9343 (~watchpoint, watch_command_1)
9344 (invalidate_bp_value_on_memory_change): Update.
9345 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9346
9347 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9348
9349 PR gdb/23022
9350 * warning.m4: Add -Wno-error=deprecated-register.
9351 * configure: Re-generate.
9352
9353 2018-04-05 Tom Tromey <tom@tromey.com>
9354
9355 * linespec.h: Remove include of "vec.h".
9356
9357 2018-04-05 Tom Tromey <tom@tromey.com>
9358
9359 * linespec.c (typep): Remove typedef.
9360 (find_methods, find_superclass_methods): Take a std::vector.
9361 (find_method): Use std::vector.
9362
9363 2018-04-05 Tom Tromey <tom@tromey.com>
9364
9365 * utils.c (compare_strings): Remove.
9366 * utils.h (compare_strings): Remove.
9367 * objc-lang.h (find_imps): Update.
9368 * objc-lang.c (find_methods): Take a std::vector.
9369 (uniquify_strings, find_imps): Likewise.
9370 * linespec.c (find_methods): Take a std::vector.
9371 (decode_objc): Use std::vector.
9372 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9373 a std::vector.
9374 (find_method, find_function_symbols): Use std::vector.
9375
9376 2018-04-05 Tom Tromey <tom@tromey.com>
9377
9378 * completer.c (completion_tracker::completion_tracker): Remove
9379 cast.
9380 (completion_tracker::discard_completions): Likewise.
9381 * breakpoint.c (ambiguous_names_p): Remove cast.
9382 * ada-lang.c (_initialize_ada_language): Remove cast.
9383 * utils.h (streq): Update.
9384 (streq_hash): Add new declaration.
9385 * utils.c (streq): Return bool.
9386 (streq_hash): New function.
9387
9388 2018-04-05 Tom Tromey <tom@tromey.com>
9389
9390 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9391 Remove a string copy.
9392
9393 2018-04-05 Tom Tromey <tom@tromey.com>
9394
9395 * linespec.c (filter_results): Use std::vector.
9396 (decode_line_2, decode_line_full): Update.
9397
9398 2018-04-05 Tom Tromey <tom@tromey.com>
9399
9400 * linespec.c (canonical_to_fullform): Return std::string.
9401 (filter_results): Update.
9402 (struct decode_line_2_item): Add constructor.
9403 <fullform, displayform>: Now std::string.
9404 (decode_line_2_compare_items): Now a std::sort comparator.
9405 (decode_line_2): Update.
9406
9407 2018-04-05 Tom Tromey <tom@tromey.com>
9408
9409 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9410 (unexpected_linespec_error): Update.
9411 (linespec_parse_basic, parse_linespec): Update.
9412
9413 2018-04-05 Tom Tromey <tom@tromey.com>
9414
9415 * linespec.c (linespec_parse_basic): Reindent.
9416
9417 2018-04-05 Tom Tromey <tom@tromey.com>
9418
9419 * minsyms.h (iterate_over_minimal_symbols): Update.
9420 * minsyms.c (iterate_over_minimal_symbols): Take a
9421 gdb::function_view.
9422 * linespec.c (struct collect_minsyms): Remove.
9423 (compare_msyms): Now a std::sort comparator.
9424 (add_minsym): Add parameters.
9425 (search_minsyms_for_name): Update. Use std::vector.
9426
9427 2018-04-03 Tom Tromey <tom@tromey.com>
9428
9429 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9430 gdb::byte_vector.
9431
9432 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9433
9434 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9435
9436 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9437
9438 PR gdb/16959
9439 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9440 printing static type.
9441
9442 2018-04-01 Tom Tromey <tom@tromey.com>
9443
9444 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9445 (rs6000_xfer_shared_libraries): Update.
9446
9447 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9448
9449 * common/gdb_vecs.h (char_ptr): Remove.
9450 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9451
9452 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9453
9454 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9455 with std::vector.
9456 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9457
9458 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9459
9460 * tracepoint.h (struct uploaded_tp): Initialize fields.
9461 <actions, step_actions, cmd_strings>: Change type to
9462 std::vector<char *>.
9463 * tracepoint.c (get_uploaded_tp): Allocate with new.
9464 (free_uploaded_tps): Free with delete.
9465 (parse_tracepoint_definition): Adjust to std::vector change.
9466 * breakpoint.c (read_uploaded_action): Likewise.
9467 (create_tracepoint_from_upload): Likewise.
9468 * ctf.c (ctf_write_uploaded_tp): Likewise.
9469 (SET_ARRAY_FIELD): Likewise.
9470 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9471
9472 2018-03-30 Tom Tromey <tom@tromey.com>
9473
9474 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9475 std::unique_ptr.
9476 (svr4_keep_data_in_core): Update.
9477 (svr4_read_so_list): Update.
9478
9479 2018-03-30 Tom Tromey <tom@tromey.com>
9480
9481 * windows-nat.c (handle_output_debug_string, handle_exception):
9482 Update.
9483 * target.h (target_read_string): Update.
9484 * target.c (target_read_string): Change "string" to
9485 unique_xmalloc_ptr.
9486 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9487 Update.
9488 * solib-frv.c (frv_current_sos): Update.
9489 * solib-dsbt.c (dsbt_current_sos): Update.
9490 * solib-darwin.c (darwin_current_sos): Update.
9491 * linux-thread-db.c (inferior_has_bug): Update.
9492 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9493 Update. Remove alloca.
9494 * ada-lang.c (ada_main_name): Update.
9495
9496 2018-03-30 Tom Tromey <tom@tromey.com>
9497
9498 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9499 (struct dwo_file_deleter): New.
9500 (dwo_file_up): New typedef.
9501 (open_and_init_dwo_file): Use dwo_file_up.
9502 (free_dwo_file_cleanup): Remove.
9503
9504 2018-03-30 Tom Tromey <tom@tromey.com>
9505
9506 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9507 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9508
9509 2018-03-30 Tom Tromey <tom@tromey.com>
9510
9511 * dwarf2read.c (class free_cached_comp_units): New class.
9512 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9513 (free_cached_comp_units): Remove function.
9514
9515 2018-03-30 Tom Tromey <tom@tromey.com>
9516
9517 * utils.h (make_cleanup_unpush_target): Remove.
9518 * inf-ptrace.c (struct target_unpusher): New.
9519 (target_unpush_up) New typedef.
9520 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9521 target_unpush_up.
9522 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9523
9524 2018-03-27 Tom Tromey <tom@tromey.com>
9525
9526 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9527
9528 2018-03-27 Pedro Alves <palves@redhat.com>
9529 Tom Tromey <tom@tromey.com>
9530
9531 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9532 destructor. Now a class.
9533 (gdb_readline_wrapper_cleanup): Remove function.
9534 (gdb_readline_wrapper): Remove cleanups.
9535
9536 2018-03-27 Tom Tromey <tom@tromey.com>
9537
9538 * typeprint.h (struct type_print_options) <local_typedefs,
9539 global_typedefs>: Remove "struct" keyword.
9540 (class typedef_hash_table): New class.
9541 (recursively_update_typedef_hash, add_template_parameters)
9542 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9543 (find_typedef_in_hash): Don't declare.
9544 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9545 (typedef_hash_table::recursively_update): Rename from
9546 recursively_update_typedef_hash. Now a member.
9547 (typedef_hash_table::add_template_parameters): Rename from
9548 add_template_parameters. Now a member.
9549 (typedef_hash_table::typedef_hash_table): Now a constructor;
9550 rename from create_typedef_hash.
9551 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9552 rename from free_typedef_hash.
9553 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9554 (do_free_global_table): Remove.
9555 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9556 from copy_type_recursive.
9557 (create_global_typedef_table): Remove.
9558 (typedef_hash_table::find_global_typedef): Now a member of
9559 typedef_hash_table.
9560 (typedef_hash_table::find_typedef): Rename from
9561 find_typedef_in_hash; now a member.
9562 (whatis_exp): Update.
9563 * extension.h (struct ext_lang_type_printers): Add constructor and
9564 destructor.
9565 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9566 declare.
9567 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9568 Now a constructor; rename from start_ext_lang_type_printers.
9569 (ext_lang_type_printers): Now a destructor; rename from
9570 free_ext_lang_type_printers.
9571 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9572 Update.
9573 (c_type_print_base_struct_union): Update. Remove cleanups.
9574
9575 2018-03-27 Tom Tromey <tom@tromey.com>
9576
9577 * dwarf-index-write.c: Include <cmath>.
9578
9579 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9580
9581 * NEWS: Add entry describing new "set|show varsize-limit" command.
9582 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9583 command.
9584 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9585 "set variable".
9586
9587 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9588
9589 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9590 dwarf-index-write.c
9591 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9592 * dwarf-index-common.c: New file.
9593 * dwarf-index-common.h: New file.
9594 * dwarf-index-write.c: New file.
9595 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9596 (struct dwarf2_section_info): Move from here.
9597 (dwarf2_section_info_def): Likewise.
9598 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9599 (offset_type): Likewise.
9600 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9601 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9602 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9603 (byte_swap): Likewise.
9604 (MAYBE_SWAP): Likewise.
9605 (dwarf2_per_cu_ptr): Likewise.
9606 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9607 (struct tu_stats): Likewise.
9608 (struct dwarf2_per_objfile): Likewise.
9609 (struct dwarf2_per_cu_data): Likewise.
9610 (struct signatured_type): Likewise.
9611 (sig_type_ptr): Likewise.
9612 (DEF_VEC_P (sig_type_ptr)): Likewise.
9613 (INDEX4_SUFFIX): Likewise.
9614 (INDEX5_SUFFIX): Likewise.
9615 (DEBUG_STR_SUFFIX): Likewise.
9616 (dwarf2_read_section): Make non-static.
9617 (mapped_index_string_hash): Move from here.
9618 (dwarf5_djb_hash): Likewise.
9619 (file_write): Likewise.
9620 (class data_buf): Likewise.
9621 (struct symtab_index_entry): Likewise.
9622 (struct mapped_symtab): Likewise.
9623 (find_slot): Likewise.
9624 (hash_expand): Likewise.
9625 (add_index_entry): Likewise.
9626 (uniquify_cu_indices): Likewise.
9627 (class c_str_view): Likewise.
9628 (class c_str_view_hasher): Likewise.
9629 (class vector_hasher): Likewise.
9630 (write_hash_table): Likewise.
9631 (psym_index_map): Likewise.
9632 (struct addrmap_index_data): Likewise.
9633 (add_address_entry): Likewise.
9634 (add_address_entry_worker): Likewise.
9635 (write_address_map): Likewise.
9636 (symbol_kind): Likewise.
9637 (write_psymbols): Likewise.
9638 (struct signatured_type_index_data): Likewise.
9639 (write_one_signatured_type): Likewise.
9640 (recursively_count_psymbols): Likewise.
9641 (recursively_write_psymbols): Likewise.
9642 (class debug_names): Likewise.
9643 (check_dwarf64_offsets): Likewise.
9644 (psyms_seen_size): Likewise.
9645 (write_gdbindex): Likewise.
9646 (write_debug_names): Likewise.
9647 (assert_file_size): Likewise.
9648 (write_psymtabs_to_index): Likewise.
9649 (save_gdb_index_command): Likewise.
9650 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9651 command.
9652 * dwarf2read.h: New file.
9653
9654 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9655
9656 PR gdb/22670
9657 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9658 symbol name if the CU's language stores symbol names in linkage
9659 format.
9660 * language.h (struct language_defn)
9661 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9662 all instances of this struct.
9663
9664 2018-03-26 Tom Tromey <tom@tromey.com>
9665
9666 * stack.c (backtrace_command_1): Remove verbose code.
9667
9668 2018-03-26 Tom Tromey <tom@tromey.com>
9669
9670 * python/py-framefilter.c (py_print_type): Don't catch
9671 exceptions. Return void.
9672 (py_print_value): Likewise.
9673 (py_print_single_arg): Likewise.
9674 (enumerate_args): Don't catch exceptions.
9675 (py_print_args): Likewise.
9676 (py_print_frame): Likewise.
9677 (gdbpy_apply_frame_filter): Catch exceptions here.
9678
9679 2018-03-26 Tom Tromey <tom@tromey.com>
9680
9681 * stack.c (_initialize_stack): Remove trailing newlines from help
9682 text. Add "Usage" line to "backtrace" help.
9683
9684 2018-03-26 Tom Tromey <tom@tromey.com>
9685
9686 PR python/16486:
9687 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9688
9689 2018-03-26 Tom Tromey <tom@tromey.com>
9690
9691 * python/py-framefilter.c (py_print_single_arg): Return
9692 EXT_LANG_BT_ERROR from catch.
9693
9694 2018-03-26 Tom Tromey <tom@tromey.com>
9695
9696 PR backtrace/15584:
9697 * stack.c (backtrace_command_1): Move some code into no-filters
9698 "if".
9699
9700 2018-03-26 Tom Tromey <tom@tromey.com>
9701
9702 * python/py-framefilter.c (throw_quit_or_print_exception): New
9703 function.
9704 (gdbpy_apply_frame_filter): Use it.
9705
9706 2018-03-26 Tom Tromey <tom@tromey.com>
9707
9708 PR cli/17716:
9709 * python/py-framefilter.c (py_print_type, py_print_value)
9710 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9711 RETURN_MASK_ERROR.
9712
9713 2018-03-26 Tom Tromey <tom@tromey.com>
9714
9715 * python/py-framefilter.c (enumerate_args): Use
9716 gdb::unique_xmalloc_ptr.
9717
9718 2018-03-26 Tom Tromey <tom@tromey.com>
9719
9720 * python/py-framefilter.c (py_print_frame): Return
9721 EXT_LANG_BT_OK.
9722 (gdbpy_apply_frame_filter): Update comment.
9723 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9724 Remove.
9725 <EXT_LANG_BT_NO_FILTERS>: Change value.
9726
9727 2018-03-26 Tom Tromey <tom@tromey.com>
9728
9729 PR backtrace/15582:
9730 * stack.c (backtrace_command): Parse "hide" argument.
9731 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9732 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9733 constant.
9734
9735 2018-03-26 Tom Tromey <tom@tromey.com>
9736
9737 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9738 add "flags".
9739 (backtrace_command): Remove "fulltrace", add "flags".
9740
9741 2018-03-26 Tom Tromey <tom@tromey.com>
9742
9743 * stack.c (backtrace_command): Rewrite command line parsing.
9744
9745 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9746
9747 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9748
9749 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9750
9751 * filename-seen-cache.h: Add include guard.
9752
9753 2018-03-26 Keith Seitz <keiths@redhat.com>
9754
9755 * symfile.c (place_section): Remove "struct" from section_addr_info
9756 in comment.
9757 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9758 "struct" keyword from section_addr_info.
9759
9760 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9761
9762 * regformats/regdef.h (reg): Add constructors.
9763
9764 2018-03-25 Pedro Alves <palves@redhat.com>
9765
9766 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9767 if then/else bodies in var_func_name extraction.
9768
9769 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9770
9771 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9772 lookup_minimal_symbol() to find symbol entry.
9773 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9774
9775 2018-03-23 Keith Seitz <keiths@redhat.com>
9776
9777 PR c++/22968
9778 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9779 nested type definitions for C++, too.
9780
9781 2018-03-23 Tom Tromey <tom@tromey.com>
9782
9783 * machoread.c (struct oso_el): Add a constructor. Don't define as
9784 a typedef.
9785 (macho_register_oso): Remove.
9786 (macho_symtab_read): Take a std::vector.
9787 (oso_el_compare_name): Now a std::sort comparator.
9788 (macho_symfile_read_all_oso): Take a std::vector.
9789 (macho_symfile_read): Use std::vector. Remove cleanups.
9790
9791 2018-03-22 Tom Tromey <tom@tromey.com>
9792
9793 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9794 (record_full_goto_bookmark): Use std::string.
9795
9796 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9797
9798 PR tdep/18295
9799 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9800 a single mask.
9801
9802 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9803
9804 * rs6000-tdep.c (store_insn_p): New function.
9805 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9806 and cr_reg to their unshifted values. Use store_insn_p to
9807 match LR saves using either R1 or fdata->alloca_reg. Use
9808 store_insn_p to match CR saves. Set alloca_reg_offset
9809 when alloca_reg and framep are set. Remove lr_reg shift
9810 when assigning to fdata->lr_register.
9811
9812 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9813
9814 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9815 command line args instead of emitting a warning.
9816
9817 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9818
9819 * tracepoint.h (struct static_tracepoint_marker): Initialize
9820 fields, define default constructor, move constructor and move
9821 assignment, disable the rest.
9822 <str_id, extra>: Make std::string.
9823 (release_static_tracepoint_marker): Remove.
9824 (free_current_marker): Remove.
9825 * tracepoint.c (free_current_marker): Remove.
9826 (parse_static_tracepoint_marker_definition): Adjust to
9827 std::string, use new hex2str overload.
9828 (release_static_tracepoint_marker): Remove.
9829 (print_one_static_tracepoint_marker): Get marker by reference
9830 and adjust to std::string.
9831 (info_static_tracepoint_markers_command): Adjust to std::vector
9832 changes
9833 * target.h (static_tracepoint_marker_p): Remove typedef.
9834 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9835 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9836 bool.
9837 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9838 * target-debug.h
9839 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9840 (target_debug_print_std_vector_static_tracepoint_marker): New.
9841 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9842 to...
9843 (target_debug_print_static_tracepoint_marker_p): ... this.
9844 * target-delegates.c: Re-generate.
9845 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9846 Make std::string.
9847 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9848 (decode_static_tracepoint_spec): Adjust to std::vector.
9849 (tracepoint_print_one_detail): Adjust to std::string.
9850 (strace_marker_decode_location): Adjust to std::string.
9851 (update_static_tracepoint): Adjust to std::string, remove call
9852 to release_static_tracepoint_marker.
9853 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9854 Adjust to std::vector.
9855 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9856 (remote_static_tracepoint_markers_by_strid): Adjust to
9857 std::vector.
9858 * common/rsp-low.h (hex2str): New overload with explicit count
9859 of bytes.
9860 * common/rsp-low.c (hex2str): New overload with explicit count
9861 of bytes.
9862 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9863 (_initialize_rsp_low_selftests): Add test_hex2str test.
9864 * unittests/tracepoint-selftests.c
9865 (test_parse_static_tracepoint_marker_definition): Adjust to
9866 std::string.
9867
9868 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9869
9870 * tracepoint.c (parse_static_tracepoint_marker_definition):
9871 Consider case where the definition is followed by more
9872 definitions.
9873 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9874 tracepoint-selftests.c.
9875 * unittests/tracepoint-selftests.c: New.
9876
9877 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9878
9879 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9880 Carvalho.
9881
9882 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9883
9884 * symtab.c (find_pc_sect_line): fixed indentation.
9885
9886 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9887
9888 * symtab.c (find_pc_sect_line): now uses binary search.
9889
9890 2018-03-19 Tom Tromey <tom@tromey.com>
9891
9892 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9893 "IDENT" production.
9894
9895 2018-03-19 Pedro Alves <palves@redhat.com>
9896 Tom Tromey <tom@tromey.com>
9897
9898 * unittests/observable-selftests.c: New file.
9899 * common/observable.h: New file.
9900 * observable.h: New file.
9901 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9902 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9903 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9904 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9905 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9906 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9907 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9908 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9909 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9910 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9911 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9912 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9913 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9914 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9915 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9916 tui/tui-interp.c, valops.c: Update all users.
9917 * tui/tui-hooks.c (tui_bp_created_observer)
9918 (tui_bp_deleted_observer, tui_bp_modified_observer)
9919 (tui_inferior_exit_observer, tui_before_prompt_observer)
9920 (tui_normal_stop_observer, tui_register_changed_observer):
9921 Remove.
9922 (tui_observers_token): New global.
9923 (attach_or_detach, tui_attach_detach_observers): New functions.
9924 (tui_install_hooks, tui_remove_hooks): Use
9925 tui_attach_detach_observers.
9926 * record-btrace.c (record_btrace_thread_observer): Remove.
9927 (record_btrace_thread_observer_token): New global.
9928 * observer.sh: Remove.
9929 * observer.c: Rename to observable.c.
9930 * observable.c (namespace gdb_observers): Define new objects.
9931 (observer_debug): Move into gdb_observers namespace.
9932 (struct observer, struct observer_list, xalloc_observer_list_node)
9933 (xfree_observer_list_node, generic_observer_attach)
9934 (generic_observer_detach, generic_observer_notify): Remove.
9935 (_initialize_observer): Update.
9936 Don't include observer.inc.
9937 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9938 (clean mostlyclean): Likewise.
9939 (observer.h, observer.inc): Remove targets.
9940 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9941 (COMMON_SFILES): Use observable.c, not observer.c.
9942 * .gitignore: Remove observer.h.
9943
9944 2018-03-18 Tom Tromey <tom@tromey.com>
9945
9946 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9947 gdb::def_vector.
9948 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9949
9950 2018-03-17 Tom Tromey <tom@tromey.com>
9951
9952 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9953
9954 2018-03-17 Tom Tromey <tom@tromey.com>
9955
9956 * target.c (class scoped_target_fd): New.
9957 (target_fileio_close_cleanup): Remove.
9958 (target_fileio_read_alloc_1): Use scoped_target_fd.
9959
9960 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9961
9962 * silent-rules.mk: New.
9963 * Makefile.in: Include silent-rules.mk
9964 (srcdir, VPATH, top_srcdir): Move up.
9965 (COMPILE): Add ECHO_CXX.
9966 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9967 (init.c): Add ECHO_INIT_C.
9968 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9969 (version.c): Add ECHO_GEN.
9970 (printcmd.o): Add ECHO_CXX.
9971 (target-float.o): Add ECHO_CXX.
9972 (ada-exp.o): Add ECHO_CXX.
9973 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9974 (insight$(EXEEXT)): Add ECHO_CXXLD.
9975 * gnulib/configure.ac: Add AM_SILENT_RULES.
9976 * gnulib/aclocal.m4: Re-generate.
9977 * gnulib/configure: Re-generate.
9978 * gnulib/import/Makefile.in: Re-generate.
9979
9980 2018-03-16 Tom Tromey <tom@tromey.com>
9981
9982 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9983 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9984 * utils.c (do_free_section_addr_info)
9985 (make_cleanup_free_section_addr_info): Remove.
9986 * symfile.h (struct other_sections): Add constructor.
9987 (struct section_addr_info): Remove.
9988 (section_addr_info): New typedef.
9989 (struct sym_fns) <sym_offsets>: Change type of parameter.
9990 (build_section_addr_info_from_objfile)
9991 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9992 (default_symfile_offsets, symbol_file_add)
9993 (symbol_file_add_from_bfd)
9994 (build_section_addr_info_from_section_table): Update.
9995 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9996 * symfile.c (alloc_section_addr_info): Remove.
9997 (build_section_addr_info_from_section_table): Change return type.
9998 Update.
9999 (build_section_addr_info_from_bfd)
10000 (build_section_addr_info_from_objfile): Likewise.
10001 (free_section_addr_info): Remove.
10002 (relative_addr_info_to_section_offsets): Change type of "addrs".
10003 (addrs_section_compar): Now a std::sort comparator.
10004 (addrs_section_sort): Change return type.
10005 (addr_info_make_relative): Change type of "addrs". Update.
10006 (default_symfile_offsets, syms_from_objfile_1)
10007 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10008 (symbol_file_add_separate): Update.
10009 (symbol_file_add): Change type of "addrs". Update.
10010 (add_symbol_file_command): Update. Remove cleanups.
10011 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10012 cleanups.
10013 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10014 * solib.c (solib_read_symbols): Update.
10015 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10016 * machoread.c (macho_symfile_offsets): Update.
10017 * jit.c (jit_bfd_try_read_symtab): Update.
10018
10019 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10020
10021 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10022 unittests/utils-selftests.c.
10023 * unittests/utils-selftests.c: New file.
10024
10025 2018-03-14 Tom Tromey <tom@tromey.com>
10026
10027 PR cli/14977:
10028 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10029 for NULL.
10030
10031 2018-03-14 Tom Tromey <tom@tromey.com>
10032
10033 PR cli/19918:
10034 * printcmd.c (printf_pointer): Allow "-" in format.
10035
10036 2018-03-14 Tom Tromey <tom@tromey.com>
10037
10038 * printcmd.c (_initialize_printcmd): Add usage to printf.
10039
10040 2018-03-14 Yao Qi <qiyao@sourceware.org>
10041
10042 * MAINTAINERS: Update my email address.
10043
10044 2018-03-13 Tom Tromey <tom@tromey.com>
10045
10046 * machoread.c (macho_check_dsym): Change filenamep to a
10047 std::string*.
10048 (macho_symfile_read): Update.
10049 * symfile.c (load_command): Use std::string.
10050
10051 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10052
10053 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10054 to error message string.
10055 (riscv_register_name): Use xsnprintf instead of sprintf.
10056 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10057 internal_error.
10058 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10059 error.
10060 (riscv_push_dummy_call): Likewise.
10061
10062 2018-03-12 Tom Tromey <tom@tromey.com>
10063
10064 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10065 Use gdb::byte_vector.
10066 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10067
10068 2018-03-12 Yao Qi <yao.qi@linaro.org>
10069
10070 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10071 parameter type to readable_regcache.
10072 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10073 the declaration.
10074
10075 2018-03-11 Tom Tromey <tom@tromey.com>
10076
10077 * dwarf2read.c (struct nextfield): Add initializers.
10078 (struct nextfnfield): Remove.
10079 (struct fnfieldlist): Add initializers. Remove "length" and
10080 "head", use std::vector.
10081 (struct decl_field_list): Remove.
10082 (struct field_info): Add initializers.
10083 <fields, baseclasses>: Now std::vector.
10084 <nbaseclasses, nfnfields, typedef_field_list_count,
10085 nested_types_list_count>: Remove.
10086 (dwarf2_add_field, dwarf2_add_type_defn)
10087 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10088 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10089 (process_structure_scope): Update.
10090
10091 2018-03-11 Tom Tromey <tom@tromey.com>
10092
10093 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10094 for use by std::sort.
10095 (build_type_psymtabs_1): Use std::vector.
10096
10097 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10098
10099 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10100 and LIBMPFR in the printed configuration.
10101
10102 2018-03-08 Tom Tromey <tom@tromey.com>
10103
10104 * source.c (get_filename_and_charpos): Use scoped_fd.
10105 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10106 (procfs_pidlist): Likewise.
10107 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10108 (iterate_over_mappings): Likewise.
10109
10110 2018-03-08 Tom Tromey <tom@tromey.com>
10111
10112 * infcall.c (struct call_return_meta_info)
10113 <stack_temporaries_enabled>: Remove.
10114 (get_call_return_value, call_function_by_hand_dummy): Update.
10115 * thread.c (disable_thread_stack_temporaries): Remove.
10116 (enable_thread_stack_temporaries): Remove.
10117 (thread_stack_temporaries_enabled_p): Return bool.
10118 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10119 (get_last_thread_stack_temporary): Update.
10120 * eval.c (evaluate_subexp): Update.
10121 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10122 class, not a function.
10123 (value_ptr, value_vec): Remove typedefs.
10124 (class thread_info) <stack_temporaries_enabled>: Now bool.
10125 <stack_temporaries>: Now a std::vector.
10126 (thread_stack_temporaries_enabled_p)
10127 (value_in_thread_stack_temporaries): Return bool.
10128
10129 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10130
10131 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10132 (getpkt_or_notif_sane_1): Likewise.
10133
10134 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10135
10136 * build-id.c (build_id_to_debug_bfd): Use std::string.
10137
10138 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10139
10140 * build-id.c (find_separate_debug_file_by_buildid): Return
10141 std::string.
10142 * build-id.h (find_separate_debug_file_by_buildid): Return
10143 std::string.
10144 * coffread.c (coff_symfile_read): Adjust to std::string.
10145 * elfread.c (elf_symfile_read): Adjust to std::string.
10146 * symfile.c (separate_debug_file_exists): Change parameter to
10147 std::string.
10148 (find_separate_debug_file): Return std::string.
10149 (find_separate_debug_file_by_debuglink): Return std::string.
10150 * symfile.h (find_separate_debug_file_by_debuglink): Return
10151 std::string.
10152
10153 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10154
10155 * common/xml-utils.c (xml_escape_text): Move code to...
10156 (xml_escape_text_append): ... this new function.
10157 * common/xml-utils.h (xml_escape_text_append): New declaration.
10158 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10159 New function.
10160 (_initialize_xml_utils): register test_xml_escape_text_append as
10161 a selftest.
10162
10163 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10164
10165 * defs.h: Remove MAX_REGISTER_SIZE.
10166 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10167 asserts.
10168 * python/py-unwind.c (pyuw_sniffer): Likewise.
10169
10170 2018-03-07 Tom Tromey <tom@tromey.com>
10171
10172 * linux-tdep.c (linux_info_proc): Update.
10173 * target.h (struct target_ops) <to_fileio_readlink>: Return
10174 optional<string>.
10175 (target_fileio_readlink): Return optional<string>.
10176 * remote.c (remote_hostio_readlink): Return optional<string>.
10177 * inf-child.c (inf_child_fileio_readlink): Return
10178 optional<string>.
10179 * target.c (target_fileio_readlink): Return optional<string>.
10180
10181 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10182
10183 * regcache.c (cooked_read_test): Add riscv to the list of
10184 architectures that have a save_reggroup.
10185
10186 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10187
10188 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10189 value is not a dynamic class object.
10190
10191 2018-03-06 Tom Tromey <tom@tromey.com>
10192
10193 * rust-exp.y: Formatting fixes.
10194
10195 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10196
10197 * riscv-tdep.c (riscv_register_name): Remove target description
10198 support.
10199 (riscv_gdbarch_init): Remove target description check.
10200
10201 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10202
10203 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10204 comment.
10205 * riscv-tdep.h: Likewise.
10206
10207 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10208
10209 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10210 (riscv_pseudo_register_write): Delete.
10211 (riscv_gdbarch_init): Remove all use of pseudo registers.
10212
10213 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10214
10215 * record-btrace.c (btrace_print_lines): Replace cleanup
10216 parameter with RAII equivalents.
10217 (btrace_insn_history): Replace cleanup with RAII equivalents.
10218 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10219 make_cleanup_ui_out_tuple_begin_end): Remove.
10220 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10221 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10222 make_cleanup_ui_out_list_begin_end): Remove.
10223
10224 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10225
10226 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10227 parameter types to std::vector. Use bool.
10228 (record_btrace_wait): Replace VEC(tp_t) with
10229 std::vector<thread_info *>.
10230 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10231
10232 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10233
10234 * record-btrace.c (record_btrace_disable_callback): Remove.
10235 (struct scoped_btrace_disable): New.
10236 (record_btrace_open): Use scoped_btrace_disable.
10237
10238 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10239
10240 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10241 reading values from registers.
10242
10243 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10244
10245 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10246 where appropriate.
10247
10248 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10249
10250 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10251 change parameter type. Use GDB's print functions, and use
10252 core_addr_to_string where appropriate.
10253 (riscv_push_dummy_call): Use core_addr_to_string where
10254 appropriate, update call to riscv_print_arg_location, and reindent
10255 a few lines.
10256 (riscv_return_value): Update call to riscv_print_arg_location.
10257
10258 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10259 Tim Newsome <tim@sifive.com>
10260 Albert Ou <a0u@eecs.berkeley.edu>
10261 Darius Rad <darius@bluespec.com>
10262
10263 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10264 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10265 (ALLDEPFILES): Add riscv-tdep.c
10266 * configure.tgt: Add riscv support.
10267 * riscv-tdep.c: New file.
10268 * riscv-tdep.h: New file.
10269 * NEWS: Mention new target.
10270 * MAINTAINERS: Add entry for riscv.
10271
10272 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10273
10274 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10275 fields within aggregates.
10276
10277 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10278
10279 * record-btrace.c (btrace_print_lines): Change type of flags to
10280 gdb_disassembly_flags.
10281
10282 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10283
10284 * fbsd-nat.c: Include "inf-ptrace.h".
10285 (USE_SIGTRAP_SIGINFO): Conditionally define.
10286 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10287 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10288 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10289 function.
10290 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10291 Likewise.
10292 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10293 Likewise.
10294 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10295 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10296 "supports_stopped_by_hw_breakpoint" target methods.
10297
10298 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10299
10300 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10301 * fbsd-nat.c (debug_fbsd_nat): New variable.
10302 (show_fbsd_nat_debug): New function.
10303 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10304 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10305
10306 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10307
10308 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10309 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10310 prototype.
10311 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10312 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10313 method.
10314
10315 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10316
10317 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10318 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10319
10320 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10321
10322 * charset.c (struct charset_vector): New.
10323 (charsets): Change type to charset_vector.
10324 (find_charset_names): Adjust.
10325 (add_one): Adjust.
10326 (_initialize_charset): Adjust.
10327
10328 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10329
10330 * progspace.h (struct program_space) <deleted_solibs>: Change
10331 type to std::vector<std::string>.
10332 * progspace.c (clear_program_space_solib_cache): Adjust.
10333 * breakpoint.c (print_solib_event): Adjust.
10334 (check_status_catch_solib): Adjust.
10335 * solib.c (update_solib_list): Adjust.
10336 * ui-out.h (class ui_out) <field_string>: New overload.
10337 * ui-out.c (ui_out::field_string): New overload.
10338
10339 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10340
10341 * progspace.h (struct program_space): Add constructor and
10342 destructor, initialize fields.
10343 (add_program_space): Remove.
10344 * progspace.c (add_program_space): Rename to...
10345 (program_space::program_space): ... this.
10346 (release_program_space): Rename to...
10347 (program_space::~program_space): ... this.
10348 (delete_program_space): Use delete to delete program_space.
10349 (initialize_progspace): Use new to allocate program_space.
10350 * inferior.c (add_inferior_with_spaces): Likewise.
10351 (clone_inferior_command): Likewise.
10352 * infrun.c (follow_fork_inferior): Likewise.
10353 (handle_vfork_child_exec_or_exit): Likewise.
10354
10355 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10356
10357 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10358 (delim_string_to_char_ptr_vec): Return std::vector of
10359 gdb::unique_xmalloc_ptr.
10360 (dirnames_to_char_ptr_vec_append): Take std::vector of
10361 gdb::unique_xmalloc_ptr.
10362 (dirnames_to_char_ptr_vec): Return std::vector of
10363 gdb::unique_xmalloc_ptr.
10364 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10365 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10366 (delim_string_to_char_ptr_vec): Return an std::vector of
10367 gdb::unique_xmalloc_ptr, adjust the code.
10368 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10369 gdb::unique_xmalloc_ptr, adjust the code.
10370 (dirnames_to_char_ptr_vec): Return an std::vector of
10371 gdb::unique_xmalloc_ptr, adjust the code.
10372 * auto-load.c (auto_load_safe_path_vec): Change type to
10373 std::vector of gdb::unique_xmalloc_ptr.
10374 (auto_load_expand_dir_vars): Return an std::vector of
10375 gdb::unique_xmalloc_ptr, adjust the code.
10376 (auto_load_safe_path_vec_update): Adjust.
10377 (filename_is_in_auto_load_safe_path_vec): Adjust.
10378 (auto_load_objfile_script_1): Adjust.
10379 * build-id.c (build_id_to_debug_bfd): Adjust.
10380 * linux-thread-db.c (thread_db_load_search): Adjust.
10381 * source.c (add_path): Adjust.
10382 (openp): Adjust.
10383 * symfile.c (find_separate_debug_file): Adjust.
10384 * utils.c (do_free_char_ptr_vec): Remove.
10385 (make_cleanup_free_char_ptr_vec): Remove.
10386
10387 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10388
10389 PR gdb/22907
10390 * common/pathstuff.c: Conditionally include "<windows.h>".
10391
10392 2018-03-01 Georg Sauthoff <mail@georg.so>
10393
10394 PR gdb/22888
10395 * gcore.in: Quote variables and switch interpreter to bash.
10396
10397 2018-03-01 Tom Tromey <tom@tromey.com>
10398
10399 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10400 assertion. Add assertion for discriminant_index.
10401 (quirk_rust_enum): Use correct base type name in univariant case.
10402
10403 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10404
10405 * record.c (get_call_history_modifiers): Return a
10406 record_print_flags.
10407 (cmd_record_call_history): Adjust.
10408 * record-btrace.c (record_btrace_call_history): Adjust.
10409 (record_btrace_call_history_range): Adjust.
10410 (record_btrace_call_history_from): Adjust.
10411 * target-debug.h (target_debug_print_record_print_flags): New.
10412 * target-delegates.c: Re-generate.
10413 * target.c (target_call_history): Change flags type.
10414 (target_call_history_from): Likewise.
10415 (target_call_history_range): Likewise.
10416 * target.h (struct target_ops) <target_call_history>: Likewise.
10417 (target_call_history_from): Likewise.
10418 (target_call_history_range): Likewise.
10419
10420 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10421 Simon Marchi <simon.marchi@polymtl.ca>
10422
10423 * common/common-utils.c: Include "sys/stat.h".
10424 (is_regular_file): Move here from "source.c"; change return
10425 type to "bool".
10426 * common/common-utils.h (is_regular_file): New prototype.
10427 * common/pathstuff.c (contains_dir_separator): New function.
10428 * common/pathstuff.h (contains_dir_separator): New prototype.
10429 * source.c: Don't include "sys/stat.h".
10430 (is_regular_file): Move to "common/common-utils.c".
10431
10432 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10433
10434 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10435 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10436 * auto-load.c: Include "common/pathstuff.h".
10437 * common/common-def.h (current_directory): Move here.
10438 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10439 function.
10440 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10441 prototype.
10442 * common/pathstuff.c: New file.
10443 * common/pathstuff.h: New file.
10444 * compile/compile.c: Include "common/pathstuff.h".
10445 * defs.h (current_directory): Move to "common/common-defs.h".
10446 * dwarf2read.c: Include "common/pathstuff.h".
10447 * exec.c: Likewise.
10448 * guile/scm-safe-call.c: Likewise.
10449 * linux-thread-db.c: Likewise.
10450 * main.c: Likewise.
10451 * nto-tdep.c: Likewise.
10452 * objfiles.c: Likewise.
10453 * source.c: Likewise.
10454 * symtab.c: Likewise.
10455 * utils.c: Include "common/pathstuff.h".
10456 (gdb_realpath): Move to "common/pathstuff.c".
10457 (gdb_realpath_keepfile): Likewise.
10458 (gdb_abspath): Likewise.
10459 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10460 (gdb_realpath_keepfile): Likewise.
10461 (gdb_abspath): Likewise.
10462
10463 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10464
10465 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10466 wildcard process pid for super_resume for kernels with a
10467 specific bug.
10468
10469 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10470
10471 * compile/compile.c (get_args): Add additional comments
10472 explaining function.
10473
10474 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10475 Tom Tromey <tom@tromey.com>
10476
10477 * target.h (memory_write_request_s): Remove typedef. Don't define
10478 VEC.
10479 (target_write_memory_blocks): Change argument to std::vector.
10480 (struct memory_write_request): Add constructor.
10481 * target-memory.c (compare_block_starting_address): Return bool.
10482 Change argument types.
10483 (claim_memory): Change arguments to use std::vector.
10484 (split_regular_and_flash_blocks, blocks_to_erase)
10485 (compute_garbled_blocks): Likewise.
10486 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10487 (target_write_memory_blocks): Change argument to std::vector.
10488 * symfile.c (struct load_section_data): Add constructor and
10489 destructor. Use std::vector for "requests".
10490 (struct load_progress_data): Add initializers.
10491 (load_section_callback): Update. Use "new".
10492 (clear_memory_write_data): Remove.
10493 (generic_load): Update.
10494
10495 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10496
10497 * arch/aarch64.h: Use common/tdesc.h.
10498
10499 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10500
10501 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10502 architecture with a 64-bit ABI.
10503
10504 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10505
10506 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10507 ahead of target description loading.
10508
10509 2018-02-26 Tom Tromey <tom@tromey.com>
10510
10511 * stack.c (backtrace_command_1): Update.
10512 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10513 of "flags".
10514 * python/py-framefilter.c (py_print_frame)
10515 (gdbpy_apply_frame_filter): Change type of "flags".
10516 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10517 of "flags".
10518 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10519 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10520 * extension.h (enum frame_filter_flag): Rename from
10521 frame_filter_flags.
10522 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10523 (apply_ext_lang_frame_filter): Change type of "flags".
10524 * extension.c (apply_ext_lang_frame_filter): Change type of
10525 "flags".
10526 * extension-priv.h (struct extension_language_ops)
10527 <apply_frame_filter>: Change type of "flags".
10528
10529 2018-02-26 Tom Tromey <tom@tromey.com>
10530
10531 PR python/16497:
10532 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10533 off-by-one in py_end computation.
10534 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10535 PRINT_MORE_FRAMES.
10536 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10537 constant.
10538
10539 2018-02-26 Tom Tromey <tom@tromey.com>
10540
10541 * dwarf2read.c (struct variant_field): New.
10542 (struct nextfield) <variant>: New field.
10543 (dwarf2_add_field): Handle DW_TAG_variant_part.
10544 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10545 discriminated union.
10546 (read_structure_type): Handle DW_TAG_variant_part.
10547 (handle_struct_member_die): New function, extracted from
10548 process_structure_scope. Handle DW_TAG_variant.
10549 (process_structure_scope): Handle discriminated unions. Call
10550 handle_struct_member_die.
10551
10552 2018-02-26 Tom Tromey <tom@tromey.com>
10553
10554 * rust-lang.h (rust_last_path_segment): Declare.
10555 * rust-lang.c (rust_last_path_segment): Now public. Change
10556 contract.
10557 (struct disr_info): Remove.
10558 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10559 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10560 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10561 (rust_enum_p, rust_enum_variant): New function.
10562 (rust_underscore_fields): Remove "offset" parameter.
10563 (rust_print_enum): New function.
10564 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10565 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10566 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10567 enums.
10568 (rust_internal_print_type): New function, from rust_print_type.
10569 Remove enum code.
10570 (rust_print_type): Call rust_internal_print_type.
10571 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10572 Update enum handling.
10573 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10574 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10575 (rust_union_quirks): New functions.
10576 (process_full_comp_unit, process_full_type_unit): Call
10577 rust_union_quirks.
10578 (process_structure_scope): Update rust_unions if necessary.
10579
10580 2018-02-26 Tom Tromey <tom@tromey.com>
10581
10582 * value.h (value_union_variant): Declare.
10583 * valops.c (value_union_variant): New function.
10584 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10585 (struct discriminant_info): New.
10586 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10587 enumerator.
10588 (struct main_type) <flag_discriminated_union>: New field.
10589
10590 2018-02-26 Tom Tromey <tom@tromey.com>
10591
10592 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10593 unittests/unpack-selftests.c.
10594 * unittests/unpack-selftests.c: New file.
10595 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10596
10597 2018-02-26 Yao Qi <yao.qi@linaro.org>
10598
10599 * dwarf2read.c (struct partial_die_info) <read>: New method.
10600 (read_partial_die): Remove the declaration.
10601 (load_partial_dies): Update.
10602 (partial_die_info::partial_die_info):
10603 (read_partial_die): Change it to partial_die_info::read.
10604
10605 2018-02-26 Yao Qi <yao.qi@linaro.org>
10606
10607 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10608 (fixup_partial_die): Remove declaration.
10609 (scan_partial_symbols): Update.
10610 (partial_die_parent_scope): Likewise.
10611 (partial_die_full_name): Likewise.
10612 (fixup_partial_die): Change it to partial_die_info::fixup.
10613
10614 2018-02-26 Yao Qi <yao.qi@linaro.org>
10615
10616 * dwarf2read.c (read_partial_die): Update the declaration.
10617 (load_partial_dies): Caller update.
10618 (read_partial_die): Remove one argument abbrev_len.
10619
10620 2018-02-26 Yao Qi <yao.qi@linaro.org>
10621
10622 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10623 assignment operator.
10624 (load_partial_dies): Use ctor and copy ctor.
10625 (read_partial_die): Update.
10626 (dwarf2_cu::find_partial_die): Use ctor.
10627
10628 2018-02-26 Yao Qi <yao.qi@linaro.org>
10629
10630 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10631 (find_partial_die_in_comp_unit): Change it to
10632 dwarf2_cu::find_partial_die.
10633 (find_partial_die): Update.
10634
10635 2018-02-26 Yao Qi <yao.qi@linaro.org>
10636
10637 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10638 is NULL.
10639
10640 2018-02-26 Yao Qi <yao.qi@linaro.org>
10641
10642 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10643
10644 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10645
10646 * arch/amd64.h: Use common/tdesc.h.
10647 * arch/i386.c: Likewise.
10648 * arch/i386.h: Likewise.
10649 * arch/tic6x.c: Likewise.
10650 * arch/tdesc.h: Move file from here...
10651 * common/tdesc.h: ...to here.
10652 * features/aarch64-core.c: Regenerate.
10653 * features/aarch64-fpu.c: Regenerate.
10654 * features/i386/32bit-avx.c: Regenerate.
10655 * features/i386/32bit-avx512.c: Regenerate.
10656 * features/i386/32bit-core.c: Regenerate.
10657 * features/i386/32bit-linux.c: Regenerate.
10658 * features/i386/32bit-mpx.c: Regenerate.
10659 * features/i386/32bit-pkeys.c: Regenerate.
10660 * features/i386/32bit-sse.c: Regenerate.
10661 * features/i386/64bit-avx.c: Regenerate.
10662 * features/i386/64bit-avx512.c: Regenerate.
10663 * features/i386/64bit-core.c: Regenerate.
10664 * features/i386/64bit-linux.c: Regenerate.
10665 * features/i386/64bit-mpx.c: Regenerate.
10666 * features/i386/64bit-pkeys.c: Regenerate.
10667 * features/i386/64bit-segments.c: Regenerate.
10668 * features/i386/64bit-sse.c: Regenerate.
10669 * features/i386/x32-core.c: Regenerate.
10670 * features/tic6x-c6xp.c: Regenerate.
10671 * features/tic6x-core.c: Regenerate.
10672 * features/tic6x-gp.c: Regenerate.
10673 * target-descriptions.c: Use common/tdesc.h.
10674 * target-descriptions.h: Likewise.
10675
10676 2018-02-24 Tom Tromey <tom@tromey.com>
10677
10678 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10679 (try_thread_db_load_from_dir, thread_db_load_search): Use
10680 std::string.
10681 (info_auto_load_libthread_db_compare): Return bool. Change
10682 argument types.
10683 (info_auto_load_libthread_db): Use std::vector, std::string.
10684 Remove cleanups.
10685
10686 2018-02-24 Tom Tromey <tom@tromey.com>
10687
10688 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10689 std::string.
10690 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10691 std::string*.
10692 * gdbarch.c: Rebuild.
10693 * gdbarch.h: Rebuild.
10694 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10695 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10696 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10697 std::string*.
10698
10699 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10700
10701 * gdbtypes.h (sect_offset): Change type to uint64_t.
10702 (sect_offset_str): New function.
10703 * dwarf2read.c (create_addrmap_from_aranges): Use
10704 sect_offset_str.
10705 (error_check_comp_unit_head): Likewise.
10706 (create_debug_type_hash_table): Likewise.
10707 (read_cutu_die_from_dwo): Likewise.
10708 (init_cutu_and_read_dies): Likewise.
10709 (init_cutu_and_read_dies_no_follow): Likewise.
10710 (process_psymtab_comp_unit_reader): Likewise.
10711 (partial_die_parent_scope): Likewise.
10712 (peek_die_abbrev): Likewise.
10713 (process_queue): Likewise.
10714 (dwarf2_physname): Likewise.
10715 (read_namespace_alias): Likewise.
10716 (read_import_statement): Likewise.
10717 (create_dwo_cu_reader): Likewise.
10718 (create_cus_hash_table): Likewise.
10719 (lookup_dwo_cutu): Likewise.
10720 (inherit_abstract_dies): Likewise.
10721 (read_func_scope): Likewise.
10722 (read_call_site_scope): Likewise.
10723 (dwarf2_add_member_fn): Likewise.
10724 (read_common_block): Likewise.
10725 (read_module_type): Likewise.
10726 (read_typedef): Likewise.
10727 (read_subrange_type): Likewise.
10728 (load_partial_dies): Likewise.
10729 (read_partial_die): Likewise.
10730 (find_partial_die): Likewise.
10731 (read_str_index): Likewise.
10732 (dwarf2_string_attr): Likewise.
10733 (build_error_marker_type): Likewise.
10734 (lookup_die_type): Likewise.
10735 (dump_die_shallow): Likewise.
10736 (follow_die_ref): Likewise.
10737 (dwarf2_fetch_die_loc_sect_off): Likewise.
10738 (dwarf2_fetch_constant_bytes): Likewise.
10739 (follow_die_sig): Likewise.
10740 (get_signatured_type): Likewise.
10741 (get_DW_AT_signature_type): Likewise.
10742 (dwarf2_find_containing_comp_unit): Likewise.
10743 (set_die_type): Likewise.
10744
10745 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10746
10747 * arch/aarch64.c: Include "common-defs.h".
10748 * arch/amd64.c: Likewise.
10749 * arch/i386.c: Likewise.
10750
10751 2018-02-21 Tom Tromey <tom@tromey.com>
10752
10753 * value.h: (extract_field_op): Update.
10754 * eval.c (extract_field_op): Return a const char *.
10755 * expression.h (parse_expression_for_completion): Update.
10756 * completer.c (complete_expression): Update.
10757 (add_struct_fields): Make fieldname const.
10758 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10759 (mark_completion_tag, parse_exp_in_context_1): Update.
10760 (parse_expression_for_completion): Change "name" to
10761 unique_xmalloc_ptr*.
10762
10763 2018-02-21 Tom Tromey <tom@tromey.com>
10764
10765 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10766
10767 2018-02-21 Yao Qi <yao.qi@linaro.org>
10768
10769 * avr-tdep.c (avr_read_pc): Change parameter type to
10770 readable_regcache.
10771 * gdbarch.sh (read_pc): Likewise.
10772 * gdbarch.c: Re-generated.
10773 * gdbarch.h: Re-generated.
10774 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10775 readable_regcache.
10776 * ia64-tdep.c (ia64_read_pc): Likewise.
10777 * mips-tdep.c (mips_read_pc): Likewise.
10778 * spu-tdep.c (spu_read_pc): Likewise.
10779
10780 2018-02-21 Yao Qi <yao.qi@linaro.org>
10781
10782 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10783 * regcache-dump.c: New file.
10784 * regcache.c: Move register_dump to regcache-dump.c.
10785 (maintenance_print_registers): Likewise.
10786 (maintenance_print_raw_registers): Likewise.
10787 (maintenance_print_cooked_registers): Likewise.
10788 (maintenance_print_register_groups): Likewise.
10789 (maintenance_print_remote_registers): Likewise.
10790 (_initialize_regcache): Likewise.
10791 * regcache.h (register_dump): Moved from regcache.c.
10792
10793 2018-02-21 Yao Qi <yao.qi@linaro.org>
10794
10795 * regcache.c (regcache::regcache): Update.
10796 (regcache::invalidate): Move it to detached_regcache::invalidate.
10797 (get_thread_arch_aspace_regcache): Update.
10798 (regcache::raw_update): Update.
10799 (regcache::cooked_read): Remove some code.
10800 (regcache::cooked_read_value): Likewise.
10801 (regcache::raw_write): Remove assert on m_readonly_p.
10802 (regcache::raw_supply_integer): Move it to
10803 detached_regcache::raw_supply_integer.
10804 (regcache::raw_supply_zeroed): Likewise.
10805 * regcache.h (detached_regcache) <raw_supply_integer>: New
10806 declaration.
10807 <raw_supply_zeroed, invalidate>: Likewise.
10808 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10809 <invalidate>: Likewise.
10810 <m_readonly_p>: Removed.
10811
10812 2018-02-21 Yao Qi <yao.qi@linaro.org>
10813
10814 * infcmd.c (get_return_value): Let stop_regs point to
10815 get_current_regcache.
10816 * regcache.c (regcache::regcache): Remove.
10817 (register_dump_reg_buffer): New class.
10818 (regcache_print): Adjust.
10819 * regcache.h (regcache): Remove constructors.
10820
10821 2018-02-21 Yao Qi <yao.qi@linaro.org>
10822
10823 * regcache.c (class register_dump): New class.
10824 (register_dump_regcache, register_dump_none): New class.
10825 (register_dump_remote, register_dump_groups): New class.
10826 (regcache_print): Update.
10827 * regcache.h (regcache_dump_what): Move it to regcache.c.
10828 (regcache) <dump>: Remove.
10829
10830 2018-02-21 Yao Qi <yao.qi@linaro.org>
10831
10832 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10833 reg_buffer_rw *.
10834 (jit_unwind_reg_set_impl): Call raw_supply.
10835 (jit_frame_sniffer): Use reg_buffer_rw.
10836 * record-full.c (record_full_core_regbuf): Change its type.
10837 (record_full_core_open_1): Use reg_buffer_rw.
10838 (record_full_close): Likewise.
10839 (record_full_core_fetch_registers): Use regcache->raw_supply.
10840 (record_full_core_store_registers): Likewise.
10841 * regcache.c (regcache::get_register_status): Move it to
10842 reg_buffer.
10843 (regcache_raw_set_cached_value): Remove.
10844 (regcache::raw_set_cached_value): Remove.
10845 (regcache::raw_write): Call raw_supply.
10846 (regcache::raw_supply): Move it to reg_buffer_rw.
10847 * regcache.h (regcache_raw_set_cached_value): Remove.
10848 (reg_buffer_rw): New class.
10849
10850 2018-02-21 Yao Qi <yao.qi@linaro.org>
10851
10852 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10853 readonly_detached_regcache.
10854 (dummy_frame_prev_register): Use regcache->cooked_read.
10855 * frame.c (frame_save_as_regcache): Change return type.
10856 (frame_pop): Update.
10857 * frame.h (frame_save_as_regcache): Update declaration.
10858 * inferior.h (get_infcall_suspend_state_regcache): Update
10859 declaration.
10860 * infrun.c (infcall_suspend_state) <registers>: use
10861 readonly_detached_regcache.
10862 (save_infcall_suspend_state): Don't use regcache_dup.
10863 (get_infcall_suspend_state_regcache): Change return type.
10864 * linux-fork.c (struct fork_info) <savedregs>: Change to
10865 readonly_detached_regcache.
10866 <pc>: New field.
10867 (fork_save_infrun_state): Don't use regcache_dup.
10868 (info_checkpoints_command): Adjust.
10869 * mi/mi-main.c (register_changed_p): Update declaration.
10870 (mi_cmd_data_list_changed_registers): Use
10871 readonly_detached_regcache.
10872 (register_changed_p): Change parameter type to
10873 readonly_detached_regcache.
10874 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10875 readonly_detached_regcache.
10876 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10877 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10878 New.
10879 (regcache::save): Move it to reg_buffer.
10880 (regcache::restore): Change parameter type.
10881 (regcache_dup): Remove.
10882 * regcache.h (reg_buffer) <save>: New method.
10883 (readonly_detached_regcache): New class.
10884 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10885 readonly_detached_regcache.
10886 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10887
10888 2018-02-21 Yao Qi <yao.qi@linaro.org>
10889
10890 * frame.c (frame_save_as_regcache): Use regcache method save.
10891 (frame_pop): Use regcache method restore.
10892 * infrun.c (restore_infcall_suspend_state): Likewise.
10893 * linux-fork.c (fork_load_infrun_state): Likewise.
10894 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10895 save.
10896 * regcache.c (regcache_save): Remove.
10897 (regcache::restore): More asserts.
10898 (regcache_cpy): Remove.
10899 * regcache.h (regcache_save): Remove the declaration.
10900 (regcache::restore): Move from private to public.
10901 Remove the friend declaration of regcache_cpy.
10902 (regcache_cpy): Remove declaration.
10903
10904 2018-02-21 Yao Qi <yao.qi@linaro.org>
10905
10906 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10907 parameter type to 'readable_regcache *'.
10908 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10909 * arm-tdep.c (arm_neon_quad_read): Likewise.
10910 (arm_pseudo_read): Likewise.
10911 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10912 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10913 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10914 * gdbarch.c: Re-generated.
10915 * gdbarch.h: Re-generated.
10916 * gdbarch.sh (pseudo_register_read): Change parameter type to
10917 'readable_regcache *'.
10918 (pseudo_register_read_value): Likewise.
10919 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10920 (h8300_pseudo_register_read): Likewise.
10921 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10922 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10923 (i386_pseudo_register_read_into_value): Likewise.
10924 (i386_pseudo_register_read_value): Likewise.
10925 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10926 declaration.
10927 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10928 * m32c-tdep.c (m32c_raw_read): Likewise.
10929 (m32c_read_flg): Likewise.
10930 (m32c_banked_register): Likewise.
10931 (m32c_banked_read): Likewise.
10932 (m32c_sb_read): Likewise.
10933 (m32c_part_read): Likewise.
10934 (m32c_cat_read): Likewise.
10935 (m32c_r3r2r1r0_read): Likewise.
10936 (m32c_pseudo_register_read): Likewise.
10937 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10938 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10939 (mep_pseudo_cr64_read): Likewise.
10940 (mep_pseudo_register_read): Likewise.
10941 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10942 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10943 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10944 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10945 (regcache::cooked_read): Likewise.
10946 (regcache::cooked_read_value): Likewise.
10947 (regcache_cooked_read_signed):
10948 (regcache::cooked_read): Likewise.
10949 * regcache.h (readable_regcache): New class.
10950 (regcache): Inherit readable_regcache. Move some methods to
10951 readable_regcache.
10952 * rl78-tdep.c (rl78_pseudo_register_read): Change
10953 parameter type to 'readable_regcache *'.
10954 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10955 (e500_pseudo_register_read): Change parameter type to
10956 'readable_regcache *'.
10957 (dfp_pseudo_register_read): Likewise.
10958 (vsx_pseudo_register_read): Likewise.
10959 (efpr_pseudo_register_read): Likewise.
10960 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10961 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10962 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10963 (sh64_pseudo_register_read): Likewise.
10964 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10965 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10966 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10967 (spu_pseudo_register_read): Likewise.
10968 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10969 (xtensa_pseudo_register_read): Likewise.
10970
10971 2018-02-21 Yao Qi <yao.qi@linaro.org>
10972
10973 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10974 (regcache::arch): Move it to reg_buffer::arch.
10975 (regcache::register_buffer): Likewise.
10976 (regcache::assert_regnum): Likewise.
10977 (regcache::num_raw_registers): Likewise.
10978 * regcache.h (reg_buffer): New class.
10979 (regcache): Inherit reg_buffer.
10980
10981 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10982
10983 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10984 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10985
10986 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10987
10988 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10989
10990 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10991
10992 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10993 (SFILES): Remove common/*.c files.
10994 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10995 * common/common.host: Add common reference.
10996 * configure.ac: Likewise.
10997 * configure: Regenerate.
10998
10999 2018-02-16 Yao Qi <yao.qi@linaro.org>
11000
11001 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11002 (block_initialize_namespace): Use new.
11003 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11004 (dwarf2_free_objfile): Use delete.
11005 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11006 (copy_type_recursive): Use new.
11007 * gdb_obstack.h (allocate_on_obstack): New.
11008
11009 2018-02-15 Yao Qi <yao.qi@linaro.org>
11010
11011 PR gdb/22849
11012 * inferior.c (exit_inferior_1): Reset inf->control.
11013
11014 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11015
11016 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11017 declaration.
11018
11019 2018-02-14 Pedro Alves <palves@redhat.com>
11020
11021 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11022 frame_cleanup_after_sniffer on exception.
11023
11024 2018-02-14 Tom Tromey <tom@tromey.com>
11025
11026 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11027 const.
11028 (solib_bfd_open): Make pathname const.
11029 * solib.c (solib_bfd_open): Make pathname const.
11030 * solib-spu.c (spu_bfd_fopen): Make name const.
11031 (spu_bfd_open): Make pathname const.
11032 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11033 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11034
11035 2018-02-14 Tom Tromey <tom@tromey.com>
11036
11037 * symfile.c (symfile_bfd_open): Update.
11038 * source.h (openp, source_full_path_of, find_and_open_source):
11039 Change argument type to unique_xmalloc_ptr.
11040 * source.c (openp): Take a unique_xmalloc_ptr.
11041 (source_full_path_of, find_and_open_source): Likewise.
11042 (open_source_file, symtab_to_fullname): Update.
11043 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11044 unique_xmalloc_ptr.
11045 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11046 (exec_file_find): Update.
11047 * psymtab.c (psymtab_to_fullname): Update.
11048 * nto-tdep.h (nto_find_and_open_solib): Update.
11049 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11050 unique_xmalloc_ptr.
11051 * exec.c (exec_file_attach): Update.
11052 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11053 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11054
11055 2018-02-14 Tom Tromey <tom@tromey.com>
11056
11057 * solib.c: Include source.h.
11058 * nto-tdep.c: Include source.h.
11059 * mi/mi-cmd-env.c: Include source.h.
11060 * infcmd.c: Include source.h.
11061 * exec.c: Include source.h.
11062 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11063 (add_path, directory_switch, source_path, init_source_path): Move
11064 declarations...
11065 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11066 (add_path, directory_switch, source_path, init_source_path):
11067 ...here.
11068
11069 2018-02-14 Tom Tromey <tom@tromey.com>
11070
11071 * solist.h (exec_file_find, solib_find): Return
11072 unique_xmalloc_ptr.
11073 (solib_bfd_fopen): Take a const char *.
11074 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11075 (exec_file_find, solib_find): Likewise.
11076 (solib_bfd_fopen): Do not take ownership of "pathname".
11077 (solib_bfd_open): Use unique_xmalloc_ptr.
11078 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11079 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11080 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11081 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11082
11083 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11084
11085 * ada-lang.c (name_match_type_from_name): Remove reference to
11086 ada_name_for_lookup in function's documentation.
11087 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11088
11089 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11090
11091 * defs.h (enum openp_flags): New enum.
11092 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11093 Move to enum openp_flags.
11094 (openp_flags): New enum flags.
11095 (openp): Change parameter type to openp_flags.
11096 * source.c (openp): Change parameter type to openp_flags.
11097 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11098 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11099
11100 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11101
11102 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11103 per-command.
11104
11105 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11106
11107 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11108 into...
11109 (class dwarf2_queue_guard): ...the destructor of this new class.
11110 (dw2_do_instantiate_symtab): Create instance of the new class
11111 dwarf2_queue_guard, remove cleanup.
11112
11113 2018-02-09 Tom Tromey <tom@tromey.com>
11114
11115 * source.c (find_source_lines): Don't reference past the end of
11116 the vector.
11117
11118 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11119
11120 * remote.c (remote_btrace_maybe_reopen): Change error message.
11121 * btrace.c (btrace_enable): Likewise.
11122 (parse_xml_btrace): Likewise.
11123 (parse_xml_btrace_conf): Likewise.
11124
11125 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11126
11127 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11128 (linux_enable_pt, linux_enable_bts): Call
11129 diagnose_perf_event_open_fail.
11130
11131 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11132
11133 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11134 Remove parameter and change return type. Update callers. Move it.
11135 (linux_enable_bts, linux_enable_pt): Improve error message.
11136 (linux_enable_pt): Remove zero buffer size check.
11137 (linux_enable_btrace): Improve error messages. Remove NULL return
11138 check.
11139
11140 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11141
11142 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11143 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11144 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11145 (linux_supports_pt, linux_supports_btrace): Remove.
11146 (linux_enable_bts): Call cpu_supports_bts.
11147 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11148 * remote.c (remote_supports_btrace): Remove.
11149 (init_remote_ops): Remove remote_supports_btrace.
11150 * target-delegates.c: Regenerated.
11151 * target.c (target_supports_btrace): Remove.
11152 * target.h (target_ops) <to_supports_btrace>: Remove
11153 (target_supports_btrace): Remove.
11154 * x86-linux-nat.c (x86_linux_create_target): Remove
11155 linux_supports_btrace.
11156
11157 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11158
11159 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11160 btrace failed.
11161 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11162 exception and use message in own exception.
11163
11164 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11165
11166 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11167 (perf_event_pt_event_type): Use gdb_file_up.
11168 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11169 scoped_fd, and scoped_mmap.
11170
11171 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11172
11173 * common/scoped_mmap.h: New.
11174 * unittests/scoped_mmap-selftest.c: New.
11175 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11176 unittests/scoped_mmap-selftest.c.
11177
11178 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11179
11180 * common/scoped_fd.h: New.
11181 * unittests/scoped_fd-selftest.c: New.
11182 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11183 unittests/scoped_fd-selftest.c.
11184
11185 2018-02-09 Tom Tromey <tom@tromey.com>
11186
11187 * auto-load.c (auto_load_section_scripts): Use
11188 gdb::unique_xmalloc_ptr.
11189
11190 2018-02-09 Tom Tromey <tom@tromey.com>
11191
11192 * auto-load.c (execute_script_contents): Use std::string.
11193
11194 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11195
11196 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11197 Python function, rather than a new command.
11198
11199 2018-02-08 Tom Tromey <tom@tromey.com>
11200
11201 * solib.c (solib_find_1): Use std::string.
11202 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11203
11204 2018-02-08 Tom Tromey <tom@tromey.com>
11205
11206 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11207
11208 2018-02-08 Tom Tromey <tom@tromey.com>
11209
11210 * source.c (find_source_lines): Use gdb::def_vector.
11211
11212 2018-02-08 Tom Tromey <tom@tromey.com>
11213
11214 * macrocmd.c (struct temporary_macro_definition): New.
11215 (macro_define_command): Use temporary_macro_definition. Remove
11216 cleanups.
11217 (free_macro_definition_ptr): Remove.
11218
11219 2018-02-08 Tom Tromey <tom@tromey.com>
11220
11221 * macroexp.c (maybe_expand): Use std::string.
11222
11223 2018-02-08 Tom Tromey <tom@tromey.com>
11224
11225 * macroexp.c (struct macro_buffer): Add initializers for some
11226 members.
11227 (init_buffer, init_shared_buffer, free_buffer)
11228 (free_buffer_return_text): Remove.
11229 (macro_buffer): New constructors.
11230 (~macro_buffer): New destructor.
11231 (macro_buffer::set_shared): New method.
11232 (macro_buffer::resize_buffer, macro_buffer::appendc)
11233 (macro_buffer::appendmem): Now methods, not free functions.
11234 (set_token, append_tokens_without_splicing, stringify)
11235 (macro_stringify): Update.
11236 (gather_arguments): Change return type. Remove argc_p argument,
11237 add args_ptr argument. Use std::vector.
11238 (substitute_args): Remove argc argument. Accept std::vector.
11239 (expand): Update. Use std::vector.
11240 (scan, macro_expand, macro_expand_next): Update.
11241
11242 2018-02-08 Tom Tromey <tom@tromey.com>
11243
11244 * symtab.c (default_collect_symbol_completion_matches_break_on):
11245 Use unique_xmalloc_ptr.
11246 * macroscope.h: (sal_macro_scope, user_macro_scope)
11247 (default_macro_scope): Return unique_xmalloc_ptr.
11248 * macroscope.c (sal_macro_scope, user_macro_scope)
11249 (default_macro_scope): Return unique_xmalloc_ptr.
11250 * macroexp.h (macro_expand, macro_expand_once): Return
11251 unique_xmalloc_ptr.
11252 * macroexp.c (macro_expand, macro_expand_once): Return
11253 unique_xmalloc_ptr.
11254 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11255 (info_macro_command, info_macros_command): Use
11256 unique_xmalloc_ptr.
11257 * compile/compile-c-support.c (write_macro_definitions): Use
11258 unique_xmalloc_ptr.
11259 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11260
11261 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11262
11263 * value.c (value_static_field): Assign field type instead of
11264 containing type when returning an optimized out value.
11265
11266 2018-02-06 Yao Qi <yao.qi@linaro.org>
11267
11268 * ft32-tdep.c (ft32_read_pc): Remove.
11269 (ft32_write_pc): Remove.
11270 (ft32_gdbarch_init): Update.
11271 * m32r-tdep.c (m32r_read_pc): Remove.
11272 (m32r_gdbarch_init): Update.
11273 * mep-tdep.c (mep_read_pc): Remove.
11274 (mep_gdbarch_init): Update.
11275 * microblaze-tdep.c (microblaze_write_pc): Remove.
11276 (microblaze_gdbarch_init): Update.
11277 * mn10300-tdep.c (mn10300_read_pc): Remove.
11278 (mn10300_write_pc): Remove.
11279 (mn10300_gdbarch_init): Update.
11280 * moxie-tdep.c (moxie_read_pc): Remove.
11281 (moxie_write_pc): Remove.
11282 (moxie_gdbarch_init): Update.
11283
11284 2018-02-06 Yao Qi <yao.qi@linaro.org>
11285
11286 * expprint.c (print_subexp_standard): Handle
11287 OP_F77_UNDETERMINED_ARGLIST.
11288 (dump_subexp_body_standard): Likewise.
11289
11290 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11291
11292 * target-descriptions.c (tdesc_element_visitor) Add empty
11293 implementations.
11294 (tdesc_type): Move make_gdb_type from here.
11295 (tdesc_type_builtin): Likewise.
11296 (tdesc_type_vector): Likewise.
11297 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11298 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11299 (make_gdb_type_union): Likewise.
11300 (make_gdb_type_flags): Likewise.
11301 (make_gdb_type_enum): Likewise.
11302 (make_gdb_type): New function.
11303 (tdesc_register_type): Use static make_gdb_type.
11304
11305 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11306
11307 * infcmd.c (default_print_one_register_info): Align natural-format
11308 column values consistently one under another.
11309 (pad_to_column): New function.
11310
11311 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11312
11313 * dwarf2read.c (dwarf2_physname): Move commment.
11314
11315 2018-02-01 Leszek Swirski <leszeks@google.com>
11316
11317 * varobj.c (varobj_formatted_print_options): Allow recursive
11318 pretty printing if pretty printing is enabled.
11319
11320 2018-02-01 Leszek Swirski <leszeks@google.com>
11321
11322 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11323 names after a structop as a filename.
11324
11325 2018-02-01 Yao Qi <yao.qi@linaro.org>
11326
11327 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11328 (arm_record_coproc_data_proc): Likewise.
11329
11330 2018-02-01 Yao Qi <yao.qi@linaro.org>
11331
11332 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11333
11334 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11335
11336 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11337 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11338
11339 2018-01-31 Pedro Alves <palves@redhat.com>
11340
11341 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11342 * inflow.c (child_terminal_save_inferior): Wrap reference to
11343 tcgetpgrp in HAVE_TERMIOS_H.
11344 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11345 _WIN32.
11346 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11347 always iterate over all inferiors.
11348 (gdbsim_cntrl_c): Adjust.
11349 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11350
11351 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11352
11353 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11354 index type is objfile-owned if the element type is as well.
11355
11356 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11357
11358 GDB 8.1 released.
11359
11360 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11361
11362 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11363 "features/s390x-linux64.c".
11364 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11365 s390_linux32 and s390x_linux64.
11366 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11367 default tdesc.
11368 * s390-tdep.c: Include "features/s390-linux32.c" and
11369 "features/s390x-linux64.c".
11370 (s390_tdesc_valid): Add check for tdesc_has_registers.
11371 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11372 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11373 tdesc_s390x_linux64.
11374 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11375 tdesc_s390x_linux64 to...
11376 * s390-tdep.h: ...here.
11377
11378 2018-01-30 Pedro Alves <palves@redhat.com>
11379
11380 PR gdb/13211
11381 * config.in, configure: Regenerate.
11382 * configure.ac: Check for getpgid.
11383 * go32-nat.c (go32_pass_ctrlc): New.
11384 (go32_target): Install it.
11385 * inf-child.c (inf_child_target): Install
11386 child_terminal_save_inferior, child_pass_ctrlc and
11387 child_interrupt.
11388 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11389 (inf_ptrace_target): No longer install it.
11390 * infcmd.c (interrupt_target_1): Adjust.
11391 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11392 (child_interrupt): Declare.
11393 (inferior::terminal_state): New.
11394 * inflow.c (struct terminal_info): Update comments.
11395 (inferior_process_group): Delete.
11396 (terminal_is_ours): Delete.
11397 (gdb_tty_state): New.
11398 (child_terminal_init): Adjust.
11399 (is_gdb_terminal, sharing_input_terminal_1)
11400 (sharing_input_terminal): New functions.
11401 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11402 Set the process's actual process group in the foreground if
11403 possible. Handle is_ours_for_output/is_ours distinction. Don't
11404 mark terminal as the inferior's if not sharing GDB's terminal.
11405 Don't check attach_flag.
11406 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11407 pass down a target_terminal_state.
11408 (child_terminal_save_inferior): New, factored out from ...
11409 (child_terminal_ours_1): ... this. Handle
11410 target_terminal_state::is_ours_for_output.
11411 (child_interrupt, child_pass_ctrlc): New.
11412 (inflow_inferior_exit): Clear the inferior's terminal_state.
11413 (copy_terminal_info): Copy the inferior's terminal state.
11414 (_initialize_inflow): Remove reference to terminal_is_ours.
11415 * inflow.h (inferior_process_group): Delete.
11416 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11417 * procfs.c (procfs_target): Don't install procfs_interrupt.
11418 (procfs_interrupt): Delete.
11419 * remote.c (remote_serial_quit_handler): Adjust.
11420 (remote_interrupt): Remove ptid parameter. Adjust.
11421 * target-delegates.c: Regenerate.
11422 * target.c: Include "terminal.h".
11423 (target_terminal::terminal_state): Rename to ...
11424 (target_terminal::m_terminal_state): ... this.
11425 (target_terminal::init): Adjust.
11426 (target_terminal::inferior): Adjust to per-inferior
11427 terminal_state.
11428 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11429 (target_terminal::ours, target_terminal::ours_for_output): Use
11430 target_terminal_is_ours_kind.
11431 (target_interrupt): Remove ptid parameter. Adjust.
11432 (default_target_pass_ctrlc): Adjust.
11433 * target.h (target_ops::to_terminal_save_inferior): New field.
11434 (target_ops::to_interrupt): Remove ptid_t parameter.
11435 (target_interrupt): Remove ptid_t parameter. Update comment.
11436 (target_pass_ctrlc): Update comment.
11437 * target/target.h (target_terminal_state): New scoped enum,
11438 factored out of ...
11439 (target_terminal::terminal_state): ... here.
11440 (target_terminal::inferior): Update comments.
11441 (target_terminal::restore_inferior): New.
11442 (target_terminal::is_inferior, target_terminal::is_ours)
11443 (target_terminal::is_ours_for_output): Adjust.
11444 (target_terminal::scoped_restore_terminal_state): Adjust to
11445 rename, and call restore_inferior() instead of inferior().
11446 (target_terminal::scoped_restore_terminal_state::m_state): Change
11447 type.
11448 (target_terminal::terminal_state): Rename to ...
11449 (target_terminal::m_terminal_state): ... this and change type.
11450
11451 2018-01-30 Pedro Alves <palves@redhat.com>
11452
11453 * linux-nat.c (wait_for_signal): New function.
11454 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11455 directly.
11456 (async_terminal_is_ours)
11457 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11458 (linux_nat_add_target): Don't override
11459 to_terminal_inferior/to_terminal_ours.
11460
11461 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11462
11463 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11464
11465 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11466
11467 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11468 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11469 dwarf2_per_objfile_free here.
11470 (dwarf2_per_objfile_free): Remove.
11471 (_initialize_dwarf2_read): Don't register
11472 dwarf2_per_objfile_free as a registry cleanup.
11473
11474 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11475
11476 Avoid compilation errors in MinGW native builds
11477
11478 The error is triggered by including python-internal.h, and the
11479 error message is:
11480
11481 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11482 from build-gnulib/import/math.h:27,
11483 from d:/usr/Python26/include/pyport.h:235,
11484 from d:/usr/Python26/include/Python.h:58,
11485 from python/python-internal.h:94,
11486 from python/py-arch.c:24:
11487 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11488 using ::hypot;
11489 ^~~~~
11490
11491 This happens because Python headers define 'hypot' to expand t
11492 '_hypot' in the Windows builds.
11493 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11494 'hypoth'. This avoids a compilation error.
11495
11496 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11497
11498 * MAINTAINERS (Write After Approval): Fix ordering.
11499
11500 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11501
11502 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11503
11504 2018-01-26 Alan Modra <amodra@gmail.com>
11505
11506 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11507 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11508 Remove nop. Make const. Comment.
11509 (powerpc32_plt_stub_so_2): New.
11510 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11511 Correct count. Update uses.
11512 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11513 Move common code reading PLT entry word. Correct
11514 powerpc32_plt_stub PLT address calculation.
11515 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11516 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11517 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11518 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11519 (ppc64_standard_linkage8): Likewise.
11520 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11521 Correct insns description.
11522 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11523
11524 2018-01-24 Pedro Alves <palves@redhat.com>
11525
11526 GCC PR libstdc++/83906
11527 * gdbtypes.c (operator==(const dynamic_prop &,
11528 const dynamic_prop &)): New.
11529 (operator==(const range_bounds &, const range_bounds &)): New.
11530 (check_types_equal): Use them instead of memcmp.
11531 * gdbtypes.h (operator==(const dynamic_prop &,
11532 const dynamic_prop &)): Declare.
11533 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11534 (operator==(const range_bounds &, const range_bounds &)): Declare.
11535 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11536
11537 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11538
11539 * s390-linux-tdep.c (s390_record_address_mask)
11540 (s390_record_calc_disp_common, s390_record_calc_disp)
11541 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11542 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11543 (s390_process_record): Move to s390-tdep.c.
11544 (s390_linux_init_abi_any): Adjust.
11545 * s390-tdep.c (s390_record_address_mask)
11546 (s390_record_calc_disp_common, s390_record_calc_disp)
11547 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11548 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11549 (s390_process_record): Moved from s390-linux-tdep.c
11550 (s390_gdbarch_init): Adjust.
11551
11552 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11553
11554 * s390-linux-nat.c (s390-tdep.h): New include.
11555 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11556 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11557 (ALLDEPFILES): Add s390-tdep.c.
11558 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11559 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11560 * s390-tdep.h: ...this. New file.
11561 * s390-linux-tdep.c (s390-tdep.h): New include.
11562 (_initialize_s390_tdep): Rename to...
11563 (_initialize_s390_linux_tdep): ...this and adjust.
11564 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11565 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11566 s390-tdep.h.
11567 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11568 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11569 (s390_is_partial_instruction, s390_software_single_step)
11570 (is_non_branch_ril, s390_displaced_step_copy_insn)
11571 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11572 (s390_prologue_data, s390_addr, s390_store, s390_load)
11573 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11574 (s390_register_call_saved, s390_guess_tracepoint_registers)
11575 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11576 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11577 (s390_pseudo_register_name, s390_pseudo_register_type)
11578 (s390_pseudo_register_read, s390_pseudo_register_write)
11579 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11580 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11581 (s390_addr_bits_remove, s390_address_class_type_flags)
11582 (s390_address_class_type_flags_to_name)
11583 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11584 (s390_function_arg_float, s390_function_arg_vector)
11585 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11586 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11587 (s390_frame_align, s390_register_return_value, s390_return_value)
11588 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11589 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11590 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11591 (s390_trad_frame_prev_register, s390_unwind_cache)
11592 (s390_prologue_frame_unwind_cache)
11593 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11594 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11595 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11596 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11597 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11598 (s390_frame_base_address, s390_local_base_address)
11599 (s390_frame_base, s390_gcc_target_options)
11600 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11601 (s390_validate_reg_range, s390_tdesc_valid)
11602 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11603 * s390-tdep.c: ...this. New file.
11604
11605 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11606
11607 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11608 (s390_process_record, s390_gdbarch_tdep_alloc)
11609 (s390_linux_init_abi_any): Use/set new hook.
11610
11611 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11612
11613 * s390-linux-tdep.c (osabi.h): New include.
11614 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11615 (s390_linux_init_abi_any): New functions.
11616 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11617
11618 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11619
11620 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11621 tdesc_has_registers check
11622
11623 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11624
11625 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11626 (s390_validate_reg_range): New macro.
11627 (s390_gdbarch_init): Adjust.
11628
11629 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11630
11631 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11632 (s390_gdbarch_tdep_alloc): Adjust.
11633 (s390_gdbarch_init): Adjust.
11634
11635 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11636
11637 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11638 <have_tdb>: Change type to bool.
11639 (s390_gdbarch_tdep_alloc): Adjust.
11640 (s390_gdbarch_init): Adjust.
11641
11642 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11643
11644 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11645 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11646 (s390_gdbarch_tdep_alloc): New function.
11647 (s390_gdbarch_init): Allocate tdep at start and use its fields
11648 instead of separate variables.
11649
11650 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11651
11652 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11653 when looking for cached gdbarch and add comment for remaining.
11654
11655 2018-01-22 Pedro Alves <palves@redhat.com>
11656 Sergio Durigan Junior <sergiodj@redhat.com>
11657
11658 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11659 case.
11660
11661 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11662
11663 * MAINTAINERS: Update my company e-mail address.
11664
11665 2018-01-22 Yao Qi <yao.qi@linaro.org>
11666
11667 * regcache.c (cooked_write_test): New function.
11668 (_initialize_regcache): Register the test.
11669
11670 2018-01-22 Yao Qi <yao.qi@linaro.org>
11671
11672 * ia64-tdep.c (ia64_pseudo_register_read): Call
11673 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11674 * m32c-tdep.c (m32c_cat_read): Likewise.
11675 (m32c_r3r2r1r0_read): Likewise.
11676 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11677 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11678
11679 2018-01-22 Yao Qi <yao.qi@linaro.org>
11680
11681 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11682 method raw_read instead of regcache_raw_read.
11683 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11684 * arm-tdep.c (arm_neon_quad_read): Likewise.
11685 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11686 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11687 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11688 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11689 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11690 (i386_pseudo_register_read_into_value): Likewise.
11691 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11692 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11693 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11694 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11695 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11696 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11697 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11698 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11699 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11700
11701 2018-01-22 Yao Qi <yao.qi@linaro.org>
11702
11703 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11704 * configure.tgt: Remove target mt.
11705 * mt-tdep.c: Remove.
11706 * regcache.c (cooked_read_test): Remove the check for mt.
11707
11708 2018-01-22 Yao Qi <yao.qi@linaro.org>
11709
11710 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11711 instead of gdbarch_pseudo_register_read_value.
11712
11713 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11714
11715 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11716 language is Ada.
11717
11718 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11719
11720 * linespec.c (create_sals_line_offset): Remove code that preserved
11721 the symtab_and_line's line number.
11722
11723 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11724
11725 * varobj.c (varobj_create): Don't set valid_block when creating a
11726 floating varobj.
11727
11728 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11729
11730 * varobj.c (varobj_create): Remove out of date comment.
11731
11732 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11733
11734 PR mi/20395
11735 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11736 updating innermost block.
11737 * parse.c (innermost_block_tracker::update): Take extra type
11738 parameter, and check types match before updating innermost block.
11739 (write_dollar_variable): Update innermost block for registers.
11740 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11741 (innermost_block_tracker::innermost_block_tracker): Initialise
11742 m_types member.
11743 (innermost_block_tracker::reset): Take type parameter.
11744 (innermost_block_tracker::update): Take type parameter, and pass
11745 type through as needed.
11746 (innermost_block_tracker::m_types): New member.
11747 * varobj.c (varobj_create): Pass type when reseting innermost
11748 block.
11749
11750 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11751
11752 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11753 * ada-lang.c (resolve_subexp): Likewise.
11754 * breakpoint.c (set_breakpoint_condition) Likewise.
11755 (watch_command_1) Likewise.
11756 * c-exp.y (variable): Likewise.
11757 * d-exp.y (PrimaryExpression): Likewise.
11758 * f-exp.y (variable): Likewise.
11759 * go-exp.y (variable): Likewise.
11760 * m2-exp.y (variable): Likewise.
11761 * objfiles.c (objfile::~objfile): Likewise.
11762 * p-exp.y (variable): Likewise.
11763 * parse.c (innermost_block): Change type.
11764 * parser-defs.h (class innermost_block_tracker): New.
11765 (innermost_block): Change to innermost_block_tracker.
11766 * printcmd.c (display_command): Switch to innermost_block API.
11767 (do_one_display): Likewise.
11768 * rust-exp.y (do_one_display): Likewise.
11769 * symfile.c (clear_symtab_users): Likewise.
11770 * varobj.c (varobj_create): Switch to innermost_block API, replace
11771 use of innermost_block with block stored on varobj object.
11772
11773 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11774
11775 * expression.h (innermost_block): Remove declaration.
11776 * varobj.c: Add 'parser-defs.h' include.
11777
11778 2018-01-19 Tom Tromey <tom@tromey.com>
11779
11780 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11781 symbols in the static and global blocks.
11782
11783 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11784
11785 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11786 gdb_ptrace.h, and move including gdb_wait.h ...
11787 * nat/linux-ptrace.h: ... to here.
11788
11789 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11790
11791 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11792 inf_ptrace_detach_success.
11793 (inf_ptrace_detach_success): Add inferior parameter, use it
11794 instead of inferior_ptid, pass it to detach_inferior.
11795 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11796 parameter.
11797 * inferior.c (detach_inferior): Add overload that takes an
11798 inferior object.
11799 * inferior.h (detach_inferior): Likewise.
11800 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11801 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11802 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11803
11804 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11805
11806 * target.h (struct target_ops) <to_detach>: Add inferior
11807 parameter.
11808 (target_detach): Likewise.
11809 * target.c (dispose_inferior): Pass inferior down.
11810 (target_detach): Pass inferior down. Assert that it is equal to
11811 the current inferior.
11812 * aix-thread.c (aix_thread_detach): Pass inferior down.
11813 * corefile.c (core_file_command): Pass current_inferior() down.
11814 * corelow.c (core_detach): Add inferior parameter.
11815 * darwin-nat.c (darwin_detach): Likewise.
11816 * gnu-nat.c (gnu_detach): Likewise.
11817 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11818 * infcmd.c (detach_command): Pass current_inferior() down to
11819 target_detach.
11820 * infrun.c (follow_fork_inferior): Pass parent_inf to
11821 target_detach.
11822 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11823 target_detach.
11824 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11825 * linux-thread-db.c (thread_db_detach): Likewise.
11826 * nto-procfs.c (procfs_detach): Likewise.
11827 * procfs.c (procfs_detach): Likewise.
11828 * record.c (record_detach): Likewise.
11829 * record.h (struct inferior): Forward-declare.
11830 (record_detach): Add inferior parameter.
11831 * remote-sim.c (gdbsim_detach): Likewise.
11832 * remote.c (remote_detach_1): Likewise.
11833 (remote_detach): Likewise.
11834 (extended_remote_detach): Likewise.
11835 * sol-thread.c (sol_thread_detach): Likewise.
11836 * target-debug.h (target_debug_print_inferior_p): New macro.
11837 * target-delegates.c: Re-generate.
11838 * top.c (kill_or_detach): Pass inferior down to target_detach.
11839 * windows-nat.c (windows_detach): Add inferior parameter.
11840
11841 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11842
11843 * target.h (struct target_ops) <to_detach>: Remove args
11844 parameter.
11845 (target_detach): Likewise.
11846 * target.c (dispose_inferior): Adjust.
11847 (target_detach): Remove args parameter, adjust.
11848 * aix-thread.c (aix_thread_detach): Adjust.
11849 * corefile.c (core_file_command): Adjust.
11850 * corelow.c (core_detach): Adjust.
11851 * darwin-nat.c (darwin_detach): Adjust.
11852 * gnu-nat.c (gnu_detach): Adjust.
11853 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11854 * infcmd.c (detach_command): Adjust
11855 * infrun.c (follow_fork_inferior): Adjust.
11856 (handle_vfork_child_exec_or_exit): Adjust.
11857 * linux-fork.c (linux_fork_detach): Remove args parameter.
11858 * linux-fork.h (linux_fork_detach): Likewise.
11859 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11860 * linux-thread-db.c (thread_db_detach): Likewise.
11861 * nto-procfs.c (procfs_detach): Likewise.
11862 * procfs.c (procfs_detach): Likewise.
11863 (do_detach): Remove signo parameter.
11864 * record.c (record_detach): Remove args parameter.
11865 * record.h (record_detach): Likewise.
11866 * remote-sim.c (gdbsim_detach): Likewise.
11867 * remote.c (remote_detach_1): Likewise.
11868 (remote_detach): Likewise.
11869 (extended_remote_detach): Likewise.
11870 * sol-thread.c (sol_thread_detach): Likewise.
11871 * target-delegates.c: Re-generate.
11872 * top.c (struct qt_args) <args>: Remove field.
11873 (kill_or_detach): Don't pass args.
11874 (quit_force): Don't set args.
11875 * windows-nat.c (windows_detach): Remove args parameter.
11876
11877 2018-01-19 Yao Qi <yao.qi@linaro.org>
11878
11879 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11880 (arm_linux_init_abi): Install it.
11881
11882 2018-01-19 Yao Qi <yao.qi@linaro.org>
11883
11884 * osabi.c (gdb_osabi_names): Extend the regexp for
11885 arm-linux-gnueabihf.
11886
11887 2018-01-18 Yao Qi <yao.qi@linaro.org>
11888
11889 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11890 m_abbrevs.
11891 (abbrev_table::add_abbrev): Update.
11892 (abbrev_table::lookup_abbrev): Update.
11893
11894 2018-01-18 Yao Qi <yao.qi@linaro.org>
11895
11896 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11897
11898 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11899
11900 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11901 to "std::string".
11902
11903 2018-01-17 Tom Tromey <tom@tromey.com>
11904
11905 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11906
11907 2018-01-17 Tom Tromey <tom@tromey.com>
11908
11909 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11910 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11911 (create_array_type_with_stride): Update.
11912 * dwarf2read.c (set_die_type): Update.
11913
11914 2018-01-17 Tom Tromey <tom@tromey.com>
11915
11916 * dwarf2read.c (delayed_method_info): Remove typedef.
11917 (dwarf2_cu::method_info): Now a std::vector.
11918 (add_to_method_list): Update.
11919 (free_delayed_list): Remove.
11920 (compute_delayed_physnames): Update.
11921 (process_full_comp_unit, process_full_type_unit): Clear the method
11922 list. Remove cleanups.
11923 (psymtab_include_file_name): Add name_holder parameter. Use
11924 unique_xmalloc_ptr.
11925 (dwarf_decode_lines): Update.
11926
11927 2018-01-17 Tom Tromey <tom@tromey.com>
11928 Simon Marchi <simon.marchi@ericsson.com>
11929
11930 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11931 (dwarf2_per_objfile::free_cached_comp_units)
11932 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11933 (init_cutu_and_read_dies_no_follow): Update.
11934 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11935 (dwarf2_cu::~dwarf2_cu): New.
11936 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11937 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11938
11939 2018-01-17 Tom Tromey <tom@tromey.com>
11940 Simon Marchi <simon.marchi@ericsson.com>
11941
11942 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11943 (struct die_reader_specs) <abbrev_table>: New member.
11944 (struct abbrev_table): Add constructor.
11945 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11946 <abbrev_obstack>: Now an auto_obstack.
11947 (abbrev_table_up): New typedef.
11948 (init_cu_die_reader): Add abbrev_table parameter.
11949 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11950 Add result_dwo_abbrev_table.
11951 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11952 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11953 Update.
11954 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11955 parameter.
11956 (skip_children): Update.
11957 (abbrev_table::alloc_abbrev): Rename from
11958 abbrev_table_alloc_abbrev.
11959 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11960 (abbrev_table::lookup_abbrev): Rename from
11961 abbrev_table_lookup_abbrev.
11962 (abbrev_table_read_table): Return abbrev_table_up.
11963 (abbrev_table_free, abbrev_table_free_cleanup)
11964 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11965 (load_partial_dies): Update.
11966
11967 2018-01-17 Tom Tromey <tom@tromey.com>
11968
11969 * dwarf2read.c (dwarf2_compute_name): Update comment.
11970 (read_func_scope, read_variable): Update.
11971 (new_symbol): Remove.
11972 (new_symbol_full): Rename to new_symbol.
11973
11974 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11975
11976 PR gdb/16577
11977 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11978 a warning instead of throwing an error, set section size to 0 and return
11979 NULL.
11980 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11981
11982 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11983
11984 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11985 std::string.
11986 (linux_ptrace_attach_fail_reason_string): Likewise.
11987 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11988 Likewise.
11989 (linux_ptrace_attach_fail_reason_string): Likewise.
11990 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11991
11992 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11993
11994 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11995
11996 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11997
11998 PR gdb/21559
11999 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12000 checking for fs_base/gs_base fields in struct user_regs_struct.
12001 * configure: Regenerate.
12002
12003 2018-01-17 Yao Qi <yao.qi@linaro.org>
12004
12005 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12006 function.
12007 (aarch64_linux_init_abi): Install it to gdbarch hook
12008 gcc_target_options.
12009
12010 2018-01-15 Pedro Alves <palves@redhat.com>
12011
12012 * common/signals-state-save-restore.c
12013 (save_original_signals_state): Fix typos.
12014
12015 2017-01-12 Tom Tromey <tom@tromey.com>
12016 Sergio Durigan Junior <sergiodj@redhat.com>
12017
12018 * Makefile.in (install-only): Install gdb-add-index.
12019
12020 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12021
12022 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12023
12024 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12025
12026 * infrun.c (keep_going_pass_signal): Clear step-over info when
12027 insert_breakpoints fails.
12028
12029 2018-01-11 Pedro Alves <palves@redhat.com>
12030
12031 PR gdb/22583
12032 * infrun.c (resume): Rename to ...
12033 (resume_1): ... this.
12034 (resume): Reimplement as wrapper around resume_1.
12035
12036 2018-01-11 Pedro Alves <palves@redhat.com>
12037
12038 PR remote/22597
12039 * remote.c (remote_parse_stop_reply): Default to the last-set
12040 general thread instead of to 'magic_null_ptid'.
12041
12042 2018-01-10 Pedro Alves <palves@redhat.com>
12043
12044 * language.h (language_get_symbol_name_matcher): Rename ...
12045 (get_symbol_name_matcher): ... this.
12046 * language.c (language_get_symbol_name_matcher): Ditto.
12047 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12048 callers adjusted.
12049
12050 2018-01-10 Pedro Alves <palves@redhat.com>
12051
12052 PR gdb/22670
12053 * dwarf2read.c
12054 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12055 Adjust to use language_get_symbol_name_matcher instead of
12056 language_defn::la_get_symbol_name_matcher.
12057 * language.c (language_get_symbol_name_matcher): If in Ada mode
12058 and the lookup name is a verbatim match, return Ada's matcher.
12059 * language.h (language_get_symbol_name_matcher): Adjust comment.
12060 (ada_lookup_name_info::verbatim_p):: New method.
12061
12062 2018-01-10 Pedro Alves <palves@redhat.com>
12063
12064 PR gdb/22670
12065 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12066 minsym's language is language_auto or language_cplus, pass down
12067 language_ada instead.
12068 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12069
12070 2018-01-10 Pedro Alves <palves@redhat.com>
12071
12072 PR gdb/22670
12073 * minsyms.c (linkage_name_str): New function.
12074 (iterate_over_minimal_symbols): Use it.
12075
12076 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12077
12078 * NEWS: Document that 'info proc' now works on FreeBSD.
12079
12080 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12081
12082 * configure.ac: Check for kinfo_getfile in libutil.
12083 * configure: Regenerate.
12084 * config.in: Regenerate.
12085 * fbsd-nat.c: Include "fbsd-tdep.h".
12086 (fbsd_fetch_cmdline): New.
12087 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12088 rather than calling error.
12089 (fbsd_info_proc): New.
12090 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12091 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12092 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12093
12094 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12095
12096 * fbsd-nat.c (struct free_deleter): Remove.
12097 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12098
12099 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12100
12101 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12102 NULL for an empty pathname.
12103
12104 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12105
12106 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12107 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12108 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12109 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12110 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12111 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12112 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12113 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12114 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12115 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12116 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12117 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12118 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12119 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12120 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12121
12122 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12123
12124 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12125 (gnu_xfer_auxv): New function.
12126 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12127 TARGET_OBJECT_AUXV.
12128
12129 2018-01-08 Yao Qi <yao.qi@linaro.org>
12130 Simon Marchi <simon.marchi@ericsson.com>
12131
12132 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12133 common/selftest.c.
12134 (COMMON_OBS): Remove selftest.o.
12135 * configure.ac: Append selftest-arch.c and common/selftest.c to
12136 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12137 * configure: Re-generated.
12138 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12139 GDB_SELF_TEST.
12140 (maintenance_info_selftests): Likewise.
12141
12142 2018-01-08 Xavier Roirand <roirand@adacore.com>
12143
12144 * ada-valprint.c (val_print_packed_array_elements): Use
12145 proper number of elements when printing an array indexed
12146 by an enumeration type.
12147
12148 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12149
12150 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12151 (dw2_get_file_names_reader): Adjust.
12152 (lookup_dwo_signatured_type): Adjust.
12153 (lookup_dwp_signatured_type): Adjust.
12154 (lookup_signatured_type): Adjust.
12155 (create_type_unit_group): Adjust.
12156 (get_type_unit_group): Adjust.
12157 (process_psymtab_comp_unit_reader): Adjust.
12158 (build_type_psymtabs_reader): Adjust.
12159 (scan_partial_symbols): Adjust.
12160 (add_partial_symbol): Adjust.
12161 (add_partial_subprogram): Adjust.
12162 (peek_die_abbrev): Adjust.
12163 (fixup_go_packaging): Adjust.
12164 (process_imported_unit_die): Adjust.
12165 (dwarf2_compute_name): Adjust.
12166 (dwarf2_physname): Adjust.
12167 (read_import_statement): Adjust.
12168 (handle_DW_AT_stmt_list): Adjust.
12169 (read_file_scope): Adjust.
12170 (read_func_scope): Adjust.
12171 (read_lexical_block_scope): Adjust.
12172 (read_call_site_scope): Adjust.
12173 (read_variable): Adjust.
12174 (dwarf2_rnglists_process): Adjust.
12175 (dwarf2_ranges_process): Adjust.
12176 (dwarf2_ranges_read): Adjust.
12177 (dwarf2_get_pc_bounds): Adjust.
12178 (dwarf2_record_block_ranges): Adjust.
12179 (dwarf2_add_field): Adjust.
12180 (dwarf2_add_member_fn): Adjust.
12181 (read_structure_type): Adjust.
12182 (process_structure_scope): Adjust.
12183 (read_enumeration_type): Adjust.
12184 (read_array_type): Adjust.
12185 (mark_common_block_symbol_computed): Adjust.
12186 (read_common_block): Adjust.
12187 (read_namespace_type): Adjust.
12188 (read_namespace): Adjust.
12189 (read_module_type): Adjust.
12190 (read_tag_pointer_type): Adjust.
12191 (read_tag_ptr_to_member_type): Adjust.
12192 (read_tag_string_type): Adjust.
12193 (read_subroutine_type): Adjust.
12194 (read_typedef): Adjust.
12195 (read_base_type): Adjust.
12196 (attr_to_dynamic_prop): Adjust.
12197 (read_subrange_type): Adjust.
12198 (read_unspecified_type): Adjust.
12199 (dwarf2_read_abbrevs): Adjust.
12200 (load_partial_dies): Adjust.
12201 (read_partial_die): Adjust.
12202 (find_partial_die): Adjust.
12203 (guess_partial_die_structure_name): Adjust.
12204 (fixup_partial_die): Adjust.
12205 (read_attribute_value): Adjust.
12206 (read_addr_index): Adjust.
12207 (read_addr_index_from_leb128): Adjust.
12208 (read_str_index): Adjust.
12209 (dwarf2_string_attr): Adjust.
12210 (get_debug_line_section): Adjust.
12211 (dwarf_decode_line_header): Adjust.
12212 (lnp_state_machine::check_line_address): Adjust.
12213 (dwarf_decode_lines_1): Adjust.
12214 (dwarf_decode_lines): Adjust.
12215 (dwarf2_start_symtab): Adjust.
12216 (var_decode_location): Adjust.
12217 (new_symbol_full): Adjust.
12218 (dwarf2_const_value_data): Adjust.
12219 (dwarf2_const_value_attr): Adjust.
12220 (dwarf2_const_value): Adjust.
12221 (die_type): Adjust.
12222 (die_containing_type): Adjust.
12223 (build_error_marker_type): Adjust.
12224 (lookup_die_type): Adjust.
12225 (guess_full_die_structure_name): Adjust.
12226 (anonymous_struct_prefix): Adjust.
12227 (determine_prefix): Adjust.
12228 (dwarf2_name): Adjust.
12229 (follow_die_ref_or_sig): Adjust.
12230 (follow_die_offset): Adjust.
12231 (follow_die_ref): Adjust.
12232 (follow_die_sig_1): Adjust.
12233 (follow_die_sig): Adjust.
12234 (get_signatured_type): Adjust.
12235 (get_DW_AT_signature_type): Adjust.
12236 (decode_locdesc): Adjust.
12237 (dwarf_decode_macros): Adjust.
12238 (cu_debug_loc_section): Adjust.
12239 (fill_in_loclist_baton): Adjust.
12240 (dwarf2_symbol_mark_computed): Adjust.
12241 (init_one_comp_unit): Don't assign
12242 dwarf2_cu::dwarf2_per_objfile.
12243 (set_die_type): Adjust.
12244
12245 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12246
12247 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12248 <dwarf2_per_objfile>: New field.
12249 (dwarf2_per_objfile): Remove global.
12250 (get_dwarf2_per_objfile): New function.
12251 (set_dwarf2_per_objfile): New function.
12252 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12253 dwarf2_per_objfile.
12254 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12255 (read_abbrev_offset): Likewise.
12256 (read_indirect_string): Likewise.
12257 (read_indirect_line_string): Likewise.
12258 (read_indirect_string_at_offset): Likewise.
12259 (read_indirect_string_from_dwz): Likewise.
12260 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12261 dwarf2_per_objfile.
12262 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12263 (create_all_comp_units): Change objfile parameter to
12264 dwarf2_per_objfile.
12265 (create_all_type_units): Likewise.
12266 (process_queue): Add dwarf2_per_objfile parameter.
12267 (read_and_check_comp_unit_head): Likewise.
12268 (lookup_dwo_unit_in_dwp): Likewise.
12269 (get_dwp_file): Likewise.
12270 (process_cu_includes): Likewise.
12271 (struct free_dwo_file_cleanup_data): New struct.
12272 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12273 set_dwarf2_per_objfile.
12274 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12275 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12276 context, adjust calls.
12277 (dw2_instantiate_symtab): Likewise.
12278 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12279 (dw2_get_cu): Likewise.
12280 (create_cu_from_index_list): Change objfile parameter to
12281 dwarf2_per_objfile.
12282 (create_cus_from_index_list): Get dwarf2_per_objfile from
12283 context, adjust calls.
12284 (create_cus_from_index): Likewise.
12285 (create_signatured_type_table_from_index): Change objfile
12286 parameter to dwarf2_per_objfile.
12287 (create_signatured_type_table_from_debug_names): Change objfile
12288 parameter to dwarf2_per_objfile.
12289 (create_addrmap_from_index): Likewise.
12290 (create_addrmap_from_aranges): Likewise.
12291 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12292 (dw2_setup): Remove.
12293 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12294 context.
12295 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12296 get_dwarf2_per_objfile.
12297 (dw2_forget_cached_source_info): Likewise.
12298 (dw2_map_symtabs_matching_filename): Likewise.
12299 (struct dw2_symtab_iterator) <index>: Remove.
12300 <dwarf2_per_objfile>: New field.
12301 (dw2_symtab_iter_init): Replace index parameter with
12302 dwarf2_per_objfile.
12303 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12304 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12305 (dw2_print_stats): Likewise.
12306 (dw2_dump): Likewise.
12307 (dw2_expand_symtabs_for_function): Likewise.
12308 (dw2_expand_all_symtabs): Likewise.
12309 (dw2_expand_symtabs_with_fullname): Likewise.
12310 (dw2_expand_marked_cus): Replace index and objfile parameters
12311 with dwarf2_per_objfile.
12312 (dw_expand_symtabs_matching_file_matcher): Add
12313 dwarf2_per_objfile parameter and adjust calls.
12314 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12315 adjust calls.
12316 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12317 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12318 adjust calls.
12319 (create_cus_from_debug_names_list): Replace objfile parameter
12320 with dwarf2_per_objfile and adjust calls.
12321 (create_cus_from_debug_names): Likewise.
12322 (dwarf2_read_debug_names): Likewise.
12323 (mapped_debug_names::namei_to_name): Adjust call.
12324 (dw2_debug_names_iterator::next): Likewise.
12325 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12326 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12327 (dw2_debug_names_dump): Likewise.
12328 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12329 (dw2_debug_names_expand_symtabs_matching): Likewise.
12330 (dwarf2_initialize_objfile): Likewise.
12331 (dwarf2_build_psymtabs): Likewise.
12332 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12333 this_cu.
12334 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12335 (read_and_check_comp_unit_head): Likewise.
12336 (read_abbrev_offset): Likewise.
12337 (create_debug_type_hash_table): Likewise.
12338 (create_debug_types_hash_table): Likewise.
12339 (create_all_type_units): Replace objfile parameter with
12340 dwarf2_per_objfile.
12341 (add_type_unit): Add dwarf2_per_objfile parameter.
12342 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12343 with dwarf2_per_objfile.
12344 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12345 (lookup_dwp_signatured_type): Likewise.
12346 (lookup_signatured_type): Likewise.
12347 (read_cutu_die_from_dwo): Likewise.
12348 (init_tu_and_read_dwo_dies): Likewise.
12349 (init_cutu_and_read_dies): Likewise.
12350 (init_cutu_and_read_dies_no_follow): Likewise.
12351 (allocate_type_unit_groups_table): Add objfile parameter.
12352 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12353 (get_type_unit_group): Likewise.
12354 (process_psymtab_comp_unit): Update call.
12355 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12356 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12357 (print_tu_stats): Likewise.
12358 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12359 in void* parameter.
12360 (build_type_psymtabs): Change objfile parameter to
12361 dwarf2_per_objfile.
12362 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12363 passed in void* parameter.
12364 (process_skeletonless_type_units): Change objfile parameter to
12365 dwarf2_per_objfile.
12366 (set_partial_user): Likewise.
12367 (dwarf2_build_psymtabs_hard): Likewise.
12368 (read_comp_units_from_section): Likewise.
12369 (create_all_comp_units): Likewise.
12370 (scan_partial_symbols): Update calls.
12371 (add_partial_symbol): Likewise.
12372 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12373 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12374 (process_queue): Add dwarf2_per_objfile parameter.
12375 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12376 (compute_compunit_symtab_includes): Likewise.
12377 (process_cu_includes): Add dwarf2_per_objfile parameter.
12378 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12379 (process_full_type_unit): Likewise.
12380 (process_imported_unit_die): Update call.
12381 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12382 (read_file_scope): Likewise.
12383 (allocate_dwo_file_hash_table): Add objfile parameter.
12384 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12385 (create_cus_hash_table): Likewise.
12386 (create_dwp_hash_table): Likewise.
12387 (create_dwo_unit_in_dwp_v1): Likewise.
12388 (create_dwp_v2_section): Likewise.
12389 (create_dwo_unit_in_dwp_v2): Likewise.
12390 (lookup_dwo_unit_in_dwp): Likewise.
12391 (try_open_dwop_file): Likewise.
12392 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12393 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12394 cleanup to include a reference to dwarf2_per_objfile.
12395 (open_dwp_file): Add dwarf2_per_objfile parameter.
12396 (open_and_init_dwp_file): Likewise.
12397 (get_dwp_file): Likewise.
12398 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12399 (queue_and_load_all_dwo_tus): Update call.
12400 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12401 data.
12402 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12403 (dwarf2_ranges_process): Likewise.
12404 (dwarf2_get_pc_bounds): Likewise.
12405 (mark_common_block_symbol_computed): Likewise.
12406 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12407 (dwarf2_read_abbrevs): Update call.
12408 (read_partial_die): Use dwarf2_per_objfile from cu.
12409 (find_partial_die): Likewise.
12410 (fixup_partial_die): Likewise.
12411 (read_attribute_value): Likewise.
12412 (read_indirect_string_at_offset_from): Add objfile parameter.
12413 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12414 parameter.
12415 (read_indirect_string_from_dwz): Add objfile parameter.
12416 (read_indirect_string): Add objfile parameter.
12417 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12418 (read_addr_index): Use dwarf2_per_objfile from cu.
12419 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12420 call dw2_setup.
12421 (read_str_index): Use dwarf2_per_objfile from cu.
12422 (get_debug_line_section): Likewise.
12423 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12424 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12425 (new_symbol_full): Use dwarf2_per_objfile from cu.
12426 (build_error_marker_type): Likewise.
12427 (lookup_die_type): Likewise.
12428 (determine_prefix): Likewise.
12429 (follow_die_offset): Likewise.
12430 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12431 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12432 (dwarf2_fetch_die_type_sect_off): Likewise.
12433 (dwarf2_get_die_type): Likewise.
12434 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12435 (get_signatured_type): Likewise.
12436 (get_DW_AT_signature_type): Likewise.
12437 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12438 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12439 (cu_debug_loc_section): Likewise.
12440 (fill_in_loclist_baton): Likewise.
12441 (dwarf2_symbol_mark_computed): Likewise.
12442 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12443 dwarf2_per_objfile.
12444 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12445 parameter.
12446 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12447 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12448 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12449 (set_die_type): Use dwarf2_free_objfile from cu.
12450 (get_die_type_at_offset): Likewise.
12451 (dwarf2_per_objfile_free): Don't assign global variable.
12452 (debug_names) <constructor>: Add dwarf2_per_objfile
12453 parameter, update m_debugstrlookup construction.
12454 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12455 parameter.
12456 <m_dwarf2_per_objfile>: New field.
12457 <lookup>: Use m_dwarf2_per_objfile.
12458 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12459 (psyms_seen_size): Likewise.
12460 (write_gdbindex): Replace objfile parameter with
12461 dwarf2_per_objfile.
12462 (write_debug_names): Likewise.
12463 (write_psymtabs_to_index): Likewise.
12464 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12465 calls.
12466
12467 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12468
12469 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12470 <dwarf2_per_objfile>: New field.
12471 (struct dwarf2_per_cu_data) <objfile>: Remove.
12472 <dwarf2_per_objfile>: New field.
12473 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12474 of objfile.
12475 (create_signatured_type_table_from_index): Likewise.
12476 (create_debug_type_hash_table): Likewise.
12477 (fill_in_sig_entry_from_dwo_entry): Likewise.
12478 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12479 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12480 objfile.
12481 (create_partial_symtab): Access objfile through
12482 dwarf2_per_objfile.
12483 (process_psymtab_comp_unit_reader): Likewise.
12484 (read_comp_units_from_section): Likewise.
12485 (scan_partial_symbols): Likewise.
12486 (add_partial_symbol): Likewise.
12487 (add_partial_subprogram): Likewise.
12488 (peek_die_abbrev): Likewise.
12489 (fixup_go_packaging): Likewise.
12490 (process_full_comp_unit): Likewise.
12491 (process_full_type_unit): Likewise.
12492 (process_imported_unit_die): Likewise.
12493 (dwarf2_compute_name): Likewise.
12494 (dwarf2_physname): Likewise.
12495 (read_import_statement): Likewise.
12496 (create_cus_hash_table): Assign dwarf2_physname instead of
12497 objfile.
12498 (read_func_scope): Access objfile through dwarf2_per_objfile.
12499 (read_lexical_block_scope): Likewise.
12500 (read_call_site_scope): Likewise.
12501 (read_variable): Likewise.
12502 (dwarf2_rnglists_process): Likewise.
12503 (dwarf2_ranges_process): Likewise.
12504 (dwarf2_ranges_read): Likewise.
12505 (dwarf2_record_block_ranges): Likewise.
12506 (dwarf2_add_field): Likewise.
12507 (dwarf2_add_member_fn): Likewise.
12508 (read_structure_type): Likewise.
12509 (process_structure_scope): Likewise.
12510 (read_enumeration_type): Likewise.
12511 (read_array_type): Likewise.
12512 (read_common_block): Likewise.
12513 (read_namespace_type): Likewise.
12514 (read_namespace): Likewise.
12515 (read_module_type): Likewise.
12516 (read_tag_pointer_type): Likewise.
12517 (read_tag_ptr_to_member_type): Likewise.
12518 (read_tag_string_type): Likewise.
12519 (read_subroutine_type): Likewise.
12520 (read_typedef): Likewise.
12521 (read_base_type): Likewise.
12522 (attr_to_dynamic_prop): Likewise.
12523 (read_subrange_type): Likewise.
12524 (read_unspecified_type): Likewise.
12525 (load_partial_dies): Likewise.
12526 (read_partial_die): Likewise.
12527 (find_partial_die): Likewise.
12528 (guess_partial_die_structure_name): Likewise.
12529 (fixup_partial_die): Likewise.
12530 (read_attribute_value): Likewise.
12531 (read_addr_index_from_leb128): Likewise.
12532 (dwarf2_read_addr_index): Likewise.
12533 (dwarf2_string_attr): Likewise.
12534 (lnp_state_machine::check_line_address): Likewise.
12535 (dwarf_decode_lines_1): Likewise.
12536 (dwarf_decode_lines): Likewise.
12537 (dwarf2_start_symtab): Likewise.
12538 (var_decode_location): Likewise.
12539 (new_symbol_full): Likewise.
12540 (dwarf2_const_value_data): Likewise.
12541 (dwarf2_const_value_attr): Likewise.
12542 (dwarf2_const_value): Likewise.
12543 (die_type): Likewise.
12544 (die_containing_type): Likewise.
12545 (lookup_die_type): Likewise.
12546 (guess_full_die_structure_name): Likewise.
12547 (anonymous_struct_prefix): Likewise.
12548 (dwarf2_name): Likewise.
12549 (follow_die_ref_or_sig): Likewise.
12550 (follow_die_offset): Likewise.
12551 (follow_die_ref): Likewise.
12552 (dwarf2_fetch_die_loc_sect_off): Likewise.
12553 (dwarf2_fetch_constant_bytes): Likewise.
12554 (dwarf2_fetch_die_type_sect_off): Likewise.
12555 (dwarf2_get_die_type): Likewise.
12556 (follow_die_sig): Likewise.
12557 (decode_locdesc): Likewise.
12558 (dwarf2_per_cu_objfile): Likewise.
12559 (dwarf2_per_cu_text_offset): Likewise.
12560 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12561 objfile.
12562 (set_die_type): Access objfile through
12563 dwarf2_per_objfile.
12564
12565 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12566
12567 * valprint.c (converted_character_d): Remove typedef.
12568 (DEF_VEC_O (converted_character_d)): Remove.
12569 (count_next_character): Use std::vector.
12570 (print_converted_chars_to_obstack): Likewise.
12571 (generic_printstr): Likewise.
12572
12573 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12574
12575 * xml-support.h (struct gdb_xml_value): Add constructor.
12576 <value>: Change type to unique_xmalloc_ptr.
12577 (gdb_xml_value_s): Remove typedef.
12578 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12579 (gdb_xml_element_start_handler): Change parameter type to
12580 std::vector.
12581 (xml_find_attribute): Likewise.
12582 * xml-support.c (xml_find_attribute): Change parameter type to
12583 std::vector and adjust.
12584 (gdb_xml_values_cleanup): Remove.
12585 (gdb_xml_parser::start_element): Adjust to std::vector.
12586 (xinclude_start_include): Change paraeter type to std::vector
12587 and adjust.
12588 * btrace.c (check_xml_btrace_version): Likewise.
12589 (parse_xml_btrace_block): Likewise.
12590 (parse_xml_btrace_pt_config_cpu): Likewise.
12591 (parse_xml_btrace_pt): Likewise.
12592 (parse_xml_btrace_conf_bts): Likewise.
12593 (parse_xml_btrace_conf_pt): Likewise.
12594 * memory-map.c (memory_map_start_memory): Likewise.
12595 (memory_map_start_property): Likewise.
12596 * osdata.c (osdata_start_osdata): Likewise.
12597 (osdata_start_item): Likewise.
12598 (osdata_start_column): Likewise.
12599 * remote.c (start_thread): Likewise.
12600 * solib-aix.c (library_list_start_library): Likewise.
12601 (library_list_start_list): Likewise.
12602 * solib-svr4.c (library_list_start_library): Likewise.
12603 (svr4_library_list_start_list): Likewise.
12604 * solib-target.c (library_list_start_segment): Likewise.
12605 (library_list_start_section): Likewise.
12606 (library_list_start_library): Likewise.
12607 (library_list_start_list): Likewise.
12608 * tracepoint.c (traceframe_info_start_memory): Likewise.
12609 (traceframe_info_start_tvar): Likewise.
12610 * xml-syscall.c (syscall_start_syscall): Likewise.
12611 * xml-tdesc.c (tdesc_start_target): Likewise.
12612 (tdesc_start_feature): Likewise.
12613 (tdesc_start_reg): Likewise.
12614 (tdesc_start_union): Likewise.
12615 (tdesc_start_struct): Likewise.
12616 (tdesc_start_flags): Likewise.
12617 (tdesc_start_enum): Likewise.
12618 (tdesc_start_field): Likewise.
12619 (tdesc_start_enum_value): Likewise.
12620 (tdesc_start_vector): Likewise.
12621
12622 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12623
12624 * extension.h (struct xmethod_worker) <clone>: Remove.
12625 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12626 Remove.
12627 (python_xmethod_worker::clone): Remove.
12628 * valops.c (find_overload_match): Use std::move instead of
12629 clone.
12630
12631 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12632
12633 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12634 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12635 <free_xmethod_worker_data>: Remove.
12636 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12637 <get_xmethod_arg_types>: Remove.
12638 <get_xmethod_result_type>: Remove.
12639 <invoke_xmethod>: Remove.
12640 * extension.c (new_xmethod_worker): Remove.
12641 (clone_xmethod_worker): Remove.
12642 (get_matching_xmethod_workers): Return void, pass std::vector by
12643 pointer.
12644 (get_xmethod_arg_types): Rename to...
12645 (xmethod_worker::get_arg_types): ... this, and adjust.
12646 (get_xmethod_result_type): Rename to...
12647 (xmethod_worker::get_result_type): ... this, and adjust.
12648 (invoke_xmethod): Remove.
12649 (free_xmethod_worker): Remove.
12650 (free_xmethod_worker_vec): Remove.
12651 * extension.h (enum ext_lang_rc): Move here from
12652 extension-priv.h.
12653 (struct xmethod_worker): Add constructor and destructor.
12654 <data>: Remove.
12655 <value>: Remove.
12656 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12657 virtual pure methods.
12658 <get_arg_types, get_result_type>: New methods.
12659 (xmethod_worker_ptr): Remove typedef.
12660 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12661 (xmethod_worker_vec): Remove typedef.
12662 (xmethod_worker_up): New typedef.
12663 (invoke_xmethod): Remove.
12664 (clone_xmethod_worker): Remove.
12665 (free_xmethod_worker): Remove.
12666 (free_xmethod_worker_vec): Remove.
12667 (get_xmethod_arg_types): Remove.
12668 (get_xmethod_result_type): Remove.
12669 * valops.c (find_method_list): Use std::vector, don't use
12670 intermediate vector.
12671 (value_find_oload_method_list): Use std::vector.
12672 (find_overload_match): Use std::vector.
12673 (find_oload_champ): Use std::vector.
12674 * value.c (value_free): Use operator delete.
12675 (value_of_xmethod): Rename to...
12676 (value_from_xmethod): ... this. Don't assign
12677 xmethod_worker::value, take rvalue-reference.
12678 (result_type_of_xmethod): Adjust.
12679 (call_xmethod): Adjust.
12680 * value.h: Include extension.h.
12681 (struct xmethod_worker): Don't forward-declare.
12682 (value_of_xmethod): Rename to...
12683 (value_from_xmethod): ... this, take rvalue-reference.
12684 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12685 (struct python_xmethod_worker): ... this, add constructor and
12686 destructor.
12687 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12688 (gdbpy_free_xmethod_worker_data): Rename to...
12689 (python_xmethod_worker::~python_xmethod_worker): ... this and
12690 adjust.
12691 (gdbpy_clone_xmethod_worker_data): Rename to...
12692 (python_xmethod_worker::clone): ... this and adjust.
12693 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12694 temporary vector.
12695 (gdbpy_get_xmethod_arg_types): Rename to...
12696 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12697 (gdbpy_get_xmethod_result_type): Rename to...
12698 (python_xmethod_worker::do_get_result_type): ... this and
12699 adjust.
12700 (gdbpy_invoke_xmethod): Rename to...
12701 (python_xmethod_worker::invoke): ... this and adjust.
12702 (new_python_xmethod_worker): Rename to...
12703 (python_xmethod_worker::python_xmethod_worker): ... this and
12704 adjust.
12705 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12706 Remove.
12707 (gdbpy_free_xmethod_worker_data): Remove.
12708 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12709 (gdbpy_get_xmethod_arg_types): Remove.
12710 (gdbpy_get_xmethod_result_type): Remove.
12711 (gdbpy_invoke_xmethod): Remove.
12712 * python/python.c (python_extension_ops): Remove obsolete
12713 callbacks.
12714
12715 2018-01-05 Pedro Alves <palves@redhat.com>
12716
12717 PR gdb/18653
12718 * common/signals-state-save-restore.c
12719 (save_original_signals_state): New parameter 'quiet'. Warn if we
12720 find a custom handler preinstalled, instead of internal erroring.
12721 But only warn if !quiet.
12722 * common/signals-state-save-restore.h
12723 (save_original_signals_state): New parameter 'quiet'.
12724 * main.c (captured_main_1): Move save_original_signals_state call
12725 after option handling, and pass QUIET.
12726
12727 2018-01-05 Pedro Alves <palves@redhat.com>
12728
12729 * spu-tdep.c (spu_catch_start): Pass
12730 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12731
12732 2018-01-05 Pedro Alves <palves@redhat.com>
12733
12734 PR gdb/22670
12735 * ada-lang.c (literal_symbol_name_matcher): New function.
12736 (ada_get_symbol_name_matcher): Use it for
12737 symbol_name_match_type::SEARCH_NAME.
12738 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12739 it down instead of assuming symbol_name_match_type::FULL.
12740 * block.h (block_lookup_symbol): New parameter 'match_type'.
12741 * c-valprint.c (print_unpacked_pointer): Use
12742 lookup_symbol_search_name instead of lookup_symbol.
12743 * compile/compile-object-load.c (get_out_value_type): Pass down
12744 symbol_name_match_type::SEARCH_NAME.
12745 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12746 symbol_name_match_type::FULL.
12747 * cp-support.c (cp_get_symbol_name_matcher): Handle
12748 symbol_name_match_type::SEARCH_NAME.
12749 * infrun.c (insert_exception_resume_breakpoint): Use
12750 lookup_symbol_search_name.
12751 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12752 * psymtab.c (maintenance_check_psymtabs): Use
12753 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12754 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12755 SYMBOL_SEARCH_NAME.
12756 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12757 if symbol_name_match_type::SEARCH_NAME.
12758 (lookup_symbol_in_language): Pass down
12759 symbol_name_match_type::FULL.
12760 (lookup_symbol_search_name): New.
12761 (lookup_language_this): Pass down
12762 symbol_name_match_type::SEARCH_NAME.
12763 (lookup_symbol_aux, lookup_local_symbol): New parameter
12764 'match_type'. Pass it down.
12765 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12766 (lookup_symbol_search_name): New declaration.
12767 (lookup_symbol_in_block): New 'match_type' parameter.
12768
12769 2018-01-05 Pedro Alves <palves@redhat.com>
12770
12771 PR gdb/22670
12772 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12773 ada_lookup_symbol.
12774 (ada_lookup_symbol): Reimplement in terms of
12775 ada_lookup_symbol_list, bits factored out from
12776 ada_lookup_encoded_symbol.
12777
12778 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12779
12780 * ada-exp.y (write_object_renaming): When subscripting an array
12781 using a symbol as the index, pass the block in call to
12782 ada_lookup_encoded_symbol when looking that symbol up.
12783
12784 2018-01-05 Jerome Guitton <guitton@adacore.com>
12785
12786 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12787 TYPE_INDEX_TYPE.
12788
12789 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12790
12791 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12792 the case where VALUE_LVAL (val0) is not lval_memory.
12793
12794 2018-01-05 Xavier Roirand <roirand@adacore.com>
12795
12796 * ada-valprint.c (print_optional_low_bound): Handle
12797 character-indexed array printing like boolean-indexed array
12798 printing.
12799
12800 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12801
12802 * NEWS: Create a new section for the next release branch.
12803 Rename the section of the current branch, now that it has
12804 been cut.
12805
12806 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12807
12808 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12809 * version.in: Bump version to 8.1.50.DATE-git.
12810
12811 2018-01-03 Xavier Roirand <roirand@adacore.com>
12812
12813 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12814 Add field.
12815 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12816 Add field.
12817 (default_exception_support_info) <catch_handlers_sym>: Add field.
12818 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12819 (ada_exception_name_addr_1): Add "catch handlers" handling.
12820 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12821 Update all callers.
12822 (create_excep_cond_exprs) <ex>: Add parameter.
12823 (re_set_exception): Update create_excep_cond_exprs call.
12824 (print_it_exception, print_one_exception, print_mention_exception)
12825 (print_recreate_exception): Add "catch handler" handling.
12826 (allocate_location_catch_handlers, re_set_catch_handlers)
12827 (check_status_catch_handlers, print_it_catch_handlers)
12828 (print_one_catch_handlers, print_mention_catch_handlers)
12829 (print_recreate_catch_handlers): New function.
12830 (catch_handlers_breakpoint_ops): New variable.
12831 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12832 Add parameter. Add "catch handler" handling.
12833 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12834 Add "catch handler" handling.
12835 (ada_exception_catchpoint_cond_string): Add "catch handler"
12836 handling.
12837 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12838 call.
12839 (catch_ada_handlers_command): New function.
12840 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12841 operations structure.
12842 (_initialize_ada_language): Add "catch handlers" command entry.
12843 * NEWS: Document "catch handlers" feature.
12844
12845 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12846
12847 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12848 account when creating the array type of the slice.
12849 (ada_value_slice): Likewise.
12850
12851 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12852
12853 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12854 New enum value.
12855 (create_array_type_with_stride): Add byte_stride_prop parameter.
12856 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12857 New parameter. Update all callers in this file.
12858 (array_type_has_dynamic_stride): New function.
12859 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12860 of arrays with dynamic byte strides.
12861 * dwarf2read.c (read_array_type): Add support for dynamic
12862 DW_AT_byte_stride attributes.
12863
12864 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12865
12866 * dwarf2read.c (read_unspecified_type): Treat
12867 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12868
12869 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12870
12871 Update copyright year range in all GDB files.
12872
12873 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12874
12875 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12876 and gdb/testsuite/gdb.base/step-line.c.
12877
12878 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12879
12880 * copyright.py (main): Dump the contents of
12881 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12882 even if BY_HAND is empty.
12883
12884 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12885
12886 * top.c (print_gdb_version): Update Copyright year in version
12887 message.
12888
12889 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12890
12891 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12892
12893 For older changes see ChangeLog-2017.
12894 \f
12895 Local Variables:
12896 mode: change-log
12897 left-margin: 8
12898 fill-column: 74
12899 version-control: never
12900 coding: utf-8
12901 End:
This page took 0.587673 seconds and 4 git commands to generate.